aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2016-11-03 16:10:03 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-11-10 00:49:29 +0100
commit19be5fb7286b02fbe384f12fe4aa5c376d43d2e1 (patch)
tree2b226ee8d812d9d4f071074a542966e3e4770bd6 /libswscale
parent638b216d4f54a330d0fad6cc7e1f4ec066594abe (diff)
downloadffmpeg-19be5fb7286b02fbe384f12fe4aa5c376d43d2e1.tar.gz
swscale: Add GRAY12
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/input.c2
-rw-r--r--libswscale/swscale_internal.h2
-rw-r--r--libswscale/swscale_unscaled.c1
-rw-r--r--libswscale/utils.c2
4 files changed, 7 insertions, 0 deletions
diff --git a/libswscale/input.c b/libswscale/input.c
index 62480c256b..28f0bafce3 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -1323,6 +1323,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
case AV_PIX_FMT_YUV422P16LE:
case AV_PIX_FMT_YUV444P16LE:
+ case AV_PIX_FMT_GRAY12LE:
case AV_PIX_FMT_GRAY16LE:
c->lumToYV12 = bswap16Y_c;
break;
@@ -1357,6 +1358,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
case AV_PIX_FMT_YUV422P16BE:
case AV_PIX_FMT_YUV444P16BE:
+ case AV_PIX_FMT_GRAY12BE:
case AV_PIX_FMT_GRAY16BE:
c->lumToYV12 = bswap16Y_c;
break;
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index a892a4f97c..9368832830 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -695,6 +695,8 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt)
#define isGray(x) \
((x) == AV_PIX_FMT_GRAY8 || \
(x) == AV_PIX_FMT_YA8 || \
+ (x) == AV_PIX_FMT_GRAY12BE || \
+ (x) == AV_PIX_FMT_GRAY12LE || \
(x) == AV_PIX_FMT_GRAY16BE || \
(x) == AV_PIX_FMT_GRAY16LE || \
(x) == AV_PIX_FMT_YA16BE || \
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index e46763c8c1..6a09281e1c 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -1796,6 +1796,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR555) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR565) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGRA64) ||
+ IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GRAY12) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GRAY16) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_YA16) ||
IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_AYUV64) ||
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 4dea1ef19f..a1d791b616 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -131,6 +131,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
[AV_PIX_FMT_RGB0] = { 1, 1 },
[AV_PIX_FMT_0BGR] = { 1, 1 },
[AV_PIX_FMT_BGR0] = { 1, 1 },
+ [AV_PIX_FMT_GRAY12BE] = { 1, 1 },
+ [AV_PIX_FMT_GRAY12LE] = { 1, 1 },
[AV_PIX_FMT_GRAY16BE] = { 1, 1 },
[AV_PIX_FMT_GRAY16LE] = { 1, 1 },
[AV_PIX_FMT_YUV440P] = { 1, 1 },