shithub: libvpx

Download patch

ref: 6245a91e0b4fc4b1d1382f95991cc0ea2b3fc991
parent: fda0410822341eaa48d2de3cd8b02d98e10da6d5
author: Jingning Han <[email protected]>
date: Mon Mar 9 06:59:29 EDT 2015

Skip golden ref frame check when it is same as last ref frame

When golden reference frame is refreshed, the next frame has both
its last and golden reference frames point to the same reference
frame in real-time coding mode. Experiments suggest that using
two separate reference frames for frames right after golden refresh
frame does not provide further compression performance advantage.
This commit hence retains the current encoder implementation and
shuts off the mode search over golden reference frame in this case.

It makes the encoder run slightly faster at no coding performance
change.

Change-Id: I1561f7799253a10e675d05c63c1749fe9e85b472

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -723,6 +723,9 @@
     }
   }
 
+  if (cpi->rc.frames_since_golden == 0)
+    ref_frame_skip_mask |= (1 << GOLDEN_FRAME);
+
   for (ref_frame = LAST_FRAME; ref_frame <= GOLDEN_FRAME; ++ref_frame) {
     PREDICTION_MODE this_mode;
     int i = (ref_frame == LAST_FRAME) ? GOLDEN_FRAME : LAST_FRAME;