[FFmpeg-cvslog] lavfi/mergeplanes: Fix >8 bit for big endian formats and yuv4xxp16le.

Carl Eugen Hoyos git at videolan.org
Tue Nov 1 13:29:44 EET 2016


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Oct 30 00:25:12 2016 +0200| [1a65d2a3ccc2a07e2da19d47c987e1e5a0bd77c6] | committer: Carl Eugen Hoyos

lavfi/mergeplanes: Fix >8 bit for big endian formats and yuv4xxp16le.

Fixes part of ticket #5916.

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

 libavfilter/vf_mergeplanes.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_mergeplanes.c b/libavfilter/vf_mergeplanes.c
index 8128f33..c4948cc 100644
--- a/libavfilter/vf_mergeplanes.c
+++ b/libavfilter/vf_mergeplanes.c
@@ -192,9 +192,9 @@ static int config_output(AVFilterLink *outlink)
     outlink->sample_aspect_ratio = ctx->inputs[0]->sample_aspect_ratio;
 
     s->planewidth[1]  =
-    s->planewidth[2]  = AV_CEIL_RSHIFT(outlink->w, s->outdesc->log2_chroma_w);
+    s->planewidth[2]  = AV_CEIL_RSHIFT(((s->outdesc->comp[1].depth > 8) + 1) * outlink->w, s->outdesc->log2_chroma_w);
     s->planewidth[0]  =
-    s->planewidth[3]  = outlink->w;
+    s->planewidth[3]  = ((s->outdesc->comp[0].depth > 8) + 1) * outlink->w;
     s->planeheight[1] =
     s->planeheight[2] = AV_CEIL_RSHIFT(outlink->h, s->outdesc->log2_chroma_h);
     s->planeheight[0] =
@@ -220,9 +220,9 @@ static int config_output(AVFilterLink *outlink)
         }
 
         inputp->planewidth[1]  =
-        inputp->planewidth[2]  = AV_CEIL_RSHIFT(inlink->w, indesc->log2_chroma_w);
+        inputp->planewidth[2]  = AV_CEIL_RSHIFT(((indesc->comp[1].depth > 8) + 1) * inlink->w, indesc->log2_chroma_w);
         inputp->planewidth[0]  =
-        inputp->planewidth[3]  = inlink->w;
+        inputp->planewidth[3]  = ((indesc->comp[0].depth > 8) + 1) * inlink->w;
         inputp->planeheight[1] =
         inputp->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, indesc->log2_chroma_h);
         inputp->planeheight[0] =



More information about the ffmpeg-cvslog mailing list