[FFmpeg-cvslog] lavif/vf_libplacebo: move code (cosmetic)

Niklas Haas git at videolan.org
Tue May 23 16:07:12 EEST 2023


ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Tue May 23 15:06:18 2023 +0200| [d815584755c8c75ac6bc3fb8a7465836b4dbcd42] | committer: Niklas Haas

lavif/vf_libplacebo: move code (cosmetic)

To eliminate need for forward declaration

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d815584755c8c75ac6bc3fb8a7465836b4dbcd42
---

 libavfilter/vf_libplacebo.c | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index abf22a6117..d4b2f21328 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -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)



More information about the ffmpeg-cvslog mailing list