[FFmpeg-devel] [PATCH] Add yuva444p10 pix_fmt
Paul B Mahol
onemda at gmail.com
Sat Jun 9 16:38:32 CEST 2012
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavcodec/imgconvert.c | 6 ++++++
libavutil/avutil.h | 2 +-
libavutil/pixdesc.c | 26 ++++++++++++++++++++++++++
libavutil/pixfmt.h | 2 ++
libswscale/utils.c | 2 ++
tests/ref/lavfi/pixfmts_copy | 2 ++
tests/ref/lavfi/pixfmts_null | 2 ++
tests/ref/lavfi/pixfmts_scale | 2 ++
tests/ref/lavfi/pixfmts_vflip | 2 ++
9 files changed, 45 insertions(+), 1 deletions(-)
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 3111418..48adeb6 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -121,6 +121,12 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
[PIX_FMT_YUVA444P] = {
.color_type = FF_COLOR_YUV,
},
+ [PIX_FMT_YUVA444P10LE] = {
+ .color_type = FF_COLOR_YUV,
+ },
+ [PIX_FMT_YUVA444P10BE] = {
+ .color_type = FF_COLOR_YUV,
+ },
/* JPEG YUV */
[PIX_FMT_YUVJ420P] = {
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 2e83d1f..02b9c7b 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -153,7 +153,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 51
-#define LIBAVUTIL_VERSION_MINOR 56
+#define LIBAVUTIL_VERSION_MINOR 57
#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 e87deec..b8af3fa 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -598,6 +598,32 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
},
.flags = PIX_FMT_PLANAR,
},
+ [PIX_FMT_YUVA444P10LE] = {
+ .name = "yuva444p10le",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .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_PLANAR,
+ },
+ [PIX_FMT_YUVA444P10BE] = {
+ .name = "yuva444p10be",
+ .nb_components = 4,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .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,
+ },
[PIX_FMT_VDPAU_H264] = {
.name = "vdpau_h264",
.log2_chroma_w = 1,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 820cd3f..da80a0e 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -184,6 +184,8 @@ enum PixelFormat {
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_YUVA444P10BE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
+ PIX_FMT_YUVA444P10LE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 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 dc489de..1143057 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -115,6 +115,8 @@ static const FormatEntry format_entries[PIX_FMT_NB] = {
[PIX_FMT_YUVA420P] = { 1, 1 },
[PIX_FMT_YUVA422P] = { 1, 1 },
[PIX_FMT_YUVA444P] = { 1, 1 },
+ [PIX_FMT_YUVA444P10BE]= { 1 , 1 },
+ [PIX_FMT_YUVA444P10LE]= { 1 , 1 },
[PIX_FMT_RGB48BE] = { 1, 1 },
[PIX_FMT_RGB48LE] = { 1, 1 },
[PIX_FMT_RGBA64BE] = { 1, 0 },
diff --git a/tests/ref/lavfi/pixfmts_copy b/tests/ref/lavfi/pixfmts_copy
index 26f5151..e2dd09e 100644
--- a/tests/ref/lavfi/pixfmts_copy
+++ b/tests/ref/lavfi/pixfmts_copy
@@ -64,6 +64,8 @@ yuv444p9le f0606604a5c08becab6ba500124c4b7c
yuva420p a29884f3f3dfe1e00b961bc17bef3d47
yuva422p 85a8b4813cf90c3b194307f181717693
yuva444p 706799c07e91db8d2ca3187cdc0c82df
+yuva444p10be 1ba7d40aae985e639888c7ea360723c7
+yuva444p10le 2d2f84cba7d6b3e4736b232d65af56f9
yuvj420p 32eec78ba51857b16ce9b813a49b7189
yuvj422p 0dfa0ed434f73be51428758c69e082cb
yuvj440p 657501a28004e27a592757a7509f5189
diff --git a/tests/ref/lavfi/pixfmts_null b/tests/ref/lavfi/pixfmts_null
index 26f5151..e2dd09e 100644
--- a/tests/ref/lavfi/pixfmts_null
+++ b/tests/ref/lavfi/pixfmts_null
@@ -64,6 +64,8 @@ yuv444p9le f0606604a5c08becab6ba500124c4b7c
yuva420p a29884f3f3dfe1e00b961bc17bef3d47
yuva422p 85a8b4813cf90c3b194307f181717693
yuva444p 706799c07e91db8d2ca3187cdc0c82df
+yuva444p10be 1ba7d40aae985e639888c7ea360723c7
+yuva444p10le 2d2f84cba7d6b3e4736b232d65af56f9
yuvj420p 32eec78ba51857b16ce9b813a49b7189
yuvj422p 0dfa0ed434f73be51428758c69e082cb
yuvj440p 657501a28004e27a592757a7509f5189
diff --git a/tests/ref/lavfi/pixfmts_scale b/tests/ref/lavfi/pixfmts_scale
index 60a977e..cd4d728 100644
--- a/tests/ref/lavfi/pixfmts_scale
+++ b/tests/ref/lavfi/pixfmts_scale
@@ -64,6 +64,8 @@ yuv444p9le 896a1cc9cccca1ba410dd53942d33cc4
yuva420p 8673a9131fb47de69788863f93a50eb7
yuva422p c576dc435c7a22f0d17a7aec151ce26f
yuva444p d7a2d5bcdfb762f449a810856d1251fe
+yuva444p10be d7abdf80887985e81fb664564d90d658
+yuva444p10le a5381b03e4fe28249c57b87727105ae0
yuvj420p 30427bd6caf5bda93a173dbebe759e09
yuvj422p fc8288f64fd149573f73cf8da05d8e6d
yuvj440p 508ac7a9ddeb6d1794a1100ba7a1664c
diff --git a/tests/ref/lavfi/pixfmts_vflip b/tests/ref/lavfi/pixfmts_vflip
index 2b4f85b..e92430d 100644
--- a/tests/ref/lavfi/pixfmts_vflip
+++ b/tests/ref/lavfi/pixfmts_vflip
@@ -64,6 +64,8 @@ yuv444p9le 85aef13a654953d3455d89770b0d74bd
yuva420p c705d1cf061d8c6580ac690b55f92276
yuva422p 5e2c7a58eb243892c9a262947ab9b937
yuva444p 1ea8e96f8e962b09ac20a414c003ea65
+yuva444p10be a146f436c7e7e49b4c5ce3bb634c4ce8
+yuva444p10le 50bd22c82e849561e3991f1ac56390fe
yuvj420p 41fd02b204da0ab62452cd14b595e2e4
yuvj422p 7f6ca9bc1812cde02036d7d29a7cce43
yuvj440p 25711c3c0fd15ec19c59a10784fcfb96
--
1.7.7
More information about the ffmpeg-devel
mailing list