From patchwork Mon Aug 1 12:16:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37063 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2465743pzb; Mon, 1 Aug 2022 05:17:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tPZfkIan2oCDjMKnUCdqgN6Vn8LUIRw2fB9stlRg6hbamVgbvmZj/bxt9JKgRS0tEAipYg X-Received: by 2002:a05:6402:48c:b0:43a:8bc7:f440 with SMTP id k12-20020a056402048c00b0043a8bc7f440mr15574335edv.8.1659356249829; Mon, 01 Aug 2022 05:17:29 -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 z20-20020a056402275400b0043c2e89d0acsi11716150edd.3.2022.08.01.05.17.21; Mon, 01 Aug 2022 05:17:29 -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=RSvY5xSI; 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 3273068B8E7; Mon, 1 Aug 2022 15:17: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-oln040092068085.outbound.protection.outlook.com [40.92.68.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F0D4168B61A for ; Mon, 1 Aug 2022 15:17:11 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YhFi0Oh8ITml+Wn6gqLa98eKdC2NWA59Y9uqTvEdXJ5O63PVvF3MgaB3pKMGdWXBq3P3dfOI/+X1G7D3573go+3MmtGY2TYRztOiRG++CRhhDRZhNJk42C4oA2XW4l4Vf4r2vuIh01IO6yADBoNDt938SfZ1JXEBdEa/caJN8m5Q1WTX5q1Z0lawVsdtBVGYAFc+vGxTsN/V2ruPcnovfpapbZ1ia520PUGNYc27omTpw/ztUJVrvO3Rq56L7EHczxtgOP2wzn/kfeRvJ0cm2nmftFeDnhhUCsPyUxU48qGoH/skhB53OArdd9T5wr1PVXLkSrjVulgxf+acIvZ4BQ== 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=G+xdmp1q43r5oPhLSphPSHoEMplk61a0TJHJfwlkywE=; b=hLwgUUzuetlGm1U7BucPn2sUTrRxhs9r70KrwfjJ1j10VKxKtEG2wvKcBT6YuaNrr8BsQtAhLThtkNQnivUTad027V580FHGWTCYmJxK5g5vSGXJMzOAJPEp94Mft5MGPl3NO++4RyXOSALDxW1Xf5D9XNpt8t8PvH4BWjoVTFWlb25UHDLwXynoJhc84Jd/A/Qc/cZtfLLkHWw9A5RveGSVQ2vzeF21s7CMsgHOaim/CZpBSzBdcsHWijKw2HJKndyjqQIcvdV7CEf3ZVntpTPZDu0yXmfALd2i9xZFr80wL1QbIq7rDe6cYk37A8SqWKWcbdx+rE2ba7l15i4H+w== 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=G+xdmp1q43r5oPhLSphPSHoEMplk61a0TJHJfwlkywE=; b=RSvY5xSI0JTQy7VOhP59n6/Zl4j6bZkD6S6LaEFoo4CM5+btCn2bFXJxIkyjDhY1HzifWRDuSCQnJnkDkjyjh4GqIYIwirbJHswFDrAsFHm9p2XWTA329ez2DBHw/7lnRCtDnEde0/M1wWWKXv/KvdMeh4PE4VkNmt0S0dQ4yJ8wepg51yFnu6gSs6N+sNB276gHrsLiKcB0fGgJOlWkLWopr0XSa5AEqwArGwOsyuex2WstKHt5WSyoSQObZZU7/3bn+DwdIpQ8Oyo0cL1aj/ZQQHsJJzbw37u7xgzJqgyob5Dvp6d8PfVeZxAFL5PTafjlUzN+8Bu7lO1FAJDQPA== 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:17:09 +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:17:09 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:16:51 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [QNaE5ODuKqJOHp7uWZE1q/cdTMkIWLdO] X-ClientProxiedBy: FR0P281CA0050.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::13) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220801121701.3940411-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f65aaabc-5260-4776-919e-08da73b7c180 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVakJMqjhoreY9eRj3hMzSfk2Wo9XoCwx54fQncDcAabv1220bwGiC13AThQg7C7Kjbkc0O9gMoGpJhg5sCHOnoH/MO2X6fiYnsQGi1NAjNc6er1ku/1gskeH6XTlrFp9C0AVySKtZDCgCT1KEcxRki7cbSnm3vVPRo118ohe/M6txkZ4+oE9xu9QNSwgDDoE6etVIkE5RxOXzpAMaTZ8Xd5fuDhU4Bk1E8syyKVlcsFs/zXa3UvQd1aqTUWzFUEm5ZIAccFWMxYB2Hvz9HEvlExumk+Ej7JpiGuvYlpBvO9s3RiZsVr0ITNsCGEnyT5hR/NJMDcVlDX/l+o30U58XtHikeSJcrBRGzDiKvH9p43DNJIyIM7QsIejq8XRmEbcoMOQcqQyHH5OOC5Dem9663lgHYaSvxq3k7qkRjfSz/twnLfM+pVPrWUY75qzsooKc30QntbnaeQESgiGMKIKvhptp26Wcw9guHVtzWeSqtvwULARzM3bo4vlluqhSqAwKl/nbNV3vgqyvV2sced3SPQt7h7/Kjw2Sq2YrCznVJcQx8ZN2oWCaAXN8nQvM0X3PmgVeBm0L/uiKuDjkYlq2k6y+V0Bp01PqS7NTZDJucqmPAsF8fdZaLAwgsYYRLBbSh1bjZYyEETvM3k0qFz6ZlYVC1oik4StQJvjXOYOjJWbPNo2BgzskINAP938XBSvw7s3hBx2ixF5hLp4W5h8OXeO+DxN9YrBA= X-MS-TrafficTypeDiagnostic: HE1PR0101MB2425:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JdFiKQ3wJTWBk1njNiO5QpjsUwi4Iy20gyX9nvoi2v5U7AhXNAj6utSCC9oAdRKqysd9E8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DouQ/wTiFPOyNCue8QWKNrBFp4xXScQVEEEd5ktS5rsavu+AJkdCjbRfAKvgQI0FfWs9fSEBbli96qandiTZUSL3l3VBlNd5FgoZdmuGjhzjiedCp1S6foSKyS/j7Rasp4XJFhpREqhHXMF6Osfb6zQvX7Ghs2Yw1tF7tE8r/hzSh2Moqelk02RbjGJ3MSSDksHTfoMmEj5A6NexkucBL9/idDHGNTHAs9JEIG9QOZQ56eUq2LROeJ7rfk0wqMczBXLnHj7Rr+Etvu4bQW0cplqyuZCd5MtUEfFfToAq4OH1n7wUQgRv52oI8gVqoqdbUg9Ovr4IGVDqRkjRTvF5CAdHpOq5PIZ9wPdAfMwiUBtCQkweTcq6WJbDNkHkkE16DqISAaa4dIEO4/5AdVg38gKdEY2bhC1LonJWFbCh/2D5pG+TfVYH/zuN5ZFn5B6pPJ/BZpVc+tNnNJoSyeGs0sc9PKrMxgWinofiuTR5FFtMJ3+gvAxYO73I2h4cxJz6Jl/vn7Fv8CivlBKtY1KPPXqr/zmm/aCi2Tl1aLmVpn68TYfKhCW0gG3Hj12OI7fQX+K8IxI2GEfZ0rhfrDKvGbA1zAqF37IQnhyIRQ2BuariTrA86pnOxYOwiPTvoqL+f+FtfxTJEU6OAkOPZDwiCBwxONDWYgTTyU8afRCS25GUtlhoiZdoQtAkh39Pkccl/Hfot905HZtfNGQHws+ka/XnkdycMktRF3T5kRgvs7y5meQeXweTfJPXMk+oCrUF4jKpJ40vefxGagfvkYOCaaV1oHxjs61DiTl3iXuxH29ClxA9KVwAay+fe+xfXtaP/S8e1MUzmL+71FZh5zZZbIwoKQmw29UwAw42cbFDQVawcKZeYRpBfoCGnlipMjaqg3xox9JJ8= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f65aaabc-5260-4776-919e-08da73b7c180 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:17:09.2421 (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 01/11] avcodec/flacdsp: Remove unused 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: 1z/I0jmkCfLC Forgotten in e609cfd697f8eed7325591f767585041719807d1. Signed-off-by: Andreas Rheinhardt --- libavcodec/arm/flacdsp_init_arm.c | 3 +-- libavcodec/flacdec.c | 6 +++--- libavcodec/flacdsp.c | 7 +++---- libavcodec/flacdsp.h | 6 +++--- libavcodec/flacenc.c | 3 +-- libavcodec/x86/flacdsp_init.c | 3 +-- tests/checkasm/flacdsp.c | 4 ++-- 7 files changed, 14 insertions(+), 18 deletions(-) diff --git a/libavcodec/arm/flacdsp_init_arm.c b/libavcodec/arm/flacdsp_init_arm.c index bac9ff1959..a16de9ee9a 100644 --- a/libavcodec/arm/flacdsp_init_arm.c +++ b/libavcodec/arm/flacdsp_init_arm.c @@ -26,8 +26,7 @@ void ff_flac_lpc_16_arm(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); -av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, - int bps) +av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels) { if (CONFIG_FLAC_DECODER) c->lpc16 = ff_flac_lpc_16_arm; diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 17f1821c50..5ddc5a34d2 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -117,7 +117,7 @@ static av_cold int flac_decode_init(AVCodecContext *avctx) return ret; flac_set_bps(s); ff_flacdsp_init(&s->dsp, avctx->sample_fmt, - s->flac_stream_info.channels, s->flac_stream_info.bps); + s->flac_stream_info.channels); s->got_streaminfo = 1; return 0; @@ -185,7 +185,7 @@ static int parse_streaminfo(FLACContext *s, const uint8_t *buf, int buf_size) return ret; flac_set_bps(s); ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, - s->flac_stream_info.channels, s->flac_stream_info.bps); + s->flac_stream_info.channels); s->got_streaminfo = 1; return 0; @@ -536,7 +536,7 @@ static int decode_frame(FLACContext *s) dump_headers(s->avctx, &s->flac_stream_info); } ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, - s->flac_stream_info.channels, s->flac_stream_info.bps); + s->flac_stream_info.channels); // dump_headers(s->avctx, &s->flac_stream_info); diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c index 79002dcac0..da8400ae0a 100644 --- a/libavcodec/flacdsp.c +++ b/libavcodec/flacdsp.c @@ -86,8 +86,7 @@ static void flac_lpc_32_c(int32_t *decoded, const int coeffs[32], } -av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, - int bps) +av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels) { c->lpc16 = flac_lpc_16_c; c->lpc32 = flac_lpc_32_c; @@ -125,8 +124,8 @@ av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int cha } #if ARCH_ARM - ff_flacdsp_init_arm(c, fmt, channels, bps); + ff_flacdsp_init_arm(c, fmt, channels); #elif ARCH_X86 - ff_flacdsp_init_x86(c, fmt, channels, bps); + ff_flacdsp_init_x86(c, fmt, channels); #endif } diff --git a/libavcodec/flacdsp.h b/libavcodec/flacdsp.h index 4a7a36064a..9f8ed38b66 100644 --- a/libavcodec/flacdsp.h +++ b/libavcodec/flacdsp.h @@ -36,8 +36,8 @@ typedef struct FLACDSPContext { const int32_t coefs[32], int shift); } FLACDSPContext; -void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); -void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); -void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); +void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels); +void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels); +void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels); #endif /* AVCODEC_FLACDSP_H */ diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 9350e42dbc..3cfefbc89f 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -425,8 +425,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) s->options.max_prediction_order, FF_LPC_TYPE_LEVINSON); ff_bswapdsp_init(&s->bdsp); - ff_flacdsp_init(&s->flac_dsp, avctx->sample_fmt, channels, - avctx->bits_per_raw_sample); + ff_flacdsp_init(&s->flac_dsp, avctx->sample_fmt, channels); dprint_compression_options(s); diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c index ed2e5ed15b..7975712db9 100644 --- a/libavcodec/x86/flacdsp_init.c +++ b/libavcodec/x86/flacdsp_init.c @@ -52,8 +52,7 @@ DECORRELATE_FUNCS(16, avx); DECORRELATE_FUNCS(32, sse2); DECORRELATE_FUNCS(32, avx); -av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, - int bps) +av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels) { #if HAVE_X86ASM int cpu_flags = av_get_cpu_flags(); diff --git a/tests/checkasm/flacdsp.c b/tests/checkasm/flacdsp.c index 6cd8ac50ef..ef93df8c81 100644 --- a/tests/checkasm/flacdsp.c +++ b/tests/checkasm/flacdsp.c @@ -76,12 +76,12 @@ void checkasm_check_flacdsp(void) int i, j; for (i = 0; i < 2; i++) { - ff_flacdsp_init(&h, fmts[i].fmt, 2, 0); + ff_flacdsp_init(&h, fmts[i].fmt, 2); for (j = 0; j < 3; j++) if (check_func(h.decorrelate[j], "flac_decorrelate_%s_%d", names[j], fmts[i].bits)) check_decorrelate(&ref_dst, ref_src, &new_dst, new_src, 2, fmts[i].bits); for (j = 2; j <= MAX_CHANNELS; j += 2) { - ff_flacdsp_init(&h, fmts[i].fmt, j, 0); + ff_flacdsp_init(&h, fmts[i].fmt, j); if (check_func(h.decorrelate[0], "flac_decorrelate_indep%d_%d", j, fmts[i].bits)) check_decorrelate(&ref_dst, ref_src, &new_dst, new_src, j, fmts[i].bits); } From patchwork Mon Aug 1 12:23:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37064 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2469557pzb; Mon, 1 Aug 2022 05:24:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR4tff+CZ7kriKj8W6EVq2B5aXacxIdyur03KMD1KAHIjpufLpIpjbpnXJGV9uoeaY5prOX8 X-Received: by 2002:a17:907:1deb:b0:730:81ea:1d09 with SMTP id og43-20020a1709071deb00b0073081ea1d09mr4036913ejc.183.1659356648002; Mon, 01 Aug 2022 05:24:08 -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 ji11-20020a170907980b00b007306dac0f48si4145160ejc.545.2022.08.01.05.24.07; Mon, 01 Aug 2022 05:24:07 -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=RKJp1CIy; 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 A09A268B8E7; Mon, 1 Aug 2022 15:24:04 +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 5DEAE68B8BD for ; Mon, 1 Aug 2022 15:23:58 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lhJ4fQoBJHdeUucXTjkOpIfiac6Gf0gHMem0uFFgGC6I9nwNNHKYV6zeTHuaHwzvGYPk2ItT2NNKL93Uz3Qs/naRQ00egoZuAbBSIlGznicy0/t/LZH9moYtDa1wCMIshSRHklTkWpBHbz06+vm3+lUZNzdO+N/jNor8LLzhb0rIjNl9bd8dYLfZHjUASlFWCfjspf3m9AdgK19ssut96Z/m3SU/2FLt9IXzFhvSlPZ7tGx82jogCPtMLMxqoJeDv42EhQfnDWEiXqNaNA/KW4UmGLb0ZsuccFvwyk9ZrXITLLGGxu3WneXpEZBKj0pPp4v3vqpfCgdRorTY8L+Fow== 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=3etlSWDNg7/JS9eHen5XjU0TVGCCiueQLNJtatadY3c=; b=SgwthzNHVs1o2YXHd+QBykEM+kPOnZa+sJjc/C0TpJykg1iQ7JH+IPEchX//VGBZv8lK/aXcFefRYKGp9zwfeeQ+KUsyZ9Qnkanpt5BZuQvgOoPbRJSZ4g91H8dA6VdLLESqmwQr10luNjSexjOnItjic0pNZfBTDEbe0oksT484fBLaKc5eArN+Dc9siNOP2Q6oo0PRTIV4PTNyW2+P6mVQxPmHJpGybHci6+3wqfwydRE+J7Py6myQyL+FCAkpPQf/euFITI4nRIfPgc1nV00sKolkX6uYrfxMweL83a9+fC707ROL2guaVaT7wrQsWWYN2bU2PAoPqrx1ZwXfTQ== 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=3etlSWDNg7/JS9eHen5XjU0TVGCCiueQLNJtatadY3c=; b=RKJp1CIyZDjHiGY1+xWOOsmyf67b6Y/Aidc/JRsQVJn7apI0DIATNkXtAn+WC62lSMC7KXUdedXpflHnn0BiWmstVKZPn8Ov8NDBSzary8P7DPxiF+miwQgTPqBATID1VlpsY1qqYtCXZuJ5+kJlHvWEhLTku0VMZ9VQaSPfnI1KSKOkMngn7n2uxtt4SCvmI44DQoVJjvaQ95xvaRuOwx4ht4aWDy4qDO2lBB/8MCl1xJcTqOX3In4GOms8+opXyUvTkUGC1vElG3YYmzKUjybMiFu2Ntj4N7nNii6KrpvXjpJ+JG2j3OEaJCdNPRzXjSKd/8Ny2WwvCl6HCrPWPQ== 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:23:56 +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:23:56 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:40 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [m1HlfKeanwkx/6//gdiFo0kb5kLNNcp7] 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-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b27e9a29-7d49-4401-a573-08da73b8b439 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRs85NybYSQmkOI17x75buOErZ/8PImAC2LjUd1Y/Af3G3suckD2Vp5EEV1ST+0VKiw41NEWbsddk15nlZtrLvQlQoTm/lUQ9oJKVVv7v+RTjMBaetZSk+4UKDlAfYGfzKsZS6a/JuJjsH/Ya3rjEoxDJ7sT+vaDsTphAZMtts8v6uNdhc3NRGJGMM+RQBSjbz9ZnLfB192xFZlJQ7vs7zmBuKvmR6MarERmHtZP9cfIhSQakhK/iAxZR0Yl4PykhorGZ8WRYeKCKjrU2NcDfJFYxlB+1zctkq+ZqHD4kOJFYJJsTFwgtFwmxIooQ5la657XhsPsKJzgYCUjwXDIp4q2Gf5nNYcdimaFZ0tt7DWMpXZaFcsnikDJZDPIhaTk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uB/oe/DMrB13lOFKI4kXK85uW7rnAzjYer7luZSx7cwQInDAcJIeqlpoRri0JnWuuc3GangW/k0mQwDSaWV/X4eEFTmtfUJYIyDoAqmiP+uaIIy/6ft7ifElNKE+IL3+m6hMNUTAf1sGCYah4CJKCKup+wg88dZlZDFHRH/TYdIMHrh0GxI0proI3OEaJ4O1mOufFZhZa+AgXfvpaEhkCWJMe4ducBdOtPYiE0qp/RX6nWe8PESNkF0sr8pf/+0x3Bjp2y70FtcDZsJxWkWor2dhBNib/yGIw1wsCdN/W0yFo6xOWExT6LhlKprVyqc9GdkpGt3ny4+0HqWrjih/91v633/1RWEo9Kt6tJDRa7G9GBpcG68Z0WQ= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b27e9a29-7d49-4401-a573-08da73b8b439 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:23:56.4168 (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 02/11] avcodec/flacdsp: Split encoder-only parts into a ctx of its own 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: TNSmMkbctlYR Signed-off-by: Andreas Rheinhardt --- configure | 4 +--- libavcodec/Makefile | 5 ++-- libavcodec/arm/Makefile | 4 ++-- libavcodec/arm/flacdsp_init_arm.c | 5 +--- libavcodec/flacdsp.c | 4 ---- libavcodec/flacenc.c | 6 ++--- libavcodec/flacencdsp.c | 40 +++++++++++++++++++++++++++++++ libavcodec/flacencdsp.h | 34 ++++++++++++++++++++++++++ libavcodec/x86/Makefile | 3 ++- libavcodec/x86/flacdsp_init.c | 12 ---------- libavcodec/x86/flacencdsp_init.c | 38 +++++++++++++++++++++++++++++ tests/checkasm/Makefile | 2 +- tests/checkasm/checkasm.c | 2 +- 13 files changed, 125 insertions(+), 34 deletions(-) create mode 100644 libavcodec/flacencdsp.c create mode 100644 libavcodec/flacencdsp.h create mode 100644 libavcodec/x86/flacencdsp_init.c diff --git a/configure b/configure index 8c7e8c9d1d..6cee752acd 100755 --- a/configure +++ b/configure @@ -2449,7 +2449,6 @@ CONFIG_EXTRA=" faandct faanidct fdctdsp - flacdsp fmtconvert frame_thread_encoder g722dsp @@ -2817,8 +2816,7 @@ ffv1_encoder_select="rangecoder" ffvhuff_decoder_select="huffyuv_decoder" ffvhuff_encoder_select="huffyuv_encoder" fic_decoder_select="golomb" -flac_decoder_select="flacdsp" -flac_encoder_select="bswapdsp flacdsp lpc" +flac_encoder_select="bswapdsp lpc" flashsv2_decoder_select="inflate_wrapper" flashsv2_encoder_select="deflate_wrapper" flashsv_decoder_select="inflate_wrapper" diff --git a/libavcodec/Makefile b/libavcodec/Makefile index aff7752856..10179b717e 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -91,7 +91,6 @@ OBJS-$(CONFIG_FDCTDSP) += fdctdsp.o jfdctfst.o jfdctint.o FFT-OBJS-$(CONFIG_HARDCODED_TABLES) += cos_tables.o OBJS-$(CONFIG_FFT) += avfft.o fft_float.o fft_fixed_32.o \ fft_init_table.o $(FFT-OBJS-yes) -OBJS-$(CONFIG_FLACDSP) += flacdsp.o OBJS-$(CONFIG_FMTCONVERT) += fmtconvert.o OBJS-$(CONFIG_GOLOMB) += golomb.o OBJS-$(CONFIG_H263DSP) += h263dsp.o @@ -345,8 +344,8 @@ OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o OBJS-$(CONFIG_FIC_DECODER) += fic.o OBJS-$(CONFIG_FITS_DECODER) += fitsdec.o fits.o OBJS-$(CONFIG_FITS_ENCODER) += fitsenc.o -OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o -OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o +OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flacdsp.o flac.o +OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flacencdsp.o flac.o OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o OBJS-$(CONFIG_FLASHSV2_ENCODER) += flashsv2enc.o diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile index c4ab93aeeb..5d284bdc01 100644 --- a/libavcodec/arm/Makefile +++ b/libavcodec/arm/Makefile @@ -6,8 +6,6 @@ OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_init_arm.o \ OBJS-$(CONFIG_AUDIODSP) += arm/audiodsp_init_arm.o OBJS-$(CONFIG_BLOCKDSP) += arm/blockdsp_init_arm.o OBJS-$(CONFIG_FFT) += arm/fft_init_arm.o -OBJS-$(CONFIG_FLACDSP) += arm/flacdsp_init_arm.o \ - arm/flacdsp_arm.o OBJS-$(CONFIG_FMTCONVERT) += arm/fmtconvert_init_arm.o OBJS-$(CONFIG_G722DSP) += arm/g722dsp_init_arm.o OBJS-$(CONFIG_H264CHROMA) += arm/h264chroma_init_arm.o @@ -38,6 +36,8 @@ OBJS-$(CONFIG_VP8DSP) += arm/vp8dsp_init_arm.o OBJS-$(CONFIG_AAC_DECODER) += arm/aacpsdsp_init_arm.o \ arm/sbrdsp_init_arm.o OBJS-$(CONFIG_DCA_DECODER) += arm/synth_filter_init_arm.o +OBJS-$(CONFIG_FLAC_DECODER) += arm/flacdsp_init_arm.o \ + arm/flacdsp_arm.o OBJS-$(CONFIG_HEVC_DECODER) += arm/hevcdsp_init_arm.o OBJS-$(CONFIG_MLP_DECODER) += arm/mlpdsp_init_arm.o OBJS-$(CONFIG_RV40_DECODER) += arm/rv40dsp_init_arm.o diff --git a/libavcodec/arm/flacdsp_init_arm.c b/libavcodec/arm/flacdsp_init_arm.c index a16de9ee9a..9962cc89f4 100644 --- a/libavcodec/arm/flacdsp_init_arm.c +++ b/libavcodec/arm/flacdsp_init_arm.c @@ -20,14 +20,11 @@ #include "libavutil/attributes.h" #include "libavcodec/flacdsp.h" -#include "config.h" -#include "config_components.h" void ff_flac_lpc_16_arm(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels) { - if (CONFIG_FLAC_DECODER) - c->lpc16 = ff_flac_lpc_16_arm; + c->lpc16 = ff_flac_lpc_16_arm; } diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c index da8400ae0a..42e231db53 100644 --- a/libavcodec/flacdsp.c +++ b/libavcodec/flacdsp.c @@ -27,7 +27,6 @@ #define SAMPLE_SIZE 16 #define PLANAR 0 #include "flacdsp_template.c" -#include "flacdsp_lpc_template.c" #undef PLANAR #define PLANAR 1 @@ -38,7 +37,6 @@ #define SAMPLE_SIZE 32 #define PLANAR 0 #include "flacdsp_template.c" -#include "flacdsp_lpc_template.c" #undef PLANAR #define PLANAR 1 @@ -90,8 +88,6 @@ av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int cha { c->lpc16 = flac_lpc_16_c; c->lpc32 = flac_lpc_32_c; - c->lpc16_encode = flac_lpc_encode_c_16; - c->lpc32_encode = flac_lpc_encode_c_32; switch (fmt) { case AV_SAMPLE_FMT_S32: diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 3cfefbc89f..00f78fc814 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -36,7 +36,7 @@ #include "lpc.h" #include "flac.h" #include "flacdata.h" -#include "flacdsp.h" +#include "flacencdsp.h" #define FLAC_SUBFRAME_CONSTANT 0 #define FLAC_SUBFRAME_VERBATIM 1 @@ -125,7 +125,7 @@ typedef struct FlacEncodeContext { uint8_t *md5_buffer; unsigned int md5_buffer_size; BswapDSPContext bdsp; - FLACDSPContext flac_dsp; + FLACEncDSPContext flac_dsp; int flushed; int64_t next_pts; @@ -425,7 +425,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) s->options.max_prediction_order, FF_LPC_TYPE_LEVINSON); ff_bswapdsp_init(&s->bdsp); - ff_flacdsp_init(&s->flac_dsp, avctx->sample_fmt, channels); + ff_flacencdsp_init(&s->flac_dsp); dprint_compression_options(s); diff --git a/libavcodec/flacencdsp.c b/libavcodec/flacencdsp.c new file mode 100644 index 0000000000..46e5a0352b --- /dev/null +++ b/libavcodec/flacencdsp.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2012 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" +#include "flacencdsp.h" + +#define SAMPLE_SIZE 16 +#include "flacdsp_lpc_template.c" + +#undef SAMPLE_SIZE +#define SAMPLE_SIZE 32 +#include "flacdsp_lpc_template.c" + + +av_cold void ff_flacencdsp_init(FLACEncDSPContext *c) +{ + c->lpc16_encode = flac_lpc_encode_c_16; + c->lpc32_encode = flac_lpc_encode_c_32; + +#if ARCH_X86 + ff_flacencdsp_init_x86(c); +#endif +} diff --git a/libavcodec/flacencdsp.h b/libavcodec/flacencdsp.h new file mode 100644 index 0000000000..39811e2353 --- /dev/null +++ b/libavcodec/flacencdsp.h @@ -0,0 +1,34 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FLACENCDSP_H +#define AVCODEC_FLACENCDSP_H + +#include + +typedef struct FLACEncDSPContext { + void (*lpc16_encode)(int32_t *res, const int32_t *smp, int len, int order, + const int32_t coefs[32], int shift); + void (*lpc32_encode)(int32_t *res, const int32_t *smp, int len, int order, + const int32_t coefs[32], int shift); +} FLACEncDSPContext; + +void ff_flacencdsp_init(FLACEncDSPContext *c); +void ff_flacencdsp_init_x86(FLACEncDSPContext *c); + +#endif /* AVCODEC_FLACDSP_H */ diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile index 6361161180..4e448623af 100644 --- a/libavcodec/x86/Makefile +++ b/libavcodec/x86/Makefile @@ -10,7 +10,6 @@ OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp_init.o \ x86/dirac_dwt_init.o OBJS-$(CONFIG_FDCTDSP) += x86/fdctdsp_init.o OBJS-$(CONFIG_FFT) += x86/fft_init.o -OBJS-$(CONFIG_FLACDSP) += x86/flacdsp_init.o OBJS-$(CONFIG_FMTCONVERT) += x86/fmtconvert_init.o OBJS-$(CONFIG_H263DSP) += x86/h263dsp_init.o OBJS-$(CONFIG_H264CHROMA) += x86/h264chroma_init.o @@ -55,6 +54,8 @@ OBJS-$(CONFIG_CFHD_ENCODER) += x86/cfhdencdsp_init.o OBJS-$(CONFIG_DCA_DECODER) += x86/dcadsp_init.o x86/synth_filter_init.o OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhdenc_init.o OBJS-$(CONFIG_EXR_DECODER) += x86/exrdsp_init.o +OBJS-$(CONFIG_FLAC_DECODER) += x86/flacdsp_init.o +OBJS-$(CONFIG_FLAC_ENCODER) += x86/flacencdsp_init.o OBJS-$(CONFIG_OPUS_DECODER) += x86/opusdsp_init.o OBJS-$(CONFIG_OPUS_ENCODER) += x86/celt_pvq_init.o OBJS-$(CONFIG_HEVC_DECODER) += x86/hevcdsp_init.o diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c index 7975712db9..2deaf3117f 100644 --- a/libavcodec/x86/flacdsp_init.c +++ b/libavcodec/x86/flacdsp_init.c @@ -22,15 +22,12 @@ #include "libavcodec/flacdsp.h" #include "libavutil/x86/cpu.h" #include "config.h" -#include "config_components.h" void ff_flac_lpc_32_sse4(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); void ff_flac_lpc_32_xop(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); -void ff_flac_enc_lpc_16_sse4(int32_t *, const int32_t *, int, int, const int32_t *,int); - #define DECORRELATE_FUNCS(fmt, opt) \ void ff_flac_decorrelate_ls_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \ int len, int shift); \ @@ -57,7 +54,6 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int #if HAVE_X86ASM int cpu_flags = av_get_cpu_flags(); -#if CONFIG_FLAC_DECODER if (EXTERNAL_SSE2(cpu_flags)) { if (fmt == AV_SAMPLE_FMT_S16) { if (channels == 2) @@ -104,13 +100,5 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int if (EXTERNAL_XOP(cpu_flags)) { c->lpc32 = ff_flac_lpc_32_xop; } -#endif - -#if CONFIG_FLAC_ENCODER - if (EXTERNAL_SSE4(cpu_flags)) { - if (CONFIG_GPL) - c->lpc16_encode = ff_flac_enc_lpc_16_sse4; - } -#endif #endif /* HAVE_X86ASM */ } diff --git a/libavcodec/x86/flacencdsp_init.c b/libavcodec/x86/flacencdsp_init.c new file mode 100644 index 0000000000..5ab37e0a8f --- /dev/null +++ b/libavcodec/x86/flacencdsp_init.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2014 James Almer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" +#include "libavutil/attributes.h" +#include "libavutil/x86/cpu.h" +#include "libavcodec/flacencdsp.h" + +void ff_flac_enc_lpc_16_sse4(int32_t *, const int32_t *, int, int, const int32_t *,int); + +av_cold void ff_flacencdsp_init_x86(FLACEncDSPContext *c) +{ +#if HAVE_X86ASM && CONFIG_GPL + int cpu_flags = av_get_cpu_flags(); + + if (EXTERNAL_SSE4(cpu_flags)) { + if (CONFIG_GPL) + c->lpc16_encode = ff_flac_enc_lpc_16_sse4; + } +#endif /* HAVE_X86ASM */ +} diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile index e869c70b55..1ac170491b 100644 --- a/tests/checkasm/Makefile +++ b/tests/checkasm/Makefile @@ -3,7 +3,6 @@ AVCODECOBJS-$(CONFIG_AUDIODSP) += audiodsp.o AVCODECOBJS-$(CONFIG_BLOCKDSP) += blockdsp.o AVCODECOBJS-$(CONFIG_BSWAPDSP) += bswapdsp.o -AVCODECOBJS-$(CONFIG_FLACDSP) += flacdsp.o AVCODECOBJS-$(CONFIG_FMTCONVERT) += fmtconvert.o AVCODECOBJS-$(CONFIG_G722DSP) += g722dsp.o AVCODECOBJS-$(CONFIG_H264DSP) += h264dsp.o @@ -23,6 +22,7 @@ AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o \ AVCODECOBJS-$(CONFIG_ALAC_DECODER) += alacdsp.o AVCODECOBJS-$(CONFIG_DCA_DECODER) += synth_filter.o AVCODECOBJS-$(CONFIG_EXR_DECODER) += exrdsp.o +AVCODECOBJS-$(CONFIG_FLAC_DECODER) += flacdsp.o AVCODECOBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuvdsp.o AVCODECOBJS-$(CONFIG_JPEG2000_DECODER) += jpeg2000dsp.o AVCODECOBJS-$(CONFIG_OPUS_DECODER) += opusdsp.o diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 5ffcafbda9..e56fd3850e 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -96,7 +96,7 @@ static const struct { #if CONFIG_EXR_DECODER { "exrdsp", checkasm_check_exrdsp }, #endif - #if CONFIG_FLACDSP + #if CONFIG_FLAC_DECODER { "flacdsp", checkasm_check_flacdsp }, #endif #if CONFIG_FMTCONVERT From patchwork Mon Aug 1 12:23:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37065 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2469662pzb; Mon, 1 Aug 2022 05:24:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uwCBGz9JcQBI9g1ZY9dasHioQele+hLOrdBX0/jDiv8e29r3AyXcfm7jhWaVHzg57yEsk3 X-Received: by 2002:a05:6402:50d1:b0:43b:e03a:a32a with SMTP id h17-20020a05640250d100b0043be03aa32amr15886860edb.336.1659356658056; Mon, 01 Aug 2022 05:24:18 -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 e13-20020a17090658cd00b00730869f1d14si2647709ejs.778.2022.08.01.05.24.17; Mon, 01 Aug 2022 05:24:18 -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=TOSz6q2K; 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 A73EB68B8CF; Mon, 1 Aug 2022 15:24:09 +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 884C868B8CF for ; Mon, 1 Aug 2022 15:24:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oYhLk8JbyuRFZvyRTfNqlRIV5abCOreovncLcOagMh9XqjgqeeETTGwLxGg23v6wJcJG0fvlSVSscsRvzV9Ua9/XxksXS9VcoroYDh1SVO1RQZguzmvZgQpbPQRGG2cfy/Nn+Eaomr1G0Z1nBQu4sX6HIBLiEFFGwsA/+6UqImdl1LvKkdK1ac8ETldQAz/YI23v3PDYYQE5ewN65iGJZEDnZYL8fuIQzKfUuQcTA5Tn+ecpBJ61DENN6SBnI9QviRMKX4Dq6KYVjHLkoIc76Xo/2UxW2qFPRmbifKg3tEaPq2qCgosFyn5bNKyn8vhW9XstLcSrRq13MVZ6v/H29g== 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=l3VSaIwX8dS8Y5EKtr0sLdJ3GSAp0MYePJ+AaJgyJ70=; b=mhA9lPiIlu/C0ZRqKSTquzC/Ovfsk2idfZ15YfYWZH3NIQrNyW4LOK0XY2+tgtjjTR1/1uFLwGmOuQFMAbgnMXKfAQc23aHwSqkeJPxG/Ksz/S3Bhpg43m3M4Geri0MPuyrt8Dw93z19KZfbQAPs+migPXlqIoGY5VVL6UmQVQHWfEQCap4zoJykT6EtPi3q8z9grxjdiRxyKJgDI/VVJvAqqeaUX8HIDq994C9/zHIaKM4i2e0rL8DvFX52zVoo5/HFEUCMVYmvY5TAoNHJjb+ccZjHLOvigA5GV1Bk2JFI4HILetJaMPSgeumh7v7DXCKmPMbulTmV1u/PGIYAsg== 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=l3VSaIwX8dS8Y5EKtr0sLdJ3GSAp0MYePJ+AaJgyJ70=; b=TOSz6q2KngboW8yCXlqrId+Rtya6+Gth0jpARHJnAbNxqlQwKcmiENJMApy6V18Q5rI2qD69D7txaLrTibE2IPEUit1U+0ZMF2nhJ5UHIJQ9IAUm6mbzLiRruTjtpvEAwhiutVzt/OaVFyvWvBiwx1JN8Q7TlhO1UXqA8I04MZg3PUFKt54r0zWYa6gHCFb54je3AilYO0qiB+ygZASxpyS17Ht7TGAB53sjqo4W6aK+rSRczR4/K5tkf3QrdIFKP5trNLC+5bPJD5nCHK8BpNIuBJXv3RcU/jbvhbI1HqJvTGA8J43Y6okSmHfKgczgbiFI4uiqtm2L+sclJNxZHw== 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:01 +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:00 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:41 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [SpLzDy1ldF4mTo8Eiy3c6OrwBgdgVPjU] 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-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ba284ca-72a3-4c6d-177c-08da73b8b6e1 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVakJMqjhoreY9eRj3hMzSfUVPGLg8ra7hJmoP6SL40n45Djis1VvDdjAZqGiLVXGqni1gggNxWFstM2fd3Q7mDSP0F6C34892STse1hb8/EL54zch7sAH8Z7/Ble8Mqw+Dm6dcFaG/Wg7EmbX3jUlgfR3Vqh070HSbmKsnexowQ1EM8r/EtyyssSG9raGC0AZtt4AQGlVza9VH6YG3AmPEjydXGkFTV9pUpFV4vJZ+yVXA8T4Yhn+x9ZoboL3MI84uwuzGetusc87c5LCuZvEXe7ynY9xjCorZBsxb2ZRXCVweWo7233mMecDNX6dStO8YjdaXSk1Pkg63EovIOO9nFPlZEnweeKYrrQO5QsUYt5mvktd8S0VRz2xMyKRjxTvDembS/61EaA1str/WGvJyQtZcn+bjElvnyaRYInFkg5mQxQ1+i+tmz3cDN+OznLtNzZOiQnyGzs6KFo9V4y70SfCoevRQrkp0b4IyzbzPDwMw9zIkW4ParVAAFzHVvXScP4IG6djjJybUSRqsyUSaz1CLZjza66l2Cf4anjjRuTHx7V54Np6Apz0zKDu1hQZihr5Yr088WTFgxKGWMsokmRhhPk19Actd7v97/f2CtVVttkdYw/Tp5XtK/UCO7OxPiPkDxWckAcsdlW3emmF/zPXYWaxT0jJvBFPKNUfBnoYA+oRu4YkHx69iyh9miKauBA0QNeEV0T6AKv3CussN33sO4gp09Hk= X-MS-TrafficTypeDiagnostic: HE1PR0101MB2425:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mrgnZaRrGeOQwiGe9Hx5kY4KtzU7j0k08ku4OrAXu6kQm6k4nwKdLhat0FDn8te2bx+niSv6k9/q5S0q5tE5U2PhGsZjfjrK1vGv7zcGiclIg7Hgbr+RxeYmMYZCmwSt2+Zg+1uo0F7S+oKP0OgABP9Ed/9brAfpkp7YPq/A+GHd++P7OQk9ZfOdcovKHaDQW9dgQow1jG0WBhdniblcn1eN/1P4eI0bMKDTWbyfqUYJUQFupKX+MlfCzsY9KBNXyiUc8xN40pY98ypTZPfKL/vqEAklSJbsvAwRKotQxmCg0zmuZsGBCAMdi2g7XuxffnVvjQN8HfmtHrd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vCpuEjPON7QY0B/Nrj88+zYQaMrmJASGadwzNzJ9Luc8N+Nc30i4pQ29PjANtOz9Lw0z8XQB7d6LqhJRyCWG6f0Pw/Ey7O0Vd3wHn4MOzBX9z1ULeb0uiWJ7TUC6qFKyTYpmL0ot15olVXJHGqeY2/nK1PasywQAd9P5WxciCsd7hr1YKFkXhtfr5SQ72xJVFYJaHJ+mq1tgBoMvmU+q+To8K9UESAtrsUrM76hRGoI8YQwAYc3icHPuUUZOF6iN6NPjKxl1pNpQeMR5C3yu+IuxBYyhwyulQPKcEVaStIGZX8Hpdl+5jyoto5rrld4EZueQ8FZId6r5h5S6BW/3GnwXeow32JOvG7YGBwE2KdfR6OZnq5zdF4SW5GVdwfATvw4bThBIkvndPoMhDJVeScTg4F95qzOwk+x1RHzlCxolhwI8/zBlFaU8WXnfL7kA55OnGBA3rcIpfvTNi/jwl6d9CfGTgMRmOKHIDcrJ7ly3Z8EJXzneLyzAgrPy5KEhDSmiB4tWX83VZUhZbrwtpinxPnBMqRYmkm8TAiWi0vhoJfEGeJFSRMF6APRse63QR+2vIpKtrMK4SvWYxs1ev1lmAWAOBjIwsB3DttLoRSrtK/EGidX40Tjdvdu7owwwo3Tvw5Qtmw0= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ba284ca-72a3-4c6d-177c-08da73b8b6e1 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:00.8696 (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 03/11] avcodec/internal: Move ff_thread_can_start_frame() to threadframe.h 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: bHyt37hRVIBe Signed-off-by: Andreas Rheinhardt --- libavcodec/internal.h | 2 -- libavcodec/threadframe.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 8809a7079a..b1a49579d8 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -218,8 +218,6 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags); */ int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags); -int ff_thread_can_start_frame(AVCodecContext *avctx); - int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx); int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec); diff --git a/libavcodec/threadframe.h b/libavcodec/threadframe.h index 100e068e06..d2f93c5cd0 100644 --- a/libavcodec/threadframe.h +++ b/libavcodec/threadframe.h @@ -84,4 +84,6 @@ void ff_thread_release_ext_buffer(AVCodecContext *avctx, ThreadFrame *f); int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src); +int ff_thread_can_start_frame(AVCodecContext *avctx); + #endif From patchwork Mon Aug 1 12:23:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37066 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2469776pzb; Mon, 1 Aug 2022 05:24:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR7kiryzwxWXcceayNxerpSHZ7v+jV2a5WKOjR1B3wvNlRwJb6AvSx/E0fuvRFOcpwFx8MgM X-Received: by 2002:a05:6402:b6a:b0:43d:2454:ddd3 with SMTP id cb10-20020a0564020b6a00b0043d2454ddd3mr14528388edb.138.1659356668805; Mon, 01 Aug 2022 05:24:28 -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 dz15-20020a0564021d4f00b0043aa8412572si11801263edb.257.2022.08.01.05.24.27; Mon, 01 Aug 2022 05:24:28 -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=Qx19mN6e; 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 ADB03689BEC; Mon, 1 Aug 2022 15:24:14 +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 A3D4768B74F for ; Mon, 1 Aug 2022 15:24:08 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=baX9haARfbGMiWE8YyrxJ8afhWLZ/rxnz0jrIw37vYv9VSjiAKkY3hIvT24m4r+roc66DXCxVy65MX4Zv6QYs1XzhuUBXApXPYQBr2Hbqm3tWjXDX2YfnHnL1qeq7xeKixaYwPYBFy6HQqeP5fzmMuFfi4VNTIHKaxVBgBUzOHekvws8aMM7/R+bU5BH/ZcHhPg7iGH+gEoZPzMYRV4DeWAa9o3CzAQxlEkmGGM8HkpL52wA31IaZyAeoKK76+8lYN549p59A8uyAGShb05ZFDEgdXB+fBoCqVm93JRO31VHE0JCYKW/Pnj1+jzDf0rC0Ha+FzE41xe1XK6wXv/wjQ== 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=uVyL6rx+Fxtc9y+YATe4AImfuUx4lYpHiIMVJwqyUhE=; b=Eg1UEZ7hS7cKIH19kLnRa+2FLy4aHoiC63MYjK2nVDD5ObJynHNN++xRFH0dms90xlWxKc0ZdzL66B3DGfNVennAc38HZaoLxBCXGVXXzO9tmiDZgTl0lQS5EHj3E2tylj6dTw+FrKwFJiMKecTL9VUH8q1cVU+XiFGD18dD+0jb1Ff53+7ArVjjw0ZcVYlV5/P9E2idYzHVZVuKwa2jIBVN2OiiVA+Rodmgo5GsdL+hmhnixyKWLUY9TqJqoWPu771nhZ38FGHJJ+J+G2eISpAGndpd2QAFZ1geerQtmb23oK1CALD5xXDqPGFpB/emLD8VVTyCNxDVhq9Va14T/w== 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=uVyL6rx+Fxtc9y+YATe4AImfuUx4lYpHiIMVJwqyUhE=; b=Qx19mN6eSVGFumto8/uGT6ZCjhaKRk5wFx8ORbD8LbfKfzQGeR6ozJ2DKQtvR8O7NqZUK4G69pGzlAMN7lS3GlWDZgSkAQEHkRM3eIKE37RhDjWaeEfkJkZUX/a+//nhQesnOuSRt+shYv8p+5yaLmLEwgSgti7P4f0ad0kpXJgK8jL52UwOrIlw4ak8VcRpnTgNzwSL2oav3xKh0JIMaqbsJLwwpW1J8LuKbk94HNOZLmjDu6F7IwbqImy8DBGnwU/3fq5fDQsDV/+FCY/YsNmTdBg+Beh8Wpnz/hJ88fh2AnrhDyf99APhb4NYLpw78Y6clgmjSotHVNjUXEZkqg== 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:06 +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:06 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:42 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [mMS4Zr20RXrjegSmuPksLOJl0ViPl2Gw] 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-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a7ea36c2-06d3-4a16-7f96-08da73b8ba23 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVakJMqjhoreY9eRj3hMzSfXeFFEAeHiSbZ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rFH9GWVQB2hjStUfyZDUiPvQTxEkEYmTsYrYXSU54/ZjBpfTC03mcbqNR07IYSLzT9Cba3DQNLP/FPrIcesdKzCuRaCMAy9PAh6LVPBnXRXny3OyFAaZkR8fiiRDgNBwX4SWTfsvfjy8o6YJotmdqC3J/BP+bO3bUQZ0xX3HtHnS/p6DB4EljpJrijdomKPprvx1v6LaXzbLzz2etyPyJcFYuIkpYrlOJ+InQpWtSPNGb/IPOnqZMxZOEmElIzes1XYUI9sj80jpEEhvAxfddlAZSabjJTBeBy25DHL9S4MY2UBKYdXibhsRvmHH9+qF/TXA2jEnUEzh6I83gC6GqfWyFDOW9Y7GfMIUo3JF9fD7RoS+65kTYkIYRE/F6xQv4sMgMzN7v8e5YyGqNlcS4oRq72Vrvi38ItWA6V5zO8ZFwoYZTOXuoEvmSuWs3Sduie2N/vWkZ9zmBMypHdhD98Gwvj1SXBOLYx5eOIwXGCX9V4+6icuwQmmHq5bUqgbeWHMII2OThphFO73Vy2NHVnuU6CdZK2OtN4fZqL/bUOWC7xMMrOk+uoVtyNTlXQFVddpoRV8yvBBHa+ktouIuK4oJKZcDhFnE5qxUJTJleMI94tnp+fc3efCBOCGDzM5VqeKMmnSjBPwbznFfKvcy4O4bg9Luosjex9vT0lKFII7w1s= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7ea36c2-06d3-4a16-7f96-08da73b8ba23 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:06.3536 (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 04/11] fftools/ffmpeg_opt: Fix copyinkf 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: wBpVF3aLQ3l3 Broken in 9c2b800203a5a8f3d83f3b8f28e8c50d28186b39. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_opt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index d7049069f4..a96bcf9b8a 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1748,6 +1748,9 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e ost->last_mux_dts = AV_NOPTS_VALUE; ost->last_filter_pts = AV_NOPTS_VALUE; + MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i, + ost->copy_initial_nonkeyframes, oc, st); + return ost; } From patchwork Mon Aug 1 12:23:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37067 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2469848pzb; Mon, 1 Aug 2022 05:24:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sYTSKtxRyjzu8G2eYqDRo5kV6LZeukiYjEgXve9l8a0puavbabvBruPReqJpUxmYaBlCUM X-Received: by 2002:a05:6402:248f:b0:43a:b89c:20e3 with SMTP id q15-20020a056402248f00b0043ab89c20e3mr15718706eda.335.1659356677057; Mon, 01 Aug 2022 05:24:37 -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 v17-20020a1709063bd100b0072b85847dbasi8548737ejf.526.2022.08.01.05.24.36; Mon, 01 Aug 2022 05:24:37 -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="jZnHjs/f"; 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 B315C68B969; Mon, 1 Aug 2022 15:24:15 +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 D91AD68B93D for ; Mon, 1 Aug 2022 15:24:13 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nuWScKAzqopr6n6ef8bj+r0C/xJ852VJcsQE3Zs0vM4l6KQE+hYMpfFDfV/4dryukKBzZ+EcRUm4QBN/couiHaeY1mtoImELAw7xJckLVGmFdLrfk0ohZ53meiuIEfaIH5rvWeRnOu0ITPdfYT3lpNLgYdpVXgAU4t+saGp4pJ4HfGi+RDidbZUF0RpDI+oLhJHkD8E1t6mtNmmvpiomMoohCD6YtKF0NVQpRts4qeW/WjCPyOdLpSmXxhPjCfqZiGZdOmHZQhkcukB3v/l82fYz+M1UA2WtoYa2vuKHtDnvoNLG3IVtkPVsbfNtDs6w4GLYMtrR0EO+Y1CGF9jGpw== 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=FT3rYZGuCidGyDTBjaRtZARtV5abcqu1mVHrrQZjWnQ=; b=V2lWMyFxXsVgFuL26Hl2w9LVdHE41FJElOFqE4gnYGC5xic5nEQiUyo8EIKbnAupIUwEjqB5CTCskCHj8wlaNReBcNgQ/K0LEcx7bNshUxeIzeqXDx0YuGsb6Lqe2PZ0vKozk9Xrm9LkV0519+tayJWsIVn98oxPU3un8uArBloGM0PGWuNn88yzKkCAclqSftmKsprUsv/s5/xhbx4WfftzhZ/QkELbmojBmmtdBHwrwjtrry7jY/T1kA4353+Kk1bQ8FTgfZSjoveZfO479HJjwEhSZFfrZlvV5oOPxzSMgzc236m5FDGUw09XDhX5UySaiYbPzcFKD22c8myyUw== 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=FT3rYZGuCidGyDTBjaRtZARtV5abcqu1mVHrrQZjWnQ=; b=jZnHjs/f2ka/ZBuTcDVWxHhjr9cn+43r0BJPabwxuCxFtsFg2wmnWHVVKCQnvNj4ynfjbCUO1EnnHGJgGf4vrpqVo9r+lyCVAReDsi4niK8/lyVBNDfbeX2k3gqow0otCSjICya+08sqTJtGRO/ub1Oni2c+5VDezkcU5WFxFkXDo/pGvplmRVHFYW8WWfPyHTmNsGy5pZ3hOD1b7iS7qlmFwssvEh1FMMt9ifVpnzar/NcLeumJ5W9BhObNYlCOPSNgk0ujRaohZ3gSocSDN2YCi6AdqdW/V0DEKEVcPuqoGhvk785YE+Asz27lhYnyCt5nt0A2MkpYSOfUN0VIZw== 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:09 +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:08 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:43 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [yOK3qcl/zLF8JoXjJSUUanAgcp8zd17m] 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-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b11eec37-456a-4057-0388-08da73b8bbb4 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVakJMqjhoreY9eRj3hMzSfY17CI5UUfYB4cWiE/X6I2Irj1aTx5POIdZjLBm1qDLmHAbNAEgn282ZWgYnnpjUCwlqxLwpqu1KMmOw2wXoEJ5+qW2byIhqyWERqQHDXV6Yylr2Cz7+xT4y8GCj4uT1tvcPi4oyVDr36S54S6zgHtJv2s2+Ck8evt5BDBkHV7gpRiKJilO9RdAx41fiEYS4417CcxLoklYPW/oQeXXUvU6tkd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JJBxP+pXTC9hK3/7wd/2MOLiG8bTUgtFdRMFkaVB312N6xYP7iSPu8saa2BHBlEGyUA8jzWAhCqNJBsRaFiI3hs8yTeFPkOUwceZSpZ1zJhFPMc99AGBs5o+em2X3ht4bTEMVCDsYEZlhmKjyz/eH+LYUvkjqlThu5a8zCBdm6NjmnezPxy2ywxe5bn5qcJFtETh4VrLPFHV9EalcXajmgs64k54gtMAdGgrr58eKMpVsBVQ8qQgStc7QWj5vt8r+w+8Mz9/O6woSOuAOXSzEKJJyRk3sC9/LPWMEkcL3Ns9QLKiqDfAdWhQZdk3Le80ZWljJHXuu4YSSd5CWKQhRlg3Mj6Bev0bNDXlsOYw4EEOam4NKI7e9UFCNbFBJ474p7TGKYKS3jVei9h32TYQJtUDyrGcp5b2ca2SpbZGhZsAGaQBWJhFe70W4aHXGWIggEH+BDw+a/DOIQ= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b11eec37-456a-4057-0388-08da73b8bbb4 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:08.9628 (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 05/11] avcodec/aacenc: Move aac_pce_configs to its only user 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: 7vcwBUdFtvid Signed-off-by: Andreas Rheinhardt --- libavcodec/aacenc.c | 273 ++++++++++++++++++++++++++++++++++++++++++++ libavcodec/aacenc.h | 273 -------------------------------------------- 2 files changed, 273 insertions(+), 273 deletions(-) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index ee179542bd..4f51485fc4 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -51,6 +51,279 @@ #include "psymodel.h" +/** + * List of PCE (Program Configuration Element) for the channel layouts listed + * in channel_layout.h + * + * For those wishing in the future to add other layouts: + * + * - num_ele: number of elements in each group of front, side, back, lfe channels + * (an element is of type SCE (single channel), CPE (channel pair) for + * the first 3 groups; and is LFE for LFE group). + * + * - pairing: 0 for an SCE element or 1 for a CPE; does not apply to LFE group + * + * - index: there are three independent indices for SCE, CPE and LFE; + * they are incremented irrespective of the group to which the element belongs; + * they are not reset when going from one group to another + * + * Example: for 7.0 channel layout, + * .pairing = { { 1, 0 }, { 1 }, { 1 }, }, (3 CPE and 1 SCE in front group) + * .index = { { 0, 0 }, { 1 }, { 2 }, }, + * (index is 0 for the single SCE but goes from 0 to 2 for the CPEs) + * + * The index order impacts the channel ordering. But is otherwise arbitrary + * (the sequence could have been 2, 0, 1 instead of 0, 1, 2). + * + * Spec allows for discontinuous indices, e.g. if one has a total of two SCE, + * SCE.0 SCE.15 is OK per spec; BUT it won't be decoded by our AAC decoder + * which at this time requires that indices fully cover some range starting + * from 0 (SCE.1 SCE.0 is OK but not SCE.0 SCE.15). + * + * - config_map: total number of elements and their types. Beware, the way the + * types are ordered impacts the final channel ordering. + * + * - reorder_map: reorders the channels. + * + */ +static const AACPCEInfo aac_pce_configs[] = { + { + .layout = AV_CHANNEL_LAYOUT_MONO, + .num_ele = { 1, 0, 0, 0 }, + .pairing = { { 0 }, }, + .index = { { 0 }, }, + .config_map = { 1, TYPE_SCE, }, + .reorder_map = { 0 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_STEREO, + .num_ele = { 1, 0, 0, 0 }, + .pairing = { { 1 }, }, + .index = { { 0 }, }, + .config_map = { 1, TYPE_CPE, }, + .reorder_map = { 0, 1 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_2POINT1, + .num_ele = { 1, 0, 0, 1 }, + .pairing = { { 1 }, }, + .index = { { 0 },{ 0 },{ 0 },{ 0 } }, + .config_map = { 2, TYPE_CPE, TYPE_LFE }, + .reorder_map = { 0, 1, 2 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_2_1, + .num_ele = { 1, 0, 1, 0 }, + .pairing = { { 1 },{ 0 },{ 0 } }, + .index = { { 0 },{ 0 },{ 0 }, }, + .config_map = { 2, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_SURROUND, + .num_ele = { 2, 0, 0, 0 }, + .pairing = { { 1, 0 }, }, + .index = { { 0, 0 }, }, + .config_map = { 2, TYPE_CPE, TYPE_SCE, }, + .reorder_map = { 0, 1, 2 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_3POINT1, + .num_ele = { 2, 0, 0, 1 }, + .pairing = { { 1, 0 }, }, + .index = { { 0, 0 }, { 0 }, { 0 }, { 0 }, }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_LFE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_4POINT0, + .num_ele = { 2, 0, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 0 }, }, + .index = { { 0, 0 }, { 0 }, { 1 } }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_4POINT1, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 0 }, }, + .index = { { 0, 0 }, { 1 }, { 2 }, { 0 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_2_2, + .num_ele = { 1, 1, 0, 0 }, + .pairing = { { 1 }, { 1 }, }, + .index = { { 0 }, { 1 }, }, + .config_map = { 2, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_QUAD, + .num_ele = { 1, 0, 1, 0 }, + .pairing = { { 1 }, { 0 }, { 1 }, }, + .index = { { 0 }, { 0 }, { 1 } }, + .config_map = { 2, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_5POINT0, + .num_ele = { 2, 1, 0, 0 }, + .pairing = { { 1, 0 }, { 1 }, }, + .index = { { 0, 0 }, { 1 } }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_5POINT1, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_5POINT0_BACK, + .num_ele = { 2, 0, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1 } }, + .index = { { 0, 0 }, { 0 }, { 1 } }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_5POINT1_BACK, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_6POINT0, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 0 }, }, + .index = { { 0, 0 }, { 1 }, { 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_6POINT0_FRONT, + .num_ele = { 2, 1, 0, 0 }, + .pairing = { { 1, 1 }, { 1 } }, + .index = { { 1, 0 }, { 2 }, }, + .config_map = { 3, TYPE_CPE, TYPE_CPE, TYPE_CPE, }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_HEXAGONAL, + .num_ele = { 2, 0, 2, 0 }, + .pairing = { { 1, 0 },{ 0 },{ 1, 0 }, }, + .index = { { 0, 0 },{ 0 },{ 1, 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_6POINT1, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 },{ 0 },{ 1, 0 }, }, + .index = { { 0, 0 },{ 1 },{ 1, 2 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_6POINT1_BACK, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_6POINT1_FRONT, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_7POINT0, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 2 }, }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_7POINT0_FRONT, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 2 }, }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_7POINT1, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_7POINT1_WIDE, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 },{ 1, 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_OCTAGONAL, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1 }, { 2, 1 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { /* Meant for order 2/mixed ambisonics */ + .layout = { .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = 9, + .u.mask = AV_CH_LAYOUT_OCTAGONAL | AV_CH_TOP_CENTER }, + .num_ele = { 2, 2, 2, 0 }, + .pairing = { { 1, 0 }, { 1, 0 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1, 1 }, { 2, 2 } }, + .config_map = { 6, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, + }, + { /* Meant for order 2/mixed ambisonics */ + .layout = { .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = 10, + .u.mask = AV_CH_LAYOUT_6POINT0_FRONT | AV_CH_BACK_CENTER | + AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT | AV_CH_TOP_CENTER }, + .num_ele = { 2, 2, 2, 0 }, + .pairing = { { 1, 1 }, { 1, 0 }, { 1, 0 }, }, + .index = { { 0, 1 }, { 2, 0 }, { 3, 1 } }, + .config_map = { 6, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, + }, + { + .layout = AV_CHANNEL_LAYOUT_HEXADECAGONAL, + .num_ele = { 4, 2, 4, 0 }, + .pairing = { { 1, 0, 1, 0 }, { 1, 1 }, { 1, 0, 1, 0 }, }, + .index = { { 0, 0, 1, 1 }, { 2, 3 }, { 4, 2, 5, 3 } }, + .config_map = { 10, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + }, +}; + static void put_pce(PutBitContext *pb, AVCodecContext *avctx) { int i, j; diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h index a001c7ca60..f5a2b78c6d 100644 --- a/libavcodec/aacenc.h +++ b/libavcodec/aacenc.h @@ -102,279 +102,6 @@ typedef struct AACPCEInfo { uint8_t reorder_map[16]; ///< maps channels from lavc to aac order } AACPCEInfo; -/** - * List of PCE (Program Configuration Element) for the channel layouts listed - * in channel_layout.h - * - * For those wishing in the future to add other layouts: - * - * - num_ele: number of elements in each group of front, side, back, lfe channels - * (an element is of type SCE (single channel), CPE (channel pair) for - * the first 3 groups; and is LFE for LFE group). - * - * - pairing: 0 for an SCE element or 1 for a CPE; does not apply to LFE group - * - * - index: there are three independent indices for SCE, CPE and LFE; - * they are incremented irrespective of the group to which the element belongs; - * they are not reset when going from one group to another - * - * Example: for 7.0 channel layout, - * .pairing = { { 1, 0 }, { 1 }, { 1 }, }, (3 CPE and 1 SCE in front group) - * .index = { { 0, 0 }, { 1 }, { 2 }, }, - * (index is 0 for the single SCE but goes from 0 to 2 for the CPEs) - * - * The index order impacts the channel ordering. But is otherwise arbitrary - * (the sequence could have been 2, 0, 1 instead of 0, 1, 2). - * - * Spec allows for discontinuous indices, e.g. if one has a total of two SCE, - * SCE.0 SCE.15 is OK per spec; BUT it won't be decoded by our AAC decoder - * which at this time requires that indices fully cover some range starting - * from 0 (SCE.1 SCE.0 is OK but not SCE.0 SCE.15). - * - * - config_map: total number of elements and their types. Beware, the way the - * types are ordered impacts the final channel ordering. - * - * - reorder_map: reorders the channels. - * - */ -static const AACPCEInfo aac_pce_configs[] = { - { - .layout = AV_CHANNEL_LAYOUT_MONO, - .num_ele = { 1, 0, 0, 0 }, - .pairing = { { 0 }, }, - .index = { { 0 }, }, - .config_map = { 1, TYPE_SCE, }, - .reorder_map = { 0 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_STEREO, - .num_ele = { 1, 0, 0, 0 }, - .pairing = { { 1 }, }, - .index = { { 0 }, }, - .config_map = { 1, TYPE_CPE, }, - .reorder_map = { 0, 1 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_2POINT1, - .num_ele = { 1, 0, 0, 1 }, - .pairing = { { 1 }, }, - .index = { { 0 },{ 0 },{ 0 },{ 0 } }, - .config_map = { 2, TYPE_CPE, TYPE_LFE }, - .reorder_map = { 0, 1, 2 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_2_1, - .num_ele = { 1, 0, 1, 0 }, - .pairing = { { 1 },{ 0 },{ 0 } }, - .index = { { 0 },{ 0 },{ 0 }, }, - .config_map = { 2, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 0, 1, 2 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_SURROUND, - .num_ele = { 2, 0, 0, 0 }, - .pairing = { { 1, 0 }, }, - .index = { { 0, 0 }, }, - .config_map = { 2, TYPE_CPE, TYPE_SCE, }, - .reorder_map = { 0, 1, 2 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_3POINT1, - .num_ele = { 2, 0, 0, 1 }, - .pairing = { { 1, 0 }, }, - .index = { { 0, 0 }, { 0 }, { 0 }, { 0 }, }, - .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_LFE }, - .reorder_map = { 0, 1, 2, 3 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_4POINT0, - .num_ele = { 2, 0, 1, 0 }, - .pairing = { { 1, 0 }, { 0 }, { 0 }, }, - .index = { { 0, 0 }, { 0 }, { 1 } }, - .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_4POINT1, - .num_ele = { 2, 1, 1, 0 }, - .pairing = { { 1, 0 }, { 0 }, { 0 }, }, - .index = { { 0, 0 }, { 1 }, { 2 }, { 0 } }, - .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3, 4 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_2_2, - .num_ele = { 1, 1, 0, 0 }, - .pairing = { { 1 }, { 1 }, }, - .index = { { 0 }, { 1 }, }, - .config_map = { 2, TYPE_CPE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_QUAD, - .num_ele = { 1, 0, 1, 0 }, - .pairing = { { 1 }, { 0 }, { 1 }, }, - .index = { { 0 }, { 0 }, { 1 } }, - .config_map = { 2, TYPE_CPE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_5POINT0, - .num_ele = { 2, 1, 0, 0 }, - .pairing = { { 1, 0 }, { 1 }, }, - .index = { { 0, 0 }, { 1 } }, - .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3, 4 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_5POINT1, - .num_ele = { 2, 1, 1, 0 }, - .pairing = { { 1, 0 }, { 0 }, { 1 }, }, - .index = { { 0, 0 }, { 1 }, { 1 } }, - .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3, 4, 5 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_5POINT0_BACK, - .num_ele = { 2, 0, 1, 0 }, - .pairing = { { 1, 0 }, { 0 }, { 1 } }, - .index = { { 0, 0 }, { 0 }, { 1 } }, - .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3, 4 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_5POINT1_BACK, - .num_ele = { 2, 1, 1, 0 }, - .pairing = { { 1, 0 }, { 0 }, { 1 }, }, - .index = { { 0, 0 }, { 1 }, { 1 } }, - .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3, 4, 5 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_6POINT0, - .num_ele = { 2, 1, 1, 0 }, - .pairing = { { 1, 0 }, { 1 }, { 0 }, }, - .index = { { 0, 0 }, { 1 }, { 1 } }, - .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3, 4, 5 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_6POINT0_FRONT, - .num_ele = { 2, 1, 0, 0 }, - .pairing = { { 1, 1 }, { 1 } }, - .index = { { 1, 0 }, { 2 }, }, - .config_map = { 3, TYPE_CPE, TYPE_CPE, TYPE_CPE, }, - .reorder_map = { 0, 1, 2, 3, 4, 5 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_HEXAGONAL, - .num_ele = { 2, 0, 2, 0 }, - .pairing = { { 1, 0 },{ 0 },{ 1, 0 }, }, - .index = { { 0, 0 },{ 0 },{ 1, 1 } }, - .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, }, - .reorder_map = { 0, 1, 2, 3, 4, 5 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_6POINT1, - .num_ele = { 2, 1, 2, 0 }, - .pairing = { { 1, 0 },{ 0 },{ 1, 0 }, }, - .index = { { 0, 0 },{ 1 },{ 1, 2 } }, - .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_6POINT1_BACK, - .num_ele = { 2, 1, 2, 0 }, - .pairing = { { 1, 0 }, { 0 }, { 1, 0 }, }, - .index = { { 0, 0 }, { 1 }, { 1, 2 } }, - .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_6POINT1_FRONT, - .num_ele = { 2, 1, 2, 0 }, - .pairing = { { 1, 0 }, { 0 }, { 1, 0 }, }, - .index = { { 0, 0 }, { 1 }, { 1, 2 } }, - .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_7POINT0, - .num_ele = { 2, 1, 1, 0 }, - .pairing = { { 1, 0 }, { 1 }, { 1 }, }, - .index = { { 0, 0 }, { 1 }, { 2 }, }, - .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_7POINT0_FRONT, - .num_ele = { 2, 1, 1, 0 }, - .pairing = { { 1, 0 }, { 1 }, { 1 }, }, - .index = { { 0, 0 }, { 1 }, { 2 }, }, - .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_7POINT1, - .num_ele = { 2, 1, 2, 0 }, - .pairing = { { 1, 0 }, { 0 }, { 1, 1 }, }, - .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, - .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_7POINT1_WIDE, - .num_ele = { 2, 1, 2, 0 }, - .pairing = { { 1, 0 }, { 0 },{ 1, 1 }, }, - .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, - .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK, - .num_ele = { 2, 1, 2, 0 }, - .pairing = { { 1, 0 }, { 0 }, { 1, 1 }, }, - .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, - .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_OCTAGONAL, - .num_ele = { 2, 1, 2, 0 }, - .pairing = { { 1, 0 }, { 1 }, { 1, 0 }, }, - .index = { { 0, 0 }, { 1 }, { 2, 1 } }, - .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, - }, - { /* Meant for order 2/mixed ambisonics */ - .layout = { .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = 9, - .u.mask = AV_CH_LAYOUT_OCTAGONAL | AV_CH_TOP_CENTER }, - .num_ele = { 2, 2, 2, 0 }, - .pairing = { { 1, 0 }, { 1, 0 }, { 1, 0 }, }, - .index = { { 0, 0 }, { 1, 1 }, { 2, 2 } }, - .config_map = { 6, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, - }, - { /* Meant for order 2/mixed ambisonics */ - .layout = { .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = 10, - .u.mask = AV_CH_LAYOUT_6POINT0_FRONT | AV_CH_BACK_CENTER | - AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT | AV_CH_TOP_CENTER }, - .num_ele = { 2, 2, 2, 0 }, - .pairing = { { 1, 1 }, { 1, 0 }, { 1, 0 }, }, - .index = { { 0, 1 }, { 2, 0 }, { 3, 1 } }, - .config_map = { 6, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, - }, - { - .layout = AV_CHANNEL_LAYOUT_HEXADECAGONAL, - .num_ele = { 4, 2, 4, 0 }, - .pairing = { { 1, 0, 1, 0 }, { 1, 1 }, { 1, 0, 1, 0 }, }, - .index = { { 0, 0, 1, 1 }, { 2, 3 }, { 4, 2, 5, 3 } }, - .config_map = { 10, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, - }, -}; - /** * AAC encoder context */ From patchwork Mon Aug 1 12:23:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37068 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2469943pzb; Mon, 1 Aug 2022 05:24:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR5awkeIym4pbrLJtpCkCD9ISoF5jexIb/0jH2YgxtkfNEsAFlQ6qFKy5cctJ31oa1Afhj7k X-Received: by 2002:a17:907:1c0a:b0:730:9a59:3891 with SMTP id nc10-20020a1709071c0a00b007309a593891mr433107ejc.453.1659356687039; Mon, 01 Aug 2022 05:24:47 -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 z1-20020a170906714100b0072b97b3288dsi9615357ejj.510.2022.08.01.05.24.46; Mon, 01 Aug 2022 05:24:47 -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=GC7RS5bM; 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 DAE7A68B999; Mon, 1 Aug 2022 15:24:16 +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 2A85868067F for ; Mon, 1 Aug 2022 15:24:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S1c1rt81WYUHWOIqsL9Pm9vai6W+5RAH6JS5yC4RXJZu/Q6llBRQlbxNyb6TjJf0rdUtQ231REr62EPiCW3qCAVMbmPjjQS4dqoyOxIoX2osYRrjQt+aDoAIh4mHGeLVZn5hx9I0nXywE+zcqvILs0iQY3rEpjZTEI3IqT3WV9KATOZQwhjnyp8wxMC86l7ZVqd6psMB/dfA8heLYZ1WzvMp1UAToxYDZi2xiBNOS6f8So5yq6S8RU9vCTQxXKNC6s3LZzHgjO5O9Gt/SKDk42zH1DlHFbgOmoobeIJlFDav+Q9ZWC/2oDT/wTBcwLcQYYbKe2Vy14DvscL0SLZL0w== 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=SvqUVXB9O1xf7uDGHABpwip7MoGnjDGa2dCUDY1gUhs=; b=fKqVm/M5Bp5camWkRvXuco5QQtaR49GOXcew+B95+0QvaZxSbqi5t09Ab/m4N/A0BqcXyYkJQBqOReRTVhU2sT4kLp+rLCd6I+VwngWb4TUQ7QxtOUJLqQU22+klpW4c0POfYAcMS1BaLTZvz16mtvwAo2V9feGDrnZSpihX7wc0v/4gNzAHXD4e//uSbDlAU4d8UI8c5hAmSLd+9qxkspHv+jfDjhkDqD87VN6YZPekOwoBfvCOlLxsKZEkjlMzVu7VmtSQ5MfsoH8p8lbyn/n0XdNeEl3jiENjngmq6LoNnc7oVqQuk2bfI6Y54onBMmkfNkSrumSxqGZyN3mh+Q== 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=SvqUVXB9O1xf7uDGHABpwip7MoGnjDGa2dCUDY1gUhs=; b=GC7RS5bM2ty/OgzInXGJyxRGF648EOuyBG+t92ytb5A6rh0S1eU8+LNka1y1obztSlA3gW+Yu+iBpqZq3N2WofDPr3ECF+T9KYmGk/CHSp5rL1tLu1OstbwhUdWfiTq8UpSULVNKL2hos4j5391up1txPtcAX5mOVbWU8B4o2AEaU7Icai8gQJKWk+4l/0Hfn0YNGub5V95x0o26E/xJHReDT51GhWbgieXE3Yei6TpEmO3ax9Lkyn+ykSDrGKXMJ5E3wvVFSJiitu0fnx1pQoBA4spKnKoGyzJRpzYzIbmFrkwJIMaektj7X2YZMYt8lq2mcBWyxJvQHnDB19GUsw== 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:11 +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:11 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:44 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [bggtECfbwft/ldObb0xzbbTejfB+gGcu] 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-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ae048845-6f86-48ba-2b0f-08da73b8bce5 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVakJMqjhoreY9eRj3hMzSf0ghprA1ARH9pEduSId9AG6OAOY/ewqqc682D3CZLBOAT03+eGhAd8BtYWzX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sKtzyIUd+nsenUe6QNH2DrwjwtLNEd0Uq6J59pteieoS46+4gMzftNUM1Gki9v6cqLcexPiSjOgfJy6NEBMfq9vKj9EXiAw5Qkym3c5JParxnJJA2eQ38JFh58EWg1mt0W5sOlY0ka9nU+pwtxpPfuXjOok5Wo7G0ODggeG6dAaAt6Vowche/vxYL7MIZu23SMo9M3hTKRDQjWfAQWrHnxZ3UChp6rGKOx317nix9g9KCrj7foHuSXgh5kGxVfW/YmOHawHwQhd8cyjUlkD6BHSzH1HybHwldS6iko0VWlzfM6pGBLOKNyuoMrfiYa7XS7c0uW6g== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Be+JYdfWrnl/RMnQQtngyu2OxM7ubVAL6cA+/1i//TNR+/06HUE8YiU9/KuB90wv8xs4irmXvjbSNVvTc2LPXnGh1PUlRwbM6/c392Oooy78FePxpJK1rS9uJxabP4NKRsFaXPIWvDUYIfEyuaE19Rj41Tmam+bHWL4Gq3Dn4yK9HncHaclQEHIhThd+fpSZfDI9kK45olctTH+BkMTBzXwJJwFwIl8xB18q3VmHwg9io+wZioS7ufbj2Te08Dtt+Uteo87764ALSozpEp7bkvq5q7uiTsTvYl8C0m23IjTJw8OhJl7erAtr+pwnp2z1R3/amfeUtfDMKybcdlCXxtixIykJOfRAhRxHolKQ3mdz3y95XdeEV/oA8NqxiaEJPMTIM3iTY0n5fASBj/qJDmKRyqoK9v5j6rZOXkTWWigKggv09AXSW3M6l/Qp0D0FMn7oE10PY99pqXlKiDU5RKLhLLlO0jH575NYEiZptTKO0V33SuWOZ26r30c/wY+3laW6fqzDbE+Uw8a+eXPOmRPjIxAfzaH0/Vhro3Stq2q7eADI5oG8YwQ/vj6GRp7un7YUhc6W5V05KpLTLThaT9hc0n0Qw/GzF4/ReY+0BmYbujyRiCbDcObDVqPEbr+yce3X9Hl9/KzcAFX1jlGWnf4dZ3KTv97yvFPomorl6L2693lFNYUQsWAeOLWOhztySfCsftohgP9jCHySJcxZzS1mpGmSSko1aZ/38NBqdhkBm4s+hloH34yb1Py80Oz0e+o/CVStKt+FsFR2g4eQhtaxtrH8RdqJMUMeyc07C+p+fI98XZ4lygbHGZSejEPV8ZpKB+B5XMPyI2r9bdGbP7bhCdGMR3Y2wmrxv0rIRmlA/6vtIHqXnQpok79GbgaDkf8z6vwRYFKuYIYeMZtIhxHqqU93H47jxVcvBmbsWkkipf7646B/Bc5y1OGtLNXSwKhgEJAzV9bFJZO6yEw6RLwHHIoGFdE8QS8fb3gNrGuAMUOub1go01TufIXpXtUpYPcnARIWPtjOONXFcJOkMxi/d7VH738Rzq9WcIgldMvYWT1IHG4gdqXsMG85MHwHmvBA50nv4DTJBoprC10oXCnBTZXlogRj472+uJJrtRWCoSdoYOdKOv4rSEyxNs66on48IXFbEx7MQbSyr9C1Fj7xKDEYxzUSlfWtGP7dHpDKKsIP95dUeRNlgEoDG+6bQsbVsDRkmoVSL8hoGakjCwRr8u12q/JyesFI0tB62ZQiM8vKx7tEhLPh1vfseChDwlNsip+NMnwGa/U4qVlMc0XE5ajyKPMXuZ9QVnx7DuY= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae048845-6f86-48ba-2b0f-08da73b8bce5 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:10.9783 (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 06/11] avcodec/sbrdsp: Remove unnecessary headers 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: Y5rVT0ZDVTJT Signed-off-by: Andreas Rheinhardt --- libavcodec/sbrdsp.c | 1 - libavcodec/sbrdsp.h | 1 - libavcodec/sbrdsp_fixed.c | 1 - 3 files changed, 3 deletions(-) diff --git a/libavcodec/sbrdsp.c b/libavcodec/sbrdsp.c index a93b5f9c13..8d6ffdfe7e 100644 --- a/libavcodec/sbrdsp.c +++ b/libavcodec/sbrdsp.c @@ -23,7 +23,6 @@ #define USE_FIXED 0 #include "aac.h" -#include "config.h" #include "libavutil/attributes.h" #include "libavutil/intfloat.h" #include "sbrdsp.h" diff --git a/libavcodec/sbrdsp.h b/libavcodec/sbrdsp.h index e6fd76d8ed..8513c423af 100644 --- a/libavcodec/sbrdsp.h +++ b/libavcodec/sbrdsp.h @@ -23,7 +23,6 @@ #include #include "aac_defines.h" -#include "libavutil/softfloat.h" typedef struct SBRDSPContext { void (*sum64x5)(INTFLOAT *z); diff --git a/libavcodec/sbrdsp_fixed.c b/libavcodec/sbrdsp_fixed.c index 0d34a2a710..f5784f801d 100644 --- a/libavcodec/sbrdsp_fixed.c +++ b/libavcodec/sbrdsp_fixed.c @@ -26,7 +26,6 @@ #define USE_FIXED 1 #include "aac.h" -#include "config.h" #include "libavutil/attributes.h" #include "libavutil/intfloat.h" #include "sbrdsp.h" 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/btQ8cKWiRs85Nyb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TT4/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; From patchwork Mon Aug 1 12:23:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37070 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2470118pzb; Mon, 1 Aug 2022 05:25:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uJoqCK7zh2LQnACV+r3YhuJgohBd2o9RIHwO0XYhKC9ctq1meMuyuitSmXT/vy7arSu90V X-Received: by 2002:a17:907:7f05:b0:72f:550c:69f3 with SMTP id qf5-20020a1709077f0500b0072f550c69f3mr12368906ejc.744.1659356706154; Mon, 01 Aug 2022 05:25:06 -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 hb9-20020a170907160900b007304fa622bcsi7412981ejc.988.2022.08.01.05.25.05; Mon, 01 Aug 2022 05:25:06 -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=S5hEvLrE; 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 379C668BA0D; Mon, 1 Aug 2022 15:24:19 +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-oln040092068105.outbound.protection.outlook.com [40.92.68.105]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 94DD668B999 for ; Mon, 1 Aug 2022 15:24:16 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IvZCgqubHuGO1ro06RZjk5ffRMUBUBpJtDH/oJIiu2wzxIVH3vYhnVwlCqqmuj5BtVuKsiTc/wKpgsYBRmD4iyNjGzOBjuqvX6f4F6xae+MkoUsN/agJE02Y1LDx5lTow4M1nJ+JU7G6V2KHIeifLPL5VGoqdLG1xPZ0oSSABmPqAWK4ywY6+TH5nH6+CYZkjJODfbyR/oPzcCisHjPk6RVstWlFL6J6S3iwcFH8Jjh1nCpQmruJZjVMM18/cpNX4VdH4WtXHb0NNWs7BeuQrZeF540W2mYE2+fsGUaWdGjykiwprkmX3nEQ3qFQo3lkqDzwNHAmTqrN8KBYEW6DIA== 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=M8WjiUwlRV7IhqdicnuhY6mAnnZlk3egPQiB5J0RxS8=; b=isnbcfaEI3Q92CiOlROdgy/fni7YR1iLvRlFsaOkEBEFBmsKFDOQnsrrVKebPr/irn2IGUX+KWG2cxXscIokt0ZOZP4yNx2HptutquT96mRrwjj9TY9fSxCjnxa8L87P/lNTwyEYJGeYANhgzDnoJKtQc8PPMCKb3T+/EIK/Zaf0N6QdpV9HZ8kCAZU3sy1R/KsG/phDeOhqhdgPzdvnH3vWLAKqi1d9wUkTrTsuo3uxSUmBXYOYm9cqaS9QXNHnhK+YF+1M+KXXZ69fKl1LTiosKel0QHUbk2vRMVDyIVDK23RaTWfIJdKhpD1iraDsYQlauGP7HvA52lIPZgbS7g== 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=M8WjiUwlRV7IhqdicnuhY6mAnnZlk3egPQiB5J0RxS8=; b=S5hEvLrE3Dyq1oW6/0yZr+hDHAO7g1tCGNyp9vHdle5SG7KMn01XiHYjnrLde3Ord7lI0w/pr+h9W02ix9ILljNw/hqmHZWXEVayEpTlNiVI3tkUK1nZDHjNUbDZDglNBhc6e0FPI9Wx0IcSZoK76sKDhfNLG7LIIyrnKr0LVMuIkZvK5NWyG4DdreN99CEdHeRvlLbfwZeu4UusiFx7aTOlHvotHi1lcGilZbt7G/7Z1SdQUIoe7MQFS81lS22drQwNk5cIMz5BjnYcN60VEyb4kad4NtIqqkM+5USlYG77uJ4ROzaG2/8V6kwNnQPvWPMWjG2lnDrAEtKatXMT2A== 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:15 +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:14 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:46 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [+M4FzWXp0yXbh1fZ1mBY20iWN9ldrGA0] 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-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb1c8f63-803e-48ae-cdee-08da73b8bef8 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UJMB8PUgKnQXWhRxW/8y/uE1MqRUJF6RUCP3GQSXR7+kPDUBbPWxG6wuoZxLvvOWSfwkx/UKzR5MArR+rWLxgs3LgnHmXq4vYtf1tpR+bHvwPUflpN3k5COvACp9LibRw3FkPTB6dD0dPRkZVICjeECIdHpg64oqERlKY7KiovZYtS6ldrukKoznCq5MkF4kRChtr05KyWxN7A1tfwAKEtqirg/11HAbR9k5vGDEHrB2lfNASgjRxJBT0oTlhgmsDX52yw7xp5VQlRXPkJKdJpOPvt89s54oLwxU7l+ghvKbXrNifUbxmQDZlIP6stMGEY/0gKc09ajkoYpxb/kPX7jjngfCKlh2aPwRILfZ/LlVa1nQIZhCYVJpMnodw5E02V06U8zKd76SQEObdRowF4h1OQmF/2oH/90BnP2DuCFIIfbHzvIPFEcxgQ8GGfssEZ+yjhGFJZWrC/Y5Nqf0XOxFElolb7O99sVmgwlnNNt0y5+tUEbt4CCnUAPC1ootDE24jsK2obf8jOfXKSPjX+1Kp+eOhMX8c/fDkAKqIO8dAv64LYMq8B4C9vRVLvdJvEhUTNODAxHyNCYj8qLh0xR1SlAO3ZCPkPn+q8IbLfMLleTUiAQnStEgMV6H2dupgcd6j6rAkDnhlntmuY0xWzhwzy6rVgYOGVobxHcYPhTLaGH9FXXB+7ojJr7Qp11ycbkCCFahvbTbg== X-MS-TrafficTypeDiagnostic: HE1PR0101MB2425:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l9kj3bLTvfPq4jUBcZaZHSZ68vvG69lpv6ONQE6aEpXis7z314HTGL0D+el0NWg5tO4WK7fZ8uzPuMrRbsp3sqLB/xgRJqbIcJgT3M0QP80Rn/Iidu8TKKKqavm5IIHzZZvmSDayzOjf+5RELtVrE2b78xdGrYGSZWT1iKYQ2KvpULeV7eCW1zLR4dS6d2W87+4zcHW5HEgxzKsfe70fib3cKYfFzxyt3qn7DNqvOUIfqsp/Hkl7ZP3FYnJgIrsLgMfzKlK+VsrNATm2skvZHWL1w1snnYo/Ot7LA63LAI7u8PjN62INdZ7Ui0cR0L734QebSRHs64uO+JxUrO8gCpKSIjqGODAU7uSb/gd/JheR+yGwonze6nDBBohcFpweT3/8gkWiCtKiZLOjtceGYQ1cphVlMIN/pvN20DcZy7q4j7v6kQxjc+65S7KSoYNopa2kkoR7liYWN1JqaOd3W98/t7PYui2oktGryySMIJ8DoQT0rG0hSexl0bBoQ4I34CjYRBfLuJIKWJXPqwoeIfjykBSve/z7iIC4Gji44SIk0H4ih0eyGd23Nh9G7YR660WO6bvytBJF4J/h3ay9gGBlrf6r1MScZlAR9DE/fcPPba7PjcqcyqpKHHfinxeoBCJTMe+XevALMStJt5XaBg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ar/jBpyhn5W7rPORK21D7N/KDwEE8jaEIYFnG/vuUyyXBI/Dwqm/1o7GgAo4eyzB4JSxpwia1X+ZOj/EDkcIIYYBST3OFN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X8z6XtE3xgx3T6we3SIlzP8ouYXRsQ0SQ+rPkhv0RAYlekpqdtcanprm+IFOwEFzls1l4Wj5OdcoVUrSkPvAurqR7a3fuDzpAezkrnoDkSuoTZCnNnpapV+mmKB+TidiwNyI7xM1b8FbtEswJ6StboRv/01dM9dA= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb1c8f63-803e-48ae-cdee-08da73b8bef8 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:14.4312 (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 08/11] avcodec/aacenc_tns: Remove unused header 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: BS7N3qDCDnd6 Signed-off-by: Andreas Rheinhardt --- libavcodec/aacenc_tns.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/aacenc_tns.c b/libavcodec/aacenc_tns.c index 2ffe1f8de8..195ff5e2b7 100644 --- a/libavcodec/aacenc_tns.c +++ b/libavcodec/aacenc_tns.c @@ -30,7 +30,6 @@ #include "aacenc_tns.h" #include "aactab.h" #include "aacenc_utils.h" -#include "aacenc_quantization.h" /* Could be set to 3 to save an additional bit at the cost of little quality */ #define TNS_Q_BITS 4 From patchwork Mon Aug 1 12:23:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37071 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2470231pzb; Mon, 1 Aug 2022 05:25:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR4xsk46WPubeynm19DlXtFzf4t2J+BzlGsRze68aKJUdnvdo6TiB8p6naZ8MA+Gpkpz/xHw X-Received: by 2002:aa7:db85:0:b0:43d:609b:2592 with SMTP id u5-20020aa7db85000000b0043d609b2592mr9365371edt.147.1659356715831; Mon, 01 Aug 2022 05:25:15 -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 lk10-20020a170906cb0a00b00722668dbcacsi8530324ejb.575.2022.08.01.05.25.15; Mon, 01 Aug 2022 05:25:15 -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=gasI9j3P; 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 332D268BA07; Mon, 1 Aug 2022 15:24:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073017.outbound.protection.outlook.com [40.92.73.17]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8FE3468B9E5 for ; Mon, 1 Aug 2022 15:24:18 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A05PBvmdsGEgKrLaVQo4EgttodVTxtQBSMBt2OoNaL4p5xK1/hGD9KV47f7lbQShrCcM3JZ2LTYZK0yIrsZU+6q5BYYYhRh9kJLuy/AyklOf2YeW4zidWo7FtzPlOBJldsYXQ3h1I3FjCu6b+GND1IPQEzIUUsypuUtZ4QUEdeQXPz9FjHYcnsWheYONV3z8CAUyr2R+ZTvQby8NwNuYxCBhhw7Bhb72NPTPYDS9Tze5cnRAni9ki2LWAtGtCEtx1UfYX4+VsSF31kRxNCPup7NWMCOgHSoNuQn1wL7N6GtIhk+qBEE9VeR8HPOT/HI4kTB5mqcb5VNdKTVGHuJFUQ== 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=aWiLIhWtO1pJ3jE+2T/wJYn56RvOaPRhx1B9E/CL0f0=; b=FYZBA9+/KeLQ6ASaXj6fFD/BiSuaOumJDeAYhGwY5K5Z1t5aJx2lHkLTyx6VzujbCWvmtmAlKf6sWCQfqqJR1jfvfPxh2arrjfRBeitD7NfaiRcQbq4X5wuy0yvdkrQQjWoLGp8eClle2WoNiyoLw4pO80ElILbatgUD3D016aYBngFF5UPmuT0XJeiJboyQ7J6/oXPZZsUFghUV/urxKTFpt+LgyY9quCnlNdxi7Sha+rJfBdbb54zVArgnb9ZHfsQWWtRnUIq1FQG0VGGj1vHa6PJdtvHgbD1hdzqQQO6leHebG0dcvpoG39yXsqtbnRL50WMOi7+VrNKPOAv1kw== 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=aWiLIhWtO1pJ3jE+2T/wJYn56RvOaPRhx1B9E/CL0f0=; b=gasI9j3P7cNfvZYAzq4rG52wMoR5xGkU33Q5vW3eaCQ8Wi4QZTM36BRNVJlK4/dGqnGJlRGslKvKnNzk/XEnlN68FuE9xOpgAZSZJOeZz/sYqOlf86nOex6NHVSq72T0Bt9O6Kt07/z7j6AV27kBHMEx4aYlbcekypW43KMLuvk09PQLscmkAk/ArWOYTfjcyVOJ0GCCjsaGJjKgsX6QMuwkcphtW0JDMCL5wxD8vqadipaRPrcLex6776DcPPXbzxx3bAyvWBHt/4+/4bexj65naO1QcYEbGlb3W2N0wzZpqxZcd/VWlCVO1YJ284wQr0EfJ4bxEy6ycjyo8+dsdg== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by GV1PR01MB8529.eurprd01.prod.exchangelabs.com (2603:10a6:150:24::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.10; Mon, 1 Aug 2022 12:24:16 +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:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:47 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [9Eo70WDQn+G0Soaf3syCjC1gZsF81IsF] 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-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 974a9d2b-6fb2-4d16-722a-08da73b8bfc3 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVakJMqjhoreY9eRj3hMzSf858kNP9/Egp3BLffYqKDkYfLdAtPrD9/vk5Z6D3VXRfEDOqWxvemguKqGkhTjxRs4LnBEfA97oETD9ilnc0OrwaC7wKP8IPQbDbihfLhLytfCUeLocwX4cJVWqqAtjl9DLjm93yCWYo0x9EfALyl6vUJK1SthUbA8SmGQqyoTSl1amQuAg6l+VL6gDrQ039gebpCqVUibhP+6AbuOR3zLG5fvjd9G5mv06btfW4PFDjstgpzNXIDIptwJgIlOoRKs4U0LHwKE2zTKvl/4DoTGIWzWNuLjicy2kdpLXWgKHo0PjoWS/+KdwJHJMv760aoOkmAWV/kjhuB3IJt0pnJsT0EEd9mYlAgmGIbJAY1IOvpX2klqRXc7jehhHt7nC9z3zuBm1b9gs9tY4vIThUHaGFgjHRGshjawpPr5c0LBLBfonQn4J7NHNgIeUhQ0nMmihtOpyPn4j5vyiMJB574WlfDz8KH+aXfS8DT4H/PceO76V9R62/aYzGDzFvSy7sNGlQrdVeBELzqP1vSTDY0IaaVgQKQIf7E1S8x2nJnR0jhIyQ2Xn4XeT3BwapWybXa341VpuCxr0AyXE0uZS5u1cE5P1XNSSM9GLJLuYvK4SwXrMHrCrTmO4jOfAiIa0VxB+/s4JJBpm9LN8D/DGPUHOQi5Ngrp4oyLfteVLXRV6Q623h++3mBMvNI6XEJlikRlp6gU2SjMes= X-MS-TrafficTypeDiagnostic: GV1PR01MB8529:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c9c4pqlv8zSNbtxdO89qEGxGcBqgTSFxRFksKQRDdfn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BCjO7wtR1ax3ndOdELiSm3475W4CYoa2RrdIzhX13vkS1P9rL/r8KJ4SZdZ5qgSjhsBZ4rTKUMQ1x+/x9qbMzmNm55XUHVg5LJh0+Gd3VTvVK4x3F1voe4M8r2YZbKcTNPPt26RfjKFG8N4zEvlXGVNVOgspn1QRPxFbIqtd4KTGPNSs4rA+hEOmfcaNATUeD1pf7UBen75IDXDmNhMI6OfbsHxku6Ulu4OTONTfB7EmA0K5IoukzjZJyTlyGixerG4o3pY2S5g28tt6/nW9/Vvb4lZVYe5T0pi5h/rbL2Ao0SAXvkVx2QVx+Yri1g2/vbHfbjeFRIlX/p66MPcAtXjHH8WSPj71FZO/wKmBtv4Uyv9yFTRPi8P7SXREuUfU7U0z7ipkerBkdbYW1uynZbX/PByC1EnOE3ra8vofd0Odj7i6TqQ6SzCWHxkFNg8XTIsmLqmEEyCXgOsFR0s/wRHKUuEQzoJ7cE+4YrKSueCPir7MHU3WxciJzL7S79PzhjtADZmnF/0OaCpm3SLSQH6+uIzxKBDe8DdRwzxSlO7vDz+hJ0SLDGRJxZGzRiD2TOLwTU4sD2qVh1Unx+klYe4XLcjqSyrZtLGzWEMOkDxe3/FXhX/ytZ9whJblIJB91Pw1DQEfYCdciCzyY221PkMKa9Rs/EroNRFHN4UggwLdF+zG7VYl6Q1wiNy7HNt+WK4jelKTVQ/+5rhFsGBgDa8ujnI/SxP+iElDCpntuFaElX/T9dptG7N7I9pymivn+gRq0VkwXIMVHswjgyHz98Fi1WqEl5bqHaSvy8z8utVu0rRxgIavzOiXCmbKhHWBy2penqIJ7ZogYNGYiz2BT3Q0IHy1JOXjxye7Mkm2/04kHI0Sa5flcRxxjqg7OoZrWs2WBo8GyCe2etvq31qzxyqmrNPNWR4= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 974a9d2b-6fb2-4d16-722a-08da73b8bfc3 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:15.7748 (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: GV1PR01MB8529 Subject: [FFmpeg-devel] [PATCH 09/11] avcodec/aacenc_quantization: Deduplicate quantization functions 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: 8962QL/KO+Zd Up until now, there were four copies of quantize_and_encode_band_cost_(ZERO|[SU]QUAD|[SU]PAIR|ESC|NONE|NOISE|STEREO) (namely in aaccoder.o, aacenc_is.o, aacenc_ltp.o, aacenc_pred.o). As 43b378a0d321e3d01f196cec95e13acfac80d464 says, this is meant to enable more optimizations. Yet neither GCC nor Clang performed such optimizations: The functions in the aforementioned files are not optimized according to the specifics of the calls in the respective file. Therefore duplicating them is a waste of space; this commit therefore stops doing so. The remaining copy is placed into aaccoder.c (which is the only place where the "round to zero" variant of quantize_and_encode_band() is used, so that this can be completely internal to aaccoder.c). Signed-off-by: Andreas Rheinhardt --- libavcodec/aaccoder.c | 223 ++++++++++++++++++++++++++++ libavcodec/aacenc_pred.c | 18 +-- libavcodec/aacenc_quantization.h | 239 ++----------------------------- 3 files changed, 244 insertions(+), 236 deletions(-) diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index 2988247a15..e3b6b2f02c 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -62,6 +62,229 @@ #include "libavcodec/aaccoder_trellis.h" +typedef float (*quantize_and_encode_band_func)(struct AACEncContext *s, PutBitContext *pb, + const float *in, float *quant, const float *scaled, + int size, int scale_idx, int cb, + const float lambda, const float uplim, + int *bits, float *energy); + +/** + * Calculate rate distortion cost for quantizing with given codebook + * + * @return quantization distortion + */ +static av_always_inline float quantize_and_encode_band_cost_template( + struct AACEncContext *s, + PutBitContext *pb, const float *in, float *out, + const float *scaled, int size, int scale_idx, + int cb, const float lambda, const float uplim, + int *bits, float *energy, int BT_ZERO, int BT_UNSIGNED, + int BT_PAIR, int BT_ESC, int BT_NOISE, int BT_STEREO, + const float ROUNDING) +{ + const int q_idx = POW_SF2_ZERO - scale_idx + SCALE_ONE_POS - SCALE_DIV_512; + const float Q = ff_aac_pow2sf_tab [q_idx]; + const float Q34 = ff_aac_pow34sf_tab[q_idx]; + const float IQ = ff_aac_pow2sf_tab [POW_SF2_ZERO + scale_idx - SCALE_ONE_POS + SCALE_DIV_512]; + const float CLIPPED_ESCAPE = 165140.0f*IQ; + float cost = 0; + float qenergy = 0; + const int dim = BT_PAIR ? 2 : 4; + int resbits = 0; + int off; + + if (BT_ZERO || BT_NOISE || BT_STEREO) { + for (int i = 0; i < size; i++) + cost += in[i]*in[i]; + if (bits) + *bits = 0; + if (energy) + *energy = qenergy; + if (out) { + for (int i = 0; i < size; i += dim) + for (int j = 0; j < dim; j++) + out[i+j] = 0.0f; + } + return cost * lambda; + } + if (!scaled) { + s->abs_pow34(s->scoefs, in, size); + scaled = s->scoefs; + } + s->quant_bands(s->qcoefs, in, scaled, size, !BT_UNSIGNED, aac_cb_maxval[cb], Q34, ROUNDING); + if (BT_UNSIGNED) { + off = 0; + } else { + off = aac_cb_maxval[cb]; + } + for (int i = 0; i < size; i += dim) { + const float *vec; + int *quants = s->qcoefs + i; + int curidx = 0; + int curbits; + float quantized, rd = 0.0f; + for (int j = 0; j < dim; j++) { + curidx *= aac_cb_range[cb]; + curidx += quants[j] + off; + } + curbits = ff_aac_spectral_bits[cb-1][curidx]; + vec = &ff_aac_codebook_vectors[cb-1][curidx*dim]; + if (BT_UNSIGNED) { + for (int j = 0; j < dim; j++) { + float t = fabsf(in[i+j]); + float di; + if (BT_ESC && vec[j] == 64.0f) { //FIXME: slow + if (t >= CLIPPED_ESCAPE) { + quantized = CLIPPED_ESCAPE; + curbits += 21; + } else { + int c = av_clip_uintp2(quant(t, Q, ROUNDING), 13); + quantized = c*cbrtf(c)*IQ; + curbits += av_log2(c)*2 - 4 + 1; + } + } else { + quantized = vec[j]*IQ; + } + di = t - quantized; + if (out) + out[i+j] = in[i+j] >= 0 ? quantized : -quantized; + if (vec[j] != 0.0f) + curbits++; + qenergy += quantized*quantized; + rd += di*di; + } + } else { + for (int j = 0; j < dim; j++) { + quantized = vec[j]*IQ; + qenergy += quantized*quantized; + if (out) + out[i+j] = quantized; + rd += (in[i+j] - quantized)*(in[i+j] - quantized); + } + } + cost += rd * lambda + curbits; + resbits += curbits; + if (cost >= uplim) + return uplim; + if (pb) { + put_bits(pb, ff_aac_spectral_bits[cb-1][curidx], ff_aac_spectral_codes[cb-1][curidx]); + if (BT_UNSIGNED) + for (int j = 0; j < dim; j++) + if (ff_aac_codebook_vectors[cb-1][curidx*dim+j] != 0.0f) + put_bits(pb, 1, in[i+j] < 0.0f); + if (BT_ESC) { + for (int j = 0; j < 2; j++) { + if (ff_aac_codebook_vectors[cb-1][curidx*2+j] == 64.0f) { + int coef = av_clip_uintp2(quant(fabsf(in[i+j]), Q, ROUNDING), 13); + int len = av_log2(coef); + + put_bits(pb, len - 4 + 1, (1 << (len - 4 + 1)) - 2); + put_sbits(pb, len, coef); + } + } + } + } + } + + if (bits) + *bits = resbits; + if (energy) + *energy = qenergy; + return cost; +} + +static inline float quantize_and_encode_band_cost_NONE(struct AACEncContext *s, PutBitContext *pb, + const float *in, float *quant, const float *scaled, + int size, int scale_idx, int cb, + const float lambda, const float uplim, + int *bits, float *energy) { + av_assert0(0); + return 0.0f; +} + +#define QUANTIZE_AND_ENCODE_BAND_COST_FUNC(NAME, BT_ZERO, BT_UNSIGNED, BT_PAIR, BT_ESC, BT_NOISE, BT_STEREO, ROUNDING) \ +static float quantize_and_encode_band_cost_ ## NAME( \ + struct AACEncContext *s, \ + PutBitContext *pb, const float *in, float *quant, \ + const float *scaled, int size, int scale_idx, \ + int cb, const float lambda, const float uplim, \ + int *bits, float *energy) { \ + return quantize_and_encode_band_cost_template( \ + s, pb, in, quant, scaled, size, scale_idx, \ + BT_ESC ? ESC_BT : cb, lambda, uplim, bits, energy, \ + BT_ZERO, BT_UNSIGNED, BT_PAIR, BT_ESC, BT_NOISE, BT_STEREO, \ + ROUNDING); \ +} + +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ZERO, 1, 0, 0, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(SQUAD, 0, 0, 0, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(UQUAD, 0, 1, 0, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(SPAIR, 0, 0, 1, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(UPAIR, 0, 1, 1, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ESC, 0, 1, 1, 1, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ESC_RTZ, 0, 1, 1, 1, 0, 0, ROUND_TO_ZERO) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(NOISE, 0, 0, 0, 0, 1, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(STEREO,0, 0, 0, 0, 0, 1, ROUND_STANDARD) + +static quantize_and_encode_band_func quantize_and_encode_band_cost_arr[] = +{ + quantize_and_encode_band_cost_ZERO, + quantize_and_encode_band_cost_SQUAD, + quantize_and_encode_band_cost_SQUAD, + quantize_and_encode_band_cost_UQUAD, + quantize_and_encode_band_cost_UQUAD, + quantize_and_encode_band_cost_SPAIR, + quantize_and_encode_band_cost_SPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_ESC, + quantize_and_encode_band_cost_NONE, /* CB 12 doesn't exist */ + quantize_and_encode_band_cost_NOISE, + quantize_and_encode_band_cost_STEREO, + quantize_and_encode_band_cost_STEREO, +}; + +static quantize_and_encode_band_func quantize_and_encode_band_cost_rtz_arr[] = +{ + quantize_and_encode_band_cost_ZERO, + quantize_and_encode_band_cost_SQUAD, + quantize_and_encode_band_cost_SQUAD, + quantize_and_encode_band_cost_UQUAD, + quantize_and_encode_band_cost_UQUAD, + quantize_and_encode_band_cost_SPAIR, + quantize_and_encode_band_cost_SPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_ESC_RTZ, + quantize_and_encode_band_cost_NONE, /* CB 12 doesn't exist */ + quantize_and_encode_band_cost_NOISE, + quantize_and_encode_band_cost_STEREO, + quantize_and_encode_band_cost_STEREO, +}; + +float ff_quantize_and_encode_band_cost(struct AACEncContext *s, PutBitContext *pb, + const float *in, float *quant, const float *scaled, + int size, int scale_idx, int cb, + const float lambda, const float uplim, + int *bits, float *energy) +{ + return quantize_and_encode_band_cost_arr[cb](s, pb, in, quant, scaled, size, + scale_idx, cb, lambda, uplim, + bits, energy); +} + +static inline void quantize_and_encode_band(struct AACEncContext *s, PutBitContext *pb, + const float *in, float *out, int size, int scale_idx, + int cb, const float lambda, int rtz) +{ + (rtz ? quantize_and_encode_band_cost_rtz_arr : quantize_and_encode_band_cost_arr)[cb](s, pb, in, out, NULL, size, scale_idx, cb, + lambda, INFINITY, NULL, NULL); +} + /** * structure used in optimal codebook search */ diff --git a/libavcodec/aacenc_pred.c b/libavcodec/aacenc_pred.c index d111192f06..447444cb82 100644 --- a/libavcodec/aacenc_pred.c +++ b/libavcodec/aacenc_pred.c @@ -271,9 +271,9 @@ void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce) /* Normal coefficients */ s->abs_pow34(O34, &sce->coeffs[start_coef], num_coeffs); - dist1 = quantize_and_encode_band_cost(s, NULL, &sce->coeffs[start_coef], NULL, - O34, num_coeffs, sce->sf_idx[sfb], - cb_n, s->lambda / band->threshold, INFINITY, &cost1, NULL, 0); + dist1 = ff_quantize_and_encode_band_cost(s, NULL, &sce->coeffs[start_coef], NULL, + O34, num_coeffs, sce->sf_idx[sfb], + cb_n, s->lambda / band->threshold, INFINITY, &cost1, NULL); cost_coeffs += cost1; /* Encoded coefficients - needed for #bits, band type and quant. error */ @@ -284,9 +284,9 @@ void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce) cb_p = av_clip(find_min_book(find_max_val(1, num_coeffs, S34), sce->sf_idx[sfb]), cb_min, cb_max); else cb_p = cb_n; - quantize_and_encode_band_cost(s, NULL, SENT, QERR, S34, num_coeffs, - sce->sf_idx[sfb], cb_p, s->lambda / band->threshold, INFINITY, - &cost2, NULL, 0); + ff_quantize_and_encode_band_cost(s, NULL, SENT, QERR, S34, num_coeffs, + sce->sf_idx[sfb], cb_p, s->lambda / band->threshold, INFINITY, + &cost2, NULL); /* Reconstructed coefficients - needed for distortion measurements */ for (i = 0; i < num_coeffs; i++) @@ -296,9 +296,9 @@ void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce) cb_p = av_clip(find_min_book(find_max_val(1, num_coeffs, P34), sce->sf_idx[sfb]), cb_min, cb_max); else cb_p = cb_n; - dist2 = quantize_and_encode_band_cost(s, NULL, &sce->prcoeffs[start_coef], NULL, - P34, num_coeffs, sce->sf_idx[sfb], - cb_p, s->lambda / band->threshold, INFINITY, NULL, NULL, 0); + dist2 = ff_quantize_and_encode_band_cost(s, NULL, &sce->prcoeffs[start_coef], NULL, + P34, num_coeffs, sce->sf_idx[sfb], + cb_p, s->lambda / band->threshold, INFINITY, NULL, NULL); for (i = 0; i < num_coeffs; i++) dist_spec_err += (O34[i] - P34[i])*(O34[i] - P34[i]); dist_spec_err *= s->lambda / band->threshold; diff --git a/libavcodec/aacenc_quantization.h b/libavcodec/aacenc_quantization.h index f3c3553886..185430b0dd 100644 --- a/libavcodec/aacenc_quantization.h +++ b/libavcodec/aacenc_quantization.h @@ -28,232 +28,25 @@ #ifndef AVCODEC_AACENC_QUANTIZATION_H #define AVCODEC_AACENC_QUANTIZATION_H -#include "aactab.h" -#include "aacenc.h" -#include "aacenctab.h" -#include "aacenc_utils.h" - -/** - * Calculate rate distortion cost for quantizing with given codebook - * - * @return quantization distortion - */ -static av_always_inline float quantize_and_encode_band_cost_template( - struct AACEncContext *s, - PutBitContext *pb, const float *in, float *out, - const float *scaled, int size, int scale_idx, - int cb, const float lambda, const float uplim, - int *bits, float *energy, int BT_ZERO, int BT_UNSIGNED, - int BT_PAIR, int BT_ESC, int BT_NOISE, int BT_STEREO, - const float ROUNDING) -{ - const int q_idx = POW_SF2_ZERO - scale_idx + SCALE_ONE_POS - SCALE_DIV_512; - const float Q = ff_aac_pow2sf_tab [q_idx]; - const float Q34 = ff_aac_pow34sf_tab[q_idx]; - const float IQ = ff_aac_pow2sf_tab [POW_SF2_ZERO + scale_idx - SCALE_ONE_POS + SCALE_DIV_512]; - const float CLIPPED_ESCAPE = 165140.0f*IQ; - int i, j; - float cost = 0; - float qenergy = 0; - const int dim = BT_PAIR ? 2 : 4; - int resbits = 0; - int off; +#include - if (BT_ZERO || BT_NOISE || BT_STEREO) { - for (i = 0; i < size; i++) - cost += in[i]*in[i]; - if (bits) - *bits = 0; - if (energy) - *energy = qenergy; - if (out) { - for (i = 0; i < size; i += dim) - for (j = 0; j < dim; j++) - out[i+j] = 0.0f; - } - return cost * lambda; - } - if (!scaled) { - s->abs_pow34(s->scoefs, in, size); - scaled = s->scoefs; - } - s->quant_bands(s->qcoefs, in, scaled, size, !BT_UNSIGNED, aac_cb_maxval[cb], Q34, ROUNDING); - if (BT_UNSIGNED) { - off = 0; - } else { - off = aac_cb_maxval[cb]; - } - for (i = 0; i < size; i += dim) { - const float *vec; - int *quants = s->qcoefs + i; - int curidx = 0; - int curbits; - float quantized, rd = 0.0f; - for (j = 0; j < dim; j++) { - curidx *= aac_cb_range[cb]; - curidx += quants[j] + off; - } - curbits = ff_aac_spectral_bits[cb-1][curidx]; - vec = &ff_aac_codebook_vectors[cb-1][curidx*dim]; - if (BT_UNSIGNED) { - for (j = 0; j < dim; j++) { - float t = fabsf(in[i+j]); - float di; - if (BT_ESC && vec[j] == 64.0f) { //FIXME: slow - if (t >= CLIPPED_ESCAPE) { - quantized = CLIPPED_ESCAPE; - curbits += 21; - } else { - int c = av_clip_uintp2(quant(t, Q, ROUNDING), 13); - quantized = c*cbrtf(c)*IQ; - curbits += av_log2(c)*2 - 4 + 1; - } - } else { - quantized = vec[j]*IQ; - } - di = t - quantized; - if (out) - out[i+j] = in[i+j] >= 0 ? quantized : -quantized; - if (vec[j] != 0.0f) - curbits++; - qenergy += quantized*quantized; - rd += di*di; - } - } else { - for (j = 0; j < dim; j++) { - quantized = vec[j]*IQ; - qenergy += quantized*quantized; - if (out) - out[i+j] = quantized; - rd += (in[i+j] - quantized)*(in[i+j] - quantized); - } - } - cost += rd * lambda + curbits; - resbits += curbits; - if (cost >= uplim) - return uplim; - if (pb) { - put_bits(pb, ff_aac_spectral_bits[cb-1][curidx], ff_aac_spectral_codes[cb-1][curidx]); - if (BT_UNSIGNED) - for (j = 0; j < dim; j++) - if (ff_aac_codebook_vectors[cb-1][curidx*dim+j] != 0.0f) - put_bits(pb, 1, in[i+j] < 0.0f); - if (BT_ESC) { - for (j = 0; j < 2; j++) { - if (ff_aac_codebook_vectors[cb-1][curidx*2+j] == 64.0f) { - int coef = av_clip_uintp2(quant(fabsf(in[i+j]), Q, ROUNDING), 13); - int len = av_log2(coef); - - put_bits(pb, len - 4 + 1, (1 << (len - 4 + 1)) - 2); - put_sbits(pb, len, coef); - } - } - } - } - } - - if (bits) - *bits = resbits; - if (energy) - *energy = qenergy; - return cost; -} - -static inline float quantize_and_encode_band_cost_NONE(struct AACEncContext *s, PutBitContext *pb, - const float *in, float *quant, const float *scaled, - int size, int scale_idx, int cb, - const float lambda, const float uplim, - int *bits, float *energy) { - av_assert0(0); - return 0.0f; -} - -#define QUANTIZE_AND_ENCODE_BAND_COST_FUNC(NAME, BT_ZERO, BT_UNSIGNED, BT_PAIR, BT_ESC, BT_NOISE, BT_STEREO, ROUNDING) \ -static float quantize_and_encode_band_cost_ ## NAME( \ - struct AACEncContext *s, \ - PutBitContext *pb, const float *in, float *quant, \ - const float *scaled, int size, int scale_idx, \ - int cb, const float lambda, const float uplim, \ - int *bits, float *energy) { \ - return quantize_and_encode_band_cost_template( \ - s, pb, in, quant, scaled, size, scale_idx, \ - BT_ESC ? ESC_BT : cb, lambda, uplim, bits, energy, \ - BT_ZERO, BT_UNSIGNED, BT_PAIR, BT_ESC, BT_NOISE, BT_STEREO, \ - ROUNDING); \ -} - -QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ZERO, 1, 0, 0, 0, 0, 0, ROUND_STANDARD) -QUANTIZE_AND_ENCODE_BAND_COST_FUNC(SQUAD, 0, 0, 0, 0, 0, 0, ROUND_STANDARD) -QUANTIZE_AND_ENCODE_BAND_COST_FUNC(UQUAD, 0, 1, 0, 0, 0, 0, ROUND_STANDARD) -QUANTIZE_AND_ENCODE_BAND_COST_FUNC(SPAIR, 0, 0, 1, 0, 0, 0, ROUND_STANDARD) -QUANTIZE_AND_ENCODE_BAND_COST_FUNC(UPAIR, 0, 1, 1, 0, 0, 0, ROUND_STANDARD) -QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ESC, 0, 1, 1, 1, 0, 0, ROUND_STANDARD) -QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ESC_RTZ, 0, 1, 1, 1, 0, 0, ROUND_TO_ZERO) -QUANTIZE_AND_ENCODE_BAND_COST_FUNC(NOISE, 0, 0, 0, 0, 1, 0, ROUND_STANDARD) -QUANTIZE_AND_ENCODE_BAND_COST_FUNC(STEREO,0, 0, 0, 0, 0, 1, ROUND_STANDARD) - -static float (*const quantize_and_encode_band_cost_arr[])( - struct AACEncContext *s, - PutBitContext *pb, const float *in, float *quant, - const float *scaled, int size, int scale_idx, - int cb, const float lambda, const float uplim, - int *bits, float *energy) = { - quantize_and_encode_band_cost_ZERO, - quantize_and_encode_band_cost_SQUAD, - quantize_and_encode_band_cost_SQUAD, - quantize_and_encode_band_cost_UQUAD, - quantize_and_encode_band_cost_UQUAD, - quantize_and_encode_band_cost_SPAIR, - quantize_and_encode_band_cost_SPAIR, - quantize_and_encode_band_cost_UPAIR, - quantize_and_encode_band_cost_UPAIR, - quantize_and_encode_band_cost_UPAIR, - quantize_and_encode_band_cost_UPAIR, - quantize_and_encode_band_cost_ESC, - quantize_and_encode_band_cost_NONE, /* CB 12 doesn't exist */ - quantize_and_encode_band_cost_NOISE, - quantize_and_encode_band_cost_STEREO, - quantize_and_encode_band_cost_STEREO, -}; +#include "aacenc.h" +#include "put_bits.h" -static float (*const quantize_and_encode_band_cost_rtz_arr[])( - struct AACEncContext *s, - PutBitContext *pb, const float *in, float *quant, - const float *scaled, int size, int scale_idx, - int cb, const float lambda, const float uplim, - int *bits, float *energy) = { - quantize_and_encode_band_cost_ZERO, - quantize_and_encode_band_cost_SQUAD, - quantize_and_encode_band_cost_SQUAD, - quantize_and_encode_band_cost_UQUAD, - quantize_and_encode_band_cost_UQUAD, - quantize_and_encode_band_cost_SPAIR, - quantize_and_encode_band_cost_SPAIR, - quantize_and_encode_band_cost_UPAIR, - quantize_and_encode_band_cost_UPAIR, - quantize_and_encode_band_cost_UPAIR, - quantize_and_encode_band_cost_UPAIR, - quantize_and_encode_band_cost_ESC_RTZ, - quantize_and_encode_band_cost_NONE, /* CB 12 doesn't exist */ - quantize_and_encode_band_cost_NOISE, - quantize_and_encode_band_cost_STEREO, - quantize_and_encode_band_cost_STEREO, -}; -#define quantize_and_encode_band_cost( \ - s, pb, in, quant, scaled, size, scale_idx, cb, \ - lambda, uplim, bits, energy, rtz) \ - ((rtz) ? quantize_and_encode_band_cost_rtz_arr : quantize_and_encode_band_cost_arr)[cb]( \ - s, pb, in, quant, scaled, size, scale_idx, cb, \ - lambda, uplim, bits, energy) +float ff_quantize_and_encode_band_cost(AACEncContext *s, PutBitContext *pb, + const float *in, float *quant, const float *scaled, + int size, int scale_idx, int cb, + const float lambda, const float uplim, + int *bits, float *energy); 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) { - return quantize_and_encode_band_cost(s, NULL, in, NULL, scaled, size, scale_idx, - cb, lambda, uplim, bits, energy, 0); + return ff_quantize_and_encode_band_cost(s, NULL, in, NULL, scaled, size, scale_idx, + cb, lambda, uplim, bits, energy); } static inline int quantize_band_cost_bits(struct AACEncContext *s, const float *in, @@ -262,22 +55,14 @@ static inline int quantize_band_cost_bits(struct AACEncContext *s, const float * 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, 0); + ff_quantize_and_encode_band_cost(s, NULL, in, NULL, scaled, size, scale_idx, + cb, 0.0f, uplim, &auxbits, energy); if (bits) { *bits = auxbits; } return auxbits; } -static inline void quantize_and_encode_band(struct AACEncContext *s, PutBitContext *pb, - const float *in, float *out, int size, int scale_idx, - int cb, const float lambda, int rtz) -{ - quantize_and_encode_band_cost(s, pb, in, out, NULL, size, scale_idx, cb, lambda, - INFINITY, NULL, NULL, rtz); -} - #include "aacenc_quantization_misc.h" #endif /* AVCODEC_AACENC_QUANTIZATION_H */ From patchwork Mon Aug 1 12:23:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37072 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2470320pzb; Mon, 1 Aug 2022 05:25:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRgFRi/uOHs5gPXuGl/7ct0ReJX/E11+J8iAgrc7io6IXs8d1Bak+/kOGkJaUIVEF+yMjy X-Received: by 2002:a17:907:3e07:b0:72e:e1e2:1415 with SMTP id hp7-20020a1709073e0700b0072ee1e21415mr12364330ejc.596.1659356725391; Mon, 01 Aug 2022 05:25:25 -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 sd40-20020a1709076e2800b0072b870ca25esi7279370ejc.996.2022.08.01.05.25.25; Mon, 01 Aug 2022 05:25:25 -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="V4/h17cy"; 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 3256568BA98; Mon, 1 Aug 2022 15:24:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073017.outbound.protection.outlook.com [40.92.73.17]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BA31D68BA30 for ; Mon, 1 Aug 2022 15:24:18 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TASMoOStzMo6rOUa3zekrSFMqsGqnRWDExYHAF2rH6OnmVze7myqjar9XZu5dmKyA+eubFjf6ZzptIRH40Sa+PZ/sYi+KJ6lpMKqWv2fuX2+LsSYGSSwYwPw52jyjiiu2340VtTOZcgtz2q6dTv1520kXyVDBdIpW6q4qzj7nh9xerdfqgOi6jjSvzKsTz59thTX0P/tBVIOs/QaHxDkbboOq0GluhCFmEkVhZU32BDDxpWdjIJRnQn6GfQL/N5qSxqrqCKQMeLELHqe9gbfQXe90UX2y/b1HkwI18Y3E582h4JXrR8zxyHrKBLPFgih7fgBdaCroOcgJeL+SND9vg== 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=mvkcY9v3jH4IhXH3ycWqv8ujI5aKS9hnGvElSQ40JXM=; b=ItNuILpVWHWDknta4o4Pn1jHHNXnYBHoopk862RWnKJGQ0D60Lxil/YF43HsCySaB/QAHO3JFhlbQifMzDyaHitfP5WW01R3oqqpE6A9SL61Xpd2zjbVYOnNZLQyDJqmQjL7xtlUt369I5179t4nA7tNJiz5m33/B2DhT6kIdvRljpKMe+iM7Kv3MpKpDacVPNsdueiqKI27b2+RCpAxe6PFAccD3BnNPosKCkE8rc+UWUwTWiemQqGmBZ+lT8+DrelOSeV0JiInFU1htsXHwhNlj1WyitDXhLJGy6TJq1eazOEJ4D+HEkYMnk11xQtDEVeHp+xvQ4YdaqtfKg/m0w== 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=mvkcY9v3jH4IhXH3ycWqv8ujI5aKS9hnGvElSQ40JXM=; b=V4/h17cybXYXoZuzVVAR47ylRXLOWnCz0ihPUWn5Tstc4RabzZBiLbkkgL+i/foI6tIUCOpXc0FxWwJjYCpMk2b8S+17/syRzMpTd43gEUfivqZpp0iu4+8uVZUFX7QTMLCrD8Nw8bQlJEj0SSg3DuxPUYghYwOn4Qmb5C0RxZxd2IQLOiikf4xRAbD0NkMmAhLUUoaX0eADpQrnlBW+4KzSIoKF5HnOxDtkHjNCPa1PGcXIs9J/8NPlsOGtLW7SUXTZtFRFKHqu2z21WjeR4cjE+2VDAHJRU3oHejgokbmMGHO7QfC7my++0sRlLb5JtMTKKNQHBGdwQjemqvQMhQ== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by GV1PR01MB8529.eurprd01.prod.exchangelabs.com (2603:10a6:150:24::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.10; Mon, 1 Aug 2022 12:24:17 +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:17 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:48 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [YDK3trlMY03LtNfxMVk3Sbe2kluIhxtI] 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-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a4c89a4e-9b8a-46f0-c0a7-08da73b8c0fb X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UJMB8PUgKnQXWhRxW/8y/uEEgDIbLgfR+YIX4X1tQjnmPWygNTUQxbkKpHNDloPQlYn98qtWI9472TaTj5RdQu7Ur1WZmCiKH7MlY5K60w3pN//a47SZ2BxYoegi1Akp4pL/s8c0z9UM8x6uFaObsT73aP7n7f4f3biEUK5mvYR0Pn/tYzt3Hfclj3xzmxncj7WOoVdMQJl78M6Zv0U0xpAIz/f4jrjDh3p6FtgbxXe+SuE3HQ+Ji/KOYQ+42c+KyVsTXS0HlsaMwF4i4sZC/ybK+gZAJn0eUTNBhHu5MZwlCZvj1ejV/OeyuPzmKor98qJG+uC2YyiYMxCPfH+Wx7WTgQ4r0fK6R6pEzR7tOvYwAn7Rdmy6YvFQTUMXQBNIoBax9GwPA6OuDChIj89r/iu8EVPxpMarZJIxRaDkEDKty+JzJYxiuPlWv+P2Guz2fSinaMVPgbseSlS+LlSYedg1u1ld0MtIfzMc6n+pIZgTrlt49u/jrHEGHWaBX9NjcEOT9hCXiFxIscZz7jvToo6oIAxuV8iVNbA7xE1TiQYMiNWcHzXVo2YHjtNaSvM0Ybp7Z3c5vLHrqiPr40v6GzagJx4Ca0WLE37i7G24RSKXK0VIQg2K/axs646EOdYJuJp7eo95pddNkcG3Au9wFbTsER/jTtk+KOf93UxZ8jQUY+cT/Y+q7AcNFxk8SK9w/E7cmJZS4JlRA== X-MS-TrafficTypeDiagnostic: GV1PR01MB8529:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q+lHVFJYesJ19Wlmtc9LciSoRWzNb3X1K3e2tKfcjV/lwVkDIb8D+ozcUWC3zBy6Y+fBSuBJPa8ZGRWuydB9HDgLDuc1oYEG1PLtkNBX/gDZ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83RPl4/HknrQxj+AHBjGYX3wpWyj5L5LBP8pCrqZ9xLZpKjrn2sfWILwwM+mMNv2oBN3sE6Mcgq9+BBfqf9lvfG6hiIDakZQm1bhvRVAiv+0fKkzFajh27Nm9xb4kYj653Qdn5xxlCeopIc3nE/BHIfbyMPbC7vXkn0j0aPT0czj9kYZ0HyCY65iAZs0qZzoV4Tsj98ZX3VHnK4KAXOOQaiRPMDb0IfmYxytGUbjsQvxwcnEOCXRzAR0hmImSf06aUYCwQEgwchyRFCh0Jz+GR/EJa8Dz7aZ34KTjZZbyOOR0uUxCH6ed1UuYSKpkwnF0+3/HIyaRnp7xvWkz73dvhSS9kxeVtW0J8NJJf+fnfxGUB9/tY935HFgvYCN6b3R/q9lQ4ROicx1knCCZ/WKg8j/n71LQ9TUHOPV0Kj3jDrxxcvycm+0MVjyvRQNwV1kMoanT2ugXgB67XX2NxOeREfqBW6EG3Py0fksumxQch+edsDg2mTSWKWkbbRUoBu2or/ruK0wCXoU9wBWZQdny9g/X2GLvgYyDUNIz7VR2PDiZ8pwEXCc2hUirUsWR2Gi5MfnmStLbbQF1FhFN7WEpZCWLsYpBbLIDFXGJqlcVVnJOghkf+A8FO456cqjVsvLJqPxiuVhDBSAA0//gdBcP8whOhCKkbWGrXWrM0/E5yElXy7vOjmBKRiLV5UpuhOLUL1CKRcxEuw7O9sSnVUMuAlAIsQ8gszFUwyxm9O/Zg9ZNG+mugWMs5CHBwtdjinkNatiMqg4PuvnGUT9qGKBVu+S1/+hjRBfgiodcPnBqGYvhSqqoiUYMSsZT6OxjeoJIPmZlk8QFqPdJeyqA1FKTOiQJGGdQ= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4c89a4e-9b8a-46f0-c0a7-08da73b8c0fb 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:17.8372 (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: GV1PR01MB8529 Subject: [FFmpeg-devel] [PATCH 10/11] avcodec/avcodec: Remove legacy cruft 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: SCSm5EScP7PY Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 60b215d2e9..abd6272f63 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -338,13 +338,6 @@ typedef struct RcOverride{ */ #define AV_CODEC_FLAG2_ICC_PROFILES (1U << 31) -/* Unsupported options : - * Syntax Arithmetic coding (SAC) - * Reference Picture Selection - * Independent Segment Decoding */ -/* /Fx */ -/* codec capabilities */ - /* Exported side data. These flags can be passed in AVCodecContext.export_side_data before initialization. */ From patchwork Mon Aug 1 12:23:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37073 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp2470388pzb; Mon, 1 Aug 2022 05:25:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR6EFq4aMibm/s3kH9UpHVQEcVPRVWVMpahsyvHmLn4seezRV0kL4HdvJxLnyLuTNyrqjUwZ X-Received: by 2002:aa7:df88:0:b0:43d:3ac0:a33a with SMTP id b8-20020aa7df88000000b0043d3ac0a33amr12254727edy.157.1659356734208; Mon, 01 Aug 2022 05:25:34 -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 t25-20020a50d719000000b0043beaa7f1b3si10842031edi.247.2022.08.01.05.25.33; Mon, 01 Aug 2022 05:25:34 -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=gIpRqkob; 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 2AE0068BAA2; Mon, 1 Aug 2022 15:24:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073042.outbound.protection.outlook.com [40.92.73.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0932E68BA94 for ; Mon, 1 Aug 2022 15:24:20 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZjRENxUF9MxkU+x0j+qby2YqHmVaHHkZkeNXw//fHnmNkUFLZgmMD0rxjG0t8JN1iGbQD0TBfQ8gzQkpl65z02JlxhsYdOmBL+Tv6DUnAprGD9BPJzL2eKyHkrMGh979aWZ6Dv4ruzVz4ZDqyj88di+D972ollygy51DBaTY7v385r2viNscpxPkLG01CX59P/OYzi+/PLfgDtWUIn64yjEq+LYD/HYrK+X4i1sotV68eVSALaA/gP3FZNzlElwArKgtLjfiXiNfkfP+8xvYPlXYl3MEpepric68hdhjFlb4d/RxylxooI8cRe3g/cbhHjirom3hnZCrVBoAorxPbA== 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=+MSXfHUDtQnJb/ckh9e9j4g0Cuu5N7JKzuYnHD7e3uQ=; b=nTQmNoPTTKffhnJtVeYp0Py2ScbFRD59Wr1aoLHfckj1shhbrZaDF1n8RzIauXsEyZrTNyV2K7baG0/4LKQhfpvgeEJo/5AkiH2ZYq5rmkN+rsYS3S5ydNGLpmHd8gfe5pD5bVy0lmDC0v5Qa5KfuI2rNhe7vMVJAhfdTtUuiKcPQngayCvjfnN3dlr6o85KJisKZOfjiN8B20naVRlEhrSezjcR2Kr9u2eF4VQEqHt77/4ULQKyKqqImc0SgwODYuoXAY9xhM8jp0vXwhZK6YPTP7wCRnLUQQn5wJzVw1jtad4qKcSm6bXfhhwUvsER4Lp1pmF8O1Sz4WsUpmRtZA== 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=+MSXfHUDtQnJb/ckh9e9j4g0Cuu5N7JKzuYnHD7e3uQ=; b=gIpRqkoboz+cdNy5X/yq+NxBfZEtHMO/vy6yScSEEwzTf78wXBgFV0TFY+yjNIj1BolHvNmRT+PhHtQkgg1cdOYIE2cfND0FXhZdLWf5KZUPV3UTybgaMQufvQIOtaupOmmi7c/IwLrnY3wgMpppprfmu49pLml/6VnsIfSOPx4BsN9vb4T2tzmyOPtGBrd05VjWOme0JBQsBcPnd07M0RKzGIQSvn62R4/fk2Mxb6fRu0QRZwq22t/T9GjMVm8pN8m+UTNTRI+xYDFWGwtSN96FsbMNdRWux3Mh/5tofnwTR40XTq3iVWsdOWO3V6M3IKRnlSh7flCkQz8vJVkOEA== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by GV1PR01MB8529.eurprd01.prod.exchangelabs.com (2603:10a6:150:24::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.10; Mon, 1 Aug 2022 12:24:19 +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:19 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Aug 2022 14:23:49 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [F3GiQT5Ndr+I99SIKfJQGyHKD79Hqrer] 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-10-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d6d78c03-958f-4ab7-0297-08da73b8c1c4 X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEtaDav5KDaKmGsTLfEoik1v/E1M06Y9/RfMlvYyBcUIRnfRDunULTYOGcWeLvvZNKHF2KafjpVhN49SOuMH+RP9J6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8avzFMs7T+56v4rYudCSJ/qpzARoBONXqwwzHDi+tT9mXrgF/duinck62DWq3DN0XdZRX2fSfnnJ+Q8wr3dxJ33TfIA7DFEyNqG09FODsh318L1zfOs2R2nf3+69u8uRxDxxtfs1QpF9PIFe9mFo9v4A5RSPTM78i62hBPDmnpNvH+jZOp51XNb0dOQUGnd1jGRVnmp2usZd2oznsZvlB9YnRVyQFf903+JFVvgaxjprJlXlAgT4f1CGULlav27YXV5H1umoMedLO1a454NH0SXvXIwLv++qvyfPID57UcEpfO9AMOkGpSHc+uV9djGRnSIy5xxshAd3JxqbTcToLbChNsXtaRyWt6m8NJQD8Roo+APtA98sE3lB2JTNnZsBlpUKaBfbjvxvdQ1YRcAq2hO93tB2HuVr2Ospkd24euuFf4NTDVb9MAFStgoduu19op1fCVqUl8iSudR8x/W6vwOlIg/bPOxUh/AJiMuo/OO23yyjnc5VDdrMebKLoK0lU6gTUcDmrEqzLaCOVH+VlE4kNBvOXtHjVEoPaq+JkFUhoAQW+jsw00/S3bR8BQ8FMI9qrR2s6UaM+wfTYGxT9Io1mlMFX9VVYhORmhYJsE4a4K/pXUsuy7oPGFwkJw3vD3DBLODLH4dQPcAj0e5TWnc5W6AlkRomm/ya/E= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6d78c03-958f-4ab7-0297-08da73b8c1c4 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:19.1027 (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: GV1PR01MB8529 Subject: [FFmpeg-devel] [PATCH 11/11] avcodec/avcodec: Remove AV_CODEC_FLAG2_DROP_FRAME_TIMECODE 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: xryzu9tWFqEa It has been deprecated in 94d68a41fabb55dd8c7e59b88fe4a28a637d1e5f and can't be set via AVOptions. The only codecs that use it (the MPEG-1/2 encoders) have private options for this. So remove it. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 5 ----- libavcodec/mpeg12enc.c | 1 - 2 files changed, 6 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index abd6272f63..1d55cdb07a 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -300,11 +300,6 @@ typedef struct RcOverride{ */ #define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3) -/** - * timecode is in drop frame format. DEPRECATED!!!! - */ -#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13) - /** * Input bitstream might be truncated at a packet boundaries * instead of only at frame boundaries. diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index a7e7aef010..ae2311b39f 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -234,7 +234,6 @@ static av_cold int encode_init(AVCodecContext *avctx) } } - mpeg12->drop_frame_timecode = mpeg12->drop_frame_timecode || !!(avctx->flags2 & AV_CODEC_FLAG2_DROP_FRAME_TIMECODE); if (mpeg12->drop_frame_timecode) mpeg12->tc.flags |= AV_TIMECODE_FLAG_DROPFRAME; if (mpeg12->drop_frame_timecode && mpeg12->frame_rate_index != 4) {