[FFmpeg-devel] [PATCH] lavfi/geq: use more generic names for internal functions

Stefano Sabatini stefasab at gmail.com
Mon May 20 11:40:58 CEST 2013


---
 libavfilter/vf_geq.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c
index 70bcdbe..64f651b 100644
--- a/libavfilter/vf_geq.c
+++ b/libavfilter/vf_geq.c
@@ -92,10 +92,10 @@ static inline double getpix(void *priv, double x, double y, int plane)
 
 //TODO: cubic interpolate
 //TODO: keep the last few frames
-static double lum(void *priv, double x, double y) { return getpix(priv, x, y, 0); }
-static double  cb(void *priv, double x, double y) { return getpix(priv, x, y, 1); }
-static double  cr(void *priv, double x, double y) { return getpix(priv, x, y, 2); }
-static double alpha(void *priv, double x, double y) { return getpix(priv, x, y, 3); }
+static double c0(void *priv, double x, double y) { return getpix(priv, x, y, 0); }
+static double c1(void *priv, double x, double y) { return getpix(priv, x, y, 1); }
+static double c2(void *priv, double x, double y) { return getpix(priv, x, y, 2); }
+static double c3(void *priv, double x, double y) { return getpix(priv, x, y, 3); }
 
 static const char *const var_names[] = {   "X",   "Y",   "W",   "H",   "N",   "SW",   "SH",   "T",        NULL };
 enum                                   { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_N, VAR_SW, VAR_SH, VAR_T, VAR_VARS_NB };
@@ -146,11 +146,11 @@ static av_cold int geq_init(AVFilterContext *ctx)
     }
 
     for (plane = 0; plane < 4; plane++) {
-        static double (*p[])(void *, double, double) = { lum, cb, cr, alpha };
+        static double (*p[])(void *, double, double) = { c0, c1, c2, c3 };
         static const char *const func2_yuv_names[]    = { "lum", "cb", "cr", "alpha", "p", NULL };
         static const char *const func2_rgb_names[]    = { "g", "b", "r", "alpha", "p", NULL };
         const char *const *func2_names       = geq->is_rgb ? func2_rgb_names : func2_yuv_names;
-        double (*func2[])(void *, double, double) = { lum, cb, cr, alpha, p[plane], NULL };
+        double (*func2[])(void *, double, double) = { c0, c1, c2, c3, p[plane], NULL };
 
         ret = av_expr_parse(&geq->e[plane], geq->expr_str[plane < 3 && geq->is_rgb ? plane+4 : plane], var_names,
                             NULL, NULL, func2_names, func2, 0, ctx);
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list