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
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
36enum InterpolationMethods {38enum 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
45typedef struct GEQContext {47typedef struct GEQContext {
46 const AVClass *class;48 const AVClass *class;
47 AVExpr *e[4]; ///< expressions for each plane49 AVExpr *e[NB_PLANES]; ///< expressions for each plane
48 char *expr_str[4+3]; ///< expression strings for each plane50 char *expr_str[4+3]; ///< expression strings for each plane
49 AVFrame *picref; ///< current input buffer51 AVFrame *picref; ///< current input buffer
50 uint8_t *dst; ///< reference pointer to the 8bits output52 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 };

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