Commit 69ae7b86 authored by Hui Su's avatar Hui Su Committed by Yaowu Xu

Change to names of some intra modes

To match the corresponding prediction angle.

Change-Id: I0441a0a25f165c1fdeb4eba915c6ca83b0514c4d
parent db5eb4cd
......@@ -188,7 +188,7 @@ typedef struct {
} FILTER_INTRA_MODE_INFO;
static const PREDICTION_MODE fimode_to_intradir[FILTER_INTRA_MODES] = {
DC_PRED, V_PRED, H_PRED, D153_PRED, DC_PRED
DC_PRED, V_PRED, H_PRED, D157_PRED, DC_PRED
};
#endif // CONFIG_FILTER_INTRA
......@@ -334,10 +334,10 @@ static INLINE PREDICTION_MODE get_uv_mode(UV_PREDICTION_MODE mode) {
H_PRED, // UV_H_PRED
D45_PRED, // UV_D45_PRED
D135_PRED, // UV_D135_PRED
D117_PRED, // UV_D117_PRED
D153_PRED, // UV_D153_PRED
D207_PRED, // UV_D207_PRED
D63_PRED, // UV_D63_PRED
D113_PRED, // UV_D113_PRED
D157_PRED, // UV_D157_PRED
D203_PRED, // UV_D203_PRED
D67_PRED, // UV_D67_PRED
SMOOTH_PRED, // UV_SMOOTH_PRED
SMOOTH_V_PRED, // UV_SMOOTH_V_PRED
SMOOTH_H_PRED, // UV_SMOOTH_H_PRED
......
......@@ -434,12 +434,12 @@ typedef enum ATTRIBUTE_PACKED {
DC_PRED, // Average of above and left pixels
V_PRED, // Vertical
H_PRED, // Horizontal
D45_PRED, // Directional 45 deg = round(arctan(1/1) * 180/pi)
D135_PRED, // Directional 135 deg = 180 - 45
D117_PRED, // Directional 117 deg = 180 - 63
D153_PRED, // Directional 153 deg = 180 - 27
D207_PRED, // Directional 207 deg = 180 + 27
D63_PRED, // Directional 63 deg = round(arctan(2/1) * 180/pi)
D45_PRED, // Directional 45 degree
D135_PRED, // Directional 135 degree
D113_PRED, // Directional 113 degree
D157_PRED, // Directional 157 degree
D203_PRED, // Directional 203 degree
D67_PRED, // Directional 67 degree
SMOOTH_PRED, // Combination of horizontal and vertical interpolation
SMOOTH_V_PRED, // Vertical interpolation
SMOOTH_H_PRED, // Horizontal interpolation
......@@ -468,12 +468,12 @@ typedef enum ATTRIBUTE_PACKED {
UV_DC_PRED, // Average of above and left pixels
UV_V_PRED, // Vertical
UV_H_PRED, // Horizontal
UV_D45_PRED, // Directional 45 deg = round(arctan(1/1) * 180/pi)
UV_D135_PRED, // Directional 135 deg = 180 - 45
UV_D117_PRED, // Directional 117 deg = 180 - 63
UV_D153_PRED, // Directional 153 deg = 180 - 27
UV_D207_PRED, // Directional 207 deg = 180 + 27
UV_D63_PRED, // Directional 63 deg = round(arctan(2/1) * 180/pi)
UV_D45_PRED, // Directional 45 degree
UV_D135_PRED, // Directional 135 degree
UV_D113_PRED, // Directional 113 degree
UV_D157_PRED, // Directional 157 degree
UV_D203_PRED, // Directional 203 degree
UV_D67_PRED, // Directional 67 degree
UV_SMOOTH_PRED, // Combination of horizontal and vertical interpolation
UV_SMOOTH_V_PRED, // Vertical interpolation
UV_SMOOTH_H_PRED, // Horizontal interpolation
......
......@@ -45,10 +45,10 @@ static const uint8_t extend_modes[INTRA_MODES] = {
NEED_LEFT, // H
NEED_ABOVE | NEED_ABOVERIGHT, // D45
NEED_LEFT | NEED_ABOVE | NEED_ABOVELEFT, // D135
NEED_LEFT | NEED_ABOVE | NEED_ABOVELEFT, // D117
NEED_LEFT | NEED_ABOVE | NEED_ABOVELEFT, // D153
NEED_LEFT | NEED_BOTTOMLEFT, // D207
NEED_ABOVE | NEED_ABOVERIGHT, // D63
NEED_LEFT | NEED_ABOVE | NEED_ABOVELEFT, // D113
NEED_LEFT | NEED_ABOVE | NEED_ABOVELEFT, // D157
NEED_LEFT | NEED_BOTTOMLEFT, // D203
NEED_ABOVE | NEED_ABOVERIGHT, // D67
NEED_LEFT | NEED_ABOVE, // SMOOTH
NEED_LEFT | NEED_ABOVE, // SMOOTH_V
NEED_LEFT | NEED_ABOVE, // SMOOTH_H
......@@ -611,12 +611,12 @@ static void av1_init_intra_predictors_internal(void) {
INIT_ALL_SIZES(pred[V_PRED], v);
INIT_ALL_SIZES(pred[H_PRED], h);
INIT_ALL_SIZES(pred[D207_PRED], d207e);
INIT_ALL_SIZES(pred[D203_PRED], d207e);
INIT_ALL_SIZES(pred[D45_PRED], d45e);
INIT_ALL_SIZES(pred[D63_PRED], d63e);
INIT_ALL_SIZES(pred[D117_PRED], d117);
INIT_ALL_SIZES(pred[D67_PRED], d63e);
INIT_ALL_SIZES(pred[D113_PRED], d117);
INIT_ALL_SIZES(pred[D135_PRED], d135);
INIT_ALL_SIZES(pred[D153_PRED], d153);
INIT_ALL_SIZES(pred[D157_PRED], d153);
INIT_ALL_SIZES(pred[PAETH_PRED], paeth);
INIT_ALL_SIZES(pred[SMOOTH_PRED], smooth);
......@@ -630,12 +630,12 @@ static void av1_init_intra_predictors_internal(void) {
INIT_ALL_SIZES(pred_high[V_PRED], highbd_v);
INIT_ALL_SIZES(pred_high[H_PRED], highbd_h);
INIT_ALL_SIZES(pred_high[D207_PRED], highbd_d207e);
INIT_ALL_SIZES(pred_high[D203_PRED], highbd_d207e);
INIT_ALL_SIZES(pred_high[D45_PRED], highbd_d45e);
INIT_ALL_SIZES(pred_high[D63_PRED], highbd_d63e);
INIT_ALL_SIZES(pred_high[D117_PRED], highbd_d117);
INIT_ALL_SIZES(pred_high[D67_PRED], highbd_d63e);
INIT_ALL_SIZES(pred_high[D113_PRED], highbd_d117);
INIT_ALL_SIZES(pred_high[D135_PRED], highbd_d135);
INIT_ALL_SIZES(pred_high[D153_PRED], highbd_d153);
INIT_ALL_SIZES(pred_high[D157_PRED], highbd_d153);
INIT_ALL_SIZES(pred_high[PAETH_PRED], highbd_paeth);
INIT_ALL_SIZES(pred_high[SMOOTH_PRED], highbd_smooth);
......
......@@ -51,9 +51,9 @@ static INLINE int av1_is_directional_mode(PREDICTION_MODE mode,
BLOCK_SIZE bsize) {
#if CONFIG_INTRA_EDGE
(void)bsize;
return mode >= V_PRED && mode <= D63_PRED;
return mode >= V_PRED && mode <= D67_PRED;
#else
return mode >= V_PRED && mode <= D63_PRED && bsize >= BLOCK_8X8;
return mode >= V_PRED && mode <= D67_PRED && bsize >= BLOCK_8X8;
#endif
}
......
......@@ -302,10 +302,10 @@ static const MODE_DEFINITION av1_mode_order[MAX_MODES] = {
{ H_PRED, { INTRA_FRAME, NONE_FRAME } },
{ V_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D135_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D207_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D153_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D63_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D117_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D203_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D157_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D67_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D113_PRED, { INTRA_FRAME, NONE_FRAME } },
{ D45_PRED, { INTRA_FRAME, NONE_FRAME } },
#if CONFIG_EXT_COMP_REFS
......@@ -345,16 +345,16 @@ static const MODE_DEFINITION av1_mode_order[MAX_MODES] = {
static const PREDICTION_MODE intra_rd_search_mode_order[INTRA_MODES] = {
DC_PRED, H_PRED, V_PRED, SMOOTH_PRED, PAETH_PRED,
SMOOTH_V_PRED, SMOOTH_H_PRED, D135_PRED, D207_PRED, D153_PRED,
D63_PRED, D117_PRED, D45_PRED,
SMOOTH_V_PRED, SMOOTH_H_PRED, D135_PRED, D203_PRED, D157_PRED,
D67_PRED, D113_PRED, D45_PRED,
};
#if CONFIG_CFL
static const UV_PREDICTION_MODE uv_rd_search_mode_order[UV_INTRA_MODES] = {
UV_DC_PRED, UV_CFL_PRED, UV_H_PRED, UV_V_PRED,
UV_SMOOTH_PRED, UV_PAETH_PRED, UV_SMOOTH_V_PRED, UV_SMOOTH_H_PRED,
UV_D135_PRED, UV_D207_PRED, UV_D153_PRED, UV_D63_PRED,
UV_D117_PRED, UV_D45_PRED,
UV_D135_PRED, UV_D203_PRED, UV_D157_PRED, UV_D67_PRED,
UV_D113_PRED, UV_D45_PRED,
};
#else
#define uv_rd_search_mode_order intra_rd_search_mode_order
......@@ -2828,16 +2828,16 @@ static int intra_mode_info_cost_uv(const AV1_COMP *cpi, const MACROBLOCK *x,
static int conditional_skipintra(PREDICTION_MODE mode,
PREDICTION_MODE best_intra_mode) {
if (mode == D117_PRED && best_intra_mode != V_PRED &&
if (mode == D113_PRED && best_intra_mode != V_PRED &&
best_intra_mode != D135_PRED)
return 1;
if (mode == D63_PRED && best_intra_mode != V_PRED &&
if (mode == D67_PRED && best_intra_mode != V_PRED &&
best_intra_mode != D45_PRED)
return 1;
if (mode == D207_PRED && best_intra_mode != H_PRED &&
if (mode == D203_PRED && best_intra_mode != H_PRED &&
best_intra_mode != D45_PRED)
return 1;
if (mode == D153_PRED && best_intra_mode != H_PRED &&
if (mode == D157_PRED && best_intra_mode != H_PRED &&
best_intra_mode != D135_PRED)
return 1;
return 0;
......
......@@ -20,14 +20,14 @@ extern "C" {
enum {
INTRA_ALL = (1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED) | (1 << D45_PRED) |
(1 << D135_PRED) | (1 << D117_PRED) | (1 << D153_PRED) |
(1 << D207_PRED) | (1 << D63_PRED) | (1 << SMOOTH_PRED) |
(1 << D135_PRED) | (1 << D113_PRED) | (1 << D157_PRED) |
(1 << D203_PRED) | (1 << D67_PRED) | (1 << SMOOTH_PRED) |
(1 << SMOOTH_V_PRED) | (1 << SMOOTH_H_PRED) | (1 << PAETH_PRED),
#if CONFIG_CFL
UV_INTRA_ALL =
(1 << UV_DC_PRED) | (1 << UV_V_PRED) | (1 << UV_H_PRED) |
(1 << UV_D45_PRED) | (1 << UV_D135_PRED) | (1 << UV_D117_PRED) |
(1 << UV_D153_PRED) | (1 << UV_D207_PRED) | (1 << UV_D63_PRED) |
(1 << UV_D45_PRED) | (1 << UV_D135_PRED) | (1 << UV_D113_PRED) |
(1 << UV_D157_PRED) | (1 << UV_D203_PRED) | (1 << UV_D67_PRED) |
(1 << UV_SMOOTH_PRED) | (1 << UV_SMOOTH_V_PRED) |
(1 << UV_SMOOTH_H_PRED) | (1 << UV_PAETH_PRED) | (1 << UV_CFL_PRED),
UV_INTRA_DC = (1 << UV_DC_PRED),
......
......@@ -199,8 +199,8 @@ const map_entry dual_filter_map[] = { ENUM(REG_REG), ENUM(REG_SMOOTH),
const map_entry prediction_mode_map[] = {
ENUM(DC_PRED), ENUM(V_PRED), ENUM(H_PRED),
ENUM(D45_PRED), ENUM(D135_PRED), ENUM(D117_PRED),
ENUM(D153_PRED), ENUM(D207_PRED), ENUM(D63_PRED),
ENUM(D45_PRED), ENUM(D135_PRED), ENUM(D113_PRED),
ENUM(D157_PRED), ENUM(D203_PRED), ENUM(D67_PRED),
ENUM(SMOOTH_PRED), ENUM(SMOOTH_V_PRED), ENUM(SMOOTH_H_PRED),
ENUM(PAETH_PRED), ENUM(NEARESTMV), ENUM(NEARMV),
ENUM(GLOBALMV), ENUM(NEWMV), ENUM(NEAREST_NEARESTMV),
......@@ -213,9 +213,9 @@ const map_entry prediction_mode_map[] = {
const map_entry uv_prediction_mode_map[] = {
ENUM(UV_DC_PRED), ENUM(UV_V_PRED),
ENUM(UV_H_PRED), ENUM(UV_D45_PRED),
ENUM(UV_D135_PRED), ENUM(UV_D117_PRED),
ENUM(UV_D153_PRED), ENUM(UV_D207_PRED),
ENUM(UV_D63_PRED), ENUM(UV_SMOOTH_PRED),
ENUM(UV_D135_PRED), ENUM(UV_D113_PRED),
ENUM(UV_D157_PRED), ENUM(UV_D203_PRED),
ENUM(UV_D67_PRED), ENUM(UV_SMOOTH_PRED),
ENUM(UV_SMOOTH_V_PRED), ENUM(UV_SMOOTH_H_PRED),
ENUM(UV_PAETH_PRED),
#if CONFIG_CFL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment