annotate pixdesc.c @ 9078:2692e0a168cf libavcodec

Reindent after last commit
author vitor
date Sun, 01 Mar 2009 11:16:57 +0000
parents 47e456d3f15b
children b0230a690eda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9018
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
1 /*
9043
47e456d3f15b spelling/wording/grammar cosmetics
diego
parents: 9018
diff changeset
2 * pixel format descriptor
9018
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
3 * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at>
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
4 *
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
5 * This file is part of FFmpeg.
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
6 *
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
11 *
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
15 * Lesser General Public License for more details.
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
16 *
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
20 */
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
21
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
22 #include "libavutil/pixfmt.h"
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
23 #include "pixdesc.h"
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
24
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
25 static const AVPixFmtDescriptor pix_fmt_desc[PIX_FMT_NB] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
26 [PIX_FMT_YUV422P] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
27 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
28 .log2_chroma_w= 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
29 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
30 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
31 {0,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
32 {1,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
33 {2,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
34 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
35 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
36 [PIX_FMT_YUV420P] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
37 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
38 .log2_chroma_w= 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
39 .log2_chroma_h= 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
40 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
41 {0,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
42 {1,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
43 {2,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
44 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
45 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
46 [PIX_FMT_YUV410P] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
47 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
48 .log2_chroma_w= 2,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
49 .log2_chroma_h= 2,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
50 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
51 {0,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
52 {1,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
53 {2,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
54 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
55 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
56 [PIX_FMT_NV12] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
57 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
58 .log2_chroma_w= 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
59 .log2_chroma_h= 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
60 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
61 {0,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
62 {1,1,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
63 {1,1,2,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
64 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
65 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
66 [PIX_FMT_YUYV422] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
67 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
68 .log2_chroma_w= 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
69 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
70 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
71 {0,1,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
72 {0,3,2,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
73 {0,3,4,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
74 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
75 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
76 [PIX_FMT_UYVY422] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
77 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
78 .log2_chroma_w= 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
79 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
80 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
81 {0,1,2,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
82 {0,3,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
83 {0,3,3,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
84 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
85 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
86 [PIX_FMT_GRAY16LE] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
87 .nb_channels = 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
88 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
89 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
90 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
91 {0,1,1,0,15},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
92 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
93 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
94 [PIX_FMT_GRAY16BE] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
95 .nb_channels = 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
96 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
97 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
98 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
99 {0,1,1,0,15},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
100 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
101 .flags = PIX_FMT_BE,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
102 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
103 [PIX_FMT_RGB24] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
104 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
105 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
106 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
107 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
108 {0,2,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
109 {0,2,2,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
110 {0,2,3,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
111 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
112 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
113 [PIX_FMT_RGBA] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
114 .nb_channels = 4,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
115 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
116 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
117 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
118 {0,3,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
119 {0,3,2,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
120 {0,3,3,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
121 {0,3,4,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
122 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
123 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
124 [PIX_FMT_RGB48LE] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
125 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
126 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
127 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
128 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
129 {0,5,1,0,15},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
130 {0,5,3,0,15},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
131 {0,5,5,0,15},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
132 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
133 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
134 [PIX_FMT_RGB48BE] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
135 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
136 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
137 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
138 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
139 {0,5,1,0,15},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
140 {0,5,3,0,15},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
141 {0,5,5,0,15},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
142 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
143 .flags = PIX_FMT_BE,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
144 },
9043
47e456d3f15b spelling/wording/grammar cosmetics
diego
parents: 9018
diff changeset
145 //FIXME change pix fmt defines so that we have a LE & BE instead of a native-endian
9018
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
146 #if 0
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
147 [PIX_FMT_RGB565_LE] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
148 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
149 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
150 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
151 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
152 {0,1,1,0,4},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
153 {0,1,1,5,5},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
154 {0,1,2,3,4},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
155 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
156 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
157 [PIX_FMT_RGB565_BE] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
158 .nb_channels = 3,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
159 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
160 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
161 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
162 {0,1,1, 0,4},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
163 {0,1,1, 5,5},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
164 {0,1,0, 3,4},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
165 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
166 .flags = PIX_FMT_BE,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
167 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
168 #endif
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
169 [PIX_FMT_MONOBLACK] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
170 .nb_channels = 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
171 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
172 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
173 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
174 {0,0,1,7,0},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
175 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
176 .flags = PIX_FMT_BITSTREAM,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
177 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
178 [PIX_FMT_PAL8] = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
179 .nb_channels = 1,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
180 .log2_chroma_w= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
181 .log2_chroma_h= 0,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
182 .comp = {
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
183 {0,0,1,0,7},
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
184 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
185 .flags = PIX_FMT_PAL,
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
186 },
98995efdf3aa Pixel Format descriptor, try #1.
michael
parents:
diff changeset
187 };