annotate pixdesc.c @ 987:f2fa8ffe7a05 libavutil

Reindent after r24101.
author stefano
date Thu, 08 Jul 2010 22:05:33 +0000
parents da1b5110dbd0
children 732bb5b10aec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
1 /*
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
2 * pixel format descriptor
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
3 * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at>
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
4 *
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
5 * This file is part of FFmpeg.
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
6 *
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
11 *
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
15 * Lesser General Public License for more details.
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
16 *
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
20 */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
21
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
22 #include "pixfmt.h"
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
23 #include "pixdesc.h"
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
24
836
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
25 #include "intreadwrite.h"
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
26
982
da1b5110dbd0 Rename read/write_line() to av_read/write_image_line().
mru
parents: 898
diff changeset
27 void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4],
987
f2fa8ffe7a05 Reindent after r24101.
stefano
parents: 982
diff changeset
28 const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component)
836
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
29 {
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
30 AVComponentDescriptor comp= desc->comp[c];
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
31 int plane= comp.plane;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
32 int depth= comp.depth_minus1+1;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
33 int mask = (1<<depth)-1;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
34 int shift= comp.shift;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
35 int step = comp.step_minus1+1;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
36 int flags= desc->flags;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
37
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
38 if (flags & PIX_FMT_BITSTREAM){
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
39 int skip = x*step + comp.offset_plus1-1;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
40 const uint8_t *p = data[plane] + y*linesize[plane] + (skip>>3);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
41 int shift = 8 - depth - (skip&7);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
42
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
43 while(w--){
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
44 int val = (*p >> shift) & mask;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
45 if(read_pal_component)
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
46 val= data[1][4*val + c];
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
47 shift -= step;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
48 p -= shift>>3;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
49 shift &= 7;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
50 *dst++= val;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
51 }
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
52 } else {
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
53 const uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
54
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
55 while(w--){
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
56 int val;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
57 if(flags & PIX_FMT_BE) val= AV_RB16(p);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
58 else val= AV_RL16(p);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
59 val = (val>>shift) & mask;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
60 if(read_pal_component)
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
61 val= data[1][4*val + c];
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
62 p+= step;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
63 *dst++= val;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
64 }
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
65 }
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
66 }
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
67
982
da1b5110dbd0 Rename read/write_line() to av_read/write_image_line().
mru
parents: 898
diff changeset
68 void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesize[4],
987
f2fa8ffe7a05 Reindent after r24101.
stefano
parents: 982
diff changeset
69 const AVPixFmtDescriptor *desc, int x, int y, int c, int w)
836
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
70 {
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
71 AVComponentDescriptor comp = desc->comp[c];
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
72 int plane = comp.plane;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
73 int depth = comp.depth_minus1+1;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
74 int step = comp.step_minus1+1;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
75 int flags = desc->flags;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
76
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
77 if (flags & PIX_FMT_BITSTREAM) {
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
78 int skip = x*step + comp.offset_plus1-1;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
79 uint8_t *p = data[plane] + y*linesize[plane] + (skip>>3);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
80 int shift = 8 - depth - (skip&7);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
81
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
82 while (w--) {
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
83 *p |= *src++ << shift;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
84 shift -= step;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
85 p -= shift>>3;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
86 shift &= 7;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
87 }
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
88 } else {
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
89 int shift = comp.shift;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
90 uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
91
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
92 while (w--) {
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
93 if (flags & PIX_FMT_BE) {
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
94 uint16_t val = AV_RB16(p) | (*src++<<shift);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
95 AV_WB16(p, val);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
96 } else {
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
97 uint16_t val = AV_RL16(p) | (*src++<<shift);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
98 AV_WL16(p, val);
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
99 }
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
100 p+= step;
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
101 }
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
102 }
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
103 }
af688c6fa72f Move read_line() and write_line() definition from pixdesc.h to
stefano
parents: 827
diff changeset
104
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
105 const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
106 [PIX_FMT_YUV420P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
107 .name = "yuv420p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
108 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
109 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
110 .log2_chroma_h= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
111 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
112 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
113 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
114 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
115 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
116 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
117 [PIX_FMT_YUYV422] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
118 .name = "yuyv422",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
119 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
120 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
121 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
122 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
123 {0,1,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
124 {0,3,2,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
125 {0,3,4,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
126 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
127 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
128 [PIX_FMT_RGB24] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
129 .name = "rgb24",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
130 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
131 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
132 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
133 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
134 {0,2,1,0,7}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
135 {0,2,2,0,7}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
136 {0,2,3,0,7}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
137 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
138 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
139 [PIX_FMT_BGR24] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
140 .name = "bgr24",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
141 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
142 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
143 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
144 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
145 {0,2,1,0,7}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
146 {0,2,2,0,7}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
147 {0,2,3,0,7}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
148 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
149 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
150 [PIX_FMT_YUV422P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
151 .name = "yuv422p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
152 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
153 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
154 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
155 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
156 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
157 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
158 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
159 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
160 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
161 [PIX_FMT_YUV444P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
162 .name = "yuv444p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
163 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
164 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
165 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
166 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
167 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
168 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
169 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
170 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
171 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
172 [PIX_FMT_YUV410P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
173 .name = "yuv410p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
174 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
175 .log2_chroma_w= 2,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
176 .log2_chroma_h= 2,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
177 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
178 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
179 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
180 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
181 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
182 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
183 [PIX_FMT_YUV411P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
184 .name = "yuv411p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
185 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
186 .log2_chroma_w= 2,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
187 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
188 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
189 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
190 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
191 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
192 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
193 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
194 [PIX_FMT_GRAY8] = {
796
ecf400e9601b Make av_pix_fmt_descriptors use the same pixel format names as defined
stefano
parents: 791
diff changeset
195 .name = "gray",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
196 .nb_components= 1,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
197 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
198 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
199 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
200 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
201 },
856
f01741b79070 Declare the PIX_FMT_GRAY8 pixel format as a paletted format. This is
stefano
parents: 836
diff changeset
202 .flags = PIX_FMT_PAL,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
203 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
204 [PIX_FMT_MONOWHITE] = {
796
ecf400e9601b Make av_pix_fmt_descriptors use the same pixel format names as defined
stefano
parents: 791
diff changeset
205 .name = "monow",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
206 .nb_components= 1,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
207 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
208 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
209 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
210 {0,0,1,0,0}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
211 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
212 .flags = PIX_FMT_BITSTREAM,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
213 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
214 [PIX_FMT_MONOBLACK] = {
796
ecf400e9601b Make av_pix_fmt_descriptors use the same pixel format names as defined
stefano
parents: 791
diff changeset
215 .name = "monob",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
216 .nb_components= 1,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
217 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
218 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
219 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
220 {0,0,1,7,0}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
221 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
222 .flags = PIX_FMT_BITSTREAM,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
223 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
224 [PIX_FMT_PAL8] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
225 .name = "pal8",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
226 .nb_components= 1,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
227 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
228 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
229 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
230 {0,0,1,0,7},
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
231 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
232 .flags = PIX_FMT_PAL,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
233 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
234 [PIX_FMT_YUVJ420P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
235 .name = "yuvj420p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
236 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
237 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
238 .log2_chroma_h= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
239 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
240 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
241 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
242 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
243 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
244 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
245 [PIX_FMT_YUVJ422P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
246 .name = "yuvj422p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
247 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
248 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
249 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
250 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
251 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
252 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
253 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
254 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
255 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
256 [PIX_FMT_YUVJ444P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
257 .name = "yuvj444p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
258 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
259 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
260 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
261 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
262 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
263 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
264 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
265 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
266 },
783
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
267 [PIX_FMT_XVMC_MPEG2_MC] = {
796
ecf400e9601b Make av_pix_fmt_descriptors use the same pixel format names as defined
stefano
parents: 791
diff changeset
268 .name = "xvmcmc",
783
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
269 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
270 },
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
271 [PIX_FMT_XVMC_MPEG2_IDCT] = {
796
ecf400e9601b Make av_pix_fmt_descriptors use the same pixel format names as defined
stefano
parents: 791
diff changeset
272 .name = "xvmcidct",
783
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
273 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
274 },
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
275 [PIX_FMT_UYVY422] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
276 .name = "uyvy422",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
277 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
278 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
279 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
280 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
281 {0,1,2,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
282 {0,3,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
283 {0,3,3,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
284 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
285 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
286 [PIX_FMT_UYYVYY411] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
287 .name = "uyyvyy411",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
288 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
289 .log2_chroma_w= 2,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
290 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
291 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
292 {0,3,2,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
293 {0,5,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
294 {0,5,4,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
295 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
296 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
297 [PIX_FMT_BGR8] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
298 .name = "bgr8",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
299 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
300 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
301 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
302 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
303 {0,0,1,6,1}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
304 {0,0,1,3,2}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
305 {0,0,1,0,2}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
306 },
782
9b06eaf7b6ef Add PIX_FMT_PAL flag to BGR8, BGR4_BYTE, RGB8, and RGB4_BYTE formats.
stefano
parents: 781
diff changeset
307 .flags = PIX_FMT_PAL,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
308 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
309 [PIX_FMT_BGR4] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
310 .name = "bgr4",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
311 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
312 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
313 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
314 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
315 {0,3,1,0,0}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
316 {0,3,2,0,1}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
317 {0,3,4,0,0}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
318 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
319 .flags = PIX_FMT_BITSTREAM,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
320 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
321 [PIX_FMT_BGR4_BYTE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
322 .name = "bgr4_byte",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
323 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
324 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
325 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
326 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
327 {0,0,1,3,0}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
328 {0,0,1,1,1}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
329 {0,0,1,0,0}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
330 },
782
9b06eaf7b6ef Add PIX_FMT_PAL flag to BGR8, BGR4_BYTE, RGB8, and RGB4_BYTE formats.
stefano
parents: 781
diff changeset
331 .flags = PIX_FMT_PAL,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
332 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
333 [PIX_FMT_RGB8] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
334 .name = "rgb8",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
335 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
336 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
337 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
338 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
339 {0,0,1,6,1}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
340 {0,0,1,3,2}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
341 {0,0,1,0,2}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
342 },
782
9b06eaf7b6ef Add PIX_FMT_PAL flag to BGR8, BGR4_BYTE, RGB8, and RGB4_BYTE formats.
stefano
parents: 781
diff changeset
343 .flags = PIX_FMT_PAL,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
344 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
345 [PIX_FMT_RGB4] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
346 .name = "rgb4",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
347 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
348 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
349 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
350 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
351 {0,3,1,0,0}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
352 {0,3,2,0,1}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
353 {0,3,4,0,0}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
354 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
355 .flags = PIX_FMT_BITSTREAM,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
356 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
357 [PIX_FMT_RGB4_BYTE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
358 .name = "rgb4_byte",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
359 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
360 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
361 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
362 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
363 {0,0,1,3,0}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
364 {0,0,1,1,1}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
365 {0,0,1,0,0}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
366 },
782
9b06eaf7b6ef Add PIX_FMT_PAL flag to BGR8, BGR4_BYTE, RGB8, and RGB4_BYTE formats.
stefano
parents: 781
diff changeset
367 .flags = PIX_FMT_PAL,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
368 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
369 [PIX_FMT_NV12] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
370 .name = "nv12",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
371 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
372 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
373 .log2_chroma_h= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
374 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
375 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
376 {1,1,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
377 {1,1,2,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
378 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
379 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
380 [PIX_FMT_NV21] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
381 .name = "nv21",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
382 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
383 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
384 .log2_chroma_h= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
385 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
386 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
387 {1,1,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
388 {1,1,2,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
389 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
390 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
391 [PIX_FMT_ARGB] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
392 .name = "argb",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
393 .nb_components= 4,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
394 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
395 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
396 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
397 {0,3,1,0,7}, /* A */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
398 {0,3,2,0,7}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
399 {0,3,3,0,7}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
400 {0,3,4,0,7}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
401 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
402 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
403 [PIX_FMT_RGBA] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
404 .name = "rgba",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
405 .nb_components= 4,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
406 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
407 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
408 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
409 {0,3,1,0,7}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
410 {0,3,2,0,7}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
411 {0,3,3,0,7}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
412 {0,3,4,0,7}, /* A */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
413 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
414 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
415 [PIX_FMT_ABGR] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
416 .name = "abgr",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
417 .nb_components= 4,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
418 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
419 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
420 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
421 {0,3,1,0,7}, /* A */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
422 {0,3,2,0,7}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
423 {0,3,3,0,7}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
424 {0,3,4,0,7}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
425 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
426 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
427 [PIX_FMT_BGRA] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
428 .name = "bgra",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
429 .nb_components= 4,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
430 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
431 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
432 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
433 {0,3,1,0,7}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
434 {0,3,2,0,7}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
435 {0,3,3,0,7}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
436 {0,3,4,0,7}, /* A */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
437 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
438 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
439 [PIX_FMT_GRAY16BE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
440 .name = "gray16be",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
441 .nb_components= 1,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
442 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
443 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
444 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
445 {0,1,1,0,15}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
446 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
447 .flags = PIX_FMT_BE,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
448 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
449 [PIX_FMT_GRAY16LE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
450 .name = "gray16le",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
451 .nb_components= 1,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
452 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
453 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
454 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
455 {0,1,1,0,15}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
456 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
457 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
458 [PIX_FMT_YUV440P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
459 .name = "yuv440p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
460 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
461 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
462 .log2_chroma_h= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
463 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
464 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
465 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
466 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
467 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
468 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
469 [PIX_FMT_YUVJ440P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
470 .name = "yuvj440p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
471 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
472 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
473 .log2_chroma_h= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
474 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
475 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
476 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
477 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
478 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
479 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
480 [PIX_FMT_YUVA420P] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
481 .name = "yuva420p",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
482 .nb_components= 4,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
483 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
484 .log2_chroma_h= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
485 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
486 {0,0,1,0,7}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
487 {1,0,1,0,7}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
488 {2,0,1,0,7}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
489 {3,0,1,0,7}, /* A */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
490 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
491 },
783
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
492 [PIX_FMT_VDPAU_H264] = {
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
493 .name = "vdpau_h264",
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
494 .log2_chroma_w = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
495 .log2_chroma_h = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
496 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
497 },
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
498 [PIX_FMT_VDPAU_MPEG1] = {
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
499 .name = "vdpau_mpeg1",
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
500 .log2_chroma_w = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
501 .log2_chroma_h = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
502 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
503 },
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
504 [PIX_FMT_VDPAU_MPEG2] = {
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
505 .name = "vdpau_mpeg2",
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
506 .log2_chroma_w = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
507 .log2_chroma_h = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
508 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
509 },
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
510 [PIX_FMT_VDPAU_WMV3] = {
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
511 .name = "vdpau_wmv3",
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
512 .log2_chroma_w = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
513 .log2_chroma_h = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
514 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
515 },
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
516 [PIX_FMT_VDPAU_VC1] = {
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
517 .name = "vdpau_vc1",
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
518 .log2_chroma_w = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
519 .log2_chroma_h = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
520 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
521 },
787
664b42a6cf75 Add PIX_FMT_VDPAU_MPEG4 to pixdesc.c.
cehoyos
parents: 783
diff changeset
522 [PIX_FMT_VDPAU_MPEG4] = {
664b42a6cf75 Add PIX_FMT_VDPAU_MPEG4 to pixdesc.c.
cehoyos
parents: 783
diff changeset
523 .name = "vdpau_mpeg4",
664b42a6cf75 Add PIX_FMT_VDPAU_MPEG4 to pixdesc.c.
cehoyos
parents: 783
diff changeset
524 .log2_chroma_w = 1,
664b42a6cf75 Add PIX_FMT_VDPAU_MPEG4 to pixdesc.c.
cehoyos
parents: 783
diff changeset
525 .log2_chroma_h = 1,
664b42a6cf75 Add PIX_FMT_VDPAU_MPEG4 to pixdesc.c.
cehoyos
parents: 783
diff changeset
526 .flags = PIX_FMT_HWACCEL,
664b42a6cf75 Add PIX_FMT_VDPAU_MPEG4 to pixdesc.c.
cehoyos
parents: 783
diff changeset
527 },
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
528 [PIX_FMT_RGB48BE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
529 .name = "rgb48be",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
530 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
531 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
532 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
533 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
534 {0,5,1,0,15}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
535 {0,5,3,0,15}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
536 {0,5,5,0,15}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
537 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
538 .flags = PIX_FMT_BE,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
539 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
540 [PIX_FMT_RGB48LE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
541 .name = "rgb48le",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
542 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
543 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
544 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
545 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
546 {0,5,1,0,15}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
547 {0,5,3,0,15}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
548 {0,5,5,0,15}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
549 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
550 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
551 [PIX_FMT_RGB565BE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
552 .name = "rgb565be",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
553 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
554 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
555 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
556 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
557 {0,1,0,3,4}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
558 {0,1,1,5,5}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
559 {0,1,1,0,4}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
560 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
561 .flags = PIX_FMT_BE,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
562 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
563 [PIX_FMT_RGB565LE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
564 .name = "rgb565le",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
565 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
566 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
567 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
568 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
569 {0,1,2,3,4}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
570 {0,1,1,5,5}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
571 {0,1,1,0,4}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
572 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
573 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
574 [PIX_FMT_RGB555BE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
575 .name = "rgb555be",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
576 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
577 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
578 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
579 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
580 {0,1,0,2,4}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
581 {0,1,1,5,4}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
582 {0,1,1,0,4}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
583 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
584 .flags = PIX_FMT_BE,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
585 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
586 [PIX_FMT_RGB555LE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
587 .name = "rgb555le",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
588 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
589 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
590 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
591 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
592 {0,1,2,2,4}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
593 {0,1,1,5,4}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
594 {0,1,1,0,4}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
595 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
596 },
857
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
597 [PIX_FMT_RGB444BE] = {
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
598 .name = "rgb444be",
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
599 .nb_components= 3,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
600 .log2_chroma_w= 0,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
601 .log2_chroma_h= 0,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
602 .comp = {
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
603 {0,1,0,0,3}, /* R */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
604 {0,1,1,4,3}, /* G */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
605 {0,1,1,0,3}, /* B */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
606 },
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
607 .flags = PIX_FMT_BE,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
608 },
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
609 [PIX_FMT_RGB444LE] = {
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
610 .name = "rgb444le",
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
611 .nb_components= 3,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
612 .log2_chroma_w= 0,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
613 .log2_chroma_h= 0,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
614 .comp = {
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
615 {0,1,2,0,3}, /* R */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
616 {0,1,1,4,3}, /* G */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
617 {0,1,1,0,3}, /* B */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
618 },
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
619 },
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
620 [PIX_FMT_BGR565BE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
621 .name = "bgr565be",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
622 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
623 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
624 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
625 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
626 {0,1,0,3,4}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
627 {0,1,1,5,5}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
628 {0,1,1,0,4}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
629 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
630 .flags = PIX_FMT_BE,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
631 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
632 [PIX_FMT_BGR565LE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
633 .name = "bgr565le",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
634 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
635 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
636 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
637 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
638 {0,1,2,3,4}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
639 {0,1,1,5,5}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
640 {0,1,1,0,4}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
641 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
642 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
643 [PIX_FMT_BGR555BE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
644 .name = "bgr555be",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
645 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
646 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
647 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
648 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
649 {0,1,0,2,4}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
650 {0,1,1,5,4}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
651 {0,1,1,0,4}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
652 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
653 .flags = PIX_FMT_BE,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
654 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
655 [PIX_FMT_BGR555LE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
656 .name = "bgr555le",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
657 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
658 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
659 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
660 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
661 {0,1,2,2,4}, /* B */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
662 {0,1,1,5,4}, /* G */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
663 {0,1,1,0,4}, /* R */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
664 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
665 },
857
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
666 [PIX_FMT_BGR444BE] = {
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
667 .name = "bgr444be",
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
668 .nb_components= 3,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
669 .log2_chroma_w= 0,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
670 .log2_chroma_h= 0,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
671 .comp = {
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
672 {0,1,0,0,3}, /* B */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
673 {0,1,1,4,3}, /* G */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
674 {0,1,1,0,3}, /* R */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
675 },
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
676 .flags = PIX_FMT_BE,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
677 },
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
678 [PIX_FMT_BGR444LE] = {
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
679 .name = "bgr444le",
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
680 .nb_components= 3,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
681 .log2_chroma_w= 0,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
682 .log2_chroma_h= 0,
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
683 .comp = {
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
684 {0,1,2,0,3}, /* B */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
685 {0,1,1,4,3}, /* G */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
686 {0,1,1,0,3}, /* R */
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
687 },
c88d7a5ffa24 Add initial support for 12-bit color mode.
benoit
parents: 856
diff changeset
688 },
783
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
689 [PIX_FMT_VAAPI_MOCO] = {
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
690 .name = "vaapi_moco",
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
691 .log2_chroma_w = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
692 .log2_chroma_h = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
693 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
694 },
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
695 [PIX_FMT_VAAPI_IDCT] = {
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
696 .name = "vaapi_idct",
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
697 .log2_chroma_w = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
698 .log2_chroma_h = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
699 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
700 },
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
701 [PIX_FMT_VAAPI_VLD] = {
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
702 .name = "vaapi_vld",
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
703 .log2_chroma_w = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
704 .log2_chroma_h = 1,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
705 .flags = PIX_FMT_HWACCEL,
c0b4f10edb74 Add pixel format descriptors for the HW-accelerated formats.
stefano
parents: 782
diff changeset
706 },
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
707 [PIX_FMT_YUV420P16LE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
708 .name = "yuv420p16le",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
709 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
710 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
711 .log2_chroma_h= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
712 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
713 {0,1,1,0,15}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
714 {1,1,1,0,15}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
715 {2,1,1,0,15}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
716 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
717 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
718 [PIX_FMT_YUV420P16BE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
719 .name = "yuv420p16be",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
720 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
721 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
722 .log2_chroma_h= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
723 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
724 {0,1,1,0,15}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
725 {1,1,1,0,15}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
726 {2,1,1,0,15}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
727 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
728 .flags = PIX_FMT_BE,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
729 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
730 [PIX_FMT_YUV422P16LE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
731 .name = "yuv422p16le",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
732 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
733 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
734 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
735 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
736 {0,1,1,0,15}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
737 {1,1,1,0,15}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
738 {2,1,1,0,15}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
739 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
740 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
741 [PIX_FMT_YUV422P16BE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
742 .name = "yuv422p16be",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
743 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
744 .log2_chroma_w= 1,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
745 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
746 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
747 {0,1,1,0,15}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
748 {1,1,1,0,15}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
749 {2,1,1,0,15}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
750 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
751 .flags = PIX_FMT_BE,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
752 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
753 [PIX_FMT_YUV444P16LE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
754 .name = "yuv444p16le",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
755 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
756 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
757 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
758 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
759 {0,1,1,0,15}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
760 {1,1,1,0,15}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
761 {2,1,1,0,15}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
762 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
763 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
764 [PIX_FMT_YUV444P16BE] = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
765 .name = "yuv444p16be",
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
766 .nb_components= 3,
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
767 .log2_chroma_w= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
768 .log2_chroma_h= 0,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
769 .comp = {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
770 {0,1,1,0,15}, /* Y */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
771 {1,1,1,0,15}, /* U */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
772 {2,1,1,0,15}, /* V */
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
773 },
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
774 .flags = PIX_FMT_BE,
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
775 },
818
2715180d7ffa H264 DXVA2 implementation
fenrir
parents: 796
diff changeset
776 [PIX_FMT_DXVA2_VLD] = {
2715180d7ffa H264 DXVA2 implementation
fenrir
parents: 796
diff changeset
777 .name = "dxva2_vld",
2715180d7ffa H264 DXVA2 implementation
fenrir
parents: 796
diff changeset
778 .log2_chroma_w = 1,
2715180d7ffa H264 DXVA2 implementation
fenrir
parents: 796
diff changeset
779 .log2_chroma_h = 1,
2715180d7ffa H264 DXVA2 implementation
fenrir
parents: 796
diff changeset
780 .flags = PIX_FMT_HWACCEL,
2715180d7ffa H264 DXVA2 implementation
fenrir
parents: 796
diff changeset
781 },
898
9087f43dbcd2 Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
andoma
parents: 857
diff changeset
782 [PIX_FMT_Y400A] = {
9087f43dbcd2 Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
andoma
parents: 857
diff changeset
783 .name = "y400a",
9087f43dbcd2 Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
andoma
parents: 857
diff changeset
784 .nb_components= 2,
9087f43dbcd2 Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
andoma
parents: 857
diff changeset
785 .comp = {
9087f43dbcd2 Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
andoma
parents: 857
diff changeset
786 {0,1,1,0,7}, /* Y */
9087f43dbcd2 Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
andoma
parents: 857
diff changeset
787 {0,1,2,0,7}, /* A */
9087f43dbcd2 Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
andoma
parents: 857
diff changeset
788 },
9087f43dbcd2 Add PIX_FMT_Y400A, 8bit gray, 8bit alpha
andoma
parents: 857
diff changeset
789 },
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
790 };
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
791
827
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
792 static enum PixelFormat get_pix_fmt_internal(const char *name)
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
793 {
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
794 enum PixelFormat pix_fmt;
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
795
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
796 for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++)
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
797 if (av_pix_fmt_descriptors[pix_fmt].name &&
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
798 !strcmp(av_pix_fmt_descriptors[pix_fmt].name, name))
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
799 return pix_fmt;
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
800
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
801 return PIX_FMT_NONE;
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
802 }
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
803
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
804 #if HAVE_BIGENDIAN
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
805 # define X_NE(be, le) be
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
806 #else
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
807 # define X_NE(be, le) le
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
808 #endif
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
809
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
810 enum PixelFormat av_get_pix_fmt(const char *name)
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
811 {
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
812 enum PixelFormat pix_fmt;
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
813
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
814 if (!strcmp(name, "rgb32"))
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
815 name = X_NE("argb", "bgra");
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
816 else if (!strcmp(name, "bgr32"))
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
817 name = X_NE("abgr", "rgba");
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
818
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
819 pix_fmt = get_pix_fmt_internal(name);
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
820 if (pix_fmt == PIX_FMT_NONE) {
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
821 char name2[32];
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
822
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
823 snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le"));
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
824 pix_fmt = get_pix_fmt_internal(name2);
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
825 }
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
826 return pix_fmt;
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
827 }
f01765adeb5c Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
stefano
parents: 818
diff changeset
828
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
829 int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
830 {
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
831 int c, bits = 0;
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
832 int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
833
791
ecf67bd079fe Rename AVPixFmtDescriptor.nb_channels to nb_components, the new name
stefano
parents: 787
diff changeset
834 for (c = 0; c < pixdesc->nb_components; c++) {
781
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
835 int s = c==1 || c==2 ? 0 : log2_pixels;
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
836 bits += (pixdesc->comp[c].depth_minus1+1) << s;
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
837 }
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
838
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
839 return bits >> log2_pixels;
9ef56664097a Move pixdesc.{h,c} from libavcodec to libavutil.
stefano
parents:
diff changeset
840 }