comparison vmdav.c @ 6484:814c8bd77d91 libavcodec

These video decoders do not need to include and initialize the DSP support functions.
author melanson
date Mon, 10 Mar 2008 03:07:44 +0000
parents d498d28aa9da
children 48759bfbd073
comparison
equal deleted inserted replaced
6483:1c99abd63afb 6484:814c8bd77d91
43 #include <stdlib.h> 43 #include <stdlib.h>
44 #include <string.h> 44 #include <string.h>
45 #include <unistd.h> 45 #include <unistd.h>
46 46
47 #include "avcodec.h" 47 #include "avcodec.h"
48 #include "dsputil.h"
49 48
50 #define VMD_HEADER_SIZE 0x330 49 #define VMD_HEADER_SIZE 0x330
51 #define PALETTE_COUNT 256 50 #define PALETTE_COUNT 256
52 51
53 /* 52 /*
55 */ 54 */
56 55
57 typedef struct VmdVideoContext { 56 typedef struct VmdVideoContext {
58 57
59 AVCodecContext *avctx; 58 AVCodecContext *avctx;
60 DSPContext dsp;
61 AVFrame frame; 59 AVFrame frame;
62 AVFrame prev_frame; 60 AVFrame prev_frame;
63 61
64 const unsigned char *buf; 62 const unsigned char *buf;
65 int size; 63 int size;
334 unsigned char *vmd_header; 332 unsigned char *vmd_header;
335 unsigned char *raw_palette; 333 unsigned char *raw_palette;
336 334
337 s->avctx = avctx; 335 s->avctx = avctx;
338 avctx->pix_fmt = PIX_FMT_PAL8; 336 avctx->pix_fmt = PIX_FMT_PAL8;
339 dsputil_init(&s->dsp, avctx);
340 337
341 /* make sure the VMD header made it */ 338 /* make sure the VMD header made it */
342 if (s->avctx->extradata_size != VMD_HEADER_SIZE) { 339 if (s->avctx->extradata_size != VMD_HEADER_SIZE) {
343 av_log(s->avctx, AV_LOG_ERROR, "VMD video: expected extradata size of %d\n", 340 av_log(s->avctx, AV_LOG_ERROR, "VMD video: expected extradata size of %d\n",
344 VMD_HEADER_SIZE); 341 VMD_HEADER_SIZE);