Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libplacebo
Manage
Activity
Members
Labels
Plan
Issues
54
Issue boards
Milestones
Wiki
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
libplacebo
Merge requests
!623
utils/libav: don't use deprecated side data
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
utils/libav: don't use deprecated side data
kasper93/libplacebo:lavf
into
master
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Kacper Michajłow
requested to merge
kasper93/libplacebo:lavf
into
master
1 year ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Viewing commit
7cbbc764
Show latest version
1 file
+
24
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
7cbbc764
utils/libav: don't use deprecated side data
· 7cbbc764
Kacper Michajłow
authored
1 year ago
src/include/libplacebo/utils/libav_internal.h
+
24
−
8
Options
@@ -793,29 +793,45 @@ PL_LIBAV_API void pl_frame_from_avframe(struct pl_frame *out,
}
}
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(60, 15, 100)
PL_LIBAV_API
const
uint8_t
*
pl_av_stream_get_side_data
(
const
AVStream
*
st
,
enum
AVPacketSideDataType
type
)
{
const
AVPacketSideData
*
sd
;
sd
=
av_packet_side_data_get
(
st
->
codecpar
->
coded_side_data
,
st
->
codecpar
->
nb_coded_side_data
,
type
);
return
sd
?
sd
->
data
:
NULL
;
}
#else
# define pl_av_stream_get_side_data(st, type) av_stream_get_side_data(st, type, NULL)
#endif
PL_LIBAV_API
void
pl_frame_copy_stream_props
(
struct
pl_frame
*
out
,
const
AVStream
*
stream
)
const
AVStream
*
stream
)
{
const
uint8_t
*
sd
;
if
((
sd
=
av_stream_get_side_data
(
stream
,
AV_PKT_DATA_DISPLAYMATRIX
,
NULL
)))
{
if
((
sd
=
pl_
av_stream_get_side_data
(
stream
,
AV_PKT_DATA_DISPLAYMATRIX
)))
{
double
rot
=
av_display_rotation_get
((
const
int32_t
*
)
sd
);
out
->
rotation
=
pl_rotation_normalize
(
4
.
5
-
rot
/
90
.
0
);
}
#ifdef PL_HAVE_LAV_HDR
pl_map_hdr_metadata
(
&
out
->
color
.
hdr
,
&
(
struct
pl_av_hdr_metadata
)
{
.
mdm
=
(
void
*
)
av_stream_get_side_data
(
stream
,
AV_PKT_DATA_MASTERING_DISPLAY_METADATA
,
NULL
),
.
clm
=
(
void
*
)
av_stream_get_side_data
(
stream
,
AV_PKT_DATA_CONTENT_LIGHT_LEVEL
,
NULL
),
.
mdm
=
(
void
*
)
pl_
av_stream_get_side_data
(
stream
,
AV_PKT_DATA_MASTERING_DISPLAY_METADATA
),
.
clm
=
(
void
*
)
pl_
av_stream_get_side_data
(
stream
,
AV_PKT_DATA_CONTENT_LIGHT_LEVEL
),
# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59, 2, 100)
.
dhp
=
(
void
*
)
av_stream_get_side_data
(
stream
,
AV_PKT_DATA_DYNAMIC_HDR10_PLUS
,
NULL
),
.
dhp
=
(
void
*
)
pl_
av_stream_get_side_data
(
stream
,
AV_PKT_DATA_DYNAMIC_HDR10_PLUS
),
# endif
});
#endif
}
#undef pl_av_stream_get_side_data
#ifdef PL_HAVE_LAV_DOLBY_VISION
PL_LIBAV_API
void
pl_map_dovi_metadata
(
struct
pl_dovi_metadata
*
out
,
const
AVDOVIMetadata
*
data
)
Loading