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 1BC754071A for ; Sun, 28 Aug 2022 17:25:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C398768B746; Sun, 28 Aug 2022 20:25:54 +0300 (EEST) Received: from vie01a-dmta-at02-3.mx.upcmail.net (unknown [62.179.121.150]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C70D268B405 for ; Sun, 28 Aug 2022 20:25:47 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at02.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1oSM2c-00DjBA-ON for ffmpeg-devel@ffmpeg.org; Sun, 28 Aug 2022 19:25:46 +0200 Received: from ren-mail-psmtp-mg01. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id SM2cojtdX8s8USM2coSvmG; Sun, 28 Aug 2022 19:25:46 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg01. with ESMTP id SM2boQKL0OPqFSM2bohUU1; Sun, 28 Aug 2022 19:25:45 +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=OcX7sjfY c=1 sm=1 tr=0 ts=630ba51a a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=KwfibEU_YaUDUur5ersA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 28 Aug 2022 19:25:45 +0200 Message-Id: <20220828172545.8185-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfAeTe5yMEKh9+sGwqgjBxxgFf9DRD9w3c4bhdePxQD5i8pEMTukS5aKAvfD7P11JlfdbiFVKiieeQTQ+y2iik7yM30Vt7xeB/ZtYkZjr2WvpzP5UVwiL jzhGBYxolJyvRDUwYDnG9X3CfsHFFrtOx4QY/SFOjorrAkd2pHh6wxxDMDsQ599UNHrWIZ9ogkFLtQ== Subject: [FFmpeg-devel] [PATCH] avcodec/vpx_rac: Adjust vpx_rac_is_end) threshold 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: A threshold of 180 is needed and sufficient for the sample, twice this is used to cover potentially worse samples fate/vp5 changes as the sample file is truncated and the damaged part is handled differently Fixes: ticket #9754 Signed-off-by: Michael Niedermayer --- libavcodec/vpx_rac.h | 2 +- tests/ref/fate/vp5 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vpx_rac.h b/libavcodec/vpx_rac.h index b158cc0754..2f5486f501 100644 --- a/libavcodec/vpx_rac.h +++ b/libavcodec/vpx_rac.h @@ -52,7 +52,7 @@ static av_always_inline int vpx_rac_is_end(VPXRangeCoder *c) { if (c->end <= c->buffer && c->bits >= 0) c->end_reached ++; - return c->end_reached > 10; + return c->end_reached > 360; } static av_always_inline unsigned int vpx_rac_renorm(VPXRangeCoder *c) diff --git a/tests/ref/fate/vp5 b/tests/ref/fate/vp5 index 09ebe62b25..2116fb9b81 100644 --- a/tests/ref/fate/vp5 +++ b/tests/ref/fate/vp5 @@ -249,4 +249,4 @@ 0, 243, 243, 1, 233472, 0x6f530ac6 0, 244, 244, 1, 233472, 0x94f7466c 0, 245, 245, 1, 233472, 0xa8c1d365 -0, 246, 246, 1, 233472, 0x4f3ef38c +0, 246, 246, 1, 233472, 0xedcff050 -- 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".