Silences several warnings: main is usually a functiontags/n3.4
| @@ -752,16 +752,16 @@ static int update_apply_clut(FFFrameSync *fs) | |||||
| { | { | ||||
| AVFilterContext *ctx = fs->parent; | AVFilterContext *ctx = fs->parent; | ||||
| AVFilterLink *inlink = ctx->inputs[0]; | AVFilterLink *inlink = ctx->inputs[0]; | ||||
| AVFrame *main, *second, *out; | |||||
| AVFrame *master, *second, *out; | |||||
| int ret; | int ret; | ||||
| ret = ff_framesync_dualinput_get(fs, &main, &second); | |||||
| ret = ff_framesync_dualinput_get(fs, &master, &second); | |||||
| if (ret < 0) | if (ret < 0) | ||||
| return ret; | return ret; | ||||
| if (!second) | if (!second) | ||||
| return ff_filter_frame(ctx->outputs[0], main); | |||||
| return ff_filter_frame(ctx->outputs[0], master); | |||||
| update_clut(ctx->priv, second); | update_clut(ctx->priv, second); | ||||
| out = apply_lut(inlink, main); | |||||
| out = apply_lut(inlink, master); | |||||
| return ff_filter_frame(ctx->outputs[0], out); | return ff_filter_frame(ctx->outputs[0], out); | ||||
| } | } | ||||
| @@ -967,25 +967,25 @@ static int load_apply_palette(FFFrameSync *fs) | |||||
| AVFilterContext *ctx = fs->parent; | AVFilterContext *ctx = fs->parent; | ||||
| AVFilterLink *inlink = ctx->inputs[0]; | AVFilterLink *inlink = ctx->inputs[0]; | ||||
| PaletteUseContext *s = ctx->priv; | PaletteUseContext *s = ctx->priv; | ||||
| AVFrame *main, *second, *out; | |||||
| AVFrame *master, *second, *out; | |||||
| int ret; | int ret; | ||||
| // writable for error diffusal dithering | // writable for error diffusal dithering | ||||
| ret = ff_framesync_dualinput_get_writable(fs, &main, &second); | |||||
| ret = ff_framesync_dualinput_get_writable(fs, &master, &second); | |||||
| if (ret < 0) | if (ret < 0) | ||||
| return ret; | return ret; | ||||
| if (!main || !second) { | |||||
| if (!master || !second) { | |||||
| ret = AVERROR_BUG; | ret = AVERROR_BUG; | ||||
| goto error; | goto error; | ||||
| } | } | ||||
| if (!s->palette_loaded) { | if (!s->palette_loaded) { | ||||
| load_palette(s, second); | load_palette(s, second); | ||||
| } | } | ||||
| out = apply_palette(inlink, main); | |||||
| out = apply_palette(inlink, master); | |||||
| return ff_filter_frame(ctx->outputs[0], out); | return ff_filter_frame(ctx->outputs[0], out); | ||||
| error: | error: | ||||
| av_frame_free(&main); | |||||
| av_frame_free(&master); | |||||
| av_frame_free(&second); | av_frame_free(&second); | ||||
| return ret; | return ret; | ||||
| } | } | ||||
| @@ -146,21 +146,21 @@ static int do_psnr(FFFrameSync *fs) | |||||
| { | { | ||||
| AVFilterContext *ctx = fs->parent; | AVFilterContext *ctx = fs->parent; | ||||
| PSNRContext *s = ctx->priv; | PSNRContext *s = ctx->priv; | ||||
| AVFrame *main, *ref; | |||||
| AVFrame *master, *ref; | |||||
| double comp_mse[4], mse = 0; | double comp_mse[4], mse = 0; | ||||
| int ret, j, c; | int ret, j, c; | ||||
| AVDictionary **metadata; | AVDictionary **metadata; | ||||
| ret = ff_framesync_dualinput_get(fs, &main, &ref); | |||||
| ret = ff_framesync_dualinput_get(fs, &master, &ref); | |||||
| if (ret < 0) | if (ret < 0) | ||||
| return ret; | return ret; | ||||
| if (!ref) | if (!ref) | ||||
| return ff_filter_frame(ctx->outputs[0], main); | |||||
| metadata = &main->metadata; | |||||
| return ff_filter_frame(ctx->outputs[0], master); | |||||
| metadata = &master->metadata; | |||||
| compute_images_mse(s, (const uint8_t **)main->data, main->linesize, | |||||
| compute_images_mse(s, (const uint8_t **)master->data, master->linesize, | |||||
| (const uint8_t **)ref->data, ref->linesize, | (const uint8_t **)ref->data, ref->linesize, | ||||
| main->width, main->height, comp_mse); | |||||
| master->width, master->height, comp_mse); | |||||
| for (j = 0; j < s->nb_components; j++) | for (j = 0; j < s->nb_components; j++) | ||||
| mse += comp_mse[j] * s->planeweight[j]; | mse += comp_mse[j] * s->planeweight[j]; | ||||
| @@ -222,7 +222,7 @@ static int do_psnr(FFFrameSync *fs) | |||||
| fprintf(s->stats_file, "\n"); | fprintf(s->stats_file, "\n"); | ||||
| } | } | ||||
| return ff_filter_frame(ctx->outputs[0], main); | |||||
| return ff_filter_frame(ctx->outputs[0], master); | |||||
| } | } | ||||
| static av_cold int init(AVFilterContext *ctx) | static av_cold int init(AVFilterContext *ctx) | ||||
| @@ -286,22 +286,22 @@ static int do_ssim(FFFrameSync *fs) | |||||
| { | { | ||||
| AVFilterContext *ctx = fs->parent; | AVFilterContext *ctx = fs->parent; | ||||
| SSIMContext *s = ctx->priv; | SSIMContext *s = ctx->priv; | ||||
| AVFrame *main, *ref; | |||||
| AVFrame *master, *ref; | |||||
| AVDictionary **metadata; | AVDictionary **metadata; | ||||
| float c[4], ssimv = 0.0; | float c[4], ssimv = 0.0; | ||||
| int ret, i; | int ret, i; | ||||
| ret = ff_framesync_dualinput_get(fs, &main, &ref); | |||||
| ret = ff_framesync_dualinput_get(fs, &master, &ref); | |||||
| if (ret < 0) | if (ret < 0) | ||||
| return ret; | return ret; | ||||
| if (!ref) | if (!ref) | ||||
| return ff_filter_frame(ctx->outputs[0], main); | |||||
| metadata = &main->metadata; | |||||
| return ff_filter_frame(ctx->outputs[0], master); | |||||
| metadata = &master->metadata; | |||||
| s->nb_frames++; | s->nb_frames++; | ||||
| for (i = 0; i < s->nb_components; i++) { | for (i = 0; i < s->nb_components; i++) { | ||||
| c[i] = s->ssim_plane(&s->dsp, main->data[i], main->linesize[i], | |||||
| c[i] = s->ssim_plane(&s->dsp, master->data[i], master->linesize[i], | |||||
| ref->data[i], ref->linesize[i], | ref->data[i], ref->linesize[i], | ||||
| s->planewidth[i], s->planeheight[i], s->temp, | s->planewidth[i], s->planeheight[i], s->temp, | ||||
| s->max); | s->max); | ||||
| @@ -328,7 +328,7 @@ static int do_ssim(FFFrameSync *fs) | |||||
| fprintf(s->stats_file, "All:%f (%f)\n", ssimv, ssim_db(ssimv, 1.0)); | fprintf(s->stats_file, "All:%f (%f)\n", ssimv, ssim_db(ssimv, 1.0)); | ||||
| } | } | ||||
| return ff_filter_frame(ctx->outputs[0], main); | |||||
| return ff_filter_frame(ctx->outputs[0], master); | |||||
| } | } | ||||
| static av_cold int init(AVFilterContext *ctx) | static av_cold int init(AVFilterContext *ctx) | ||||