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 12AC24078B for ; Mon, 30 May 2022 19:09:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D944E68B616; Mon, 30 May 2022 22:09:26 +0300 (EEST) Received: from vie01a-dmta-at03-3.mx.upcmail.net (vie01a-dmta-at03-3.mx.upcmail.net [62.179.121.153]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1BE3968B4D8 for ; Mon, 30 May 2022 22:09:20 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1nvklN-0005K0-1M for ffmpeg-devel@ffmpeg.org; Mon, 30 May 2022 21:09:13 +0200 Received: from ren-mail-psmtp-mg02. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id vkasnXLAv8s8UvklNnwiXA; Mon, 30 May 2022 21:09:13 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg02. with ESMTP id vklMndva18eSWvklMn6TQp; Mon, 30 May 2022 21:09:13 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.4 cv=KKE5sHJo c=1 sm=1 tr=0 ts=62951659 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=oFJauFbHeTtwRc_cPs0A:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 30 May 2022 21:09:11 +0200 Message-Id: <20220530190911.20843-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220530190911.20843-1-michael@niedermayer.cc> References: <20220530190911.20843-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfFQ+ltuf2ZBN9/UXZEhh1/OUj2LBRO143d+DYcC62UIFiyFkuWBLFiYOH1s28+kna6rBq46CUPbknUzqKdvMo0trWWMC+IG+bAgRzJTFZkYzb8w0rYvq mZvhYEWKZRraofo/b0yRmdaIHLFS64tvoND32zP5qpyLOHSGf9d1L5T3Qt5NTc/3WCXd/64kkveE0A== Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1enc: Alpha workaround 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 MIME-Version: 1.0 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: alpha-linux-gnu-gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 with qemu-alpha version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.39) trigger a FPE on the first iteration None of the intermediate values when printed shows an anomaly nor does casting the final value. I did not investigate this further by looking at the asm but that would be probably where to continue looking at this if someone is interrested in alpha. Signed-off-by: Michael Niedermayer --- libavcodec/ffv1enc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 9849082e44..9609877498 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -142,8 +142,10 @@ static void find_best_state(uint8_t best_state[256][256], int i, j, k, m; uint32_t l2tab[256]; - for (i = 1; i < 256; i++) + l2tab[1] = -log2(1 / 256.0) * ((1U << 31) / 8); + for (i = 2; i < 256; i++) { l2tab[i] = -log2(i / 256.0) * ((1U << 31) / 8); + } for (i = 0; i < 256; i++) { uint64_t best_len[256]; -- 2.17.1 _______________________________________________ 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".