Construct ref mv candidate list selectively

This commit makes the decoder to construct the reference motion
vector candidate list only for the selected reference frames. This
improves the decoder speed. For the test clip pedestrian_area at
1080p, coded at 3000 kbps, the decoding speed goes up from 58.4 fps
to 72 fps.

Change-Id: I257c521f46221936028ae01f205520d94ba7f16e
This commit is contained in:
Jingning Han 2016-06-22 15:28:34 -07:00
Родитель d3b596a7f7
Коммит cf3eb03e75
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -746,7 +746,6 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
int ref, is_compound;
int16_t inter_mode_ctx[MODE_CTX_REF_FRAMES];
int16_t mode_ctx = 0;
MV_REFERENCE_FRAME ref_frame;
read_ref_frames(cm, xd, r, mbmi->segment_id, mbmi->ref_frame);
is_compound = has_second_ref(mbmi);
@ -760,19 +759,19 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
aom_internal_error(xd->error_info, AOM_CODEC_UNSUP_BITSTREAM,
"Reference frame has invalid dimensions");
av1_setup_pre_planes(xd, ref, ref_buf->buf, mi_row, mi_col, &ref_buf->sf);
}
for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) {
av1_find_mv_refs(cm, xd, mi, ref_frame,
av1_find_mv_refs(cm, xd, mi, frame,
#if CONFIG_REF_MV
&xd->ref_mv_count[ref_frame], xd->ref_mv_stack[ref_frame],
&xd->ref_mv_count[frame], xd->ref_mv_stack[frame],
#endif
ref_mvs[ref_frame], mi_row, mi_col, fpm_sync, (void *)pbi,
ref_mvs[frame], mi_row, mi_col, fpm_sync, (void *)pbi,
inter_mode_ctx);
}
#if CONFIG_REF_MV
for (; ref_frame < MODE_CTX_REF_FRAMES; ++ref_frame) {
if (is_compound) {
MV_REFERENCE_FRAME ref_frame;
ref_frame = av1_ref_frame_type(mbmi->ref_frame);
av1_find_mv_refs(cm, xd, mi, ref_frame, &xd->ref_mv_count[ref_frame],
xd->ref_mv_stack[ref_frame], ref_mvs[ref_frame], mi_row,
mi_col, fpm_sync, (void *)pbi, inter_mode_ctx);
@ -790,6 +789,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
inter_mode_ctx[ref_frame] &= ~(1 << ALL_ZERO_FLAG_OFFSET);
}
}
mode_ctx =
av1_mode_context_analyzer(inter_mode_ctx, mbmi->ref_frame, bsize, -1);
mbmi->ref_mv_idx = 0;