From 1fcd5cca3c810d37b8d81c69b6ebfe04c9f4cd4c Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Fri, 12 May 2017 15:57:23 -0700 Subject: vp9: speed 8: Fix seg fault in partition copy when drop frames. BUG=webm:1433 Change-Id: I4f3984ef28660d3218d48007d7c977bdbdaf8af6 --- vp9/encoder/vp9_encoder.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vp9/encoder/vp9_encoder.c') diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 32878dcc8..0cb279664 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -4077,12 +4077,14 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, size_t *size, ++cm->current_video_frame; cpi->ext_refresh_frame_flags_pending = 0; cpi->svc.rc_drop_superframe = 1; + cpi->last_frame_dropped = 1; // TODO(marpan): Advancing the svc counters on dropped frames can break // the referencing scheme for the fixed svc patterns defined in // vp9_one_pass_cbr_svc_start_layer(). Look into fixing this issue, but // for now, don't advance the svc frame counters on dropped frame. // if (cpi->use_svc) // vp9_inc_frame_in_layer(cpi); + return; } } @@ -4100,6 +4102,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, size_t *size, encode_with_recode_loop(cpi, size, dest); } + cpi->last_frame_dropped = 0; + // Disable segmentation if it decrease rate/distortion ratio if (cpi->oxcf.aq_mode == LOOKAHEAD_AQ) vp9_try_disable_lookahead_aq(cpi, size, dest); -- cgit v1.2.3