Mercurial > mplayer.hg
annotate libmpcodecs/native/qtrle.c @ 9403:d828cd1c219b
more translation
author | gabucino |
---|---|
date | Tue, 11 Feb 2003 21:19:13 +0000 |
parents | 306ea9a02ebe |
children |
rev | line source |
---|---|
3687
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
1 /* |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
2 Quicktime Animation (RLE) Decoder for MPlayer |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
3 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
4 (C) 2001 Mike Melanson |
6720 | 5 8 and 16bpp support by Alex Beregszaszi |
9114 | 6 32 bpp support by Roberto Togni |
3687
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
7 */ |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
8 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
9 #include "config.h" |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
10 #include "bswap.h" |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
11 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
12 #define BE_16(x) (be2me_16(*(unsigned short *)(x))) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
13 #define BE_32(x) (be2me_32(*(unsigned int *)(x))) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
14 |
6720 | 15 void qt_decode_rle8( |
16 unsigned char *encoded, | |
17 int encoded_size, | |
18 unsigned char *decoded, | |
19 int width, | |
20 int height, | |
21 int bytes_per_pixel) | |
22 { | |
23 int stream_ptr; | |
24 int header; | |
25 int start_line; | |
26 int lines_to_change; | |
27 signed char rle_code; | |
28 int row_ptr, pixel_ptr; | |
29 int row_inc = bytes_per_pixel * width; | |
30 unsigned char pixel; | |
31 | |
32 // check if this frame is even supposed to change | |
33 if (encoded_size < 8) | |
34 return; | |
35 | |
36 // start after the chunk size | |
37 stream_ptr = 4; | |
38 | |
39 // fetch the header | |
40 header = BE_16(&encoded[stream_ptr]); | |
41 stream_ptr += 2; | |
42 | |
43 // if a header is present, fetch additional decoding parameters | |
44 if (header & 0x0008) | |
45 { | |
46 start_line = BE_16(&encoded[stream_ptr]); | |
47 stream_ptr += 4; | |
48 lines_to_change = BE_16(&encoded[stream_ptr]); | |
49 stream_ptr += 4; | |
50 } | |
51 else | |
52 { | |
53 start_line = 0; | |
54 lines_to_change = height; | |
55 } | |
56 | |
57 row_ptr = row_inc * start_line; | |
58 while (lines_to_change--) | |
59 { | |
60 pixel_ptr = row_ptr + ((encoded[stream_ptr++] - 1) * bytes_per_pixel); | |
61 | |
62 while (stream_ptr < encoded_size && | |
63 (rle_code = (signed char)encoded[stream_ptr++]) != -1) | |
64 { | |
65 if (rle_code == 0) | |
66 // there's another skip code in the stream | |
67 pixel_ptr += ((encoded[stream_ptr++] - 1) * bytes_per_pixel); | |
68 else if (rle_code < 0) | |
69 { | |
70 // decode the run length code | |
71 rle_code = -rle_code; | |
72 pixel = encoded[stream_ptr++]; | |
73 while (rle_code--) | |
74 { | |
75 decoded[pixel_ptr++] = pixel; | |
76 } | |
77 } | |
78 else | |
79 { | |
80 // copy pixels directly to output | |
81 while (rle_code--) | |
82 { | |
83 decoded[pixel_ptr++] = encoded[stream_ptr + 0]; | |
84 stream_ptr += 1; | |
85 } | |
86 } | |
87 } | |
88 | |
89 row_ptr += row_inc; | |
90 } | |
91 } | |
92 | |
93 void qt_decode_rle16( | |
94 unsigned char *encoded, | |
95 int encoded_size, | |
96 unsigned char *decoded, | |
97 int width, | |
98 int height, | |
99 int bytes_per_pixel) | |
100 { | |
101 int stream_ptr; | |
102 int header; | |
103 int start_line; | |
104 int lines_to_change; | |
105 signed char rle_code; | |
106 int row_ptr, pixel_ptr; | |
107 int row_inc = bytes_per_pixel * width; | |
108 unsigned char p1, p2; | |
109 | |
110 // check if this frame is even supposed to change | |
111 if (encoded_size < 8) | |
112 return; | |
113 | |
114 // start after the chunk size | |
115 stream_ptr = 4; | |
116 | |
117 // fetch the header | |
118 header = BE_16(&encoded[stream_ptr]); | |
119 stream_ptr += 2; | |
120 | |
121 // if a header is present, fetch additional decoding parameters | |
122 if (header & 0x0008) | |
123 { | |
124 start_line = BE_16(&encoded[stream_ptr]); | |
125 stream_ptr += 4; | |
126 lines_to_change = BE_16(&encoded[stream_ptr]); | |
127 stream_ptr += 4; | |
128 } | |
129 else | |
130 { | |
131 start_line = 0; | |
132 lines_to_change = height; | |
133 } | |
134 | |
135 row_ptr = row_inc * start_line; | |
136 while (lines_to_change--) | |
137 { | |
138 pixel_ptr = row_ptr + ((encoded[stream_ptr++] - 1) * bytes_per_pixel); | |
139 | |
140 while (stream_ptr < encoded_size && | |
141 (rle_code = (signed char)encoded[stream_ptr++]) != -1) | |
142 { | |
143 if (rle_code == 0) | |
144 // there's another skip code in the stream | |
145 pixel_ptr += ((encoded[stream_ptr++] - 1) * bytes_per_pixel); | |
146 else if (rle_code < 0) | |
147 { | |
148 // decode the run length code | |
149 rle_code = -rle_code; | |
150 p1 = encoded[stream_ptr++]; | |
151 p2 = encoded[stream_ptr++]; | |
152 while (rle_code--) | |
153 { | |
154 decoded[pixel_ptr++] = p2; | |
155 decoded[pixel_ptr++] = p1; | |
156 } | |
157 } | |
158 else | |
159 { | |
160 // copy pixels directly to output | |
161 while (rle_code--) | |
162 { | |
163 decoded[pixel_ptr++] = encoded[stream_ptr + 1]; | |
164 decoded[pixel_ptr++] = encoded[stream_ptr + 0]; | |
165 stream_ptr += 2; | |
166 } | |
167 } | |
168 } | |
169 | |
170 row_ptr += row_inc; | |
171 } | |
172 } | |
3687
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
173 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
174 void qt_decode_rle24( |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
175 unsigned char *encoded, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
176 int encoded_size, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
177 unsigned char *decoded, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
178 int width, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
179 int height, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
180 int bytes_per_pixel) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
181 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
182 int stream_ptr; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
183 int header; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
184 int start_line; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
185 int lines_to_change; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
186 signed char rle_code; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
187 int row_ptr, pixel_ptr; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
188 int row_inc = bytes_per_pixel * width; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
189 unsigned char r, g, b; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
190 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
191 // check if this frame is even supposed to change |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
192 if (encoded_size < 8) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
193 return; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
194 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
195 // start after the chunk size |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
196 stream_ptr = 4; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
197 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
198 // fetch the header |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
199 header = BE_16(&encoded[stream_ptr]); |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
200 stream_ptr += 2; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
201 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
202 // if a header is present, fetch additional decoding parameters |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
203 if (header & 0x0008) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
204 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
205 start_line = BE_16(&encoded[stream_ptr]); |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
206 stream_ptr += 4; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
207 lines_to_change = BE_16(&encoded[stream_ptr]); |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
208 stream_ptr += 4; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
209 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
210 else |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
211 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
212 start_line = 0; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
213 lines_to_change = height; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
214 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
215 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
216 row_ptr = row_inc * start_line; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
217 while (lines_to_change--) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
218 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
219 pixel_ptr = row_ptr + ((encoded[stream_ptr++] - 1) * bytes_per_pixel); |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
220 |
6656 | 221 while (stream_ptr < encoded_size && |
222 (rle_code = (signed char)encoded[stream_ptr++]) != -1) | |
3687
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
223 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
224 if (rle_code == 0) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
225 // there's another skip code in the stream |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
226 pixel_ptr += ((encoded[stream_ptr++] - 1) * bytes_per_pixel); |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
227 else if (rle_code < 0) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
228 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
229 // decode the run length code |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
230 rle_code = -rle_code; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
231 r = encoded[stream_ptr++]; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
232 g = encoded[stream_ptr++]; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
233 b = encoded[stream_ptr++]; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
234 while (rle_code--) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
235 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
236 decoded[pixel_ptr++] = b; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
237 decoded[pixel_ptr++] = g; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
238 decoded[pixel_ptr++] = r; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
239 if (bytes_per_pixel == 4) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
240 pixel_ptr++; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
241 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
242 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
243 else |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
244 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
245 // copy pixels directly to output |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
246 while (rle_code--) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
247 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
248 decoded[pixel_ptr++] = encoded[stream_ptr + 2]; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
249 decoded[pixel_ptr++] = encoded[stream_ptr + 1]; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
250 decoded[pixel_ptr++] = encoded[stream_ptr + 0]; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
251 stream_ptr += 3; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
252 if (bytes_per_pixel == 4) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
253 pixel_ptr++; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
254 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
255 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
256 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
257 |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
258 row_ptr += row_inc; |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
259 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
260 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
261 |
9114 | 262 void qt_decode_rle32( |
263 unsigned char *encoded, | |
264 int encoded_size, | |
265 unsigned char *decoded, | |
266 int width, | |
267 int height, | |
268 int bytes_per_pixel) | |
269 { | |
270 int stream_ptr; | |
271 int header; | |
272 int start_line; | |
273 int lines_to_change; | |
274 signed char rle_code; | |
275 int row_ptr, pixel_ptr; | |
276 int row_inc = bytes_per_pixel * width; | |
277 unsigned char r, g, b; | |
278 | |
279 // check if this frame is even supposed to change | |
280 if (encoded_size < 8) | |
281 return; | |
282 | |
283 // start after the chunk size | |
284 stream_ptr = 4; | |
285 | |
286 // fetch the header | |
287 header = BE_16(&encoded[stream_ptr]); | |
288 stream_ptr += 2; | |
289 | |
290 // if a header is present, fetch additional decoding parameters | |
291 if (header & 0x0008) | |
292 { | |
293 start_line = BE_16(&encoded[stream_ptr]); | |
294 stream_ptr += 4; | |
295 lines_to_change = BE_16(&encoded[stream_ptr]); | |
296 stream_ptr += 4; | |
297 } | |
298 else | |
299 { | |
300 start_line = 0; | |
301 lines_to_change = height; | |
302 } | |
303 | |
304 row_ptr = row_inc * start_line; | |
305 while (lines_to_change--) | |
306 { | |
307 pixel_ptr = row_ptr + ((encoded[stream_ptr++] - 1) * bytes_per_pixel); | |
308 | |
309 while (stream_ptr < encoded_size && | |
310 (rle_code = (signed char)encoded[stream_ptr++]) != -1) | |
311 { | |
312 if (rle_code == 0) | |
313 // there's another skip code in the stream | |
314 pixel_ptr += ((encoded[stream_ptr++] - 1) * bytes_per_pixel); | |
315 else if (rle_code < 0) | |
316 { | |
317 // decode the run length code | |
318 rle_code = -rle_code; | |
319 stream_ptr++; // Ignore alpha channel | |
320 r = encoded[stream_ptr++]; | |
321 g = encoded[stream_ptr++]; | |
322 b = encoded[stream_ptr++]; | |
323 while (rle_code--) | |
324 { | |
325 decoded[pixel_ptr++] = b; | |
326 decoded[pixel_ptr++] = g; | |
327 decoded[pixel_ptr++] = r; | |
328 if (bytes_per_pixel == 4) | |
329 pixel_ptr++; | |
330 } | |
331 } | |
332 else | |
333 { | |
334 // copy pixels directly to output | |
335 while (rle_code--) | |
336 { | |
337 stream_ptr++; // Ignore alpha channel | |
338 decoded[pixel_ptr++] = encoded[stream_ptr + 2]; | |
339 decoded[pixel_ptr++] = encoded[stream_ptr + 1]; | |
340 decoded[pixel_ptr++] = encoded[stream_ptr + 0]; | |
341 stream_ptr += 3; | |
342 if (bytes_per_pixel == 4) | |
343 pixel_ptr++; | |
344 } | |
345 } | |
346 } | |
347 | |
348 row_ptr += row_inc; | |
349 } | |
350 } | |
351 | |
3687
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
352 void qt_decode_rle( |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
353 unsigned char *encoded, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
354 int encoded_size, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
355 unsigned char *decoded, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
356 int width, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
357 int height, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
358 int encoded_bpp, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
359 int bytes_per_pixel) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
360 { |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
361 switch (encoded_bpp) |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
362 { |
6720 | 363 case 8: |
364 qt_decode_rle8( | |
365 encoded, | |
366 encoded_size, | |
367 decoded, | |
368 width, | |
369 height, | |
370 bytes_per_pixel); | |
371 break; | |
372 case 16: | |
373 qt_decode_rle16( | |
374 encoded, | |
375 encoded_size, | |
376 decoded, | |
377 width, | |
378 height, | |
379 bytes_per_pixel); | |
380 break; | |
3687
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
381 case 24: |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
382 qt_decode_rle24( |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
383 encoded, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
384 encoded_size, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
385 decoded, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
386 width, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
387 height, |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
388 bytes_per_pixel); |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
389 break; |
9114 | 390 case 32: |
391 qt_decode_rle32( | |
392 encoded, | |
393 encoded_size, | |
394 decoded, | |
395 width, | |
396 height, | |
397 bytes_per_pixel); | |
398 break; | |
3687
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
399 } |
7fb817c9060b
This commit adds initial support for Quicktime Animation (RLE) video. It
melanson
parents:
diff
changeset
|
400 } |