annotate pixdesc.c @ 1027:7d79d41d152e libavutil

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