[vlc-devel] [PATCH] [RFC] picture: disable the extra 2 lines per picture in debug builds

Steve Lhomme robux4 at ycbcr.xyz
Tue Apr 24 08:36:46 CEST 2018


Following this thread [1] we probably don't need these lines anymore.

For now we can give it a try in debug/nightly builds to see if we hit any wall.

1: https://mailman.videolan.org/pipermail/vlc-devel/2018-April/118535.html
---
 src/misc/picture.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/misc/picture.c b/src/misc/picture.c
index f6abd6016a..a2e177cc74 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -140,9 +140,11 @@ int picture_Setup( picture_t *p_picture, const video_format_t *restrict fmt )
     width = width / i_modulo_w * i_modulo_w;
     height = height / i_modulo_h * i_modulo_h;
 
+#ifndef NDEBUG /* legacy code, probably not needed anymore */
     /* Hack: append two scan lines for some SIMD assembler */
     if (unlikely(add_overflow(height, 2 * i_ratio_h, &height)))
         return VLC_EGENERIC;
+#endif
 
     /* plane_t uses 'int'. */
     if (unlikely(width > INT_MAX) || unlikely(height > INT_MAX))
-- 
2.16.2



More information about the vlc-devel mailing list