~siretart/libav/merge.raring.libav-0.8.6

« back to all changes in this revision

Viewing changes to libavutil/pixfmt.h

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:30:00 UTC
  • mfrom: (1.4.1)
  • mto: (1.3.11 sid) (26.1.1 quantal-security)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20120112223000-s1reiy1e28hnix42
Tags: upstream-0.8~beta2
ImportĀ upstreamĀ versionĀ 0.8~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 * @file
26
26
 * pixel format definitions
27
27
 *
28
 
 * @warning This file has to be considered an internal but installed
29
 
 * header, so it should not be directly included in your projects.
30
28
 */
31
29
 
32
30
#include "libavutil/avconfig.h"
33
31
 
34
32
/**
35
 
 * Pixel format. Notes:
 
33
 * Pixel format.
36
34
 *
 
35
 * @note
37
36
 * PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA
38
37
 * color is put together as:
39
38
 *  (A << 24) | (R << 16) | (G << 8) | B
40
39
 * This is stored as BGRA on little-endian CPU architectures and ARGB on
41
40
 * big-endian CPUs.
42
41
 *
 
42
 * @par
43
43
 * When the pixel format is palettized RGB (PIX_FMT_PAL8), the palettized
44
44
 * image data is stored in AVFrame.data[0]. The palette is transported in
45
45
 * AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is
49
49
 * This is important as many custom PAL8 video codecs that were designed
50
50
 * to run on the IBM VGA graphics adapter use 6-bit palette components.
51
51
 *
 
52
 * @par
52
53
 * For all the 8bit per pixel formats, an RGB32 palette is in data[1] like
53
54
 * for pal8. This palette is filled in automatically by the function
54
55
 * allocating the picture.
55
56
 *
56
 
 * Note, make sure that all newly added big endian formats have pix_fmt&1==1
57
 
 *       and that all newly added little endian formats have pix_fmt&1==0
58
 
 *       this allows simpler detection of big vs little endian.
 
57
 * @note
 
58
 * make sure that all newly added big endian formats have pix_fmt&1==1
 
59
 * and that all newly added little endian formats have pix_fmt&1==0
 
60
 * this allows simpler detection of big vs little endian.
59
61
 */
60
62
enum PixelFormat {
61
63
    PIX_FMT_NONE= -1,
139
141
    PIX_FMT_YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
140
142
    PIX_FMT_YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
141
143
    PIX_FMT_YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
142
 
    PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
143
 
    PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
144
 
    PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
145
 
    PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
146
 
    PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
147
 
    PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
 
144
    PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
 
145
    PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
 
146
    PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
 
147
    PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
 
148
    PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
 
149
    PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
 
150
    PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
 
151
    PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
 
152
    PIX_FMT_VDA_VLD,    ///< hardware decoding through VDA
 
153
    PIX_FMT_GBRP,      ///< planar GBR 4:4:4 24bpp
 
154
    PIX_FMT_GBRP9BE,   ///< planar GBR 4:4:4 27bpp, big endian
 
155
    PIX_FMT_GBRP9LE,   ///< planar GBR 4:4:4 27bpp, little endian
 
156
    PIX_FMT_GBRP10BE,  ///< planar GBR 4:4:4 30bpp, big endian
 
157
    PIX_FMT_GBRP10LE,  ///< planar GBR 4:4:4 30bpp, little endian
 
158
    PIX_FMT_GBRP16BE,  ///< planar GBR 4:4:4 48bpp, big endian
 
159
    PIX_FMT_GBRP16LE,  ///< planar GBR 4:4:4 48bpp, little endian
148
160
    PIX_FMT_NB,        ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
149
161
};
150
162
 
170
182
#define PIX_FMT_BGR444 PIX_FMT_NE(BGR444BE, BGR444LE)
171
183
 
172
184
#define PIX_FMT_YUV420P9  PIX_FMT_NE(YUV420P9BE , YUV420P9LE)
 
185
#define PIX_FMT_YUV422P9  PIX_FMT_NE(YUV422P9BE , YUV422P9LE)
173
186
#define PIX_FMT_YUV444P9  PIX_FMT_NE(YUV444P9BE , YUV444P9LE)
174
187
#define PIX_FMT_YUV420P10 PIX_FMT_NE(YUV420P10BE, YUV420P10LE)
175
188
#define PIX_FMT_YUV422P10 PIX_FMT_NE(YUV422P10BE, YUV422P10LE)
178
191
#define PIX_FMT_YUV422P16 PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
179
192
#define PIX_FMT_YUV444P16 PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
180
193
 
 
194
#define PIX_FMT_GBRP9     PIX_FMT_NE(GBRP9BE ,    GBRP9LE)
 
195
#define PIX_FMT_GBRP10    PIX_FMT_NE(GBRP10BE,    GBRP10LE)
 
196
#define PIX_FMT_GBRP16    PIX_FMT_NE(GBRP16BE,    GBRP16LE)
 
197
 
181
198
#endif /* AVUTIL_PIXFMT_H */