[FFmpeg-devel] [PATCH 1/3] avcodec/h2645_sei: move some common SEI syncing code to ff_h2645_sei_ctx_replace()
James Almer
jamrial at gmail.com
Tue Nov 12 19:22:42 EET 2024
Instead of duplicating it across all supported decoders.
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/h2645_sei.c | 3 +++
libavcodec/h264_slice.c | 2 --
libavcodec/hevc/hevcdec.c | 2 --
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/libavcodec/h2645_sei.c b/libavcodec/h2645_sei.c
index 62369dd37f..986d1d250a 100644
--- a/libavcodec/h2645_sei.c
+++ b/libavcodec/h2645_sei.c
@@ -556,6 +556,9 @@ int ff_h2645_sei_ctx_replace(H2645SEI *dst, const H2645SEI *src)
}
dst->aom_film_grain.enable = src->aom_film_grain.enable;
+ dst->mastering_display = src->mastering_display;
+ dst->content_light = src->content_light;
+
ff_refstruct_replace(&dst->film_grain_characteristics,
src->film_grain_characteristics);
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 84595b1a8b..08376ffa6d 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -442,8 +442,6 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
return ret;
h->sei.common.unregistered.x264_build = h1->sei.common.unregistered.x264_build;
- h->sei.common.mastering_display = h1->sei.common.mastering_display;
- h->sei.common.content_light = h1->sei.common.content_light;
if (!h->cur_pic_ptr)
return 0;
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 19080255cb..fe8897fb6e 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -4003,8 +4003,6 @@ static int hevc_update_thread_context(AVCodecContext *dst,
s->sei.common.frame_packing = s0->sei.common.frame_packing;
s->sei.common.display_orientation = s0->sei.common.display_orientation;
s->sei.common.alternative_transfer = s0->sei.common.alternative_transfer;
- s->sei.common.mastering_display = s0->sei.common.mastering_display;
- s->sei.common.content_light = s0->sei.common.content_light;
s->sei.tdrdi = s0->sei.tdrdi;
return 0;
--
2.47.0
More information about the ffmpeg-devel
mailing list