1 /*
2 * Copyright (c) 2012 Stefano Sabatini
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 /**
22 * @file framestep filter, inspired on libmpcodecs/vf_framestep.c by
23 * Daniele Fornighieri <guru AT digitalfantasy it>.
24 */
25
30
31 typedef struct NullContext {
35
36 #define OFFSET(x) offsetof(FrameStepContext, x)
37 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
38
42 };
43
45
47 {
51
55
57 framestep->frame_step,
58 inlink->frame_rate.num, inlink->frame_rate.den,
av_q2d(inlink->frame_rate),
59 outlink->frame_rate.num, outlink->frame_rate.den,
av_q2d(outlink->frame_rate));
60 return 0;
61 }
62
64 {
66
69 } else {
71 return 0;
72 }
73 }
74
76 {
80 },
82 };
83
85 {
89 },
91 };
92
97 .priv_class = &framestep_class,
98 .
inputs = framestep_inputs,
101 };