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
157 || (x)==PIX_FMT_YUV422P16BE \157 || (x)==PIX_FMT_YUV422P16BE \
158 || (x)==PIX_FMT_YUV444P16BE \158 || (x)==PIX_FMT_YUV444P16BE \
159 )159 )
160
161int sws_isSupportedInput(enum PixelFormat pix_fmt)
162{
163 return isSupportedIn(pix_fmt);
164}
165
160#define isSupportedOut(x) ( \166#define isSupportedOut(x) ( \
161 (x)==PIX_FMT_YUV420P \167 (x)==PIX_FMT_YUV420P \
162 || (x)==PIX_FMT_YUVA420P \168 || (x)==PIX_FMT_YUVA420P \
@@ -181,6 +187,12 @@ const char *swscale_license(void) · 18 unmodified lines
181 || (x)==PIX_FMT_YUV422P16BE \187 || (x)==PIX_FMT_YUV422P16BE \
182 || (x)==PIX_FMT_YUV444P16BE \188 || (x)==PIX_FMT_YUV444P16BE \
183 )189 )
190
191int sws_isSupportedOutput(enum PixelFormat pix_fmt)
192{
193 return isSupportedOut(pix_fmt);
194}
195
184#define isPacked(x) ( \196#define isPacked(x) ( \
185 (x)==PIX_FMT_PAL8 \197 (x)==PIX_FMT_PAL8 \
186 || (x)==PIX_FMT_YUYV422 \198 || (x)==PIX_FMT_YUYV422 \
libswscale/swscale.h+14−2
@@ -30,8 +30,8 @@ · 29 unmodified lines
30#include "libavutil/avutil.h"30#include "libavutil/avutil.h"
31 31
32#define LIBSWSCALE_VERSION_MAJOR 032#define LIBSWSCALE_VERSION_MAJOR 0
33#define LIBSWSCALE_VERSION_MINOR 733#define LIBSWSCALE_VERSION_MINOR 8
34#define LIBSWSCALE_VERSION_MICRO 234#define LIBSWSCALE_VERSION_MICRO 0
35 35
36#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \36#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
37 LIBSWSCALE_VERSION_MINOR, \37 LIBSWSCALE_VERSION_MINOR, \
@@ -122,6 +122,18 @@ typedef struct { · 84 unmodified lines
122 122
123struct SwsContext;123struct SwsContext;
124 124
125/**
126 * Returns a positive value if pix_fmt is a supported input format, 0
127 * otherwise.
128 */
129int 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 */
135int sws_isSupportedOutput(enum PixelFormat pix_fmt);
136
125/**137/**
126 * Frees the swscaler context swsContext.138 * Frees the swscaler context swsContext.
127 * If swsContext is NULL, then does nothing.139 * 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