mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-28 11:27:30 +08:00
Implement sws_isSupportedInput() and sws_isSupportedOutput().
Originally committed as revision 30236 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
@ -157,6 +157,12 @@ const char *swscale_license(void)
|
|||||||
|| (x)==PIX_FMT_YUV422P16BE \
|
|| (x)==PIX_FMT_YUV422P16BE \
|
||||||
|| (x)==PIX_FMT_YUV444P16BE \
|
|| (x)==PIX_FMT_YUV444P16BE \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
int sws_isSupportedInput(enum PixelFormat pix_fmt)
|
||||||
|
{
|
||||||
|
return isSupportedIn(pix_fmt);
|
||||||
|
}
|
||||||
|
|
||||||
#define isSupportedOut(x) ( \
|
#define isSupportedOut(x) ( \
|
||||||
(x)==PIX_FMT_YUV420P \
|
(x)==PIX_FMT_YUV420P \
|
||||||
|| (x)==PIX_FMT_YUVA420P \
|
|| (x)==PIX_FMT_YUVA420P \
|
||||||
@ -181,6 +187,12 @@ const char *swscale_license(void)
|
|||||||
|| (x)==PIX_FMT_YUV422P16BE \
|
|| (x)==PIX_FMT_YUV422P16BE \
|
||||||
|| (x)==PIX_FMT_YUV444P16BE \
|
|| (x)==PIX_FMT_YUV444P16BE \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
int sws_isSupportedOutput(enum PixelFormat pix_fmt)
|
||||||
|
{
|
||||||
|
return isSupportedOut(pix_fmt);
|
||||||
|
}
|
||||||
|
|
||||||
#define isPacked(x) ( \
|
#define isPacked(x) ( \
|
||||||
(x)==PIX_FMT_PAL8 \
|
(x)==PIX_FMT_PAL8 \
|
||||||
|| (x)==PIX_FMT_YUYV422 \
|
|| (x)==PIX_FMT_YUYV422 \
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
#include "libavutil/avutil.h"
|
#include "libavutil/avutil.h"
|
||||||
|
|
||||||
#define LIBSWSCALE_VERSION_MAJOR 0
|
#define LIBSWSCALE_VERSION_MAJOR 0
|
||||||
#define LIBSWSCALE_VERSION_MINOR 7
|
#define LIBSWSCALE_VERSION_MINOR 8
|
||||||
#define LIBSWSCALE_VERSION_MICRO 2
|
#define LIBSWSCALE_VERSION_MICRO 0
|
||||||
|
|
||||||
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
|
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
|
||||||
LIBSWSCALE_VERSION_MINOR, \
|
LIBSWSCALE_VERSION_MINOR, \
|
||||||
@ -122,6 +122,18 @@ typedef struct {
|
|||||||
|
|
||||||
struct SwsContext;
|
struct SwsContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a positive value if pix_fmt is a supported input format, 0
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
int sws_isSupportedInput(enum PixelFormat pix_fmt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a positive value if pix_fmt is a supported output format, 0
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
int sws_isSupportedOutput(enum PixelFormat pix_fmt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Frees the swscaler context swsContext.
|
* Frees the swscaler context swsContext.
|
||||||
* If swsContext is NULL, then does nothing.
|
* If swsContext is NULL, then does nothing.
|
||||||
|
Reference in New Issue
Block a user