Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
ff6bc16c
Commit
ff6bc16c
authored
Mar 19, 2017
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: use a (more correct) function for isPacked
parent
2b9a52bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
18 deletions
+22
-18
swscale_internal.h
libswscale/swscale_internal.h
+3
-18
sws-pixdesc-query
tests/ref/fate/sws-pixdesc-query
+19
-0
No files found.
libswscale/swscale_internal.h
View file @
ff6bc16c
...
@@ -784,30 +784,15 @@ static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)
...
@@ -784,30 +784,15 @@ static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)
return
desc
->
flags
&
AV_PIX_FMT_FLAG_ALPHA
;
return
desc
->
flags
&
AV_PIX_FMT_FLAG_ALPHA
;
}
}
#if 1
#define isPacked(x) ( \
(x)==AV_PIX_FMT_PAL8 \
|| (x)==AV_PIX_FMT_YUYV422 \
|| (x)==AV_PIX_FMT_YVYU422 \
|| (x)==AV_PIX_FMT_UYVY422 \
|| (x)==AV_PIX_FMT_YA8 \
|| (x)==AV_PIX_FMT_YA16LE \
|| (x)==AV_PIX_FMT_YA16BE \
|| (x)==AV_PIX_FMT_AYUV64LE \
|| (x)==AV_PIX_FMT_AYUV64BE \
|| isRGBinInt(x) \
|| isBGRinInt(x) \
)
#else
static
av_always_inline
int
isPacked
(
enum
AVPixelFormat
pix_fmt
)
static
av_always_inline
int
isPacked
(
enum
AVPixelFormat
pix_fmt
)
{
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
av_assert0
(
desc
);
av_assert0
(
desc
);
return
((
desc
->
nb_components
>=
2
&&
!
(
desc
->
flags
&
AV_PIX_FMT_FLAG_PLANAR
))
||
return
(
desc
->
nb_components
>=
2
&&
!
(
desc
->
flags
&
AV_PIX_FMT_FLAG_PLANAR
))
||
pix_fmt
==
AV_PIX_FMT_PAL8
);
pix_fmt
==
AV_PIX_FMT_PAL8
||
pix_fmt
==
AV_PIX_FMT_MONOBLACK
||
pix_fmt
==
AV_PIX_FMT_MONOWHITE
;
}
}
#endif
static
av_always_inline
int
isPlanar
(
enum
AVPixelFormat
pix_fmt
)
static
av_always_inline
int
isPlanar
(
enum
AVPixelFormat
pix_fmt
)
{
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
...
...
tests/ref/fate/sws-pixdesc-query
View file @
ff6bc16c
...
@@ -594,6 +594,7 @@ Packed:
...
@@ -594,6 +594,7 @@ Packed:
monob
monob
pal8
pal8
uyvy422
uyvy422
uyyvyy411
bgr8
bgr8
bgr4
bgr4
bgr4_byte
bgr4_byte
...
@@ -621,6 +622,8 @@ Packed:
...
@@ -621,6 +622,8 @@ Packed:
ya8
ya8
bgr48be
bgr48be
bgr48le
bgr48le
xyz12le
xyz12be
rgba64be
rgba64be
rgba64le
rgba64le
bgra64be
bgra64be
...
@@ -628,6 +631,22 @@ Packed:
...
@@ -628,6 +631,22 @@ Packed:
yvyu422
yvyu422
ya16be
ya16be
ya16le
ya16le
0rgb
rgb0
0bgr
bgr0
bayer_bggr8
bayer_rggb8
bayer_gbrg8
bayer_grbg8
bayer_bggr16le
bayer_bggr16be
bayer_rggb16le
bayer_rggb16be
bayer_gbrg16le
bayer_gbrg16be
bayer_grbg16le
bayer_grbg16be
ayuv64le
ayuv64le
ayuv64be
ayuv64be
...
...
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