mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
lavif/vf_libplacebo: move code (cosmetic)
To eliminate need for forward declaration
This commit is contained in:
parent
ee13414444
commit
d815584755
@ -317,23 +317,6 @@ static void set_gamut_mode(struct pl_color_map_params *p, int gamut_mode)
|
||||
av_assert0(0);
|
||||
};
|
||||
|
||||
static int update_settings(AVFilterContext *ctx);
|
||||
|
||||
static int parse_shader(AVFilterContext *avctx, const void *shader, size_t len)
|
||||
{
|
||||
LibplaceboContext *s = avctx->priv;
|
||||
const struct pl_hook *hook;
|
||||
|
||||
hook = pl_mpv_user_shader_parse(s->gpu, shader, len);
|
||||
if (!hook) {
|
||||
av_log(s, AV_LOG_ERROR, "Failed parsing custom shader!\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
s->hooks[s->num_hooks++] = hook;
|
||||
return update_settings(avctx);
|
||||
}
|
||||
|
||||
static int find_scaler(AVFilterContext *avctx,
|
||||
const struct pl_filter_config **opt,
|
||||
const char *name, int frame_mixing)
|
||||
@ -487,6 +470,21 @@ fail:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int parse_shader(AVFilterContext *avctx, const void *shader, size_t len)
|
||||
{
|
||||
LibplaceboContext *s = avctx->priv;
|
||||
const struct pl_hook *hook;
|
||||
|
||||
hook = pl_mpv_user_shader_parse(s->gpu, shader, len);
|
||||
if (!hook) {
|
||||
av_log(s, AV_LOG_ERROR, "Failed parsing custom shader!\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
s->hooks[s->num_hooks++] = hook;
|
||||
return update_settings(avctx);
|
||||
}
|
||||
|
||||
static void libplacebo_uninit(AVFilterContext *avctx);
|
||||
|
||||
static int libplacebo_init(AVFilterContext *avctx)
|
||||
|
Loading…
Reference in New Issue
Block a user