shithub: libvpx

Download patch

ref: 040eeed9d03dbf9f6efaecf2c6e1fdfbfabee64d
parent: fb3e4ed9eb38b5b2334e3f0de63b8a1995e46009
author: Deb Mukherjee <debargha@google.com>
date: Fri Apr 26 07:13:26 EDT 2013

Turning model based reverse update on for coefs

Turns model based reverse updates on for coefficients in an
effort to reduce the memory requirement for counters.

With this patch the counters needed will be reduced by about
75% since only 3 counts are needed instead of 12.

The impact in performance is:
derf300: -0.252%
stdhd250: -0.046%

However retraining should alleviate some of the drop in
performance.

Change-Id: I6f2b3e13f6d5520aa3400b0b228fb5e8b4a43caa

--- a/vp9/common/vp9_entropy.c
+++ b/vp9/common/vp9_entropy.c
@@ -1555,6 +1555,7 @@
 }
 
 void vp9_adapt_coef_probs(VP9_COMMON *cm) {
+#ifndef DISABLE_COEF_ADAPT
   int count_sat;
   int update_factor; /* denominator 256 */
 
@@ -1585,6 +1586,7 @@
                    cm->base_qindex, cm->fc.coef_counts_32x32,
                    cm->fc.eob_branch_counts[TX_32X32],
                    count_sat, update_factor);
+#endif
 }
 
 #if CONFIG_CODE_ZEROGROUP
--- a/vp9/common/vp9_entropy.h
+++ b/vp9/common/vp9_entropy.h
@@ -84,6 +84,9 @@
 /*# define DC_TOKEN_CONTEXTS        3*/ /* 00, 0!0, !0!0 */
 #define PREV_COEF_CONTEXTS          6
 
+// Disables backward coef probs adaption
+// #define DISABLE_COEF_ADAPT
+
 typedef unsigned int vp9_coeff_count[REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS]
                                     [MAX_ENTROPY_TOKENS];
 typedef unsigned int vp9_coeff_stats[REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS]
@@ -158,7 +161,7 @@
 // if model-based how many nodes are unconstrained
 #define UNCONSTRAINED_UPDATE_NODES  3
 // whether backward updates are model-based
-#define MODEL_BASED_ADAPT           0
+#define MODEL_BASED_ADAPT           1
 #define UNCONSTRAINED_ADAPT_NODES   3
 
 typedef vp9_prob vp9_coeff_probs_model[REF_TYPES][COEF_BANDS]
--