[FFmpeg-devel] [PATCH 6/9] avcodec/dynamic_hdr_vivid: fix base_param_Delta

Zhao Zhili quinkblack at foxmail.com
Fri Feb 24 23:08:45 EET 2023


From: Zhao Zhili <zhilizhao at tencent.com>

It conflicts the comments. The operation based on Delta_enable_mode
can be applied by user during tone mapping.

Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
---
 libavcodec/dynamic_hdr_vivid.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavcodec/dynamic_hdr_vivid.c b/libavcodec/dynamic_hdr_vivid.c
index 091963146e..f0580c498a 100644
--- a/libavcodec/dynamic_hdr_vivid.c
+++ b/libavcodec/dynamic_hdr_vivid.c
@@ -90,10 +90,7 @@ int ff_parse_itu_t_t35_to_dynamic_hdr_vivid(AVDynamicHDRVivid *s, const uint8_t
                         tm_params->base_param_k2 = get_bits(gb, 2);
                         tm_params->base_param_k3 = get_bits(gb, 4);
                         tm_params->base_param_Delta_enable_mode = get_bits(gb, 3);
-                        if (tm_params->base_param_Delta_enable_mode == 2 || tm_params->base_param_Delta_enable_mode == 6)
-                            tm_params->base_param_Delta = (AVRational){get_bits(gb, 7) * -1, base_param_Delta_den};
-                        else
-                            tm_params->base_param_Delta = (AVRational){get_bits(gb, 7), base_param_Delta_den};
+                        tm_params->base_param_Delta = (AVRational){get_bits(gb, 7), base_param_Delta_den};
 
                         if (get_bits_left(gb) < 1)
                             return AVERROR_INVALIDDATA;
-- 
2.25.1



More information about the ffmpeg-devel mailing list