From: Thilo Borgmann <thilo.borgmann@mail.de> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH] tests/checkasm/sw_scale: Fix alignment for movdqa Date: Thu, 16 Jun 2022 10:59:57 +0200 Message-ID: <1657f1e0-116a-92e2-033f-4a9493f9de92@mail.de> (raw) [-- Attachment #1: Type: text/plain, Size: 145 bytes --] Hi, movdqa in ff_yuv2yuvX_sse3() expects a 16-byte alignment according to its documentation causing segfaults in fate-checkasm-sw_scale. -Thilo [-- Attachment #2: 0001-tests-checkasm-sw_scale-Fix-alignment-for-movdqa.patch --] [-- Type: text/plain, Size: 1753 bytes --] From ed84410b2371a758dad03d3830bfb4f3d86cd4ed Mon Sep 17 00:00:00 2001 From: Michael Goulet <mgoulet@fb.com> Date: Thu, 16 Jun 2022 10:14:50 +0200 Subject: [PATCH] tests/checkasm/sw_scale: Fix alignment for movdqa SSE3 instruction movdqa in ff_yuv2yuvX_sse3() expects a 16-byte aligned address for a memory address, or else a segfault is generated. The src_pixels buffer below was not aligned to 16 bytes on the stack necessarily, so we got segfaults during fate-checkasm-sw_scale. Therefore 16-byte align all of these local variables, aligning them too much shouldn't hurt. --- tests/checkasm/sw_scale.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/checkasm/sw_scale.c b/tests/checkasm/sw_scale.c index 31d9a525e9..b643a47c30 100644 --- a/tests/checkasm/sw_scale.c +++ b/tests/checkasm/sw_scale.c @@ -75,11 +75,11 @@ static void check_yuv2yuvX(void) int dstW, const uint8_t *dither, int offset); const int16_t **src; - LOCAL_ALIGNED_8(int16_t, src_pixels, [LARGEST_FILTER * LARGEST_INPUT_SIZE]); - LOCAL_ALIGNED_8(int16_t, filter_coeff, [LARGEST_FILTER]); - LOCAL_ALIGNED_8(uint8_t, dst0, [LARGEST_INPUT_SIZE]); - LOCAL_ALIGNED_8(uint8_t, dst1, [LARGEST_INPUT_SIZE]); - LOCAL_ALIGNED_8(uint8_t, dither, [LARGEST_INPUT_SIZE]); + LOCAL_ALIGNED_16(int16_t, src_pixels, [LARGEST_FILTER * LARGEST_INPUT_SIZE]); + LOCAL_ALIGNED_16(int16_t, filter_coeff, [LARGEST_FILTER]); + LOCAL_ALIGNED_16(uint8_t, dst0, [LARGEST_INPUT_SIZE]); + LOCAL_ALIGNED_16(uint8_t, dst1, [LARGEST_INPUT_SIZE]); + LOCAL_ALIGNED_16(uint8_t, dither, [LARGEST_INPUT_SIZE]); union VFilterData{ const int16_t *src; uint16_t coeff[8]; -- 2.20.1 (Apple Git-117) [-- Attachment #3: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2022-06-16 9:00 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-16 8:59 Thilo Borgmann [this message] 2022-06-18 21:50 ` Martin Storsjö 2022-06-20 9:09 ` Thilo Borgmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1657f1e0-116a-92e2-033f-4a9493f9de92@mail.de \ --to=thilo.borgmann@mail.de \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git