diff mbox

[FFmpeg-devel,2/3] avfilter/vf_geq: Add NB_PLANES

Message ID 20191206161818.25008-2-michael@niedermayer.cc
State Accepted
Commit 47fd73ace2dba47222780189112592a2a84f0000
Headers show

Commit Message

Michael Niedermayer Dec. 6, 2019, 4:18 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavfilter/vf_geq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer Dec. 27, 2019, 9:58 p.m. UTC | #1
On Fri, Dec 06, 2019 at 05:18:17PM +0100, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavfilter/vf_geq.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

will apply

[...]
diff mbox

Patch

diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c
index e3267e331f..c965204a1c 100644
--- a/libavfilter/vf_geq.c
+++ b/libavfilter/vf_geq.c
@@ -33,6 +33,8 @@ 
 #include "libavutil/pixdesc.h"
 #include "internal.h"
 
+#define NB_PLANES 4
+
 enum InterpolationMethods {
     INTERP_NEAREST,
     INTERP_BILINEAR,
@@ -44,7 +46,7 @@  enum                                   { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_N, VAR_
 
 typedef struct GEQContext {
     const AVClass *class;
-    AVExpr *e[4];               ///< expressions for each plane
+    AVExpr *e[NB_PLANES];       ///< expressions for each plane
     char *expr_str[4+3];        ///< expression strings for each plane
     AVFrame *picref;            ///< current input buffer
     uint8_t *dst;               ///< reference pointer to the 8bits output
@@ -188,7 +190,7 @@  static av_cold int geq_init(AVFilterContext *ctx)
         goto end;
     }
 
-    for (plane = 0; plane < 4; plane++) {
+    for (plane = 0; plane < NB_PLANES; plane++) {
         static double (*p[])(void *, double, double) = { lum, cb, cr, alpha };
         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 };