[FFmpeg-cvslog] avfilter/vf_stereo3d: stop dumping half of data for interleave rows output

Paul B Mahol git at videolan.org
Mon Sep 7 13:40:22 CEST 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep  6 09:22:43 2015 +0000| [0c511eb272e007b5998fa0b4741618274b78b4df] | committer: Paul B Mahol

avfilter/vf_stereo3d: stop dumping half of data for interleave rows output

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c511eb272e007b5998fa0b4741618274b78b4df
---

 libavfilter/vf_stereo3d.c |   19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c
index d51c748..02dc948 100644
--- a/libavfilter/vf_stereo3d.c
+++ b/libavfilter/vf_stereo3d.c
@@ -327,13 +327,6 @@ static int config_output(AVFilterLink *outlink)
     case ABOVE_BELOW_LR:
     case ABOVE_BELOW_2_RL:
     case ABOVE_BELOW_RL:
-        if (s->out.format == INTERLEAVE_ROWS_LR ||
-            s->out.format == INTERLEAVE_ROWS_RL) {
-            if (inlink->h & 3) {
-                av_log(ctx, AV_LOG_ERROR, "height must be multiple of 4\n");
-                return AVERROR_INVALIDDATA;
-            }
-        }
         if (inlink->h & 1) {
             av_log(ctx, AV_LOG_ERROR, "height must be even\n");
             return AVERROR_INVALIDDATA;
@@ -391,9 +384,7 @@ static int config_output(AVFilterLink *outlink)
             s->in.off_lstep = 1;
         else
             s->in.off_rstep = 1;
-        if (s->out.format != INTERLEAVE_ROWS_LR &&
-            s->out.format != INTERLEAVE_ROWS_RL &&
-            s->out.format != CHECKERBOARD_LR &&
+        if (s->out.format != CHECKERBOARD_LR &&
             s->out.format != CHECKERBOARD_RL)
             s->height   = inlink->h / 2;
         break;
@@ -468,16 +459,16 @@ static int config_output(AVFilterLink *outlink)
         s->out.row_left  = s->height;
         break;
     case INTERLEAVE_ROWS_LR:
-        s->in.row_step   = 2;
+        s->in.row_step   = 1 + (s->in.format == INTERLEAVE_ROWS_RL);
         s->out.row_step  = 2;
-        s->height        = s->height / 2;
+        s->out.height    = s->height * 2;
         s->out.off_rstep = 1;
         s->in.off_rstep  = s->in.format != INTERLEAVE_ROWS_RL;
         break;
     case INTERLEAVE_ROWS_RL:
-        s->in.row_step   = 2;
+        s->in.row_step   = 1 + (s->in.format == INTERLEAVE_ROWS_LR);
         s->out.row_step  = 2;
-        s->height        = s->height / 2;
+        s->out.height    = s->height * 2;
         s->out.off_lstep = 1;
         s->in.off_lstep  = s->in.format != INTERLEAVE_ROWS_LR;
         break;



More information about the ffmpeg-cvslog mailing list