[FFmpeg-devel] [PATCH v2 3/9] avfilter/vf_showinfo: fix HDR vivid info
Zhao Zhili
quinkblack at foxmail.com
Fri Feb 24 17:52:16 EET 2023
From: Zhao Zhili <zhilizhao at tencent.com>
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
---
libavfilter/vf_showinfo.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index e55625b338..7cf71fe40c 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -354,19 +354,21 @@ static void dump_dynamic_hdr_vivid(AVFilterContext *ctx, AVFrameSideData *sd)
av_log(ctx, AV_LOG_INFO, "3Spline_enable_flag[%d][%d]: %d, ",
w, i, tm_params->three_Spline_enable_flag);
if (tm_params->three_Spline_enable_flag) {
- av_log(ctx, AV_LOG_INFO, "3Spline_TH_mode[%d][%d]: %d, ", w, i, tm_params->three_Spline_TH_mode);
-
for (int j = 0; j < tm_params->three_Spline_num; j++) {
- av_log(ctx, AV_LOG_INFO, "3Spline_TH_enable_MB[%d][%d][%d]: %.4f, ",
- w, i, j, av_q2d(tm_params->three_Spline_TH_enable_MB));
+ const AVHDRVivid3SplineParams *three_spline = &tm_params->three_spline[j];
+ av_log(ctx, AV_LOG_INFO, "3Spline_TH_mode[%d][%d]: %d, ", w, i, three_spline->th_mode);
+ if (three_spline->th_mode == 0 || three_spline->th_mode == 2) {
+ av_log(ctx, AV_LOG_INFO, "3Spline_TH_enable_MB[%d][%d][%d]: %.4f, ",
+ w, i, j, av_q2d(three_spline->th_enable_mb));
+ }
av_log(ctx, AV_LOG_INFO, "3Spline_TH_enable[%d][%d][%d]: %.4f, ",
- w, i, j, av_q2d(tm_params->three_Spline_TH_enable));
+ w, i, j, av_q2d(three_spline->th_enable));
av_log(ctx, AV_LOG_INFO, "3Spline_TH_Delta1[%d][%d][%d]: %.4f, ",
- w, i, j, av_q2d(tm_params->three_Spline_TH_Delta1));
+ w, i, j, av_q2d(three_spline->th_delta1));
av_log(ctx, AV_LOG_INFO, "3Spline_TH_Delta2[%d][%d][%d]: %.4f, ",
- w, i, j, av_q2d(tm_params->three_Spline_TH_Delta2));
+ w, i, j, av_q2d(three_spline->th_delta2));
av_log(ctx, AV_LOG_INFO, "3Spline_enable_Strength[%d][%d][%d]: %.4f, ",
- w, i, j, av_q2d(tm_params->three_Spline_enable_Strength));
+ w, i, j, av_q2d(three_spline->enable_strength));
}
}
}
--
2.34.1
More information about the ffmpeg-devel
mailing list