Fixed skippable evaluation in mode decision
Yunqing fixed an oddity in UVIntra skippable evaluation for stable branch, which brought up the fact that the evaluation is broken. The issue was that for MBs with 2nd order block, the eob for 1st order blocks is set at 1. The previous evaluation did not take that into account. This commit intend to fix the problem. The commit also absorbed Yunqing's fix for UVIntra skippable evalution. Test on hd showed some good gains in combination with LPF bias fix: http://www.corp.google.com/~yaowu/no_crawl/LPFBias_FixSkip.html (avg psnr: .34%, glb psnr: .32%, ssim: .22%) Change-Id: I36af11c8ef7f643e8ff46da7bf3a167b437039d4
This commit is contained in:
Родитель
737179f275
Коммит
2b4cd4cc01
|
@ -2270,6 +2270,11 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
|
|||
int best_hybrid_rd = INT_MAX;
|
||||
int rate2, distortion2;
|
||||
int uv_intra_rate, uv_intra_distortion, uv_intra_rate_tokenonly;
|
||||
int uv_intra_tteob = 0;
|
||||
#if CONFIG_T8X8
|
||||
int uv_intra_rate_8x8, uv_intra_distortion_8x8, uv_intra_rate_tokenonly_8x8;
|
||||
int uv_intra_tteob_8x8=0;
|
||||
#endif
|
||||
int rate_y, UNINITIALIZED_IS_SAFE(rate_uv);
|
||||
int distortion_uv;
|
||||
int best_yrd = INT_MAX;
|
||||
|
@ -2357,6 +2362,12 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
|
|||
x->e_mbd.mode_info_context->mbmi.ref_frame = INTRA_FRAME;
|
||||
rd_pick_intra_mbuv_mode(cpi, x, &uv_intra_rate, &uv_intra_rate_tokenonly, &uv_intra_distortion);
|
||||
uv_intra_mode = x->e_mbd.mode_info_context->mbmi.uv_mode;
|
||||
for(i=16; i<24; i++)
|
||||
uv_intra_tteob += x->e_mbd.block[i].eob;
|
||||
|
||||
#if CONFIG_T8X8
|
||||
uv_intra_tteob_8x8 = uv_intra_tteob;
|
||||
#endif
|
||||
|
||||
// Get estimates of reference frame costs for each reference frame
|
||||
// that depend on the current prediction etc.
|
||||
|
@ -2953,13 +2964,44 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
|
|||
if (cpi->common.mb_no_coeff_skip)
|
||||
{
|
||||
int tteob;
|
||||
|
||||
int has_y2_block = ( this_mode!=SPLITMV
|
||||
&&this_mode!=B_PRED
|
||||
&&this_mode!=I8X8_PRED);
|
||||
tteob = 0;
|
||||
if(has_y2_block)
|
||||
tteob += x->e_mbd.block[24].eob;
|
||||
|
||||
for (i = 0; i <= 24; i++)
|
||||
#if CONFIG_T8X8
|
||||
if(cpi->common.txfm_mode ==ALLOW_8X8 && has_y2_block)
|
||||
{
|
||||
for (i = 0; i < 16; i+=4)
|
||||
tteob += (x->e_mbd.block[i].eob > 1);
|
||||
if(x->e_mbd.mode_info_context->mbmi.ref_frame!=INTRA_FRAME)
|
||||
{
|
||||
tteob += x->e_mbd.block[16].eob;
|
||||
tteob += x->e_mbd.block[20].eob;
|
||||
}
|
||||
else
|
||||
{
|
||||
tteob += uv_intra_tteob_8x8;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
for (i = 0; i < 16; i++)
|
||||
tteob += (x->e_mbd.block[i].eob > has_y2_block);
|
||||
|
||||
if(x->e_mbd.mode_info_context->mbmi.ref_frame!=INTRA_FRAME)
|
||||
{
|
||||
for (i = 16; i < 24; i++)
|
||||
tteob += x->e_mbd.block[i].eob;
|
||||
}
|
||||
else
|
||||
{
|
||||
tteob += uv_intra_tteob;
|
||||
}
|
||||
}
|
||||
|
||||
if (tteob == 0)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче