summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2012-02-08 14:55:46 -0800
committerRonald S. Bultje <rbultje@google.com>2012-02-08 14:55:46 -0800
commit915f13bd5972c7e004b48533a455c9c7b7bc6d2d (patch)
treede7f6aff95af8af33285c3336cea4ab61b78a929
parent3adcbe2f15a034fa9ff7f16639086f24fa684257 (diff)
downloadlibvpx-915f13bd5972c7e004b48533a455c9c7b7bc6d2d.tar
libvpx-915f13bd5972c7e004b48533a455c9c7b7bc6d2d.tar.gz
libvpx-915f13bd5972c7e004b48533a455c9c7b7bc6d2d.tar.bz2
libvpx-915f13bd5972c7e004b48533a455c9c7b7bc6d2d.zip
Fix dual prediction recode loop.
We should only change the dual prediction mode if we actually entered the recode branch. Else, it may potentially undo beneficial changes to the dual prediction mode in the first encode iteration. Change-Id: I79fc53e5fd0bb551092ed422c797619f1566f002
-rw-r--r--vp8/encoder/encodeframe.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c
index f06930968..388d8a6bb 100644
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -1537,21 +1537,21 @@ void vp8_encode_frame(VP8_COMP *cpi)
if (redo)
{
encode_frame_internal(cpi);
- }
- if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
- {
- if (cpi->dual_pred_count[0] == 0 &&
- cpi->dual_pred_count[1] == 0 &&
- cpi->dual_pred_count[2] == 0)
- {
- cpi->common.dual_pred_mode = SINGLE_PREDICTION_ONLY;
- }
- else if (cpi->single_pred_count[0] == 0 &&
- cpi->single_pred_count[1] == 0 &&
- cpi->single_pred_count[2] == 0)
+ if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
{
- cpi->common.dual_pred_mode = DUAL_PREDICTION_ONLY;
+ if (cpi->dual_pred_count[0] == 0 &&
+ cpi->dual_pred_count[1] == 0 &&
+ cpi->dual_pred_count[2] == 0)
+ {
+ cpi->common.dual_pred_mode = SINGLE_PREDICTION_ONLY;
+ }
+ else if (cpi->single_pred_count[0] == 0 &&
+ cpi->single_pred_count[1] == 0 &&
+ cpi->single_pred_count[2] == 0)
+ {
+ cpi->common.dual_pred_mode = DUAL_PREDICTION_ONLY;
+ }
}
}
}