From b5e3dbd415fa8c59eec9bc8e2261ef4dde2754fb Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 29 Dec 2019 12:52:34 -0500 Subject: [PATCH] put back 32bit alignment with a comment as to why --- src/zm_ffmpeg_camera.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index cdb8a40b7..6578b0b2d 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -1087,9 +1087,10 @@ int FfmpegCamera::transfer_to_image( return -1; } #if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0) + // From what I've read, we should align the linesizes to 32bit so that ffmpeg can use SIMD instructions too. int size = av_image_fill_arrays( output_frame->data, output_frame->linesize, - directbuffer, imagePixFormat, width, height, 1); + directbuffer, imagePixFormat, width, height, 32); if ( size < 0 ) { Error("Problem setting up data pointers into image %s", av_make_error_string(size).c_str());