From patchwork Tue Sep 8 21:29:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 22201 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D8DAC44BD8E for ; Wed, 9 Sep 2020 00:30:37 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B8C1F68B6D7; Wed, 9 Sep 2020 00:30:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-3.mx.upcmail.net (vie01a-dmta-pe03-3.mx.upcmail.net [62.179.121.162]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8C3EC68B6A3 for ; Wed, 9 Sep 2020 00:30:29 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1kFlC9-0004pd-0M for ffmpeg-devel@ffmpeg.org; Tue, 08 Sep 2020 23:30:29 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id FlBBkAVsOIr7GFlBBkuNJF; Tue, 08 Sep 2020 23:29:29 +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.3 cv=QN4WuTDL c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=F3ZyOR7hIl-MsCahud4A:9 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 8 Sep 2020 23:29:20 +0200 Message-Id: <20200908212921.7408-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200908212921.7408-1-michael@niedermayer.cc> References: <20200908212921.7408-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfD+ylpfvfm1zPsNJ5zlHoPD7q5jnVbkLHr9PkyztFDDgpx4J7oKe7UgQhdV5gul/WzWkgJpBXxux6EJVG/ZdU95uD+48uPdt+DXmtCL+Y0braxtxHfEk 5ahehHBx2Rw22UqACnt2KYbEqWwI38kQKgLcv3INIfpTLY/odiLPTzLq Subject: [FFmpeg-devel] [PATCH 2/3] avcodec/fastaudio: Remove redundant % 32 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavcodec/fastaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/fastaudio.c b/libavcodec/fastaudio.c index 34857d1b88..16f44790f5 100644 --- a/libavcodec/fastaudio.c +++ b/libavcodec/fastaudio.c @@ -95,7 +95,7 @@ static int read_bits(int bits, int *ppos, unsigned *src) r = src[(pos - 1) / 32] >> (32 - pos % 32); *ppos = pos; - return r & ((1 << (bits % 32)) - 1); + return r & ((1 << bits) - 1); } static const uint8_t bits[8] = { 6, 6, 5, 5, 4, 0, 3, 3, };