Mercurial > libavcodec.hg
comparison msvideo1.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 |
---|---|
34 #include <stdlib.h> | 34 #include <stdlib.h> |
35 #include <string.h> | 35 #include <string.h> |
36 #include <unistd.h> | 36 #include <unistd.h> |
37 | 37 |
38 #include "avcodec.h" | 38 #include "avcodec.h" |
39 #include "dsputil.h" | |
40 | 39 |
41 #define PALETTE_COUNT 256 | 40 #define PALETTE_COUNT 256 |
42 #define CHECK_STREAM_PTR(n) \ | 41 #define CHECK_STREAM_PTR(n) \ |
43 if ((stream_ptr + n) > s->size ) { \ | 42 if ((stream_ptr + n) > s->size ) { \ |
44 av_log(s->avctx, AV_LOG_ERROR, " MS Video-1 warning: stream_ptr out of bounds (%d >= %d)\n", \ | 43 av_log(s->avctx, AV_LOG_ERROR, " MS Video-1 warning: stream_ptr out of bounds (%d >= %d)\n", \ |
47 } | 46 } |
48 | 47 |
49 typedef struct Msvideo1Context { | 48 typedef struct Msvideo1Context { |
50 | 49 |
51 AVCodecContext *avctx; | 50 AVCodecContext *avctx; |
52 DSPContext dsp; | |
53 AVFrame frame; | 51 AVFrame frame; |
54 | 52 |
55 const unsigned char *buf; | 53 const unsigned char *buf; |
56 int size; | 54 int size; |
57 | 55 |
71 avctx->pix_fmt = PIX_FMT_PAL8; | 69 avctx->pix_fmt = PIX_FMT_PAL8; |
72 } else { | 70 } else { |
73 s->mode_8bit = 0; | 71 s->mode_8bit = 0; |
74 avctx->pix_fmt = PIX_FMT_RGB555; | 72 avctx->pix_fmt = PIX_FMT_RGB555; |
75 } | 73 } |
76 | |
77 dsputil_init(&s->dsp, avctx); | |
78 | 74 |
79 s->frame.data[0] = NULL; | 75 s->frame.data[0] = NULL; |
80 | 76 |
81 return 0; | 77 return 0; |
82 } | 78 } |