annotate libmpcodecs/native/qtrle.c @ 9403:d828cd1c219b

more translation
author gabucino
date Tue, 11 Feb 2003 21:19:13 +0000
parents 306ea9a02ebe
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
5 8 and 16bpp support by Alex Beregszaszi
9114
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
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
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
15 void qt_decode_rle8(
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
16 unsigned char *encoded,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
17 int encoded_size,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
18 unsigned char *decoded,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
19 int width,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
20 int height,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
21 int bytes_per_pixel)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
22 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
23 int stream_ptr;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
24 int header;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
25 int start_line;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
26 int lines_to_change;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
27 signed char rle_code;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
28 int row_ptr, pixel_ptr;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
29 int row_inc = bytes_per_pixel * width;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
30 unsigned char pixel;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
31
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
32 // check if this frame is even supposed to change
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
33 if (encoded_size < 8)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
34 return;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
35
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
36 // start after the chunk size
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
37 stream_ptr = 4;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
38
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
39 // fetch the header
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
40 header = BE_16(&encoded[stream_ptr]);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
41 stream_ptr += 2;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
42
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
43 // if a header is present, fetch additional decoding parameters
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
44 if (header & 0x0008)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
45 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
46 start_line = BE_16(&encoded[stream_ptr]);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
47 stream_ptr += 4;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
48 lines_to_change = BE_16(&encoded[stream_ptr]);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
49 stream_ptr += 4;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
50 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
51 else
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
52 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
53 start_line = 0;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
54 lines_to_change = height;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
55 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
56
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
57 row_ptr = row_inc * start_line;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
58 while (lines_to_change--)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
59 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
60 pixel_ptr = row_ptr + ((encoded[stream_ptr++] - 1) * bytes_per_pixel);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
61
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
62 while (stream_ptr < encoded_size &&
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
63 (rle_code = (signed char)encoded[stream_ptr++]) != -1)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
64 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
65 if (rle_code == 0)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
66 // there's another skip code in the stream
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
67 pixel_ptr += ((encoded[stream_ptr++] - 1) * bytes_per_pixel);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
68 else if (rle_code < 0)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
69 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
70 // decode the run length code
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
71 rle_code = -rle_code;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
72 pixel = encoded[stream_ptr++];
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
73 while (rle_code--)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
74 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
75 decoded[pixel_ptr++] = pixel;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
76 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
77 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
78 else
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
79 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
80 // copy pixels directly to output
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
81 while (rle_code--)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
82 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
83 decoded[pixel_ptr++] = encoded[stream_ptr + 0];
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
84 stream_ptr += 1;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
85 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
86 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
87 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
88
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
89 row_ptr += row_inc;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
90 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
91 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
92
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
93 void qt_decode_rle16(
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
94 unsigned char *encoded,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
95 int encoded_size,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
96 unsigned char *decoded,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
97 int width,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
98 int height,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
99 int bytes_per_pixel)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
100 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
101 int stream_ptr;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
102 int header;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
103 int start_line;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
104 int lines_to_change;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
105 signed char rle_code;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
106 int row_ptr, pixel_ptr;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
107 int row_inc = bytes_per_pixel * width;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
108 unsigned char p1, p2;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
109
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
110 // check if this frame is even supposed to change
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
111 if (encoded_size < 8)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
112 return;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
113
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
114 // start after the chunk size
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
115 stream_ptr = 4;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
116
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
117 // fetch the header
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
118 header = BE_16(&encoded[stream_ptr]);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
119 stream_ptr += 2;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
120
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
121 // if a header is present, fetch additional decoding parameters
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
122 if (header & 0x0008)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
123 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
124 start_line = BE_16(&encoded[stream_ptr]);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
125 stream_ptr += 4;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
126 lines_to_change = BE_16(&encoded[stream_ptr]);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
127 stream_ptr += 4;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
128 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
129 else
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
130 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
131 start_line = 0;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
132 lines_to_change = height;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
133 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
134
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
135 row_ptr = row_inc * start_line;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
136 while (lines_to_change--)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
137 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
138 pixel_ptr = row_ptr + ((encoded[stream_ptr++] - 1) * bytes_per_pixel);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
139
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
140 while (stream_ptr < encoded_size &&
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
141 (rle_code = (signed char)encoded[stream_ptr++]) != -1)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
142 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
143 if (rle_code == 0)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
144 // there's another skip code in the stream
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
145 pixel_ptr += ((encoded[stream_ptr++] - 1) * bytes_per_pixel);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
146 else if (rle_code < 0)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
147 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
148 // decode the run length code
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
149 rle_code = -rle_code;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
150 p1 = encoded[stream_ptr++];
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
151 p2 = encoded[stream_ptr++];
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
152 while (rle_code--)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
153 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
154 decoded[pixel_ptr++] = p2;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
155 decoded[pixel_ptr++] = p1;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
156 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
157 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
158 else
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
159 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
160 // copy pixels directly to output
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
161 while (rle_code--)
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
162 {
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
163 decoded[pixel_ptr++] = encoded[stream_ptr + 1];
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
164 decoded[pixel_ptr++] = encoded[stream_ptr + 0];
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
165 stream_ptr += 2;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
166 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
167 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
168 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
169
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
170 row_ptr += row_inc;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
171 }
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
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
92b29c3ed0c0 bugfix by Michael.Lampe@iwr.uni-heidelberg.de
arpi
parents: 5602
diff changeset
221 while (stream_ptr < encoded_size &&
92b29c3ed0c0 bugfix by Michael.Lampe@iwr.uni-heidelberg.de
arpi
parents: 5602
diff changeset
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
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
262 void qt_decode_rle32(
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
263 unsigned char *encoded,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
264 int encoded_size,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
265 unsigned char *decoded,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
266 int width,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
267 int height,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
268 int bytes_per_pixel)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
269 {
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
270 int stream_ptr;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
271 int header;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
272 int start_line;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
273 int lines_to_change;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
274 signed char rle_code;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
275 int row_ptr, pixel_ptr;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
276 int row_inc = bytes_per_pixel * width;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
277 unsigned char r, g, b;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
278
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
279 // check if this frame is even supposed to change
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
280 if (encoded_size < 8)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
281 return;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
282
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
283 // start after the chunk size
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
284 stream_ptr = 4;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
285
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
286 // fetch the header
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
287 header = BE_16(&encoded[stream_ptr]);
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
288 stream_ptr += 2;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
289
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
290 // if a header is present, fetch additional decoding parameters
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
291 if (header & 0x0008)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
292 {
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
293 start_line = BE_16(&encoded[stream_ptr]);
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
294 stream_ptr += 4;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
295 lines_to_change = BE_16(&encoded[stream_ptr]);
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
296 stream_ptr += 4;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
297 }
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
298 else
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
299 {
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
300 start_line = 0;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
301 lines_to_change = height;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
302 }
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
303
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
304 row_ptr = row_inc * start_line;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
305 while (lines_to_change--)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
306 {
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
307 pixel_ptr = row_ptr + ((encoded[stream_ptr++] - 1) * bytes_per_pixel);
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
308
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
309 while (stream_ptr < encoded_size &&
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
310 (rle_code = (signed char)encoded[stream_ptr++]) != -1)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
311 {
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
312 if (rle_code == 0)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
313 // there's another skip code in the stream
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
314 pixel_ptr += ((encoded[stream_ptr++] - 1) * bytes_per_pixel);
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
315 else if (rle_code < 0)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
316 {
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
317 // decode the run length code
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
318 rle_code = -rle_code;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
319 stream_ptr++; // Ignore alpha channel
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
320 r = encoded[stream_ptr++];
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
321 g = encoded[stream_ptr++];
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
322 b = encoded[stream_ptr++];
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
323 while (rle_code--)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
324 {
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
325 decoded[pixel_ptr++] = b;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
326 decoded[pixel_ptr++] = g;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
327 decoded[pixel_ptr++] = r;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
328 if (bytes_per_pixel == 4)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
329 pixel_ptr++;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
330 }
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
331 }
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
332 else
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
333 {
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
334 // copy pixels directly to output
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
335 while (rle_code--)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
336 {
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
337 stream_ptr++; // Ignore alpha channel
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
338 decoded[pixel_ptr++] = encoded[stream_ptr + 2];
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
339 decoded[pixel_ptr++] = encoded[stream_ptr + 1];
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
340 decoded[pixel_ptr++] = encoded[stream_ptr + 0];
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
341 stream_ptr += 3;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
342 if (bytes_per_pixel == 4)
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
343 pixel_ptr++;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
344 }
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
345 }
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
346 }
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
347
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
348 row_ptr += row_inc;
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
349 }
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
350 }
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
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
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
363 case 8:
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
364 qt_decode_rle8(
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
365 encoded,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
366 encoded_size,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
367 decoded,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
368 width,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
369 height,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
370 bytes_per_pixel);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
371 break;
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
372 case 16:
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
373 qt_decode_rle16(
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
374 encoded,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
375 encoded_size,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
376 decoded,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
377 width,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
378 height,
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
379 bytes_per_pixel);
180e27f21ff2 8 and 16bpp qtrle support
alex
parents: 6656
diff changeset
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
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
390 case 32:
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
391 qt_decode_rle32(
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
392 encoded,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
393 encoded_size,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
394 decoded,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
395 width,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
396 height,
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
397 bytes_per_pixel);
306ea9a02ebe Quicktime rle 32 bit supported
rtognimp
parents: 6720
diff changeset
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 }