mp_image: add no_dovi / no_enhancement_layer params
This commit is contained in:
1 parent
0480011ac4
commit
81037dae3a
3 files changed
+15
-1
No files matched your search
@@ -186,10 +186,17 @@ static void vf_format_process(struct mp_filter *f)
|
||||
.clm = get_side_data(img, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL),
|
||||
.dhp = get_side_data(img, AV_FRAME_DATA_DYNAMIC_HDR_PLUS),
|
||||
});
|
||||
// Tell the f_enhancement_pair filter to not inherit DV metadata
|
||||
// from the EL.
|
||||
img->params.no_dovi = true;
|
||||
}
|
||||
|
||||
if (!priv->opts->enhancement_layer)
|
||||
if (!priv->opts->enhancement_layer) {
|
||||
// This is no-op, but just in case. f_enhancement_pair runs at the
|
||||
// end of chain.
|
||||
mp_image_unrefp(&img->enhancement_layer);
|
||||
img->params.no_enhancement_layer = true;
|
||||
}
|
||||
|
||||
if (!priv->opts->hdr10plus) {
|
||||
memset(img->params.color.hdr.scene_max, 0,
|
||||
|
||||
@@ -561,6 +561,8 @@ void mp_image_copy_attributes(struct mp_image *dst, struct mp_image *src)
|
||||
dst->params.primaries_orig = src->params.primaries_orig;
|
||||
dst->params.transfer_orig = src->params.transfer_orig;
|
||||
dst->params.sys_orig = src->params.sys_orig;
|
||||
dst->params.no_dovi = src->params.no_dovi;
|
||||
dst->params.no_enhancement_layer = src->params.no_enhancement_layer;
|
||||
|
||||
// ensure colorspace consistency
|
||||
enum pl_color_system dst_forced_csp = mp_image_params_get_forced_csp(&dst->params);
|
||||
@@ -1132,6 +1134,8 @@ struct mp_image *mp_image_from_av_frame(struct AVFrame *src)
|
||||
dst->params.stereo3d = p->stereo3d;
|
||||
// Might be incorrect if colorspace changes.
|
||||
dst->params.light = p->light;
|
||||
dst->params.no_dovi = p->no_dovi;
|
||||
dst->params.no_enhancement_layer = p->no_enhancement_layer;
|
||||
#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(60, 11, 100)
|
||||
dst->params.repr.alpha = p->repr.alpha;
|
||||
#endif
|
||||
|
||||
@@ -63,6 +63,9 @@ struct mp_image_params {
|
||||
int rotate;
|
||||
enum mp_stereo3d_mode stereo3d; // image is encoded with this mode
|
||||
struct mp_rect crop; // crop applied on image
|
||||
// Flags for f_enhancement_pair.c to not inherit flags from EL.
|
||||
bool no_dovi;
|
||||
bool no_enhancement_layer;
|
||||
};
|
||||
|
||||
/* Memory management:
|
||||
|
||||
Reference in new issue
Block a user