History

Implement sws_isSupportedInput() and sws_isSupportedOutput().

Originally committed as revision 30236 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

Stefano Sabatini committed 16 years ago

Commit 8e9767f1 parent 31c194e2 files · +26 −2Browse files

Unified · Split

2 files
  1. libswscale/swscale.c +12 −0
  2. libswscale/swscale.h +14 −2
libswscale/swscale.c+12−0
@@ -157,6 +157,12 @@ const char *swscale_license(void) · 156 unmodified lines
157157 || (x)==PIX_FMT_YUV422P16BE \
158158 || (x)==PIX_FMT_YUV444P16BE \
159159 )
160+
161+int sws_isSupportedInput(enum PixelFormat pix_fmt)
162+{
163+ return isSupportedIn(pix_fmt);
164+}
165+
160166 #define isSupportedOut(x) ( \
161167 (x)==PIX_FMT_YUV420P \
162168 || (x)==PIX_FMT_YUVA420P \
@@ -181,6 +187,12 @@ const char *swscale_license(void) · 18 unmodified lines
181187 || (x)==PIX_FMT_YUV422P16BE \
182188 || (x)==PIX_FMT_YUV444P16BE \
183189 )
190+
191+int sws_isSupportedOutput(enum PixelFormat pix_fmt)
192+{
193+ return isSupportedOut(pix_fmt);
194+}
195+
184196 #define isPacked(x) ( \
185197 (x)==PIX_FMT_PAL8 \
186198 || (x)==PIX_FMT_YUYV422 \
libswscale/swscale.h+14−2
@@ -30,8 +30,8 @@ · 29 unmodified lines
3030 #include "libavutil/avutil.h"
3131
3232 #define LIBSWSCALE_VERSION_MAJOR 0
33−#define LIBSWSCALE_VERSION_MINOR 7
34−#define LIBSWSCALE_VERSION_MICRO 2
33+#define LIBSWSCALE_VERSION_MINOR 8
34+#define LIBSWSCALE_VERSION_MICRO 0
3535
3636 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
3737 LIBSWSCALE_VERSION_MINOR, \
@@ -122,6 +122,18 @@ typedef struct { · 84 unmodified lines
122122
123123 struct SwsContext;
124124
125+/**
126+ * Returns a positive value if pix_fmt is a supported input format, 0
127+ * otherwise.
128+ */
129+int sws_isSupportedInput(enum PixelFormat pix_fmt);
130+
131+/**
132+ * Returns a positive value if pix_fmt is a supported output format, 0
133+ * otherwise.
134+ */
135+int sws_isSupportedOutput(enum PixelFormat pix_fmt);
136+
125137 /**
126138 * Frees the swscaler context swsContext.
127139 * If swsContext is NULL, then does nothing.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t