summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2012-02-28 17:15:31 +0000
committerPaul Wilkins <paulwilkins@google.com>2012-02-28 17:59:21 +0000
commit25c127f5f006f9f3ae2df10819ee4499ee763155 (patch)
tree57cb59bfaa867f3cc587b97949a64b8049764995
parentb6f02c85926b928f29b428e620b1c1ec70dd9d42 (diff)
downloadlibvpx-25c127f5f006f9f3ae2df10819ee4499ee763155.tar
libvpx-25c127f5f006f9f3ae2df10819ee4499ee763155.tar.gz
libvpx-25c127f5f006f9f3ae2df10819ee4499ee763155.tar.bz2
libvpx-25c127f5f006f9f3ae2df10819ee4499ee763155.zip
Experimental branch code clean up.
Removal of some further code relating to partitions and error resilience. Spelling correction. Change-Id: I36067aae67a4a23bec359541dda3400b0bbf26d0
-rw-r--r--vp8/common/onyxc_int.h2
-rw-r--r--vp8/decoder/decodframe.c14
-rw-r--r--vp8/decoder/onyxd_if.c7
-rw-r--r--vp8/decoder/onyxd_int.h5
-rw-r--r--vp8/encoder/bitstream.c2
-rw-r--r--vp8/encoder/firstpass.c12
-rw-r--r--vp8/encoder/onyx_int.h3
7 files changed, 6 insertions, 39 deletions
diff --git a/vp8/common/onyxc_int.h b/vp8/common/onyxc_int.h
index 41d15f58f..ba500cf16 100644
--- a/vp8/common/onyxc_int.h
+++ b/vp8/common/onyxc_int.h
@@ -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
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 142fb8f5f..0cb1d0e48 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -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)
diff --git a/vp8/decoder/onyxd_if.c b/vp8/decoder/onyxd_if.c
index 319729e3b..96649b9e6 100644
--- a/vp8/decoder/onyxd_if.c
+++ b/vp8/decoder/onyxd_if.c
@@ -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;
}
diff --git a/vp8/decoder/onyxd_int.h b/vp8/decoder/onyxd_int.h
index a962133f2..d48f40083 100644
--- a/vp8/decoder/onyxd_int.h
+++ b/vp8/decoder/onyxd_int.h
@@ -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;
diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c
index 1109d6d4e..2531e0273 100644
--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -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
diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c
index b5e81cd6e..7d9c38665 100644
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -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 *
diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h
index f883ea5fe..8aa4f1ff9 100644
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -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;