comparison dnxhddec.c @ 6233:bfb9d5c104a1 libavcodec

const
author michael
date Fri, 01 Feb 2008 04:11:06 +0000
parents 0b967440e270
children 7fa807dd7958
comparison
equal deleted inserted replaced
6232:69b14049d7c8 6233:bfb9d5c104a1
82 ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, ff_zigzag_direct); 82 ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, ff_zigzag_direct);
83 } 83 }
84 return 0; 84 return 0;
85 } 85 }
86 86
87 static int dnxhd_decode_header(DNXHDContext *ctx, uint8_t *buf, int buf_size, int first_field) 87 static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_size, int first_field)
88 { 88 {
89 static const uint8_t header_prefix[] = { 0x00, 0x00, 0x02, 0x80, 0x01 }; 89 static const uint8_t header_prefix[] = { 0x00, 0x00, 0x02, 0x80, 0x01 };
90 int i; 90 int i;
91 91
92 if (buf_size < 0x280) 92 if (buf_size < 0x280)
261 } 261 }
262 262
263 return 0; 263 return 0;
264 } 264 }
265 265
266 static int dnxhd_decode_macroblocks(DNXHDContext *ctx, uint8_t *buf, int buf_size) 266 static int dnxhd_decode_macroblocks(DNXHDContext *ctx, const uint8_t *buf, int buf_size)
267 { 267 {
268 int x, y; 268 int x, y;
269 for (y = 0; y < ctx->mb_height; y++) { 269 for (y = 0; y < ctx->mb_height; y++) {
270 ctx->last_dc[0] = 270 ctx->last_dc[0] =
271 ctx->last_dc[1] = 271 ctx->last_dc[1] =
279 } 279 }
280 return 0; 280 return 0;
281 } 281 }
282 282
283 static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, 283 static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
284 uint8_t *buf, int buf_size) 284 const uint8_t *buf, int buf_size)
285 { 285 {
286 DNXHDContext *ctx = avctx->priv_data; 286 DNXHDContext *ctx = avctx->priv_data;
287 AVFrame *picture = data; 287 AVFrame *picture = data;
288 int first_field = 1; 288 int first_field = 1;
289 289