From 9abc7e0fdc5b99e4503e22c9084195867e312222 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 9 Nov 2007 21:37:48 +0000 Subject: intrax8 decoder patch by "someone" Originally committed as revision 10971 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/wmv2.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'libavcodec/wmv2.c') diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index 16e9dfdcff..365f5654f8 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -29,6 +29,7 @@ #include "msmpeg4.h" #include "msmpeg4data.h" #include "simple_idct.h" +#include "intrax8.h" #define SKIP_TYPE_NONE 0 #define SKIP_TYPE_MPEG 1 @@ -38,6 +39,7 @@ typedef struct Wmv2Context{ MpegEncContext s; + IntraX8Context x8; int j_type_bit; int j_type; int abt_flag; @@ -472,12 +474,9 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s) s->picture_number++; //FIXME ? -// if(w->j_type) -// return wmv2_decode_j_picture(w); //FIXME - if(w->j_type){ - av_log(s->avctx, AV_LOG_ERROR, "J-type picture is not supported\n"); - return -1; + ff_intrax8_decode_picture(&w->x8, 2*s->qscale, (s->qscale-1)|1 ); + return 1; } return 0; @@ -830,11 +829,17 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) static int wmv2_decode_init(AVCodecContext *avctx){ Wmv2Context * const w= avctx->priv_data; + if(avctx->idct_algo==FF_IDCT_AUTO){ + avctx->idct_algo=FF_IDCT_WMV2; + } + if(ff_h263_decode_init(avctx) < 0) return -1; wmv2_common_init(w); + ff_intrax8_common_init(&w->x8,&w->s); + return 0; } -- cgit v1.2.3