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 64E62429D0 for ; Mon, 11 Apr 2022 12:53:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C43F068B21B; Mon, 11 Apr 2022 15:52:58 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 49AB268A3B7 for ; Mon, 11 Apr 2022 15:52:52 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id D6EAF240179 for ; Mon, 11 Apr 2022 14:52:51 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id JY8jIDugR3Dg for ; Mon, 11 Apr 2022 14:52:50 +0200 (CEST) Received: from lain.red.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.red.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id A601D2400F5 for ; Mon, 11 Apr 2022 14:52:50 +0200 (CEST) Received: by lain.red.khirnov.net (Postfix, from userid 1000) id 9CFA91601AD; Mon, 11 Apr 2022 14:52:50 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <52971445-255c-1ecd-99ea-4303efd8ba73@gmail.com> References: <20220405165504.29261-1-leo.izen@gmail.com> <20220405165504.29261-4-leo.izen@gmail.com> <164951025246.21047.6570158843618793411@lain.red.khirnov.net> <52971445-255c-1ecd-99ea-4303efd8ba73@gmail.com> Mail-Followup-To: FFmpeg development discussions and patches Date: Mon, 11 Apr 2022 14:52:50 +0200 Message-ID: <164968157061.24258.13223392288587596071@lain.red.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v13 3/4] avcodec/libjxl: add Jpeg XL encoding via libjxl 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: Quoting Leo Izen (2022-04-11 13:16:21) > > On 4/9/22 09:17, Anton Khirnov wrote: > > Quoting Leo Izen (2022-04-05 18:55:03) > >> + > >> + /* check for negative zero, our default */ > >> + if (1.0f / ctx->distance == 1.0f / -0.0f) { > > IIRC division by zero is UB. Why not make the default -1.0 and then just > > check whether the number is negative? > > > The legal range is between 0 and 15, so if I set the default to -1, it > whines that the value is invalid. Should I just set the legal range to > -1 to 15 then and assume negative is unset? Yes, that's what I would do. -- Anton Khirnov _______________________________________________ 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".