summaryrefslogtreecommitdiff
path: root/vp8/encoder/encodeframe.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2012-02-15 16:38:04 -0800
committerRonald S. Bultje <rbultje@google.com>2012-02-15 16:38:04 -0800
commit721711fb5138312e533c08ea26ce0a86adc30f3f (patch)
tree5e221484d4d1391a4a0df4a71770753f2a4297e2 /vp8/encoder/encodeframe.c
parent0930dde2496e911d24c930751b08c71ae722bd89 (diff)
downloadlibvpx-721711fb5138312e533c08ea26ce0a86adc30f3f.tar
libvpx-721711fb5138312e533c08ea26ce0a86adc30f3f.tar.gz
libvpx-721711fb5138312e533c08ea26ce0a86adc30f3f.tar.bz2
libvpx-721711fb5138312e533c08ea26ce0a86adc30f3f.zip
Remove dual prediction frame re-encoding loop.
I'm basically not convinced that the concept works at all, let alone that this is the right place to do it. I think if we want something like this at all, I should integrate it with the main encoding loop and re-encode checks in onyx_if.c, and show that it has a significant benefit (which right now, it doesn't; removing this re-encode check actually increases all metrics by ~0.15%). Change-Id: I1b597385dc17f468384a994484fb24813389411f
Diffstat (limited to 'vp8/encoder/encodeframe.c')
-rw-r--r--vp8/encoder/encodeframe.c51
1 files changed, 1 insertions, 50 deletions
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c
index 62366964f..55000ea5f 100644
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -1395,23 +1395,7 @@ void vp8_encode_frame(VP8_COMP *cpi)
cpi->rd_prediction_type_threshes[frame_type][2] += hybrid_diff;
cpi->rd_prediction_type_threshes[frame_type][2] >>= 1;
- /* FIXME make "100" (the threshold at which to re-encode the
- * current frame) a commandline option. */
- if (cpi->common.dual_pred_mode == SINGLE_PREDICTION_ONLY &&
- (dual_diff >= 100 || hybrid_diff >= 100))
- {
- redo = 1;
- cpi->common.dual_pred_mode = cpi->rd_dual_diff > cpi->rd_hybrid_diff ?
- DUAL_PREDICTION_ONLY : HYBRID_PREDICTION;
- }
- else if (cpi->common.dual_pred_mode == DUAL_PREDICTION_ONLY &&
- (single_diff >= 100 || hybrid_diff >= 100))
- {
- redo = 1;
- cpi->common.dual_pred_mode = cpi->rd_single_diff > cpi->rd_hybrid_diff ?
- SINGLE_PREDICTION_ONLY : HYBRID_PREDICTION;
- }
- else if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
+ if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
{
int single_count_zero = 0;
int dual_count_zero = 0;
@@ -1431,39 +1415,6 @@ void vp8_encode_frame(VP8_COMP *cpi)
{
cpi->common.dual_pred_mode = DUAL_PREDICTION_ONLY;
}
- else if (single_diff >= 100 || dual_diff >= 100)
- {
- redo = 1;
- cpi->common.dual_pred_mode = cpi->rd_single_diff > cpi->rd_dual_diff ?
- SINGLE_PREDICTION_ONLY : DUAL_PREDICTION_ONLY;
- }
- }
-
- if (redo)
- {
- encode_frame_internal(cpi);
-
- if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
- {
- int single_count_zero = 0;
- int dual_count_zero = 0;
- int i;
-
- for ( i = 0; i < DUAL_PRED_CONTEXTS; i++ )
- {
- single_count_zero += cpi->single_pred_count[i];
- dual_count_zero += cpi->dual_pred_count[i];
- }
-
- if (dual_count_zero == 0)
- {
- cpi->common.dual_pred_mode = SINGLE_PREDICTION_ONLY;
- }
- else if (single_count_zero == 0)
- {
- cpi->common.dual_pred_mode = DUAL_PREDICTION_ONLY;
- }
- }
}
}
else