comparison idcinvideo.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 dfdff1ca78a7
children 48759bfbd073
comparison
equal deleted inserted replaced
6483:1c99abd63afb 6484:814c8bd77d91
48 #include <stdlib.h> 48 #include <stdlib.h>
49 #include <string.h> 49 #include <string.h>
50 #include <unistd.h> 50 #include <unistd.h>
51 51
52 #include "avcodec.h" 52 #include "avcodec.h"
53 #include "dsputil.h"
54 53
55 #define HUFFMAN_TABLE_SIZE 64 * 1024 54 #define HUFFMAN_TABLE_SIZE 64 * 1024
56 #define HUF_TOKENS 256 55 #define HUF_TOKENS 256
57 #define PALETTE_COUNT 256 56 #define PALETTE_COUNT 256
58 57
64 } hnode_t; 63 } hnode_t;
65 64
66 typedef struct IdcinContext { 65 typedef struct IdcinContext {
67 66
68 AVCodecContext *avctx; 67 AVCodecContext *avctx;
69 DSPContext dsp;
70 AVFrame frame; 68 AVFrame frame;
71 69
72 const unsigned char *buf; 70 const unsigned char *buf;
73 int size; 71 int size;
74 72
151 int i, j, histogram_index = 0; 149 int i, j, histogram_index = 0;
152 unsigned char *histograms; 150 unsigned char *histograms;
153 151
154 s->avctx = avctx; 152 s->avctx = avctx;
155 avctx->pix_fmt = PIX_FMT_PAL8; 153 avctx->pix_fmt = PIX_FMT_PAL8;
156 dsputil_init(&s->dsp, avctx);
157 154
158 /* make sure the Huffman tables make it */ 155 /* make sure the Huffman tables make it */
159 if (s->avctx->extradata_size != HUFFMAN_TABLE_SIZE) { 156 if (s->avctx->extradata_size != HUFFMAN_TABLE_SIZE) {
160 av_log(s->avctx, AV_LOG_ERROR, " Id CIN video: expected extradata size of %d\n", HUFFMAN_TABLE_SIZE); 157 av_log(s->avctx, AV_LOG_ERROR, " Id CIN video: expected extradata size of %d\n", HUFFMAN_TABLE_SIZE);
161 return -1; 158 return -1;