[vlc-commits] Revert "picture: copy more than the visible lines"

Steve Lhomme git at videolan.org
Thu Aug 9 16:19:33 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Aug  9 16:19:20 2018 +0200| [07742193e40a480fe562aacd31c1eb4f4f03237c] | committer: Steve Lhomme

Revert "picture: copy more than the visible lines"

This reverts commit 4594dedf117e40a1ba783ef55df995e12ea8e5fe.

This is the wrong way to do it. And breaks other things like magnify.
Either the visible area should account for the x/y offsets or there should be
and offset stored per plane.

We also need to decide in a picture copy copies only the visible area (and not
event the part in the x/y offset) or some of the decoder/crop padding too. The
current code leans towards the latter but still copies too much.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=07742193e40a480fe562aacd31c1eb4f4f03237c
---

 src/misc/picture.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/misc/picture.c b/src/misc/picture.c
index 6fe9437a27..0740f06c83 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -332,7 +332,8 @@ void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src )
 {
     const unsigned i_width  = __MIN( p_dst->i_visible_pitch,
                                      p_src->i_visible_pitch );
-    const unsigned i_height = __MIN( p_dst->i_lines, p_src->i_lines );
+    const unsigned i_height = __MIN( p_dst->i_visible_lines,
+                                     p_src->i_visible_lines );
 
     /* The 2x visible pitch check does two things:
        1) Makes field plane_t's work correctly (see the deinterlacer module)



More information about the vlc-commits mailing list