From patchwork Sat Apr 11 08:12:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 18835 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 0236844BD16 for ; Sat, 11 Apr 2020 11:12:56 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DE77D68AD8A; Sat, 11 Apr 2020 11:12:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 57788689E40 for ; Sat, 11 Apr 2020 11:12:49 +0300 (EEST) Date: Sat, 11 Apr 2020 08:12:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zanevaniperen.com; s=protonmail; t=1586592768; bh=mMSxGuJsGpDg36hVC/GBUWdJcElENwlI5XmTdiwK8qE=; h=Date:To:From:Cc:Reply-To:Subject:From; b=nMGmCRpsoaHtKWZQOcbcUVMGyhzzcc2AtTBS3prUQCY5Gpl+ynHsAAjdYP/UMUJuk RMCqYFC2tyIsU227qhohIkPlMyi6X/KFnUyvftoU53gBhRdg0sK2EbIh9vNUIQfyXK y2e17NZr5bgJf70WcGg4O2eJLvD30mfJdMfK1e3k= To: ffmpeg-devel@ffmpeg.org From: Zane van Iperen Message-ID: <20200411081230.11126-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch Subject: [FFmpeg-devel] [PATCH] avcodec/adpcm: remove unused shift parameter from adpcm_ima_qt_expand_nibble() 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 Cc: Zane van Iperen Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Zane van Iperen --- libavcodec/adpcm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index e9abddc43c..ee18875579 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -348,7 +348,7 @@ static inline int16_t adpcm_ima_wav_expand_nibble(ADPCMChannelStatus *c, GetBitC return (int16_t)c->predictor; } -static inline int adpcm_ima_qt_expand_nibble(ADPCMChannelStatus *c, int nibble, int shift) +static inline int adpcm_ima_qt_expand_nibble(ADPCMChannelStatus *c, int nibble) { int step_index; int predictor; @@ -969,8 +969,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, for (m = 0; m < 64; m += 2) { int byte = bytestream2_get_byteu(&gb); - samples[m ] = adpcm_ima_qt_expand_nibble(cs, byte & 0x0F, 3); - samples[m + 1] = adpcm_ima_qt_expand_nibble(cs, byte >> 4 , 3); + samples[m ] = adpcm_ima_qt_expand_nibble(cs, byte & 0x0F); + samples[m + 1] = adpcm_ima_qt_expand_nibble(cs, byte >> 4 ); } } break; @@ -1280,16 +1280,16 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, case AV_CODEC_ID_ADPCM_IMA_SSI: while (bytestream2_get_bytes_left(&gb) > 0) { int v = bytestream2_get_byteu(&gb); - *samples++ = adpcm_ima_qt_expand_nibble(&c->status[0], v >> 4 , 3); - *samples++ = adpcm_ima_qt_expand_nibble(&c->status[st], v & 0x0F, 3); + *samples++ = adpcm_ima_qt_expand_nibble(&c->status[0], v >> 4 ); + *samples++ = adpcm_ima_qt_expand_nibble(&c->status[st], v & 0x0F); } break; case AV_CODEC_ID_ADPCM_IMA_APM: for (n = nb_samples / 2; n > 0; n--) { for (channel = 0; channel < avctx->channels; channel++) { int v = bytestream2_get_byteu(&gb); - *samples++ = adpcm_ima_qt_expand_nibble(&c->status[channel], v >> 4 , 3); - samples[st] = adpcm_ima_qt_expand_nibble(&c->status[channel], v & 0x0F, 3); + *samples++ = adpcm_ima_qt_expand_nibble(&c->status[channel], v >> 4 ); + samples[st] = adpcm_ima_qt_expand_nibble(&c->status[channel], v & 0x0F); } samples += avctx->channels; } @@ -1640,8 +1640,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, for (n = nb_samples >> (1 - st); n > 0; n--) { int v = bytestream2_get_byteu(&gb); - *samples++ = adpcm_ima_qt_expand_nibble(&c->status[0 ], v >> 4, 3); - *samples++ = adpcm_ima_qt_expand_nibble(&c->status[st], v & 0xf, 3); + *samples++ = adpcm_ima_qt_expand_nibble(&c->status[0 ], v >> 4 ); + *samples++ = adpcm_ima_qt_expand_nibble(&c->status[st], v & 0xf); } break; case AV_CODEC_ID_ADPCM_CT: