[FFmpeg-cvslog] avfilter/vf_stereo3d: add fast path for interleave rows to mono

Paul B Mahol git at videolan.org
Fri Dec 18 15:24:58 CET 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Dec 18 13:30:49 2015 +0100| [620b47576dec039d844361bddc2a799a07c9759d] | committer: Paul B Mahol

avfilter/vf_stereo3d: add fast path for interleave rows to mono

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

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

 libavfilter/vf_stereo3d.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c
index a4f5f93..22f64aa 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:



More information about the ffmpeg-cvslog mailing list