From patchwork Sun May 19 16:54:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 49036 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:3a48:b0:1af:fc2d:ff5a with SMTP id zu8csp4001663pzb; Sun, 19 May 2024 09:56:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUdhQpOnWEF0buhDTfPGdVBee/3TnNcPy6accVCuhypG8Gcqh93EMU8Fl2vKLPKB3NdMgoyYfVUa2c2XcR1W+9ndVeSlqL/bnvs1Q== X-Google-Smtp-Source: AGHT+IHSIqWhW9Ie2fTHqkVEPUDbeWYb1rnpnSUYfUeobcBudZ7RKdXZ6W1hhRC/3TwSMoeyZBob X-Received: by 2002:a2e:b5d6:0:b0:2e1:fd4a:cc3d with SMTP id 38308e7fff4ca-2e51fd4dd13mr173573251fa.2.1716137769032; Sun, 19 May 2024 09:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716137769; cv=none; d=google.com; s=arc-20160816; b=L+P7VK5StpeaPh1iaG0gBHL7cHrGQaZkb/wwjI6BeSE1bbBujpVIYjUn056faJmRTh bKS6o+mXRYZ7Q/zz/27V64vQZuaFLAmMo7SeOi9vhl9w/RugNQeJUfK4Yg986WsWIw/2 NHvGKVDmH/k9D+UP0d4wMwBV70AgX63cHoM0lPJV2nb1/bq+xzZWvqyQFnlww/DvaXwg +DzWZhhOJbDJYYpI1M4z4LGHFsN80lGu32XBel36EcaEPdGgKacSrh4lRdYKRK7aaCHf 68Fqf+1dBKYWf0AHhbULQ1uxhCKVwqFDDA7ea+9p75DxtP2xCnxNtG0n9xO/QSp5XCWw dssQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to:from :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:delivered-to; bh=ZE3x130EdNaNHhXgw8Pq8dhsDQh8lct4lZwIp9qazVU=; fh=nenT92/WZoU6unXd3J6UhGUdod4piddKfVtctNBOh6k=; b=AlianlcSnMqm8Wn565HKN1Gd2rZod1oKFBrJrLw7O7ZDwgbT7mtsegaWYlaYfWaBWd Z95iHOEzUI9qQ0XOcdMWpek4WFEzTboxVDLw+cc7j+AX7FPGnSTIiyvLtlea6JWSJE6f Vs4FyF+IW/yGf398CNuR5k6m8x+dYt6u12WiPZ2GlePx1dAH9WS/Ypu8AHutIbVgESW0 SeC80pX0SOrcSLV6pTReZvRpR3GK1e444qerMBgNKXvJREdwn2GZu1yCX2z4yPNkDsea 7/2H68TZf4AJsyN/9Fg/AmIEjBEC8x5wmBnTOMvRxCex5rBXMxQCsFK/MZmCX472nu0V z4Zw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-57514bc18c9si3304658a12.621.2024.05.19.09.56.08; Sun, 19 May 2024 09:56:08 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 07AC968D06F; Sun, 19 May 2024 19:55:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vidala.lynne.ee (vidala.pars.ee [116.203.72.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E662568CEEE for ; Sun, 19 May 2024 19:55:29 +0300 (EEST) To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 May 2024 18:54:43 +0200 Message-ID: <20240519165444.829271-8-dev@lynne.ee> X-Mailer: git-send-email 2.43.0.381.gb435a96ce8 In-Reply-To: <20240519165444.829271-1-dev@lynne.ee> References: <20240519165444.829271-1-dev@lynne.ee> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 7/8] aactab: add new scalefactor offset tables for 96/768pt windows 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: , X-Patchwork-Original-From: Lynne via ffmpeg-devel From: Lynne Reply-To: FFmpeg development discussions and patches Cc: Lynne Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: HAjv26lDFDYA --- libavcodec/aactab.c | 117 ++++++++++++++++++++++++++++++++++++++++++++ libavcodec/aactab.h | 4 ++ 2 files changed, 121 insertions(+) diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c index dfb2dfd98d..18afa69bad 100644 --- a/libavcodec/aactab.c +++ b/libavcodec/aactab.c @@ -154,6 +154,10 @@ const uint8_t ff_aac_num_swb_960[] = { 40, 40, 46, 49, 49, 49, 46, 46, 42, 42, 42, 40, 40 }; +const uint8_t ff_aac_num_swb_768[] = { + 37, 37, 41, 43, 43, 43, 43, 43, 39, 39, 39, 37, 37 +}; + const uint8_t ff_aac_num_swb_512[] = { 0, 0, 0, 36, 36, 37, 31, 31, 0, 0, 0, 0, 0 }; @@ -170,6 +174,10 @@ const uint8_t ff_aac_num_swb_120[] = { 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15 }; +const uint8_t ff_aac_num_swb_96[] = { + 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14 +}; + const uint8_t ff_aac_pred_sfb_max[] = { 33, 33, 38, 40, 40, 40, 41, 41, 37, 37, 37, 34, 34 }; @@ -1806,6 +1814,99 @@ static const uint16_t swb_offset_120_8[] = 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 60, 72, 88, 108, 120 }; +static const uint16_t swb_offset_768_96[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, + 40, 44, 48, 52, 56, 64, 72, 80, 88, 96, + 108, 120, 132, 144, 156, 172, 188, 212, 240, 276, + 320, 384, 448, 512, 576, 640, 704, 768 +}; + +static const uint16_t swb_offset_768_64[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, + 44, 48, 52, 56, 64, 72, 80, 88, 100, 112, 124, + 140, 156, 172, 192, 216, 240, 268, 304, 344, 384, 424, + 464, 504, 544, 584, 624, 664, 704, 744, 768 +}; + +static const uint16_t swb_offset_768_48[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, + 56, 64, 72, 80, 88, 96, 108, 120, 132, 144, 160, 176, + 196, 216, 240, 264, 292, 320, 352, 384, 416, 448, 480, 512, + 544, 576, 608, 640, 672, 704, 736, 768 +}; + +static const uint16_t swb_offset_768_32[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, + 56, 64, 72, 80, 88, 96, 108, 120, 132, 144, 160, 176, + 196, 216, 240, 264, 292, 320, 352, 384, 416, 448, 480, 512, + 544, 576, 608, 640, 672, 704, 736, 768 +}; + +static const uint16_t swb_offset_768_24[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, + 52, 60, 68, 76, 84, 92, 100, 108, 116, 124, 136, 148, + 160, 172, 188, 204, 220, 240, 260, 284, 308, 336, 364, 396, + 432, 468, 508, 552, 600, 652, 704, 768 +}; + +static const uint16_t swb_offset_768_16[] = +{ + 0, 8, 16, 24, 32, 40, 48, 56, 64, + 72, 80, 88, 100, 112, 124, 136, 148, 160, + 172, 184, 196, 212, 228, 244, 260, 280, 300, + 320, 344, 368, 396, 424, 456, 492, 532, 572, + 616, 664, 716, 768 +}; + +static const uint16_t swb_offset_768_8[] = +{ + 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, + 120, 132, 144, 156, 172, 188, 204, 220, 236, 252, + 268, 288, 308, 328, 348, 372, 396, 420, 448, 476, + 508, 544, 580, 620, 664, 712, 764, 768 +}; + +static const uint16_t swb_offset_96_96[] = +{ + 0, 4, 8, 12, 16, 20, 24, + 32, 40, 48, 64, 92, 96 +}; + +static const uint16_t swb_offset_96_64[] = +{ + 0, 4, 8, 12, 16, 20, 24, + 32, 40, 48, 64, 92, 96 +}; + +static const uint16_t swb_offset_96_48[] = +{ + 0, 4, 8, 12, 16, 20, 28, + 36, 44, 56, 68, 80, 96 +}; + +static const uint16_t swb_offset_96_24[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, + 36, 44, 52, 64, 76, 92, 96 +}; + +static const uint16_t swb_offset_96_16[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 40, 48, 60, 72, 88, 96 +}; + +static const uint16_t swb_offset_96_8[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, + 36, 44, 52, 60, 72, 88, 96 +}; + const uint16_t * const ff_swb_offset_1024[] = { swb_offset_1024_96, swb_offset_1024_96, swb_offset_1024_64, swb_offset_1024_48, swb_offset_1024_48, swb_offset_1024_32, @@ -1822,6 +1923,14 @@ const uint16_t * const ff_swb_offset_960[] = { swb_offset_960_8 }; +const uint16_t * const ff_swb_offset_768[] = { + swb_offset_768_96, swb_offset_768_96, swb_offset_768_64, + swb_offset_768_48, swb_offset_768_48, swb_offset_768_32, + swb_offset_768_24, swb_offset_768_24, swb_offset_768_16, + swb_offset_768_16, swb_offset_768_16, swb_offset_768_8, + swb_offset_768_8 +}; + const uint16_t * const ff_swb_offset_512[] = { NULL, NULL, NULL, swb_offset_512_48, swb_offset_512_48, swb_offset_512_32, @@ -1856,6 +1965,14 @@ const uint16_t * const ff_swb_offset_120[] = { swb_offset_120_8 }; +const uint16_t * const ff_swb_offset_96[] = { + swb_offset_96_96, swb_offset_96_96, swb_offset_96_96, + swb_offset_96_48, swb_offset_96_48, swb_offset_96_48, + swb_offset_96_24, swb_offset_96_24, swb_offset_96_16, + swb_offset_96_16, swb_offset_96_16, swb_offset_96_8, + swb_offset_96_8 +}; + // @} /* @name ff_tns_max_bands diff --git a/libavcodec/aactab.h b/libavcodec/aactab.h index 9d584ebbe5..481fc57d93 100644 --- a/libavcodec/aactab.h +++ b/libavcodec/aactab.h @@ -74,10 +74,12 @@ void ff_aac_float_common_init(void); */ extern const uint8_t ff_aac_num_swb_1024[]; extern const uint8_t ff_aac_num_swb_960 []; +extern const uint8_t ff_aac_num_swb_768 []; extern const uint8_t ff_aac_num_swb_512 []; extern const uint8_t ff_aac_num_swb_480 []; extern const uint8_t ff_aac_num_swb_128 []; extern const uint8_t ff_aac_num_swb_120 []; +extern const uint8_t ff_aac_num_swb_96 []; // @} extern const uint8_t ff_aac_pred_sfb_max []; @@ -101,10 +103,12 @@ extern const uint16_t ff_aac_ac_cf_m[64][17]; extern const uint16_t * const ff_swb_offset_1024[13]; extern const uint16_t * const ff_swb_offset_960 [13]; +extern const uint16_t * const ff_swb_offset_768 [13]; extern const uint16_t * const ff_swb_offset_512 [13]; extern const uint16_t * const ff_swb_offset_480 [13]; extern const uint16_t * const ff_swb_offset_128 [13]; extern const uint16_t * const ff_swb_offset_120 [13]; +extern const uint16_t * const ff_swb_offset_96 [13]; extern const uint8_t ff_tns_max_bands_1024[13]; extern const uint8_t ff_tns_max_bands_512 [13];