Make ipvideo_decode_block_opcode_0x8 a lot simpler by decoding the pixels
[libav.git] / libavcodec / pixdesc.c
CommitLineData
9b61d838 1/*
e0cffbe7 2 * pixel format descriptor
9b61d838
MN
3 * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#include "libavutil/pixfmt.h"
23#include "pixdesc.h"
24
d2863e72 25const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
9b61d838 26 [PIX_FMT_YUV422P] = {
1e896640 27 .name = "yuv422p",
9b61d838
MN
28 .nb_channels = 3,
29 .log2_chroma_w= 1,
30 .log2_chroma_h= 0,
31 .comp = {
32 {0,0,1,0,7},
33 {1,0,1,0,7},
34 {2,0,1,0,7},
35 },
36 },
37 [PIX_FMT_YUV420P] = {
1e896640 38 .name = "yuv420p",
9b61d838
MN
39 .nb_channels = 3,
40 .log2_chroma_w= 1,
41 .log2_chroma_h= 1,
42 .comp = {
43 {0,0,1,0,7},
44 {1,0,1,0,7},
45 {2,0,1,0,7},
46 },
47 },
48 [PIX_FMT_YUV410P] = {
1e896640 49 .name = "yuv410p",
9b61d838
MN
50 .nb_channels = 3,
51 .log2_chroma_w= 2,
52 .log2_chroma_h= 2,
53 .comp = {
54 {0,0,1,0,7},
55 {1,0,1,0,7},
56 {2,0,1,0,7},
57 },
58 },
59 [PIX_FMT_NV12] = {
1e896640 60 .name = "nv12",
9b61d838
MN
61 .nb_channels = 3,
62 .log2_chroma_w= 1,
63 .log2_chroma_h= 1,
64 .comp = {
65 {0,0,1,0,7},
66 {1,1,1,0,7},
67 {1,1,2,0,7},
68 },
69 },
70 [PIX_FMT_YUYV422] = {
1e896640 71 .name = "yuyv422",
9b61d838
MN
72 .nb_channels = 3,
73 .log2_chroma_w= 1,
74 .log2_chroma_h= 0,
75 .comp = {
76 {0,1,1,0,7},
77 {0,3,2,0,7},
78 {0,3,4,0,7},
79 },
80 },
81 [PIX_FMT_UYVY422] = {
1e896640 82 .name = "uyvy422",
9b61d838
MN
83 .nb_channels = 3,
84 .log2_chroma_w= 1,
85 .log2_chroma_h= 0,
86 .comp = {
87 {0,1,2,0,7},
88 {0,3,1,0,7},
89 {0,3,3,0,7},
90 },
91 },
92 [PIX_FMT_GRAY16LE] = {
1e896640 93 .name = "gray16le",
9b61d838
MN
94 .nb_channels = 1,
95 .log2_chroma_w= 0,
96 .log2_chroma_h= 0,
97 .comp = {
98 {0,1,1,0,15},
99 },
100 },
101 [PIX_FMT_GRAY16BE] = {
1e896640 102 .name = "gray16be",
9b61d838
MN
103 .nb_channels = 1,
104 .log2_chroma_w= 0,
105 .log2_chroma_h= 0,
106 .comp = {
107 {0,1,1,0,15},
108 },
109 .flags = PIX_FMT_BE,
110 },
111 [PIX_FMT_RGB24] = {
1e896640 112 .name = "rgb24",
9b61d838
MN
113 .nb_channels = 3,
114 .log2_chroma_w= 0,
115 .log2_chroma_h= 0,
116 .comp = {
117 {0,2,1,0,7},
118 {0,2,2,0,7},
119 {0,2,3,0,7},
120 },
121 },
122 [PIX_FMT_RGBA] = {
1e896640 123 .name = "rgba",
9b61d838
MN
124 .nb_channels = 4,
125 .log2_chroma_w= 0,
126 .log2_chroma_h= 0,
127 .comp = {
128 {0,3,1,0,7},
129 {0,3,2,0,7},
130 {0,3,3,0,7},
131 {0,3,4,0,7},
132 },
133 },
134 [PIX_FMT_RGB48LE] = {
1e896640 135 .name = "rgb48le",
9b61d838
MN
136 .nb_channels = 3,
137 .log2_chroma_w= 0,
138 .log2_chroma_h= 0,
139 .comp = {
140 {0,5,1,0,15},
141 {0,5,3,0,15},
142 {0,5,5,0,15},
143 },
144 },
145 [PIX_FMT_RGB48BE] = {
1e896640 146 .name = "rgb48be",
9b61d838
MN
147 .nb_channels = 3,
148 .log2_chroma_w= 0,
149 .log2_chroma_h= 0,
150 .comp = {
151 {0,5,1,0,15},
152 {0,5,3,0,15},
153 {0,5,5,0,15},
154 },
155 .flags = PIX_FMT_BE,
156 },
e5681ba0 157 [PIX_FMT_RGB565LE] = {
1e896640 158 .name = "rgb565le",
9b61d838
MN
159 .nb_channels = 3,
160 .log2_chroma_w= 0,
161 .log2_chroma_h= 0,
162 .comp = {
163 {0,1,1,0,4},
164 {0,1,1,5,5},
165 {0,1,2,3,4},
166 },
167 },
e5681ba0 168 [PIX_FMT_RGB565BE] = {
1e896640 169 .name = "rgb565be",
9b61d838
MN
170 .nb_channels = 3,
171 .log2_chroma_w= 0,
172 .log2_chroma_h= 0,
173 .comp = {
174 {0,1,1, 0,4},
175 {0,1,1, 5,5},
176 {0,1,0, 3,4},
177 },
178 .flags = PIX_FMT_BE,
179 },
9b61d838 180 [PIX_FMT_MONOBLACK] = {
1e896640 181 .name = "monoblack",
9b61d838
MN
182 .nb_channels = 1,
183 .log2_chroma_w= 0,
184 .log2_chroma_h= 0,
185 .comp = {
186 {0,0,1,7,0},
187 },
188 .flags = PIX_FMT_BITSTREAM,
189 },
190 [PIX_FMT_PAL8] = {
1e896640 191 .name = "pal8",
9b61d838
MN
192 .nb_channels = 1,
193 .log2_chroma_w= 0,
194 .log2_chroma_h= 0,
195 .comp = {
196 {0,0,1,0,7},
197 },
198 .flags = PIX_FMT_PAL,
199 },
200};