You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lsws: remove redundant macros isSupportedIn/Out
Directly call sws_isSupportedInput/Output.
This commit is contained in:
@@ -140,15 +140,11 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
|
|||||||
[PIX_FMT_YUV444P10LE] = { 1 , 0 },
|
[PIX_FMT_YUV444P10LE] = { 1 , 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
#define isSupportedIn(x) (format_entries[x].is_supported_in)
|
|
||||||
|
|
||||||
int sws_isSupportedInput(enum PixelFormat pix_fmt)
|
int sws_isSupportedInput(enum PixelFormat pix_fmt)
|
||||||
{
|
{
|
||||||
return format_entries[pix_fmt].is_supported_in;
|
return format_entries[pix_fmt].is_supported_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define isSupportedOut(x) (format_entries[x].is_supported_out)
|
|
||||||
|
|
||||||
int sws_isSupportedOutput(enum PixelFormat pix_fmt)
|
int sws_isSupportedOutput(enum PixelFormat pix_fmt)
|
||||||
{
|
{
|
||||||
return format_entries[pix_fmt].is_supported_out;
|
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);
|
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));
|
av_log(c, AV_LOG_ERROR, "%s is not supported as input pixel format\n", av_get_pix_fmt_name(srcFormat));
|
||||||
return AVERROR(EINVAL);
|
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));
|
av_log(c, AV_LOG_ERROR, "%s is not supported as output pixel format\n", av_get_pix_fmt_name(dstFormat));
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user