Mercurial > libavcodec.hg
comparison vc1dec.c @ 12127:9ba7d2a5b20a libavcodec
Make WMV3 decoder print more errors when decoding beta WMV9 files.
As a side effect it will also decode a lot of P-frames from those.
author | kostya |
---|---|
date | Sat, 10 Jul 2010 14:36:53 +0000 |
parents | 669bf7f6c986 |
children | c3682c0606e3 |
comparison
equal
deleted
inserted
replaced
12126:3581c6b92f70 | 12127:9ba7d2a5b20a |
---|---|
1994 ttblk = ff_vc1_ttblk_to_tt[v->tt_index][get_vlc2(gb, ff_vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1)]; | 1994 ttblk = ff_vc1_ttblk_to_tt[v->tt_index][get_vlc2(gb, ff_vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1)]; |
1995 } | 1995 } |
1996 if(ttblk == TT_4X4) { | 1996 if(ttblk == TT_4X4) { |
1997 subblkpat = ~(get_vlc2(gb, ff_vc1_subblkpat_vlc[v->tt_index].table, VC1_SUBBLKPAT_VLC_BITS, 1) + 1); | 1997 subblkpat = ~(get_vlc2(gb, ff_vc1_subblkpat_vlc[v->tt_index].table, VC1_SUBBLKPAT_VLC_BITS, 1) + 1); |
1998 } | 1998 } |
1999 if((ttblk != TT_8X8 && ttblk != TT_4X4) && (v->ttmbf || (ttmb != -1 && (ttmb & 8) && !first_block))) { | 1999 if((ttblk != TT_8X8 && ttblk != TT_4X4) |
2000 && ((v->ttmbf || (ttmb != -1 && (ttmb & 8) && !first_block)) | |
2001 || (!v->res_rtm_flag && !first_block))) { | |
2000 subblkpat = decode012(gb); | 2002 subblkpat = decode012(gb); |
2001 if(subblkpat) subblkpat ^= 3; //swap decoded pattern bits | 2003 if(subblkpat) subblkpat ^= 3; //swap decoded pattern bits |
2002 if(ttblk == TT_8X4_TOP || ttblk == TT_8X4_BOTTOM) ttblk = TT_8X4; | 2004 if(ttblk == TT_8X4_TOP || ttblk == TT_8X4_BOTTOM) ttblk = TT_8X4; |
2003 if(ttblk == TT_4X8_RIGHT || ttblk == TT_4X8_LEFT) ttblk = TT_4X8; | 2005 if(ttblk == TT_4X8_RIGHT || ttblk == TT_4X8_LEFT) ttblk = TT_4X8; |
2004 } | 2006 } |
3210 av_free(buf2); | 3212 av_free(buf2); |
3211 return -1; | 3213 return -1; |
3212 } | 3214 } |
3213 } | 3215 } |
3214 | 3216 |
3215 if(s->pict_type != FF_I_TYPE && !v->res_rtm_flag){ | |
3216 av_free(buf2); | |
3217 return -1; | |
3218 } | |
3219 | |
3220 // for hurry_up==5 | 3217 // for hurry_up==5 |
3221 s->current_picture.pict_type= s->pict_type; | 3218 s->current_picture.pict_type= s->pict_type; |
3222 s->current_picture.key_frame= s->pict_type == FF_I_TYPE; | 3219 s->current_picture.key_frame= s->pict_type == FF_I_TYPE; |
3223 | 3220 |
3224 /* skip B-frames if we don't have reference frames */ | 3221 /* skip B-frames if we don't have reference frames */ |