History

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,}}

Limin Wang committed 5 years ago

Commit b22b8e51 parent 32531331 file · +14 −14Browse files

Unified · Split

libavfilter/vf_showinfo.c+14−14
@@ -221,7 +221,7 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd) · 220 unmodified lines
221221 av_log(ctx, AV_LOG_INFO, "num_windows: %d, ", hdr_plus->num_windows);
222222 for (int w = 1; w < hdr_plus->num_windows; w++) {
223223 AVHDRPlusColorTransformParams *params = &hdr_plus->params[w];
224− av_log(ctx, AV_LOG_INFO, "window %d { ", w);
224+ av_log(ctx, AV_LOG_INFO, w > 1 ? ", window %d { " : "window %d { ", w);
225225 av_log(ctx, AV_LOG_INFO, "window_upper_left_corner: (%5.4f,%5.4f),",
226226 av_q2d(params->window_upper_left_corner_x),
227227 av_q2d(params->window_upper_left_corner_y));
@@ -242,7 +242,7 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd) · 14 unmodified lines
242242 params->semimajor_axis_external_ellipse);
243243 av_log(ctx, AV_LOG_INFO, "semiminor_axis_external_ellipse: %d, ",
244244 params->semiminor_axis_external_ellipse);
245− av_log(ctx, AV_LOG_INFO, "overlap_process_option: %d}, ",
245+ av_log(ctx, AV_LOG_INFO, "overlap_process_option: %d}",
246246 params->overlap_process_option);
247247 }
248248 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) · 3 unmodified lines
252252 for (int i = 0; i < hdr_plus->num_rows_targeted_system_display_actual_peak_luminance; i++) {
253253 av_log(ctx, AV_LOG_INFO, "(");
254254 for (int j = 0; j < hdr_plus->num_cols_targeted_system_display_actual_peak_luminance; j++) {
255− av_log(ctx, AV_LOG_INFO, "%5.4f,",
255+ av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f",
256256 av_q2d(hdr_plus->targeted_system_display_actual_peak_luminance[i][j]));
257257 }
258258 av_log(ctx, AV_LOG_INFO, ")");
@@ -264,9 +264,9 @@ static void dump_dynamic_hdr_plus(AVFilterContext *ctx, AVFrameSideData *sd) · 5 unmodified lines
264264 AVHDRPlusColorTransformParams *params = &hdr_plus->params[w];
265265 av_log(ctx, AV_LOG_INFO, "window %d {maxscl: {", w);
266266 for (int i = 0; i < 3; i++) {
267− av_log(ctx, AV_LOG_INFO, "%5.4f,",av_q2d(params->maxscl[i]));
267+ av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f",av_q2d(params->maxscl[i]));
268268 }
269− av_log(ctx, AV_LOG_INFO, "} average_maxrgb: %5.4f, ",
269+ av_log(ctx, AV_LOG_INFO, "}, average_maxrgb: %5.4f, ",
270270 av_q2d(params->average_maxrgb));
271271 av_log(ctx, AV_LOG_INFO, "distribution_maxrgb: {");
272272 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) · 1 unmodified line
274274 params->distribution_maxrgb[i].percentage,
275275 av_q2d(params->distribution_maxrgb[i].percentile));
276276 }
277− av_log(ctx, AV_LOG_INFO, "} fraction_bright_pixels: %5.4f, ",
277+ av_log(ctx, AV_LOG_INFO, "}, fraction_bright_pixels: %5.4f",
278278 av_q2d(params->fraction_bright_pixels));
279279 if (params->tone_mapping_flag) {
280− av_log(ctx, AV_LOG_INFO, "knee_point: (%5.4f,%5.4f), ", av_q2d(params->knee_point_x), av_q2d(params->knee_point_y));
280+ av_log(ctx, AV_LOG_INFO, ", knee_point: (%5.4f,%5.4f), ", av_q2d(params->knee_point_x), av_q2d(params->knee_point_y));
281281 av_log(ctx, AV_LOG_INFO, "bezier_curve_anchors: {");
282282 for (int i = 0; i < params->num_bezier_curve_anchors; i++) {
283− av_log(ctx, AV_LOG_INFO, "%5.4f,",
283+ av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f",
284284 av_q2d(params->bezier_curve_anchors[i]));
285285 }
286− av_log(ctx, AV_LOG_INFO, "} ");
286+ av_log(ctx, AV_LOG_INFO, "}");
287287 }
288288 if (params->color_saturation_mapping_flag) {
289− av_log(ctx, AV_LOG_INFO, "color_saturation_weight: %5.4f",
289+ av_log(ctx, AV_LOG_INFO, ", color_saturation_weight: %5.4f",
290290 av_q2d(params->color_saturation_weight));
291291 }
292− av_log(ctx, AV_LOG_INFO, "} ");
292+ av_log(ctx, AV_LOG_INFO, "}");
293293 }
294294
295295 if (hdr_plus->mastering_display_actual_peak_luminance_flag) {
296− av_log(ctx, AV_LOG_INFO, "mastering_display_actual_peak_luminance: {");
296+ av_log(ctx, AV_LOG_INFO, ", mastering_display_actual_peak_luminance: {");
297297 for (int i = 0; i < hdr_plus->num_rows_mastering_display_actual_peak_luminance; i++) {
298298 av_log(ctx, AV_LOG_INFO, "(");
299299 for (int j = 0; j < hdr_plus->num_cols_mastering_display_actual_peak_luminance; j++) {
300− av_log(ctx, AV_LOG_INFO, " %5.4f,",
300+ av_log(ctx, AV_LOG_INFO, i ? ",%5.4f" : "%5.4f",
301301 av_q2d(hdr_plus->mastering_display_actual_peak_luminance[i][j]));
302302 }
303303 av_log(ctx, AV_LOG_INFO, ")");
304304 }
305− av_log(ctx, AV_LOG_INFO, "} ");
305+ av_log(ctx, AV_LOG_INFO, "}");
306306 }
307307 }
308308

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t