26 #define LXF_PACKET_HEADER_SIZE 60
27 #define LXF_HEADER_DATA_SIZE 120
28 #define LXF_IDENT "LEITCH\0"
29 #define LXF_IDENT_LENGTH 8
30 #define LXF_SAMPLERATE 48000
31 #define LXF_MAX_AUDIO_PACKET (8008*15*4)
119 if ((ret =
sync(s, header)) < 0)
132 *format =
AV_RL32(&header[32]);
136 switch (
AV_RL32(&header[16])) {
141 (int64_t)(uint32_t)
AV_RL32(&header[52]));
152 *format =
AV_RL32(&header[40]);
167 "only 16-, 20-, 24- and 32-bit PCM currently supported\n");
171 track_size =
AV_RL32(&header[48]);
182 "video doesn't seem to be PAL or NTSC. guessing PAL\n");
188 ret = av_popcount(
AV_RL32(&header[44])) * track_size;
205 uint32_t format, video_params, disk_params;
206 uint16_t record_date, expiration_date;
224 video_params =
AV_RL32(&header_data[40]);
225 record_date =
AV_RL16(&header_data[56]);
226 expiration_date =
AV_RL16(&header_data[58]);
227 disk_params =
AV_RL32(&header_data[116]);
230 st->
codec->
bit_rate = 1000000 * ((video_params >> 14) & 0xFF);
235 record_date, 1900 + (record_date & 0x7F), (record_date >> 7) & 0xF,
236 (record_date >> 11) & 0x1F);
239 expiration_date, 1900 + (expiration_date & 0x7F), (expiration_date >> 7) & 0xF,
240 (expiration_date >> 11) & 0x1F);
242 if ((video_params >> 22) & 1)
245 if ((lxf->
channels = (disk_params >> 2) & 0xF)) {
275 for (z = i = 0; z < lxf->
channels; z++)
276 for (y = 0; y < bytes / bytes_per_sample / lxf->
channels; y++)
277 for (x = 0; x < bytes_per_sample; x++, i++)
278 out[x + bytes_per_sample*(z + y*lxf->
channels)] = lxf->
temp[i];
287 uint32_t stream, format;
300 if (stream == 1 && !(ast = s->
streams[1])) {
318 if ((ret2 =
avio_read(pb, buf, ret)) != ret) {
330 if (((format >> 22) & 0x3) < 2)