diff options
author | Marvin Scholz <epirat07@gmail.com> | 2024-09-08 19:54:47 +0200 |
---|---|---|
committer | Marvin Scholz <epirat07@gmail.com> | 2024-09-13 00:19:46 +0200 |
commit | bbde886b6373795c304506e1692a9851acdd1ea1 (patch) | |
tree | 74f7b975066d38531c7cdb2cf70a062206796bee | |
parent | c6ab95d009f080a8f0beea5149ae8335186adbe1 (diff) | |
download | ffmpeg-bbde886b6373795c304506e1692a9851acdd1ea1.tar.gz |
lavfi/vf_ssim360: fix variable shadowing
-rw-r--r-- | libavfilter/vf_ssim360.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavfilter/vf_ssim360.c b/libavfilter/vf_ssim360.c index 68bd7b4d78..42632bcd85 100644 --- a/libavfilter/vf_ssim360.c +++ b/libavfilter/vf_ssim360.c @@ -1132,7 +1132,7 @@ static int do_ssim360(FFFrameSync *fs) AVFrame *master, *ref; AVDictionary **metadata; double c[4], ssim360v = 0.0, ssim360p50 = 0.0; - int i, ret; + int ret; int need_frame_skip = s->nb_net_frames % (s->frame_skip_ratio + 1); HeatmapList* h_ptr = NULL; @@ -1153,7 +1153,7 @@ static int do_ssim360(FFFrameSync *fs) return ret; } - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { if (s->use_tape) { c[i] = ssim360_tape(master->data[i], s->main_tape_map[i][0], ref->data[i], s->ref_tape_map [i][0], @@ -1191,16 +1191,16 @@ static int do_ssim360(FFFrameSync *fs) // Record percentiles from histogram and attach metadata when using tape if (s->use_tape) { - int i, p, hist_indices[4]; + int hist_indices[4]; double hist_weight[4]; - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { hist_indices[i] = SSIM360_HIST_SIZE - 1; hist_weight[i] = 0; } - for (p = 0; PERCENTILE_LIST[p] >= 0.0; p ++) { - for (i = 0; i < s->nb_components; i++) { + for (int p = 0; PERCENTILE_LIST[p] >= 0.0; p ++) { + for (int i = 0; i < s->nb_components; i++) { double target_weight, ssim360p; // Target weight = total number of samples above the specified percentile @@ -1218,12 +1218,12 @@ static int do_ssim360(FFFrameSync *fs) } } - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { memset(s->ssim360_hist[i], 0, SSIM360_HIST_SIZE * sizeof(double)); s->ssim360_hist_net[i] = 0; } - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { int cidx = s->is_rgb ? s->rgba_map[i] : i; set_meta(metadata, "lavfi.ssim360.", s->comps[i], c[cidx]); } @@ -1235,7 +1235,7 @@ static int do_ssim360(FFFrameSync *fs) if (s->stats_file) { fprintf(s->stats_file, "n:%"PRId64" ", s->nb_ssim_frames); - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { int cidx = s->is_rgb ? s->rgba_map[i] : i; fprintf(s->stats_file, "%c:%f ", s->comps[i], c[cidx]); } |