[FFmpeg-cvslog] Add yuva422p pix_fmt.

Carl Eugen Hoyos git at videolan.org
Tue May 8 11:04:04 CEST 2012


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue May  8 08:39:37 2012 +0200| [143a5c55ff4d792e66045b6b0c44d26fe30158f1] | committer: Carl Eugen Hoyos

Add yuva422p pix_fmt.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=143a5c55ff4d792e66045b6b0c44d26fe30158f1
---

 libavcodec/imgconvert.c       |    4 ++++
 libavcodec/utils.c            |    1 +
 libavutil/avutil.h            |    2 +-
 libavutil/pixdesc.c           |   13 +++++++++++++
 libavutil/pixfmt.h            |    1 +
 libswscale/utils.c            |    1 +
 tests/ref/lavfi/pixdesc       |    1 +
 tests/ref/lavfi/pixfmts_copy  |    1 +
 tests/ref/lavfi/pixfmts_null  |    1 +
 tests/ref/lavfi/pixfmts_pad   |    1 +
 tests/ref/lavfi/pixfmts_scale |    1 +
 tests/ref/lavfi/pixfmts_vflip |    1 +
 12 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index a8d01f7..3111418 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -114,6 +114,10 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
         .color_type = FF_COLOR_YUV,
     },
 
+    [PIX_FMT_YUVA422P] = {
+        .color_type = FF_COLOR_YUV,
+    },
+
     [PIX_FMT_YUVA444P] = {
         .color_type = FF_COLOR_YUV,
     },
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index a2ffdb8..addae04 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -178,6 +178,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
     case PIX_FMT_YUVJ440P:
     case PIX_FMT_YUVJ444P:
     case PIX_FMT_YUVA420P:
+    case PIX_FMT_YUVA422P:
     case PIX_FMT_YUVA444P:
     case PIX_FMT_YUV420P9LE:
     case PIX_FMT_YUV420P9BE:
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 04b0277..a85f6fb 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -153,7 +153,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR 51
-#define LIBAVUTIL_VERSION_MINOR 49
+#define LIBAVUTIL_VERSION_MINOR 50
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 8572719..e73cf8d 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -572,6 +572,19 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
         },
         .flags = PIX_FMT_PLANAR,
     },
+    [PIX_FMT_YUVA422P] = {
+        .name = "yuva422p",
+        .nb_components = 4,
+        .log2_chroma_w = 1,
+        .log2_chroma_h = 0,
+        .comp = {
+            { 0, 0, 1, 0, 7 },        /* Y */
+            { 1, 0, 1, 0, 7 },        /* U */
+            { 2, 0, 1, 0, 7 },        /* V */
+            { 3, 0, 1, 0, 7 },        /* A */
+        },
+        .flags = PIX_FMT_PLANAR,
+    },
     [PIX_FMT_YUVA444P] = {
         .name = "yuva444p",
         .nb_components = 4,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index b3a8dd0..1e81a2a 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -180,6 +180,7 @@ enum PixelFormat {
     PIX_FMT_0BGR,      ///< packed BGR 8:8:8, 32bpp, 0BGR0BGR...
     PIX_FMT_BGR0,      ///< packed BGR 8:8:8, 32bpp, BGR0BGR0...
     PIX_FMT_YUVA444P,  ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
+    PIX_FMT_YUVA422P,  ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
 
     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
 };
diff --git a/libswscale/utils.c b/libswscale/utils.c
index bdc7005..dc489de 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -113,6 +113,7 @@ static const FormatEntry format_entries[PIX_FMT_NB] = {
     [PIX_FMT_YUV440P]     = { 1, 1 },
     [PIX_FMT_YUVJ440P]    = { 1, 1 },
     [PIX_FMT_YUVA420P]    = { 1, 1 },
+    [PIX_FMT_YUVA422P]    = { 1, 1 },
     [PIX_FMT_YUVA444P]    = { 1, 1 },
     [PIX_FMT_RGB48BE]     = { 1, 1 },
     [PIX_FMT_RGB48LE]     = { 1, 1 },
diff --git a/tests/ref/lavfi/pixdesc b/tests/ref/lavfi/pixdesc
index 6e0e8ae..f627fb4 100644
--- a/tests/ref/lavfi/pixdesc
+++ b/tests/ref/lavfi/pixdesc
@@ -61,6 +61,7 @@ yuv444p16le         20f86bc2f68d2b3f1f2b48b97b2189f4
 yuv444p9be          6ab31f4c12b533ce318ecdff83cdd054
 yuv444p9le          f0606604a5c08becab6ba500124c4b7c
 yuva420p            a29884f3f3dfe1e00b961bc17bef3d47
+yuva422p            92b6815f465297284cdb843711682cee
 yuva444p            706799c07e91db8d2ca3187cdc0c82df
 yuvj420p            32eec78ba51857b16ce9b813a49b7189
 yuvj422p            0dfa0ed434f73be51428758c69e082cb
diff --git a/tests/ref/lavfi/pixfmts_copy b/tests/ref/lavfi/pixfmts_copy
index 1bae05e..f763d4b 100644
--- a/tests/ref/lavfi/pixfmts_copy
+++ b/tests/ref/lavfi/pixfmts_copy
@@ -62,6 +62,7 @@ yuv444p16le         20f86bc2f68d2b3f1f2b48b97b2189f4
 yuv444p9be          6ab31f4c12b533ce318ecdff83cdd054
 yuv444p9le          f0606604a5c08becab6ba500124c4b7c
 yuva420p            a29884f3f3dfe1e00b961bc17bef3d47
+yuva422p            92b6815f465297284cdb843711682cee
 yuva444p            706799c07e91db8d2ca3187cdc0c82df
 yuvj420p            32eec78ba51857b16ce9b813a49b7189
 yuvj422p            0dfa0ed434f73be51428758c69e082cb
diff --git a/tests/ref/lavfi/pixfmts_null b/tests/ref/lavfi/pixfmts_null
index a69cd23..2f2daf8 100644
--- a/tests/ref/lavfi/pixfmts_null
+++ b/tests/ref/lavfi/pixfmts_null
@@ -62,6 +62,7 @@ yuv444p16le         20f86bc2f68d2b3f1f2b48b97b2189f4
 yuv444p9be          6ab31f4c12b533ce318ecdff83cdd054
 yuv444p9le          f0606604a5c08becab6ba500124c4b7c
 yuva420p            a29884f3f3dfe1e00b961bc17bef3d47
+yuva422p            92b6815f465297284cdb843711682cee
 yuva444p            706799c07e91db8d2ca3187cdc0c82df
 yuvj420p            32eec78ba51857b16ce9b813a49b7189
 yuvj422p            0dfa0ed434f73be51428758c69e082cb
diff --git a/tests/ref/lavfi/pixfmts_pad b/tests/ref/lavfi/pixfmts_pad
index 0737e61..47c5b82 100644
--- a/tests/ref/lavfi/pixfmts_pad
+++ b/tests/ref/lavfi/pixfmts_pad
@@ -16,6 +16,7 @@ yuv422p             3e0d822c11c716e7636387b1bf27c5ff
 yuv440p             225dd7fbc8cceb24c26b765187d43a9e
 yuv444p             45484f0411d336ce94636da0395f4692
 yuva420p            919722724765dc3a716c38fa53b20580
+yuva422p            bdb4a25a087cd83cac72ac4a9f1d299e
 yuva444p            a6193323b438fbce3a7e0203eff020ec
 yuvj420p            4f20e2799966c21a9d9e0788b0956925
 yuvj422p            e4d84b0683f77a76f1c17d976eff127c
diff --git a/tests/ref/lavfi/pixfmts_scale b/tests/ref/lavfi/pixfmts_scale
index 7a12d08..3f97bd6 100644
--- a/tests/ref/lavfi/pixfmts_scale
+++ b/tests/ref/lavfi/pixfmts_scale
@@ -62,6 +62,7 @@ yuv444p16le         a0c5d3c7bf3f181db503cf8e450d1335
 yuv444p9be          9ac2643ce7f7e5c4e17c8c9fd8494d4a
 yuv444p9le          896a1cc9cccca1ba410dd53942d33cc4
 yuva420p            8673a9131fb47de69788863f93a50eb7
+yuva422p            3c76ebeca0a7d3aa5f8e31ef80a86ffe
 yuva444p            d7a2d5bcdfb762f449a810856d1251fe
 yuvj420p            30427bd6caf5bda93a173dbebe759e09
 yuvj422p            fc8288f64fd149573f73cf8da05d8e6d
diff --git a/tests/ref/lavfi/pixfmts_vflip b/tests/ref/lavfi/pixfmts_vflip
index 78b7474..4902d0a 100644
--- a/tests/ref/lavfi/pixfmts_vflip
+++ b/tests/ref/lavfi/pixfmts_vflip
@@ -62,6 +62,7 @@ yuv444p16le         8e83323cf102d6c823a03ae8a7b7e033
 yuv444p9be          6ac92b7dc9ab2fc59bee99204886899a
 yuv444p9le          85aef13a654953d3455d89770b0d74bd
 yuva420p            c705d1cf061d8c6580ac690b55f92276
+yuva422p            6aed0ea657ed51cc047a4fbdd981aec8
 yuva444p            1ea8e96f8e962b09ac20a414c003ea65
 yuvj420p            41fd02b204da0ab62452cd14b595e2e4
 yuvj422p            7f6ca9bc1812cde02036d7d29a7cce43



More information about the ffmpeg-cvslog mailing list