annotate id3v1.c @ 5023:602c5cd5a1a3 libavformat

Associate the 0x6c75 TwoCC used in certain Kodak cameras to the PCM Mu-law decoder. Fixes Issue 1178.
author jai_menon
date Fri, 12 Jun 2009 13:21:01 +0000
parents 1763f7d0d8d0
children 9ed3c88ed9ba
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
885
da1d5db0ce5c COSMETICS: Remove all trailing whitespace.
diego
parents: 858
diff changeset
1 /*
5016
eb6dd7717805 Move id3v2 parsing code from mp3.c to id3v2.h and id3v2.c.
diego
parents: 4900
diff changeset
2 * ID3v1 header parser
4251
77e0c7511d41 cosmetics: Remove pointless period after copyright statement non-sentences.
diego
parents: 4221
diff changeset
3 * Copyright (c) 2003 Fabrice Bellard
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
4 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
5 * This file is part of FFmpeg.
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
6 *
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
11 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
15 * Lesser General Public License for more details.
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
16 *
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1321
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
896
edbe5c3717f9 Update licensing information: The FSF changed postal address.
diego
parents: 885
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
20 */
3286
6f61c3b36632 Use full path for #includes from another directory.
diego
parents: 3278
diff changeset
21
5016
eb6dd7717805 Move id3v2 parsing code from mp3.c to id3v2.h and id3v2.c.
diego
parents: 4900
diff changeset
22 #include "id3v1.h"
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
23
5016
eb6dd7717805 Move id3v2 parsing code from mp3.c to id3v2.h and id3v2.c.
diego
parents: 4900
diff changeset
24 const char *ff_id3v1_genre_str[ID3v1_GENRE_MAX + 1] = {
5017
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
25 [0] = "Blues",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
26 [1] = "Classic Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
27 [2] = "Country",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
28 [3] = "Dance",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
29 [4] = "Disco",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
30 [5] = "Funk",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
31 [6] = "Grunge",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
32 [7] = "Hip-Hop",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
33 [8] = "Jazz",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
34 [9] = "Metal",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
35 [10] = "New Age",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
36 [11] = "Oldies",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
37 [12] = "Other",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
38 [13] = "Pop",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
39 [14] = "R&B",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
40 [15] = "Rap",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
41 [16] = "Reggae",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
42 [17] = "Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
43 [18] = "Techno",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
44 [19] = "Industrial",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
45 [20] = "Alternative",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
46 [21] = "Ska",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
47 [22] = "Death Metal",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
48 [23] = "Pranks",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
49 [24] = "Soundtrack",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
50 [25] = "Euro-Techno",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
51 [26] = "Ambient",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
52 [27] = "Trip-Hop",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
53 [28] = "Vocal",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
54 [29] = "Jazz+Funk",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
55 [30] = "Fusion",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
56 [31] = "Trance",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
57 [32] = "Classical",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
58 [33] = "Instrumental",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
59 [34] = "Acid",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
60 [35] = "House",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
61 [36] = "Game",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
62 [37] = "Sound Clip",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
63 [38] = "Gospel",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
64 [39] = "Noise",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
65 [40] = "AlternRock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
66 [41] = "Bass",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
67 [42] = "Soul",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
68 [43] = "Punk",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
69 [44] = "Space",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
70 [45] = "Meditative",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
71 [46] = "Instrumental Pop",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
72 [47] = "Instrumental Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
73 [48] = "Ethnic",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
74 [49] = "Gothic",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
75 [50] = "Darkwave",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
76 [51] = "Techno-Industrial",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
77 [52] = "Electronic",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
78 [53] = "Pop-Folk",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
79 [54] = "Eurodance",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
80 [55] = "Dream",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
81 [56] = "Southern Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
82 [57] = "Comedy",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
83 [58] = "Cult",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
84 [59] = "Gangsta",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
85 [60] = "Top 40",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
86 [61] = "Christian Rap",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
87 [62] = "Pop/Funk",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
88 [63] = "Jungle",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
89 [64] = "Native American",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
90 [65] = "Cabaret",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
91 [66] = "New Wave",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
92 [67] = "Psychadelic",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
93 [68] = "Rave",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
94 [69] = "Showtunes",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
95 [70] = "Trailer",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
96 [71] = "Lo-Fi",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
97 [72] = "Tribal",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
98 [73] = "Acid Punk",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
99 [74] = "Acid Jazz",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
100 [75] = "Polka",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
101 [76] = "Retro",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
102 [77] = "Musical",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
103 [78] = "Rock & Roll",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
104 [79] = "Hard Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
105 [80] = "Folk",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
106 [81] = "Folk-Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
107 [82] = "National Folk",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
108 [83] = "Swing",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
109 [84] = "Fast Fusion",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
110 [85] = "Bebob",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
111 [86] = "Latin",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
112 [87] = "Revival",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
113 [88] = "Celtic",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
114 [89] = "Bluegrass",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
115 [90] = "Avantgarde",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
116 [91] = "Gothic Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
117 [92] = "Progressive Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
118 [93] = "Psychedelic Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
119 [94] = "Symphonic Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
120 [95] = "Slow Rock",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
121 [96] = "Big Band",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
122 [97] = "Chorus",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
123 [98] = "Easy Listening",
1763f7d0d8d0 cosmetics: Reformat to K&R and prettyprint newly created files.
diego
parents: 5016
diff changeset
124 [99] = "Acoustic",
234
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
125 [100] = "Humour",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
126 [101] = "Speech",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
127 [102] = "Chanson",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
128 [103] = "Opera",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
129 [104] = "Chamber Music",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
130 [105] = "Sonata",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
131 [106] = "Symphony",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
132 [107] = "Booty Bass",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
133 [108] = "Primus",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
134 [109] = "Porn Groove",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
135 [110] = "Satire",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
136 [111] = "Slow Jam",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
137 [112] = "Club",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
138 [113] = "Tango",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
139 [114] = "Samba",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
140 [115] = "Folklore",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
141 [116] = "Ballad",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
142 [117] = "Power Ballad",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
143 [118] = "Rhythmic Soul",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
144 [119] = "Freestyle",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
145 [120] = "Duet",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
146 [121] = "Punk Rock",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
147 [122] = "Drum Solo",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
148 [123] = "A capella",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
149 [124] = "Euro-House",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
150 [125] = "Dance Hall",
b99548e3ab84 ID3 parsing and generation in MP3 format
bellard
parents:
diff changeset
151 };