Mercurial > libavcodec.hg
diff vc1.c @ 5887:83ac4620c6ed libavcodec
intrax8 decoder patch by "someone"
author | michael |
---|---|
date | Fri, 09 Nov 2007 21:37:48 +0000 |
parents | c1d42c875be8 |
children | efc1e9a01671 |
line wrap: on
line diff
--- a/vc1.c Thu Nov 08 10:53:32 2007 +0000 +++ b/vc1.c Fri Nov 09 21:37:48 2007 +0000 @@ -1100,8 +1100,8 @@ 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 @@ 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 @@ } /* 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 @@ { 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 @@ 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 @@ // return -1; } + ff_intrax8_common_init(&v->x8,s); return 0; }