comparison tiertexseqv.c @ 6283:2134a0fc46f3 libavcodec

const
author michael
date Fri, 01 Feb 2008 15:56:51 +0000
parents bff60ecc02f9
children 48759bfbd073
comparison
equal deleted inserted replaced
6282:8c7173e5d08c 6283:2134a0fc46f3
35 unsigned int palette[256]; 35 unsigned int palette[256];
36 unsigned char block[8 * 8]; 36 unsigned char block[8 * 8];
37 } SeqVideoContext; 37 } SeqVideoContext;
38 38
39 39
40 static unsigned char *seq_unpack_rle_block(unsigned char *src, unsigned char *dst, int dst_size) 40 static const unsigned char *seq_unpack_rle_block(const unsigned char *src, unsigned char *dst, int dst_size)
41 { 41 {
42 int i, len, sz; 42 int i, len, sz;
43 GetBitContext gb; 43 GetBitContext gb;
44 int code_table[64]; 44 int code_table[64];
45 45
65 dst_size -= len; 65 dst_size -= len;
66 } 66 }
67 return src; 67 return src;
68 } 68 }
69 69
70 static unsigned char *seq_decode_op1(SeqVideoContext *seq, unsigned char *src, unsigned char *dst) 70 static const unsigned char *seq_decode_op1(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst)
71 { 71 {
72 unsigned char *color_table; 72 const unsigned char *color_table;
73 int b, i, len, bits; 73 int b, i, len, bits;
74 GetBitContext gb; 74 GetBitContext gb;
75 75
76 len = *src++; 76 len = *src++;
77 if (len & 0x80) { 77 if (len & 0x80) {
105 } 105 }
106 106
107 return src; 107 return src;
108 } 108 }
109 109
110 static unsigned char *seq_decode_op2(SeqVideoContext *seq, unsigned char *src, unsigned char *dst) 110 static const unsigned char *seq_decode_op2(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst)
111 { 111 {
112 int i; 112 int i;
113 113
114 for (i = 0; i < 8; i++) { 114 for (i = 0; i < 8; i++) {
115 memcpy(dst, src, 8); 115 memcpy(dst, src, 8);
118 } 118 }
119 119
120 return src; 120 return src;
121 } 121 }
122 122
123 static unsigned char *seq_decode_op3(SeqVideoContext *seq, unsigned char *src, unsigned char *dst) 123 static const unsigned char *seq_decode_op3(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst)
124 { 124 {
125 int pos, offset; 125 int pos, offset;
126 126
127 do { 127 do {
128 pos = *src++; 128 pos = *src++;
131 } while (!(pos & 0x80)); 131 } while (!(pos & 0x80));
132 132
133 return src; 133 return src;
134 } 134 }
135 135
136 static void seqvideo_decode(SeqVideoContext *seq, unsigned char *data, int data_size) 136 static void seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size)
137 { 137 {
138 GetBitContext gb; 138 GetBitContext gb;
139 int flags, i, j, x, y, op; 139 int flags, i, j, x, y, op;
140 unsigned char c[3]; 140 unsigned char c[3];
141 unsigned char *dst; 141 unsigned char *dst;
185 return 0; 185 return 0;
186 } 186 }
187 187
188 static int seqvideo_decode_frame(AVCodecContext *avctx, 188 static int seqvideo_decode_frame(AVCodecContext *avctx,
189 void *data, int *data_size, 189 void *data, int *data_size,
190 uint8_t *buf, int buf_size) 190 const uint8_t *buf, int buf_size)
191 { 191 {
192 192
193 SeqVideoContext *seq = avctx->priv_data; 193 SeqVideoContext *seq = avctx->priv_data;
194 194
195 seq->frame.reference = 1; 195 seq->frame.reference = 1;