Commit e50f3eca authored by Angie Chiang's avatar Angie Chiang

Call av1_search_txk_type in block_rd_txfm

This is part of tx kernel selection feature.

Change-Id: I822e5a46d39c1fd525c911fc2a06e1be041d8ec8
parent ca7ec4b0
......@@ -11,6 +11,7 @@
#include "av1/common/scan.h"
#include "av1/common/blockd.h"
#include "av1/common/idct.h"
#include "av1/common/pred_common.h"
#include "av1/encoder/cost.h"
#include "av1/encoder/encodetxb.h"
......@@ -748,5 +749,7 @@ int64_t av1_search_txk_type(const AV1_COMP *cpi, MACROBLOCK *x, int plane,
}
if (plane == 0) mbmi->txk_type[block] = best_tx_type;
x->plane[plane].eobs[block] = best_eob;
av1_inverse_transform_block_facade(xd, plane, block, blk_row, blk_col,
best_eob);
return best_rd;
}
......@@ -1549,7 +1549,7 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
MACROBLOCK *const x = args->x;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
const AV1_COMMON *cm = &args->cpi->common;
const AV1_COMP *cpi = args->cpi;
int64_t rd1, rd2, rd;
int coeff_ctx = combine_entropy_contexts(*(args->t_above + blk_col),
*(args->t_left + blk_row));
......@@ -1566,7 +1566,9 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
av1_subtract_txb(x, plane, plane_bsize, blk_col, blk_row, tx_size);
}
#if !CONFIG_LV_MAP
// full forward transform and quantization
const AV1_COMMON *cm = &cpi->common;
av1_xform_quant(cm, x, plane, block, blk_row, blk_col, plane_bsize, tx_size,
coeff_ctx, AV1_XFORM_QUANT_FP);
if (x->plane[plane].eobs[block] && !xd->lossless[mbmi->segment_id])
......@@ -1584,6 +1586,10 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
tx_size, &this_rd_stats.dist, &this_rd_stats.sse,
OUTPUT_HAS_PREDICTED_PIXELS);
}
#else // !CONFIG_LV_MAP
av1_search_txk_type(cpi, x, plane, block, blk_row, blk_col, plane_bsize,
tx_size, coeff_ctx, &this_rd_stats);
#endif // !CONFIG_LV_MAP
rd = RDCOST(x->rdmult, x->rddiv, 0, this_rd_stats.dist);
if (args->this_rd + rd > args->best_rd) {
......
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