diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-29 02:54:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-29 02:54:50 +0100 |
commit | 1eb8809a4178b180045d920d45727328186103c5 (patch) | |
tree | 7905671fd986e6c1ccfd82fec0895965ed95eda7 | |
parent | 87b9dc098240e72c8874e2d3a75e954cd56dc776 (diff) | |
parent | 4c973de9a5b67615762cf99ec20a8a633e64c4b8 (diff) | |
download | ffmpeg-1eb8809a4178b180045d920d45727328186103c5.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
vf_fieldorder: require write permissions
vf_fieldorder: reindent
Conflicts:
libavfilter/vf_fieldorder.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/vf_fieldorder.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index 1db6e1203a..06e0369962 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -133,46 +133,46 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) frame->video->top_field_first == s->dst_tff) return ff_filter_frame(outlink, frame); - av_dlog(ctx, - "picture will move %s one line\n", - s->dst_tff ? "up" : "down"); - h = frame->video->h; - for (plane = 0; plane < 4 && frame->data[plane]; plane++) { - line_step = frame->linesize[plane]; - line_size = s->line_size[plane]; - data = frame->data[plane]; - if (s->dst_tff) { - /** Move every line up one line, working from - * the top to the bottom of the frame. - * The original top line is lost. - * The new last line is created as a copy of the - * penultimate line from that field. */ - for (line = 0; line < h; line++) { - if (1 + line < frame->video->h) { - memcpy(data, data + line_step, line_size); - } else { - memcpy(data, data - line_step - line_step, line_size); - } - data += line_step; + av_dlog(ctx, + "picture will move %s one line\n", + s->dst_tff ? "up" : "down"); + h = frame->video->h; + for (plane = 0; plane < 4 && frame->data[plane]; plane++) { + line_step = frame->linesize[plane]; + line_size = s->line_size[plane]; + data = frame->data[plane]; + if (s->dst_tff) { + /** Move every line up one line, working from + * the top to the bottom of the frame. + * The original top line is lost. + * The new last line is created as a copy of the + * penultimate line from that field. */ + for (line = 0; line < h; line++) { + if (1 + line < frame->video->h) { + memcpy(data, data + line_step, line_size); + } else { + memcpy(data, data - line_step - line_step, line_size); } - } else { - /** Move every line down one line, working from - * the bottom to the top of the frame. - * The original bottom line is lost. - * The new first line is created as a copy of the - * second line from that field. */ - data += (h - 1) * line_step; - for (line = h - 1; line >= 0 ; line--) { - if (line > 0) { - memcpy(data, data - line_step, line_size); - } else { - memcpy(data, data + line_step + line_step, line_size); - } - data -= line_step; + data += line_step; + } + } else { + /** Move every line down one line, working from + * the bottom to the top of the frame. + * The original bottom line is lost. + * The new first line is created as a copy of the + * second line from that field. */ + data += (h - 1) * line_step; + for (line = h - 1; line >= 0 ; line--) { + if (line > 0) { + memcpy(data, data - line_step, line_size); + } else { + memcpy(data, data + line_step + line_step, line_size); } + data -= line_step; } } - frame->video->top_field_first = s->dst_tff; + } + frame->video->top_field_first = s->dst_tff; return ff_filter_frame(outlink, frame); } |