History

avfilter/vf_showinfo: adapt to new AVFilmGrainParams

Niklas Haas committed 2 years ago

Commit 25cd0e01 parent a08f3581 file · +15 −11Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_showinfo.c+15−11
@@ -452,6 +452,11 @@ static void dump_sei_film_grain_params_metadata(AVFilterContext *ctx, const AVFr · 451 unmodified lines
452452 [AV_FILM_GRAIN_PARAMS_H274] = "h274",
453453 };
454454
455+ const char *color_range_str = av_color_range_name(fgp->color_range);
456+ const char *color_primaries_str = av_color_primaries_name(fgp->color_primaries);
457+ const char *color_trc_str = av_color_transfer_name(fgp->color_trc);
458+ const char *colorspace_str = av_color_space_name(fgp->color_space);
459+
455460 if (fgp->type >= FF_ARRAY_ELEMS(film_grain_type_names)) {
456461 av_log(ctx, AV_LOG_ERROR, "invalid data\n");
457462 return;
@@ -459,6 +464,16 @@ static void dump_sei_film_grain_params_metadata(AVFilterContext *ctx, const AVFr · 1 unmodified line
459464
460465 av_log(ctx, AV_LOG_INFO, "type %s; ", film_grain_type_names[fgp->type]);
461466 av_log(ctx, AV_LOG_INFO, "seed=%"PRIu64"; ", fgp->seed);
467+ av_log(ctx, AV_LOG_INFO, "width=%d; ", fgp->width);
468+ av_log(ctx, AV_LOG_INFO, "height=%d; ", fgp->height);
469+ av_log(ctx, AV_LOG_INFO, "subsampling_x=%d; ", fgp->subsampling_x);
470+ av_log(ctx, AV_LOG_INFO, "subsampling_y=%d; ", fgp->subsampling_y);
471+ av_log(ctx, AV_LOG_INFO, "color_range=%s; ", color_range_str ? color_range_str : "unknown");
472+ av_log(ctx, AV_LOG_INFO, "color_primaries=%s; ", color_primaries_str ? color_primaries_str : "unknown");
473+ av_log(ctx, AV_LOG_INFO, "color_trc=%s; ", color_trc_str ? color_trc_str : "unknown");
474+ av_log(ctx, AV_LOG_INFO, "color_space=%s; ", colorspace_str ? colorspace_str : "unknown");
475+ av_log(ctx, AV_LOG_INFO, "bit_depth_luma=%d; ", fgp->bit_depth_luma);
476+ av_log(ctx, AV_LOG_INFO, "bit_depth_chroma=%d; ", fgp->bit_depth_chroma);
462477
463478 switch (fgp->type) {
464479 case AV_FILM_GRAIN_PARAMS_NONE:
@@ -504,18 +519,7 @@ static void dump_sei_film_grain_params_metadata(AVFilterContext *ctx, const AVFr · 39 unmodified lines
504519 }
505520 case AV_FILM_GRAIN_PARAMS_H274: {
506521 const AVFilmGrainH274Params *h274 = &fgp->codec.h274;
507− const char *color_range_str = av_color_range_name(h274->color_range);
508− const char *color_primaries_str = av_color_primaries_name(h274->color_primaries);
509− const char *color_trc_str = av_color_transfer_name(h274->color_trc);
510− const char *colorspace_str = av_color_space_name(h274->color_space);
511−
512522 av_log(ctx, AV_LOG_INFO, "model_id=%d; ", h274->model_id);
513− av_log(ctx, AV_LOG_INFO, "bit_depth_luma=%d; ", h274->bit_depth_luma);
514− av_log(ctx, AV_LOG_INFO, "bit_depth_chroma=%d; ", h274->bit_depth_chroma);
515− av_log(ctx, AV_LOG_INFO, "color_range=%s; ", color_range_str ? color_range_str : "unknown");
516− av_log(ctx, AV_LOG_INFO, "color_primaries=%s; ", color_primaries_str ? color_primaries_str : "unknown");
517− av_log(ctx, AV_LOG_INFO, "color_trc=%s; ", color_trc_str ? color_trc_str : "unknown");
518− av_log(ctx, AV_LOG_INFO, "color_space=%s; ", colorspace_str ? colorspace_str : "unknown");
519523 av_log(ctx, AV_LOG_INFO, "blending_mode_id=%d; ", h274->blending_mode_id);
520524 av_log(ctx, AV_LOG_INFO, "log2_scale_factor=%d; ", h274->log2_scale_factor);
521525

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