Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
2e24c12a
Commit
2e24c12a
authored
Oct 04, 2023
by
Niklas Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/h2645_sei: decode AFGS1 T.35 SEI
I restricted this SEI to HEVC for now, until I see a H.264 sample.
parent
f50382cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
Makefile
libavcodec/Makefile
+1
-1
h2645_sei.c
libavcodec/h2645_sei.c
+25
-0
h2645_sei.h
libavcodec/h2645_sei.h
+3
-0
No files found.
libavcodec/Makefile
View file @
2e24c12a
...
...
@@ -105,7 +105,7 @@ OBJS-$(CONFIG_H264_SEI) += h264_sei.o h2645_sei.o
OBJS-$(CONFIG_HEVCPARSE)
+=
hevc_parse.o
hevc_ps.o
hevc_data.o
\
h2645data.o
h2645_parse.o
h2645_vui.o
OBJS-$(CONFIG_HEVC_SEI)
+=
hevc_sei.o
h2645_sei.o
\
dynamic_hdr_vivid.o
dynamic_hdr_vivid.o
aom_film_grain.o
OBJS-$(CONFIG_HPELDSP)
+=
hpeldsp.o
OBJS-$(CONFIG_HUFFMAN)
+=
huffman.o
OBJS-$(CONFIG_HUFFYUVDSP)
+=
huffyuvdsp.o
...
...
libavcodec/h2645_sei.c
View file @
2e24c12a
...
...
@@ -211,6 +211,24 @@ static int decode_registered_user_data(H2645SEI *h, GetByteContext *gb,
}
break
;
}
case
0x5890
:
{
// aom_provider_code
const
uint16_t
aom_grain_provider_oriented_code
=
0x0001
;
uint16_t
provider_oriented_code
;
if
(
!
IS_HEVC
(
codec_id
))
goto
unsupported_provider_code
;
if
(
bytestream2_get_bytes_left
(
gb
)
<
2
)
return
AVERROR_INVALIDDATA
;
provider_oriented_code
=
bytestream2_get_byteu
(
gb
);
if
(
provider_oriented_code
==
aom_grain_provider_oriented_code
)
{
return
ff_aom_parse_film_grain_sets
(
&
h
->
aom_film_grain
,
gb
->
buffer
,
bytestream2_get_bytes_left
(
gb
));
}
break
;
}
unsupported_provider_code:
#endif
default:
...
...
@@ -704,6 +722,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx
->
properties
|=
FF_CODEC_PROPERTY_FILM_GRAIN
;
}
#if CONFIG_HEVC_SEI
ret
=
ff_aom_attach_film_grain_sets
(
&
sei
->
aom_film_grain
,
frame
);
if
(
ret
<
0
)
return
ret
;
#endif
if
(
sei
->
ambient_viewing_environment
.
present
)
{
H2645SEIAmbientViewingEnvironment
*
env
=
&
sei
->
ambient_viewing_environment
;
...
...
@@ -800,4 +824,5 @@ void ff_h2645_sei_reset(H2645SEI *s)
s
->
ambient_viewing_environment
.
present
=
0
;
s
->
mastering_display
.
present
=
0
;
s
->
content_light
.
present
=
0
;
s
->
aom_film_grain
.
enable
=
0
;
}
libavcodec/h2645_sei.h
View file @
2e24c12a
...
...
@@ -23,7 +23,9 @@
#include "libavutil/buffer.h"
#include "libavutil/frame.h"
#include "libavutil/film_grain_params.h"
#include "aom_film_grain.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_id.h"
...
...
@@ -132,6 +134,7 @@ typedef struct H2645SEI {
H2645SEIAmbientViewingEnvironment
ambient_viewing_environment
;
H2645SEIMasteringDisplay
mastering_display
;
H2645SEIContentLight
content_light
;
AVFilmGrainAFGS1Params
aom_film_grain
;
}
H2645SEI
;
enum
{
...
...
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