Mercurial > libavcodec.hg
comparison vc1.c @ 12521:db36486a6f89 libavcodec
Make WMV3 decoder attempt to decode WMVP as well
author | kostya |
---|---|
date | Sun, 26 Sep 2010 13:56:50 +0000 |
parents | 5915f4f0e172 |
children |
comparison
equal
deleted
inserted
replaced
12520:5915f4f0e172 | 12521:db36486a6f89 |
---|---|
313 av_log(avctx, AV_LOG_ERROR, | 313 av_log(avctx, AV_LOG_ERROR, |
314 "Old interlaced mode is not supported\n"); | 314 "Old interlaced mode is not supported\n"); |
315 return -1; | 315 return -1; |
316 } | 316 } |
317 if (v->res_sprite) { | 317 if (v->res_sprite) { |
318 av_log(avctx, AV_LOG_ERROR, "WMVP is not supported\n"); | 318 av_log(avctx, AV_LOG_ERROR, "WMVP is not fully supported\n"); |
319 return -1; | |
320 } | 319 } |
321 } | 320 } |
322 | 321 |
323 // (fps-2)/4 (->30) | 322 // (fps-2)/4 (->30) |
324 v->frmrtq_postproc = get_bits(gb, 3); //common | 323 v->frmrtq_postproc = get_bits(gb, 3); //common |
385 | 384 |
386 v->s.max_b_frames = avctx->max_b_frames = get_bits(gb, 3); //common | 385 v->s.max_b_frames = avctx->max_b_frames = get_bits(gb, 3); //common |
387 v->quantizer_mode = get_bits(gb, 2); //common | 386 v->quantizer_mode = get_bits(gb, 2); //common |
388 | 387 |
389 v->finterpflag = get_bits1(gb); //common | 388 v->finterpflag = get_bits1(gb); //common |
390 v->res_rtm_flag = get_bits1(gb); //reserved | 389 |
390 if (v->res_sprite) { | |
391 v->s.avctx->width = v->s.avctx->coded_width = get_bits(gb, 11); | |
392 v->s.avctx->height = v->s.avctx->coded_height = get_bits(gb, 11); | |
393 skip_bits(gb, 5); //frame rate | |
394 v->res_x8 = get_bits1(gb); | |
395 if (get_bits1(gb)) { // something to do with DC VLC selection | |
396 av_log(avctx, AV_LOG_ERROR, "Unsupported sprite feature\n"); | |
397 return -1; | |
398 } | |
399 skip_bits(gb, 3); //slice code | |
400 v->res_rtm_flag = 0; | |
401 } else { | |
402 v->res_rtm_flag = get_bits1(gb); //reserved | |
403 } | |
391 if (!v->res_rtm_flag) | 404 if (!v->res_rtm_flag) |
392 { | 405 { |
393 // av_log(avctx, AV_LOG_ERROR, | 406 // av_log(avctx, AV_LOG_ERROR, |
394 // "0 for reserved RES_RTM_FLAG is forbidden\n"); | 407 // "0 for reserved RES_RTM_FLAG is forbidden\n"); |
395 av_log(avctx, AV_LOG_ERROR, | 408 av_log(avctx, AV_LOG_ERROR, |
564 | 577 |
565 int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) | 578 int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) |
566 { | 579 { |
567 int pqindex, lowquant, status; | 580 int pqindex, lowquant, status; |
568 | 581 |
582 if(v->res_sprite) { | |
583 skip_bits(gb, 2); //not yet deciphered | |
584 } | |
569 if(v->finterpflag) v->interpfrm = get_bits1(gb); | 585 if(v->finterpflag) v->interpfrm = get_bits1(gb); |
570 skip_bits(gb, 2); //framecnt unused | 586 skip_bits(gb, 2); //framecnt unused |
571 v->rangeredfrm = 0; | 587 v->rangeredfrm = 0; |
572 if (v->rangered) v->rangeredfrm = get_bits1(gb); | 588 if (v->rangered) v->rangeredfrm = get_bits1(gb); |
573 v->s.pict_type = get_bits1(gb); | 589 v->s.pict_type = get_bits1(gb); |