From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5CA0B406D8 for ; Tue, 29 Mar 2022 20:30:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BC7868B148; Tue, 29 Mar 2022 23:30:57 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1952668AA3E for ; Tue, 29 Mar 2022 23:30:51 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 22TKUonp001894-22TKUonq001894 for ; Tue, 29 Mar 2022 23:30:50 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id 5EE38A143A for ; Tue, 29 Mar 2022 23:30:50 +0300 (EEST) Date: Tue, 29 Mar 2022 23:30:50 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <5b1c3d74-27b3-7360-576c-a62dd1148b2f@riscosopen.org> Message-ID: References: <20220317185819.466470-1-bavison@riscosopen.org> <20220325185257.513933-1-bavison@riscosopen.org> <20220325185257.513933-4-bavison@riscosopen.org> <5b1c3d74-27b3-7360-576c-a62dd1148b2f@riscosopen.org> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH 03/10] checkasm: Add idctdsp add/put-pixels-clamped tests X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, 29 Mar 2022, Ben Avison wrote: >> Thirdly - the added test also occasionally fails for the other existing >> functions (armv6, neon) and the newly added aarch64 neon version. If you >> have e.g. src[] = 32767, dst[] = 255, then the widening 8->16 addition >> will overflow, as there's no operation that both widens and clamps at >> the same time. > > So it does. I obviously just didn't hit those cases in my test runs! > > I can't easily test all codecs that use this function, but I just tried > instrumenting the VC-1 case and it doesn't appear to actually use this > particular function, so I'm none the wiser! > > Should I just limit the 16-bit values to +/-0x100 and re-enable the > armv4 fast path then? Yes, I think that'd be the safest path forward. Worst case, the test would be slightly too narrow and could miss some valid case - but that's at least better than having the test give false positives for perfectly correct assembly, that would work just fine for actual decoder use. // Martin _______________________________________________ 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".