76 typedef struct ZPcontext {
90 #define OFFSET(x) offsetof(ZPContext, x)
91 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
128 double var_values[
VARS_NB], nb_frames, zoom, dx, dy;
131 int i, k, x,
y, w, h,
ret = 0;
141 var_values[
VAR_X] = 0;
142 var_values[
VAR_Y] = 0;
155 NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
159 for (i = 0; i < nb_frames; i++) {
171 NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
174 zoom = av_clipd(zoom, 1, 10);
176 w = in->
width * (1.0 / zoom);
177 h = in->
height * (1.0 / zoom);
181 NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
183 x = dx = av_clipd(dx, 0,
FFMAX(in->
width - w, 0));
184 var_values[
VAR_X] = dx;
189 NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
191 y = dy = av_clipd(dy, 0,
FFMAX(in->
height - h, 0));
192 var_values[
VAR_Y] = dy;
213 for (k = 0; in->
data[k]; k++)
214 input[k] = in->
data[k] + py[k] * in->
linesize[k] + px[k];
302 .priv_class = &zoompan_class,