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 6E03E43D9C for ; Wed, 10 Aug 2022 22:15:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F092A68B8C8; Thu, 11 Aug 2022 01:14:56 +0300 (EEST) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 947A168B810 for ; Thu, 11 Aug 2022 01:14:50 +0300 (EEST) Received: by mail-qv1-f41.google.com with SMTP id y11so12058828qvn.3 for ; Wed, 10 Aug 2022 15:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc; bh=eWP4tgvcvMdDgni41P1G0FFFT1Va/M6AK9jSw9B4fjU=; b=jcuuAxIfkpHsryMKUdHnl/cUEKsl0o7YULbmOOkP2pqm1WKbqLGHdai1ix6sclvbPE ztJCSYeHcjNc54nw0e6BnAvb8dWdR8ONjnVTo8P+a4BOqHK387/S6AH4LEU9hdYIvKNH lDLrJTdKKrPFcVXSDwehBDrj/r54KOSMbEMVP502XkiKIRFcJov97tpAB3Doz8Tz5+SW /pC3ZqEHBz5BaMbjwQck+9NXfVbgNs60CwRz9YgVKshcgmqjddYwEe8Gb3GVz2twJT7d J5MPkfhnYeDE5bhLjaFzwH2cSKJm7tA7JP9XVvO6lQXwgo4hFFXm0AT+gFG5VupdAzHJ 4frA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc; bh=eWP4tgvcvMdDgni41P1G0FFFT1Va/M6AK9jSw9B4fjU=; b=ZkddzcJZvmmu3nRH9BBuv62qbIoDxUdXH19wXWXq0Ry7RW1vcS+3FXAB9304/5noVV 08Dcogn2bR4aUBUzp5Ne87wMjy4fCirD/nBtO70JZOC8U2+lafvfLrxrvw42FYzYm3WV kGbr1QkBnf88NAaSQaoDzNsEXfDJZXmDhRipPxDT03Gj+Oz+6VTo8d5sOy/Mu54qhhJu sd7FDgokDhEx4wwMuHOlgPlGBc0CXf+40g/7SpnOgIgGWChsDBTGTS0AKVLh/Nz98xwI u72tpc4xu0QPQF7PkQlkRzwREZc7KnXkA1ADFG18HWdWsPiT7YZ1FSWT8VgsKJ5ymfKD BYHA== X-Gm-Message-State: ACgBeo0jB4le+cOxTbyDVjqB5d1oqx9FBiiOEX06gkq/g1FohgG7nGy3 3sY43OtV3770TykL0l+7poyFYLYF5/63AEFnJ47sJexdMGc= X-Google-Smtp-Source: AA6agR5gZeOr2TjTrUnXn4/EKoXDqVVFJ1GLJeomO64vSpp3ZzT7ciiEmTMCbNGf3HUI7GBWtLCx2ty1LgQCKX7gBWk= X-Received: by 2002:a05:6214:27e4:b0:476:be6a:91c1 with SMTP id jt4-20020a05621427e400b00476be6a91c1mr25593529qvb.39.1660169688896; Wed, 10 Aug 2022 15:14:48 -0700 (PDT) MIME-Version: 1.0 References: <20220810204712.3123-1-timo@rothenpieler.org> <20220810204712.3123-6-timo@rothenpieler.org> <423b2beb-9ad6-003e-be31-e3237f9f9788@rothenpieler.org> In-Reply-To: From: Mark Reid Date: Wed, 10 Aug 2022 15:14:35 -0700 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, Aug 10, 2022 at 2:53 PM Timo Rothenpieler wrote: > 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. > here is openexr implementation https://github.com/AcademySoftwareFoundation/Imath/blob/main/src/Imath/toFloat.cpp#L78 It has been a while since I check but I believe the current implementation matches this. The fate sample: rgb_scanline_zip_half_float_0x0_to_0xFFFF.exr was created to test this. it contains every possible float16 value > _______________________________________________ > 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". > _______________________________________________ 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".