Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -33,6 +33,8 @@ · 32 unmodified lines | |||
| 33 | #include "libavutil/pixdesc.h" | 33 | #include "libavutil/pixdesc.h" |
| 34 | #include "internal.h" | 34 | #include "internal.h" |
| 35 | 35 | ||
| 36 | #define NB_PLANES 4 | ||
| 37 | |||
| 36 | enum InterpolationMethods { | 38 | enum InterpolationMethods { |
| 37 | INTERP_NEAREST, | 39 | INTERP_NEAREST, |
| 38 | INTERP_BILINEAR, | 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 | typedef struct GEQContext { | 47 | typedef struct GEQContext { |
| 46 | const AVClass *class; | 48 | const AVClass *class; |
| 47 | AVExpr *e[4]; ///< expressions for each plane | 49 | AVExpr *e[NB_PLANES]; ///< expressions for each plane |
| 48 | char *expr_str[4+3]; ///< expression strings for each plane | 50 | char *expr_str[4+3]; ///< expression strings for each plane |
| 49 | AVFrame *picref; ///< current input buffer | 51 | AVFrame *picref; ///< current input buffer |
| 50 | uint8_t *dst; ///< reference pointer to the 8bits output | 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 | goto end; | 190 | goto end; |
| 189 | } | 191 | } |
| 190 | 192 | ||
| 191 | for (plane = 0; plane < 4; plane++) { | 193 | for (plane = 0; plane < NB_PLANES; plane++) { |
| 192 | static double (*p[])(void *, double, double) = { lum, cb, cr, alpha }; | 194 | static double (*p[])(void *, double, double) = { lum, cb, cr, alpha }; |
| 193 | static const char *const func2_yuv_names[] = { "lum", "cb", "cr", "alpha", "p", NULL }; | 195 | static const char *const func2_yuv_names[] = { "lum", "cb", "cr", "alpha", "p", NULL }; |
| 194 | static const char *const func2_rgb_names[] = { "g", "b", "r", "alpha", "p", NULL }; | 196 | static const char *const func2_rgb_names[] = { "g", "b", "r", "alpha", "p", NULL }; |