History

avfilter/vf_geq: Add NB_PLANES

Michael Niedermayer committed 6 years ago

Commit 47fd73a1 parent 45259a01 file · +4 −2Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_geq.c+4−2
@@ -33,6 +33,8 @@ · 32 unmodified lines
3333 #include "libavutil/pixdesc.h"
3434 #include "internal.h"
3535
36+#define NB_PLANES 4
37+
3638 enum InterpolationMethods {
3739 INTERP_NEAREST,
3840 INTERP_BILINEAR,
@@ -44,7 +46,7 @@ enum { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_N, VAR_ · 5 unmodified lines
4446
4547 typedef struct GEQContext {
4648 const AVClass *class;
47− AVExpr *e[4]; ///< expressions for each plane
49+ AVExpr *e[NB_PLANES]; ///< expressions for each plane
4850 char *expr_str[4+3]; ///< expression strings for each plane
4951 AVFrame *picref; ///< current input buffer
5052 uint8_t *dst; ///< reference pointer to the 8bits output
@@ -188,7 +190,7 @@ static av_cold int geq_init(AVFilterContext *ctx) · 137 unmodified lines
188190 goto end;
189191 }
190192
191− for (plane = 0; plane < 4; plane++) {
193+ for (plane = 0; plane < NB_PLANES; plane++) {
192194 static double (*p[])(void *, double, double) = { lum, cb, cr, alpha };
193195 static const char *const func2_yuv_names[] = { "lum", "cb", "cr", "alpha", "p", NULL };
194196 static const char *const func2_rgb_names[] = { "g", "b", "r", "alpha", "p", NULL };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t