75 #define HUFFMAN_TABLE_SIZE (64 * 1024)
114 if ((number == 0) || (number > 1024))
119 if ((number == 0) || (number > 1024))
124 if ((number != 0) && ((number < 8000) | (number > 48000)))
147 unsigned int sample_rate, bytes_per_sample, channels;
187 st->
codec->
bit_rate = sample_rate * bytes_per_sample * 8 * channels;
189 if (bytes_per_sample == 1)
194 if (sample_rate % 14 != 0) {
196 bytes_per_sample * channels;
198 bytes_per_sample * channels;
201 (sample_rate / 14) * bytes_per_sample * channels;
218 unsigned int chunk_size;
223 unsigned char r,
g,
b;
224 unsigned char palette_buffer[768];
234 }
else if (command == 1) {
236 if (
avio_read(pb, palette_buffer, 768) != 768)
240 for (i = 0; i < 768; i++)
241 if (palette_buffer[i] > 63) {
246 for (i = 0; i < 256; i++) {
247 r = palette_buffer[i * 3 ] << palette_scale;
248 g = palette_buffer[i * 3 + 1] << palette_scale;
249 b = palette_buffer[i * 3 + 2] << palette_scale;
250 palette[i] = (0xFF
U << 24) | (r << 16) | (g << 8) | (b);
251 if (palette_scale == 2)
252 palette[i] |= palette[i] >> 6 & 0x30303;