Unified · Split
| @@ -33,6 +33,8 @@ · 32 unmodified lines | ||
| 33 | 33 | #include "libavutil/pixdesc.h" |
| 34 | 34 | #include "internal.h" |
| 35 | 35 | |
| 36 | +#define NB_PLANES 4 | |
| 37 | + | |
| 36 | 38 | enum InterpolationMethods { |
| 37 | 39 | INTERP_NEAREST, |
| 38 | 40 | INTERP_BILINEAR, |
| @@ -44,7 +46,7 @@ enum { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_N, VAR_ · 5 unmodified lines | ||
| 44 | 46 | |
| 45 | 47 | typedef struct GEQContext { |
| 46 | 48 | const AVClass *class; |
| 47 | − AVExpr *e[4]; ///< expressions for each plane | |
| 49 | + AVExpr *e[NB_PLANES]; ///< expressions for each plane | |
| 48 | 50 | char *expr_str[4+3]; ///< expression strings for each plane |
| 49 | 51 | AVFrame *picref; ///< current input buffer |
| 50 | 52 | uint8_t *dst; ///< reference pointer to the 8bits output |
| @@ -188,7 +190,7 @@ static av_cold int geq_init(AVFilterContext *ctx) · 137 unmodified lines | ||
| 188 | 190 | goto end; |
| 189 | 191 | } |
| 190 | 192 | |
| 191 | − for (plane = 0; plane < 4; plane++) { | |
| 193 | + for (plane = 0; plane < NB_PLANES; plane++) { | |
| 192 | 194 | static double (*p[])(void *, double, double) = { lum, cb, cr, alpha }; |
| 193 | 195 | static const char *const func2_yuv_names[] = { "lum", "cb", "cr", "alpha", "p", NULL }; |
| 194 | 196 | static const char *const func2_rgb_names[] = { "g", "b", "r", "alpha", "p", NULL }; |