54 #define OFFSET(x) offsetof(AudioVectorScopeContext, x)
55 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
84 if (y >= p->
h || x >= p->
w)
104 for (i = 0; i < p->
h; i++) {
105 for (j = 0; j < p->
w*4; j+=4) {
179 const int hw = p->
hw;
180 const int hh = p->
hh;
182 const double zoom = p->
zoom;
193 for (i = 0; i < outlink->
h; i++)
200 switch (insamples->
format) {
203 int16_t *
src = (int16_t *)insamples->
data[0] + i * 2;
206 x = ((src[1] - src[0]) * zoom / (
float)(UINT16_MAX) + 1) * hw;
207 y = (1.0 - (src[0] + src[1]) * zoom / (
float)UINT16_MAX) * hh;
209 x = (src[1] * zoom / (float)INT16_MAX + 1) * hw;
210 y = (src[0] * zoom / (float)INT16_MAX + 1) * hh;
218 float *
src = (
float *)insamples->
data[0] + i * 2;
221 x = ((src[1] - src[0]) * zoom / 2 + 1) * hw;
222 y = (1.0 - (src[0] + src[1]) * zoom / 2) * hh;
224 x = (src[1] * zoom + 1) * hw;
225 y = (src[0] * zoom + 1) * hh;
265 .
name =
"avectorscope",
270 .
inputs = audiovectorscope_inputs,
271 .
outputs = audiovectorscope_outputs,
272 .priv_class = &avectorscope_class,