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
This commit is contained in:
Jingning Han 2015-03-09 10:59:29 -07:00
parent fda0410822
commit 6245a91e0b

View File

@ -723,6 +723,9 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
}
}
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;