ref: 959b296a40a8b2111cff474e039034fc41f17aa9
parent: 54cf1d9ad3fe7ee3d0ce843b2a640f3fcf361887
author: Ronald S. Bultje <rbultje@google.com>
date: Fri May 11 13:48:20 EDT 2012
Don't use compound prediction for golden frames based on alt-ref frames. These frames can force reference frame (arf), mode (zeromv) and skip, which means that if we use compound prediction (i.e. arf+last), we might use a blend of a perfect (arf) and an imperfect (last) predictor, leading to semi-garbage display and thus a huge drop in SSIM/PSNR (up to 10dB for some frames I analyzed). Gives a +0.2% gain on YT. Change-Id: If1f2b7899ad165684af3808fd379295e82558cbb
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -1288,11 +1288,13 @@
else
frame_type = 2;
- if (cpi->rd_prediction_type_threshes[frame_type][1] >
- cpi->rd_prediction_type_threshes[frame_type][0] &&
- cpi->rd_prediction_type_threshes[frame_type][1] >
- cpi->rd_prediction_type_threshes[frame_type][2] &&
- check_dual_ref_flags(cpi))
+ if (frame_type == 3)
+ pred_type = SINGLE_PREDICTION_ONLY;
+ else if (cpi->rd_prediction_type_threshes[frame_type][1] >
+ cpi->rd_prediction_type_threshes[frame_type][0] &&
+ cpi->rd_prediction_type_threshes[frame_type][1] >
+ cpi->rd_prediction_type_threshes[frame_type][2] &&
+ check_dual_ref_flags(cpi))
pred_type = COMP_PREDICTION_ONLY;
else if (cpi->rd_prediction_type_threshes[frame_type][0] >
cpi->rd_prediction_type_threshes[frame_type][1] &&
--
⑨