42 #define ID_8SVX MKTAG('8','S','V','X')
43 #define ID_16SV MKTAG('1','6','S','V')
44 #define ID_MAUD MKTAG('M','A','U','D')
45 #define ID_MHDR MKTAG('M','H','D','R')
46 #define ID_MDAT MKTAG('M','D','A','T')
47 #define ID_VHDR MKTAG('V','H','D','R')
48 #define ID_ATAK MKTAG('A','T','A','K')
49 #define ID_RLSE MKTAG('R','L','S','E')
50 #define ID_CHAN MKTAG('C','H','A','N')
51 #define ID_PBM MKTAG('P','B','M',' ')
52 #define ID_ILBM MKTAG('I','L','B','M')
53 #define ID_BMHD MKTAG('B','M','H','D')
54 #define ID_DGBL MKTAG('D','G','B','L')
55 #define ID_CAMG MKTAG('C','A','M','G')
56 #define ID_CMAP MKTAG('C','M','A','P')
57 #define ID_ACBM MKTAG('A','C','B','M')
58 #define ID_DEEP MKTAG('D','E','E','P')
59 #define ID_RGB8 MKTAG('R','G','B','8')
60 #define ID_RGBN MKTAG('R','G','B','N')
61 #define ID_DSD MKTAG('D','S','D',' ')
63 #define ID_FORM MKTAG('F','O','R','M')
64 #define ID_FRM8 MKTAG('F','R','M','8')
65 #define ID_ANNO MKTAG('A','N','N','O')
66 #define ID_AUTH MKTAG('A','U','T','H')
67 #define ID_CHRS MKTAG('C','H','R','S')
68 #define ID_COPYRIGHT MKTAG('(','c',')',' ')
69 #define ID_CSET MKTAG('C','S','E','T')
70 #define ID_FVER MKTAG('F','V','E','R')
71 #define ID_NAME MKTAG('N','A','M','E')
72 #define ID_TEXT MKTAG('T','E','X','T')
73 #define ID_ABIT MKTAG('A','B','I','T')
74 #define ID_BODY MKTAG('B','O','D','Y')
75 #define ID_DBOD MKTAG('D','B','O','D')
76 #define ID_DPEL MKTAG('D','P','E','L')
77 #define ID_DLOC MKTAG('D','L','O','C')
78 #define ID_TVDC MKTAG('T','V','D','C')
92 #define IFF_EXTRA_VIDEO_SIZE 41
119 const char *
const tag,
120 const unsigned data_size)
127 if (
avio_read(s->
pb, buf, data_size) != data_size) {
162 #define DSD_SLFT MKTAG('S','L','F','T')
163 #define DSD_SRGT MKTAG('S','R','G','T')
164 #define DSD_MLFT MKTAG('M','L','F','T')
165 #define DSD_MRGT MKTAG('M','R','G','T')
166 #define DSD_C MKTAG('C',' ',' ',' ')
167 #define DSD_LS MKTAG('L','S',' ',' ')
168 #define DSD_RS MKTAG('R','S',' ',' ')
169 #define DSD_LFE MKTAG('L','F','E',' ')
193 "dsd_source_comment",
194 "analogue_source_comment",
195 "pcm_source_comment",
214 const char * metadata_tag = NULL;
217 case MKTAG(
'D',
'I',
'A',
'R'): metadata_tag =
"artist";
break;
218 case MKTAG(
'D',
'I',
'T',
'I'): metadata_tag =
"title";
break;
221 if (metadata_tag && size > 4) {
250 case MKTAG(
'A',
'B',
'S',
'S'):
256 snprintf(abss,
sizeof(abss),
"%02dh:%02dm:%02ds:%d", hour, min, sec,
avio_rb32(pb));
260 case MKTAG(
'C',
'H',
'N',
'L'):
283 case MKTAG(
'C',
'M',
'P',
'R'):
289 case MKTAG(
'F',
'S',
' ',
' '):
295 case MKTAG(
'I',
'D',
'3',
' '):
296 id3v2_extra_meta = NULL;
298 if (id3v2_extra_meta) {
312 case MKTAG(
'L',
'S',
'C',
'O'):
316 if (config != 0xFFFF) {
331 static const uint8_t deep_rgb24[] = {0, 0, 0, 3, 0, 1, 0, 8, 0, 2, 0, 8, 0, 3, 0, 8};
332 static const uint8_t deep_rgba[] = {0, 0, 0, 4, 0, 1, 0, 8, 0, 2, 0, 8, 0, 3, 0, 8};
333 static const uint8_t deep_bgra[] = {0, 0, 0, 4, 0, 3, 0, 8, 0, 2, 0, 8, 0, 1, 0, 8};
334 static const uint8_t deep_argb[] = {0, 0, 0, 4, 0,17, 0, 8, 0, 1, 0, 8, 0, 2, 0, 8};
335 static const uint8_t deep_abgr[] = {0, 0, 0, 4, 0,17, 0, 8, 0, 3, 0, 8, 0, 2, 0, 8};
345 uint32_t screenmode = 0, num, den;
346 unsigned transparency = 0;
347 unsigned masking = 0;
369 const char *metadata_tag = NULL;
383 if (data_size >= 16) {
440 if (data_size < 3 || data_size > 768 || data_size % 3) {
465 if (data_size >= 14) {
469 if (data_size >= 16) {
476 if (data_size < 4 || (data_size & 3))
478 if ((fmt_size =
avio_read(pb, fmt,
sizeof(fmt))) < 0)
516 if (data_size <
sizeof(iff->
tvdc))
524 case ID_TEXT: metadata_tag =
"comment";
break;
525 case ID_AUTH: metadata_tag =
"artist";
break;
527 case ID_NAME: metadata_tag =
"title";
break;
531 case MKTAG(
'F',
'V',
'E',
'R'):
535 av_log(s,
AV_LOG_DEBUG,
"DSIFF v%d.%d.%d.%d\n",version >> 24, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
539 case MKTAG(
'D',
'I',
'I',
'N'):
545 case MKTAG(
'P',
'R',
'O',
'P'):
557 case MKTAG(
'C',
'O',
'M',
'T'):
561 for (i = 0; i < nb_comments; i++) {
562 int year, mon, day, hour,
min,
type, ref;
572 snprintf(tmp,
sizeof(tmp),
"%04d-%02d-%02d %02d:%02d", year, mon, day, hour, min);
580 tag =
"channel_comment";
582 snprintf(tmp,
sizeof(tmp),
"channel%d_comment", ref);
602 if (metadata_size & 1)
609 if ((res =
get_metadata(s, metadata_tag, data_size)) < 0) {
663 if ((screenmode & 0x800 ) && iff->
bpp <= 8) {
664 iff->
ham = iff->
bpp > 6 ? 6 : 4;
667 iff->
flags = (screenmode & 0x80 ) && iff->
bpp <= 8;
681 bytestream_put_byte(&buf, iff->
bpp);
682 bytestream_put_byte(&buf, iff->
ham);
683 bytestream_put_byte(&buf, iff->
flags);
685 bytestream_put_byte(&buf, iff->
masking);
722 bytestream_put_be16(&buf, 2);
726 }
else if (ret < iff->body_size)