From patchwork Mon Aug 1 12:23:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37069 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2470009pzb; Mon, 1 Aug 2022 05:24:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR6vx20f6oxCOgJYzcoONXcbpl3di3KbykU9oIBlSbSWoXzpkW7XOSa2e36AssMIufsKK29A X-Received: by 2002:a17:906:5a4e:b0:730:8f6a:6cc5 with SMTP id my14-20020a1709065a4e00b007308f6a6cc5mr2314493ejc.405.1659356696219; Mon, 01 Aug 2022 05:24:56 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id fd7-20020a056402388700b0043d54ba0a4dsi4843425edb.327.2022.08.01.05.24.55; Mon, 01 Aug 2022 05:24:56 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=NfvVc0u9; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2B29968B9FD; Mon, 1 Aug 2022 15:24:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068044.outbound.protection.outlook.com [40.92.68.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 505EE68B969 for ; Mon, 1 Aug 2022 15:24:15 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U3IXIsU3bJ0JuTUMKaSgQCfEhDuV47Q4QA5D4AYMY1UFlbFraje4omsVm5z54rgmnWMS6j2bIYAKmXYADFjjCT3Ppzui7NIVvNzzKNKYMLXsxJ0vZHY2TwjVGZcfsGIAPQnenvWdqj4OrscV7gACerCCpHLcuBT6di3cM6uPPcuTrH+shcWj1i41K9izklABeRESOYhMCJ5klIgg+NctorbiM0IJNQZdSiS1KrAZ5xvIwdnIiFzwnzpjPrC3WAjHm8PpwGjcyS2QdgcuiSmjKAe1rq41HMyoDvlPFytb2egaMFqtxYAHzLdV0bBKqo36BxvZ9ihWD1CugHqY6w3ezA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tTL6BCYXksvKRpKRszQdRjeJIYlYGxABoaS1j50X8Cg=; b=cC2P1IAcmXqsp/AD4CJT+kAGxYYdtRnRwlrbb/35mA58nFh6u+J/8ccEQILh+YsYR7kR8WYvCh7tHEkeW3n/aIPYp71xXFk7CDLP+YQCoTho7dCfOhPIXilghoCib0ORXFwdo4WJ8zVaM37Kj6yWpZjBUtzJ5k/0mDQZpE47PPicJganZRv+/MvmXGBB3ewpSR+fd3CZdSmhRjSOoeBtTyNrwoRAPzGJ5Kjx35WKT7uHePTuEHEqvWRBxBc6vE0bomNK6bhVpXC0GKuQYe00bxxdB3hxWC8k/axLKEC9hHqiGYVlJcMoS614rFCYJ+xzZG3w6n+RJeJsX9b0tX+wxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tTL6BCYXksvKRpKRszQdRjeJIYlYGxABoaS1j50X8Cg=; b=NfvVc0u94KS4OeLzPpTiN44S4xE3mZUwzXPvLo0J8UhY4ZaIEZptbYZvXqp0uRkh+gAsEOLcxkg4nBZghN9VsA6wLK85T5SOlF8UfQAvFzoi2LtAdm3rvNMP4HRteyH26hCHmuypKLtB3yMuC61azpgZenRxfM/RQlF7K4+VGYmSgbAGZmWLCiKhdEO21EatkcYEYxZ0inLVzPz6KKD5w/ilkP4pnmMyI6zW9WTrDN1H40LFQcnmTgQcWdfGsKROIShCwvk2jQhRmCDr3eDkUczkHPZiBZraHcRfNekV/LwLy2/x7T+YsWYTbn8w6ox+wkkTZZpqXy00ZwMzcRL5OQ== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by HE1PR0101MB2425.eurprd01.prod.exchangelabs.com (2603:10a6:3:85::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.14; Mon, 1 Aug 2022 12:24:13 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46%11]) with mapi id 15.20.5482.016; Mon, 1 Aug 2022 12:24:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:45 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [baG7N+qgHWJ3wdBx2YH5RX3gwbIPUPKq] X-ClientProxiedBy: FR0P281CA0137.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:96::13) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220801122349.3996066-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: efa8a4c4-e164-4129-a267-08da73b8be05 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRs85NybYSQmkOI17x75buO+Qzk/mvuj9NdXHs2Ksava8XLyu3i1/W6mhsP9F75/PYpE+VssKqKVNpfGfw3k5cZYx7NNCFNbglZdyWBsnm25v9SvPNv935N5dVEe6xqazv2Czppi4BLFW/v8KLIKCfYMjF1kGEnoFZUfV+XdmRvgcXPUnMAl4ifpot+9GZ2tdGt2XuT78HYIoQnCSvGHn869EyKmsFqLmDO2LQcNlw+w9430/+LyTtEmFcwvP/mKAs3dLQNaMCbFUqRaC5fM7Qa+O1AlLiVpNqUNF1L+o2ccNL1ojt7dUcd2fxd0wjTgRrPq55S9JkCD/f7r2Ts/H8I/UfugJCdUpfUyfefN8kq6SqIGsFfi72xOblHnQlH+uithc0GRucrXlQMOiK2lUJND+oRIga5ecXx1T1EIGJGrvBzSRvtK+YuRMLW3K5MXZt3goRv9ndNnm3hgANtua13gGgJfHnT3CJivC6QCX9aNPsZkuzk0YJC6mnNjcRy12n3ZlydgafoKdShrPpud4PwHVe+9tHidBEjzhoYLk+aLUAsgc2blPq4g+ML8MoBDiRAc1Lx04kZA7GvunDiUoKLIH//GViJLPBVNSwMLYtBVHvzkcgqiM0CUeKYkOUwadA8KPZkcsBZEf/v3xJbcnGGBMtUrBfdEcMEnP8zHkRUa0fPzpB9+8H4CD9WGWFkYkpZ4QlqOi5Xfkvq9CjhJdIjF3B9AEpUSua1W+SpN+4UXyU2N9zEj9zLr5XEVTKyyFw= X-MS-TrafficTypeDiagnostic: HE1PR0101MB2425:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jLYEudx0G+38A+Kd4GEY0MFoOPQzmqg+ncs0aF1bZoLQVIFW547x1pFOA6eI70IiltcERMatiLDY+ovjZPmETNeBOOCQ3l8pNa9ZI8HdiOJxlhXaq0F3vs/0GxJzn0BwefE2vGYrNGDwH3x/w1ofO8eraetwq/44eEXu0rnk0QZY6hWpaNPxaQ7MXyjsBswrSiPcFl0CwXQWjAk1980hbVl6w+6gP5VMeOQT/VzQUf5O+b7gVXItAg7s0frTc+/hFr+czkbP+EJFj0M3YBikthK/OTBoGRyqAThIpqJYvRvjRuFOUVias5W7Z4l1XmbZit8UqL6AoWwmoSCTNLKMW4O43jDsJNI21UiOQk8URF04mZjUo4C+UwfVeFp3iC61t79MgqOnRsxK6rotkOfaCJQYSVU+VtcCXGilAo8vX6s4yxgXfrpo3xWFQu5i5peU2AenLC8B4R0VykZGiP45VdySjdKNkxMgFbG2tLMU8ZYfN9f9lNW8Aih14wpr14kgLnFt/x2+67Jyl/MJFeksbzJF1z9GC+++b+OvZIRSdaxN8bZeTq4XnhcIAJcwgtY2vUvk3o2fSPwmmAWkCQ59NJViLw8F/JF1srRHzBs1kaO1Id+diihCZh8R/hS1OdKNyqv59anYyZU4cZ3vixbqmw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1eyFIPU7sfqiDXenhJWmdDa4AA61MmCDg7jsI3PaMVkD0G4rBv2padHwz1lWuiC09dpe6Un7MHimM6F72p3D+OKurXEIo8SA0OdeJJKW9rS1Xvdf5Um/Xcaqkybwx4156lmC2/5K1oVv5u5wxkbDC5iv09IObKVnbtHtQnwAc8Xlr9uj7mtYJxqlN2sj7I8nU3haXmEEhwWPv6QW1vkM2ePFmcdqmZsvbNMKQlXtQ0zx9VzowtAW1KWYZeRCr7oC5X2vpaO/3wjeqj40G8m/AueEnso10H6cinGXSzeAMvtgxlDq+RLLhWpANwGAicoDzVNNhq6OQDYwTbvh7QWF/0WLCU+ksrv5WtkxeafuXmbQ/ZmS+NvbaI30wZO7dIkaSdp/kImOYGdBr/4C0kSnq8H7LAUzfGKs+foorwr68f5iDSVqAGj8dSfGH+5TqB3qGh0NUse7efMXpZsu1zaRFZhYPimCSg0keWzWS3q5rRUHoQaI6qKdNLBJPiAnOzQg25ytrTS7JDUHpeYymi2IlTGTTr0gpE5sx4JWX12SV0tEpsht+49QqhLBe0KWdhoAiqRW0peMOOUBbmn769Rz/UgVGpByR3TT4/KXH/p5Yvh9KSrV/1Hu3XVooxdfAjkCafwjLAPx7V9f5eGPwFk2ArFk/1vPf9/n61sejc+f4kF+pLc/RrEz52ZR1oHhXeel89qTx5dfe73g8SkAx6WEs95mQ5uqTN7VhRLI1LCfjrIbxI3yKZPgnAN/AJ3V3ZZDuYKc4H2aG63aOLr7eQYvoH2ywHgGsk0aPsFWQ/4kELv9QX1FvVxoezTrWYsre4ekfi7rDdXycNcljzbif4yZDZJRxzTzqwR9W++2LnkHBv5O8kq4u54gXrKXFSkGZ1vDKGApBLCULiku8xppAFMIquxFD5tJQEUS7+vdSq1h6Lt9DbQE/ZCLKlT5dz/DXysTu4K+Viwjq5DhIPgMdlHtfTnlIqQyJG+8vs8oS6daeD6IrbGIIoeAkTpUgEkW9M4MRAZ8g6SZiJfRIvvM5XuIjmWDCaIfY75SqtpxY/CROMLEIAidJII5APjDp8xd2zlU7QvYlnOsdJcCTY+z8okIKw+Gkoq1vrt+XoSbxz4VYcTB3Br+wSa0euYFJhKWTzlGuIZtvba6Bd64J2pbLQyBoQVKW6YDb0o2OhWA2q+/Yd3J0SBObTCjQ+/Fj0ugQUbdg07frl/QnBFfmRHtF02G69U6g8GrfKdPiXyYwiyyAA07ruKJ5cfa1YBI+tdYUahJYFMR7f+a+velyYktBlSs47pNppGBiIZPd1B/xmarqt8= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: efa8a4c4-e164-4129-a267-08da73b8be05 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2022 12:24:12.8532 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0101MB2425 Subject: [FFmpeg-devel] [PATCH 07/11] avcodec/aacenc_quantization: Remove always-zero function parameter 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: KLZ5h3R9wcQ7 rtz is only ever nonzero for quantize_and_encode_band(). Signed-off-by: Andreas Rheinhardt --- This commit touches aaccoder_mips.c, but honestly I was not able to compile it at all (neither before nor after this change), because all I got were errors like: "{standard input}:1114: Error: float register should be even, was 1" Furthermore, ff_aac_coder_init_mips() is crazy: It overwrites pointers in ff_aac_coders; the latter is a const array with static lifetime. Modifying it will crash on every system that uses relro. This encoder should probably use an ordinary DSP context that is part of the context and not static instead. (Anyway, most coder functions are always the same for all coders, so the function pointer is unnecessary.) libavcodec/aaccoder.c | 14 +++++++------- libavcodec/aaccoder_trellis.h | 2 +- libavcodec/aacenc_is.c | 6 +++--- libavcodec/aacenc_ltp.c | 4 ++-- libavcodec/aacenc_quantization.h | 8 ++++---- libavcodec/aacenc_quantization_misc.h | 2 +- libavcodec/mips/aaccoder_mips.c | 12 ++++++------ 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index f460479498..2988247a15 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -123,7 +123,7 @@ static void encode_window_bands_info(AACEncContext *s, SingleChannelElement *sce rd += quantize_band_cost(s, &sce->coeffs[start + w*128], &s->scoefs[start + w*128], size, sce->sf_idx[(win+w)*16+swb], aac_cb_out_map[cb], - lambda / band->threshold, INFINITY, NULL, NULL, 0); + lambda / band->threshold, INFINITY, NULL, NULL); } cost_stay_here = path[swb][cb].cost + rd; cost_get_here = minrd + rd + run_bits + 4; @@ -346,7 +346,7 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s, for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g]; dist += quantize_band_cost(s, coefs + w2*128, s->scoefs + start + w2*128, sce->ics.swb_sizes[g], - q + q0, cb, lambda / band->threshold, INFINITY, NULL, NULL, 0); + q + q0, cb, lambda / band->threshold, INFINITY, NULL, NULL); } minrd = FFMIN(minrd, dist); @@ -658,7 +658,7 @@ static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChanne sce->ics.swb_sizes[g], sce->sf_idx[(w+w2)*16+g], sce->band_alt[(w+w2)*16+g], - lambda/band->threshold, INFINITY, NULL, NULL, 0); + lambda/band->threshold, INFINITY, NULL, NULL); /* Estimate rd on average as 5 bits for SF, 4 for the CB, plus spread energy * lambda/thr */ dist2 += band->energy/(band->spread*band->spread)*lambda*dist_thresh/band->threshold; } @@ -842,25 +842,25 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe) sce0->ics.swb_sizes[g], sce0->sf_idx[w*16+g], sce0->band_type[w*16+g], - lambda / (band0->threshold + FLT_MIN), INFINITY, &b1, NULL, 0); + lambda / (band0->threshold + FLT_MIN), INFINITY, &b1, NULL); dist1 += quantize_band_cost(s, &sce1->coeffs[start + (w+w2)*128], R34, sce1->ics.swb_sizes[g], sce1->sf_idx[w*16+g], sce1->band_type[w*16+g], - lambda / (band1->threshold + FLT_MIN), INFINITY, &b2, NULL, 0); + lambda / (band1->threshold + FLT_MIN), INFINITY, &b2, NULL); dist2 += quantize_band_cost(s, M, M34, sce0->ics.swb_sizes[g], mididx, midcb, - lambda / (minthr + FLT_MIN), INFINITY, &b3, NULL, 0); + lambda / (minthr + FLT_MIN), INFINITY, &b3, NULL); dist2 += quantize_band_cost(s, S, S34, sce1->ics.swb_sizes[g], sididx, sidcb, - mslambda / (minthr * bmax + FLT_MIN), INFINITY, &b4, NULL, 0); + mslambda / (minthr * bmax + FLT_MIN), INFINITY, &b4, NULL); B0 += b1+b2; B1 += b3+b4; dist1 -= b1+b2; diff --git a/libavcodec/aaccoder_trellis.h b/libavcodec/aaccoder_trellis.h index 940ebf029d..4810ff3208 100644 --- a/libavcodec/aaccoder_trellis.h +++ b/libavcodec/aaccoder_trellis.h @@ -127,7 +127,7 @@ static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce, &s->scoefs[start + w*128], size, sce->sf_idx[win*16+swb], aac_cb_out_map[cb], - 0, INFINITY, NULL, NULL, 0); + 0, INFINITY, NULL, NULL); } cost_stay_here = path[swb][cb].cost + bits; cost_get_here = minbits + bits + run_bits + 4; diff --git a/libavcodec/aacenc_is.c b/libavcodec/aacenc_is.c index 2f5b7eb8dc..1810790d88 100644 --- a/libavcodec/aacenc_is.c +++ b/libavcodec/aacenc_is.c @@ -68,15 +68,15 @@ struct AACISError ff_aac_is_encoding_err(AACEncContext *s, ChannelElement *cpe, sce0->ics.swb_sizes[g], sce0->sf_idx[w*16+g], sce0->band_type[w*16+g], - s->lambda / band0->threshold, INFINITY, NULL, NULL, 0); + s->lambda / band0->threshold, INFINITY, NULL, NULL); dist1 += quantize_band_cost(s, &R[start + (w+w2)*128], R34, sce1->ics.swb_sizes[g], sce1->sf_idx[w*16+g], sce1->band_type[w*16+g], - s->lambda / band1->threshold, INFINITY, NULL, NULL, 0); + s->lambda / band1->threshold, INFINITY, NULL, NULL); dist2 += quantize_band_cost(s, IS, I34, sce0->ics.swb_sizes[g], is_sf_idx, is_band_type, - s->lambda / minthr, INFINITY, NULL, NULL, 0); + s->lambda / minthr, INFINITY, NULL, NULL); for (i = 0; i < sce0->ics.swb_sizes[g]; i++) { dist_spec_err += (L34[i] - I34[i])*(L34[i] - I34[i]); dist_spec_err += (R34[i] - I34[i]*e01_34)*(R34[i] - I34[i]*e01_34); diff --git a/libavcodec/aacenc_ltp.c b/libavcodec/aacenc_ltp.c index f77f0b6a72..f7fb85bbf8 100644 --- a/libavcodec/aacenc_ltp.c +++ b/libavcodec/aacenc_ltp.c @@ -194,11 +194,11 @@ void ff_aac_search_for_ltp(AACEncContext *s, SingleChannelElement *sce, s->abs_pow34(PCD34, PCD, sce->ics.swb_sizes[g]); dist1 += quantize_band_cost(s, &sce->coeffs[start+(w+w2)*128], C34, sce->ics.swb_sizes[g], sce->sf_idx[(w+w2)*16+g], sce->band_type[(w+w2)*16+g], - s->lambda/band->threshold, INFINITY, &bits_tmp1, NULL, 0); + s->lambda/band->threshold, INFINITY, &bits_tmp1, NULL); dist2 += quantize_band_cost(s, PCD, PCD34, sce->ics.swb_sizes[g], sce->sf_idx[(w+w2)*16+g], sce->band_type[(w+w2)*16+g], - s->lambda/band->threshold, INFINITY, &bits_tmp2, NULL, 0); + s->lambda/band->threshold, INFINITY, &bits_tmp2, NULL); bits1 += bits_tmp1; bits2 += bits_tmp2; } diff --git a/libavcodec/aacenc_quantization.h b/libavcodec/aacenc_quantization.h index fc5a46b875..f3c3553886 100644 --- a/libavcodec/aacenc_quantization.h +++ b/libavcodec/aacenc_quantization.h @@ -250,20 +250,20 @@ static float (*const quantize_and_encode_band_cost_rtz_arr[])( static inline float quantize_band_cost(struct AACEncContext *s, const float *in, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, - int *bits, float *energy, int rtz) + int *bits, float *energy) { return quantize_and_encode_band_cost(s, NULL, in, NULL, scaled, size, scale_idx, - cb, lambda, uplim, bits, energy, rtz); + cb, lambda, uplim, bits, energy, 0); } static inline int quantize_band_cost_bits(struct AACEncContext *s, const float *in, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, - int *bits, float *energy, int rtz) + int *bits, float *energy) { int auxbits; quantize_and_encode_band_cost(s, NULL, in, NULL, scaled, size, scale_idx, - cb, 0.0f, uplim, &auxbits, energy, rtz); + cb, 0.0f, uplim, &auxbits, energy, 0); if (bits) { *bits = auxbits; } diff --git a/libavcodec/aacenc_quantization_misc.h b/libavcodec/aacenc_quantization_misc.h index 28676ca8d5..c789754f4f 100644 --- a/libavcodec/aacenc_quantization_misc.h +++ b/libavcodec/aacenc_quantization_misc.h @@ -38,7 +38,7 @@ static inline float quantize_band_cost_cached(struct AACEncContext *s, int w, in entry = &s->quantize_band_cost_cache[scale_idx][w*16+g]; if (entry->generation != s->quantize_band_cost_cache_generation || entry->cb != cb || entry->rtz != rtz) { entry->rd = quantize_band_cost(s, in, scaled, size, scale_idx, - cb, lambda, uplim, &entry->bits, &entry->energy, rtz); + cb, lambda, uplim, &entry->bits, &entry->energy); entry->cb = cb; entry->rtz = rtz; entry->generation = s->quantize_band_cost_cache_generation; diff --git a/libavcodec/mips/aaccoder_mips.c b/libavcodec/mips/aaccoder_mips.c index d690c8c24a..bf27a2a5da 100644 --- a/libavcodec/mips/aaccoder_mips.c +++ b/libavcodec/mips/aaccoder_mips.c @@ -1472,7 +1472,7 @@ static float (*const get_band_numbits_arr[])(struct AACEncContext *s, static float quantize_band_cost_bits(struct AACEncContext *s, const float *in, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, - int *bits, float *energy, int rtz) + int *bits, float *energy) { return get_band_numbits(s, NULL, in, scaled, size, scale_idx, cb, lambda, uplim, bits); } @@ -2326,7 +2326,7 @@ static float (*const get_band_cost_arr[])(struct AACEncContext *s, static float quantize_band_cost(struct AACEncContext *s, const float *in, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, - int *bits, float *energy, int rtz) + int *bits, float *energy) { return get_band_cost(s, NULL, in, scaled, size, scale_idx, cb, lambda, uplim, bits, energy); } @@ -2424,25 +2424,25 @@ static void search_for_ms_mips(AACEncContext *s, ChannelElement *cpe) sce0->ics.swb_sizes[g], sce0->sf_idx[w*16+g], sce0->band_type[w*16+g], - lambda / band0->threshold, INFINITY, &b1, NULL, 0); + lambda / band0->threshold, INFINITY, &b1, NULL); dist1 += quantize_band_cost(s, &sce1->coeffs[start + (w+w2)*128], R34, sce1->ics.swb_sizes[g], sce1->sf_idx[w*16+g], sce1->band_type[w*16+g], - lambda / band1->threshold, INFINITY, &b2, NULL, 0); + lambda / band1->threshold, INFINITY, &b2, NULL); dist2 += quantize_band_cost(s, M, M34, sce0->ics.swb_sizes[g], mididx, midcb, - lambda / minthr, INFINITY, &b3, NULL, 0); + lambda / minthr, INFINITY, &b3, NULL); dist2 += quantize_band_cost(s, S, S34, sce1->ics.swb_sizes[g], sididx, sidcb, - mslambda / (minthr * bmax), INFINITY, &b4, NULL, 0); + mslambda / (minthr * bmax), INFINITY, &b4, NULL); B0 += b1+b2; B1 += b3+b4; dist1 -= b1+b2;