aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-30 17:41:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-10-30 17:47:36 +0100
commita201639a01284003a055f195f4e850a0cf3fc2d5 (patch)
tree959d66dc788f6d76941e646bbb49dea93209b231 /libavutil
parent788afee86e283535f37fdcb649b2f180ad305f75 (diff)
parent7658295ba353b8bedb3af904f46cfb1ba0cea86a (diff)
downloadffmpeg-a201639a01284003a055f195f4e850a0cf3fc2d5.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: pixfmt: support more yuva formats swscale: support gray to 9bit and 10bit formats configure: rewrite print_config() function using awk FATE: fix (AD)PCM test dependencies broken in e519990 Use ptrdiff_t instead of int for intra pred "stride" function parameter. x86: use PRED4x4/8x8/8x8L/16x16 macros to declare intrapred prototypes. Conflicts: libavcodec/h264pred.c libavcodec/h264pred_template.c libavutil/pixfmt.h libswscale/swscale_unscaled.c tests/ref/lavfi/pixdesc tests/ref/lavfi/pixfmts_copy tests/ref/lavfi/pixfmts_null tests/ref/lavfi/pixfmts_scale tests/ref/lavfi/pixfmts_vflip Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/pixdesc.c234
-rw-r--r--libavutil/pixfmt.h29
2 files changed, 263 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 3b5f2643c2..6ee7024d24 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -609,6 +609,240 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
},
.flags = PIX_FMT_PLANAR,
},
+ [AV_PIX_FMT_YUVA420P9BE] = {
+ .name = "yuva420p9be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P9LE] = {
+ .name = "yuva420p9le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P9BE] = {
+ .name = "yuva422p9be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P9LE] = {
+ .name = "yuva422p9le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P9BE] = {
+ .name = "yuva444p9be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P9LE] = {
+ .name = "yuva444p9le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 8 }, /* Y */
+ { 1, 1, 1, 0, 8 }, /* U */
+ { 2, 1, 1, 0, 8 }, /* V */
+ { 3, 1, 1, 0, 8 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P10BE] = {
+ .name = "yuva420p10be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 9 }, /* Y */
+ { 1, 1, 1, 0, 9 }, /* U */
+ { 2, 1, 1, 0, 9 }, /* V */
+ { 3, 1, 1, 0, 9 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P10LE] = {
+ .name = "yuva420p10le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P10BE] = {
+ .name = "yuva422p10be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P10LE] = {
+ .name = "yuva422p10le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P10BE] = {
+ .name = "yuva444p10be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P10LE] = {
+ .name = "yuva444p10le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P16BE] = {
+ .name = "yuva420p16be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA420P16LE] = {
+ .name = "yuva420p16le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P16BE] = {
+ .name = "yuva422p16be",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA422P16LE] = {
+ .name = "yuva422p16le",
+ .nb_components = 4,
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P16BE] = {
+ .name = "yuva444p16be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ },
+ [AV_PIX_FMT_YUVA444P16LE] = {
+ .name = "yuva444p16le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 1, 1, 0, 15 }, /* Y */
+ { 1, 1, 1, 0, 15 }, /* U */
+ { 2, 1, 1, 0, 15 }, /* V */
+ { 3, 1, 1, 0, 15 }, /* A */
+ },
+ .flags = PIX_FMT_PLANAR,
+ },
[AV_PIX_FMT_VDPAU_H264] = {
.name = "vdpau_h264",
.log2_chroma_w = 1,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index ef7a16ae06..8903b60921 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -181,6 +181,25 @@ enum AVPixelFormat {
AV_PIX_FMT_YUVA422P_LIBAV, ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
AV_PIX_FMT_YUVA444P_LIBAV, ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
+ AV_PIX_FMT_YUVA420P9BE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big endian
+ AV_PIX_FMT_YUVA420P9LE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little endian
+ AV_PIX_FMT_YUVA422P9BE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big endian
+ AV_PIX_FMT_YUVA422P9LE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little endian
+ AV_PIX_FMT_YUVA444P9BE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big endian
+ AV_PIX_FMT_YUVA444P9LE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little endian
+ AV_PIX_FMT_YUVA420P10BE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA420P10LE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA422P10BE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA422P10LE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA444P10BE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA444P10LE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA420P16BE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA420P16LE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA422P16BE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA422P16LE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little endian)
+ AV_PIX_FMT_YUVA444P16BE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big endian)
+ AV_PIX_FMT_YUVA444P16LE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little endian)
+
#ifndef AV_PIX_FMT_ABI_GIT_MASTER
AV_PIX_FMT_RGBA64BE=0x123, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
AV_PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
@@ -274,6 +293,16 @@ enum AVPixelFormat {
#define AV_PIX_FMT_GBRP14 AV_PIX_FMT_NE(GBRP14BE, GBRP14LE)
#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
+#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
+#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
+#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
+#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE)
+#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE)
+#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE)
+#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE)
+#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE)
+#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)
+
#if FF_API_PIX_FMT
#define PixelFormat AVPixelFormat