summaryrefslogtreecommitdiff
path: root/libavfilter/vf_stereo3d.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-12-18 13:30:49 +0100
committerPaul B Mahol <onemda@gmail.com>2015-12-18 15:15:45 +0100
commit620b47576dec039d844361bddc2a799a07c9759d (patch)
tree9288824e6ff238e9897e628ca87173ac1807ea01 /libavfilter/vf_stereo3d.c
parent06d69a2d225ae0db433b62f0fa537b06e29b0db5 (diff)
avfilter/vf_stereo3d: add fast path for interleave rows to mono
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_stereo3d.c')
-rw-r--r--libavfilter/vf_stereo3d.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c
index a4f5f93ce1..22f64aa547 100644
--- a/libavfilter/vf_stereo3d.c
+++ b/libavfilter/vf_stereo3d.c
@@ -650,7 +650,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
s->in.format == ABOVE_BELOW_LR ||
s->in.format == ABOVE_BELOW_RL ||
s->in.format == ABOVE_BELOW_2_LR ||
- s->in.format == ABOVE_BELOW_2_RL)) {
+ s->in.format == ABOVE_BELOW_2_RL ||
+ s->in.format == INTERLEAVE_ROWS_LR ||
+ s->in.format == INTERLEAVE_ROWS_RL)) {
out = oleft = oright = av_frame_clone(inpicref);
if (!out) {
av_frame_free(&s->prev);
@@ -776,6 +778,12 @@ copy:
iright = ileft;
case MONO_R:
switch (s->in.format) {
+ case INTERLEAVE_ROWS_LR:
+ case INTERLEAVE_ROWS_RL:
+ for (i = 0; i < s->nb_planes; i++) {
+ oleft->linesize[i] *= 2;
+ oright->linesize[i] *= 2;
+ }
case ABOVE_BELOW_LR:
case ABOVE_BELOW_RL:
case ABOVE_BELOW_2_LR: