Mercurial > libavcodec.hg
comparison rv34.c @ 8371:2ebc9b2c7459 libavcodec
add const qualifier to some pointers for input data
author | kostya |
---|---|
date | Wed, 17 Dec 2008 20:17:07 +0000 |
parents | edea96e4367b |
children | 8621deaff8dc |
comparison
equal
deleted
inserted
replaced
8370:edea96e4367b | 8371:2ebc9b2c7459 |
---|---|
1218 si1->width != si2->width || | 1218 si1->width != si2->width || |
1219 si1->height != si2->height|| | 1219 si1->height != si2->height|| |
1220 si1->pts != si2->pts; | 1220 si1->pts != si2->pts; |
1221 } | 1221 } |
1222 | 1222 |
1223 static int rv34_decode_slice(RV34DecContext *r, int end, uint8_t* buf, int buf_size) | 1223 static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int buf_size) |
1224 { | 1224 { |
1225 MpegEncContext *s = &r->s; | 1225 MpegEncContext *s = &r->s; |
1226 GetBitContext *gb = &s->gb; | 1226 GetBitContext *gb = &s->gb; |
1227 int mb_pos; | 1227 int mb_pos; |
1228 int res; | 1228 int res; |
1350 rv34_init_tables(); | 1350 rv34_init_tables(); |
1351 | 1351 |
1352 return 0; | 1352 return 0; |
1353 } | 1353 } |
1354 | 1354 |
1355 static int get_slice_offset(AVCodecContext *avctx, uint8_t *buf, int n) | 1355 static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n) |
1356 { | 1356 { |
1357 if(avctx->slice_count) return avctx->slice_offset[n]; | 1357 if(avctx->slice_count) return avctx->slice_offset[n]; |
1358 else return AV_RL32(buf + n*8 - 4) == 1 ? AV_RL32(buf + n*8) : AV_RB32(buf + n*8); | 1358 else return AV_RL32(buf + n*8 - 4) == 1 ? AV_RL32(buf + n*8) : AV_RB32(buf + n*8); |
1359 } | 1359 } |
1360 | 1360 |
1366 MpegEncContext *s = &r->s; | 1366 MpegEncContext *s = &r->s; |
1367 AVFrame *pict = data; | 1367 AVFrame *pict = data; |
1368 SliceInfo si; | 1368 SliceInfo si; |
1369 int i; | 1369 int i; |
1370 int slice_count; | 1370 int slice_count; |
1371 uint8_t *slices_hdr = NULL; | 1371 const uint8_t *slices_hdr = NULL; |
1372 int last = 0; | 1372 int last = 0; |
1373 | 1373 |
1374 /* no supplementary picture */ | 1374 /* no supplementary picture */ |
1375 if (buf_size == 0) { | 1375 if (buf_size == 0) { |
1376 /* special case for last picture */ | 1376 /* special case for last picture */ |