[FFmpeg-cvslog] avfilter/vf_showinfo: small adjustments for the HDR10+ dump
Limin Wang
git at videolan.org
Wed Oct 20 17:51:17 EEST 2021
ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Wed Oct 13 19:20:29 2021 +0800| [b22b8e5489bcd4c19ca6beecf1ec055f39cb5c59] | committer: Limin Wang
avfilter/vf_showinfo: small adjustments for the HDR10+ dump
summary for the adjustments:
1, remove the extra "," in the ,}
...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013,}
to
...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013}
2, add "," between the } and new field
} fraction_bright_pixels
to
}, fraction_bright_pixels
3, remove the extra space between "} }"
...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013,} }
to
...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013,}}
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b22b8e5489bcd4c19ca6beecf1ec055f39cb5c59
---
libavfilter/vf_showinfo.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index c8c7b986b5..ff438e70c6 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -221,7 +221,7 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd)
av_log(ctx, AV_LOG_INFO, "num_windows: %d, ", hdr_plus->num_windows);
for (int w = 1; w < hdr_plus->num_windows; w++) {
AVHDRPlusColorTransformParams *params = &hdr_plus->params[w];
- av_log(ctx, AV_LOG_INFO, "window %d { ", w);
+ av_log(ctx, AV_LOG_INFO, w > 1 ? ", window %d { " : "window %d { ", w);
av_log(ctx, AV_LOG_INFO, "window_upper_left_corner: (%5.4f,%5.4f),",
av_q2d(params->window_upper_left_corner_x),
av_q2d(params->window_upper_left_corner_y));
@@ -242,7 +242,7 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd)
params->semimajor_axis_external_ellipse);
av_log(ctx, AV_LOG_INFO, "semiminor_axis_external_ellipse: %d, ",
params->semiminor_axis_external_ellipse);
- av_log(ctx, AV_LOG_INFO, "overlap_process_option: %d}, ",
+ av_log(ctx, AV_LOG_INFO, "overlap_process_option: %d}",
params->overlap_process_option);
}
av_log(ctx, AV_LOG_INFO, "targeted_system_display_maximum_luminance: %9.4f, ",
@@ -252,7 +252,7 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd)
for (int i = 0; i < hdr_plus->num_rows_targeted_system_display_actual_peak_luminance; i++) {
av_log(ctx, AV_LOG_INFO, "(");
for (int j = 0; j < hdr_plus->num_cols_targeted_system_display_actual_peak_luminance; j++) {
- av_log(ctx, AV_LOG_INFO, "%5.4f,",
+ av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f",
av_q2d(hdr_plus->targeted_system_display_actual_peak_luminance[i][j]));
}
av_log(ctx, AV_LOG_INFO, ")");
@@ -264,9 +264,9 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd)
AVHDRPlusColorTransformParams *params = &hdr_plus->params[w];
av_log(ctx, AV_LOG_INFO, "window %d {maxscl: {", w);
for (int i = 0; i < 3; i++) {
- av_log(ctx, AV_LOG_INFO, "%5.4f,",av_q2d(params->maxscl[i]));
+ av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f",av_q2d(params->maxscl[i]));
}
- av_log(ctx, AV_LOG_INFO, "} average_maxrgb: %5.4f, ",
+ av_log(ctx, AV_LOG_INFO, "}, average_maxrgb: %5.4f, ",
av_q2d(params->average_maxrgb));
av_log(ctx, AV_LOG_INFO, "distribution_maxrgb: {");
for (int i = 0; i < params->num_distribution_maxrgb_percentiles; i++) {
@@ -274,35 +274,35 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd)
params->distribution_maxrgb[i].percentage,
av_q2d(params->distribution_maxrgb[i].percentile));
}
- av_log(ctx, AV_LOG_INFO, "} fraction_bright_pixels: %5.4f, ",
+ av_log(ctx, AV_LOG_INFO, "}, fraction_bright_pixels: %5.4f",
av_q2d(params->fraction_bright_pixels));
if (params->tone_mapping_flag) {
- av_log(ctx, AV_LOG_INFO, "knee_point: (%5.4f,%5.4f), ", av_q2d(params->knee_point_x), av_q2d(params->knee_point_y));
+ av_log(ctx, AV_LOG_INFO, ", knee_point: (%5.4f,%5.4f), ", av_q2d(params->knee_point_x), av_q2d(params->knee_point_y));
av_log(ctx, AV_LOG_INFO, "bezier_curve_anchors: {");
for (int i = 0; i < params->num_bezier_curve_anchors; i++) {
- av_log(ctx, AV_LOG_INFO, "%5.4f,",
+ av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f",
av_q2d(params->bezier_curve_anchors[i]));
}
- av_log(ctx, AV_LOG_INFO, "} ");
+ av_log(ctx, AV_LOG_INFO, "}");
}
if (params->color_saturation_mapping_flag) {
- av_log(ctx, AV_LOG_INFO, "color_saturation_weight: %5.4f",
+ av_log(ctx, AV_LOG_INFO, ", color_saturation_weight: %5.4f",
av_q2d(params->color_saturation_weight));
}
- av_log(ctx, AV_LOG_INFO, "} ");
+ av_log(ctx, AV_LOG_INFO, "}");
}
if (hdr_plus->mastering_display_actual_peak_luminance_flag) {
- av_log(ctx, AV_LOG_INFO, "mastering_display_actual_peak_luminance: {");
+ av_log(ctx, AV_LOG_INFO, ", mastering_display_actual_peak_luminance: {");
for (int i = 0; i < hdr_plus->num_rows_mastering_display_actual_peak_luminance; i++) {
av_log(ctx, AV_LOG_INFO, "(");
for (int j = 0; j < hdr_plus->num_cols_mastering_display_actual_peak_luminance; j++) {
- av_log(ctx, AV_LOG_INFO, " %5.4f,",
+ av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f",
av_q2d(hdr_plus->mastering_display_actual_peak_luminance[i][j]));
}
av_log(ctx, AV_LOG_INFO, ")");
}
- av_log(ctx, AV_LOG_INFO, "} ");
+ av_log(ctx, AV_LOG_INFO, "}");
}
}
More information about the ffmpeg-cvslog
mailing list