From patchwork Sat May 25 02:28:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 49234 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:542:0:b0:460:55fa:d5ed with SMTP id 63csp2098083vqf; Fri, 24 May 2024 19:29:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXC/C/A7kdrx7fBAHLPjUBORnTT7kBW1Kzh1OekfEXhrZ9YZCzax2YpwgLUJW9NTXabFXoustoXlguaPsVvWT6RUHOo+OpHPD9GLw== X-Google-Smtp-Source: AGHT+IEKojYYIdqDUseQSjZgoACe5StfAY+oVM6H0bILf9Bep39BSevpk0H20uj4io/yvNQI5Eg+ X-Received: by 2002:a05:6512:2106:b0:51d:3b87:70a4 with SMTP id 2adb3069b0e04-5296519a4eamr2119650e87.36.1716604180928; Fri, 24 May 2024 19:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716604180; cv=none; d=google.com; s=arc-20160816; b=b0lStlDCUCr4WO5ynfdnQB849SmFB1giLtoCrDBOs7Ltqy4SnT8e+8FFEWKyaj/mKi +fT2ql1G1FLHAe8rZvg6nRNzDf14CtPzaPxwrUlcBCTpncrAvlV8XZcVNNdpgMszd8sH ZGcjG3xmm0U97hHDDzk9KGWzTBBxuCVUBHKSqYqDOYldRuHsjISRQl8MPmzzcf7y15mQ cb9jHtk7PoffPa//GNmC9tnvl/vh2cVftYxMrn0GWfg1g+txmLSNjUDi170lVSvso5Dl 9GNH8K1yzsT9/NHQX4QUVtPtwVLUwhzzeTe7KkDkir15Ht7mm1LCSGIjrNxz93TeuEGi bUQA== 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=T6C3bKQ2T5dabohm16KenV6R7uXXY/51Xx+JB5MqZLyRZbjXztv4G90Y1blFMPI2N4 0nodyQ9DJeZyQiFZkg2qPasBQSd13W1fWzeX0Bvx6OZKMjwaoM82B7/ntkPN9F5nn4D7 /R05uBWTMGoskm8chdHtLsS3pKSBrkxhT093JSlAJFQO+zqunesyHtudrTxKe8qaJcZU aBLh7j5hIuMcT2W4NdFLKkxi+zEYFUWIJ/qm0KHDkQI0rQMGbUYcsVkYPBmK16wqsay1 B2JyHx7OWyQSBG6O0RvTLLNNlUxBTQPH0L4CVEke486QJ91lKn368ruwu+vnzTIkLum8 8Nqw==; 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 2adb3069b0e04-5299ff0db8asi738250e87.60.2024.05.24.19.29.40; Fri, 24 May 2024 19:29:40 -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 ECF9868D589; Sat, 25 May 2024 05:28: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 3FA0F68D59F for ; Sat, 25 May 2024 05:28:23 +0300 (EEST) To: ffmpeg-devel@ffmpeg.org Date: Sat, 25 May 2024 04:28:01 +0200 Message-ID: <20240525022813.2292001-9-dev@lynne.ee> X-Mailer: git-send-email 2.43.0.381.gb435a96ce8 In-Reply-To: <20240525022813.2292001-1-dev@lynne.ee> References: <20240525022813.2292001-1-dev@lynne.ee> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 08/10] 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: HKoe2mP7+E06 --- 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];