Mercurial > libavcodec.hg
diff wmv2.c @ 5887:83ac4620c6ed libavcodec
intrax8 decoder patch by "someone"
author | michael |
---|---|
date | Fri, 09 Nov 2007 21:37:48 +0000 |
parents | 02007962faf4 |
children | b47573cb7401 |
line wrap: on
line diff
--- a/wmv2.c Thu Nov 08 10:53:32 2007 +0000 +++ b/wmv2.c Fri Nov 09 21:37:48 2007 +0000 @@ -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 @@ 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 @@ 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; }