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 A34E1425D8 for ; Tue, 29 Mar 2022 19:56:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D129C68B09D; Tue, 29 Mar 2022 22:56:35 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 147E468ADCC for ; Tue, 29 Mar 2022 22:56:29 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 22TJuSHs001325-22TJuSHt001325; Tue, 29 Mar 2022 22:56:28 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id E58ADA143A; Tue, 29 Mar 2022 22:56:27 +0300 (EEST) Date: Tue, 29 Mar 2022 22:56:26 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: Message-ID: References: <20220317185819.466470-1-bavison@riscosopen.org> <20220325185257.513933-1-bavison@riscosopen.org> <20220325185257.513933-4-bavison@riscosopen.org> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 Cc: Ben Avison Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, 29 Mar 2022, Martin Storsj=F6 wrote: > On Fri, 25 Mar 2022, Ben Avison wrote: > >> Disable ff_add_pixels_clamped_arm, which was found to fail the test. As = >> this >> is normally only used for Arms prior to Armv6 (ARM11) it seems quite = >> unlikely >> that anyone is still using this, so I haven't put in the effort to debug = >> it. > > I had a look at this function, and I see that the overflow checks are usi= ng > > tst r6, #0x100 > > to see whether the addition overflowed (either above or below). However, = if = > block[] was e.g. 0x200, it's possible to overflow without setting this bi= t at = > all. > > If it would be the case that the valid range of block[] values would be e= .g. = > [-255,255], then this kind of overflow checking would work though. (As th= ere = > exists assembly for armv6, then this function probably hasn't been used m= uch = > in modern times, so this doesn't say much about what values actually are = used = > here.) > > Secondly, the clamping seems to be done with > > movne r6, r5, lsr #24 > > However that should use asr, not lsr, I think, to get proper clamping in = both = > ends? On second thought, no, lsr #24 should be correct here. But "tst r6, = #0x100" probably is the main issue, given the range of input values set by = the current test. No idea what the actual value range is, for the decoders = that use this function though. // 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".