[FFmpeg-cvslog] lsws: remove redundant macros isSupportedIn/Out

Stefano Sabatini git at videolan.org
Wed Jul 27 01:52:06 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Mon Jul 25 13:04:11 2011 +0200| [07f49ca1d1027f57400acbf7ca1aada9a1812648] | committer: Stefano Sabatini

lsws: remove redundant macros isSupportedIn/Out

Directly call sws_isSupportedInput/Output.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07f49ca1d1027f57400acbf7ca1aada9a1812648
---

 libswscale/utils.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 8cb6f5f..7e8d971 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -140,15 +140,11 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
     [PIX_FMT_YUV444P10LE] = { 1 , 0 },
 };
 
-#define isSupportedIn(x) (format_entries[x].is_supported_in)
-
 int sws_isSupportedInput(enum PixelFormat pix_fmt)
 {
     return format_entries[pix_fmt].is_supported_in;
 }
 
-#define isSupportedOut(x) (format_entries[x].is_supported_out)
-
 int sws_isSupportedOutput(enum PixelFormat pix_fmt)
 {
     return format_entries[pix_fmt].is_supported_out;
@@ -759,11 +755,11 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
 
     unscaled = (srcW == dstW && srcH == dstH);
 
-    if (!isSupportedIn(srcFormat)) {
+    if (!sws_isSupportedInput(srcFormat)) {
         av_log(c, AV_LOG_ERROR, "%s is not supported as input pixel format\n", av_get_pix_fmt_name(srcFormat));
         return AVERROR(EINVAL);
     }
-    if (!isSupportedOut(dstFormat)) {
+    if (!sws_isSupportedOutput(dstFormat)) {
         av_log(c, AV_LOG_ERROR, "%s is not supported as output pixel format\n", av_get_pix_fmt_name(dstFormat));
         return AVERROR(EINVAL);
     }



More information about the ffmpeg-cvslog mailing list