mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
lavif/vf_libplacebo: move code (cosmetic)
To eliminate need for forward declaration
This commit is contained in:
parent
ee13414444
commit
d815584755
1 changed files with 15 additions and 17 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue