Commit 25c127f5 authored by Paul Wilkins's avatar Paul Wilkins
Browse files

Experimental branch code clean up.

Removal of some further code relating to partitions
and error resilience.

Spelling correction.

Change-Id: I36067aae67a4a23bec359541dda3400b0bbf26d0
parent b6f02c85
......@@ -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
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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
......
......@@ -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 *
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment