diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-11-06 15:30:10 -0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-11-24 08:13:50 -0800 |
commit | bd97b2e1ce713a4886d909f71b6f1f5403446f53 (patch) | |
tree | 301abbfbc400fcd00bcdca67252c08e4346a3e87 | |
parent | bbb46f3ec7128d8a624f2aa5b4f99ec44c0b9567 (diff) | |
download | ffmpeg-bd97b2e1ce713a4886d909f71b6f1f5403446f53.tar.gz |
pixfmt: add planar RGB formats.
-rw-r--r-- | libavutil/pixdesc.c | 80 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 11 |
2 files changed, 91 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index e0616df828..5864cdba35 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -967,6 +967,86 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,2,0,7}, /* A */ }, }, + [PIX_FMT_GBRP] = { + .name = "gbrp", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,0,1,0,7}, /* G */ + {1,0,1,0,7}, /* B */ + {2,0,1,0,7}, /* R */ + }, + }, + [PIX_FMT_GBRP9LE] = { + .name = "gbrp9le", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,8}, /* G */ + {1,1,1,0,8}, /* B */ + {2,1,1,0,8}, /* R */ + }, + }, + [PIX_FMT_GBRP9BE] = { + .name = "gbrp9be", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,8}, /* G */ + {1,1,1,0,8}, /* B */ + {2,1,1,0,8}, /* R */ + }, + .flags = PIX_FMT_BE, + }, + [PIX_FMT_GBRP10LE] = { + .name = "gbrp10le", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,9}, /* G */ + {1,1,1,0,9}, /* B */ + {2,1,1,0,9}, /* R */ + }, + }, + [PIX_FMT_GBRP10BE] = { + .name = "gbrp10be", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,9}, /* G */ + {1,1,1,0,9}, /* B */ + {2,1,1,0,9}, /* R */ + }, + .flags = PIX_FMT_BE, + }, + [PIX_FMT_GBRP16LE] = { + .name = "gbrp16le", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,15}, /* G */ + {1,1,1,0,15}, /* B */ + {2,1,1,0,15}, /* R */ + }, + }, + [PIX_FMT_GBRP16BE] = { + .name = "gbrp16be", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,15}, /* G */ + {1,1,1,0,15}, /* B */ + {2,1,1,0,15}, /* R */ + }, + .flags = PIX_FMT_BE, + }, }; static enum PixelFormat get_pix_fmt_internal(const char *name) diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 39c608dde8..bd898bdc8e 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -150,6 +150,13 @@ enum PixelFormat { PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian PIX_FMT_VDA_VLD, ///< hardware decoding through VDA + PIX_FMT_GBRP, ///< planar GBR 4:4:4 24bpp + PIX_FMT_GBRP9BE, ///< planar GBR 4:4:4 27bpp, big endian + PIX_FMT_GBRP9LE, ///< planar GBR 4:4:4 27bpp, little endian + PIX_FMT_GBRP10BE, ///< planar GBR 4:4:4 30bpp, big endian + PIX_FMT_GBRP10LE, ///< planar GBR 4:4:4 30bpp, little endian + PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big endian + PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little endian 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 }; @@ -184,4 +191,8 @@ enum PixelFormat { #define PIX_FMT_YUV422P16 PIX_FMT_NE(YUV422P16BE, YUV422P16LE) #define PIX_FMT_YUV444P16 PIX_FMT_NE(YUV444P16BE, YUV444P16LE) +#define PIX_FMT_GBRP9 PIX_FMT_NE(GBRP9BE , GBRP9LE) +#define PIX_FMT_GBRP10 PIX_FMT_NE(GBRP10BE, GBRP10LE) +#define PIX_FMT_GBRP16 PIX_FMT_NE(GBRP16BE, GBRP16LE) + #endif /* AVUTIL_PIXFMT_H */ |