Update use_prev_frame_mvs flag in decoder.
Added check to see if last frame was all intra. This will eliminate two checks in find_mv_refs_idx(). Also, do not update the frame mvs if the current frame is all intra. This improved performance on material with frequent intra-only frames. Change-Id: I44a4042c3670ab0d38439d565062a0e2a1ba9d1e
This commit is contained in:
parent
78b434e8b1
commit
c9976b32b4
@ -162,7 +162,8 @@ typedef struct VP9Common {
|
|||||||
int show_existing_frame;
|
int show_existing_frame;
|
||||||
|
|
||||||
// Flag signaling that the frame is encoded using only INTRA modes.
|
// Flag signaling that the frame is encoded using only INTRA modes.
|
||||||
int intra_only;
|
uint8_t intra_only;
|
||||||
|
uint8_t last_intra_only;
|
||||||
|
|
||||||
int allow_high_precision_mv;
|
int allow_high_precision_mv;
|
||||||
|
|
||||||
|
@ -1313,6 +1313,7 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
|
|||||||
size_t sz;
|
size_t sz;
|
||||||
|
|
||||||
cm->last_frame_type = cm->frame_type;
|
cm->last_frame_type = cm->frame_type;
|
||||||
|
cm->last_intra_only = cm->intra_only;
|
||||||
|
|
||||||
if (vp9_rb_read_literal(rb, 2) != VP9_FRAME_MARKER)
|
if (vp9_rb_read_literal(rb, 2) != VP9_FRAME_MARKER)
|
||||||
vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
|
vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
|
||||||
@ -1639,8 +1640,9 @@ void vp9_decode_frame(VP9Decoder *pbi,
|
|||||||
cm->use_prev_frame_mvs = !cm->error_resilient_mode &&
|
cm->use_prev_frame_mvs = !cm->error_resilient_mode &&
|
||||||
cm->width == cm->last_width &&
|
cm->width == cm->last_width &&
|
||||||
cm->height == cm->last_height &&
|
cm->height == cm->last_height &&
|
||||||
!cm->intra_only &&
|
!cm->last_intra_only &&
|
||||||
cm->last_show_frame;
|
cm->last_show_frame &&
|
||||||
|
(cm->last_frame_type != KEY_FRAME);
|
||||||
|
|
||||||
vp9_setup_block_planes(xd, cm->subsampling_x, cm->subsampling_y);
|
vp9_setup_block_planes(xd, cm->subsampling_x, cm->subsampling_y);
|
||||||
|
|
||||||
|
@ -596,9 +596,9 @@ void vp9_read_mode_info(VP9Decoder *const pbi, MACROBLOCKD *xd,
|
|||||||
MV_REF* frame_mvs = cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col;
|
MV_REF* frame_mvs = cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col;
|
||||||
int w, h;
|
int w, h;
|
||||||
|
|
||||||
if (frame_is_intra_only(cm))
|
if (frame_is_intra_only(cm)) {
|
||||||
read_intra_frame_mode_info(cm, xd, mi_row, mi_col, r);
|
read_intra_frame_mode_info(cm, xd, mi_row, mi_col, r);
|
||||||
else
|
} else {
|
||||||
read_inter_frame_mode_info(pbi, xd, tile, mi_row, mi_col, r);
|
read_inter_frame_mode_info(pbi, xd, tile, mi_row, mi_col, r);
|
||||||
|
|
||||||
for (h = 0; h < y_mis; ++h) {
|
for (h = 0; h < y_mis; ++h) {
|
||||||
@ -611,4 +611,5 @@ void vp9_read_mode_info(VP9Decoder *const pbi, MACROBLOCKD *xd,
|
|||||||
mv->mv[1].as_int = mi->mbmi.mv[1].as_int;
|
mv->mv[1].as_int = mi->mbmi.mv[1].as_int;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user