42 const char *tff =
"tff";
43 const char *bff =
"bff";
47 }
else if (sscanf(args,
"%u", &fieldorder->
dst_tff) == 1) {
49 }
else if (!strcmp(tff, args)) {
51 }
else if (!strcmp(bff, args)) {
59 fieldorder->
dst_tff ? tff : bff);
74 for (pix_fmt = 0; pix_fmt <
PIX_FMT_NB; pix_fmt++)
98 for (plane = 0; plane < 4; plane++) {
156 int h, plane, line_step, line_size,
line;
157 uint8_t *cpy_src, *cpy_dst;
162 "picture will move %s one line\n",
163 fieldorder->
dst_tff ?
"up" :
"down");
165 for (plane = 0; plane < 4 && inpicref->
data[plane]; plane++) {
166 line_step = inpicref->
linesize[plane];
167 line_size = fieldorder->
line_size[plane];
168 cpy_src = inpicref->
data[plane];
169 cpy_dst = outpicref->
data[plane];
176 for (line = 0; line < h; line++) {
178 memcpy(cpy_dst, cpy_src + line_step, line_size);
180 memcpy(cpy_dst, cpy_src - line_step - line_step, line_size);
182 cpy_src += line_step;
183 cpy_dst += line_step;
191 cpy_src += (h - 1) * line_step;
192 cpy_dst += (h - 1) * line_step;
193 for (line = h - 1; line >= 0 ; line--) {
195 memcpy(cpy_dst, cpy_src - line_step, line_size);
197 memcpy(cpy_dst, cpy_src + line_step + line_step, line_size);
199 cpy_src -= line_step;
200 cpy_dst -= line_step;
208 "not interlaced or field order already correct\n");
216 .
name =
"fieldorder",