Commit 96d1c0a5 authored by Urvang Joshi's avatar Urvang Joshi

Rename TM_PRED --> PAETH_PRED.

Change-Id: Ic4e04ef959e10b60dae6de8d6da50e7a281e654c
parent f0e39196
...@@ -219,7 +219,7 @@ void aom_v_predictor_32x16_avx2(uint8_t *dst, ptrdiff_t stride, ...@@ -219,7 +219,7 @@ void aom_v_predictor_32x16_avx2(uint8_t *dst, ptrdiff_t stride,
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// TM_PRED // PAETH_PRED
// Return 16 16-bit pixels in one row (__m256i) // Return 16 16-bit pixels in one row (__m256i)
static INLINE __m256i paeth_pred(const __m256i *left, const __m256i *top, static INLINE __m256i paeth_pred(const __m256i *left, const __m256i *top,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "aom_dsp/intrapred_common.h" #include "aom_dsp/intrapred_common.h"
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// TM_PRED // PAETH_PRED
// Return 8 16-bit pixels in one row // Return 8 16-bit pixels in one row
static INLINE __m128i paeth_8x1_pred(const __m128i *left, const __m128i *top, static INLINE __m128i paeth_8x1_pred(const __m128i *left, const __m128i *top,
......
...@@ -191,7 +191,7 @@ if (aom_config("CONFIG_FILTER_INTRA") eq "yes") { ...@@ -191,7 +191,7 @@ if (aom_config("CONFIG_FILTER_INTRA") eq "yes") {
add_proto qw/void av1_d153_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left"; add_proto qw/void av1_d153_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left";
add_proto qw/void av1_d207_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left"; add_proto qw/void av1_d207_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left";
add_proto qw/void av1_d63_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left"; add_proto qw/void av1_d63_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left";
add_proto qw/void av1_tm_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left"; add_proto qw/void av1_paeth_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint8_t *above, const uint8_t *left";
# High bitdepth functions # High bitdepth functions
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/void av1_highbd_dc_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd"; add_proto qw/void av1_highbd_dc_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd";
...@@ -203,7 +203,7 @@ if (aom_config("CONFIG_FILTER_INTRA") eq "yes") { ...@@ -203,7 +203,7 @@ if (aom_config("CONFIG_FILTER_INTRA") eq "yes") {
add_proto qw/void av1_highbd_d153_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd"; add_proto qw/void av1_highbd_d153_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd";
add_proto qw/void av1_highbd_d207_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd"; add_proto qw/void av1_highbd_d207_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd";
add_proto qw/void av1_highbd_d63_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd"; add_proto qw/void av1_highbd_d63_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd";
add_proto qw/void av1_highbd_tm_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd"; add_proto qw/void av1_highbd_paeth_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, TX_SIZE tx_size, const uint16_t *above, const uint16_t *left, int bd";
} }
} }
......
...@@ -160,7 +160,7 @@ static INLINE PREDICTION_MODE compound_ref0_mode(PREDICTION_MODE mode) { ...@@ -160,7 +160,7 @@ static INLINE PREDICTION_MODE compound_ref0_mode(PREDICTION_MODE mode) {
MB_MODE_COUNT, // SMOOTH_V_PRED MB_MODE_COUNT, // SMOOTH_V_PRED
MB_MODE_COUNT, // SMOOTH_H_PRED MB_MODE_COUNT, // SMOOTH_H_PRED
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
MB_MODE_COUNT, // TM_PRED MB_MODE_COUNT, // PAETH_PRED
MB_MODE_COUNT, // NEARESTMV MB_MODE_COUNT, // NEARESTMV
MB_MODE_COUNT, // NEARMV MB_MODE_COUNT, // NEARMV
MB_MODE_COUNT, // ZEROMV MB_MODE_COUNT, // ZEROMV
...@@ -206,7 +206,7 @@ static INLINE PREDICTION_MODE compound_ref1_mode(PREDICTION_MODE mode) { ...@@ -206,7 +206,7 @@ static INLINE PREDICTION_MODE compound_ref1_mode(PREDICTION_MODE mode) {
MB_MODE_COUNT, // SMOOTH_V_PRED MB_MODE_COUNT, // SMOOTH_V_PRED
MB_MODE_COUNT, // SMOOTH_H_PRED MB_MODE_COUNT, // SMOOTH_H_PRED
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
MB_MODE_COUNT, // TM_PRED MB_MODE_COUNT, // PAETH_PRED
MB_MODE_COUNT, // NEARESTMV MB_MODE_COUNT, // NEARESTMV
MB_MODE_COUNT, // NEARMV MB_MODE_COUNT, // NEARMV
MB_MODE_COUNT, // ZEROMV MB_MODE_COUNT, // ZEROMV
...@@ -511,7 +511,7 @@ static INLINE PREDICTION_MODE get_uv_mode(UV_PREDICTION_MODE mode) { ...@@ -511,7 +511,7 @@ static INLINE PREDICTION_MODE get_uv_mode(UV_PREDICTION_MODE mode) {
SMOOTH_V_PRED, // UV_SMOOTH_V_PRED SMOOTH_V_PRED, // UV_SMOOTH_V_PRED
SMOOTH_H_PRED, // UV_SMOOTH_H_PRED SMOOTH_H_PRED, // UV_SMOOTH_H_PRED
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
TM_PRED, // UV_TM_PRED PAETH_PRED, // UV_PAETH_PRED
DC_PRED, // CFL_PRED DC_PRED, // CFL_PRED
}; };
return uv2y[mode]; return uv2y[mode];
...@@ -878,7 +878,7 @@ static const TX_TYPE intra_mode_to_tx_type_context[INTRA_MODES] = { ...@@ -878,7 +878,7 @@ static const TX_TYPE intra_mode_to_tx_type_context[INTRA_MODES] = {
ADST_DCT, // SMOOTH_V ADST_DCT, // SMOOTH_V
DCT_ADST, // SMOOTH_H DCT_ADST, // SMOOTH_H
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
ADST_ADST, // TM ADST_ADST, // PAETH
}; };
#if CONFIG_SUPERTX #if CONFIG_SUPERTX
...@@ -1080,7 +1080,7 @@ static INLINE int is_lgt_allowed(PREDICTION_MODE mode, TX_SIZE tx_size) { ...@@ -1080,7 +1080,7 @@ static INLINE int is_lgt_allowed(PREDICTION_MODE mode, TX_SIZE tx_size) {
return tx_size_high[tx_size] <= 8; return tx_size_high[tx_size] <= 8;
case DC_PRED: case DC_PRED:
case SMOOTH_PRED: return 0; case SMOOTH_PRED: return 0;
case TM_PRED: case PAETH_PRED:
default: return tx_size_wide[tx_size] <= 8 || tx_size_high[tx_size] <= 8; default: return tx_size_wide[tx_size] <= 8 || tx_size_high[tx_size] <= 8;
} }
} }
......
...@@ -498,7 +498,7 @@ typedef enum ATTRIBUTE_PACKED { ...@@ -498,7 +498,7 @@ typedef enum ATTRIBUTE_PACKED {
SMOOTH_V_PRED, // Vertical interpolation SMOOTH_V_PRED, // Vertical interpolation
SMOOTH_H_PRED, // Horizontal interpolation SMOOTH_H_PRED, // Horizontal interpolation
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
TM_PRED, // True-motion PAETH_PRED, // Predict from the direction of smallest gradient
NEARESTMV, NEARESTMV,
NEARMV, NEARMV,
ZEROMV, ZEROMV,
...@@ -521,7 +521,7 @@ typedef enum ATTRIBUTE_PACKED { ...@@ -521,7 +521,7 @@ typedef enum ATTRIBUTE_PACKED {
ZERO_ZEROMV, ZERO_ZEROMV,
NEW_NEWMV, NEW_NEWMV,
MB_MODE_COUNT, MB_MODE_COUNT,
INTRA_MODES = TM_PRED + 1, // TM_PRED has to be the last intra mode. INTRA_MODES = PAETH_PRED + 1, // PAETH_PRED has to be the last intra mode.
INTRA_INVALID = MB_MODE_COUNT // For uv_mode in inter blocks INTRA_INVALID = MB_MODE_COUNT // For uv_mode in inter blocks
} PREDICTION_MODE; } PREDICTION_MODE;
...@@ -543,7 +543,7 @@ typedef enum ATTRIBUTE_PACKED { ...@@ -543,7 +543,7 @@ typedef enum ATTRIBUTE_PACKED {
UV_SMOOTH_V_PRED, // Vertical interpolation UV_SMOOTH_V_PRED, // Vertical interpolation
UV_SMOOTH_H_PRED, // Horizontal interpolation UV_SMOOTH_H_PRED, // Horizontal interpolation
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
UV_TM_PRED, // True-motion UV_PAETH_PRED, // Predict from the direction of smallest gradient
UV_CFL_PRED, // Chroma-from-Luma UV_CFL_PRED, // Chroma-from-Luma
UV_INTRA_MODES, UV_INTRA_MODES,
UV_MODE_INVALID, // For uv_mode in inter blocks UV_MODE_INVALID, // For uv_mode in inter blocks
...@@ -606,7 +606,7 @@ typedef enum { ...@@ -606,7 +606,7 @@ typedef enum {
FILTER_D153_PRED, FILTER_D153_PRED,
FILTER_D207_PRED, FILTER_D207_PRED,
FILTER_D63_PRED, FILTER_D63_PRED,
FILTER_TM_PRED, FILTER_PAETH_PRED,
FILTER_INTRA_MODES, FILTER_INTRA_MODES,
} FILTER_INTRA_MODE; } FILTER_INTRA_MODE;
#endif // CONFIG_FILTER_INTRA #endif // CONFIG_FILTER_INTRA
......
...@@ -352,7 +352,7 @@ int idx_selfloop_wrt_mode(PREDICTION_MODE mode, int is_col) { ...@@ -352,7 +352,7 @@ int idx_selfloop_wrt_mode(PREDICTION_MODE mode, int is_col) {
case SMOOTH_PRED: case SMOOTH_PRED:
// predition is good for both directions: large SLs for row and col // predition is good for both directions: large SLs for row and col
return 3; return 3;
case TM_PRED: return 0; case PAETH_PRED: return 0;
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
case SMOOTH_H_PRED: case SMOOTH_H_PRED:
#endif #endif
...@@ -422,8 +422,8 @@ void get_lgt4_from_pred(const TxfmParam *txfm_param, int is_col, ...@@ -422,8 +422,8 @@ void get_lgt4_from_pred(const TxfmParam *txfm_param, int is_col,
// typically yields very smooth residues so having the break point // typically yields very smooth residues so having the break point
// does not usually improve the RD result. // does not usually improve the RD result.
return; return;
} else if (mode == TM_PRED) { } else if (mode == PAETH_PRED) {
// TM_PRED: use both 1D top boundary and 1D left boundary // PAETH_PRED: use both 1D top boundary and 1D left boundary
if (is_col) if (is_col)
for (int i = 0; i < 4; ++i) arr[i] = dst[i * stride]; for (int i = 0; i < 4; ++i) arr[i] = dst[i * stride];
else else
...@@ -455,7 +455,7 @@ void get_lgt4_from_pred(const TxfmParam *txfm_param, int is_col, ...@@ -455,7 +455,7 @@ void get_lgt4_from_pred(const TxfmParam *txfm_param, int is_col,
} else if (mode == D135_PRED || mode == D153_PRED || mode == D207_PRED) { } else if (mode == D135_PRED || mode == D153_PRED || mode == D207_PRED) {
// directional modes closer to horizontal // directional modes closer to horizontal
if (is_col) get_discontinuity_2d(dst, stride, 4, 1, &bp, ntx); if (is_col) get_discontinuity_2d(dst, stride, 4, 1, &bp, ntx);
} else if (mode > TM_PRED) { } else if (mode > PAETH_PRED) {
// inter // inter
get_discontinuity_2d(dst, stride, 4, is_col, &bp, ntx); get_discontinuity_2d(dst, stride, 4, is_col, &bp, ntx);
} }
...@@ -495,7 +495,7 @@ void get_lgt8_from_pred(const TxfmParam *txfm_param, int is_col, ...@@ -495,7 +495,7 @@ void get_lgt8_from_pred(const TxfmParam *txfm_param, int is_col,
if (mode == DC_PRED || mode == SMOOTH_PRED) { if (mode == DC_PRED || mode == SMOOTH_PRED) {
return; return;
} else if (mode == TM_PRED) { } else if (mode == PAETH_PRED) {
if (is_col) if (is_col)
for (int i = 0; i < 8; ++i) arr[i] = dst[i * stride]; for (int i = 0; i < 8; ++i) arr[i] = dst[i * stride];
else else
...@@ -523,7 +523,7 @@ void get_lgt8_from_pred(const TxfmParam *txfm_param, int is_col, ...@@ -523,7 +523,7 @@ void get_lgt8_from_pred(const TxfmParam *txfm_param, int is_col,
if (!is_col) get_discontinuity_2d(dst, stride, 8, 0, &bp, ntx); if (!is_col) get_discontinuity_2d(dst, stride, 8, 0, &bp, ntx);
} else if (mode == D135_PRED || mode == D153_PRED || mode == D207_PRED) { } else if (mode == D135_PRED || mode == D153_PRED || mode == D207_PRED) {
if (is_col) get_discontinuity_2d(dst, stride, 8, 1, &bp, ntx); if (is_col) get_discontinuity_2d(dst, stride, 8, 1, &bp, ntx);
} else if (mode > TM_PRED) { } else if (mode > PAETH_PRED) {
get_discontinuity_2d(dst, stride, 8, is_col, &bp, ntx); get_discontinuity_2d(dst, stride, 8, is_col, &bp, ntx);
} }
...@@ -551,7 +551,7 @@ void get_lgt16up_from_pred(const TxfmParam *txfm_param, int is_col, ...@@ -551,7 +551,7 @@ void get_lgt16up_from_pred(const TxfmParam *txfm_param, int is_col,
switch (mode) { switch (mode) {
case DC_PRED: case DC_PRED:
case TM_PRED: case PAETH_PRED:
case SMOOTH_PRED: case SMOOTH_PRED:
// prediction from both top and left -> ADST // prediction from both top and left -> ADST
lgtmtx[0] = adstmtx; lgtmtx[0] = adstmtx;
......
...@@ -58,7 +58,7 @@ static const int mode_2_counter[] = { ...@@ -58,7 +58,7 @@ static const int mode_2_counter[] = {
9, // SMOOTH_V_PRED 9, // SMOOTH_V_PRED
9, // SMOOTH_H_PRED 9, // SMOOTH_H_PRED
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
9, // TM_PRED 9, // PAETH_PRED
0, // NEARESTMV 0, // NEARESTMV
0, // NEARMV 0, // NEARMV
3, // ZEROMV 3, // ZEROMV
......
...@@ -63,7 +63,7 @@ static const uint8_t extend_modes[INTRA_MODES] = { ...@@ -63,7 +63,7 @@ static const uint8_t extend_modes[INTRA_MODES] = {
NEED_LEFT | NEED_ABOVE, // SMOOTH_V NEED_LEFT | NEED_ABOVE, // SMOOTH_V
NEED_LEFT | NEED_ABOVE, // SMOOTH_H NEED_LEFT | NEED_ABOVE, // SMOOTH_H
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
NEED_LEFT | NEED_ABOVE | NEED_ABOVELEFT, // TM NEED_LEFT | NEED_ABOVE | NEED_ABOVELEFT, // PAETH
}; };
static const uint16_t orders_128x128[1] = { 0 }; static const uint16_t orders_128x128[1] = { 0 };
...@@ -727,7 +727,7 @@ static void av1_init_intra_predictors_internal(void) { ...@@ -727,7 +727,7 @@ static void av1_init_intra_predictors_internal(void) {
INIT_ALL_SIZES(pred[D135_PRED], d135); INIT_ALL_SIZES(pred[D135_PRED], d135);
INIT_ALL_SIZES(pred[D153_PRED], d153); INIT_ALL_SIZES(pred[D153_PRED], d153);
INIT_ALL_SIZES(pred[TM_PRED], paeth); INIT_ALL_SIZES(pred[PAETH_PRED], paeth);
INIT_ALL_SIZES(pred[SMOOTH_PRED], smooth); INIT_ALL_SIZES(pred[SMOOTH_PRED], smooth);
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
INIT_ALL_SIZES(pred[SMOOTH_V_PRED], smooth_v); INIT_ALL_SIZES(pred[SMOOTH_V_PRED], smooth_v);
...@@ -749,7 +749,7 @@ static void av1_init_intra_predictors_internal(void) { ...@@ -749,7 +749,7 @@ static void av1_init_intra_predictors_internal(void) {
INIT_ALL_SIZES(pred_high[D135_PRED], highbd_d135); INIT_ALL_SIZES(pred_high[D135_PRED], highbd_d135);
INIT_ALL_SIZES(pred_high[D153_PRED], highbd_d153); INIT_ALL_SIZES(pred_high[D153_PRED], highbd_d153);
INIT_ALL_SIZES(pred_high[TM_PRED], highbd_paeth); INIT_ALL_SIZES(pred_high[PAETH_PRED], highbd_paeth);
INIT_ALL_SIZES(pred_high[SMOOTH_PRED], highbd_smooth); INIT_ALL_SIZES(pred_high[SMOOTH_PRED], highbd_smooth);
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
INIT_ALL_SIZES(pred_high[SMOOTH_V_PRED], highbd_smooth_v); INIT_ALL_SIZES(pred_high[SMOOTH_V_PRED], highbd_smooth_v);
...@@ -1867,14 +1867,15 @@ void av1_d63_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, ...@@ -1867,14 +1867,15 @@ void av1_d63_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size,
#endif #endif
} }
void av1_tm_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size, void av1_paeth_filter_predictor_c(uint8_t *dst, ptrdiff_t stride,
const uint8_t *above, const uint8_t *left) { TX_SIZE tx_size, const uint8_t *above,
const uint8_t *left) {
#if USE_3TAP_INTRA_FILTER #if USE_3TAP_INTRA_FILTER
filter_intra_predictors_3tap(dst, stride, tx_size, above, left, filter_intra_predictors_3tap(dst, stride, tx_size, above, left,
FILTER_TM_PRED); FILTER_PAETH_PRED);
#else #else
filter_intra_predictors_4tap(dst, stride, tx_size, above, left, filter_intra_predictors_4tap(dst, stride, tx_size, above, left,
FILTER_TM_PRED); FILTER_PAETH_PRED);
#endif #endif
} }
...@@ -1909,8 +1910,8 @@ static void filter_intra_predictors(FILTER_INTRA_MODE mode, uint8_t *dst, ...@@ -1909,8 +1910,8 @@ static void filter_intra_predictors(FILTER_INTRA_MODE mode, uint8_t *dst,
case FILTER_D63_PRED: case FILTER_D63_PRED:
av1_d63_filter_predictor(dst, stride, tx_size, above, left); av1_d63_filter_predictor(dst, stride, tx_size, above, left);
break; break;
case FILTER_TM_PRED: case FILTER_PAETH_PRED:
av1_tm_filter_predictor(dst, stride, tx_size, above, left); av1_paeth_filter_predictor(dst, stride, tx_size, above, left);
break; break;
default: assert(0); default: assert(0);
} }
...@@ -2121,15 +2122,15 @@ void av1_highbd_d63_filter_predictor_c(uint16_t *dst, ptrdiff_t stride, ...@@ -2121,15 +2122,15 @@ void av1_highbd_d63_filter_predictor_c(uint16_t *dst, ptrdiff_t stride,
#endif #endif
} }
void av1_highbd_tm_filter_predictor_c(uint16_t *dst, ptrdiff_t stride, void av1_highbd_paeth_filter_predictor_c(uint16_t *dst, ptrdiff_t stride,
TX_SIZE tx_size, const uint16_t *above, TX_SIZE tx_size, const uint16_t *above,
const uint16_t *left, int bd) { const uint16_t *left, int bd) {
#if USE_3TAP_INTRA_FILTER #if USE_3TAP_INTRA_FILTER
highbd_filter_intra_predictors_3tap(dst, stride, tx_size, above, left, highbd_filter_intra_predictors_3tap(dst, stride, tx_size, above, left,
FILTER_TM_PRED, bd); FILTER_PAETH_PRED, bd);
#else #else
highbd_filter_intra_predictors_4tap(dst, stride, tx_size, above, left, highbd_filter_intra_predictors_4tap(dst, stride, tx_size, above, left,
FILTER_TM_PRED, bd); FILTER_PAETH_PRED, bd);
#endif #endif
} }
...@@ -2166,8 +2167,8 @@ static void highbd_filter_intra_predictors(FILTER_INTRA_MODE mode, ...@@ -2166,8 +2167,8 @@ static void highbd_filter_intra_predictors(FILTER_INTRA_MODE mode,
case FILTER_D63_PRED: case FILTER_D63_PRED:
av1_highbd_d63_filter_predictor(dst, stride, tx_size, above, left, bd); av1_highbd_d63_filter_predictor(dst, stride, tx_size, above, left, bd);
break; break;
case FILTER_TM_PRED: case FILTER_PAETH_PRED:
av1_highbd_tm_filter_predictor(dst, stride, tx_size, above, left, bd); av1_highbd_paeth_filter_predictor(dst, stride, tx_size, above, left, bd);
break; break;
default: assert(0); default: assert(0);
} }
......
...@@ -574,10 +574,11 @@ void av1_d63_filter_predictor_sse4_1(uint8_t *dst, ptrdiff_t stride, int bs, ...@@ -574,10 +574,11 @@ void av1_d63_filter_predictor_sse4_1(uint8_t *dst, ptrdiff_t stride, int bs,
FilterPrediction(above, left, bs, prm, dst, stride); FilterPrediction(above, left, bs, prm, dst, stride);
} }
void av1_tm_filter_predictor_sse4_1(uint8_t *dst, ptrdiff_t stride, int bs, void av1_paeth_filter_predictor_sse4_1(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left) { const uint8_t *above,
const uint8_t *left) {
__m128i prm[5]; __m128i prm[5];
GetIntraFilterParams(bs, TM_PRED, &prm[0]); GetIntraFilterParams(bs, PAETH_PRED, &prm[0]);
FilterPrediction(above, left, bs, prm, dst, stride); FilterPrediction(above, left, bs, prm, dst, stride);
} }
...@@ -886,11 +887,11 @@ void av1_highbd_d63_filter_predictor_sse4_1(uint16_t *dst, ptrdiff_t stride, ...@@ -886,11 +887,11 @@ void av1_highbd_d63_filter_predictor_sse4_1(uint16_t *dst, ptrdiff_t stride,
HighbdFilterPrediction(above, left, bs, bd, prm, dst, stride); HighbdFilterPrediction(above, left, bs, bd, prm, dst, stride);
} }
void av1_highbd_tm_filter_predictor_sse4_1(uint16_t *dst, ptrdiff_t stride, void av1_highbd_paeth_filter_predictor_sse4_1(uint16_t *dst, ptrdiff_t stride,
int bs, const uint16_t *above, int bs, const uint16_t *above,
const uint16_t *left, int bd) { const uint16_t *left, int bd) {
__m128i prm[5]; __m128i prm[5];
GetIntraFilterParams(bs, TM_PRED, &prm[0]); GetIntraFilterParams(bs, PAETH_PRED, &prm[0]);
HighbdFilterPrediction(above, left, bs, bd, prm, dst, stride); HighbdFilterPrediction(above, left, bs, bd, prm, dst, stride);
} }
#endif // CONFIG_HIGHBITDEPTH #endif // CONFIG_HIGHBITDEPTH
......
...@@ -696,7 +696,7 @@ static void update_state(const AV1_COMP *const cpi, ThreadData *td, ...@@ -696,7 +696,7 @@ static void update_state(const AV1_COMP *const cpi, ThreadData *td,
THR_SMOOTH_V, /*SMOOTH_V_PRED*/ THR_SMOOTH_V, /*SMOOTH_V_PRED*/
THR_SMOOTH_H, /*SMOOTH_H_PRED*/ THR_SMOOTH_H, /*SMOOTH_H_PRED*/
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
THR_TM /*TM_PRED*/, THR_PAETH /*PAETH_PRED*/,
}; };
++mode_chosen_counts[kf_mode_index[mbmi->mode]]; ++mode_chosen_counts[kf_mode_index[mbmi->mode]];
} else { } else {
......
...@@ -144,7 +144,7 @@ static int find_best_16x16_intra(AV1_COMP *cpi, PREDICTION_MODE *pbest_mode) { ...@@ -144,7 +144,7 @@ static int find_best_16x16_intra(AV1_COMP *cpi, PREDICTION_MODE *pbest_mode) {
// calculate SATD for each intra prediction mode; // calculate SATD for each intra prediction mode;
// we're intentionally not doing 4x4, we just want a rough estimate // we're intentionally not doing 4x4, we just want a rough estimate
for (mode = DC_PRED; mode <= TM_PRED; mode++) { for (mode = DC_PRED; mode <= PAETH_PRED; mode++) {
unsigned int err; unsigned int err;
xd->mi[0]->mbmi.mode = mode; xd->mi[0]->mbmi.mode = mode;
......
...@@ -1314,7 +1314,7 @@ void av1_set_rd_speed_thresholds(AV1_COMP *cpi) { ...@@ -1314,7 +1314,7 @@ void av1_set_rd_speed_thresholds(AV1_COMP *cpi) {
rd->thresh_mult[THR_ZEROG] += 2000; rd->thresh_mult[THR_ZEROG] += 2000;
rd->thresh_mult[THR_ZEROA] += 2000; rd->thresh_mult[THR_ZEROA] += 2000;
rd->thresh_mult[THR_TM] += 1000; rd->thresh_mult[THR_PAETH] += 1000;
#if CONFIG_COMPOUND_SINGLEREF #if CONFIG_COMPOUND_SINGLEREF
rd->thresh_mult[THR_SR_NEAREST_NEARMV] += 1200; rd->thresh_mult[THR_SR_NEAREST_NEARMV] += 1200;
......
...@@ -162,7 +162,7 @@ typedef enum { ...@@ -162,7 +162,7 @@ typedef enum {
#endif // CONFIG_EXT_COMP_REFS #endif // CONFIG_EXT_COMP_REFS
#endif // CONFIG_EXT_REFS #endif // CONFIG_EXT_REFS
THR_TM, THR_PAETH,
THR_SMOOTH, THR_SMOOTH,
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
......
...@@ -295,7 +295,7 @@ static const MODE_DEFINITION av1_mode_order[MAX_MODES] = { ...@@ -295,7 +295,7 @@ static const MODE_DEFINITION av1_mode_order[MAX_MODES] = {
#endif // CONFIG_EXT_COMP_REFS #endif // CONFIG_EXT_COMP_REFS
#endif // CONFIG_EXT_REFS #endif // CONFIG_EXT_REFS
{ TM_PRED, { INTRA_FRAME, NONE_FRAME } }, { PAETH_PRED, { INTRA_FRAME, NONE_FRAME } },
{ SMOOTH_PRED, { INTRA_FRAME, NONE_FRAME } }, { SMOOTH_PRED, { INTRA_FRAME, NONE_FRAME } },
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
...@@ -487,17 +487,17 @@ static const MODE_DEFINITION av1_mode_order[MAX_MODES] = { ...@@ -487,17 +487,17 @@ static const MODE_DEFINITION av1_mode_order[MAX_MODES] = {
}; };
static const PREDICTION_MODE intra_rd_search_mode_order[INTRA_MODES] = { static const PREDICTION_MODE intra_rd_search_mode_order[INTRA_MODES] = {
DC_PRED, H_PRED, V_PRED, SMOOTH_PRED, TM_PRED, DC_PRED, H_PRED, V_PRED, SMOOTH_PRED, PAETH_PRED,
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
SMOOTH_V_PRED, SMOOTH_H_PRED, SMOOTH_V_PRED, SMOOTH_H_PRED,
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
D135_PRED, D207_PRED, D153_PRED, D63_PRED, D117_PRED, D45_PRED, D135_PRED, D207_PRED, D153_PRED, D63_PRED, D117_PRED, D45_PRED,
}; };
#if CONFIG_CFL #if CONFIG_CFL
static const UV_PREDICTION_MODE uv_rd_search_mode_order[UV_INTRA_MODES] = { static const UV_PREDICTION_MODE uv_rd_search_mode_order[UV_INTRA_MODES] = {
UV_DC_PRED, UV_CFL_PRED, UV_H_PRED, UV_DC_PRED, UV_CFL_PRED, UV_H_PRED,
UV_V_PRED, UV_SMOOTH_PRED, UV_TM_PRED, UV_V_PRED, UV_SMOOTH_PRED, UV_PAETH_PRED,
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
UV_SMOOTH_V_PRED, UV_SMOOTH_H_PRED, UV_SMOOTH_V_PRED, UV_SMOOTH_H_PRED,
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
...@@ -3293,7 +3293,7 @@ static int64_t rd_pick_intra_sub_8x8_y_subblock_mode( ...@@ -3293,7 +3293,7 @@ static int64_t rd_pick_intra_sub_8x8_y_subblock_mode(
#if CONFIG_PVQ #if CONFIG_PVQ
od_encode_checkpoint(&x->daala_enc, &pre_buf); od_encode_checkpoint(&x->daala_enc, &pre_buf);
#endif #endif
for (mode = DC_PRED; mode <= TM_PRED; ++mode) { for (mode = DC_PRED; mode <= PAETH_PRED; ++mode) {
int64_t this_rd; int64_t this_rd;
int ratey = 0; int ratey = 0;
int64_t distortion = 0; int64_t distortion = 0;
...@@ -3502,7 +3502,7 @@ static int64_t rd_pick_intra_sub_8x8_y_subblock_mode( ...@@ -3502,7 +3502,7 @@ static int64_t rd_pick_intra_sub_8x8_y_subblock_mode(
od_encode_checkpoint(&x->daala_enc, &pre_buf); od_encode_checkpoint(&x->daala_enc, &pre_buf);
#endif // CONFIG_PVQ #endif // CONFIG_PVQ
for (mode = DC_PRED; mode <= TM_PRED; ++mode) { for (mode = DC_PRED; mode <= PAETH_PRED; ++mode) {
int64_t this_rd; int64_t this_rd;
int ratey = 0; int ratey = 0;
int64_t distortion = 0; int64_t distortion = 0;
...@@ -4286,7 +4286,7 @@ static int64_t rd_pick_intra_sby_mode(const AV1_COMP *const cpi, MACROBLOCK *x, ...@@ -4286,7 +4286,7 @@ static int64_t rd_pick_intra_sby_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
const MODE_INFO *left_mi = xd->left_mi; const MODE_INFO *left_mi = xd->left_mi;
const PREDICTION_MODE A = av1_above_block_mode(mic, above_mi, 0); const PREDICTION_MODE A = av1_above_block_mode(mic, above_mi, 0);
const PREDICTION_MODE L = av1_left_block_mode(mic, left_mi, 0); const PREDICTION_MODE L = av1_left_block_mode(mic, left_mi, 0);
const PREDICTION_MODE FINAL_MODE_SEARCH = TM_PRED + 1; const PREDICTION_MODE FINAL_MODE_SEARCH = PAETH_PRED + 1;
#if CONFIG_PVQ #if CONFIG_PVQ
od_rollback_buffer pre_buf, post_buf; od_rollback_buffer pre_buf, post_buf;
...@@ -10944,7 +10944,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data, ...@@ -10944,7 +10944,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
// Only search the oblique modes if the best so far is // Only search the oblique modes if the best so far is
// one of the neighboring directional modes // one of the neighboring directional modes
if ((mode_search_skip_flags & FLAG_SKIP_INTRA_BESTINTER) && if ((mode_search_skip_flags & FLAG_SKIP_INTRA_BESTINTER) &&
(this_mode >= D45_PRED && this_mode <= TM_PRED)) { (this_mode >= D45_PRED && this_mode <= PAETH_PRED)) {
if (best_mode_index >= 0 && best_mbmode.ref_frame[0] > INTRA_FRAME) if (best_mode_index >= 0 && best_mbmode.ref_frame[0] > INTRA_FRAME)
continue; continue;
} }
...@@ -11151,7 +11151,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data, ...@@ -11151,7 +11151,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
mbmi->filter_intra_mode_info.filter_intra_mode[1]); mbmi->filter_intra_mode_info.filter_intra_mode[1]);
} }
#endif // CONFIG_FILTER_INTRA #endif // CONFIG_FILTER_INTRA
if (mbmi->mode != DC_PRED && mbmi->mode != TM_PRED) if (mbmi->mode != DC_PRED && mbmi->mode != PAETH_PRED)
rate2 += intra_cost_penalty; rate2 += intra_cost_penalty;
distortion2 = distortion_y + distortion_uv; distortion2 = distortion_y + distortion_uv;
} else { } else {
......
...@@ -25,7 +25,7 @@ enum { ...@@ -25,7 +25,7 @@ enum {
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
(1 << SMOOTH_V_PRED) | (1 << SMOOTH_H_PRED) | (1 << SMOOTH_V_PRED) | (1 << SMOOTH_H_PRED) |
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
(1 << TM_PRED), (1 << PAETH_PRED),
#if CONFIG_CFL #if CONFIG_CFL
UV_INTRA_ALL = (1 << UV_DC_PRED) | (1 << UV_V_PRED) | (1 << UV_H_PRED) | 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_D45_PRED) | (1 << UV_D135_PRED) |
...@@ -35,26 +35,26 @@ enum { ...@@ -35,26 +35,26 @@ enum {
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
(1 << UV_SMOOTH_V_PRED) | (1 << UV_SMOOTH_H_PRED) | (1 << UV_SMOOTH_V_PRED) | (1 << UV_SMOOTH_H_PRED) |
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
(1 << UV_TM_PRED) | (1 << UV_CFL_PRED), (1 << UV_PAETH_PRED) | (1 << UV_CFL_PRED),
UV_INTRA_DC = (1 << UV_DC_PRED), UV_INTRA_DC = (1 << UV_DC_PRED),
UV_INTRA_DC_CFL = (1 << UV_DC_PRED) | (1 << UV_CFL_PRED), UV_INTRA_DC_CFL = (1 << UV_DC_PRED) | (1 << UV_CFL_PRED),
UV_INTRA_DC_TM = (1 << UV_DC_PRED) | (1 << UV_TM_PRED), UV_INTRA_DC_TM = (1 << UV_DC_PRED) | (1 << UV_PAETH_PRED),
UV_INTRA_DC_TM_CFL = UV_INTRA_DC_PAETH_CFL =
(1 << UV_DC_PRED) | (1 << UV_TM_PRED) | (1 << UV_CFL_PRED), (1 << UV_DC_PRED) | (1 << UV_PAETH_PRED) | (1 << UV_CFL_PRED),
UV_INTRA_DC_H_V = (1 << UV_DC_PRED) | (1 << UV_V_PRED) | (1 << UV_H_PRED), UV_INTRA_DC_H_V = (1 << UV_DC_PRED) | (1 << UV_V_PRED) | (1 << UV_H_PRED),
UV_INTRA_DC_H_V_CFL = (1 << UV_DC_PRED) | (1 << UV_V_PRED) | UV_INTRA_DC_H_V_CFL = (1 << UV_DC_PRED) | (1 << UV_V_PRED) |
(1 << UV_H_PRED) | (1 << UV_CFL_PRED), (1 << UV_H_PRED) | (1 << UV_CFL_PRED),
UV_INTRA_DC_TM_H_V = (1 << UV_DC_PRED) | (1 << UV_TM_PRED) | UV_INTRA_DC_PAETH_H_V = (1 << UV_DC_PRED) | (1 << UV_PAETH_PRED) |
(1 << UV_V_PRED) | (1 << UV_H_PRED), (1 << UV_V_PRED) | (1 << UV_H_PRED),
UV_INTRA_DC_TM_H_V_CFL = (1 << UV_DC_PRED) | (1 << UV_TM_PRED) | UV_INTRA_DC_PAETH_H_V_CFL = (1 << UV_DC_PRED) | (1 << UV_PAETH_PRED) |
(1 << UV_V_PRED) | (1 << UV_H_PRED) | (1 << UV_V_PRED) | (1 << UV_H_PRED) |
(1 << UV_CFL_PRED), (1 << UV_CFL_PRED),
#endif // CONFIG_CFL #endif // CONFIG_CFL
INTRA_DC = (1 << DC_PRED), INTRA_DC = (1 << DC_PRED),
INTRA_DC_TM = (1 << DC_PRED) | (1 << TM_PRED), INTRA_DC_TM = (1 << DC_PRED) | (1 << PAETH_PRED),
INTRA_DC_H_V = (1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED), INTRA_DC_H_V = (1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED),
INTRA_DC_TM_H_V = INTRA_DC_PAETH_H_V =
(1 << DC_PRED) | (1 << TM_PRED) | (1 << V_PRED) | (1 << H_PRED) (1 << DC_PRED) | (1 << PAETH_PRED) | (1 << V_PRED) | (1 << H_PRED)
}; };
enum { enum {
......
...@@ -202,7 +202,7 @@ const map_entry prediction_mode_map[] = { ...@@ -202,7 +202,7 @@ const map_entry prediction_mode_map[] = {
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
ENUM(SMOOTH_V_PRED), ENUM(SMOOTH_H_PRED), ENUM(SMOOTH_V_PRED), ENUM(SMOOTH_H_PRED),
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
ENUM(TM_PRED), ENUM(NEARESTMV), ENUM(NEARMV), ENUM(PAETH_PRED), ENUM(NEARESTMV), ENUM(NEARMV),
ENUM(ZEROMV), ENUM(NEWMV), ENUM(NEAREST_NEARESTMV), ENUM(ZEROMV), ENUM(NEWMV), ENUM(NEAREST_NEARESTMV),
ENUM(NEAR_NEARMV), ENUM(NEAREST_NEWMV), ENUM(NEW_NEARESTMV), ENUM(NEAR_NEARMV), ENUM(NEAREST_NEWMV), ENUM(NEW_NEARESTMV),
ENUM(NEAR_NEWMV), ENUM(NEW_NEARMV), ENUM(ZERO_ZEROMV), ENUM(NEAR_NEWMV), ENUM(NEW_NEARMV), ENUM(ZERO_ZEROMV),
...@@ -219,7 +219,7 @@ const map_entry uv_prediction_mode_map[] = { ...@@ -219,7 +219,7 @@ const map_entry uv_prediction_mode_map[] = {
#if CONFIG_SMOOTH_HV #if CONFIG_SMOOTH_HV
ENUM(UV_SMOOTH_V_PRED), ENUM(UV_SMOOTH_H_PRED), ENUM(UV_SMOOTH_V_PRED), ENUM(UV_SMOOTH_H_PRED),
#endif // CONFIG_SMOOTH_HV #endif // CONFIG_SMOOTH_HV
ENUM(UV_TM_PRED), ENUM(UV_PAETH_PRED),
#if CONFIG_CFL #if CONFIG_CFL
ENUM(UV_CFL_PRED), ENUM(UV_CFL_PRED),
#endif #endif
......
...@@ -284,8 +284,8 @@ const PredFuncMode kPredFuncMdArray[] = { ...@@ -284,8 +284,8 @@ const PredFuncMode kPredFuncMdArray[] = {
D207_PRED), D207_PRED),
make_tuple(av1_d63_filter_predictor_c, av1_d63_filter_predictor_sse4_1, make_tuple(av1_d63_filter_predictor_c, av1_d63_filter_predictor_sse4_1,