Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
07f49ca1
Commit
07f49ca1
authored
Jul 25, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lsws: remove redundant macros isSupportedIn/Out
Directly call sws_isSupportedInput/Output.
parent
64bb6563
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
utils.c
libswscale/utils.c
+2
-6
No files found.
libswscale/utils.c
View file @
07f49ca1
...
@@ -140,15 +140,11 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
...
@@ -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)
...
@@ -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
(
!
isSupportedO
ut
(
dstFormat
))
{
if
(
!
sws_isSupportedOutp
ut
(
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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment