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
f052b1b4
Commit
f052b1b4
authored
Mar 19, 2017
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: use a function for isGray
parent
08e1376d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
swscale_internal.h
libswscale/swscale_internal.h
+10
-17
No files found.
libswscale/swscale_internal.h
View file @
f052b1b4
...
...
@@ -687,23 +687,16 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt)
return
(
desc
->
flags
&
AV_PIX_FMT_FLAG_RGB
);
}
#if 0 // FIXME
#define isGray(x) \
(!(av_pix_fmt_desc_get(x)->flags & AV_PIX_FMT_FLAG_PAL) && \
av_pix_fmt_desc_get(x)->nb_components <= 2)
#else
#define isGray(x) \
((x) == AV_PIX_FMT_GRAY8 || \
(x) == AV_PIX_FMT_YA8 || \
(x) == AV_PIX_FMT_GRAY10BE || \
(x) == AV_PIX_FMT_GRAY10LE || \
(x) == AV_PIX_FMT_GRAY12BE || \
(x) == AV_PIX_FMT_GRAY12LE || \
(x) == AV_PIX_FMT_GRAY16BE || \
(x) == AV_PIX_FMT_GRAY16LE || \
(x) == AV_PIX_FMT_YA16BE || \
(x) == AV_PIX_FMT_YA16LE)
#endif
static
av_always_inline
int
isGray
(
enum
AVPixelFormat
pix_fmt
)
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
av_assert0
(
desc
);
return
!
(
desc
->
flags
&
AV_PIX_FMT_FLAG_PAL
)
&&
!
(
desc
->
flags
&
AV_PIX_FMT_FLAG_HWACCEL
)
&&
desc
->
nb_components
<=
2
&&
pix_fmt
!=
AV_PIX_FMT_MONOBLACK
&&
pix_fmt
!=
AV_PIX_FMT_MONOWHITE
;
}
#define isRGBinInt(x) \
( \
...
...
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