static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb);
+static void simple_idct_put_rangered(uint8_t *dest, int line_size, DCTELEM *block)
+{
+ int i;
+ ff_simple_idct(block);
+ for (i = 0; i < 64; i++) block[i] = (block[i] - 64) << 1;
+ ff_put_pixels_clamped_c(block, dest, line_size);
+}
+
+static void simple_idct_put_signed(uint8_t *dest, int line_size, DCTELEM *block)
+{
+ ff_simple_idct(block);
+ ff_put_signed_pixels_clamped_c(block, dest, line_size);
+}
+
+static void simple_idct_put_signed_rangered(uint8_t *dest, int line_size, DCTELEM *block)
+{
+ int i;
+ ff_simple_idct(block);
+ for (i = 0; i < 64; i++) block[i] <<= 1;
+ ff_put_signed_pixels_clamped_c(block, dest, line_size);
+}
+
/**
* Decode Simple/Main Profiles sequence header
* @see Figure 7-8, p16-17
v->profile = get_bits(gb, 2);
if (v->profile == PROFILE_COMPLEX)
{
- av_log(avctx, AV_LOG_ERROR, "WMV3 Complex Profile is not fully supported\n");
+ av_log(avctx, AV_LOG_WARNING, "WMV3 Complex Profile is not fully supported\n");
}
if (v->profile == PROFILE_ADVANCED)
return -1;
}
if (v->res_sprite) {
- av_log(avctx, AV_LOG_ERROR, "WMVP is not supported\n");
- return -1;
+ av_log(avctx, AV_LOG_ERROR, "WMVP is not fully supported\n");
}
}
v->res_fasttx = get_bits1(gb);
if (!v->res_fasttx)
{
- v->s.dsp.vc1_inv_trans_8x8 = ff_simple_idct;
- v->s.dsp.vc1_inv_trans_8x4 = ff_simple_idct84_add;
- v->s.dsp.vc1_inv_trans_4x8 = ff_simple_idct48_add;
- v->s.dsp.vc1_inv_trans_4x4 = ff_simple_idct44_add;
- v->s.dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add;
- v->s.dsp.vc1_inv_trans_8x4_dc = ff_simple_idct84_add;
- v->s.dsp.vc1_inv_trans_4x8_dc = ff_simple_idct48_add;
- v->s.dsp.vc1_inv_trans_4x4_dc = ff_simple_idct44_add;
+ v->vc1dsp.vc1_inv_trans_8x8_add = ff_simple_idct_add;
+ v->vc1dsp.vc1_inv_trans_8x8_put[0] = ff_simple_idct_put;
+ v->vc1dsp.vc1_inv_trans_8x8_put[1] = simple_idct_put_rangered;
+ v->vc1dsp.vc1_inv_trans_8x8_put_signed[0] = simple_idct_put_signed;
+ v->vc1dsp.vc1_inv_trans_8x8_put_signed[1] = simple_idct_put_signed_rangered;
+ v->vc1dsp.vc1_inv_trans_8x4 = ff_simple_idct84_add;
+ v->vc1dsp.vc1_inv_trans_4x8 = ff_simple_idct48_add;
+ v->vc1dsp.vc1_inv_trans_4x4 = ff_simple_idct44_add;
+ v->vc1dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add;
+ v->vc1dsp.vc1_inv_trans_8x4_dc = ff_simple_idct84_add;
+ v->vc1dsp.vc1_inv_trans_4x8_dc = ff_simple_idct48_add;
+ v->vc1dsp.vc1_inv_trans_4x4_dc = ff_simple_idct44_add;
}
v->fastuvmc = get_bits1(gb); //common
v->quantizer_mode = get_bits(gb, 2); //common
v->finterpflag = get_bits1(gb); //common
- v->res_rtm_flag = get_bits1(gb); //reserved
+
+ if (v->res_sprite) {
+ v->s.avctx->width = v->s.avctx->coded_width = get_bits(gb, 11);
+ v->s.avctx->height = v->s.avctx->coded_height = get_bits(gb, 11);
+ skip_bits(gb, 5); //frame rate
+ v->res_x8 = get_bits1(gb);
+ if (get_bits1(gb)) { // something to do with DC VLC selection
+ av_log(avctx, AV_LOG_ERROR, "Unsupported sprite feature\n");
+ return -1;
+ }
+ skip_bits(gb, 3); //slice code
+ v->res_rtm_flag = 0;
+ } else {
+ v->res_rtm_flag = get_bits1(gb); //reserved
+ }
if (!v->res_rtm_flag)
{
// av_log(avctx, AV_LOG_ERROR,
{
int pqindex, lowquant, status;
+ if(v->res_sprite) {
+ skip_bits(gb, 2); //not yet deciphered
+ }
if(v->finterpflag) v->interpfrm = get_bits1(gb);
skip_bits(gb, 2); //framecnt unused
v->rangeredfrm = 0;
v->rptfrm = get_bits(gb, 2);
} else {
v->tff = get_bits1(gb);
- v->rptfrm = get_bits1(gb);
+ v->rff = get_bits1(gb);
}
}
if(v->panscanflag) {
+ av_log_missing_feature(v->s.avctx, "Pan-scan", 0);
//...
}
v->rnd = get_bits1(gb);