Commit e8dfbcf3 authored by Luc Trudeau's avatar Luc Trudeau

[CFL] Remove explicit dependency on EC_ADAPT

Change-Id: I3e3d458aec7e26abc366992ac20f9fa838fe35bb
parent 04120190
...@@ -1436,8 +1436,15 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, ...@@ -1436,8 +1436,15 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col,
uint8_t *dst = uint8_t *dst =
&pd->dst.buf[(blk_row * dst_stride + blk_col) << tx_size_wide_log2[0]]; &pd->dst.buf[(blk_row * dst_stride + blk_col) << tx_size_wide_log2[0]];
#if CONFIG_CFL #if CONFIG_CFL
av1_predict_intra_block_encoder_facade(x, plane, block, blk_col, blk_row,
tx_size, plane_bsize); #if CONFIG_EC_ADAPT
FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
#else
FRAME_CONTEXT *const ec_ctx = cm->fc;
#endif // CONFIG_EC_ADAPT
av1_predict_intra_block_encoder_facade(x, ec_ctx, plane, block, blk_col,
blk_row, tx_size, plane_bsize);
#else #else
av1_predict_intra_block_facade(xd, plane, block, blk_col, blk_row, tx_size); av1_predict_intra_block_facade(xd, plane, block, blk_col, blk_row, tx_size);
#endif #endif
...@@ -1630,7 +1637,8 @@ static int cfl_compute_alpha_ind(MACROBLOCK *const x, const CFL_CTX *const cfl, ...@@ -1630,7 +1637,8 @@ static int cfl_compute_alpha_ind(MACROBLOCK *const x, const CFL_CTX *const cfl,
return ind; return ind;
} }
void av1_predict_intra_block_encoder_facade(MACROBLOCK *x, int plane, void av1_predict_intra_block_encoder_facade(MACROBLOCK *x,
FRAME_CONTEXT *ec_ctx, int plane,
int block_idx, int blk_col, int block_idx, int blk_col,
int blk_row, TX_SIZE tx_size, int blk_row, TX_SIZE tx_size,
BLOCK_SIZE plane_bsize) { BLOCK_SIZE plane_bsize) {
...@@ -1638,10 +1646,6 @@ void av1_predict_intra_block_encoder_facade(MACROBLOCK *x, int plane, ...@@ -1638,10 +1646,6 @@ void av1_predict_intra_block_encoder_facade(MACROBLOCK *x, int plane,
MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi; MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
if (plane != AOM_PLANE_Y && mbmi->uv_mode == DC_PRED) { if (plane != AOM_PLANE_Y && mbmi->uv_mode == DC_PRED) {
if (blk_col == 0 && blk_row == 0 && plane == AOM_PLANE_U) { if (blk_col == 0 && blk_row == 0 && plane == AOM_PLANE_U) {
#if !CONFIG_EC_ADAPT
#error "CfL rate estimation requires ec_adapt."
#endif
FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
assert(ec_ctx->cfl_alpha_cdf[CFL_ALPHABET_SIZE - 1] == assert(ec_ctx->cfl_alpha_cdf[CFL_ALPHABET_SIZE - 1] ==
AOM_ICDF(CDF_PROB_TOP)); AOM_ICDF(CDF_PROB_TOP));
const int prob_den = CDF_PROB_TOP; const int prob_den = CDF_PROB_TOP;
......
...@@ -86,7 +86,8 @@ void av1_store_pvq_enc_info(PVQ_INFO *pvq_info, int *qg, int *theta, int *k, ...@@ -86,7 +86,8 @@ void av1_store_pvq_enc_info(PVQ_INFO *pvq_info, int *qg, int *theta, int *k,
#endif #endif
#if CONFIG_CFL #if CONFIG_CFL
void av1_predict_intra_block_encoder_facade(MACROBLOCK *x, int plane, void av1_predict_intra_block_encoder_facade(MACROBLOCK *x,
FRAME_CONTEXT *ec_ctx, int plane,
int block_idx, int blk_col, int block_idx, int blk_col,
int blk_row, TX_SIZE tx_size, int blk_row, TX_SIZE tx_size,
BLOCK_SIZE plane_bsize); BLOCK_SIZE plane_bsize);
......
...@@ -1538,8 +1538,15 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col, ...@@ -1538,8 +1538,15 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
if (!is_inter_block(mbmi)) { if (!is_inter_block(mbmi)) {
#if CONFIG_CFL #if CONFIG_CFL
av1_predict_intra_block_encoder_facade(x, plane, block, blk_col, blk_row,
tx_size, plane_bsize); #if CONFIG_EC_ADAPT
FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
#else
FRAME_CONTEXT *const ec_ctx = cm->fc;
#endif // CONFIG_EC_ADAPT
av1_predict_intra_block_encoder_facade(x, ec_ctx, plane, block, blk_col,
blk_row, tx_size, plane_bsize);
#else #else
av1_predict_intra_block_facade(xd, plane, block, blk_col, blk_row, tx_size); av1_predict_intra_block_facade(xd, plane, block, blk_col, blk_row, tx_size);
#endif #endif
...@@ -2356,8 +2363,15 @@ static int64_t intra_model_yrd(const AV1_COMP *const cpi, MACROBLOCK *const x, ...@@ -2356,8 +2363,15 @@ static int64_t intra_model_yrd(const AV1_COMP *const cpi, MACROBLOCK *const x,
#if CONFIG_CFL #if CONFIG_CFL
const struct macroblockd_plane *const pd = &xd->plane[0]; const struct macroblockd_plane *const pd = &xd->plane[0];
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd); const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
av1_predict_intra_block_encoder_facade(x, 0, block, col, row, tx_size,
plane_bsize); #if CONFIG_EC_ADAPT
FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
#else
FRAME_CONTEXT *const ec_ctx = cm->fc;
#endif // CONFIG_EC_ADAPT
av1_predict_intra_block_encoder_facade(x, ec_ctx, 0, block, col, row,
tx_size, plane_bsize);
#else #else
av1_predict_intra_block_facade(xd, 0, block, col, row, tx_size); av1_predict_intra_block_facade(xd, 0, block, col, row, tx_size);
#endif #endif
......
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