From c113457af9880b8e15a36cdaabfd414d1c245693 Mon Sep 17 00:00:00 2001 From: Minghai Shang Date: Tue, 14 Oct 2014 16:25:03 -0700 Subject: [spatial svc]Another workaround to avoid using prev_mi We encode a empty invisible frame in front of the base layer frame to avoid using prev_mi. Since there's a restriction for reference frame scaling factor, we have to make it smaller and smaller gradually until its size is 16x16. Change-Id: I60b680314e33a60b4093cafc296465ee18169c19 --- vp9/encoder/vp9_firstpass.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vp9/encoder/vp9_firstpass.c') diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 9e204d7e9..760ec320c 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2406,6 +2406,9 @@ void vp9_rc_get_second_pass_params(VP9_COMP *cpi) { cpi->ref_frame_flags &= (~VP9_LAST_FLAG & ~VP9_GOLD_FLAG & ~VP9_ALT_FLAG); lc->frames_from_key_frame = 0; + // Reset the empty frame resolution since we have a key frame. + cpi->svc.empty_frame_width = cm->width; + cpi->svc.empty_frame_height = cm->height; } } else { cm->frame_type = INTER_FRAME; -- cgit v1.2.3