diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-11-09 21:37:48 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-11-09 21:37:48 +0000 |
commit | 9abc7e0fdc5b99e4503e22c9084195867e312222 (patch) | |
tree | 8ac15df58b6288baa986b892fa33ac1cf7fffe28 /libavcodec/vc1.c | |
parent | a9d5a4485ae53f263f67a3804d8edabe65c955c2 (diff) | |
download | ffmpeg-9abc7e0fdc5b99e4503e22c9084195867e312222.tar.gz |
intrax8 decoder patch by "someone"
Originally committed as revision 10971 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r-- | libavcodec/vc1.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 8046f33935..2a8d154b5f 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -1100,8 +1100,8 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) if (v->multires && v->s.pict_type != B_TYPE) v->respic = get_bits(gb, 2); if(v->res_x8 && (v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE)){ - if(get_bits1(gb))return -1; - } + v->x8_type = get_bits1(gb); + }else v->x8_type = 0; //av_log(v->s.avctx, AV_LOG_INFO, "%c Frame: QP=[%i]%i (+%i/2) %i\n", // (v->s.pict_type == P_TYPE) ? 'P' : ((v->s.pict_type == I_TYPE) ? 'I' : 'B'), pqindex, v->pq, v->halfpq, v->rangeredfrm); @@ -1234,6 +1234,8 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) break; } + if(!v->x8_type) + { /* AC Syntax */ v->c_ac_table_index = decode012(gb); if (v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE) @@ -1242,6 +1244,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) } /* DC Syntax */ v->s.dc_table_index = get_bits1(gb); + } if(v->s.pict_type == BI_TYPE) { v->s.pict_type = B_TYPE; @@ -3755,6 +3758,9 @@ static void vc1_decode_blocks(VC1Context *v) { v->s.esc3_level_length = 0; + if(v->x8_type){ + ff_intrax8_decode_picture(&v->x8, 2*v->pq+v->halfpq, v->pq*(!v->pquantizer) ); + }else switch(v->s.pict_type) { case I_TYPE: @@ -3835,6 +3841,10 @@ static int vc1_decode_init(AVCodecContext *avctx) avctx->flags |= CODEC_FLAG_EMU_EDGE; v->s.flags |= CODEC_FLAG_EMU_EDGE; + if(avctx->idct_algo==FF_IDCT_AUTO){ + avctx->idct_algo=FF_IDCT_WMV2; + } + if(ff_h263_decode_init(avctx) < 0) return -1; if (vc1_init_common(v) < 0) return -1; @@ -3935,6 +3945,7 @@ static int vc1_decode_init(AVCodecContext *avctx) // return -1; } + ff_intrax8_common_init(&v->x8,s); return 0; } |