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 A3C91433EA for ; Wed, 10 Aug 2022 21:53:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1FC5D68B8B1; Thu, 11 Aug 2022 00:53:51 +0300 (EEST) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 796F068B7AB for ; Thu, 11 Aug 2022 00:53:44 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id 222282F49E4 for ; Wed, 10 Aug 2022 23:53:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1660168424; bh=pzdfNntXCEuIXlChiBmG4dpYI4G0WpldNcRSGsEGnSY=; h=Date:Subject:To:References:From:In-Reply-To; b=bMz7hB0gJln2NF11ntdxnPUmKP+4OPdNnntFlsJqauLpw50cLHCWL6aj/ALJIVDDO 7E+kn6YDQAwVT3QPGSgGh0swdXovuIJzuL17Q1TFwvSBl8N2cRt8hCPnKejCpxxSDr 6/zPadLIy4ZQlZeb/u8vd1QY1WqqZPsRnqvmGuDLkPOeZ9eUzBKTaFjw6/FnjZKa+P ta4LgaDQt2XrXnrCSeJHsNim+7UJuA+NiOyDp0SrE3dhHZ6/ak18Gxg660gZn9wyF+ iToIo0ul3TGAjeUAaMdm81/CzieQfQKcENVFvbq44Evlxm0m/yI7GWtGWbj8ElZIJo udflSnGTMcjbQ== Message-ID: Date: Wed, 10 Aug 2022 23:53:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220810204712.3123-1-timo@rothenpieler.org> <20220810204712.3123-6-timo@rothenpieler.org> <423b2beb-9ad6-003e-be31-e3237f9f9788@rothenpieler.org> From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 06/11] avutil/half2float: adjust conversion of NaN 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 10.08.2022 23:43, Andreas Rheinhardt wrote: > Timo Rothenpieler: >> On 10.08.2022 23:24, Andreas Rheinhardt wrote: >>> Timo Rothenpieler: >>>> IEEE-754 differentiates two different kind of NaNs. >>>> Quiet and Signaling ones. They are differentiated by the MSB of the >>>> mantissa. >>>> >>>> For whatever reason, actual hardware conversion of half to single always >>>> sets the signaling bit to 1 if the mantissa is != 0, and to 0 if it's 0. >>>> So our code has to follow suite or fate-testing hardware float16 will be >>>> impossible. >>> >>> What does the exr spec say about quiet and signaling nans? >> >> Not sure how exr would be involved here. > > Your patch changes the output of an exr-test. The output of the exr > decoder is presumably determined by the exr spec. There is after all the > possibility that what hardware does in hardware and what this patch does > in software is incompatible with what exr specifies. The exr spec just says something along the lines of analogous to ieee-754 floats: https://openexr.readthedocs.io/en/latest/TechnicalIntroduction.html?highlight=ieee#the-half-data-type It barely ever mentions NaNs, other than that they exist. Which makes sense, given they don't typically appear in images. The only output changed is that for how NaNs are converted. And given the cross-validation with multiple hardware implementations, I'm confident that it's correct. _______________________________________________ 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".