*/
-#include "vp8/common/type_aliases.h"
#include "vp8/common/blockd.h"
#include "onyxd_int.h"
#include "vpx_mem/vpx_mem.h"
VP8_BD_VALUE value;
const int *scan;
register unsigned int shift;
- UINT32 split;
+ unsigned int split;
VP8_BD_VALUE bigsplit;
- INT16 *qcoeff_ptr;
+ short *qcoeff_ptr;
const vp8_prob *coef_probs;
- int type;
int stop;
- INT16 val, bits_count;
- INT16 c;
- INT16 v;
+ int val, bits_count;
+ int c;
+ int v;
const vp8_prob *Prob;
+ int start_coeff;
+
- type = 3;
i = 0;
stop = 16;
scan = vp8_default_zig_zag1d;
qcoeff_ptr = &x->qcoeff[0];
+ coef_probs = fc->coef_probs [3] [ 0 ] [0];
if (x->mode_info_context->mbmi.mode != B_PRED &&
x->mode_info_context->mbmi.mode != SPLITMV)
{
i = 24;
stop = 24;
- type = 1;
qcoeff_ptr += 24*16;
eobtotal -= 16;
+ coef_probs = fc->coef_probs [1] [ 0 ] [0];
}
bufend = bc->user_buffer_end;
count = bc->count;
range = bc->range;
-
- coef_probs = fc->coef_probs [type] [ 0 ] [0];
+ start_coeff = 0;
BLOCK_LOOP:
a = A + vp8_block2above[i];
l = L + vp8_block2left[i];
- c = (INT16)(!type);
+ c = start_coeff;
- /*Dest = ((A)!=0) + ((B)!=0);*/
VP8_COMBINEENTROPYCONTEXTS(v, *a, *l);
+
Prob = coef_probs;
Prob += v * ENTROPY_NODES;
+ *a = *l = 0;
DO_WHILE:
Prob += coef_bands_x[c];
DECODE_AND_BRANCH_IF_ZERO(Prob[EOB_CONTEXT_NODE], BLOCK_FINISHED);
+ *a = *l = 1;
CHECK_0_:
DECODE_AND_LOOP_IF_ZERO(Prob[ZERO_CONTEXT_NODE], CHECK_0_);
qcoeff_ptr [ 15 ] = (INT16) v;
BLOCK_FINISHED:
- *a = *l = ((eobs[i] = c) != !type); /* any nonzero data? */
+ eobs[i] = c;
eobtotal += c;
qcoeff_ptr += 16;
if (i == 25)
{
- type = 0;
+ start_coeff = 1;
i = 0;
stop = 16;
- coef_probs = fc->coef_probs [type] [ 0 ] [0];
+ coef_probs = fc->coef_probs [0] [ 0 ] [0];
qcoeff_ptr -= (24*16 + 16);
goto BLOCK_LOOP;
}
if (i == 16)
{
- type = 2;
- coef_probs = fc->coef_probs [type] [ 0 ] [0];
+ start_coeff = 0;
+ coef_probs = fc->coef_probs [2] [ 0 ] [0];
stop = 24;
goto BLOCK_LOOP;
}