27 #define LXF_PACKET_HEADER_SIZE 60
28 #define LXF_HEADER_DATA_SIZE 120
29 #define LXF_IDENT "LEITCH\0"
30 #define LXF_IDENT_LENGTH 8
31 #define LXF_SAMPLERATE 48000
32 #define LXF_MAX_AUDIO_PACKET (8008*15*4)
120 if ((ret =
sync(s, header)) < 0)
133 *format =
AV_RL32(&header[32]);
137 switch (
AV_RL32(&header[16])) {
142 (int64_t)(uint32_t)
AV_RL32(&header[52]));
153 *format =
AV_RL32(&header[40]);
168 "only 16-, 20-, 24- and 32-bit PCM currently supported\n");
172 track_size =
AV_RL32(&header[48]);
183 "video doesn't seem to be PAL or NTSC. guessing PAL\n");
189 ret = av_popcount(
AV_RL32(&header[44])) * track_size;
206 uint32_t format, video_params, disk_params;
207 uint16_t record_date, expiration_date;
225 video_params =
AV_RL32(&header_data[40]);
226 record_date =
AV_RL16(&header_data[56]);
227 expiration_date =
AV_RL16(&header_data[58]);
228 disk_params =
AV_RL32(&header_data[116]);
231 st->
codec->
bit_rate = 1000000 * ((video_params >> 14) & 0xFF);
236 record_date, 1900 + (record_date & 0x7F), (record_date >> 7) & 0xF,
237 (record_date >> 11) & 0x1F);
240 expiration_date, 1900 + (expiration_date & 0x7F), (expiration_date >> 7) & 0xF,
241 (expiration_date >> 11) & 0x1F);
243 if ((video_params >> 22) & 1)
246 if ((lxf->
channels = (disk_params >> 2) & 0xF)) {
276 for (z = i = 0; z < lxf->
channels; z++)
277 for (y = 0; y < bytes / bytes_per_sample / lxf->
channels; y++)
278 for (x = 0; x < bytes_per_sample; x++, i++)
279 out[x + bytes_per_sample*(z + y*lxf->
channels)] = lxf->
temp[i];
288 uint32_t stream, format;
301 if (stream == 1 && !(ast = s->
streams[1])) {
319 if ((ret2 =
avio_read(pb, buf, ret)) != ret) {
331 if (((format >> 22) & 0x3) < 2)