if (v->profile == PROFILE_ADVANCED)
{
+ v->zz_8x4 = ff_vc1_adv_progressive_8x4_zz;
+ v->zz_4x8 = ff_vc1_adv_progressive_4x8_zz;
return decode_sequence_header_adv(v, gb);
}
else
{
+ v->zz_8x4 = ff_vc1_simple_progressive_8x4_zz;
+ v->zz_4x8 = ff_vc1_simple_progressive_4x8_zz;
v->res_sm = get_bits(gb, 2); //reserved
if (v->res_sm)
{
i += skip;
if(i > 31)
break;
- if(v->profile < PROFILE_ADVANCED)
- idx = ff_vc1_simple_progressive_8x4_zz[i++];
- else
- idx = ff_vc1_adv_progressive_8x4_zz[i++];
- block[idx + off] = value * scale;
+ idx = v->zz_8x4[i++]+off;
+ block[idx] = value * scale;
if(!v->pquantizer)
- block[idx + off] += (block[idx + off] < 0) ? -mquant : mquant;
+ block[idx] += (block[idx] < 0) ? -mquant : mquant;
}
if(!(subblkpat & (1 << (1 - j))) && !skip_block)
s->dsp.vc1_inv_trans_8x4(dst + j*4*linesize, linesize, block + off);
i += skip;
if(i > 31)
break;
- if(v->profile < PROFILE_ADVANCED)
- idx = ff_vc1_simple_progressive_4x8_zz[i++];
- else
- idx = ff_vc1_adv_progressive_4x8_zz[i++];
- block[idx + off] = value * scale;
+ idx = v->zz_4x8[i++]+off;
+ block[idx] = value * scale;
if(!v->pquantizer)
- block[idx + off] += (block[idx + off] < 0) ? -mquant : mquant;
+ block[idx] += (block[idx] < 0) ? -mquant : mquant;
}
if(!(subblkpat & (1 << (1 - j))) && !skip_block)
s->dsp.vc1_inv_trans_4x8(dst + j*4, linesize, block + off);
int k_y; ///< Number of bits for MVs (depends on MV range)
int range_x, range_y; ///< MV range
uint8_t pq, altpq; ///< Current/alternate frame quantizer scale
+ const uint8_t* zz_8x4;///< Zigzag scan table for TT_8x4 coding mode
+ const uint8_t* zz_4x8;///< Zigzag scan table for TT_4x8 coding mode
/** pquant parameters */
//@{
uint8_t dquantfrm;