47 #define OFFSET(x) offsetof(ShowWavesContext, x)
48 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
66 showwaves->
class = &showwaves_class;
125 if (showwaves->
n && showwaves->
rate_str) {
140 outlink->
w = showwaves->
w;
141 outlink->
h = showwaves->
h;
178 #define MAX_INT16 ((1<<15) -1)
187 int linesize = outpicref ? outpicref->
linesize[0] : 0;
188 int16_t *p = (int16_t *)insamples->
data[0];
191 const int n = showwaves->
n;
199 outlink->
w, outlink->
h);
202 outpicref->
video->
w = outlink->
w;
203 outpicref->
video->
h = outlink->
h;
204 outpicref->
pts = insamples->
pts +
209 memset(outpicref->
data[0], 0, showwaves->
h*linesize);
213 if (h >= 0 && h < outlink->h)
214 *(outpicref->
data[0] + showwaves->
buf_idx + h * linesize) += x;
221 if (showwaves->
buf_idx == showwaves->
w)
256 .
inputs = showwaves_inputs,
258 .priv_class = &showwaves_class,