]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dxa.c
Use add instead of lshift in mmxext vp8 idct
[ffmpeg] / libavcodec / dxa.c
index e415da7187d5797e44d68b4ae284f8715d9ddb85..62e4e0ae82419994069cec17b4125e4954b61260 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file libavcodec/dxa.c
+ * @file
  * DXA Video decoder
  */
 
@@ -188,8 +188,10 @@ static int decode_13(AVCodecContext *avctx, DxaDecContext *c, uint8_t* dst, uint
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size)
+static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
 {
+    const uint8_t *buf = avpkt->data;
+    int buf_size = avpkt->size;
     DxaDecContext * const c = avctx->priv_data;
     uint8_t *outptr, *srcptr, *tmpptr;
     unsigned long dsize;
@@ -293,10 +295,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
     c->avctx = avctx;
     avctx->pix_fmt = PIX_FMT_PAL8;
 
-    if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
-        return -1;
-    }
-
     c->dsize = avctx->width * avctx->height * 2;
     if((c->decomp_buf = av_malloc(c->dsize)) == NULL) {
         av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
@@ -321,13 +319,14 @@ static av_cold int decode_end(AVCodecContext *avctx)
 
 AVCodec dxa_decoder = {
     "dxa",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DXA,
     sizeof(DxaDecContext),
     decode_init,
     NULL,
     decode_end,
     decode_frame,
+    CODEC_CAP_DR1,
     .long_name = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"),
 };