[FFmpeg-devel] [PATCH] sws: Extend API to allow specifying partially supported formats.
Michael Niedermayer
michaelni at gmx.at
Sun Apr 28 16:14:17 CEST 2013
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libswscale/swscale.h | 2 ++
libswscale/utils.c | 4 ++--
libswscale/version.h | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/libswscale/swscale.h b/libswscale/swscale.h
index 5f6ae0f..4d260e8 100644
--- a/libswscale/swscale.h
+++ b/libswscale/swscale.h
@@ -137,12 +137,14 @@ struct SwsContext;
/**
* Return a positive value if pix_fmt is a supported input format, 0
* otherwise.
+ * A negative value is returned if the format is partially supported.
*/
int sws_isSupportedInput(enum AVPixelFormat pix_fmt);
/**
* Return a positive value if pix_fmt is a supported output format, 0
* otherwise.
+ * A negative value is returned if the format is partially supported.
*/
int sws_isSupportedOutput(enum AVPixelFormat pix_fmt);
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 94a43a2..4c6c767 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -196,8 +196,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
[AV_PIX_FMT_GBRP14BE] = { 1, 1 },
[AV_PIX_FMT_GBRP16LE] = { 1, 0 },
[AV_PIX_FMT_GBRP16BE] = { 1, 0 },
- [AV_PIX_FMT_XYZ12BE] = { 1, 0 },
- [AV_PIX_FMT_XYZ12LE] = { 0, 1 },
+ [AV_PIX_FMT_XYZ12BE] = {-1, 0 },
+ [AV_PIX_FMT_XYZ12LE] = { 0,-1 },
};
int sws_isSupportedInput(enum AVPixelFormat pix_fmt)
diff --git a/libswscale/version.h b/libswscale/version.h
index c430f2d..3e95905 100644
--- a/libswscale/version.h
+++ b/libswscale/version.h
@@ -28,7 +28,7 @@
#define LIBSWSCALE_VERSION_MAJOR 2
#define LIBSWSCALE_VERSION_MINOR 2
-#define LIBSWSCALE_VERSION_MICRO 100
+#define LIBSWSCALE_VERSION_MICRO 101
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
LIBSWSCALE_VERSION_MINOR, \
--
1.7.9.5
More information about the ffmpeg-devel
mailing list