]> granicus.if.org Git - libvpx/commitdiff
Experimental branch code clean up.
authorPaul Wilkins <paulwilkins@google.com>
Tue, 28 Feb 2012 17:15:31 +0000 (17:15 +0000)
committerPaul Wilkins <paulwilkins@google.com>
Tue, 28 Feb 2012 17:59:21 +0000 (17:59 +0000)
Removal of some further code relating to partitions
and error resilience.

Spelling correction.

Change-Id: I36067aae67a4a23bec359541dda3400b0bbf26d0

vp8/common/onyxc_int.h
vp8/decoder/decodframe.c
vp8/decoder/onyxd_if.c
vp8/decoder/onyxd_int.h
vp8/encoder/bitstream.c
vp8/encoder/firstpass.c
vp8/encoder/onyx_int.h

index 41d15f58fa56dd0317da15a1d278c134676b9f66..ba500cf160732fb4d758404151f398a1d6adf0ac 100644 (file)
@@ -40,8 +40,6 @@ void vp8_initialize_common(void);
 
 #define NUM_YV12_BUFFERS 4
 
-#define MAX_PARTITIONS 9
-
 #define DUAL_PRED_CONTEXTS   2
 
 typedef struct frame_contexts
index 142fb8f5f346fa354b958217310dcb7819bb60cd..0cb1d0e4881ee990a9d08b70967dcaa4d5a402d4 100644 (file)
@@ -155,7 +155,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
                               unsigned int mb_idx)
 {
     int eobtotal = 0;
-    int throw_residual = 0;
     MB_PREDICTION_MODE mode;
     int i;
 
@@ -263,12 +262,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
     {
         vp8_build_inter_predictors_mb(xd);
     }
-    /* When we have independent partitions we can apply residual even
-     * though other partitions within the frame are corrupt.
-     */
-    throw_residual = (!pbi->independent_partitions &&
-                      pbi->frame_corrupt_residual);
-    throw_residual = (throw_residual || vp8dx_bool_error(xd->current_bc));
 
     /* dequantization and idct */
     if (mode == I8X8_PRED)
@@ -835,7 +828,6 @@ int vp8_decode_frame(VP8D_COMP *pbi)
     int mb_row;
     int i, j, k, l;
     int corrupt_tokens = 0;
-    int prev_independent_partitions = pbi->independent_partitions;
 
     /* start with no corruption of current frame */
     xd->corrupted = 0;
@@ -1215,8 +1207,6 @@ int vp8_decode_frame(VP8D_COMP *pbi)
     }
 
     {
-        pbi->independent_partitions = 1;
-
         if(vp8_read_bit(bc))
         {
         /* read coef probability tree */
@@ -1232,8 +1222,6 @@ int vp8_decode_frame(VP8D_COMP *pbi)
                             *p = (vp8_prob)vp8_read_literal(bc, 8);
 
                         }
-                        if (k > 0 && *p != pc->fc.coef_probs[i][j][k-1][l])
-                            pbi->independent_partitions = 0;
                     }
         }
     }
@@ -1290,8 +1278,6 @@ int vp8_decode_frame(VP8D_COMP *pbi)
     // Resset the macroblock mode info context to the start of the list
     xd->mode_info_context = pc->mi;
 
-    pbi->frame_corrupt_residual = 0;
-
 #if CONFIG_SUPERBLOCKS
     /* Decode a row of super-blocks */
     for (mb_row = 0; mb_row < pc->mb_rows; mb_row+=2)
index 319729e3b4270f001176b6c1e4faddfd8c27d630..96649b9e6a83689419c907170e7eedc92e097926 100644 (file)
@@ -161,13 +161,6 @@ VP8D_PTR vp8dx_create_decompressor(VP8D_CONFIG *oxcf)
 
     pbi->decoded_key_frame = 0;
 
-
-    /* Independent partitions is activated when a frame updates the
-     * token probability table to have equal probabilities over the
-     * PREV_COEF context.
-     */
-    pbi->independent_partitions = 0;
-
     return (VP8D_PTR) pbi;
 }
 
index a962133f25f12393ecbebc1cf49c97eb75a78f57..d48f40083657692b5a7ed6164e6eeede40bcce9b 100644 (file)
@@ -82,9 +82,6 @@ typedef struct VP8Decompressor
 
     const unsigned char *Source;
     unsigned int   source_sz;
-    const unsigned char *partitions[MAX_PARTITIONS];
-    unsigned int   partition_sizes[MAX_PARTITIONS];
-    unsigned int   num_partitions;
 
     vp8_reader *mbc;
     int64_t last_time_stamp;
@@ -101,8 +98,6 @@ typedef struct VP8Decompressor
     vp8_prob prob_skip_false;
 
     int decoded_key_frame;
-    int independent_partitions;
-    int frame_corrupt_residual;
 
 } VP8D_COMP;
 
index 1109d6d4e753e7475c371eaca5e3a9b9e3e56d70..2531e02735725293fa82732f13c663b6ed2e48d5 100644 (file)
@@ -2468,7 +2468,6 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned long *size)
     }
 
     *size = VP8_HEADER_SIZE + extra_bytes_packed + cpi->bc.pos;
-    cpi->partition_sz[0] = *size;
 
     vp8_start_encode(&cpi->bc2, cx_data + bc->pos);
 
@@ -2477,7 +2476,6 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned long *size)
     vp8_stop_encode(&cpi->bc2);
 
     *size += cpi->bc2.pos;
-    cpi->partition_sz[1] = cpi->bc2.pos;
 }
 
 #ifdef ENTROPY_STATS
index b5e81cd6efceb31309c3f3cb82234a125e19c745..7d9c386655d68a01a42da9958a5bf9deca9a61b7 100644 (file)
@@ -870,13 +870,13 @@ static long long estimate_modemvcost(VP8_COMP *cpi,
 }
 
 static double calc_correction_factor( double err_per_mb,
-                                      double err_devisor,
+                                      double err_divisor,
                                       double pt_low,
                                       double pt_high,
                                       int Q )
 {
     double power_term;
-    double error_term = err_per_mb / err_devisor;
+    double error_term = err_per_mb / err_divisor;
     double correction_factor;
 
     // Adjustment based on actual quantizer to power term.
@@ -926,7 +926,7 @@ static double adjust_maxq_qrange(VP8_COMP *cpi)
             break;
     }
 }
-#define ERR_DEVISOR   150.0
+#define ERR_DIVISOR   150.0
 static int estimate_max_q(VP8_COMP *cpi,
                           FIRSTPASS_STATS * fpstats,
                           int section_target_bandwitdh,
@@ -1000,7 +1000,7 @@ static int estimate_max_q(VP8_COMP *cpi,
 
         // Error per MB based correction factor
         err_correction_factor =
-            calc_correction_factor(err_per_mb, ERR_DEVISOR, 0.36, 0.90, Q);
+            calc_correction_factor(err_per_mb, ERR_DIVISOR, 0.36, 0.90, Q);
 
         bits_per_mb_at_this_q =
             vp8_bits_per_mb(INTER_FRAME, Q) + overhead_bits_per_mb;
@@ -1163,7 +1163,7 @@ static int estimate_q(VP8_COMP *cpi, double section_err, int section_target_band
 
         // Error per MB based correction factor
         err_correction_factor =
-            calc_correction_factor(err_per_mb, ERR_DEVISOR, 0.36, 0.90, Q);
+            calc_correction_factor(err_per_mb, ERR_DIVISOR, 0.36, 0.90, Q);
 
         bits_per_mb_at_this_q =
             (int)( .5 + ( err_correction_factor *
@@ -1237,7 +1237,7 @@ static int estimate_kf_group_q(VP8_COMP *cpi, double section_err, int section_ta
     {
         // Error per MB based correction factor
         err_correction_factor =
-            calc_correction_factor(err_per_mb, ERR_DEVISOR, pow_lowq, pow_highq, Q);
+            calc_correction_factor(err_per_mb, ERR_DIVISOR, pow_lowq, pow_highq, Q);
 
         bits_per_mb_at_this_q =
             (int)(.5 + ( err_correction_factor *
index f883ea5febffc1df0149e790a013a96896c32884..8aa4f1ff9345aa5fc5ca16a2e1b4adc37db90868 100644 (file)
@@ -525,9 +525,6 @@ typedef struct VP8_COMP
     unsigned int active_map_enabled;
 
     TOKENLIST *tplist;
-    unsigned int partition_sz[MAX_PARTITIONS];
-    // end of multithread data
-
 
     fractional_mv_step_fp *find_fractional_mv_step;
     vp8_full_search_fn_t full_search_sad;