Lines Matching defs:link
151 static int config_input(AVFilterLink *link)
153 AVFilterContext *ctx = link->dst;
155 const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[link->format];
174 crop->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w;
175 crop->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;
208 link->w, link->h, crop->w, crop->h);
211 crop->w > link->w || crop->h > link->h) {
219 crop->x = (link->w - crop->w) / 2;
220 crop->y = (link->h - crop->h) / 2;
230 static int config_output(AVFilterLink *link)
232 CropContext *crop = link->src->priv;
234 link->w = crop->w;
235 link->h = crop->h;
240 static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
242 AVFilterContext *ctx = link->dst;
252 NAN : picref->pts * av_q2d(link->time_base);
263 if ((unsigned)crop->x + (unsigned)crop->w > link->w) crop->x = link->w - crop->w;
264 if ((unsigned)crop->y + (unsigned)crop->h > link->h) crop->y = link->h - crop->h;
275 if (!(av_pix_fmt_descriptors[link->format].flags & PIX_FMT_PAL)) {
290 avfilter_start_frame(link->dst->outputs[0], ref2);
293 static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
295 AVFilterContext *ctx = link->dst;
311 static void end_frame(AVFilterLink *link)
313 CropContext *crop = link->dst->priv;
316 avfilter_unref_buffer(link->cur_buf);
317 avfilter_end_frame(link->dst->outputs[0]);