40 #define OFFSET(x) offsetof(InterlaceContext, x)
41 #define V AV_OPT_FLAG_VIDEO_PARAM
43 {
"scan",
"scanning mode",
OFFSET(scan),
45 {
"tff",
"top field first", 0,
47 {
"bff",
"bottom field first", 0,
49 {
"lowpass",
"enable vertical low-pass filter",
OFFSET(
lowpass),
62 for (i = 0; i < linesize; i++) {
66 dstp[i] = (1 + srcp[i] + srcp[i] + srcp_above[i] + srcp_below[i]) >> 2;
104 "the resulting video will be aliased rather than interlaced.\n");
107 outlink->
w = inlink->
w;
108 outlink->
h = inlink->
h;
140 int cols = (plane == 1 || plane == 2) ? -(-inlink->
w) >> hsub : inlink->
w;
141 int lines = (plane == 1 || plane == 2) ?
FF_CEIL_RSHIFT(inlink->
h, vsub) : inlink->
h;
153 int srcp_linesize = src_frame->
linesize[plane] * 2;
154 int dstp_linesize = dst_frame->
linesize[plane] * 2;
155 for (j = lines; j > 0; j--) {
162 s->
lowpass_line(dstp, cols, srcp, srcp_above, srcp_below);
163 dstp += dstp_linesize;
164 srcp += srcp_linesize;
168 srcp, src_frame->
linesize[plane] * 2,
192 "video is already interlaced, adjusting framerate only\n");
246 .priv_class = &interlace_class,