summaryrefslogtreecommitdiff
path: root/libavcodec/wmv2.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-11-09 21:37:48 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-11-09 21:37:48 +0000
commit9abc7e0fdc5b99e4503e22c9084195867e312222 (patch)
tree8ac15df58b6288baa986b892fa33ac1cf7fffe28 /libavcodec/wmv2.c
parenta9d5a4485ae53f263f67a3804d8edabe65c955c2 (diff)
intrax8 decoder patch by "someone"
Originally committed as revision 10971 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmv2.c')
-rw-r--r--libavcodec/wmv2.c15
1 files changed, 10 insertions, 5 deletions
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;
}