aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2016-11-14 01:55:49 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2016-11-14 10:35:06 +0100
commitb5177c7051d1bece9e26d78c9978599334e90836 (patch)
treed44bc2bc60db99ec10f52a9fa943ea236540ea17 /libswscale
parent3f1b5ca22ec372bc6d4a45694e3070b8f5d05ad3 (diff)
downloadffmpeg-b5177c7051d1bece9e26d78c9978599334e90836.tar.gz
lsws: Add GRAY10 conversion.
Based on 19be5fb7 by Luca Barbato.
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
-rw-r--r--libswscale/version.h2
5 files changed, 8 insertions, 1 deletions
diff --git a/libswscale/input.c b/libswscale/input.c
index 28f0bafce3..1f4ea18578 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_GRAY10LE:
case AV_PIX_FMT_GRAY12LE:
case AV_PIX_FMT_GRAY16LE:
c->lumToYV12 = bswap16Y_c;
@@ -1358,6 +1359,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_GRAY10BE:
case AV_PIX_FMT_GRAY12BE:
case AV_PIX_FMT_GRAY16BE:
c->lumToYV12 = bswap16Y_c;
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 9368832830..af82396b1c 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_GRAY10BE || \
+ (x) == AV_PIX_FMT_GRAY10LE || \
(x) == AV_PIX_FMT_GRAY12BE || \
(x) == AV_PIX_FMT_GRAY12LE || \
(x) == AV_PIX_FMT_GRAY16BE || \
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 6a09281e1c..b2bfc40c3d 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_GRAY10) ||
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) ||
diff --git a/libswscale/utils.c b/libswscale/utils.c
index a1d791b616..15cc56d5a4 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_GRAY10BE] = { 1, 1 },
+ [AV_PIX_FMT_GRAY10LE] = { 1, 1 },
[AV_PIX_FMT_GRAY12BE] = { 1, 1 },
[AV_PIX_FMT_GRAY12LE] = { 1, 1 },
[AV_PIX_FMT_GRAY16BE] = { 1, 1 },
diff --git a/libswscale/version.h b/libswscale/version.h
index 9832cc8145..0d67738fa4 100644
--- a/libswscale/version.h
+++ b/libswscale/version.h
@@ -28,7 +28,7 @@
#define LIBSWSCALE_VERSION_MAJOR 4
#define LIBSWSCALE_VERSION_MINOR 3
-#define LIBSWSCALE_VERSION_MICRO 100
+#define LIBSWSCALE_VERSION_MICRO 101
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
LIBSWSCALE_VERSION_MINOR, \