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;
194 for (i = 0; i < outlink->
h; i++)
201 switch (insamples->
format) {
204 int16_t *
src = (int16_t *)insamples->
data[0] + i * 2;
207 x = ((src[1] - src[0]) * zoom / (
float)(UINT16_MAX) + 1) * hw;
208 y = (1.0 - (src[0] + src[1]) * zoom / (
float)UINT16_MAX) * hh;
210 x = (src[1] * zoom / (float)INT16_MAX + 1) * hw;
211 y = (src[0] * zoom / (float)INT16_MAX + 1) * hh;
219 float *
src = (
float *)insamples->
data[0] + i * 2;
222 x = ((src[1] - src[0]) * zoom / 2 + 1) * hw;
223 y = (1.0 - (src[0] + src[1]) * zoom / 2) * hh;
225 x = (src[1] * zoom + 1) * hw;
226 y = (src[0] * zoom + 1) * hh;
266 .
name =
"avectorscope",
271 .
inputs = audiovectorscope_inputs,
272 .
outputs = audiovectorscope_outputs,
273 .priv_class = &avectorscope_class,