From: Yunqing Wang Date: Wed, 29 Dec 2010 15:28:35 +0000 (-0500) Subject: Always update last_frame_type X-Git-Tag: v0.9.6~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a864678cdbf26e14a521f2a8a43cf534552c2740;p=libvpx Always update last_frame_type Scott pointed out that last_frame_type only gets updated while loopfilter exists. Since last_frame_type is also needed in motion search now, it needs to be updated every frame. Change-Id: I9203532fd67361588d4024628d9ddb8e391ad912 --- diff --git a/vp8/common/onyxc_int.h b/vp8/common/onyxc_int.h index 7e44c1f0c..e011ec99a 100644 --- a/vp8/common/onyxc_int.h +++ b/vp8/common/onyxc_int.h @@ -105,7 +105,7 @@ typedef struct VP8Common YV12_BUFFER_CONFIG post_proc_buffer; YV12_BUFFER_CONFIG temp_scale_frame; - FRAME_TYPE last_frame_type; /* Add to check if vp8_frame_init_loop_filter() can be skipped. */ + FRAME_TYPE last_frame_type; /* Save last frame's frame type for loopfilter init checking and motion search. */ FRAME_TYPE frame_type; int show_frame; diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 05a1338dc..56f7ef6f8 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -4340,10 +4340,11 @@ static void encode_frame_to_data_rate { vp8cx_set_alt_lf_level(cpi, cm->filter_level); vp8_loop_filter_frame(cm, &cpi->mb.e_mbd, cm->filter_level); - cm->last_frame_type = cm->frame_type; cm->last_filter_type = cm->filter_type; cm->last_sharpness_level = cm->sharpness_level; } + /* Move storing frame_type out of the above loop since it is also needed in motion search besides loopfilter */ + cm->last_frame_type = cm->frame_type; vp8_yv12_extend_frame_borders_ptr(cm->frame_to_show);