comparison qpeg.c @ 6274:458c2f742eef libavcodec

const
author michael
date Fri, 01 Feb 2008 15:39:25 +0000
parents 2b72f9bc4f06
children e9cff14a5ae5
comparison
equal deleted inserted replaced
6273:39cd8d3d5b9e 6274:458c2f742eef
31 AVCodecContext *avctx; 31 AVCodecContext *avctx;
32 AVFrame pic; 32 AVFrame pic;
33 uint8_t *refdata; 33 uint8_t *refdata;
34 } QpegContext; 34 } QpegContext;
35 35
36 static void qpeg_decode_intra(uint8_t *src, uint8_t *dst, int size, 36 static void qpeg_decode_intra(const uint8_t *src, uint8_t *dst, int size,
37 int stride, int width, int height) 37 int stride, int width, int height)
38 { 38 {
39 int i; 39 int i;
40 int code; 40 int code;
41 int c0, c1; 41 int c0, c1;
113 { 0x00, 0x20, 0x20, 0x20, 0x18, 0x10, 0x10, 0x20, 0x10, 0x08, 0x18, 0x08, 0x08, 0x18, 0x10, 0x04}; 113 { 0x00, 0x20, 0x20, 0x20, 0x18, 0x10, 0x10, 0x20, 0x10, 0x08, 0x18, 0x08, 0x08, 0x18, 0x10, 0x04};
114 static int qpeg_table_w[16] = 114 static int qpeg_table_w[16] =
115 { 0x00, 0x20, 0x18, 0x08, 0x18, 0x10, 0x20, 0x10, 0x08, 0x10, 0x20, 0x20, 0x08, 0x10, 0x18, 0x04}; 115 { 0x00, 0x20, 0x18, 0x08, 0x18, 0x10, 0x20, 0x10, 0x08, 0x10, 0x20, 0x20, 0x08, 0x10, 0x18, 0x04};
116 116
117 /* Decodes delta frames */ 117 /* Decodes delta frames */
118 static void qpeg_decode_inter(uint8_t *src, uint8_t *dst, int size, 118 static void qpeg_decode_inter(const uint8_t *src, uint8_t *dst, int size,
119 int stride, int width, int height, 119 int stride, int width, int height,
120 int delta, uint8_t *ctable, uint8_t *refdata) 120 int delta, uint8_t *ctable, uint8_t *refdata)
121 { 121 {
122 int i, j; 122 int i, j;
123 int code; 123 int code;
247 } 247 }
248 } 248 }
249 249
250 static int decode_frame(AVCodecContext *avctx, 250 static int decode_frame(AVCodecContext *avctx,
251 void *data, int *data_size, 251 void *data, int *data_size,
252 uint8_t *buf, int buf_size) 252 const uint8_t *buf, int buf_size)
253 { 253 {
254 QpegContext * const a = avctx->priv_data; 254 QpegContext * const a = avctx->priv_data;
255 AVFrame * const p= (AVFrame*)&a->pic; 255 AVFrame * const p= (AVFrame*)&a->pic;
256 uint8_t* outdata; 256 uint8_t* outdata;
257 int delta; 257 int delta;