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
56b081da
Commit
56b081da
authored
Apr 19, 2018
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/pixdesc: add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
4c501baf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
17 deletions
+7
-17
APIchanges
doc/APIchanges
+3
-0
imgconvert.c
libavcodec/tests/imgconvert.c
+0
-4
pixdesc.c
libavutil/pixdesc.c
+1
-2
pixdesc.h
libavutil/pixdesc.h
+2
-6
pixdesc.c
libavutil/tests/pixdesc.c
+0
-4
version.h
libavutil/version.h
+1
-1
No files found.
doc/APIchanges
View file @
56b081da
...
@@ -15,6 +15,9 @@ libavutil: 2017-10-21
...
@@ -15,6 +15,9 @@ libavutil: 2017-10-21
API changes, most recent first:
API changes, most recent first:
2018-04-xx - xxxxxxxxxx - lavu 56.18.100 - pixdesc.h
Add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8.
2018-04-xx - xxxxxxxxxx - lavu 56.17.100 - opt.h
2018-04-xx - xxxxxxxxxx - lavu 56.17.100 - opt.h
Add AV_OPT_FLAG_DEPRECATED.
Add AV_OPT_FLAG_DEPRECATED.
...
...
libavcodec/tests/imgconvert.c
View file @
56b081da
...
@@ -39,10 +39,6 @@ int main(void){
...
@@ -39,10 +39,6 @@ int main(void){
skip
=
0
;
skip
=
0
;
}
}
av_log
(
NULL
,
AV_LOG_INFO
,
"pix fmt %s yuv_plan:%d avg_bpp:%d
\n
"
,
desc
->
name
,
is_yuv_planar
(
desc
),
av_get_padded_bits_per_pixel
(
desc
));
av_log
(
NULL
,
AV_LOG_INFO
,
"pix fmt %s yuv_plan:%d avg_bpp:%d
\n
"
,
desc
->
name
,
is_yuv_planar
(
desc
),
av_get_padded_bits_per_pixel
(
desc
));
if
((
!
(
desc
->
flags
&
AV_PIX_FMT_FLAG_ALPHA
))
!=
(
desc
->
nb_components
!=
2
&&
desc
->
nb_components
!=
4
))
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Alpha flag mismatch
\n
"
);
err
=
1
;
}
}
}
return
err
;
return
err
;
}
}
...
...
libavutil/pixdesc.c
View file @
56b081da
...
@@ -288,7 +288,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
...
@@ -288,7 +288,7 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.
comp
=
{
.
comp
=
{
{
0
,
1
,
0
,
0
,
8
,
0
,
7
,
1
},
{
0
,
1
,
0
,
0
,
8
,
0
,
7
,
1
},
},
},
.
flags
=
AV_PIX_FMT_FLAG_PAL
,
.
flags
=
AV_PIX_FMT_FLAG_PAL
|
AV_PIX_FMT_FLAG_ALPHA
,
},
},
[
AV_PIX_FMT_YUVJ420P
]
=
{
[
AV_PIX_FMT_YUVJ420P
]
=
{
.
name
=
"yuvj420p"
,
.
name
=
"yuvj420p"
,
...
@@ -2432,7 +2432,6 @@ void ff_check_pixfmt_descriptors(void){
...
@@ -2432,7 +2432,6 @@ void ff_check_pixfmt_descriptors(void){
av_assert0
(
d
->
log2_chroma_h
<=
3
);
av_assert0
(
d
->
log2_chroma_h
<=
3
);
av_assert0
(
d
->
nb_components
<=
4
);
av_assert0
(
d
->
nb_components
<=
4
);
av_assert0
(
d
->
name
&&
d
->
name
[
0
]);
av_assert0
(
d
->
name
&&
d
->
name
[
0
]);
av_assert0
((
d
->
nb_components
==
4
||
d
->
nb_components
==
2
)
==
!!
(
d
->
flags
&
AV_PIX_FMT_FLAG_ALPHA
));
av_assert2
(
av_get_pix_fmt
(
d
->
name
)
==
i
);
av_assert2
(
av_get_pix_fmt
(
d
->
name
)
==
i
);
for
(
j
=
0
;
j
<
FF_ARRAY_ELEMS
(
d
->
comp
);
j
++
)
{
for
(
j
=
0
;
j
<
FF_ARRAY_ELEMS
(
d
->
comp
);
j
++
)
{
...
...
libavutil/pixdesc.h
View file @
56b081da
...
@@ -167,12 +167,8 @@ typedef struct AVPixFmtDescriptor {
...
@@ -167,12 +167,8 @@ typedef struct AVPixFmtDescriptor {
/**
/**
* The pixel format has an alpha channel. This is set on all formats that
* The pixel format has an alpha channel. This is set on all formats that
* support alpha in some way. The exception is AV_PIX_FMT_PAL8, which can
* support alpha in some way, including AV_PIX_FMT_PAL8. The alpha is always
* carry alpha as part of the palette. Details are explained in the
* straight, never pre-multiplied.
* AVPixelFormat enum, and are also encoded in the corresponding
* AVPixFmtDescriptor.
*
* The alpha is always straight, never pre-multiplied.
*
*
* If a codec or a filter does not support alpha, it should set all alpha to
* If a codec or a filter does not support alpha, it should set all alpha to
* opaque, or use the equivalent pixel formats without alpha component, e.g.
* opaque, or use the equivalent pixel formats without alpha component, e.g.
...
...
libavutil/tests/pixdesc.c
View file @
56b081da
...
@@ -37,10 +37,6 @@ int main(void){
...
@@ -37,10 +37,6 @@ int main(void){
skip
=
0
;
skip
=
0
;
}
}
av_log
(
NULL
,
AV_LOG_INFO
,
"pix fmt %s avg_bpp:%d colortype:%d
\n
"
,
desc
->
name
,
av_get_padded_bits_per_pixel
(
desc
),
get_color_type
(
desc
));
av_log
(
NULL
,
AV_LOG_INFO
,
"pix fmt %s avg_bpp:%d colortype:%d
\n
"
,
desc
->
name
,
av_get_padded_bits_per_pixel
(
desc
),
get_color_type
(
desc
));
if
((
!
(
desc
->
flags
&
AV_PIX_FMT_FLAG_ALPHA
))
!=
(
desc
->
nb_components
!=
2
&&
desc
->
nb_components
!=
4
))
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Alpha flag mismatch
\n
"
);
err
=
1
;
}
}
}
return
err
;
return
err
;
}
}
libavutil/version.h
View file @
56b081da
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
*/
*/
#define LIBAVUTIL_VERSION_MAJOR 56
#define LIBAVUTIL_VERSION_MAJOR 56
#define LIBAVUTIL_VERSION_MINOR 1
7
#define LIBAVUTIL_VERSION_MINOR 1
8
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
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