[FFmpeg-devel,1/3] avcodec/h2645_sei: move some common SEI syncing code to ff_h2645_sei_ctx_replace()
Checks
Context |
Check |
Description |
yinshiyou/make_loongarch64 |
success
|
Make finished
|
yinshiyou/make_fate_loongarch64 |
success
|
Make fate finished
|
Commit Message
Instead of duplicating it across all supported decoders.
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavcodec/h2645_sei.c | 3 +++
libavcodec/h264_slice.c | 2 --
libavcodec/hevc/hevcdec.c | 2 --
3 files changed, 3 insertions(+), 4 deletions(-)
@@ -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);
@@ -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;
@@ -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;