Mercurial > libavcodec.hg
comparison txd.c @ 6288:911d4939e3c8 libavcodec
const
author | michael |
---|---|
date | Fri, 01 Feb 2008 15:59:41 +0000 |
parents | fe2733d26e9b |
children | 48759bfbd073 |
comparison
equal
deleted
inserted
replaced
6287:838520e2b6f0 | 6288:911d4939e3c8 |
---|---|
36 | 36 |
37 return 0; | 37 return 0; |
38 } | 38 } |
39 | 39 |
40 static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | 40 static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
41 uint8_t *buf, int buf_size) { | 41 const uint8_t *buf, int buf_size) { |
42 TXDContext * const s = avctx->priv_data; | 42 TXDContext * const s = avctx->priv_data; |
43 AVFrame *picture = data; | 43 AVFrame *picture = data; |
44 AVFrame * const p = &s->picture; | 44 AVFrame * const p = &s->picture; |
45 unsigned int version, w, h, d3d_format, depth, stride, mipmap_count, flags; | 45 unsigned int version, w, h, d3d_format, depth, stride, mipmap_count, flags; |
46 unsigned int y, v; | 46 unsigned int y, v; |
47 uint8_t *ptr, *cur = buf; | 47 uint8_t *ptr; |
48 uint32_t *palette = (uint32_t *)(cur + 88), *pal; | 48 const uint8_t *cur = buf; |
49 const uint32_t *palette = (const uint32_t *)(cur + 88); | |
50 uint32_t *pal; | |
49 | 51 |
50 version = AV_RL32(cur); | 52 version = AV_RL32(cur); |
51 d3d_format = AV_RL32(cur+76); | 53 d3d_format = AV_RL32(cur+76); |
52 w = AV_RL16(cur+80); | 54 w = AV_RL16(cur+80); |
53 h = AV_RL16(cur+82); | 55 h = AV_RL16(cur+82); |