From patchwork Mon Sep 25 17:53:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43896 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp1396682pzh; Mon, 25 Sep 2023 10:52:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqkC63iQij3PD21Fbj32f/qlkLns4OWlFnQdB+LVazdBaog87TopBS/NISlEU/cNwCQsph X-Received: by 2002:aa7:d818:0:b0:530:5308:6e5f with SMTP id v24-20020aa7d818000000b0053053086e5fmr6705057edq.1.1695664343483; Mon, 25 Sep 2023 10:52:23 -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 b2-20020aa7c902000000b00533ec6bc6a2si3642773edt.306.2023.09.25.10.52.22; Mon, 25 Sep 2023 10:52:23 -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="HKqZq79/"; 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 868EB68C97A; Mon, 25 Sep 2023 20:52:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2046.outbound.protection.outlook.com [40.92.89.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 64CDF68C97A for ; Mon, 25 Sep 2023 20:52:11 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eWwnUpxeaN56gRcIrq7kcBOXP7t1jm6lQKstiWF6pCkENcQUPivwJfQ2jW3n257eJFMvDX4OVuWkI7Y1EaNl5+bmlGPRkviH5aqdcntm7mtdFdbBNZzX70vPBnvWGx2pxZ9cyKLhh6DAiZMbWljAVBptSTbqkiLHsxDg3sRdWs5srA0vp3p2Dr4SLUg4O7h/pDbV80xrkZ6BrZsLYoT/RldC/Mf3FzzqNXxW9gWm1R8tEol1Dw7poclfIeGBBtilh8nUmeJmTN578kavFOG9ApIHJX3wilZn6fBMcmm5IgGfAntXN1lavTmTdsxexSjgjrxn911wLGVmwSjEl66EoQ== 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=gfsVnCj/VPwwht37LJkTQN7PPRZBmMSxr1ALea5Zsmw=; b=Bp+8ZCZi6xPsKHB3qc2nvscWc/0RN3A4y3+VEfZk6NOdn435gvaP9dyrudoVuIZqJjrcP7dicxhL11aU1wNCsLyoSFrerryUKr+1XCRdjCVgPKFcaTNzPe+IN5645dyKA7CemK3RZTcro9IjvaV2FX+DcG6Po/P7ircgAs8vZkkFHkT7p7z283SBUk5Bakrfu0BHvfSqema+0u4TdO9/1iJIIYuJhTcbS5kBDxis93XXwcHBi/2SKMrXC8o/WImTAvnB9Q1sZweaob5I2D1SlPjgXJvOuxQSfniF+3kxIfM1lhT8XQDXjrQeDYm26fhp1XrDeoMzUkf6N6T0+lImyQ== 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=gfsVnCj/VPwwht37LJkTQN7PPRZBmMSxr1ALea5Zsmw=; b=HKqZq79/xAXD+5f9f+BzeAlyX7Gcb3bbW1w3PWuSMjYXAK4iDdeWRhUm5JVdLDPduqhidKXs/UR90tMd8jaO+gjij/E1+Glmo2zJD4q0Nnw2xrWLMN8XRC35IP6/s1eHtCTqx/gMXCCMMElg9hS9atVn02z/Z7EtqQnMBUiATNGAK3i3FtfrQ59QUve4C+va34p+kZQOckqHdRgkRambKgOfbOAtjloRCDwM6SpHw1BWKB6mikpNa4AvWt2/m+m8OvUNfb3nphN1ML2dZtM0r5YldOml34CNyMaIfIn20s2s0ZSq80QkySLtNblBicJxszNVRkaNkC3BORNoWPi+qg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0128.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:271::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 17:52:09 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Mon, 25 Sep 2023 17:52:08 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Sep 2023 19:53:08 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [gN1vFWlncfa8PJvXs305v5LxMI2h21gf] X-ClientProxiedBy: ZR0P278CA0207.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:6a::10) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230925175316.2059732-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0128:EE_ X-MS-Office365-Filtering-Correlation-Id: ed8521da-8c9b-446f-c2e7-08dbbdf02361 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9jOiSqdOGMuyCKyVulwH4y1NX39MAeRSoOHWIG/tE3+cxOLdvHI+Gq8yZ8E1wZeS4c5FLLt8PnDhmv4qFDmhthAhAfsxLrX1ZvDMxMrxIL/mFNyO1TyRKU9IXyWEMTmfTPSJdo0K6BDqwaPyI1Oc+btnmO9hUQD/g/j2hjUkvBUvLqHPyZWJyu4xGOqQD+tJN1fDs3sAPQ7T86D4okl/54crPhtHIAqokocD9fThlp6z7wupDShfJ6yscl9djyoEsDodEUnx66cDxJ5BUgKIJXX7LxSe/yEEPwtKlYvYgmwTPRAhiXAl/azDl2frSZP6FccKwChK+XIBpuVLkuzzf6Mt29mPwb6fZCr8nNLy7i4KJMxOk651yv2JQIZ97YVK6Bt+wUfSj46pcBoPBNU6movxKBUHKN+Mu+8SV9KWDTyU0aHMrHIYBQHBekGkmj8cBykaPw4yPSolp+Y1cdcYowBcxT5nPLkONpfYRxyeZplwcSVOH8/tVO5eeFDK9eklM7nzKSsulTtl55CCM5vQjr0HRi8R3kAwYiBStpJxkAnxjob5PxJvLmVcgwY/ADH85oQvnXzNmZN7Kqogb8nWYu8ufPymwPl+IuLIpyhUzMBI4R63QpMKeeaGhsy+8SAh X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lme380syM4Oy2fAlXPprZvt/eN4IhqCd6sVBPNT21YdO3I3734P1jiJK/9P1DFIfwFZwKBvC6/B66qjcJr2HAwB4sbGkxNTexRk/W7jAL9JbVdSrTKz1LI2YRZdqRZ43Edm/EC+sQd1y26TUVX6SOfvyblsXctb8YLnxgCvsGR9HGB0VpP6rLW5CXkDo1JOlVJPxD0fj88nDN1ouWRoBmrWCtaSdqU3W9pOTNAkakeOYjh4MqtC+iuakq/5JqlI7MRa30/ChpwfPXLFRsUkTk+c0SiHeRNOI+Uu3UmpKugvdQuSd//P++g3BYXam6+cDf3KhCd8F/Wkyhvhz1oC1JKiqp/WUlhbwXtWeRqj2lB6+FWym/X5of8zuKME1ytpgaasP4vfuvfcBIsTAQeTRKOgcR5DIDZiAq5vN59ibu7IdlrX9ACr1jPNJjQMWls3cEHX3StzaxVc7+JOMj/oID6TPtUH91xuKsG46mn/acY4JbLMXvmgOc6dPIoVTVe9hnAiaf+V1xSN3bx8JTLIB52cyVHCvEw7YERHhDOlGzlcoXmMqtoK5rYLm7qPPFZLA5EjGObTEQT21xfsXkZlU0OWReRw2R3biiLDnA4pvJ/JHnq0gYdbN3r/zHfXyLTRvlaqLN/WrkEMyzZP1pTKhFNHT1jTndQEp97/gT+CbSEuAuCfNmlbkWgIAjfFNubihhG496Nghlb1MsiS2DVT13RPOWtJFpeZLARj5qAWizT4/9SfiMZwsbaLIf4K8BO2g9LrD7wTImriTgbzi+rGsQHcsIJvm8mqZMUdb1L2TdIrudRdOyO4P9vanGZyS5ZQqH+eX5Lg4/8U2R4MpxLqaf1vSkKP7SnJvMXKRJKS076AJ1NuxzdZusC2mfbLjo/2qGJYvjq7jYK3IG0J0oVzUPNoqZITWcT0Bp4cTId9jr9H6CVTszeaPOSsjEyuoYpxTIFO8b11xdJfCpujx/mUSJyaTLf+2usANIBhXYG6lXbRgvBuNGK8Z0BvOudzaibW3qY6KgpBALSkYMANvkpX7h3ClUj3OVplSfSuTzIOAqGe+zmI0u1ySx4aQqCyPHQWp4dS4wegIJ0ndmazPAR+5ZbOwUpF9K6avtmQx94xQorV68FdfLoXYx/45UDjyKgbZP2I1K4qxlAogz9UY48EbvhJFa01Ws0cP7mtTk6jkItCilXELQQN2SO5AQCUl7EGCkww9xnBPvLSLK5w7Ii8KZNYPKwts7gkP6fo75W7ruFGI5hLMc+cx/rKhIirE1/u9 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed8521da-8c9b-446f-c2e7-08dbbdf02361 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 17:52:08.9039 (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: DU2P250MB0128 Subject: [FFmpeg-devel] [PATCH 1/9] avfilter/bwdif: Add proper BWDIFDSPContext 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: afP12GaIs+Da This already avoids unnecessary indirectly included headers in the arch-specific vf_bwdif_init.c files; it is also in preparation for splitting the actual functions out of vf_bwdif.c. Signed-off-by: Andreas Rheinhardt --- libavfilter/aarch64/vf_bwdif_init_aarch64.c | 4 ++-- libavfilter/{bwdif.h => bwdifdsp.h} | 22 +++++++------------- libavfilter/vf_bwdif.c | 23 ++++++++++++++------- libavfilter/x86/vf_bwdif_init.c | 4 ++-- tests/checkasm/vf_bwdif.c | 5 ++--- 5 files changed, 29 insertions(+), 29 deletions(-) rename libavfilter/{bwdif.h => bwdifdsp.h} (85%) diff --git a/libavfilter/aarch64/vf_bwdif_init_aarch64.c b/libavfilter/aarch64/vf_bwdif_init_aarch64.c index f52bc4b9b4..2b8d212de6 100644 --- a/libavfilter/aarch64/vf_bwdif_init_aarch64.c +++ b/libavfilter/aarch64/vf_bwdif_init_aarch64.c @@ -21,7 +21,7 @@ */ #include "libavutil/common.h" -#include "libavfilter/bwdif.h" +#include "libavfilter/bwdifdsp.h" #include "libavutil/aarch64/cpu.h" void ff_bwdif_filter_edge_neon(void *dst1, void *prev1, void *cur1, void *next1, @@ -107,7 +107,7 @@ static void filter_intra_helper(void *dst1, void *cur1, int w, int prefs, int mr } void -ff_bwdif_init_aarch64(BWDIFContext *s, int bit_depth) +ff_bwdif_init_aarch64(BWDIFDSPContext *s, int bit_depth) { const int cpu_flags = av_get_cpu_flags(); diff --git a/libavfilter/bwdif.h b/libavfilter/bwdifdsp.h similarity index 85% rename from libavfilter/bwdif.h rename to libavfilter/bwdifdsp.h index 496cec72ef..1ff810719f 100644 --- a/libavfilter/bwdif.h +++ b/libavfilter/bwdifdsp.h @@ -16,16 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVFILTER_BWDIF_H -#define AVFILTER_BWDIF_H - -#include "libavutil/pixdesc.h" -#include "avfilter.h" -#include "yadif.h" - -typedef struct BWDIFContext { - YADIFContext yadif; +#ifndef AVFILTER_BWDIFDSP_H +#define AVFILTER_BWDIFDSP_H +typedef struct BWDIFDSPContext { void (*filter_intra)(void *dst1, void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max); void (*filter_line)(void *dst, void *prev, void *cur, void *next, @@ -38,11 +32,11 @@ typedef struct BWDIFContext { void (*filter_line3)(void *dst, int dstride, const void *prev, const void *cur, const void *next, int prefs, int w, int parity, int clip_max); -} BWDIFContext; +} BWDIFDSPContext; -void ff_bwdif_init_filter_line(BWDIFContext *bwdif, int bit_depth); -void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth); -void ff_bwdif_init_aarch64(BWDIFContext *bwdif, int bit_depth); +void ff_bwdif_init_filter_line(BWDIFDSPContext *bwdif, int bit_depth); +void ff_bwdif_init_x86(BWDIFDSPContext *bwdif, int bit_depth); +void ff_bwdif_init_aarch64(BWDIFDSPContext *bwdif, int bit_depth); void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, @@ -60,4 +54,4 @@ void ff_bwdif_filter_line3_c(void * dst1, int d_stride, const void * prev1, const void * cur1, const void * next1, int s_stride, int w, int parity, int clip_max); -#endif /* AVFILTER_BWDIF_H */ +#endif /* AVFILTER_BWDIFDSP_H */ diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c index 6195e6cb64..282aef5698 100644 --- a/libavfilter/vf_bwdif.c +++ b/libavfilter/vf_bwdif.c @@ -32,8 +32,10 @@ #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "avfilter.h" +#include "bwdifdsp.h" +#include "ccfifo.h" #include "internal.h" -#include "bwdif.h" +#include "yadif.h" /* * Filter coefficients coef_lf and coef_hf taken from BBC PH-2071 (Weston 3 Field Deinterlacer). @@ -45,6 +47,11 @@ static const uint16_t coef_lf[2] = { 4309, 213 }; static const uint16_t coef_hf[3] = { 5570, 3801, 1016 }; static const uint16_t coef_sp[2] = { 5077, 981 }; +typedef struct BWDIFContext { + YADIFContext yadif; + BWDIFDSPContext dsp; +} BWDIFContext; + typedef struct ThreadData { AVFrame *frame; int plane; @@ -261,25 +268,25 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) uint8_t *next = &yadif->next->data[td->plane][y * linesize]; uint8_t *dst = &td->frame->data[td->plane][y * td->frame->linesize[td->plane]]; if (yadif->current_field == YADIF_FIELD_END) { - s->filter_intra(dst, cur, td->w, (y + df) < td->h ? refs : -refs, + s->dsp.filter_intra(dst, cur, td->w, (y + df) < td->h ? refs : -refs, y > (df - 1) ? -refs : refs, (y + 3*df) < td->h ? 3 * refs : -refs, y > (3*df - 1) ? -3 * refs : refs, td->parity ^ td->tff, clip_max); } else if ((y < 4) || ((y + 5) > td->h)) { - s->filter_edge(dst, prev, cur, next, td->w, + s->dsp.filter_edge(dst, prev, cur, next, td->w, (y + df) < td->h ? refs : -refs, y > (df - 1) ? -refs : refs, refs << 1, -(refs << 1), td->parity ^ td->tff, clip_max, (y < 2) || ((y + 3) > td->h) ? 0 : 1); - } else if (s->filter_line3 && y + 2 < slice_end && y + 6 < td->h) { - s->filter_line3(dst, td->frame->linesize[td->plane], + } else if (s->dsp.filter_line3 && y + 2 < slice_end && y + 6 < td->h) { + s->dsp.filter_line3(dst, td->frame->linesize[td->plane], prev, cur, next, linesize, td->w, td->parity ^ td->tff, clip_max); y += 2; } else { - s->filter_line(dst, prev, cur, next, td->w, + s->dsp.filter_line(dst, prev, cur, next, td->w, refs, -refs, refs << 1, -(refs << 1), 3 * refs, -3 * refs, refs << 2, -(refs << 2), td->parity ^ td->tff, clip_max); @@ -382,12 +389,12 @@ static int config_props(AVFilterLink *link) yadif->csp = av_pix_fmt_desc_get(link->format); yadif->filter = filter; - ff_bwdif_init_filter_line(s, yadif->csp->comp[0].depth); + ff_bwdif_init_filter_line(&s->dsp, yadif->csp->comp[0].depth); return 0; } -av_cold void ff_bwdif_init_filter_line(BWDIFContext *s, int bit_depth) +av_cold void ff_bwdif_init_filter_line(BWDIFDSPContext *s, int bit_depth) { s->filter_line3 = 0; if (bit_depth > 8) { diff --git a/libavfilter/x86/vf_bwdif_init.c b/libavfilter/x86/vf_bwdif_init.c index 57f908a8ef..b1d1d6a91c 100644 --- a/libavfilter/x86/vf_bwdif_init.c +++ b/libavfilter/x86/vf_bwdif_init.c @@ -22,7 +22,7 @@ #include "libavutil/cpu.h" #include "libavutil/x86/asm.h" #include "libavutil/x86/cpu.h" -#include "libavfilter/bwdif.h" +#include "libavfilter/bwdifdsp.h" void ff_bwdif_filter_line_sse2(void *dst, void *prev, void *cur, void *next, int w, int prefs, int mrefs, int prefs2, @@ -50,7 +50,7 @@ void ff_bwdif_filter_line_12bit_avx2(void *dst, void *prev, void *cur, void *nex int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); -av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth) +av_cold void ff_bwdif_init_x86(BWDIFDSPContext *bwdif, int bit_depth) { int cpu_flags = av_get_cpu_flags(); diff --git a/tests/checkasm/vf_bwdif.c b/tests/checkasm/vf_bwdif.c index 3399cacdf7..fae61b62e4 100644 --- a/tests/checkasm/vf_bwdif.c +++ b/tests/checkasm/vf_bwdif.c @@ -18,8 +18,7 @@ #include #include "checkasm.h" -#include "libavcodec/internal.h" -#include "libavfilter/bwdif.h" +#include "libavfilter/bwdifdsp.h" #include "libavutil/mem_internal.h" #define WIDTH 256 @@ -72,7 +71,7 @@ void checkasm_check_vf_bwdif(void) { - BWDIFContext ctx_8, ctx_10; + BWDIFDSPContext ctx_8, ctx_10; ff_bwdif_init_filter_line(&ctx_8, 8); ff_bwdif_init_filter_line(&ctx_10, 10); From patchwork Mon Sep 25 18:04:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43897 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp1403229pzh; Mon, 25 Sep 2023 11:04:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF1/gwuxsgdhSo9feelFNYaSMUBb0QYwSuTS3e4MBjPUKTDclz1Qw/8JSA1jy9P1hmazo6u X-Received: by 2002:adf:fd4a:0:b0:317:7af4:5294 with SMTP id h10-20020adffd4a000000b003177af45294mr6116781wrs.44.1695665041235; Mon, 25 Sep 2023 11:04:01 -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 c4-20020a1709060fc400b00988a6f59292si8642945ejk.600.2023.09.25.11.04.00; Mon, 25 Sep 2023 11:04:01 -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=N9sOyGiM; 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 1FC8168C9B8; Mon, 25 Sep 2023 21:03:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2103.outbound.protection.outlook.com [40.92.91.103]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9084468C620 for ; Mon, 25 Sep 2023 21:03:50 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KgHu5yAX2vh9VHZOCl89dZYiU2/x3k2+dVoERSqvp1VueeORtprz3w+jTCsVFNoXAwLbAyTDWzLyyQ67whz9SGNnhWNHgO2y/WlzKo8pc1OdQi6oHZmEtyj6NrxHMploWK7cJDhPUfMtD38DIGg+T9KYouOpP7elx5bJNhz6HBhmefgB3AY+IdQlkhw9MlvVZLDwi03iBCM0rLskJ+u9eHcrY9c5Fd6+ji25dwSpLfksqI9DaDO3XcxaYx4Xz+TA3oRt4ZUigtsVqUOfvf50rMjMEJM/LimQdhr8CeNNsCopJAyayzl5OElvyPzEZZB6582vO18S18LZ4NiiQoiwHg== 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=YtZzU5TMXCjZ+HbDFIm+LXj3UmC8pDBm+t4iqxkGHXk=; b=XrY2xQIlwoeTbJ6Ex/YvboHo3dOgR4AsTPII9ejw+Z+AdKtf8J/JrgNzcde21u/WSxpR12Sv+3SuT1fsTzUHt/gjCIfe/SAO6ajeP+NF7DyyLXiYFbmKCh6w19pESnj3UOz7FpVIB/Me/0J/sMjSUVK+3+BASNSrbwemAUfG3VX+K4Pn3O9yeJJAePa4xB2SLAkdg3Q28TBSvFUN+7rv1618DJKKAJRCtxToXG/ENrzAdV8wOYBJC1Ovkr4JVz2IxzStcCz6DXJNx8SN7czNEtdgFOzoCOcJ3U8HN+pz+sIA61WBZW6lVFwRG3awwaQGX5UJyWuneGdD1oRNEQPwAw== 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=YtZzU5TMXCjZ+HbDFIm+LXj3UmC8pDBm+t4iqxkGHXk=; b=N9sOyGiMt8Uysd9u/isPZsabIaFMs83lqHs2ja0tCSbHxQ2BAvmXhjB4w1+J3chV7w1YLeO4/IfAPIEm0mSAipr6bOVlyjPMvli2x9ixJPw5c4KZfzWAoPtVLgJOogC8CEr6wgE35rerF2gvjdrY84l7TDLdkOcljOu7i4vMOtziBY0sr/IehFVh5z3OUa/E7bgsSeMoivo22BN9xX3EIsBVjNIQoa/+1L4aBb/y40lOM7kz+ayk077bMpQTqeihFVm0dZpBdjd/uEY+U/Ag5LfNqRVjUaV8YmZRj1urDFLWpQCjppVn56m/waXqUal1b5qEiUyF3YRvBu8+eK2+tQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0290.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 18:03:48 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Mon, 25 Sep 2023 18:03:48 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Sep 2023 20:04:50 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Hcj7EOifJ4Z8VscCG0kvxz02Va6/SBDa] X-ClientProxiedBy: ZR0P278CA0083.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::16) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230925180457.2060101-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0290:EE_ X-MS-Office365-Filtering-Correlation-Id: a89c1ede-7938-48b2-43dd-08dbbdf1c476 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pCXUIP3YnnPme+e369kQbN22djf5rBiCPJN53sK2imS8s4B9Md4kaaOBATj4g7Zfyuh6apSsWSq8HNAAtv7ymSIVBAWzeBwIEHp7FOBal4fKc+Xb8Ld++9krTIrFL1IdlS9r39c8aC/0C32WuQrkx2+NdInMQHz5ocklDBQf9Jilg0iJG3bVsHthuU0G/NFKWh76/H3KSSLyrtQEhIlApzKn+ZvkLRZLLRyqCwvCJQ2nWiG5o0WTYrIxG1Ok9f9iXmAOtgbOBOwLt+TKhOm3N2BzcLoooaUpviwN3vAwBAjpY2QtJT7+Q/t04QPdo8zN+fGLKnoGWRP5EX1E3BfJ/wbV5sacoQGKST5LiibS4uqIUuGuI5MyLt+1fIQ7BNjqBsi3FbfGnJ0u80NJDW5eOMRpQOg0CGrz8h5k9NIivk5laH2hSs3z/FUe7VQQMmAS+52Fy793FiQ0C/8IYleEHii4Gi7TntJ4RlQ36Ja5TkJ6R7AM/TLOVjV3IRfCWxmYJLZyRI0T6DHo9zCXsgPhrOseHjraGiLXSFpR6RaxoUXZnElqmdffjk6Ab/vdq6Zlfof6rM60Jxb7nrMIi5bIlvur2AuB4sU7zInnj7mJR7ZgWwXdINmYicPq0nrejx72 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dCfu4ZyeyNDhMqwxngD7jjewVgmNZTmh9nnTm8aePjJ+VIAdV1hH0sQuTdau4uqf53VW+GT5MNuYxM3+hAk0GXFD5vKWbNidDfDz/qBkE9byfLISPk7a2ex/XePaNHvQcWBK/gcwWhTrTtV2FNI3bwha2Gxbv7HDBBryhoJbiemwqeO2PXp/LtM88p/7gXMUMWyOTktTUkGdaByrr3iavPpW/kl3/PptV32qIjO5uQRaEAkN1/gL3U8hIpP/LjrUYGDYO0CMx5n9hONWQ+eWLmZbE9FIi2iQ4LY4ULtI6AIouPJGBb3+SVxIZO8XEN5O2EhSVaF1jTosq6SmJbIOo27mrGEK3ZvrE+LR4xbegXhlqcwsOPc2GAjU793B0+pADIGzd4+yz7/6RkImP4csMZzb/Za/4pQsOiN6HoIkdylguiSSa7wsxKRzmlA6UwEg4GTt+fYmAe2KG+GPodfv+48iXZV3f+PxIC14aQRUAvq35lEmZwmaEWJv98JnxT6bwUhwY5m8Fquh+DCOdXSsDr6sLvIbUjnQ0se/rp9++mZLdVzhc4ueeFu9pzlKzOPKH8WNsHE5MR+RF5b7G87h6QIL0G/jd8IDEA3S75LucPrx3HnnOOt1dMrrdNDUg+5D0ylXCYVXoToqb2X9WA/1WcWVwhgr5divr/DOXsJVuVqc4uaHDobUEyynZZoV4Vn5FfPGLcn05BrzLXf0+fvdVdpSr9FjKweUZWSfprKNRPjhMGlm3RbOgJAKVDGhyYvemwzdEPXS4JdD8yR+ZoV2LC2JaXre5grjgBAMRHpU/4O75dRPnvDs7VcxCRYdoUqBqJV7oJE/5JxD7N8QFfPQm/gNuWO6OhSxpf9PG4W+nBty52+BF7wnoN6kp2LMHRoBIhxs08encXL/Px8bIvr7O+PIJFUTssn4BoQMhAs2r/HYaC4oAr96FR2FLqqyP4bXNu/F+ZrwuR2HCDilZsmt0qfTbW7LKvOIhhcsZLp8XKu5sUGBK9RE6MP67T738WrLAnWSJFNGSu+SZFxrLIodmhUDB679ujwME3n/tWoT2S6o3GBpMTadN0/eQ7oalcsA31fgL9acx2GotJ+Y2pr/0SXcCPh6DjpaOi3A6ETQjILGiC+7E3iA3EEN/cjBLNVfJDLINWmhVcd8CXbotqm5A6fUJagvOZulWAOhswFXCDORy9eSXgDlLIem7OAPThdZ8cn0MO8No1GXKm2cj805eSPVWHAsOxjwlhwcgtE88U1+lmMgmTDuIyTok8sw+lmD X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a89c1ede-7938-48b2-43dd-08dbbdf1c476 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 18:03:48.6810 (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: PR3P250MB0290 Subject: [FFmpeg-devel] [PATCH 2/9] avfilter/vf_bwdif: Move DSP code to a new file 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: q1akszTLHs1x Otherwise checkasm/vf_bwdif.c pulls in vf_bwdif.c and then all of libavfilter. Besides being bad size-wise this also has the downside that it pulls in avpriv_(cga|vga16)_font from libavutil which are marked as being imported from another library when building libavfilter as a DLL and this breaks checkasm because it links both lavfi and lavu statically. Signed-off-by: Andreas Rheinhardt --- libavfilter/Makefile | 2 +- libavfilter/bwdifdsp.c | 251 +++++++++++++++++++++++++++++++++++++++++ libavfilter/vf_bwdif.c | 211 ---------------------------------- 3 files changed, 252 insertions(+), 212 deletions(-) create mode 100644 libavfilter/bwdifdsp.c diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 2fe0033b21..d063dc65fc 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -214,7 +214,7 @@ OBJS-$(CONFIG_BM3D_FILTER) += vf_bm3d.o framesync.o OBJS-$(CONFIG_BOXBLUR_FILTER) += vf_boxblur.o boxblur.o OBJS-$(CONFIG_BOXBLUR_OPENCL_FILTER) += vf_avgblur_opencl.o opencl.o \ opencl/avgblur.o boxblur.o -OBJS-$(CONFIG_BWDIF_FILTER) += vf_bwdif.o yadif_common.o +OBJS-$(CONFIG_BWDIF_FILTER) += vf_bwdif.o bwdifdsp.o yadif_common.o OBJS-$(CONFIG_BWDIF_CUDA_FILTER) += vf_bwdif_cuda.o vf_bwdif_cuda.ptx.o \ yadif_common.o OBJS-$(CONFIG_BWDIF_VULKAN_FILTER) += vf_bwdif_vulkan.o yadif_common.o vulkan.o vulkan_filter.o diff --git a/libavfilter/bwdifdsp.c b/libavfilter/bwdifdsp.c new file mode 100644 index 0000000000..af217481a5 --- /dev/null +++ b/libavfilter/bwdifdsp.c @@ -0,0 +1,251 @@ +/* + * BobWeaver Deinterlacing Filter DSP functions + * Copyright (C) 2016 Thomas Mundt + * + * Based on YADIF (Yet Another Deinterlacing Filter) + * Copyright (C) 2006-2011 Michael Niedermayer + * 2010 James Darnley + * + * With use of Weston 3 Field Deinterlacing Filter algorithm + * Copyright (C) 2012 British Broadcasting Corporation, All Rights Reserved + * Author of de-interlace algorithm: Jim Easterbrook for BBC R&D + * Based on the process described by Martin Weston for BBC R&D + * + * 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 +#include + +#include "config.h" + +#include "bwdifdsp.h" +#include "libavutil/attributes.h" +#include "libavutil/common.h" +#include "libavutil/macros.h" + +/* + * Filter coefficients coef_lf and coef_hf taken from BBC PH-2071 (Weston 3 Field Deinterlacer). + * Used when there is spatial and temporal interpolation. + * Filter coefficients coef_sp are used when there is spatial interpolation only. + * Adjusted for matching visual sharpness impression of spatial and temporal interpolation. + */ +static const uint16_t coef_lf[2] = { 4309, 213 }; +static const uint16_t coef_hf[3] = { 5570, 3801, 1016 }; +static const uint16_t coef_sp[2] = { 5077, 981 }; + + +#define FILTER_INTRA() \ + for (x = 0; x < w; x++) { \ + interpol = (coef_sp[0] * (cur[mrefs] + cur[prefs]) - coef_sp[1] * (cur[mrefs3] + cur[prefs3])) >> 13; \ + dst[0] = av_clip(interpol, 0, clip_max); \ + \ + dst++; \ + cur++; \ + } + +#define FILTER1() \ + for (x = 0; x < w; x++) { \ + int c = cur[mrefs]; \ + int d = (prev2[0] + next2[0]) >> 1; \ + int e = cur[prefs]; \ + int temporal_diff0 = FFABS(prev2[0] - next2[0]); \ + int temporal_diff1 =(FFABS(prev[mrefs] - c) + FFABS(prev[prefs] - e)) >> 1; \ + int temporal_diff2 =(FFABS(next[mrefs] - c) + FFABS(next[prefs] - e)) >> 1; \ + int diff = FFMAX3(temporal_diff0 >> 1, temporal_diff1, temporal_diff2); \ + \ + if (!diff) { \ + dst[0] = d; \ + } else { + +#define SPAT_CHECK() \ + int b = ((prev2[mrefs2] + next2[mrefs2]) >> 1) - c; \ + int f = ((prev2[prefs2] + next2[prefs2]) >> 1) - e; \ + int dc = d - c; \ + int de = d - e; \ + int max = FFMAX3(de, dc, FFMIN(b, f)); \ + int min = FFMIN3(de, dc, FFMAX(b, f)); \ + diff = FFMAX3(diff, min, -max); + +#define FILTER_LINE() \ + SPAT_CHECK() \ + if (FFABS(c - e) > temporal_diff0) { \ + interpol = (((coef_hf[0] * (prev2[0] + next2[0]) \ + - coef_hf[1] * (prev2[mrefs2] + next2[mrefs2] + prev2[prefs2] + next2[prefs2]) \ + + coef_hf[2] * (prev2[mrefs4] + next2[mrefs4] + prev2[prefs4] + next2[prefs4])) >> 2) \ + + coef_lf[0] * (c + e) - coef_lf[1] * (cur[mrefs3] + cur[prefs3])) >> 13; \ + } else { \ + interpol = (coef_sp[0] * (c + e) - coef_sp[1] * (cur[mrefs3] + cur[prefs3])) >> 13; \ + } + +#define FILTER_EDGE() \ + if (spat) { \ + SPAT_CHECK() \ + } \ + interpol = (c + e) >> 1; + +#define FILTER2() \ + if (interpol > d + diff) \ + interpol = d + diff; \ + else if (interpol < d - diff) \ + interpol = d - diff; \ + \ + dst[0] = av_clip(interpol, 0, clip_max); \ + } \ + \ + dst++; \ + cur++; \ + prev++; \ + next++; \ + prev2++; \ + next2++; \ + } + +void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs, + int prefs3, int mrefs3, int parity, int clip_max) +{ + uint8_t *dst = dst1; + uint8_t *cur = cur1; + int interpol, x; + + FILTER_INTRA() +} + +void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1, + int w, int prefs, int mrefs, int prefs2, int mrefs2, + int prefs3, int mrefs3, int prefs4, int mrefs4, + int parity, int clip_max) +{ + uint8_t *dst = dst1; + uint8_t *prev = prev1; + uint8_t *cur = cur1; + uint8_t *next = next1; + uint8_t *prev2 = parity ? prev : cur ; + uint8_t *next2 = parity ? cur : next; + int interpol, x; + + FILTER1() + FILTER_LINE() + FILTER2() +} + +#define NEXT_LINE()\ + dst += d_stride; \ + prev += prefs; \ + cur += prefs; \ + next += prefs; + +void ff_bwdif_filter_line3_c(void * dst1, int d_stride, + const void * prev1, const void * cur1, const void * next1, int s_stride, + int w, int parity, int clip_max) +{ + const int prefs = s_stride; + uint8_t * dst = dst1; + const uint8_t * prev = prev1; + const uint8_t * cur = cur1; + const uint8_t * next = next1; + + ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, + prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); + NEXT_LINE(); + memcpy(dst, cur, w); + NEXT_LINE(); + ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, + prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); +} + +void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, + int w, int prefs, int mrefs, int prefs2, int mrefs2, + int parity, int clip_max, int spat) +{ + uint8_t *dst = dst1; + uint8_t *prev = prev1; + uint8_t *cur = cur1; + uint8_t *next = next1; + uint8_t *prev2 = parity ? prev : cur ; + uint8_t *next2 = parity ? cur : next; + int interpol, x; + + FILTER1() + FILTER_EDGE() + FILTER2() +} + +static void filter_intra_16bit(void *dst1, void *cur1, int w, int prefs, int mrefs, + int prefs3, int mrefs3, int parity, int clip_max) +{ + uint16_t *dst = dst1; + uint16_t *cur = cur1; + int interpol, x; + + FILTER_INTRA() +} + +static void filter_line_c_16bit(void *dst1, void *prev1, void *cur1, void *next1, + int w, int prefs, int mrefs, int prefs2, int mrefs2, + int prefs3, int mrefs3, int prefs4, int mrefs4, + int parity, int clip_max) +{ + uint16_t *dst = dst1; + uint16_t *prev = prev1; + uint16_t *cur = cur1; + uint16_t *next = next1; + uint16_t *prev2 = parity ? prev : cur ; + uint16_t *next2 = parity ? cur : next; + int interpol, x; + + FILTER1() + FILTER_LINE() + FILTER2() +} + +static void filter_edge_16bit(void *dst1, void *prev1, void *cur1, void *next1, + int w, int prefs, int mrefs, int prefs2, int mrefs2, + int parity, int clip_max, int spat) +{ + uint16_t *dst = dst1; + uint16_t *prev = prev1; + uint16_t *cur = cur1; + uint16_t *next = next1; + uint16_t *prev2 = parity ? prev : cur ; + uint16_t *next2 = parity ? cur : next; + int interpol, x; + + FILTER1() + FILTER_EDGE() + FILTER2() +} + +av_cold void ff_bwdif_init_filter_line(BWDIFDSPContext *s, int bit_depth) +{ + s->filter_line3 = 0; + if (bit_depth > 8) { + s->filter_intra = filter_intra_16bit; + s->filter_line = filter_line_c_16bit; + s->filter_edge = filter_edge_16bit; + } else { + s->filter_intra = ff_bwdif_filter_intra_c; + s->filter_line = ff_bwdif_filter_line_c; + s->filter_edge = ff_bwdif_filter_edge_c; + } + +#if ARCH_X86 + ff_bwdif_init_x86(s, bit_depth); +#elif ARCH_AARCH64 + ff_bwdif_init_aarch64(s, bit_depth); +#endif +} diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c index 282aef5698..137cd5ef13 100644 --- a/libavfilter/vf_bwdif.c +++ b/libavfilter/vf_bwdif.c @@ -37,16 +37,6 @@ #include "internal.h" #include "yadif.h" -/* - * Filter coefficients coef_lf and coef_hf taken from BBC PH-2071 (Weston 3 Field Deinterlacer). - * Used when there is spatial and temporal interpolation. - * Filter coefficients coef_sp are used when there is spatial interpolation only. - * Adjusted for matching visual sharpness impression of spatial and temporal interpolation. - */ -static const uint16_t coef_lf[2] = { 4309, 213 }; -static const uint16_t coef_hf[3] = { 5570, 3801, 1016 }; -static const uint16_t coef_sp[2] = { 5077, 981 }; - typedef struct BWDIFContext { YADIFContext yadif; BWDIFDSPContext dsp; @@ -60,187 +50,6 @@ typedef struct ThreadData { int tff; } ThreadData; -#define FILTER_INTRA() \ - for (x = 0; x < w; x++) { \ - interpol = (coef_sp[0] * (cur[mrefs] + cur[prefs]) - coef_sp[1] * (cur[mrefs3] + cur[prefs3])) >> 13; \ - dst[0] = av_clip(interpol, 0, clip_max); \ - \ - dst++; \ - cur++; \ - } - -#define FILTER1() \ - for (x = 0; x < w; x++) { \ - int c = cur[mrefs]; \ - int d = (prev2[0] + next2[0]) >> 1; \ - int e = cur[prefs]; \ - int temporal_diff0 = FFABS(prev2[0] - next2[0]); \ - int temporal_diff1 =(FFABS(prev[mrefs] - c) + FFABS(prev[prefs] - e)) >> 1; \ - int temporal_diff2 =(FFABS(next[mrefs] - c) + FFABS(next[prefs] - e)) >> 1; \ - int diff = FFMAX3(temporal_diff0 >> 1, temporal_diff1, temporal_diff2); \ - \ - if (!diff) { \ - dst[0] = d; \ - } else { - -#define SPAT_CHECK() \ - int b = ((prev2[mrefs2] + next2[mrefs2]) >> 1) - c; \ - int f = ((prev2[prefs2] + next2[prefs2]) >> 1) - e; \ - int dc = d - c; \ - int de = d - e; \ - int max = FFMAX3(de, dc, FFMIN(b, f)); \ - int min = FFMIN3(de, dc, FFMAX(b, f)); \ - diff = FFMAX3(diff, min, -max); - -#define FILTER_LINE() \ - SPAT_CHECK() \ - if (FFABS(c - e) > temporal_diff0) { \ - interpol = (((coef_hf[0] * (prev2[0] + next2[0]) \ - - coef_hf[1] * (prev2[mrefs2] + next2[mrefs2] + prev2[prefs2] + next2[prefs2]) \ - + coef_hf[2] * (prev2[mrefs4] + next2[mrefs4] + prev2[prefs4] + next2[prefs4])) >> 2) \ - + coef_lf[0] * (c + e) - coef_lf[1] * (cur[mrefs3] + cur[prefs3])) >> 13; \ - } else { \ - interpol = (coef_sp[0] * (c + e) - coef_sp[1] * (cur[mrefs3] + cur[prefs3])) >> 13; \ - } - -#define FILTER_EDGE() \ - if (spat) { \ - SPAT_CHECK() \ - } \ - interpol = (c + e) >> 1; - -#define FILTER2() \ - if (interpol > d + diff) \ - interpol = d + diff; \ - else if (interpol < d - diff) \ - interpol = d - diff; \ - \ - dst[0] = av_clip(interpol, 0, clip_max); \ - } \ - \ - dst++; \ - cur++; \ - prev++; \ - next++; \ - prev2++; \ - next2++; \ - } - -void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs, - int prefs3, int mrefs3, int parity, int clip_max) -{ - uint8_t *dst = dst1; - uint8_t *cur = cur1; - int interpol, x; - - FILTER_INTRA() -} - -void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1, - int w, int prefs, int mrefs, int prefs2, int mrefs2, - int prefs3, int mrefs3, int prefs4, int mrefs4, - int parity, int clip_max) -{ - uint8_t *dst = dst1; - uint8_t *prev = prev1; - uint8_t *cur = cur1; - uint8_t *next = next1; - uint8_t *prev2 = parity ? prev : cur ; - uint8_t *next2 = parity ? cur : next; - int interpol, x; - - FILTER1() - FILTER_LINE() - FILTER2() -} - -#define NEXT_LINE()\ - dst += d_stride; \ - prev += prefs; \ - cur += prefs; \ - next += prefs; - -void ff_bwdif_filter_line3_c(void * dst1, int d_stride, - const void * prev1, const void * cur1, const void * next1, int s_stride, - int w, int parity, int clip_max) -{ - const int prefs = s_stride; - uint8_t * dst = dst1; - const uint8_t * prev = prev1; - const uint8_t * cur = cur1; - const uint8_t * next = next1; - - ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, - prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); - NEXT_LINE(); - memcpy(dst, cur, w); - NEXT_LINE(); - ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, - prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); -} - -void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, - int w, int prefs, int mrefs, int prefs2, int mrefs2, - int parity, int clip_max, int spat) -{ - uint8_t *dst = dst1; - uint8_t *prev = prev1; - uint8_t *cur = cur1; - uint8_t *next = next1; - uint8_t *prev2 = parity ? prev : cur ; - uint8_t *next2 = parity ? cur : next; - int interpol, x; - - FILTER1() - FILTER_EDGE() - FILTER2() -} - -static void filter_intra_16bit(void *dst1, void *cur1, int w, int prefs, int mrefs, - int prefs3, int mrefs3, int parity, int clip_max) -{ - uint16_t *dst = dst1; - uint16_t *cur = cur1; - int interpol, x; - - FILTER_INTRA() -} - -static void filter_line_c_16bit(void *dst1, void *prev1, void *cur1, void *next1, - int w, int prefs, int mrefs, int prefs2, int mrefs2, - int prefs3, int mrefs3, int prefs4, int mrefs4, - int parity, int clip_max) -{ - uint16_t *dst = dst1; - uint16_t *prev = prev1; - uint16_t *cur = cur1; - uint16_t *next = next1; - uint16_t *prev2 = parity ? prev : cur ; - uint16_t *next2 = parity ? cur : next; - int interpol, x; - - FILTER1() - FILTER_LINE() - FILTER2() -} - -static void filter_edge_16bit(void *dst1, void *prev1, void *cur1, void *next1, - int w, int prefs, int mrefs, int prefs2, int mrefs2, - int parity, int clip_max, int spat) -{ - uint16_t *dst = dst1; - uint16_t *prev = prev1; - uint16_t *cur = cur1; - uint16_t *next = next1; - uint16_t *prev2 = parity ? prev : cur ; - uint16_t *next2 = parity ? cur : next; - int interpol, x; - - FILTER1() - FILTER_EDGE() - FILTER2() -} - // Round job start line down to multiple of 4 so that if filter_line3 exists // and the frame is a multiple of 4 high then filter_line will never be called static inline int job_start(const int jobnr, const int nb_jobs, const int h) @@ -394,26 +203,6 @@ static int config_props(AVFilterLink *link) return 0; } -av_cold void ff_bwdif_init_filter_line(BWDIFDSPContext *s, int bit_depth) -{ - s->filter_line3 = 0; - if (bit_depth > 8) { - s->filter_intra = filter_intra_16bit; - s->filter_line = filter_line_c_16bit; - s->filter_edge = filter_edge_16bit; - } else { - s->filter_intra = ff_bwdif_filter_intra_c; - s->filter_line = ff_bwdif_filter_line_c; - s->filter_edge = ff_bwdif_filter_edge_c; - } - -#if ARCH_X86 - ff_bwdif_init_x86(s, bit_depth); -#elif ARCH_AARCH64 - ff_bwdif_init_aarch64(s, bit_depth); -#endif -} - #define OFFSET(x) offsetof(YADIFContext, x) #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM From patchwork Mon Sep 25 18:04:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43898 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp1403350pzh; Mon, 25 Sep 2023 11:04:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4aJAA00Ml6XmRn7C0L/9soffi7uVHTHEd1DiRRIVDO+tpMUWCwxXEEdhqJ0t1/upSkVdQ X-Received: by 2002:a17:907:7d9e:b0:9ad:8a96:ad55 with SMTP id oz30-20020a1709077d9e00b009ad8a96ad55mr626414ejc.14.1695665052357; Mon, 25 Sep 2023 11:04:12 -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 l26-20020a170906939a00b0098e07395330si9328327ejx.746.2023.09.25.11.04.10; Mon, 25 Sep 2023 11:04:12 -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=UDLTUPsn; 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 10C6768C9D7; Mon, 25 Sep 2023 21:04:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2101.outbound.protection.outlook.com [40.92.91.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8C9A868C8CA for ; Mon, 25 Sep 2023 21:03:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LwWUfMJZwMlQ/DD4Zfaf9cDccNZ/pDS29aWfNbu/FxfZ0+sqznBePLqVWQ+Emi5eW4RywyeyXjb/epnkIhfae48WAKsVbv6vPwe62r8TuIF62RniAdvXrU8Dm8Dz5064F+iZWbjO5jVrB2YDaacGcNIFDfq/JMh1wGkqJlE9uoe9CkB8Y99WHa6+xRszRbrhYWWKXNIy83RaZ+7XiUzmNIhRqEmVa84tKuG4an75YzTKfqI8USW5Bz5G40OI0gVtssc5e+b3Ig7FIWlPRRdJIKHZHar3Q6Lra4kKrTvrcifGBwr1n6UeZ9MRKlzWlsCHHPbyHwBjuzTIdRpdF/1RCw== 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=X09Mks5Q5Mr5PGmz7QafxUOHaKuh9E8cNNXS7FgH8rI=; b=L0Vc5oVJxxPMIWB1sqhubpNNBb2I1ieFqFMREW1gv0sNCCF+oezC/GqGXeqkk80OVsd0hd8Jnts/QO2FxSHP0sWmDMSN8iLrAwcy9AMQTH0XZEDzViymySYrKx/iQdomQC7NV4UJVS3P+0ovsjL/gdRpY9Pm90jy23UZR7SYbIYYF0i0Ttm7eFnf7bCD44/CkWrpKTLKr05o4yT3YHDgY9yZyPHCppRvISl/vzmctBBLOIn8fnH/DrzCCRqXN0hM5HVi0G8RcnzposrVOyJP2oIekfuXCyfx0VzpZWddxPiBaKoUUMTnhiaTvr3iIyQycvbtv0Cld9+LlHFx8+5ZPg== 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=X09Mks5Q5Mr5PGmz7QafxUOHaKuh9E8cNNXS7FgH8rI=; b=UDLTUPsnKK3MzZIRMzr5SrU1NTQzKdW3OL0Ez8vF4LF9DMNrqXrf6UC+fK8NSh1Ium2/xYoDdQZR1d/IagRJvvry/bQqDWkxnFaHWA83QH1bzu+Zc7PTm3n4kUuo2tBsPE33vm5nDoLbJXtKrPam6PEGt6MBpJo8YPX9vuP0RiHbaFfPeiGbKOBDoOxP3kIZpUPKfZA1tz6EuNBMZorzGuHzpJADYAwp0GQ+0b+JyY6h/bknRXhwKEeioQHBfT4jfx8f2XTqadDOduXCVWU4lFSADVTJG6r0BI3kCQLclsvi4/brIo9eSlgurPPlzrirxWtLAmPy8PiHaCaQnjFljQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0271.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:270::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 18:03:56 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Mon, 25 Sep 2023 18:03:55 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Sep 2023 20:04:51 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Z1G3PKSb2mqoy4cenayfwYty451HSiKT] X-ClientProxiedBy: ZR0P278CA0083.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::16) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230925180457.2060101-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0271:EE_ X-MS-Office365-Filtering-Correlation-Id: ff3d2d07-b5ed-4f0f-3104-08dbbdf1c883 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iBvUdq8w5m33Ek6ORBD0T1A6oPbFEBB3R2wwfSVFGv2uP+4kQhbcGBZOtcyS3mo1UNipiQ72lPsLj1mt+l6SKKYGN06cZAx4HJTaZUjAtL4/jTEnZR/G+57FeP2mPR6NAcv3rVvyVbutEUl/Cs8rn/lMhbklyG8mT//VIhcpP7MwBOTozWIQPcYsuKbPSS5bkCg8kcajmaNe33cJ16lygqmNhv1t3hk0JPSC3OY2m6hkHMnjHurjMGfClloBe3LWsdbj+3yDqN23QE4OqwztITlIFO/+52DIk0nRvvdGZtTufg4s72BuGWEiDKLTZ7+ImM6fzpwHWGPue/SFYOhKM6s+5R4JYQB/ytv4oG/p6ZgpieK6VpuogbnyoEvWaWrEU9/LdnNxcjsDzdCo3Po/60W5cZQs2s6DY4ppa9764XbsV9EkUa3mXI2z0Zw21XpmvjxKHVaR6bQEC6xpJg8Svs10j8uQcRj8fY6ZCHaMWFYelMrOmgKB39Mkd4BoxCAzy1RSVSxsBIDwu9hZOLI6bmpnCJcmL2GBBYER0E/ie3s1cf48N04V36Ydm7HU+6qw+MoIQ/TIxplknw6YmsppYOJRjR7C6u8o7IaUPKHOh3YMcuOXgxH7reKOvpltQkZe X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LvoIek3ocfEH3eNy5Z4agRaSz5+bP06/XP7BQlhBdRvc0Uf/gDF7s6z5KWX9U1ypEuQR0z8lvEdGRl8bg3P1x+ezoVmyNaFH+b98vidtH3tmcweZ/RGgVGt3jlI1sz4sUQFvx2ccaLOE2pNfNVmjlsZH+n1CU2WC5SoZEPtim0uQ2gy1q9DM7xw31jtimOYq3aypQxkTqYYNHB+R8kFaCaUCERWFQ9sxGcU4azH98v33RRyXXX0UGEt/HWfWUlDgto7dBGTh16XocO+9obQMjxVp5q7jR4hc4LNoTKMY5ucRFws/hrzsaPxcoQeKmJTThsM/gcMMmjhE0wNeH5ELZZm8U5tQytDHQwV8tBQtHTZbt1ppVczOW9/QyePIkMQIre7LgqMt4SKZuWx08sWiX2D33R6YAomdzoH8Fqq+IN49MSxCSoRsT6BBSEp0lbBaFAMBEUyauSmgg0sJhTVtqHlSuTieQBlpl2fKy9KMsklkBWMMJiOhk4h++8UQFKxGQFjvo5GECcu1Kb5NjI6jCXoTDajWFVBWNpMpVqQ265IzWfY/kDerdZmyFOWO14nwwNQVFNFJtpPZ8vOrg/jbuqzIEJ4/n1L6qimLI4OjmoeYA6S9h31dGgikcNxkv7XgtC2egNi8ZlUGQOJRwO6xmUaoOrw2HSpte8h6fLOF6jjYjWzEJhkU6ViowLbESVySWnSVbdLF2hlmIiQytFyO4bdDMjxoUd6gey8/t7PgM/AOsJwCftYU2RQSsWxuxJ8LJj/fPfuMZsRyuRRlBUye4i6t0XYsJGVlaMwOPHtWmlB7S9XMZKT2U3vjpFESfx7VjAO4XwHerqa2tzm/BT5vge8wLiLeYUtKJPfyPbThyp1W7GZPD6DbiA2UlxemibaoOPFmBBseqT2AfKb8X1cz6F/CQmLX8SObdOisRe2Z3Fd1+EMtH6YKvooWcSLkZLtT88bed9FXCbLWtCJY5Kj+824EBLhhfDbSTpSQ768KsIvANy9O99wksVh75p3xDf+6aHYFeJhF0DdSr+c0vEPN2KlNqS+0La8aT/OQrK0g3PwUTbWBzNYfmdX8KtnX/Mkuj0J2GDaudmTUuOj8+v8Nd4JGepwWjuJrHa6eZ0qqDe73ynsx6cgEUmzWJWDXtXpC1OCZdouTaem7vCnRlpHrNJd8R/WBhS1UTLGWNlE+cRTimgJzCuybYyw2qvit/te4fQK3Y0cXpUfQa743vO3ml5jMlgRv1J2TDYhmbgN5eBfuAyazcujpzaPLPGz9od9P X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff3d2d07-b5ed-4f0f-3104-08dbbdf1c883 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 18:03:55.4478 (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: DU2P250MB0271 Subject: [FFmpeg-devel] [PATCH 3/9] avfilter/bwdifdsp: Constify 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: oF+Hp1529E61 Signed-off-by: Andreas Rheinhardt --- libavfilter/aarch64/vf_bwdif_init_aarch64.c | 12 ++--- libavfilter/bwdifdsp.c | 60 ++++++++++----------- libavfilter/bwdifdsp.h | 12 ++--- libavfilter/x86/vf_bwdif_init.c | 12 ++--- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/libavfilter/aarch64/vf_bwdif_init_aarch64.c b/libavfilter/aarch64/vf_bwdif_init_aarch64.c index 2b8d212de6..74530ed5b7 100644 --- a/libavfilter/aarch64/vf_bwdif_init_aarch64.c +++ b/libavfilter/aarch64/vf_bwdif_init_aarch64.c @@ -24,14 +24,14 @@ #include "libavfilter/bwdifdsp.h" #include "libavutil/aarch64/cpu.h" -void ff_bwdif_filter_edge_neon(void *dst1, void *prev1, void *cur1, void *next1, +void ff_bwdif_filter_edge_neon(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int parity, int clip_max, int spat); -void ff_bwdif_filter_intra_neon(void *dst1, void *cur1, int w, int prefs, int mrefs, +void ff_bwdif_filter_intra_neon(void *dst1, const void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max); -void ff_bwdif_filter_line_neon(void *dst1, void *prev1, void *cur1, void *next1, +void ff_bwdif_filter_line_neon(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); @@ -64,7 +64,7 @@ static void filter_line3_helper(void * dst1, int d_stride, w - w0, parity, clip_max); } -static void filter_line_helper(void *dst1, void *prev1, void *cur1, void *next1, +static void filter_line_helper(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max) @@ -79,7 +79,7 @@ static void filter_line_helper(void *dst1, void *prev1, void *cur1, void *next1, w - w0, prefs, mrefs, prefs2, mrefs2, prefs3, mrefs3, prefs4, mrefs4, parity, clip_max); } -static void filter_edge_helper(void *dst1, void *prev1, void *cur1, void *next1, +static void filter_edge_helper(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int parity, int clip_max, int spat) { @@ -94,7 +94,7 @@ static void filter_edge_helper(void *dst1, void *prev1, void *cur1, void *next1, parity, clip_max, spat); } -static void filter_intra_helper(void *dst1, void *cur1, int w, int prefs, int mrefs, +static void filter_intra_helper(void *dst1, const void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max) { const int w0 = clip_max != 255 ? 0 : w & ~15; diff --git a/libavfilter/bwdifdsp.c b/libavfilter/bwdifdsp.c index af217481a5..65bdbdc053 100644 --- a/libavfilter/bwdifdsp.c +++ b/libavfilter/bwdifdsp.c @@ -115,27 +115,27 @@ static const uint16_t coef_sp[2] = { 5077, 981 }; next2++; \ } -void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs, +void ff_bwdif_filter_intra_c(void *dst1, const void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max) { uint8_t *dst = dst1; - uint8_t *cur = cur1; + const uint8_t *cur = cur1; int interpol, x; FILTER_INTRA() } -void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1, +void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max) { uint8_t *dst = dst1; - uint8_t *prev = prev1; - uint8_t *cur = cur1; - uint8_t *next = next1; - uint8_t *prev2 = parity ? prev : cur ; - uint8_t *next2 = parity ? cur : next; + const uint8_t *prev = prev1; + const uint8_t *cur = cur1; + const uint8_t *next = next1; + const uint8_t *prev2 = parity ? prev : cur ; + const uint8_t *next2 = parity ? cur : next; int interpol, x; FILTER1() @@ -159,25 +159,25 @@ void ff_bwdif_filter_line3_c(void * dst1, int d_stride, const uint8_t * cur = cur1; const uint8_t * next = next1; - ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, + ff_bwdif_filter_line_c(dst, prev, cur, next, w, prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); NEXT_LINE(); memcpy(dst, cur, w); NEXT_LINE(); - ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, + ff_bwdif_filter_line_c(dst, prev, cur, next, w, prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); } -void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, +void ff_bwdif_filter_edge_c(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int parity, int clip_max, int spat) { uint8_t *dst = dst1; - uint8_t *prev = prev1; - uint8_t *cur = cur1; - uint8_t *next = next1; - uint8_t *prev2 = parity ? prev : cur ; - uint8_t *next2 = parity ? cur : next; + const uint8_t *prev = prev1; + const uint8_t *cur = cur1; + const uint8_t *next = next1; + const uint8_t *prev2 = parity ? prev : cur ; + const uint8_t *next2 = parity ? cur : next; int interpol, x; FILTER1() @@ -185,27 +185,27 @@ void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, FILTER2() } -static void filter_intra_16bit(void *dst1, void *cur1, int w, int prefs, int mrefs, +static void filter_intra_16bit(void *dst1, const void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max) { uint16_t *dst = dst1; - uint16_t *cur = cur1; + const uint16_t *cur = cur1; int interpol, x; FILTER_INTRA() } -static void filter_line_c_16bit(void *dst1, void *prev1, void *cur1, void *next1, +static void filter_line_c_16bit(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max) { uint16_t *dst = dst1; - uint16_t *prev = prev1; - uint16_t *cur = cur1; - uint16_t *next = next1; - uint16_t *prev2 = parity ? prev : cur ; - uint16_t *next2 = parity ? cur : next; + const uint16_t *prev = prev1; + const uint16_t *cur = cur1; + const uint16_t *next = next1; + const uint16_t *prev2 = parity ? prev : cur ; + const uint16_t *next2 = parity ? cur : next; int interpol, x; FILTER1() @@ -213,16 +213,16 @@ static void filter_line_c_16bit(void *dst1, void *prev1, void *cur1, void *next1 FILTER2() } -static void filter_edge_16bit(void *dst1, void *prev1, void *cur1, void *next1, +static void filter_edge_16bit(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int parity, int clip_max, int spat) { uint16_t *dst = dst1; - uint16_t *prev = prev1; - uint16_t *cur = cur1; - uint16_t *next = next1; - uint16_t *prev2 = parity ? prev : cur ; - uint16_t *next2 = parity ? cur : next; + const uint16_t *prev = prev1; + const uint16_t *cur = cur1; + const uint16_t *next = next1; + const uint16_t *prev2 = parity ? prev : cur ; + const uint16_t *next2 = parity ? cur : next; int interpol, x; FILTER1() diff --git a/libavfilter/bwdifdsp.h b/libavfilter/bwdifdsp.h index 1ff810719f..4bf595355c 100644 --- a/libavfilter/bwdifdsp.h +++ b/libavfilter/bwdifdsp.h @@ -20,13 +20,13 @@ #define AVFILTER_BWDIFDSP_H typedef struct BWDIFDSPContext { - void (*filter_intra)(void *dst1, void *cur1, int w, int prefs, int mrefs, + void (*filter_intra)(void *dst1, const void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max); - void (*filter_line)(void *dst, void *prev, void *cur, void *next, + void (*filter_line)(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); - void (*filter_edge)(void *dst, void *prev, void *cur, void *next, + void (*filter_edge)(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int parity, int clip_max, int spat); void (*filter_line3)(void *dst, int dstride, @@ -38,14 +38,14 @@ void ff_bwdif_init_filter_line(BWDIFDSPContext *bwdif, int bit_depth); void ff_bwdif_init_x86(BWDIFDSPContext *bwdif, int bit_depth); void ff_bwdif_init_aarch64(BWDIFDSPContext *bwdif, int bit_depth); -void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, +void ff_bwdif_filter_edge_c(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int parity, int clip_max, int spat); -void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs, +void ff_bwdif_filter_intra_c(void *dst1, const void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max); -void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1, +void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); diff --git a/libavfilter/x86/vf_bwdif_init.c b/libavfilter/x86/vf_bwdif_init.c index b1d1d6a91c..69a70e3293 100644 --- a/libavfilter/x86/vf_bwdif_init.c +++ b/libavfilter/x86/vf_bwdif_init.c @@ -24,28 +24,28 @@ #include "libavutil/x86/cpu.h" #include "libavfilter/bwdifdsp.h" -void ff_bwdif_filter_line_sse2(void *dst, void *prev, void *cur, void *next, +void ff_bwdif_filter_line_sse2(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); -void ff_bwdif_filter_line_ssse3(void *dst, void *prev, void *cur, void *next, +void ff_bwdif_filter_line_ssse3(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); -void ff_bwdif_filter_line_avx2(void *dst, void *prev, void *cur, void *next, +void ff_bwdif_filter_line_avx2(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); -void ff_bwdif_filter_line_12bit_sse2(void *dst, void *prev, void *cur, void *next, +void ff_bwdif_filter_line_12bit_sse2(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); -void ff_bwdif_filter_line_12bit_ssse3(void *dst, void *prev, void *cur, void *next, +void ff_bwdif_filter_line_12bit_ssse3(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); -void ff_bwdif_filter_line_12bit_avx2(void *dst, void *prev, void *cur, void *next, +void ff_bwdif_filter_line_12bit_avx2(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); From patchwork Mon Sep 25 18:04:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43900 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp1403588pzh; Mon, 25 Sep 2023 11:04:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmyi1MVZ2otFJCoPbfSE2BYLPlyHP9R8maP1uqSHsB6qET7Z9P5uMyntxYxwctXKbk+/+h X-Received: by 2002:a2e:2d12:0:b0:2bc:d5ad:2758 with SMTP id t18-20020a2e2d12000000b002bcd5ad2758mr5658215ljt.5.1695665062301; Mon, 25 Sep 2023 11:04:22 -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 e17-20020a1709067e1100b00992ee06bddbsi8846259ejr.176.2023.09.25.11.04.21; Mon, 25 Sep 2023 11:04:22 -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=djwx7I+p; 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 2D23668C68D; Mon, 25 Sep 2023 21:04:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2101.outbound.protection.outlook.com [40.92.91.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BBD1268C9CF for ; Mon, 25 Sep 2023 21:04:02 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UgV/S4EqgLt13mfa+6YfR/sNuLiE8mmkplqyesf40HWF3xwp2RAXAFKKCpHf09iTCiypTf3f6RX2xnP8MRkBLj79cy5GQBo35v2oZYp6kmIlmbyOjo+KAhMHVXO9HACIQGXtHSg6NqdGS78a2DO1GEUyQLfJYlp1RDKe0KhQh1BuRIf1D0CTY/W3MRTmXbjHCwLrbS51IdyVzckfacEapmbcefteGMW9z3L6vi5oXgahCTFmJJvPZkJJF1JA4aXDdpo+ov1kXldcWt1r2gu0JgELPhqp7rM5f927kXHjpvT9YxTJG/MjXakLKU9QaGwthFrsKvEdrSe4l23H1Zw9nw== 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=LVa/jntbef8tLvy0KzBXcmaEwxh/cHifDsBPWG4HzKw=; b=LpmuzHZU0GLx7WPEixiBQ6VEx1sbH1EhzG5OQ1/gty5OYT808cOR7ilSXcu5gXeguuJ/zo2rjQmc6MJpP6GwMyYPx6FA4oLeyf7waEdLa3gs1mTo+HAmUoG0F2VkrY7YX30angMCLSi6xY60NOlK3KQN37kscVL2R2/EGjgQGvTKhtB/PiTCsn1LPpkHwDAaIgqeBTRw1damyIJlvPEj/JHsx2xGwj/VjbGG41EI/tGh/KvB5A5iLfUBcJgusPk37fN231+FtyhhPZp749d05zi2R4aSBWBr1ebEuq10H7ZjvrkBS5AQDRiyWBL+N2Z/v30pEsX/B4mP2a+a2iSH0A== 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=LVa/jntbef8tLvy0KzBXcmaEwxh/cHifDsBPWG4HzKw=; b=djwx7I+pTPAPTp/Ha4VzCneKSPXNJq3ibw+ayDyM4MthNmmQqv6FbMPa03yWp0MwSKcJpBc6qEhpp2M0gfuKya/qMq+wymUp5rMziguHzTs0uSyiK8ouSS2QCWFobV7/y2TXYozcV5FXO/BKj207kWdXn6/TRuCdXzXaKtzOmrV2rlc+f7f99N2a1MAByjvBMC53JVt5tQk3sEXdLZvdWYu9omUIX7C2vIowT8wNEqIXhWyR/fIWIQx7x7Xuc+1JuUcpxhyQkAC6OxnwGXxVn6eZCbq8PQFXhy61aydcC2vwyDHXlLfjMh63KMEkZBH5mMUFYvfCt/zpUvGSUTJcsw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0271.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:270::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 18:03:57 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Mon, 25 Sep 2023 18:03:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Sep 2023 20:04:52 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [75waVfiKjNqnq6dPUVvT6/ySPIHwpizq] X-ClientProxiedBy: ZR0P278CA0083.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::16) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230925180457.2060101-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0271:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e3e258c-40c9-4a19-b485-08dbbdf1c997 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jKQ8wAywoLFEZcCSVsIMYQJ+CyJT5eE5sqaZwO1OHX0EoQKvkpzJuheL78Lyo4oM5StnWbsfYAxy8Hibi2q/vrqsuSRGWNA+VhnEUuHllmm1a90xYADNcKpoMGsVU8eipSxrIQp/1mVUOMAKr+HQihCvKpyZiO1uozBAEWwjhKd0OsN/AxKzklj4bE0YNnq4lDUrzIvOXivq3tExDC5GDtarzmvaw6idsH2Cm3mnJtM/OY0nSXdXIyBzQRnH4ENqQLnJgXKO+00lDCP7t+yUS3/NgM/RrV/ZWm8WsaUS8bQxBfWF/nkVu4GNj8TxUBxkMMF3QtrsACJS4WOoFMWHGxkezyY9pyefnx+EfLOrJvxf+yTQcRYAHWhx2bFylsw+ADCz46KOR7YtT1jvnwHsvmn9u3t/osidp3ZtY0/73icZ3YnyFgBfSckcM99UrYK9x48P6dl6ijCu7htByerP5ef2kb9LWH1kWr26NsX1v7M2gfE+XAuucvbH09nvh5W9NWaohthikL4KzKSXYve8uAXCMFbZt4UMvpD3I1X2kK5WhgreV4g53Rr6HPPLrs7FUIUpsQzxpFXoZD1seKvZe8uvoaq1i/hnQvLeiP+uxNj5XLylzUxSQutRA14aB45z X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bjIzJb/OuNeKd9JRInUyxkUhD7Ls9x/X0yH2gr9G5hJ+RWJ8eCK/iii7jQQ6r+fMAnafMJVXnaM+LVCn293BQlZKtktCQfhGEhUKAHxBfluf9+KLfJ1vIkk/7g1zPBm9/Jzc2ul8PGeAXbBS+Myuhia7aI7vxBSrbFKTOpHdohKmR2R6zwSmnoVkilDIp8REWT/R+4oP2zh9H4wHI8qmM7m0moYphK/qcgD+M2RFtQCf9Y5jC01HV67cSZW6wbt42tJGE/UHh/PoPxuCATS/ftK86+tf/BW985rdmz5qEeungj6VEu8Q6+xl9JDe1aRbWyrZpi2TadoWK2m3Jas1IKxW9H+5A+AOrh80PXhL0fng90U7g9/nYAAXb8BpyAO0vBUtMgxQ+q9f/nmVjSQrFT5ksVEj8cPa520RB9yKbbvwhrFq6agPqik44+lqIyf20h81qDHlfiwm1aY3Ro6t/Fh75a8BqN0Ug5XX0xEBXhf0G7alkGFMz9d03GN5G/zZMPJAj3+XN3VbhtpiGJ5YcJCBokeQQIMf13aZ5OUmR4iSeR3IcmYDKBm0XpAhvR0NlfU5TbpBNMo6OmBwSGaB/X4ZxIXUOPD1CUSkIG/Lawf9KU6N4LjVWuNvm9yc2bh786N+SLg5Z3xmksMKjCbZccze0YtTLDx1gmstAxII2zYZpNFiB3lIEwh48a5dHkUp8zSef8RjScv/ySkCeIk2payCDB0oF5r1l7rQlxzQ5b0MrbaXq8VNqXg87INKWKR8ofaYIjyuWv61VViSnYm9kY6bt060j2K2FzQEUjn/fsU+a1chVhe4RHskj8jfgDOACz/ks01ehHVHM6nJHGQtzOz2IWGEB33qrm56APJO3uYBscaWpBCPhUlNtuJt6K5W0WkrZ0QxHgZfTdvMraTyvsfDwCsU4lIiiAxU3zl4oLclYPb9wrahNoxQWzdKxaMyE1bw+6ef8Ojxva5Q7XCoEPWCiiTGgR44vWHwoDh4q7EAuFjNefvoGxPehZrI7Zv/dO0yf8yI4mHpQ0raDivRC9Nap+yYTov8zN0Gm/3DVxW3ApdciRj8lfyJOuINSUbof+R8CzwHZ0psDLf5IECLiDsWOpXPI+31pW6n6GgxsfYC13aqIcVfFGWhvipC2o5puIDIbQtWCR4Dh60vwYWUq1/y6//Wc1kyjtvHeUtqxXNhKKQhHvnL+Pq9+lvR7WcvoNcz03Y10tEGz4bWRJfSMdc70/a2bM5KiuhZusF1HVV3Y7WULgr3tFzj5BOdu4k0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e3e258c-40c9-4a19-b485-08dbbdf1c997 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 18:03:57.2345 (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: DU2P250MB0271 Subject: [FFmpeg-devel] [PATCH 4/9] avfilter/bwdifdsp: Avoid including ff_bwdif_filter_line3_c() 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: QulHgodv7FqN This function is used by the AARCH64 code to filter a few remaining lines in case the dimensions are not suitably aligned; it is furthermore also used by checkasm to actually test the AARCH64 code against. But it is normally not used and this patch therefore moves it in bwdifdsp.h as a static inline function so that it can be avoided if possible or inlined where necessary. Signed-off-by: Andreas Rheinhardt --- libavfilter/bwdifdsp.c | 25 ------------------------- libavfilter/bwdifdsp.h | 30 +++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/libavfilter/bwdifdsp.c b/libavfilter/bwdifdsp.c index 65bdbdc053..e87fe414e0 100644 --- a/libavfilter/bwdifdsp.c +++ b/libavfilter/bwdifdsp.c @@ -143,31 +143,6 @@ void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, con FILTER2() } -#define NEXT_LINE()\ - dst += d_stride; \ - prev += prefs; \ - cur += prefs; \ - next += prefs; - -void ff_bwdif_filter_line3_c(void * dst1, int d_stride, - const void * prev1, const void * cur1, const void * next1, int s_stride, - int w, int parity, int clip_max) -{ - const int prefs = s_stride; - uint8_t * dst = dst1; - const uint8_t * prev = prev1; - const uint8_t * cur = cur1; - const uint8_t * next = next1; - - ff_bwdif_filter_line_c(dst, prev, cur, next, w, - prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); - NEXT_LINE(); - memcpy(dst, cur, w); - NEXT_LINE(); - ff_bwdif_filter_line_c(dst, prev, cur, next, w, - prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); -} - void ff_bwdif_filter_edge_c(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int parity, int clip_max, int spat) diff --git a/libavfilter/bwdifdsp.h b/libavfilter/bwdifdsp.h index 4bf595355c..4a350e5ccc 100644 --- a/libavfilter/bwdifdsp.h +++ b/libavfilter/bwdifdsp.h @@ -19,6 +19,9 @@ #ifndef AVFILTER_BWDIFDSP_H #define AVFILTER_BWDIFDSP_H +#include +#include + typedef struct BWDIFDSPContext { void (*filter_intra)(void *dst1, const void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max); @@ -50,8 +53,33 @@ void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, con int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max); +static inline void ff_bwdif_filter_line3_c(void * dst1, int d_stride, const void * prev1, const void * cur1, const void * next1, int s_stride, - int w, int parity, int clip_max); + int w, int parity, int clip_max) +{ + const int prefs = s_stride; + uint8_t * dst = dst1; + const uint8_t * prev = prev1; + const uint8_t * cur = cur1; + const uint8_t * next = next1; + + ff_bwdif_filter_line_c(dst, prev, cur, next, w, + prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); +#define NEXT_LINE()\ + dst += d_stride; \ + prev += prefs; \ + cur += prefs; \ + next += prefs; + + NEXT_LINE(); + memcpy(dst, cur, w); + NEXT_LINE(); +#undef NEXT_LINE + ff_bwdif_filter_line_c(dst, prev, cur, next, w, + prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); +} + + #endif /* AVFILTER_BWDIFDSP_H */ From patchwork Mon Sep 25 18:04:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43899 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp1403533pzh; Mon, 25 Sep 2023 11:04:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvW5YeI3471nulnWbeUqXhwgYHQyxelsqnhZeS/euWDP1ftfUgiKkflMHUSZDxpMtzQ2ez X-Received: by 2002:aa7:d90e:0:b0:532:cae2:8dfc with SMTP id a14-20020aa7d90e000000b00532cae28dfcmr6739532edr.5.1695665072143; Mon, 25 Sep 2023 11:04:32 -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 n3-20020a056402514300b00530f5700caasi9127919edd.84.2023.09.25.11.04.31; Mon, 25 Sep 2023 11:04:32 -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=igCGql1B; 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 3DF4568C9DB; Mon, 25 Sep 2023 21:04:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2101.outbound.protection.outlook.com [40.92.91.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0EA2968C9DE for ; Mon, 25 Sep 2023 21:04:07 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M/k5ofmPDFggVYMBX0VgQhgt6sYvb2OUqzn43coCM7UfX1rCV7tBFaYjjZlrId2kQNhuYlrA1abgQjnTFlmMsrnVfAvmQ0Z5qvRTL2cB1QSV+wozpisEb6GCwvKLJdcIvzI7BarIiQ8HZEFkSkBfbALmHeGi/Ul+bR8CQVPn/O/E6UnFTsO8lSV2dFe2d476Pw0VpMl5yjaoKnySRi/hdLZNnpMQexwAa2DPF+LE0roa89wyiPCXgHPOjA9hlQs+Pwr4jArfUMPLs5V4Sm+TgzOQsLSVqzUlneKycXcxREsoVxIZU+sEk11IDuz4aAM0/FdUpvqP1TK32z40zgbqjA== 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=cpBEcu7KSJE4I3OnUwQxZ5Ms5tZu/i7McCXZ1BnvJl8=; b=cT9+oyBe9CKYLwJPh7PG+YdwQC5D6/7W7xJRXDAUxWamjSHYB6qFrNkwcSoCfgw2Sg91+SYjN9ddXRZxTIDtpBRcyry38GaoOO4SVNbSE6syAQEBJbgpMMESRx7aX3dwfV6Ey28BMjJ0f2Cmnt1BCWQStMIb0uP4LFybMvneTDhFfVewODlPm1KGWvo6iumsQnes1udwIn6B4drGMD1hyO/lETSbEFB+zVuIraJFCZjVPSssqThFDo9KL4kyL6+DtB1qOexgCcGjzVvk9xPDE5dEW9zBr9nysSf6RLacG/BBwuyZlipMXBbqzxJz6QGAUpG77YIQTpg9ycN3fS/jvw== 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=cpBEcu7KSJE4I3OnUwQxZ5Ms5tZu/i7McCXZ1BnvJl8=; b=igCGql1B9d/1jJcpu+3WFaFpVutDs7/Tpi/EvNcJSxPgFXxO/AYskXOSH1A+rXgANt3GZcxhEFDmSbhf+ZTEG3HQTLWeS573iHd/1glY8JzcK5MoTbrYrK1z7t3Mxc/KMCcT0k87MTg2ITerhi7nuDpUeaSSYu0nTMxXC+CKyB5Wjm0we0Q6Ybjiz3Jg5mciKVy5ulk6SFEvIInfoB6EMTVtNsjStHlGWU3qA4CZQrg/JG3nYfxwWiNmnu2yz7azfUwdTT1sejpY/xD7BWJ2iZU87Yy/7aZkrEEUY0vUHzviv+KEHmNbVEv1efNlJ9vRINW1z0c70xdFI+tkcTG57A== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0271.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:270::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 18:03:58 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Mon, 25 Sep 2023 18:03:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Sep 2023 20:04:53 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [VlU4M/Zkxmx2eocd/Xv5oztLb5yK3SG9] X-ClientProxiedBy: ZR0P278CA0083.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::16) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230925180457.2060101-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0271:EE_ X-MS-Office365-Filtering-Correlation-Id: 5396bffc-04ed-4e20-e179-08dbbdf1ca4c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +u2//jiLQu+lC53QlY4itZ09Ig4bTdfZYipYmFsA1DjbtBaeFQB6885twSgezRNFP/QMVg1TcNUf9RG+cQqKrgq21DPa8P2ZX99CaQnMXK3PZ0EHfLgWLSM6QyXSHGDqgxMKdWlimGae2pv4ZCIyOdDJa2lhnsXloMonLHFIleFNg9J6UUkYtD4iC4omJUuSYC6//EU/IMtnj5ei+fWeWZIZC+QQbrzNUVscO/KrIjHOOkDqXFZ+v0UWhIhUMH7VE95+mh9O4ZV4PdUglaWeNKKnsKQV/Ss5BZvKFGr0gmXuNaJB8poMOp5tS2LLxkz51kdlTzaaV+hbiFVOBrd6kY0u8l0ZMJZUBYCmtbsASqu+3uvdDusa/i9/mjD52NllmTeuHHGNVYNZWS9d2efIPBL3ON/DlY+vF4o6zJWyGAVg+qnpuhtvqRntjNf40z6Kb5MX3Olgu/K4sCuE8gwHEAqQkLV5K1vbS3ArGzOE7MxVglwBFEaLxEz7nnEwkFiwHyB3aHK7A9nuI9xw2wBRB6JUIFCm2kNwNOzCVEEHR1tXSfQUPvDYdxIx+AFWL4veWmzClCDnPv/A6XgCb5TxDSvPpQLCG0HLOEK0ueIvXXjp3qKydE7MNTopDMs0cd9x X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oqy97WWE0E67R9cShVlWtW7zI8Sw6qE67rj1K2Lzs2dzXU2QutiI4Ok3AqVa7PUaUoV/1MaQNYoltj0BTf+oLubVGsTVNayaM0lj/jPveOYQjPQ++Im5Y6ea/Py6+K4CtvjrTD8OOr0DHwfDQNuV96AviRda1ri2kwp/eH/RuWbXJWTp5BlvMEeKMt5MMYCLlITD9BM/g+/R+GmXHkKY6n7DAl+GcL0CeV/lbyXYEvMUtHWWCLt1VmMT1Z1eX3EvpRr6eSzzwmr+u76Vx5P6ScaUWrqOr13byU7AWrc589jlvtiyZ0Eq/EUPtX3X4nyUFBxxiP/E/+b9cuotfYe/mSa1zGLaHhqJB1fCbv5wM2P0I7VOQfZzCr3SYwb/ey2M+wGctkmvxrnQKpNejI+xs5C3SCxGcyMjopX5TDPL7x+lbp8r+EZCZpl1T8hxet7PR1WnrKdIi9Z7I18k+vDY41ISefIN0M5cs+IFE4cRbd+RK/+E/Clin7bFWQTxQOP71GGgDxnZmeEoILd5gUKyNQhKjh1fnlh9+XRAof64z+afkqe4/dAEc7eq1Em52CLhgoQgVqNwCQ++/yySGwDPdDBVQWYuJ8ebktpash+Y5pQlLKDw3t9uagNorXnosu8b8yEY6nAHW0pRy7NGG/GE+aSsGyUmkW93ffiw3dbISIOYiap91tJO9iiHN6AYRuhonE2nig2BYGRb5UN86cdaNMW/E2gZog+M9S28WoKcU9emGPwxQTHqTz5BV3P6i9O8OIRb9V1SKHjdkm4UYwhND7rP8nnFeZ/O1qT7hyKUH8SgORkq40HENF+reQ2g7By0IMBKvlBdBDpEF9n6dhPFOKjjmS0kUUDwgE+qPWPkI0CUk4eU0IdxIWPEzGNLpSSV2rI/wJctCAQqqmrtcDJxqYrrCMA7lrmsqRhRRNC+Tx5Ti4mQt9rnCdgsvvZv46nh98cMWKMvvUX9U/180Wq8B8NONRkNUbTQXsc1IvAKk1wRK9leO35QPVd4DORyFOZ65q1nrtRY4EaFMhhDFwZIJLvWDnkvQQtmG0MHhuIf4E7udDHB7t+Tz1lqIAxZBgAI1dwjP/zhsXYUIg8DyEJe4lZ28coGlUUsdn2WMvYVJHB2jFPMXs1pH83Nx2nujUxaz8LAj9bUfel7b1AVGzB8yA226gu/gsQ1RVEUu+irpBlR8gipdH2unyftT0TolRC9g7pJ98yNHRX5WjKsgsJMZvrernHN5sJKe8/x/3srJhpePyx4CeJDPR9KD41K37yP X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5396bffc-04ed-4e20-e179-08dbbdf1ca4c X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 18:03:58.4655 (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: DU2P250MB0271 Subject: [FFmpeg-devel] [PATCH 5/9] checkasm/motion: Don't allocate AVCodecContext 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: Jjucs8mg2slT Instead use one on the stack to avoid pulling in all of libavcodec. Signed-off-by: Andreas Rheinhardt --- ff_me_cmp_init() reads only codec_id (checks whether it is Snow) as well as the bitexact flag. The first check has been added in cfe675269bf44c49590e9076b5d2cd2503804f98 due to alignment; I don't know whether this is still an issue, as the ticket referred to in this commit does not refer to track (or at least the current incarnation of it), but to something else. tests/checkasm/motion.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/checkasm/motion.c b/tests/checkasm/motion.c index 87b20d1c10..71a0ee3fc0 100644 --- a/tests/checkasm/motion.c +++ b/tests/checkasm/motion.c @@ -118,16 +118,14 @@ static void test_motion(const char *name, me_cmp_func test_func) static void check_motion(void) { char buf[64]; - AVCodecContext *av_ctx; + /* Setup AVCodecContext in a way that does not pull in all of libavcodec */ + AVCodecContext av_ctx = { .codec_id = AV_CODEC_ID_NONE, .flags = AV_CODEC_FLAG_BITEXACT }; MECmpContext me_ctx; memset(&me_ctx, 0, sizeof(me_ctx)); - /* allocate AVCodecContext */ - av_ctx = avcodec_alloc_context3(NULL); - av_ctx->flags |= AV_CODEC_FLAG_BITEXACT; - ff_me_cmp_init(&me_ctx, av_ctx); + ff_me_cmp_init(&me_ctx, &av_ctx); for (int i = 0; i < FF_ARRAY_ELEMS(me_ctx.pix_abs); i++) { for (int j = 0; j < FF_ARRAY_ELEMS(me_ctx.pix_abs[0]); j++) { @@ -143,8 +141,6 @@ static void check_motion(void) } ME_CMP_1D_ARRAYS(XX) #undef XX - - avcodec_free_context(&av_ctx); } void checkasm_check_motion(void) From patchwork Mon Sep 25 18:04:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43904 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp1403998pzh; Mon, 25 Sep 2023 11:05:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHw5ypZPdgeMX9i80o05EAdVr9gwMxdYahXMawGdq0+R2b6Uhya7ZU1lT5qZqJPU7sskIni X-Received: by 2002:a19:8c16:0:b0:503:3446:8ef5 with SMTP id o22-20020a198c16000000b0050334468ef5mr6461459lfd.10.1695665113309; Mon, 25 Sep 2023 11:05:13 -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 x1-20020aa7dac1000000b0052f8b665977si9285684eds.236.2023.09.25.11.05.12; Mon, 25 Sep 2023 11:05:13 -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=XgtDFRrd; 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 6506C68CA03; Mon, 25 Sep 2023 21:04:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01olkn2036.outbound.protection.outlook.com [40.92.65.36]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 517DA68C9F2 for ; Mon, 25 Sep 2023 21:04:10 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bwIpO8y7MZhLtvDsI9SD+fpC7c+kbXkpqpMXvli6N9RJokk2ZxcnDz0b3wpxp5SvKvFINM3vdgflVPvBOdPqEvGo4CaiYc61NJ9TGaN+7o1LRQ1+Lyz+qLh5kUjFhjMtuBmd1cEmVMFUnU9eRoOjbpAE6p+4zEcnRZ6Vc0bFZPFjfnl0BT5oYsdNi0KdlS7sWiWNvKQykg5fX1GkTRiR8eiANlG2WajwrM/TxNQ9sIR44qjJvN3kY5sVlgioc+e8AZ7Q6Z3mN+T/gqgdBTYRrO9oKua3XJjm5nG3gF9BuP9UwpOLP1EVEi+A8R+UhwoRNuMCEjs+f10Ib5uIuniIWw== 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=IJVwQwX0rMrKmrSEOY7MFMOMIyflV1CkYuougpP5rHk=; b=IOoAj9LfHEsGWvEwra/KhP84/bKczIWyWHvvVZCR7l57QYnKfaMJ7jWEtUpgjSmd3vAtUOUDOxDaq5jpReFfT3tb6UR6v+EGv+ZQ785v/k3WBJEqGohvMpAaJVJJxlLR9Hok6kMkN9d8FH8eX17nGo2xXYdA+DIllgovaez9iY/KeCJA5GzIiaKCgjgTaBJoqsDlmhCOeAE2jOkD/zAu+QUKxKi0PvPgxjrCB1qJumMntGPOI8k8R9oCK7VcDAbI1uwPFkEXrTTckSema4RKgNdB4YqLSe/zssuUzU8BxjqyCqPf0TpyxrtKnUA7GoYU4ed58JcsHq3cQB+FJfvv8w== 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=IJVwQwX0rMrKmrSEOY7MFMOMIyflV1CkYuougpP5rHk=; b=XgtDFRrdddj2mfE77BqxK/qi+/J92Xr7xZpgk9XoiCmLLSH5GSLmIZmiZYu5R9UgeTZSW75i8bmK26nVYZMCN0gpMpxU1QVR3XZN9Vx+1O+4+x2Nk0eEHceNmolWI43jfiDImN+bCVx2MJKCgvNudgOlS/B3UQ+K6i8Ks9+mekqWk3dL4hGjJp3KRejdtiCE/DkWtjHkAwO+zjANiSlBsGpqVOB3LP+lbnerv2c+beO838RsoW9G5mS2Jjp9WATfPf8VzP/3Knrc+4L1wDmjT9pNZQd/ScBQC7QBf0K8EfOmI58f3rsRHfg1K86ZNxsZbJqfCFEkGQjuwHHnJDD/hQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0271.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:270::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 18:03:59 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Mon, 25 Sep 2023 18:03:59 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Sep 2023 20:04:54 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [jU6n9MLJbmGtqB3mGpZdi4j3W8HNQIK8] X-ClientProxiedBy: ZR0P278CA0083.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::16) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230925180457.2060101-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0271:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f5a65b0-638e-466d-088e-08dbbdf1cb02 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EiLCK/K52GfT7UiVz2laLA17P2ESE66CtghstnhnSO1d5wJHzqRGUbbcLYeXkFkC7BVr0GyRJu13ccW73x8esljGUubBd8DnUJDMIITh9eBUP5WuqFNrHrzgdDzj4vKlbKR0BSbfKP4FzznkoXVnDd7vipEUyI70/q90itVmuoeW5xSoQiW8bwuVtVv1uGsImCSvMW0Am9Mi/dmq6YbOw3BK9kqe33zYnrybKf8wpVcz1/VRKgue3kkMYF7DQFg0OdHh44tTX0aFuY0cIBq8aWYItRv9ZApZ3efcdHOzjjGHLS4d1QDyLFLBEmywdFXRYOcKlngtGR3JmO7jqKXj8FJQRsuxudcamWVtRWmtmOEHGx+2lxPoA/nDftnMVQ4YRdedgucFHvYP8VGrxQetCP7mTpk+TgpXJNOXfwu3v5Bz3b13O8Kwwm2rgyDpsZmch25ssZyyZ8VvaIZwqRDU3NVVRTPSmrKs6g4c+hWKsvJF08teYtWdEngNtFlW+uSpt11RUbjAbG1P4rZx/c4f6Yd9HOpdyi47shpS4HDrB2Z64lEickmq8hYmvpiJlL/7hFBMt2AiQIGSG5gRVGDhghUxDiMKJ3Qk8Drm4M7NrltP7Ytbc+6QNPqHgBEyVckY X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: erO7EQUkwul81IRjVxgQ4/1taY9SCCG3DDoXrgMtDhHdVEIIK1Y74LQeAf7xI4jFspl02VcdFDXJOZCDDsDym/hh3FlD7F+iHaytgsKa98slM6k9ecDK3caSDL9Navq/11k1lPVXBfarwEjbj1/drC++RnMfHUFYTBfZQUWgtRzLX4Fu74L8x2WTwo9pqSJULeofgzJ21O+Xx84a9VsPdSAXH1fv6EPYqY362IZrElct07gLwiuFgetAGUV8LAupivrgBfpWcqDgJXVy7jIj0b3YRg8SYeh/L0PZerQiVpgR8Ot1nT3hiCLMFcGq07EXGw6c0gZp5KOiMIanyKHjQDQSDeKMwqJTTE3WngnXj2/0VohSNlZPAw23mD9z6+G0Czeuz8FvPPA0oyeoX6Ayc7zf33HUiZr8yVUMBhKVn/jcmgVQgml0C1yus/woErYU4Xxf3TxA/lwwqhQL1l/hJBkB3A+mO3zJI4a82R3ZbET7fvM6AgbxkZGAX5rkI/WlFEdivZ1H9uBxmoeX3Zpzz2xnaLKa5nVScKA0uh7P5wg78ZnvfR8tl+24IxPMkDVk1dqlpzmHF6cbNu0JE9zn9hCyKRIbGcMLdmHTK9p5jOogKsNEj9HyG2T9Njch9MCvOBtVVKg0SmI/OAZKK2XCki6hlo9bMqvzS0KxO8my6YjjUwTwLo4z0ZO9djcsqcTg53NQ42o/k4iHT5FmwK/BQdmbCLdupGf0tpp8DsVuGJxiFWUN9OYfBcsm/b3RJ87JKlsH9HIMjdmjLl3YetsnZINUFtd3OXuZKaKohf/n5PfIWD1WW1r7ZFbB5rMNqTh0trxnHiRo+MFlRgZn4uzgLxFlw+8ZXGKitYAgobD7Wblkua8n+G4/fUq2/RQ5qRpMuAEb9BEIsNueGF0wnX5AaxQYfWjXT+ulhFzZXpiJ6MydTjaouwBqIVQGBdxn5kMkRvIX4ttOEuUSRHflFYWYEOAB1Hg6b4jdMeqwID2WcjU83qhLkEioPQjT5oHruMijN6wH8Ne/0SBjxXBHAsvOrKwlyXHSyEYFD+WHVQZbQaedGgwrzaC62TZuldQyNtkdwLPu8myJHv6G9YLc3p4TNyx4qDgX1EA1TZ5Ke0jWjvZQe78X7+IBi2Y9s0ZlBF/yvdbveAkpEddXFjMfD77YNbUFYuxwnkh9bPR/flMRTqBasFp33MvLT1AXt5lSu6tUfCD6kb29PWrqOLYzrgPHbKIsNKJYiCIS0Zy5r2/Ae9j2z92YwSPJOwkuW8MLE3Sw X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f5a65b0-638e-466d-088e-08dbbdf1cb02 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 18:03:59.6049 (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: DU2P250MB0271 Subject: [FFmpeg-devel] [PATCH 6/9] avcodec/snow: Split ff_snow_get_buffer() 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: 88mPEPvvlvCj The part of said function that is common to both encoder and decoder is negligible since c954cf1e1b766a0d1992d5be0a8be0055a8e1a6a and more than offset by the costs of "Am I an encoder?" checks. So move allocating the frames to the encoder and decoder directly. Also rename ff_snow_frame_start() to ff_snow_frames_prepare(), because a frame without a buffer has not been properly started. Signed-off-by: Andreas Rheinhardt --- libavcodec/snow.c | 46 +++++--------------------------------------- libavcodec/snow.h | 3 +-- libavcodec/snowdec.c | 9 ++++++++- libavcodec/snowenc.c | 29 ++++++++++++++++++++++++++-- 4 files changed, 41 insertions(+), 46 deletions(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 5eb3ee1e9e..09f2d60f47 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -22,7 +22,6 @@ #include "libavutil/thread.h" #include "avcodec.h" #include "decode.h" -#include "encode.h" #include "snow_dwt.h" #include "snow.h" #include "snowdata.h" @@ -61,36 +60,6 @@ void ff_snow_inner_add_yblock(const uint8_t *obmc, const int obmc_stride, uint8_ } } -int ff_snow_get_buffer(SnowContext *s, AVFrame *frame) -{ - int ret, i; - int edges_needed = av_codec_is_encoder(s->avctx->codec); - - frame->width = s->avctx->width ; - frame->height = s->avctx->height; - if (edges_needed) { - frame->width += 2 * EDGE_WIDTH; - frame->height += 2 * EDGE_WIDTH; - - ret = ff_encode_alloc_frame(s->avctx, frame); - } else - ret = ff_get_buffer(s->avctx, frame, AV_GET_BUFFER_FLAG_REF); - if (ret < 0) - return ret; - if (edges_needed) { - for (i = 0; frame->data[i]; i++) { - int offset = (EDGE_WIDTH >> (i ? s->chroma_v_shift : 0)) * - frame->linesize[i] + - (EDGE_WIDTH >> (i ? s->chroma_h_shift : 0)); - frame->data[i] += offset; - } - frame->width = s->avctx->width; - frame->height = s->avctx->height; - } - - return 0; -} - void ff_snow_reset_contexts(SnowContext *s){ //FIXME better initial contexts int plane_index, level, orientation; @@ -589,20 +558,21 @@ void ff_snow_release_buffer(AVCodecContext *avctx) } } -int ff_snow_frame_start(SnowContext *s){ +int ff_snow_frames_prepare(SnowContext *s) +{ AVFrame *tmp; - int i, ret; ff_snow_release_buffer(s->avctx); tmp= s->last_picture[s->max_ref_frames-1]; - for(i=s->max_ref_frames-1; i>0; i--) + for (int i = s->max_ref_frames - 1; i > 0; i--) s->last_picture[i] = s->last_picture[i-1]; s->last_picture[0] = s->current_picture; s->current_picture = tmp; if(s->keyframe){ s->ref_frames= 0; + s->current_picture->flags |= AV_FRAME_FLAG_KEY; }else{ int i; for(i=0; imax_ref_frames && s->last_picture[i]->data[0]; i++) @@ -613,14 +583,8 @@ int ff_snow_frame_start(SnowContext *s){ av_log(s->avctx,AV_LOG_ERROR, "No reference frames\n"); return AVERROR_INVALIDDATA; } - } - if ((ret = ff_snow_get_buffer(s, s->current_picture)) < 0) - return ret; - - if (s->keyframe) - s->current_picture->flags |= AV_FRAME_FLAG_KEY; - else s->current_picture->flags &= ~AV_FRAME_FLAG_KEY; + } return 0; } diff --git a/libavcodec/snow.h b/libavcodec/snow.h index ed0f9abb42..73c4535ec1 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -245,11 +245,10 @@ void ff_snow_common_end(SnowContext *s); void ff_snow_release_buffer(AVCodecContext *avctx); void ff_snow_reset_contexts(SnowContext *s); int ff_snow_alloc_blocks(SnowContext *s); -int ff_snow_frame_start(SnowContext *s); +int ff_snow_frames_prepare(SnowContext *s); void ff_snow_pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, ptrdiff_t stride, int sx, int sy, int b_w, int b_h, const BlockNode *block, int plane_index, int w, int h); -int ff_snow_get_buffer(SnowContext *s, AVFrame *frame); /* common inline functions */ //XXX doublecheck all of them should stay inlined diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index e014d5087f..489c09324e 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -24,6 +24,7 @@ #include "libavutil/opt.h" #include "avcodec.h" #include "codec_internal.h" +#include "decode.h" #include "snow_dwt.h" #include "snow.h" @@ -475,7 +476,13 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, ff_snow_alloc_blocks(s); - if((res = ff_snow_frame_start(s)) < 0) + if ((res = ff_snow_frames_prepare(s)) < 0) + return res; + + s->current_picture->width = s->avctx->width; + s->current_picture->height = s->avctx->height; + res = ff_get_buffer(s->avctx, s->current_picture, AV_GET_BUFFER_FLAG_REF); + if (res < 0) return res; s->current_picture->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 14a59ca67b..f954a686c1 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -39,6 +39,28 @@ #include "mpegvideo.h" #include "h263enc.h" +static int get_encode_buffer(SnowContext *s, AVFrame *frame) +{ + int ret; + + frame->width = s->avctx->width + 2 * EDGE_WIDTH; + frame->height = s->avctx->height + 2 * EDGE_WIDTH; + + ret = ff_encode_alloc_frame(s->avctx, frame); + if (ret < 0) + return ret; + for (int i = 0; frame->data[i]; i++) { + int offset = (EDGE_WIDTH >> (i ? s->chroma_v_shift : 0)) * + frame->linesize[i] + + (EDGE_WIDTH >> (i ? s->chroma_h_shift : 0)); + frame->data[i] += offset; + } + frame->width = s->avctx->width; + frame->height = s->avctx->height; + + return 0; +} + static av_cold int encode_init(AVCodecContext *avctx) { SnowContext *s = avctx->priv_data; @@ -140,7 +162,7 @@ static av_cold int encode_init(AVCodecContext *avctx) if (!s->input_picture) return AVERROR(ENOMEM); - if ((ret = ff_snow_get_buffer(s, s->input_picture)) < 0) + if ((ret = get_encode_buffer(s, s->input_picture)) < 0) return ret; if(s->motion_est == FF_ME_ITER){ @@ -1659,7 +1681,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, emms_c(); } - ff_snow_frame_start(s); + ff_snow_frames_prepare(s); + ret = get_encode_buffer(s, s->current_picture); + if (ret < 0) + return ret; s->m.current_picture_ptr= &s->m.current_picture; s->m.current_picture.f = s->current_picture; From patchwork Mon Sep 25 18:04:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43901 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp1403663pzh; Mon, 25 Sep 2023 11:04:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjKPTyJNAw2/OopHAhTWU8sJw25+cQWXtcLDKibhhi5NE8vqOWFT8mfhDgcaz3DB/DEAlE X-Received: by 2002:a17:906:cc5c:b0:9aa:e08:9fb7 with SMTP id mm28-20020a170906cc5c00b009aa0e089fb7mr6155127ejb.76.1695665081722; Mon, 25 Sep 2023 11:04:41 -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 s2-20020a170906bc4200b009a21af200f7si9314559ejv.993.2023.09.25.11.04.41; Mon, 25 Sep 2023 11:04:41 -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="LdMsZf/J"; 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 4E72968C9F0; Mon, 25 Sep 2023 21:04:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01olkn2036.outbound.protection.outlook.com [40.92.65.36]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8CAF468C9E4 for ; Mon, 25 Sep 2023 21:04:09 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=haidh8ny3m8xGfqP1ep6e6FWoEPmt4VnVklfSzO+2hpwHCbqD9jGfSXUAsbna5K9Tsidj5v23iIlJnsA4Ue6+34PLpiupZRcLxN2HLtioNvmzahD9ayUcCsWubVJbaO3bo13r7kjvmMCqilVEwU++j4KAOkntNVftmSd+5pAbeMXFNUi9yui1iMDAFo7QhWzSTc+y7Dr7E7LcjDGPaHuBUUharLczfHAyvHE9ot/Pb0XgSDqfs33s0KhKevnvOxixBgePb1R7eeZRcuswtvojgcDpPwuJI3WMmAZGuFtOEa3C5xffFxHNbqBSSimhQQVYX6hZjdJxLzlhyNlwryOjA== 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=s3xK22IbhPq9QkDBlAMuhXhGfiRrmCaAxxAwHfSffgo=; b=Eby3mWxcnrzx1LnGfwACGjYAXr6tufu8Q2f9KAFIQcqEUexakwkYmnSPdaUqJPBlk1LjA7fs4BUCvSSQsi0jLhdU37TBMd2KyRVahQSw1uLr9HT4p57i0MgiMvapDExWf6PwitfUxVpTV/zHatQA2s4hLDuZmNc4CeqeNKSJrzEuvp8GYLrUMdaguzECztWLYiOVpaMVQXQTTGY5Nv8ORmu6eTsu50XNFvZG4pW67pAU65V/TYgHF3jgRpcm1g0k7ySphTNG6e0nhMsitPW15DtDBkCjxwwgww2fqMv8Y2xDuWSBFLwwZxqmNYtH/qQ0ZwIeJyw7mBWFQhZU28GDGA== 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=s3xK22IbhPq9QkDBlAMuhXhGfiRrmCaAxxAwHfSffgo=; b=LdMsZf/Jxi6G9sXp487dBEU2npeZNQtz+Tdrtb2oiwsC6NPy8Y8w92Z7sZixRxgGy6sM/6D2Q9qWlqsjHhWIlHjbAVqMxGZnD3lNWsyl8huui1SU6xk3kZTDdezL6FMnZihnpoBUDDZkiPxZxYv1P09wRwPX3FciWAXC+81PUW+Pva6WxPauWGYIi/QrXDDsuIk82NHFyHLhV2gQeDgAnIdViRi1alRzB95C4+UUJKctY9kterCQfWRvvfWnWh5/aatBvDHXp1ZlpDPhjEOAk5zrdgu3zFfOd4lmsKtanATl56Ufgb+/KZF7t1EUlOOYme+SqAUY+bgKOzZMkX8pcw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0271.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:270::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 18:04:00 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Mon, 25 Sep 2023 18:04:00 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Sep 2023 20:04:55 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Zf7kU99vX9ebHGqdDkpYoMPk8m39RNVB] X-ClientProxiedBy: ZR0P278CA0083.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::16) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230925180457.2060101-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0271:EE_ X-MS-Office365-Filtering-Correlation-Id: d7991728-4dfa-4f02-4480-08dbbdf1cbca X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oKPXQVaThUovXxcQT8sn29d3sEvAbsz0kaUcERzXK6s7+Ao5aszYtQVuFwQ68NsL2/3ZtzYn/ryDOHX07f5Meooz7IVcDD36IB3gup/NYmfjygDgvLnmQhzBfYW0A+4IVP1MEcupwbeRk4YM/6jk2JERuUG2Cz3BJYxNUlM5rvXBx8d8m6Vf1XchNbUH60CYvZn6lmhM002+atrfvwpyt9I9CDQxMrfETkerwzq3Kwg21+0hJigOc2s8TirDvElZlnAODua5LnmI3FGF5bFpuOs/ksx6xMWy0VHPNqMPVdfJhzx7ft44peojnw965bJGUGuSEzXQ6dUc+B08fB+LprJYNKZp0r+CUgBiG6ngFDILBCnFKkkdXZR/nF6s6OVgTLO1N4ZdtMjzp3eSbL+YgWsknl5xbvmtmTVMcQxFHHfEvwc18rq09EvtGU33o2lW01jBy1ZU5SN105STdniejMhMyWzrjx8Dr4X5CijC1r5fslWTmdPN6R4qrzbEpDaUXjXyrLZh5ZvfJ5HBf9YAEuW7WY5I5wJNBbERU1TbPsThM8EuOWVtlW0Cl74IRzbgYhZae3+D3XTL9E6PnDWfuNQd2IzPqWLXYS0oscmOwtFEWL9TV3vzw8dK/z37Fwiu X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gjcd35fdl4+9dJYD0ezhRxFAgevmWQa28uxpouPHjW6z0FLSXwpj+o7L06L/RSYZPrze9HZDKfrdHEX+tBKnFMRBSWqJbR6nYdjtF2v2Ts8i0W6SvE/h8XJFYL1AANXGnf4IQ7XEDfa94dFtMRdYUDyiEh3BaWebSekuKyGchCeP6zMSYEp4W/y/dYlYtiH7Xchcwjhk1uuwB5U3wR2U48PvgmLsoH4TkAuU73Hd96p821kiBJhhxCcktHyObcv6QC5vg+sZl9RehzdVnYVeOXw8jsYrDnASoX7+Uq4rnDShq/WQQHigHBb3SeQ7u4IR7jcXM+MkXdiALsp5aXsVuTpTLyZh01psQwBlSnZQfMzn/lqg/IIRI6Hbf+KwfpvGss7w3d/r+TsPzHQvqjWzFQHKrl9Ezyq3NSjls7d47keLsTrC/8CETXnllmTXuAJrIz1EOBIHUN6402M7gaVjU4uJK0Mv7g3nvlVE/edSKmgQdXtpyb+G64SiWHVr4DP+Hb+iSFFTbxVyxy3/XrnOTbftqSEQzmkwZzcY4pyIDOQ1hnrg8bFoHQfTh+EhUFbKW7p5APxUCuMiV05yq/t/Ewbnf+7BPldrjCmy+WbSR2m6fO5ml8d4TdvtHfrPGuC7k7Thaj668UpNNKFKjfreTElBJKy3hvmcuaLlfLmwX62D26w8f5ytKBgwtTbHLbmzfKvAQvwXpB/gxHNpiS11a++Jy9BgXDeaHzc6oqCezibSKHsasVYIHOfMDTcai+pXe7nnahqfO/F13v+v23UI7kf1KBJToRcXpKw2IPgSjVTiC6fme7XXw16uMXYX5H6mWl19qE09lclyF1BlH1SC4YhHrOZ1Nwa1YFiF2o2JjwcYD9J6WXN9gYbi1tDMRpD9SU3gDy9ukUbvrJ0N/gPOU754M/hmW0hiDOA09/YJQ0ljh6VqQemmABM9ilGdvGP3HdVDlgcqT+dHHj+3RZKJU+yeURg+ff5RlMkaSl6FT2jciwVH7tK1i6CsuyNb5QIvxiFzB2yT4c9zIbRQaYU13HI6WRnmTuK+UAohP8do+BiXG08YDpQBmqav2zVGtZ9BT7TnzT+mgrvaie8LuDR087rQNp+8wXtqblmb1EhJpbyQmqUyEmfJ1efms0yiaTjrgpBNJN7wcQUZp+bC4LJNzcHDcYlbFDXV898uwQTLoNf51NpQdAkYVzCV7PQCSBLMe2DwbyAzj/enbh/De8FKUlaFyYNabjUt5ijpBhewUoXh8SgqOOixGS++s9ByMyvo X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7991728-4dfa-4f02-4480-08dbbdf1cbca X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 18:04:00.8973 (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: DU2P250MB0271 Subject: [FFmpeg-devel] [PATCH 7/9] avcodec/snow: Move decoder parts out of ff_snow_common_init_after_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: SPB+Rq94F0ax They are not common. Furthermore, this file is pulled in when linking checkasm and up until now, the calls to ff_get_buffer() and av_codec_is_decoder() caused all of libavcodec to be pulled in as well. Besides being bad size-wise this also has the downside that it pulls in avpriv_(cga|vga16)_font from libavutil which are marked as being imported from another library when building libavcodec as a DLL; this breaks checkasm because it links both lavc and lavu statically. Signed-off-by: Andreas Rheinhardt --- libavcodec/snow.c | 15 +-------------- libavcodec/snowdec.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 09f2d60f47..90197976fb 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -21,7 +21,6 @@ #include "libavutil/log.h" #include "libavutil/thread.h" #include "avcodec.h" -#include "decode.h" #include "snow_dwt.h" #include "snow.h" #include "snowdata.h" @@ -476,27 +475,15 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ int ff_snow_common_init_after_header(AVCodecContext *avctx) { SnowContext *s = avctx->priv_data; int plane_index, level, orientation; - int ret, emu_buf_size; if(!s->scratchbuf) { - if (av_codec_is_decoder(avctx->codec)) { - if ((ret = ff_get_buffer(s->avctx, s->mconly_picture, - AV_GET_BUFFER_FLAG_REF)) < 0) - return ret; - } - + int emu_buf_size; emu_buf_size = FFMAX(s->mconly_picture->linesize[0], 2*avctx->width+256) * (2 * MB_SIZE + HTAPS_MAX - 1); if (!FF_ALLOCZ_TYPED_ARRAY(s->scratchbuf, FFMAX(s->mconly_picture->linesize[0], 2*avctx->width+256) * 7 * MB_SIZE) || !FF_ALLOCZ_TYPED_ARRAY(s->emu_edge_buffer, emu_buf_size)) return AVERROR(ENOMEM); } - if (av_codec_is_decoder(avctx->codec) && - s->mconly_picture->format != avctx->pix_fmt) { - av_log(avctx, AV_LOG_ERROR, "pixel format changed\n"); - return AVERROR_INVALIDDATA; - } - for(plane_index=0; plane_index < s->nb_planes; plane_index++){ int w= s->avctx->width; int h= s->avctx->height; diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 489c09324e..e77dc8ce8a 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -455,6 +455,17 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, s->current_picture->pict_type= AV_PICTURE_TYPE_I; //FIXME I vs. P if ((res = decode_header(s)) < 0) return res; + + if (!s->mconly_picture->data[0]) { + res = ff_get_buffer(avctx, s->mconly_picture, AV_GET_BUFFER_FLAG_REF); + if (res < 0) + return res; + } + if (s->mconly_picture->format != avctx->pix_fmt) { + av_log(avctx, AV_LOG_ERROR, "pixel format changed\n"); + return AVERROR_INVALIDDATA; + } + if ((res=ff_snow_common_init_after_header(avctx)) < 0) return res; From patchwork Mon Sep 25 18:04:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43902 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp1403790pzh; Mon, 25 Sep 2023 11:04:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJWRWzSpo6GsqPYGR8+8VUqQN0eO/ZxsbPTrCgqZtaktPP6nlAcCfg8K8fAulG0caw8ojd X-Received: by 2002:a17:906:8a68:b0:9a9:e3a9:af02 with SMTP id hy8-20020a1709068a6800b009a9e3a9af02mr6860943ejc.8.1695665093238; Mon, 25 Sep 2023 11:04:53 -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 o26-20020a1709062e9a00b00992b75d594csi9209356eji.317.2023.09.25.11.04.52; Mon, 25 Sep 2023 11:04:53 -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=TU6jGsXJ; 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 62AF468C9F1; Mon, 25 Sep 2023 21:04:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01olkn2036.outbound.protection.outlook.com [40.92.65.36]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC68A68C9EB for ; Mon, 25 Sep 2023 21:04:09 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TYOQMp4brecPGu17Em13IHFHNJzgIW0egiLwgIm58PNojPkI2XXJqV+npNyo7rlE/0dUMCtGLgJgE7sK5kpaGY5JpqmA/Qjh0KooLkzPK91f5TB3OYd3eRTAqhID/Q5yDjmVMpYBCvmnj62q8jBHfW26RweCjz2fg/Jr0eMxhrOs26lnSoTQ/020Z+Qb21sBFM4CY6gDeazn9kE6UN4SM6Yq2VDiMOwu5nu0ucFsA7nAEpIq2WTyb7b3i//HEiuP0KmeUiPP3xMmAhq0k3ww2IOiZ4T+zks+u0A2uMKzjlenNOdPzt+DtTzJHkLgXHZlJv9d/AS9TkewA4OGEuCIkA== 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=0mWVLCzi8uhFAIsmtwqMl239JctCIhkg7NFktlbSjbk=; b=BKk1RSsAW2Qmc0q2p0+GGNl4ezBeN9qYOjo+wQbXAvNHJJE/yRxO9CXmy5DyLV9g9QuY54RhSwG8oGA5PHRE9l3DVj9Us1YmXUvZgBSsezrYy2mJpS0EZKvUfpKWJCsFvwOH9Naxa6R1FfGIaVe0r5AbXR/HJPbiNOwIMh39GKK3amHj5rEA0+dMfq20cHKfXuo56QWZ6Tgn0D8IlbBnY3ktPu1YxDdxO6ovNv3sTpEHmc/HXHBiODbwyIh7BA8CDJlgcyjv6902TPnQvSkgwaI7XEHZpmqm2tZdyMfoysUKj2HS9HJ8MqLW0fW/2Ubx7Fo0bzrMIZj0JaV49q1swg== 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=0mWVLCzi8uhFAIsmtwqMl239JctCIhkg7NFktlbSjbk=; b=TU6jGsXJtBOoZ31AEx1xOvmAOPfHnVRsZRpeEg9ftQnsjm09hP5AhZrWbP4gj2auxv9PfSRqgoK3K4VcSIFPNEem5OCT5ayamL50LAlRfWxM5Irb2G51ep+sC9p5FCKIII8xNzuPsk07xkLnUVvSmySRBzKIIZbmvICGoI/FqI6Q8xX/GPM+72SBPyTd88uXKHpCgCUutbMAqfrMCFrRbzVgDrm0Vtzp9GnOjIkanmjefdpEHwUwk3MZy+jZLfjr6PhniNKL76jTS+8yeP6YonhI23fOx5u5HGOplzu8nSPQyVmqYQ09JgR0wYsyfr3n8kNoQoH/Rm1u8VeB+ZbLcQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0271.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:270::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 18:04:02 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Mon, 25 Sep 2023 18:04:01 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Sep 2023 20:04:56 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [ebplLvhog+zETlveyrZ/b5pKwdydzzGt] X-ClientProxiedBy: ZR0P278CA0083.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::16) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230925180457.2060101-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0271:EE_ X-MS-Office365-Filtering-Correlation-Id: f3db7c9d-7f3a-49f9-37a6-08dbbdf1cc65 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jWYSShVzUHjgDXH1y6qO1LqA4ZW/XA1X2z4E2dgJsI9DLh0Bvi2DCL3gGloNx5gfsBWLA2LuaBFLAkayI9w9gwKDmQd/vUhC6csniXdxqEpHhHTfzftVE/PEJnPdUYpfId/IFVsttjzlHnc6az5F31w0wONdVsw7m8CYXtr7Gu4WdBtnCLZnCtiVgVJtIcbFIJRKaTA84pvyz9P6Vg3lokCjcGFBF48GTvsj/7R3BqU21yxaDUtuLJo+dfx/CHGuDGGfc+0HkxyIJbOvinwnUIXFqW8yKbUUR0N7loLQPZoV1ahgELV2N9YgBkSwY90ENmakh2X6oDDwzfVeXRa+zaZA8x8nEv6I3Y195A6pyDVrBE8g0dlAhrdu4VTGfAv/+aDm5ej2cYwus2JQZsuGaCUtTcD/mTSEBOc1QppC0fdtAL5vnT/w7OPwXbFei2+bV+7O77PsjcmhSQ/n6dAsmgQRv67RmyTbD7TXjKqdgH0/Yn6f3ZvpQKZtn9Fz7omBmIEueAA6Rc2zxnfCz7raJ005wyPAf/HFtVfEiFLaPrF20SptYOGxfIs3D9WN8d09gNdGicd0RKfXIWz3mmLa0fgktYZP2aehHoBA4dvrl7cxTi3WOvRJq2yg/Fc/9s/1 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WZsd0UxlA0pZ+G8r4PRzj8NeQQe0/wrqcQnHPkD2HJ2ejkRGjpgoHDfbYF11UqQ7WARHrZt39m1nXeYtQ6EhO9Nv4Q1CKK5mB+NL813JA40zkMNow602EALoG9utbfali0+qyl1DhXtexaWRjpvguT1vH9t7faba2eVtHVEh9Yf8xusjMNVKB5nz2nDto5K321R/Th35//HxbhI8aJoI7tEOcsd6iM7CrTZx95l0F1lo4wDtxX59suLkCQzMjn+dTro/fFyf6j/jiHc9LpkqT8NK9WkdilngCWGOkylJxXNLwBw2Yhpuj/ii11kVrxT1/UToxcUoRjfdpRjgz2g2o4SiYAzCfJgFgqfUCiWUhy4c9jr94PqyKV1m0yIpQ4TXIf851KaSqu+HDINZMAW4SUTLXFUpCSshWQX89cal091PBeE/KxLOWyKSVcqS2qSCGG6hWZvsSQ3X6CpI97TvnRsG4DwqitcWTbfWgdnSz0DV/aLYO8RS8fzWyCai00qw4nFxBQIlhl3w+y5mbIxbfzmTBRdFIjAnzhxWZBvQB7cc5g+eRmAlBTl62bwSV94P4THhvqobSYKOjNfkIQntbx+qJCfOKVokPKmxetFDP4uyGULgjI5I0H+u3/CAzL9bj67kAiIjahlEnTlQ++Mjdot1lWmS6HJCYm/icRoJCm1G9wmB3HJo/scVl/cS+6Cmo6YoJ58qcVbxGPI3+xjwC2Ieo5x6/5B75HKurfXAijpegsibrU8YLFy8A4bn6F7ydWAEtWUGmHUZ0mAcVrL/xRtn3ly+QsqJq9ONUe+qeTC2ZeW4g4FoiYjMvK85Gmy1JxUXFBTW2d2JlqB1HMMUpgOy2o4aNsa+CdS4SYQQAmuGm+bZU0xDc12dB7o448SBPKHYq+X9PibEY1hNVvqS4ReG+7Wai7XHOmqfQFwG7PfdvraMtFZmDFiwZLeA/i/XWS+vckQwxkYNYOiydst6XQWWGSqaO3dpVGsfCW4zyin9pqpheyQodTb3ounUE9VOlPLZGKBRoJbfgY74AuCcEqt8AD91xlWCJOuTHAExPhp33M/xPeivmzUirakghl0SqZOdtR1oWv7F01WtOvaq7vwL9uupVYW8Eut9ieoiEqtxaX/qoM4P4hD8x4kRsJuBjOvGUeJPuXi0Y/HYIFJldJwYIQbs1xjMRiXGNwXh3lnyBJJhw+mTRFTpN+hCAy87OmFwjvlpHV4/QO2syVFjGAV4a0Qr7Dhlw6FrpSkvNLbt90Er43juwZ+KKJ0aQiZK X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3db7c9d-7f3a-49f9-37a6-08dbbdf1cc65 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 18:04:01.9728 (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: DU2P250MB0271 Subject: [FFmpeg-devel] [PATCH 8/9] avcodec/aacsbrdata: Move ff_sbr_noise_table to sbrdsp_template.c 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: Ek9ejXaq+AE6 ff_sbr_noise_table is only used by SBR DSP code and sbrdsp.h is the header providing its declaration. Furthermore, this ensures that checkasm does not pull the whole AAC SBR and PS code in. Signed-off-by: Andreas Rheinhardt --- libavcodec/aacsbrdata.h | 266 ---------------------------------- libavcodec/sbrdsp_template.c | 267 +++++++++++++++++++++++++++++++++++ 2 files changed, 267 insertions(+), 266 deletions(-) diff --git a/libavcodec/aacsbrdata.h b/libavcodec/aacsbrdata.h index 7bb45b229e..af86af01c2 100644 --- a/libavcodec/aacsbrdata.h +++ b/libavcodec/aacsbrdata.h @@ -29,7 +29,6 @@ #define AVCODEC_AACSBRDATA_H #include -#include "libavutil/attributes_internal.h" #include "libavutil/mem_internal.h" #include "aac_defines.h" @@ -268,271 +267,6 @@ static const int8_t sbr_offset[6][16] = { {-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20, 24}, // 64000 Hz < fs_sbr }; -/* First eight entries repeated at end to simplify SIMD implementations. */ -const attribute_visibility_hidden DECLARE_ALIGNED(16, INTFLOAT, AAC_RENAME(ff_sbr_noise_table))[][2] = { -{Q31(-0.99948153278296f), Q31(-0.59483417516607f)}, {Q31( 0.97113454393991f), Q31(-0.67528515225647f)}, -{Q31( 0.14130051758487f), Q31(-0.95090983575689f)}, {Q31(-0.47005496701697f), Q31(-0.37340549728647f)}, -{Q31( 0.80705063769351f), Q31( 0.29653668284408f)}, {Q31(-0.38981478896926f), Q31( 0.89572605717087f)}, -{Q31(-0.01053049862020f), Q31(-0.66959058036166f)}, {Q31(-0.91266367957293f), Q31(-0.11522938140034f)}, -{Q31( 0.54840422910309f), Q31( 0.75221367176302f)}, {Q31( 0.40009252867955f), Q31(-0.98929400334421f)}, -{Q31(-0.99867974711855f), Q31(-0.88147068645358f)}, {Q31(-0.95531076805040f), Q31( 0.90908757154593f)}, -{Q31(-0.45725933317144f), Q31(-0.56716323646760f)}, {Q31(-0.72929675029275f), Q31(-0.98008272727324f)}, -{Q31( 0.75622801399036f), Q31( 0.20950329995549f)}, {Q31( 0.07069442601050f), Q31(-0.78247898470706f)}, -{Q31( 0.74496252926055f), Q31(-0.91169004445807f)}, {Q31(-0.96440182703856f), Q31(-0.94739918296622f)}, -{Q31( 0.30424629369539f), Q31(-0.49438267012479f)}, {Q31( 0.66565033746925f), Q31( 0.64652935542491f)}, -{Q31( 0.91697008020594f), Q31( 0.17514097332009f)}, {Q31(-0.70774918760427f), Q31( 0.52548653416543f)}, -{Q31(-0.70051415345560f), Q31(-0.45340028808763f)}, {Q31(-0.99496513054797f), Q31(-0.90071908066973f)}, -{Q31( 0.98164490790123f), Q31(-0.77463155528697f)}, {Q31(-0.54671580548181f), Q31(-0.02570928536004f)}, -{Q31(-0.01689629065389f), Q31( 0.00287506445732f)}, {Q31(-0.86110349531986f), Q31( 0.42548583726477f)}, -{Q31(-0.98892980586032f), Q31(-0.87881132267556f)}, {Q31( 0.51756627678691f), Q31( 0.66926784710139f)}, -{Q31(-0.99635026409640f), Q31(-0.58107730574765f)}, {Q31(-0.99969370862163f), Q31( 0.98369989360250f)}, -{Q31( 0.55266258627194f), Q31( 0.59449057465591f)}, {Q31( 0.34581177741673f), Q31( 0.94879421061866f)}, -{Q31( 0.62664209577999f), Q31(-0.74402970906471f)}, {Q31(-0.77149701404973f), Q31(-0.33883658042801f)}, -{Q31(-0.91592244254432f), Q31( 0.03687901376713f)}, {Q31(-0.76285492357887f), Q31(-0.91371867919124f)}, -{Q31( 0.79788337195331f), Q31(-0.93180971199849f)}, {Q31( 0.54473080610200f), Q31(-0.11919206037186f)}, -{Q31(-0.85639281671058f), Q31( 0.42429854760451f)}, {Q31(-0.92882402971423f), Q31( 0.27871809078609f)}, -{Q31(-0.11708371046774f), Q31(-0.99800843444966f)}, {Q31( 0.21356749817493f), Q31(-0.90716295627033f)}, -{Q31(-0.76191692573909f), Q31( 0.99768118356265f)}, {Q31( 0.98111043100884f), Q31(-0.95854459734407f)}, -{Q31(-0.85913269895572f), Q31( 0.95766566168880f)}, {Q31(-0.93307242253692f), Q31( 0.49431757696466f)}, -{Q31( 0.30485754879632f), Q31(-0.70540034357529f)}, {Q31( 0.85289650925190f), Q31( 0.46766131791044f)}, -{Q31( 0.91328082618125f), Q31(-0.99839597361769f)}, {Q31(-0.05890199924154f), Q31( 0.70741827819497f)}, -{Q31( 0.28398686150148f), Q31( 0.34633555702188f)}, {Q31( 0.95258164539612f), Q31(-0.54893416026939f)}, -{Q31(-0.78566324168507f), Q31(-0.75568541079691f)}, {Q31(-0.95789495447877f), Q31(-0.20423194696966f)}, -{Q31( 0.82411158711197f), Q31( 0.96654618432562f)}, {Q31(-0.65185446735885f), Q31(-0.88734990773289f)}, -{Q31(-0.93643603134666f), Q31( 0.99870790442385f)}, {Q31( 0.91427159529618f), Q31(-0.98290505544444f)}, -{Q31(-0.70395684036886f), Q31( 0.58796798221039f)}, {Q31( 0.00563771969365f), Q31( 0.61768196727244f)}, -{Q31( 0.89065051931895f), Q31( 0.52783352697585f)}, {Q31(-0.68683707712762f), Q31( 0.80806944710339f)}, -{Q31( 0.72165342518718f), Q31(-0.69259857349564f)}, {Q31(-0.62928247730667f), Q31( 0.13627037407335f)}, -{Q31( 0.29938434065514f), Q31(-0.46051329682246f)}, {Q31(-0.91781958879280f), Q31(-0.74012716684186f)}, -{Q31( 0.99298717043688f), Q31( 0.40816610075661f)}, {Q31( 0.82368298622748f), Q31(-0.74036047190173f)}, -{Q31(-0.98512833386833f), Q31(-0.99972330709594f)}, {Q31(-0.95915368242257f), Q31(-0.99237800466040f)}, -{Q31(-0.21411126572790f), Q31(-0.93424819052545f)}, {Q31(-0.68821476106884f), Q31(-0.26892306315457f)}, -{Q31( 0.91851997982317f), Q31( 0.09358228901785f)}, {Q31(-0.96062769559127f), Q31( 0.36099095133739f)}, -{Q31( 0.51646184922287f), Q31(-0.71373332873917f)}, {Q31( 0.61130721139669f), Q31( 0.46950141175917f)}, -{Q31( 0.47336129371299f), Q31(-0.27333178296162f)}, {Q31( 0.90998308703519f), Q31( 0.96715662938132f)}, -{Q31( 0.44844799194357f), Q31( 0.99211574628306f)}, {Q31( 0.66614891079092f), Q31( 0.96590176169121f)}, -{Q31( 0.74922239129237f), Q31(-0.89879858826087f)}, {Q31(-0.99571588506485f), Q31( 0.52785521494349f)}, -{Q31( 0.97401082477563f), Q31(-0.16855870075190f)}, {Q31( 0.72683747733879f), Q31(-0.48060774432251f)}, -{Q31( 0.95432193457128f), Q31( 0.68849603408441f)}, {Q31(-0.72962208425191f), Q31(-0.76608443420917f)}, -{Q31(-0.85359479233537f), Q31( 0.88738125901579f)}, {Q31(-0.81412430338535f), Q31(-0.97480768049637f)}, -{Q31(-0.87930772356786f), Q31( 0.74748307690436f)}, {Q31(-0.71573331064977f), Q31(-0.98570608178923f)}, -{Q31( 0.83524300028228f), Q31( 0.83702537075163f)}, {Q31(-0.48086065601423f), Q31(-0.98848504923531f)}, -{Q31( 0.97139128574778f), Q31( 0.80093621198236f)}, {Q31( 0.51992825347895f), Q31( 0.80247631400510f)}, -{Q31(-0.00848591195325f), Q31(-0.76670128000486f)}, {Q31(-0.70294374303036f), Q31( 0.55359910445577f)}, -{Q31(-0.95894428168140f), Q31(-0.43265504344783f)}, {Q31( 0.97079252950321f), Q31( 0.09325857238682f)}, -{Q31(-0.92404293670797f), Q31( 0.85507704027855f)}, {Q31(-0.69506469500450f), Q31( 0.98633412625459f)}, -{Q31( 0.26559203620024f), Q31( 0.73314307966524f)}, {Q31( 0.28038443336943f), Q31( 0.14537913654427f)}, -{Q31(-0.74138124825523f), Q31( 0.99310339807762f)}, {Q31(-0.01752795995444f), Q31(-0.82616635284178f)}, -{Q31(-0.55126773094930f), Q31(-0.98898543862153f)}, {Q31( 0.97960898850996f), Q31(-0.94021446752851f)}, -{Q31(-0.99196309146936f), Q31( 0.67019017358456f)}, {Q31(-0.67684928085260f), Q31( 0.12631491649378f)}, -{Q31( 0.09140039465500f), Q31(-0.20537731453108f)}, {Q31(-0.71658965751996f), Q31(-0.97788200391224f)}, -{Q31( 0.81014640078925f), Q31( 0.53722648362443f)}, {Q31( 0.40616991671205f), Q31(-0.26469008598449f)}, -{Q31(-0.67680188682972f), Q31( 0.94502052337695f)}, {Q31( 0.86849774348749f), Q31(-0.18333598647899f)}, -{Q31(-0.99500381284851f), Q31(-0.02634122068550f)}, {Q31( 0.84329189340667f), Q31( 0.10406957462213f)}, -{Q31(-0.09215968531446f), Q31( 0.69540012101253f)}, {Q31( 0.99956173327206f), Q31(-0.12358542001404f)}, -{Q31(-0.79732779473535f), Q31(-0.91582524736159f)}, {Q31( 0.96349973642406f), Q31( 0.96640458041000f)}, -{Q31(-0.79942778496547f), Q31( 0.64323902822857f)}, {Q31(-0.11566039853896f), Q31( 0.28587846253726f)}, -{Q31(-0.39922954514662f), Q31( 0.94129601616966f)}, {Q31( 0.99089197565987f), Q31(-0.92062625581587f)}, -{Q31( 0.28631285179909f), Q31(-0.91035047143603f)}, {Q31(-0.83302725605608f), Q31(-0.67330410892084f)}, -{Q31( 0.95404443402072f), Q31( 0.49162765398743f)}, {Q31(-0.06449863579434f), Q31( 0.03250560813135f)}, -{Q31(-0.99575054486311f), Q31( 0.42389784469507f)}, {Q31(-0.65501142790847f), Q31( 0.82546114655624f)}, -{Q31(-0.81254441908887f), Q31(-0.51627234660629f)}, {Q31(-0.99646369485481f), Q31( 0.84490533520752f)}, -{Q31( 0.00287840603348f), Q31( 0.64768261158166f)}, {Q31( 0.70176989408455f), Q31(-0.20453028573322f)}, -{Q31( 0.96361882270190f), Q31( 0.40706967140989f)}, {Q31(-0.68883758192426f), Q31( 0.91338958840772f)}, -{Q31(-0.34875585502238f), Q31( 0.71472290693300f)}, {Q31( 0.91980081243087f), Q31( 0.66507455644919f)}, -{Q31(-0.99009048343881f), Q31( 0.85868021604848f)}, {Q31( 0.68865791458395f), Q31( 0.55660316809678f)}, -{Q31(-0.99484402129368f), Q31(-0.20052559254934f)}, {Q31( 0.94214511408023f), Q31(-0.99696425367461f)}, -{Q31(-0.67414626793544f), Q31( 0.49548221180078f)}, {Q31(-0.47339353684664f), Q31(-0.85904328834047f)}, -{Q31( 0.14323651387360f), Q31(-0.94145598222488f)}, {Q31(-0.29268293575672f), Q31( 0.05759224927952f)}, -{Q31( 0.43793861458754f), Q31(-0.78904969892724f)}, {Q31(-0.36345126374441f), Q31( 0.64874435357162f)}, -{Q31(-0.08750604656825f), Q31( 0.97686944362527f)}, {Q31(-0.96495267812511f), Q31(-0.53960305946511f)}, -{Q31( 0.55526940659947f), Q31( 0.78891523734774f)}, {Q31( 0.73538215752630f), Q31( 0.96452072373404f)}, -{Q31(-0.30889773919437f), Q31(-0.80664389776860f)}, {Q31( 0.03574995626194f), Q31(-0.97325616900959f)}, -{Q31( 0.98720684660488f), Q31( 0.48409133691962f)}, {Q31(-0.81689296271203f), Q31(-0.90827703628298f)}, -{Q31( 0.67866860118215f), Q31( 0.81284503870856f)}, {Q31(-0.15808569732583f), Q31( 0.85279555024382f)}, -{Q31( 0.80723395114371f), Q31(-0.24717418514605f)}, {Q31( 0.47788757329038f), Q31(-0.46333147839295f)}, -{Q31( 0.96367554763201f), Q31( 0.38486749303242f)}, {Q31(-0.99143875716818f), Q31(-0.24945277239809f)}, -{Q31( 0.83081876925833f), Q31(-0.94780851414763f)}, {Q31(-0.58753191905341f), Q31( 0.01290772389163f)}, -{Q31( 0.95538108220960f), Q31(-0.85557052096538f)}, {Q31(-0.96490920476211f), Q31(-0.64020970923102f)}, -{Q31(-0.97327101028521f), Q31( 0.12378128133110f)}, {Q31( 0.91400366022124f), Q31( 0.57972471346930f)}, -{Q31(-0.99925837363824f), Q31( 0.71084847864067f)}, {Q31(-0.86875903507313f), Q31(-0.20291699203564f)}, -{Q31(-0.26240034795124f), Q31(-0.68264554369108f)}, {Q31(-0.24664412953388f), Q31(-0.87642273115183f)}, -{Q31( 0.02416275806869f), Q31( 0.27192914288905f)}, {Q31( 0.82068619590515f), Q31(-0.85087787994476f)}, -{Q31( 0.88547373760759f), Q31(-0.89636802901469f)}, {Q31(-0.18173078152226f), Q31(-0.26152145156800f)}, -{Q31( 0.09355476558534f), Q31( 0.54845123045604f)}, {Q31(-0.54668414224090f), Q31( 0.95980774020221f)}, -{Q31( 0.37050990604091f), Q31(-0.59910140383171f)}, {Q31(-0.70373594262891f), Q31( 0.91227665827081f)}, -{Q31(-0.34600785879594f), Q31(-0.99441426144200f)}, {Q31(-0.68774481731008f), Q31(-0.30238837956299f)}, -{Q31(-0.26843291251234f), Q31( 0.83115668004362f)}, {Q31( 0.49072334613242f), Q31(-0.45359708737775f)}, -{Q31( 0.38975993093975f), Q31( 0.95515358099121f)}, {Q31(-0.97757125224150f), Q31( 0.05305894580606f)}, -{Q31(-0.17325552859616f), Q31(-0.92770672250494f)}, {Q31( 0.99948035025744f), Q31( 0.58285545563426f)}, -{Q31(-0.64946246527458f), Q31( 0.68645507104960f)}, {Q31(-0.12016920576437f), Q31(-0.57147322153312f)}, -{Q31(-0.58947456517751f), Q31(-0.34847132454388f)}, {Q31(-0.41815140454465f), Q31( 0.16276422358861f)}, -{Q31( 0.99885650204884f), Q31( 0.11136095490444f)}, {Q31(-0.56649614128386f), Q31(-0.90494866361587f)}, -{Q31( 0.94138021032330f), Q31( 0.35281916733018f)}, {Q31(-0.75725076534641f), Q31( 0.53650549640587f)}, -{Q31( 0.20541973692630f), Q31(-0.94435144369918f)}, {Q31( 0.99980371023351f), Q31( 0.79835913565599f)}, -{Q31( 0.29078277605775f), Q31( 0.35393777921520f)}, {Q31(-0.62858772103030f), Q31( 0.38765693387102f)}, -{Q31( 0.43440904467688f), Q31(-0.98546330463232f)}, {Q31(-0.98298583762390f), Q31( 0.21021524625209f)}, -{Q31( 0.19513029146934f), Q31(-0.94239832251867f)}, {Q31(-0.95476662400101f), Q31( 0.98364554179143f)}, -{Q31( 0.93379635304810f), Q31(-0.70881994583682f)}, {Q31(-0.85235410573336f), Q31(-0.08342347966410f)}, -{Q31(-0.86425093011245f), Q31(-0.45795025029466f)}, {Q31( 0.38879779059045f), Q31( 0.97274429344593f)}, -{Q31( 0.92045124735495f), Q31(-0.62433652524220f)}, {Q31( 0.89162532251878f), Q31( 0.54950955570563f)}, -{Q31(-0.36834336949252f), Q31( 0.96458298020975f)}, {Q31( 0.93891760988045f), Q31(-0.89968353740388f)}, -{Q31( 0.99267657565094f), Q31(-0.03757034316958f)}, {Q31(-0.94063471614176f), Q31( 0.41332338538963f)}, -{Q31( 0.99740224117019f), Q31(-0.16830494996370f)}, {Q31(-0.35899413170555f), Q31(-0.46633226649613f)}, -{Q31( 0.05237237274947f), Q31(-0.25640361602661f)}, {Q31( 0.36703583957424f), Q31(-0.38653265641875f)}, -{Q31( 0.91653180367913f), Q31(-0.30587628726597f)}, {Q31( 0.69000803499316f), Q31( 0.90952171386132f)}, -{Q31(-0.38658751133527f), Q31( 0.99501571208985f)}, {Q31(-0.29250814029851f), Q31( 0.37444994344615f)}, -{Q31(-0.60182204677608f), Q31( 0.86779651036123f)}, {Q31(-0.97418588163217f), Q31( 0.96468523666475f)}, -{Q31( 0.88461574003963f), Q31( 0.57508405276414f)}, {Q31( 0.05198933055162f), Q31( 0.21269661669964f)}, -{Q31(-0.53499621979720f), Q31( 0.97241553731237f)}, {Q31(-0.49429560226497f), Q31( 0.98183865291903f)}, -{Q31(-0.98935142339139f), Q31(-0.40249159006933f)}, {Q31(-0.98081380091130f), Q31(-0.72856895534041f)}, -{Q31(-0.27338148835532f), Q31( 0.99950922447209f)}, {Q31( 0.06310802338302f), Q31(-0.54539587529618f)}, -{Q31(-0.20461677199539f), Q31(-0.14209977628489f)}, {Q31( 0.66223843141647f), Q31( 0.72528579940326f)}, -{Q31(-0.84764345483665f), Q31( 0.02372316801261f)}, {Q31(-0.89039863483811f), Q31( 0.88866581484602f)}, -{Q31( 0.95903308477986f), Q31( 0.76744927173873f)}, {Q31( 0.73504123909879f), Q31(-0.03747203173192f)}, -{Q31(-0.31744434966056f), Q31(-0.36834111883652f)}, {Q31(-0.34110827591623f), Q31( 0.40211222807691f)}, -{Q31( 0.47803883714199f), Q31(-0.39423219786288f)}, {Q31( 0.98299195879514f), Q31( 0.01989791390047f)}, -{Q31(-0.30963073129751f), Q31(-0.18076720599336f)}, {Q31( 0.99992588229018f), Q31(-0.26281872094289f)}, -{Q31(-0.93149731080767f), Q31(-0.98313162570490f)}, {Q31( 0.99923472302773f), Q31(-0.80142993767554f)}, -{Q31(-0.26024169633417f), Q31(-0.75999759855752f)}, {Q31(-0.35712514743563f), Q31( 0.19298963768574f)}, -{Q31(-0.99899084509530f), Q31( 0.74645156992493f)}, {Q31( 0.86557171579452f), Q31( 0.55593866696299f)}, -{Q31( 0.33408042438752f), Q31( 0.86185953874709f)}, {Q31( 0.99010736374716f), Q31( 0.04602397576623f)}, -{Q31(-0.66694269691195f), Q31(-0.91643611810148f)}, {Q31( 0.64016792079480f), Q31( 0.15649530836856f)}, -{Q31( 0.99570534804836f), Q31( 0.45844586038111f)}, {Q31(-0.63431466947340f), Q31( 0.21079116459234f)}, -{Q31(-0.07706847005931f), Q31(-0.89581437101329f)}, {Q31( 0.98590090577724f), Q31( 0.88241721133981f)}, -{Q31( 0.80099335254678f), Q31(-0.36851896710853f)}, {Q31( 0.78368131392666f), Q31( 0.45506999802597f)}, -{Q31( 0.08707806671691f), Q31( 0.80938994918745f)}, {Q31(-0.86811883080712f), Q31( 0.39347308654705f)}, -{Q31(-0.39466529740375f), Q31(-0.66809432114456f)}, {Q31( 0.97875325649683f), Q31(-0.72467840967746f)}, -{Q31(-0.95038560288864f), Q31( 0.89563219587625f)}, {Q31( 0.17005239424212f), Q31( 0.54683053962658f)}, -{Q31(-0.76910792026848f), Q31(-0.96226617549298f)}, {Q31( 0.99743281016846f), Q31( 0.42697157037567f)}, -{Q31( 0.95437383549973f), Q31( 0.97002324109952f)}, {Q31( 0.99578905365569f), Q31(-0.54106826257356f)}, -{Q31( 0.28058259829990f), Q31(-0.85361420634036f)}, {Q31( 0.85256524470573f), Q31(-0.64567607735589f)}, -{Q31(-0.50608540105128f), Q31(-0.65846015480300f)}, {Q31(-0.97210735183243f), Q31(-0.23095213067791f)}, -{Q31( 0.95424048234441f), Q31(-0.99240147091219f)}, {Q31(-0.96926570524023f), Q31( 0.73775654896574f)}, -{Q31( 0.30872163214726f), Q31( 0.41514960556126f)}, {Q31(-0.24523839572639f), Q31( 0.63206633394807f)}, -{Q31(-0.33813265086024f), Q31(-0.38661779441897f)}, {Q31(-0.05826828420146f), Q31(-0.06940774188029f)}, -{Q31(-0.22898461455054f), Q31( 0.97054853316316f)}, {Q31(-0.18509915019881f), Q31( 0.47565762892084f)}, -{Q31(-0.10488238045009f), Q31(-0.87769947402394f)}, {Q31(-0.71886586182037f), Q31( 0.78030982480538f)}, -{Q31( 0.99793873738654f), Q31( 0.90041310491497f)}, {Q31( 0.57563307626120f), Q31(-0.91034337352097f)}, -{Q31( 0.28909646383717f), Q31( 0.96307783970534f)}, {Q31( 0.42188998312520f), Q31( 0.48148651230437f)}, -{Q31( 0.93335049681047f), Q31(-0.43537023883588f)}, {Q31(-0.97087374418267f), Q31( 0.86636445711364f)}, -{Q31( 0.36722871286923f), Q31( 0.65291654172961f)}, {Q31(-0.81093025665696f), Q31( 0.08778370229363f)}, -{Q31(-0.26240603062237f), Q31(-0.92774095379098f)}, {Q31( 0.83996497984604f), Q31( 0.55839849139647f)}, -{Q31(-0.99909615720225f), Q31(-0.96024605713970f)}, {Q31( 0.74649464155061f), Q31( 0.12144893606462f)}, -{Q31(-0.74774595569805f), Q31(-0.26898062008959f)}, {Q31( 0.95781667469567f), Q31(-0.79047927052628f)}, -{Q31( 0.95472308713099f), Q31(-0.08588776019550f)}, {Q31( 0.48708332746299f), Q31( 0.99999041579432f)}, -{Q31( 0.46332038247497f), Q31( 0.10964126185063f)}, {Q31(-0.76497004940162f), Q31( 0.89210929242238f)}, -{Q31( 0.57397389364339f), Q31( 0.35289703373760f)}, {Q31( 0.75374316974495f), Q31( 0.96705214651335f)}, -{Q31(-0.59174397685714f), Q31(-0.89405370422752f)}, {Q31( 0.75087906691890f), Q31(-0.29612672982396f)}, -{Q31(-0.98607857336230f), Q31( 0.25034911730023f)}, {Q31(-0.40761056640505f), Q31(-0.90045573444695f)}, -{Q31( 0.66929266740477f), Q31( 0.98629493401748f)}, {Q31(-0.97463695257310f), Q31(-0.00190223301301f)}, -{Q31( 0.90145509409859f), Q31( 0.99781390365446f)}, {Q31(-0.87259289048043f), Q31( 0.99233587353666f)}, -{Q31(-0.91529461447692f), Q31(-0.15698707534206f)}, {Q31(-0.03305738840705f), Q31(-0.37205262859764f)}, -{Q31( 0.07223051368337f), Q31(-0.88805001733626f)}, {Q31( 0.99498012188353f), Q31( 0.97094358113387f)}, -{Q31(-0.74904939500519f), Q31( 0.99985483641521f)}, {Q31( 0.04585228574211f), Q31( 0.99812337444082f)}, -{Q31(-0.89054954257993f), Q31(-0.31791913188064f)}, {Q31(-0.83782144651251f), Q31( 0.97637632547466f)}, -{Q31( 0.33454804933804f), Q31(-0.86231516800408f)}, {Q31(-0.99707579362824f), Q31( 0.93237990079441f)}, -{Q31(-0.22827527843994f), Q31( 0.18874759397997f)}, {Q31( 0.67248046289143f), Q31(-0.03646211390569f)}, -{Q31(-0.05146538187944f), Q31(-0.92599700120679f)}, {Q31( 0.99947295749905f), Q31( 0.93625229707912f)}, -{Q31( 0.66951124390363f), Q31( 0.98905825623893f)}, {Q31(-0.99602956559179f), Q31(-0.44654715757688f)}, -{Q31( 0.82104905483590f), Q31( 0.99540741724928f)}, {Q31( 0.99186510988782f), Q31( 0.72023001312947f)}, -{Q31(-0.65284592392918f), Q31( 0.52186723253637f)}, {Q31( 0.93885443798188f), Q31(-0.74895312615259f)}, -{Q31( 0.96735248738388f), Q31( 0.90891816978629f)}, {Q31(-0.22225968841114f), Q31( 0.57124029781228f)}, -{Q31(-0.44132783753414f), Q31(-0.92688840659280f)}, {Q31(-0.85694974219574f), Q31( 0.88844532719844f)}, -{Q31( 0.91783042091762f), Q31(-0.46356892383970f)}, {Q31( 0.72556974415690f), Q31(-0.99899555770747f)}, -{Q31(-0.99711581834508f), Q31( 0.58211560180426f)}, {Q31( 0.77638976371966f), Q31( 0.94321834873819f)}, -{Q31( 0.07717324253925f), Q31( 0.58638399856595f)}, {Q31(-0.56049829194163f), Q31( 0.82522301569036f)}, -{Q31( 0.98398893639988f), Q31( 0.39467440420569f)}, {Q31( 0.47546946844938f), Q31( 0.68613044836811f)}, -{Q31( 0.65675089314631f), Q31( 0.18331637134880f)}, {Q31( 0.03273375457980f), Q31(-0.74933109564108f)}, -{Q31(-0.38684144784738f), Q31( 0.51337349030406f)}, {Q31(-0.97346267944545f), Q31(-0.96549364384098f)}, -{Q31(-0.53282156061942f), Q31(-0.91423265091354f)}, {Q31( 0.99817310731176f), Q31( 0.61133572482148f)}, -{Q31(-0.50254500772635f), Q31(-0.88829338134294f)}, {Q31( 0.01995873238855f), Q31( 0.85223515096765f)}, -{Q31( 0.99930381973804f), Q31( 0.94578896296649f)}, {Q31( 0.82907767600783f), Q31(-0.06323442598128f)}, -{Q31(-0.58660709669728f), Q31( 0.96840773806582f)}, {Q31(-0.17573736667267f), Q31(-0.48166920859485f)}, -{Q31( 0.83434292401346f), Q31(-0.13023450646997f)}, {Q31( 0.05946491307025f), Q31( 0.20511047074866f)}, -{Q31( 0.81505484574602f), Q31(-0.94685947861369f)}, {Q31(-0.44976380954860f), Q31( 0.40894572671545f)}, -{Q31(-0.89746474625671f), Q31( 0.99846578838537f)}, {Q31( 0.39677256130792f), Q31(-0.74854668609359f)}, -{Q31(-0.07588948563079f), Q31( 0.74096214084170f)}, {Q31( 0.76343198951445f), Q31( 0.41746629422634f)}, -{Q31(-0.74490104699626f), Q31( 0.94725911744610f)}, {Q31( 0.64880119792759f), Q31( 0.41336660830571f)}, -{Q31( 0.62319537462542f), Q31(-0.93098313552599f)}, {Q31( 0.42215817594807f), Q31(-0.07712787385208f)}, -{Q31( 0.02704554141885f), Q31(-0.05417518053666f)}, {Q31( 0.80001773566818f), Q31( 0.91542195141039f)}, -{Q31(-0.79351832348816f), Q31(-0.36208897989136f)}, {Q31( 0.63872359151636f), Q31( 0.08128252493444f)}, -{Q31( 0.52890520960295f), Q31( 0.60048872455592f)}, {Q31( 0.74238552914587f), Q31( 0.04491915291044f)}, -{Q31( 0.99096131449250f), Q31(-0.19451182854402f)}, {Q31(-0.80412329643109f), Q31(-0.88513818199457f)}, -{Q31(-0.64612616129736f), Q31( 0.72198674804544f)}, {Q31( 0.11657770663191f), Q31(-0.83662833815041f)}, -{Q31(-0.95053182488101f), Q31(-0.96939905138082f)}, {Q31(-0.62228872928622f), Q31( 0.82767262846661f)}, -{Q31( 0.03004475787316f), Q31(-0.99738896333384f)}, {Q31(-0.97987214341034f), Q31( 0.36526129686425f)}, -{Q31(-0.99986980746200f), Q31(-0.36021610299715f)}, {Q31( 0.89110648599879f), Q31(-0.97894250343044f)}, -{Q31( 0.10407960510582f), Q31( 0.77357793811619f)}, {Q31( 0.95964737821728f), Q31(-0.35435818285502f)}, -{Q31( 0.50843233159162f), Q31( 0.96107691266205f)}, {Q31( 0.17006334670615f), Q31(-0.76854025314829f)}, -{Q31( 0.25872675063360f), Q31( 0.99893303933816f)}, {Q31(-0.01115998681937f), Q31( 0.98496019742444f)}, -{Q31(-0.79598702973261f), Q31( 0.97138411318894f)}, {Q31(-0.99264708948101f), Q31(-0.99542822402536f)}, -{Q31(-0.99829663752818f), Q31( 0.01877138824311f)}, {Q31(-0.70801016548184f), Q31( 0.33680685948117f)}, -{Q31(-0.70467057786826f), Q31( 0.93272777501857f)}, {Q31( 0.99846021905254f), Q31(-0.98725746254433f)}, -{Q31(-0.63364968534650f), Q31(-0.16473594423746f)}, {Q31(-0.16258217500792f), Q31(-0.95939125400802f)}, -{Q31(-0.43645594360633f), Q31(-0.94805030113284f)}, {Q31(-0.99848471702976f), Q31( 0.96245166923809f)}, -{Q31(-0.16796458968998f), Q31(-0.98987511890470f)}, {Q31(-0.87979225745213f), Q31(-0.71725725041680f)}, -{Q31( 0.44183099021786f), Q31(-0.93568974498761f)}, {Q31( 0.93310180125532f), Q31(-0.99913308068246f)}, -{Q31(-0.93941931782002f), Q31(-0.56409379640356f)}, {Q31(-0.88590003188677f), Q31( 0.47624600491382f)}, -{Q31( 0.99971463703691f), Q31(-0.83889954253462f)}, {Q31(-0.75376385639978f), Q31( 0.00814643438625f)}, -{Q31( 0.93887685615875f), Q31(-0.11284528204636f)}, {Q31( 0.85126435782309f), Q31( 0.52349251543547f)}, -{Q31( 0.39701421446381f), Q31( 0.81779634174316f)}, {Q31(-0.37024464187437f), Q31(-0.87071656222959f)}, -{Q31(-0.36024828242896f), Q31( 0.34655735648287f)}, {Q31(-0.93388812549209f), Q31(-0.84476541096429f)}, -{Q31(-0.65298804552119f), Q31(-0.18439575450921f)}, {Q31( 0.11960319006843f), Q31( 0.99899346780168f)}, -{Q31( 0.94292565553160f), Q31( 0.83163906518293f)}, {Q31( 0.75081145286948f), Q31(-0.35533223142265f)}, -{Q31( 0.56721979748394f), Q31(-0.24076836414499f)}, {Q31( 0.46857766746029f), Q31(-0.30140233457198f)}, -{Q31( 0.97312313923635f), Q31(-0.99548191630031f)}, {Q31(-0.38299976567017f), Q31( 0.98516909715427f)}, -{Q31( 0.41025800019463f), Q31( 0.02116736935734f)}, {Q31( 0.09638062008048f), Q31( 0.04411984381457f)}, -{Q31(-0.85283249275397f), Q31( 0.91475563922421f)}, {Q31( 0.88866808958124f), Q31(-0.99735267083226f)}, -{Q31(-0.48202429536989f), Q31(-0.96805608884164f)}, {Q31( 0.27572582416567f), Q31( 0.58634753335832f)}, -{Q31(-0.65889129659168f), Q31( 0.58835634138583f)}, {Q31( 0.98838086953732f), Q31( 0.99994349600236f)}, -{Q31(-0.20651349620689f), Q31( 0.54593044066355f)}, {Q31(-0.62126416356920f), Q31(-0.59893681700392f)}, -{Q31( 0.20320105410437f), Q31(-0.86879180355289f)}, {Q31(-0.97790548600584f), Q31( 0.96290806999242f)}, -{Q31( 0.11112534735126f), Q31( 0.21484763313301f)}, {Q31(-0.41368337314182f), Q31( 0.28216837680365f)}, -{Q31( 0.24133038992960f), Q31( 0.51294362630238f)}, {Q31(-0.66393410674885f), Q31(-0.08249679629081f)}, -{Q31(-0.53697829178752f), Q31(-0.97649903936228f)}, {Q31(-0.97224737889348f), Q31( 0.22081333579837f)}, -{Q31( 0.87392477144549f), Q31(-0.12796173740361f)}, {Q31( 0.19050361015753f), Q31( 0.01602615387195f)}, -{Q31(-0.46353441212724f), Q31(-0.95249041539006f)}, {Q31(-0.07064096339021f), Q31(-0.94479803205886f)}, -{Q31(-0.92444085484466f), Q31(-0.10457590187436f)}, {Q31(-0.83822593578728f), Q31(-0.01695043208885f)}, -{Q31( 0.75214681811150f), Q31(-0.99955681042665f)}, {Q31(-0.42102998829339f), Q31( 0.99720941999394f)}, -{Q31(-0.72094786237696f), Q31(-0.35008961934255f)}, {Q31( 0.78843311019251f), Q31( 0.52851398958271f)}, -{Q31( 0.97394027897442f), Q31(-0.26695944086561f)}, {Q31( 0.99206463477946f), Q31(-0.57010120849429f)}, -{Q31( 0.76789609461795f), Q31(-0.76519356730966f)}, {Q31(-0.82002421836409f), Q31(-0.73530179553767f)}, -{Q31( 0.81924990025724f), Q31( 0.99698425250579f)}, {Q31(-0.26719850873357f), Q31( 0.68903369776193f)}, -{Q31(-0.43311260380975f), Q31( 0.85321815947490f)}, {Q31( 0.99194979673836f), Q31( 0.91876249766422f)}, -{Q31(-0.80692001248487f), Q31(-0.32627540663214f)}, {Q31( 0.43080003649976f), Q31(-0.21919095636638f)}, -{Q31( 0.67709491937357f), Q31(-0.95478075822906f)}, {Q31( 0.56151770568316f), Q31(-0.70693811747778f)}, -{Q31( 0.10831862810749f), Q31(-0.08628837174592f)}, {Q31( 0.91229417540436f), Q31(-0.65987351408410f)}, -{Q31(-0.48972893932274f), Q31( 0.56289246362686f)}, {Q31(-0.89033658689697f), Q31(-0.71656563987082f)}, -{Q31( 0.65269447475094f), Q31( 0.65916004833932f)}, {Q31( 0.67439478141121f), Q31(-0.81684380846796f)}, -{Q31(-0.47770832416973f), Q31(-0.16789556203025f)}, {Q31(-0.99715979260878f), Q31(-0.93565784007648f)}, -{Q31(-0.90889593602546f), Q31( 0.62034397054380f)}, {Q31(-0.06618622548177f), Q31(-0.23812217221359f)}, -{Q31( 0.99430266919728f), Q31( 0.18812555317553f)}, {Q31( 0.97686402381843f), Q31(-0.28664534366620f)}, -{Q31( 0.94813650221268f), Q31(-0.97506640027128f)}, {Q31(-0.95434497492853f), Q31(-0.79607978501983f)}, -{Q31(-0.49104783137150f), Q31( 0.32895214359663f)}, {Q31( 0.99881175120751f), Q31( 0.88993983831354f)}, -{Q31( 0.50449166760303f), Q31(-0.85995072408434f)}, {Q31( 0.47162891065108f), Q31(-0.18680204049569f)}, -{Q31(-0.62081581361840f), Q31( 0.75000676218956f)}, {Q31(-0.43867015250812f), Q31( 0.99998069244322f)}, -{Q31( 0.98630563232075f), Q31(-0.53578899600662f)}, {Q31(-0.61510362277374f), Q31(-0.89515019899997f)}, -{Q31(-0.03841517601843f), Q31(-0.69888815681179f)}, {Q31(-0.30102157304644f), Q31(-0.07667808922205f)}, -{Q31( 0.41881284182683f), Q31( 0.02188098922282f)}, {Q31(-0.86135454941237f), Q31( 0.98947480909359f)}, -{Q31( 0.67226861393788f), Q31(-0.13494389011014f)}, {Q31(-0.70737398842068f), Q31(-0.76547349325992f)}, -{Q31( 0.94044946687963f), Q31( 0.09026201157416f)}, {Q31(-0.82386352534327f), Q31( 0.08924768823676f)}, -{Q31(-0.32070666698656f), Q31( 0.50143421908753f)}, {Q31( 0.57593163224487f), Q31(-0.98966422921509f)}, -{Q31(-0.36326018419965f), Q31( 0.07440243123228f)}, {Q31( 0.99979044674350f), Q31(-0.14130287347405f)}, -{Q31(-0.92366023326932f), Q31(-0.97979298068180f)}, {Q31(-0.44607178518598f), Q31(-0.54233252016394f)}, -{Q31( 0.44226800932956f), Q31( 0.71326756742752f)}, {Q31( 0.03671907158312f), Q31( 0.63606389366675f)}, -{Q31( 0.52175424682195f), Q31(-0.85396826735705f)}, {Q31(-0.94701139690956f), Q31(-0.01826348194255f)}, -{Q31(-0.98759606946049f), Q31( 0.82288714303073f)}, {Q31( 0.87434794743625f), Q31( 0.89399495655433f)}, -{Q31(-0.93412041758744f), Q31( 0.41374052024363f)}, {Q31( 0.96063943315511f), Q31( 0.93116709541280f)}, -{Q31( 0.97534253457837f), Q31( 0.86150930812689f)}, {Q31( 0.99642466504163f), Q31( 0.70190043427512f)}, -{Q31(-0.94705089665984f), Q31(-0.29580042814306f)}, {Q31( 0.91599807087376f), Q31(-0.98147830385781f)}, -// Start of duplicated table -{Q31(-0.99948153278296f), Q31(-0.59483417516607f)}, {Q31( 0.97113454393991f), Q31(-0.67528515225647f)}, -{Q31( 0.14130051758487f), Q31(-0.95090983575689f)}, {Q31(-0.47005496701697f), Q31(-0.37340549728647f)}, -{Q31( 0.80705063769351f), Q31( 0.29653668284408f)}, {Q31(-0.38981478896926f), Q31( 0.89572605717087f)}, -{Q31(-0.01053049862020f), Q31(-0.66959058036166f)}, {Q31(-0.91266367957293f), Q31(-0.11522938140034f)}, -}; - ///< window coefficients for analysis/synthesis QMF banks static DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_ds)[320]; /* This table contains redundancy: It is symmetric about the entry #320 diff --git a/libavcodec/sbrdsp_template.c b/libavcodec/sbrdsp_template.c index b3737c0fd8..89e389d9a0 100644 --- a/libavcodec/sbrdsp_template.c +++ b/libavcodec/sbrdsp_template.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/attributes_internal.h" + static void sbr_sum64x5_c(INTFLOAT *z) { int k; @@ -103,3 +105,268 @@ av_cold void AAC_RENAME(ff_sbrdsp_init)(SBRDSPContext *s) #endif #endif /* !USE_FIXED */ } + +/* First eight entries repeated at end to simplify SIMD implementations. */ +const attribute_visibility_hidden DECLARE_ALIGNED(16, INTFLOAT, AAC_RENAME(ff_sbr_noise_table))[][2] = { +{Q31(-0.99948153278296f), Q31(-0.59483417516607f)}, {Q31( 0.97113454393991f), Q31(-0.67528515225647f)}, +{Q31( 0.14130051758487f), Q31(-0.95090983575689f)}, {Q31(-0.47005496701697f), Q31(-0.37340549728647f)}, +{Q31( 0.80705063769351f), Q31( 0.29653668284408f)}, {Q31(-0.38981478896926f), Q31( 0.89572605717087f)}, +{Q31(-0.01053049862020f), Q31(-0.66959058036166f)}, {Q31(-0.91266367957293f), Q31(-0.11522938140034f)}, +{Q31( 0.54840422910309f), Q31( 0.75221367176302f)}, {Q31( 0.40009252867955f), Q31(-0.98929400334421f)}, +{Q31(-0.99867974711855f), Q31(-0.88147068645358f)}, {Q31(-0.95531076805040f), Q31( 0.90908757154593f)}, +{Q31(-0.45725933317144f), Q31(-0.56716323646760f)}, {Q31(-0.72929675029275f), Q31(-0.98008272727324f)}, +{Q31( 0.75622801399036f), Q31( 0.20950329995549f)}, {Q31( 0.07069442601050f), Q31(-0.78247898470706f)}, +{Q31( 0.74496252926055f), Q31(-0.91169004445807f)}, {Q31(-0.96440182703856f), Q31(-0.94739918296622f)}, +{Q31( 0.30424629369539f), Q31(-0.49438267012479f)}, {Q31( 0.66565033746925f), Q31( 0.64652935542491f)}, +{Q31( 0.91697008020594f), Q31( 0.17514097332009f)}, {Q31(-0.70774918760427f), Q31( 0.52548653416543f)}, +{Q31(-0.70051415345560f), Q31(-0.45340028808763f)}, {Q31(-0.99496513054797f), Q31(-0.90071908066973f)}, +{Q31( 0.98164490790123f), Q31(-0.77463155528697f)}, {Q31(-0.54671580548181f), Q31(-0.02570928536004f)}, +{Q31(-0.01689629065389f), Q31( 0.00287506445732f)}, {Q31(-0.86110349531986f), Q31( 0.42548583726477f)}, +{Q31(-0.98892980586032f), Q31(-0.87881132267556f)}, {Q31( 0.51756627678691f), Q31( 0.66926784710139f)}, +{Q31(-0.99635026409640f), Q31(-0.58107730574765f)}, {Q31(-0.99969370862163f), Q31( 0.98369989360250f)}, +{Q31( 0.55266258627194f), Q31( 0.59449057465591f)}, {Q31( 0.34581177741673f), Q31( 0.94879421061866f)}, +{Q31( 0.62664209577999f), Q31(-0.74402970906471f)}, {Q31(-0.77149701404973f), Q31(-0.33883658042801f)}, +{Q31(-0.91592244254432f), Q31( 0.03687901376713f)}, {Q31(-0.76285492357887f), Q31(-0.91371867919124f)}, +{Q31( 0.79788337195331f), Q31(-0.93180971199849f)}, {Q31( 0.54473080610200f), Q31(-0.11919206037186f)}, +{Q31(-0.85639281671058f), Q31( 0.42429854760451f)}, {Q31(-0.92882402971423f), Q31( 0.27871809078609f)}, +{Q31(-0.11708371046774f), Q31(-0.99800843444966f)}, {Q31( 0.21356749817493f), Q31(-0.90716295627033f)}, +{Q31(-0.76191692573909f), Q31( 0.99768118356265f)}, {Q31( 0.98111043100884f), Q31(-0.95854459734407f)}, +{Q31(-0.85913269895572f), Q31( 0.95766566168880f)}, {Q31(-0.93307242253692f), Q31( 0.49431757696466f)}, +{Q31( 0.30485754879632f), Q31(-0.70540034357529f)}, {Q31( 0.85289650925190f), Q31( 0.46766131791044f)}, +{Q31( 0.91328082618125f), Q31(-0.99839597361769f)}, {Q31(-0.05890199924154f), Q31( 0.70741827819497f)}, +{Q31( 0.28398686150148f), Q31( 0.34633555702188f)}, {Q31( 0.95258164539612f), Q31(-0.54893416026939f)}, +{Q31(-0.78566324168507f), Q31(-0.75568541079691f)}, {Q31(-0.95789495447877f), Q31(-0.20423194696966f)}, +{Q31( 0.82411158711197f), Q31( 0.96654618432562f)}, {Q31(-0.65185446735885f), Q31(-0.88734990773289f)}, +{Q31(-0.93643603134666f), Q31( 0.99870790442385f)}, {Q31( 0.91427159529618f), Q31(-0.98290505544444f)}, +{Q31(-0.70395684036886f), Q31( 0.58796798221039f)}, {Q31( 0.00563771969365f), Q31( 0.61768196727244f)}, +{Q31( 0.89065051931895f), Q31( 0.52783352697585f)}, {Q31(-0.68683707712762f), Q31( 0.80806944710339f)}, +{Q31( 0.72165342518718f), Q31(-0.69259857349564f)}, {Q31(-0.62928247730667f), Q31( 0.13627037407335f)}, +{Q31( 0.29938434065514f), Q31(-0.46051329682246f)}, {Q31(-0.91781958879280f), Q31(-0.74012716684186f)}, +{Q31( 0.99298717043688f), Q31( 0.40816610075661f)}, {Q31( 0.82368298622748f), Q31(-0.74036047190173f)}, +{Q31(-0.98512833386833f), Q31(-0.99972330709594f)}, {Q31(-0.95915368242257f), Q31(-0.99237800466040f)}, +{Q31(-0.21411126572790f), Q31(-0.93424819052545f)}, {Q31(-0.68821476106884f), Q31(-0.26892306315457f)}, +{Q31( 0.91851997982317f), Q31( 0.09358228901785f)}, {Q31(-0.96062769559127f), Q31( 0.36099095133739f)}, +{Q31( 0.51646184922287f), Q31(-0.71373332873917f)}, {Q31( 0.61130721139669f), Q31( 0.46950141175917f)}, +{Q31( 0.47336129371299f), Q31(-0.27333178296162f)}, {Q31( 0.90998308703519f), Q31( 0.96715662938132f)}, +{Q31( 0.44844799194357f), Q31( 0.99211574628306f)}, {Q31( 0.66614891079092f), Q31( 0.96590176169121f)}, +{Q31( 0.74922239129237f), Q31(-0.89879858826087f)}, {Q31(-0.99571588506485f), Q31( 0.52785521494349f)}, +{Q31( 0.97401082477563f), Q31(-0.16855870075190f)}, {Q31( 0.72683747733879f), Q31(-0.48060774432251f)}, +{Q31( 0.95432193457128f), Q31( 0.68849603408441f)}, {Q31(-0.72962208425191f), Q31(-0.76608443420917f)}, +{Q31(-0.85359479233537f), Q31( 0.88738125901579f)}, {Q31(-0.81412430338535f), Q31(-0.97480768049637f)}, +{Q31(-0.87930772356786f), Q31( 0.74748307690436f)}, {Q31(-0.71573331064977f), Q31(-0.98570608178923f)}, +{Q31( 0.83524300028228f), Q31( 0.83702537075163f)}, {Q31(-0.48086065601423f), Q31(-0.98848504923531f)}, +{Q31( 0.97139128574778f), Q31( 0.80093621198236f)}, {Q31( 0.51992825347895f), Q31( 0.80247631400510f)}, +{Q31(-0.00848591195325f), Q31(-0.76670128000486f)}, {Q31(-0.70294374303036f), Q31( 0.55359910445577f)}, +{Q31(-0.95894428168140f), Q31(-0.43265504344783f)}, {Q31( 0.97079252950321f), Q31( 0.09325857238682f)}, +{Q31(-0.92404293670797f), Q31( 0.85507704027855f)}, {Q31(-0.69506469500450f), Q31( 0.98633412625459f)}, +{Q31( 0.26559203620024f), Q31( 0.73314307966524f)}, {Q31( 0.28038443336943f), Q31( 0.14537913654427f)}, +{Q31(-0.74138124825523f), Q31( 0.99310339807762f)}, {Q31(-0.01752795995444f), Q31(-0.82616635284178f)}, +{Q31(-0.55126773094930f), Q31(-0.98898543862153f)}, {Q31( 0.97960898850996f), Q31(-0.94021446752851f)}, +{Q31(-0.99196309146936f), Q31( 0.67019017358456f)}, {Q31(-0.67684928085260f), Q31( 0.12631491649378f)}, +{Q31( 0.09140039465500f), Q31(-0.20537731453108f)}, {Q31(-0.71658965751996f), Q31(-0.97788200391224f)}, +{Q31( 0.81014640078925f), Q31( 0.53722648362443f)}, {Q31( 0.40616991671205f), Q31(-0.26469008598449f)}, +{Q31(-0.67680188682972f), Q31( 0.94502052337695f)}, {Q31( 0.86849774348749f), Q31(-0.18333598647899f)}, +{Q31(-0.99500381284851f), Q31(-0.02634122068550f)}, {Q31( 0.84329189340667f), Q31( 0.10406957462213f)}, +{Q31(-0.09215968531446f), Q31( 0.69540012101253f)}, {Q31( 0.99956173327206f), Q31(-0.12358542001404f)}, +{Q31(-0.79732779473535f), Q31(-0.91582524736159f)}, {Q31( 0.96349973642406f), Q31( 0.96640458041000f)}, +{Q31(-0.79942778496547f), Q31( 0.64323902822857f)}, {Q31(-0.11566039853896f), Q31( 0.28587846253726f)}, +{Q31(-0.39922954514662f), Q31( 0.94129601616966f)}, {Q31( 0.99089197565987f), Q31(-0.92062625581587f)}, +{Q31( 0.28631285179909f), Q31(-0.91035047143603f)}, {Q31(-0.83302725605608f), Q31(-0.67330410892084f)}, +{Q31( 0.95404443402072f), Q31( 0.49162765398743f)}, {Q31(-0.06449863579434f), Q31( 0.03250560813135f)}, +{Q31(-0.99575054486311f), Q31( 0.42389784469507f)}, {Q31(-0.65501142790847f), Q31( 0.82546114655624f)}, +{Q31(-0.81254441908887f), Q31(-0.51627234660629f)}, {Q31(-0.99646369485481f), Q31( 0.84490533520752f)}, +{Q31( 0.00287840603348f), Q31( 0.64768261158166f)}, {Q31( 0.70176989408455f), Q31(-0.20453028573322f)}, +{Q31( 0.96361882270190f), Q31( 0.40706967140989f)}, {Q31(-0.68883758192426f), Q31( 0.91338958840772f)}, +{Q31(-0.34875585502238f), Q31( 0.71472290693300f)}, {Q31( 0.91980081243087f), Q31( 0.66507455644919f)}, +{Q31(-0.99009048343881f), Q31( 0.85868021604848f)}, {Q31( 0.68865791458395f), Q31( 0.55660316809678f)}, +{Q31(-0.99484402129368f), Q31(-0.20052559254934f)}, {Q31( 0.94214511408023f), Q31(-0.99696425367461f)}, +{Q31(-0.67414626793544f), Q31( 0.49548221180078f)}, {Q31(-0.47339353684664f), Q31(-0.85904328834047f)}, +{Q31( 0.14323651387360f), Q31(-0.94145598222488f)}, {Q31(-0.29268293575672f), Q31( 0.05759224927952f)}, +{Q31( 0.43793861458754f), Q31(-0.78904969892724f)}, {Q31(-0.36345126374441f), Q31( 0.64874435357162f)}, +{Q31(-0.08750604656825f), Q31( 0.97686944362527f)}, {Q31(-0.96495267812511f), Q31(-0.53960305946511f)}, +{Q31( 0.55526940659947f), Q31( 0.78891523734774f)}, {Q31( 0.73538215752630f), Q31( 0.96452072373404f)}, +{Q31(-0.30889773919437f), Q31(-0.80664389776860f)}, {Q31( 0.03574995626194f), Q31(-0.97325616900959f)}, +{Q31( 0.98720684660488f), Q31( 0.48409133691962f)}, {Q31(-0.81689296271203f), Q31(-0.90827703628298f)}, +{Q31( 0.67866860118215f), Q31( 0.81284503870856f)}, {Q31(-0.15808569732583f), Q31( 0.85279555024382f)}, +{Q31( 0.80723395114371f), Q31(-0.24717418514605f)}, {Q31( 0.47788757329038f), Q31(-0.46333147839295f)}, +{Q31( 0.96367554763201f), Q31( 0.38486749303242f)}, {Q31(-0.99143875716818f), Q31(-0.24945277239809f)}, +{Q31( 0.83081876925833f), Q31(-0.94780851414763f)}, {Q31(-0.58753191905341f), Q31( 0.01290772389163f)}, +{Q31( 0.95538108220960f), Q31(-0.85557052096538f)}, {Q31(-0.96490920476211f), Q31(-0.64020970923102f)}, +{Q31(-0.97327101028521f), Q31( 0.12378128133110f)}, {Q31( 0.91400366022124f), Q31( 0.57972471346930f)}, +{Q31(-0.99925837363824f), Q31( 0.71084847864067f)}, {Q31(-0.86875903507313f), Q31(-0.20291699203564f)}, +{Q31(-0.26240034795124f), Q31(-0.68264554369108f)}, {Q31(-0.24664412953388f), Q31(-0.87642273115183f)}, +{Q31( 0.02416275806869f), Q31( 0.27192914288905f)}, {Q31( 0.82068619590515f), Q31(-0.85087787994476f)}, +{Q31( 0.88547373760759f), Q31(-0.89636802901469f)}, {Q31(-0.18173078152226f), Q31(-0.26152145156800f)}, +{Q31( 0.09355476558534f), Q31( 0.54845123045604f)}, {Q31(-0.54668414224090f), Q31( 0.95980774020221f)}, +{Q31( 0.37050990604091f), Q31(-0.59910140383171f)}, {Q31(-0.70373594262891f), Q31( 0.91227665827081f)}, +{Q31(-0.34600785879594f), Q31(-0.99441426144200f)}, {Q31(-0.68774481731008f), Q31(-0.30238837956299f)}, +{Q31(-0.26843291251234f), Q31( 0.83115668004362f)}, {Q31( 0.49072334613242f), Q31(-0.45359708737775f)}, +{Q31( 0.38975993093975f), Q31( 0.95515358099121f)}, {Q31(-0.97757125224150f), Q31( 0.05305894580606f)}, +{Q31(-0.17325552859616f), Q31(-0.92770672250494f)}, {Q31( 0.99948035025744f), Q31( 0.58285545563426f)}, +{Q31(-0.64946246527458f), Q31( 0.68645507104960f)}, {Q31(-0.12016920576437f), Q31(-0.57147322153312f)}, +{Q31(-0.58947456517751f), Q31(-0.34847132454388f)}, {Q31(-0.41815140454465f), Q31( 0.16276422358861f)}, +{Q31( 0.99885650204884f), Q31( 0.11136095490444f)}, {Q31(-0.56649614128386f), Q31(-0.90494866361587f)}, +{Q31( 0.94138021032330f), Q31( 0.35281916733018f)}, {Q31(-0.75725076534641f), Q31( 0.53650549640587f)}, +{Q31( 0.20541973692630f), Q31(-0.94435144369918f)}, {Q31( 0.99980371023351f), Q31( 0.79835913565599f)}, +{Q31( 0.29078277605775f), Q31( 0.35393777921520f)}, {Q31(-0.62858772103030f), Q31( 0.38765693387102f)}, +{Q31( 0.43440904467688f), Q31(-0.98546330463232f)}, {Q31(-0.98298583762390f), Q31( 0.21021524625209f)}, +{Q31( 0.19513029146934f), Q31(-0.94239832251867f)}, {Q31(-0.95476662400101f), Q31( 0.98364554179143f)}, +{Q31( 0.93379635304810f), Q31(-0.70881994583682f)}, {Q31(-0.85235410573336f), Q31(-0.08342347966410f)}, +{Q31(-0.86425093011245f), Q31(-0.45795025029466f)}, {Q31( 0.38879779059045f), Q31( 0.97274429344593f)}, +{Q31( 0.92045124735495f), Q31(-0.62433652524220f)}, {Q31( 0.89162532251878f), Q31( 0.54950955570563f)}, +{Q31(-0.36834336949252f), Q31( 0.96458298020975f)}, {Q31( 0.93891760988045f), Q31(-0.89968353740388f)}, +{Q31( 0.99267657565094f), Q31(-0.03757034316958f)}, {Q31(-0.94063471614176f), Q31( 0.41332338538963f)}, +{Q31( 0.99740224117019f), Q31(-0.16830494996370f)}, {Q31(-0.35899413170555f), Q31(-0.46633226649613f)}, +{Q31( 0.05237237274947f), Q31(-0.25640361602661f)}, {Q31( 0.36703583957424f), Q31(-0.38653265641875f)}, +{Q31( 0.91653180367913f), Q31(-0.30587628726597f)}, {Q31( 0.69000803499316f), Q31( 0.90952171386132f)}, +{Q31(-0.38658751133527f), Q31( 0.99501571208985f)}, {Q31(-0.29250814029851f), Q31( 0.37444994344615f)}, +{Q31(-0.60182204677608f), Q31( 0.86779651036123f)}, {Q31(-0.97418588163217f), Q31( 0.96468523666475f)}, +{Q31( 0.88461574003963f), Q31( 0.57508405276414f)}, {Q31( 0.05198933055162f), Q31( 0.21269661669964f)}, +{Q31(-0.53499621979720f), Q31( 0.97241553731237f)}, {Q31(-0.49429560226497f), Q31( 0.98183865291903f)}, +{Q31(-0.98935142339139f), Q31(-0.40249159006933f)}, {Q31(-0.98081380091130f), Q31(-0.72856895534041f)}, +{Q31(-0.27338148835532f), Q31( 0.99950922447209f)}, {Q31( 0.06310802338302f), Q31(-0.54539587529618f)}, +{Q31(-0.20461677199539f), Q31(-0.14209977628489f)}, {Q31( 0.66223843141647f), Q31( 0.72528579940326f)}, +{Q31(-0.84764345483665f), Q31( 0.02372316801261f)}, {Q31(-0.89039863483811f), Q31( 0.88866581484602f)}, +{Q31( 0.95903308477986f), Q31( 0.76744927173873f)}, {Q31( 0.73504123909879f), Q31(-0.03747203173192f)}, +{Q31(-0.31744434966056f), Q31(-0.36834111883652f)}, {Q31(-0.34110827591623f), Q31( 0.40211222807691f)}, +{Q31( 0.47803883714199f), Q31(-0.39423219786288f)}, {Q31( 0.98299195879514f), Q31( 0.01989791390047f)}, +{Q31(-0.30963073129751f), Q31(-0.18076720599336f)}, {Q31( 0.99992588229018f), Q31(-0.26281872094289f)}, +{Q31(-0.93149731080767f), Q31(-0.98313162570490f)}, {Q31( 0.99923472302773f), Q31(-0.80142993767554f)}, +{Q31(-0.26024169633417f), Q31(-0.75999759855752f)}, {Q31(-0.35712514743563f), Q31( 0.19298963768574f)}, +{Q31(-0.99899084509530f), Q31( 0.74645156992493f)}, {Q31( 0.86557171579452f), Q31( 0.55593866696299f)}, +{Q31( 0.33408042438752f), Q31( 0.86185953874709f)}, {Q31( 0.99010736374716f), Q31( 0.04602397576623f)}, +{Q31(-0.66694269691195f), Q31(-0.91643611810148f)}, {Q31( 0.64016792079480f), Q31( 0.15649530836856f)}, +{Q31( 0.99570534804836f), Q31( 0.45844586038111f)}, {Q31(-0.63431466947340f), Q31( 0.21079116459234f)}, +{Q31(-0.07706847005931f), Q31(-0.89581437101329f)}, {Q31( 0.98590090577724f), Q31( 0.88241721133981f)}, +{Q31( 0.80099335254678f), Q31(-0.36851896710853f)}, {Q31( 0.78368131392666f), Q31( 0.45506999802597f)}, +{Q31( 0.08707806671691f), Q31( 0.80938994918745f)}, {Q31(-0.86811883080712f), Q31( 0.39347308654705f)}, +{Q31(-0.39466529740375f), Q31(-0.66809432114456f)}, {Q31( 0.97875325649683f), Q31(-0.72467840967746f)}, +{Q31(-0.95038560288864f), Q31( 0.89563219587625f)}, {Q31( 0.17005239424212f), Q31( 0.54683053962658f)}, +{Q31(-0.76910792026848f), Q31(-0.96226617549298f)}, {Q31( 0.99743281016846f), Q31( 0.42697157037567f)}, +{Q31( 0.95437383549973f), Q31( 0.97002324109952f)}, {Q31( 0.99578905365569f), Q31(-0.54106826257356f)}, +{Q31( 0.28058259829990f), Q31(-0.85361420634036f)}, {Q31( 0.85256524470573f), Q31(-0.64567607735589f)}, +{Q31(-0.50608540105128f), Q31(-0.65846015480300f)}, {Q31(-0.97210735183243f), Q31(-0.23095213067791f)}, +{Q31( 0.95424048234441f), Q31(-0.99240147091219f)}, {Q31(-0.96926570524023f), Q31( 0.73775654896574f)}, +{Q31( 0.30872163214726f), Q31( 0.41514960556126f)}, {Q31(-0.24523839572639f), Q31( 0.63206633394807f)}, +{Q31(-0.33813265086024f), Q31(-0.38661779441897f)}, {Q31(-0.05826828420146f), Q31(-0.06940774188029f)}, +{Q31(-0.22898461455054f), Q31( 0.97054853316316f)}, {Q31(-0.18509915019881f), Q31( 0.47565762892084f)}, +{Q31(-0.10488238045009f), Q31(-0.87769947402394f)}, {Q31(-0.71886586182037f), Q31( 0.78030982480538f)}, +{Q31( 0.99793873738654f), Q31( 0.90041310491497f)}, {Q31( 0.57563307626120f), Q31(-0.91034337352097f)}, +{Q31( 0.28909646383717f), Q31( 0.96307783970534f)}, {Q31( 0.42188998312520f), Q31( 0.48148651230437f)}, +{Q31( 0.93335049681047f), Q31(-0.43537023883588f)}, {Q31(-0.97087374418267f), Q31( 0.86636445711364f)}, +{Q31( 0.36722871286923f), Q31( 0.65291654172961f)}, {Q31(-0.81093025665696f), Q31( 0.08778370229363f)}, +{Q31(-0.26240603062237f), Q31(-0.92774095379098f)}, {Q31( 0.83996497984604f), Q31( 0.55839849139647f)}, +{Q31(-0.99909615720225f), Q31(-0.96024605713970f)}, {Q31( 0.74649464155061f), Q31( 0.12144893606462f)}, +{Q31(-0.74774595569805f), Q31(-0.26898062008959f)}, {Q31( 0.95781667469567f), Q31(-0.79047927052628f)}, +{Q31( 0.95472308713099f), Q31(-0.08588776019550f)}, {Q31( 0.48708332746299f), Q31( 0.99999041579432f)}, +{Q31( 0.46332038247497f), Q31( 0.10964126185063f)}, {Q31(-0.76497004940162f), Q31( 0.89210929242238f)}, +{Q31( 0.57397389364339f), Q31( 0.35289703373760f)}, {Q31( 0.75374316974495f), Q31( 0.96705214651335f)}, +{Q31(-0.59174397685714f), Q31(-0.89405370422752f)}, {Q31( 0.75087906691890f), Q31(-0.29612672982396f)}, +{Q31(-0.98607857336230f), Q31( 0.25034911730023f)}, {Q31(-0.40761056640505f), Q31(-0.90045573444695f)}, +{Q31( 0.66929266740477f), Q31( 0.98629493401748f)}, {Q31(-0.97463695257310f), Q31(-0.00190223301301f)}, +{Q31( 0.90145509409859f), Q31( 0.99781390365446f)}, {Q31(-0.87259289048043f), Q31( 0.99233587353666f)}, +{Q31(-0.91529461447692f), Q31(-0.15698707534206f)}, {Q31(-0.03305738840705f), Q31(-0.37205262859764f)}, +{Q31( 0.07223051368337f), Q31(-0.88805001733626f)}, {Q31( 0.99498012188353f), Q31( 0.97094358113387f)}, +{Q31(-0.74904939500519f), Q31( 0.99985483641521f)}, {Q31( 0.04585228574211f), Q31( 0.99812337444082f)}, +{Q31(-0.89054954257993f), Q31(-0.31791913188064f)}, {Q31(-0.83782144651251f), Q31( 0.97637632547466f)}, +{Q31( 0.33454804933804f), Q31(-0.86231516800408f)}, {Q31(-0.99707579362824f), Q31( 0.93237990079441f)}, +{Q31(-0.22827527843994f), Q31( 0.18874759397997f)}, {Q31( 0.67248046289143f), Q31(-0.03646211390569f)}, +{Q31(-0.05146538187944f), Q31(-0.92599700120679f)}, {Q31( 0.99947295749905f), Q31( 0.93625229707912f)}, +{Q31( 0.66951124390363f), Q31( 0.98905825623893f)}, {Q31(-0.99602956559179f), Q31(-0.44654715757688f)}, +{Q31( 0.82104905483590f), Q31( 0.99540741724928f)}, {Q31( 0.99186510988782f), Q31( 0.72023001312947f)}, +{Q31(-0.65284592392918f), Q31( 0.52186723253637f)}, {Q31( 0.93885443798188f), Q31(-0.74895312615259f)}, +{Q31( 0.96735248738388f), Q31( 0.90891816978629f)}, {Q31(-0.22225968841114f), Q31( 0.57124029781228f)}, +{Q31(-0.44132783753414f), Q31(-0.92688840659280f)}, {Q31(-0.85694974219574f), Q31( 0.88844532719844f)}, +{Q31( 0.91783042091762f), Q31(-0.46356892383970f)}, {Q31( 0.72556974415690f), Q31(-0.99899555770747f)}, +{Q31(-0.99711581834508f), Q31( 0.58211560180426f)}, {Q31( 0.77638976371966f), Q31( 0.94321834873819f)}, +{Q31( 0.07717324253925f), Q31( 0.58638399856595f)}, {Q31(-0.56049829194163f), Q31( 0.82522301569036f)}, +{Q31( 0.98398893639988f), Q31( 0.39467440420569f)}, {Q31( 0.47546946844938f), Q31( 0.68613044836811f)}, +{Q31( 0.65675089314631f), Q31( 0.18331637134880f)}, {Q31( 0.03273375457980f), Q31(-0.74933109564108f)}, +{Q31(-0.38684144784738f), Q31( 0.51337349030406f)}, {Q31(-0.97346267944545f), Q31(-0.96549364384098f)}, +{Q31(-0.53282156061942f), Q31(-0.91423265091354f)}, {Q31( 0.99817310731176f), Q31( 0.61133572482148f)}, +{Q31(-0.50254500772635f), Q31(-0.88829338134294f)}, {Q31( 0.01995873238855f), Q31( 0.85223515096765f)}, +{Q31( 0.99930381973804f), Q31( 0.94578896296649f)}, {Q31( 0.82907767600783f), Q31(-0.06323442598128f)}, +{Q31(-0.58660709669728f), Q31( 0.96840773806582f)}, {Q31(-0.17573736667267f), Q31(-0.48166920859485f)}, +{Q31( 0.83434292401346f), Q31(-0.13023450646997f)}, {Q31( 0.05946491307025f), Q31( 0.20511047074866f)}, +{Q31( 0.81505484574602f), Q31(-0.94685947861369f)}, {Q31(-0.44976380954860f), Q31( 0.40894572671545f)}, +{Q31(-0.89746474625671f), Q31( 0.99846578838537f)}, {Q31( 0.39677256130792f), Q31(-0.74854668609359f)}, +{Q31(-0.07588948563079f), Q31( 0.74096214084170f)}, {Q31( 0.76343198951445f), Q31( 0.41746629422634f)}, +{Q31(-0.74490104699626f), Q31( 0.94725911744610f)}, {Q31( 0.64880119792759f), Q31( 0.41336660830571f)}, +{Q31( 0.62319537462542f), Q31(-0.93098313552599f)}, {Q31( 0.42215817594807f), Q31(-0.07712787385208f)}, +{Q31( 0.02704554141885f), Q31(-0.05417518053666f)}, {Q31( 0.80001773566818f), Q31( 0.91542195141039f)}, +{Q31(-0.79351832348816f), Q31(-0.36208897989136f)}, {Q31( 0.63872359151636f), Q31( 0.08128252493444f)}, +{Q31( 0.52890520960295f), Q31( 0.60048872455592f)}, {Q31( 0.74238552914587f), Q31( 0.04491915291044f)}, +{Q31( 0.99096131449250f), Q31(-0.19451182854402f)}, {Q31(-0.80412329643109f), Q31(-0.88513818199457f)}, +{Q31(-0.64612616129736f), Q31( 0.72198674804544f)}, {Q31( 0.11657770663191f), Q31(-0.83662833815041f)}, +{Q31(-0.95053182488101f), Q31(-0.96939905138082f)}, {Q31(-0.62228872928622f), Q31( 0.82767262846661f)}, +{Q31( 0.03004475787316f), Q31(-0.99738896333384f)}, {Q31(-0.97987214341034f), Q31( 0.36526129686425f)}, +{Q31(-0.99986980746200f), Q31(-0.36021610299715f)}, {Q31( 0.89110648599879f), Q31(-0.97894250343044f)}, +{Q31( 0.10407960510582f), Q31( 0.77357793811619f)}, {Q31( 0.95964737821728f), Q31(-0.35435818285502f)}, +{Q31( 0.50843233159162f), Q31( 0.96107691266205f)}, {Q31( 0.17006334670615f), Q31(-0.76854025314829f)}, +{Q31( 0.25872675063360f), Q31( 0.99893303933816f)}, {Q31(-0.01115998681937f), Q31( 0.98496019742444f)}, +{Q31(-0.79598702973261f), Q31( 0.97138411318894f)}, {Q31(-0.99264708948101f), Q31(-0.99542822402536f)}, +{Q31(-0.99829663752818f), Q31( 0.01877138824311f)}, {Q31(-0.70801016548184f), Q31( 0.33680685948117f)}, +{Q31(-0.70467057786826f), Q31( 0.93272777501857f)}, {Q31( 0.99846021905254f), Q31(-0.98725746254433f)}, +{Q31(-0.63364968534650f), Q31(-0.16473594423746f)}, {Q31(-0.16258217500792f), Q31(-0.95939125400802f)}, +{Q31(-0.43645594360633f), Q31(-0.94805030113284f)}, {Q31(-0.99848471702976f), Q31( 0.96245166923809f)}, +{Q31(-0.16796458968998f), Q31(-0.98987511890470f)}, {Q31(-0.87979225745213f), Q31(-0.71725725041680f)}, +{Q31( 0.44183099021786f), Q31(-0.93568974498761f)}, {Q31( 0.93310180125532f), Q31(-0.99913308068246f)}, +{Q31(-0.93941931782002f), Q31(-0.56409379640356f)}, {Q31(-0.88590003188677f), Q31( 0.47624600491382f)}, +{Q31( 0.99971463703691f), Q31(-0.83889954253462f)}, {Q31(-0.75376385639978f), Q31( 0.00814643438625f)}, +{Q31( 0.93887685615875f), Q31(-0.11284528204636f)}, {Q31( 0.85126435782309f), Q31( 0.52349251543547f)}, +{Q31( 0.39701421446381f), Q31( 0.81779634174316f)}, {Q31(-0.37024464187437f), Q31(-0.87071656222959f)}, +{Q31(-0.36024828242896f), Q31( 0.34655735648287f)}, {Q31(-0.93388812549209f), Q31(-0.84476541096429f)}, +{Q31(-0.65298804552119f), Q31(-0.18439575450921f)}, {Q31( 0.11960319006843f), Q31( 0.99899346780168f)}, +{Q31( 0.94292565553160f), Q31( 0.83163906518293f)}, {Q31( 0.75081145286948f), Q31(-0.35533223142265f)}, +{Q31( 0.56721979748394f), Q31(-0.24076836414499f)}, {Q31( 0.46857766746029f), Q31(-0.30140233457198f)}, +{Q31( 0.97312313923635f), Q31(-0.99548191630031f)}, {Q31(-0.38299976567017f), Q31( 0.98516909715427f)}, +{Q31( 0.41025800019463f), Q31( 0.02116736935734f)}, {Q31( 0.09638062008048f), Q31( 0.04411984381457f)}, +{Q31(-0.85283249275397f), Q31( 0.91475563922421f)}, {Q31( 0.88866808958124f), Q31(-0.99735267083226f)}, +{Q31(-0.48202429536989f), Q31(-0.96805608884164f)}, {Q31( 0.27572582416567f), Q31( 0.58634753335832f)}, +{Q31(-0.65889129659168f), Q31( 0.58835634138583f)}, {Q31( 0.98838086953732f), Q31( 0.99994349600236f)}, +{Q31(-0.20651349620689f), Q31( 0.54593044066355f)}, {Q31(-0.62126416356920f), Q31(-0.59893681700392f)}, +{Q31( 0.20320105410437f), Q31(-0.86879180355289f)}, {Q31(-0.97790548600584f), Q31( 0.96290806999242f)}, +{Q31( 0.11112534735126f), Q31( 0.21484763313301f)}, {Q31(-0.41368337314182f), Q31( 0.28216837680365f)}, +{Q31( 0.24133038992960f), Q31( 0.51294362630238f)}, {Q31(-0.66393410674885f), Q31(-0.08249679629081f)}, +{Q31(-0.53697829178752f), Q31(-0.97649903936228f)}, {Q31(-0.97224737889348f), Q31( 0.22081333579837f)}, +{Q31( 0.87392477144549f), Q31(-0.12796173740361f)}, {Q31( 0.19050361015753f), Q31( 0.01602615387195f)}, +{Q31(-0.46353441212724f), Q31(-0.95249041539006f)}, {Q31(-0.07064096339021f), Q31(-0.94479803205886f)}, +{Q31(-0.92444085484466f), Q31(-0.10457590187436f)}, {Q31(-0.83822593578728f), Q31(-0.01695043208885f)}, +{Q31( 0.75214681811150f), Q31(-0.99955681042665f)}, {Q31(-0.42102998829339f), Q31( 0.99720941999394f)}, +{Q31(-0.72094786237696f), Q31(-0.35008961934255f)}, {Q31( 0.78843311019251f), Q31( 0.52851398958271f)}, +{Q31( 0.97394027897442f), Q31(-0.26695944086561f)}, {Q31( 0.99206463477946f), Q31(-0.57010120849429f)}, +{Q31( 0.76789609461795f), Q31(-0.76519356730966f)}, {Q31(-0.82002421836409f), Q31(-0.73530179553767f)}, +{Q31( 0.81924990025724f), Q31( 0.99698425250579f)}, {Q31(-0.26719850873357f), Q31( 0.68903369776193f)}, +{Q31(-0.43311260380975f), Q31( 0.85321815947490f)}, {Q31( 0.99194979673836f), Q31( 0.91876249766422f)}, +{Q31(-0.80692001248487f), Q31(-0.32627540663214f)}, {Q31( 0.43080003649976f), Q31(-0.21919095636638f)}, +{Q31( 0.67709491937357f), Q31(-0.95478075822906f)}, {Q31( 0.56151770568316f), Q31(-0.70693811747778f)}, +{Q31( 0.10831862810749f), Q31(-0.08628837174592f)}, {Q31( 0.91229417540436f), Q31(-0.65987351408410f)}, +{Q31(-0.48972893932274f), Q31( 0.56289246362686f)}, {Q31(-0.89033658689697f), Q31(-0.71656563987082f)}, +{Q31( 0.65269447475094f), Q31( 0.65916004833932f)}, {Q31( 0.67439478141121f), Q31(-0.81684380846796f)}, +{Q31(-0.47770832416973f), Q31(-0.16789556203025f)}, {Q31(-0.99715979260878f), Q31(-0.93565784007648f)}, +{Q31(-0.90889593602546f), Q31( 0.62034397054380f)}, {Q31(-0.06618622548177f), Q31(-0.23812217221359f)}, +{Q31( 0.99430266919728f), Q31( 0.18812555317553f)}, {Q31( 0.97686402381843f), Q31(-0.28664534366620f)}, +{Q31( 0.94813650221268f), Q31(-0.97506640027128f)}, {Q31(-0.95434497492853f), Q31(-0.79607978501983f)}, +{Q31(-0.49104783137150f), Q31( 0.32895214359663f)}, {Q31( 0.99881175120751f), Q31( 0.88993983831354f)}, +{Q31( 0.50449166760303f), Q31(-0.85995072408434f)}, {Q31( 0.47162891065108f), Q31(-0.18680204049569f)}, +{Q31(-0.62081581361840f), Q31( 0.75000676218956f)}, {Q31(-0.43867015250812f), Q31( 0.99998069244322f)}, +{Q31( 0.98630563232075f), Q31(-0.53578899600662f)}, {Q31(-0.61510362277374f), Q31(-0.89515019899997f)}, +{Q31(-0.03841517601843f), Q31(-0.69888815681179f)}, {Q31(-0.30102157304644f), Q31(-0.07667808922205f)}, +{Q31( 0.41881284182683f), Q31( 0.02188098922282f)}, {Q31(-0.86135454941237f), Q31( 0.98947480909359f)}, +{Q31( 0.67226861393788f), Q31(-0.13494389011014f)}, {Q31(-0.70737398842068f), Q31(-0.76547349325992f)}, +{Q31( 0.94044946687963f), Q31( 0.09026201157416f)}, {Q31(-0.82386352534327f), Q31( 0.08924768823676f)}, +{Q31(-0.32070666698656f), Q31( 0.50143421908753f)}, {Q31( 0.57593163224487f), Q31(-0.98966422921509f)}, +{Q31(-0.36326018419965f), Q31( 0.07440243123228f)}, {Q31( 0.99979044674350f), Q31(-0.14130287347405f)}, +{Q31(-0.92366023326932f), Q31(-0.97979298068180f)}, {Q31(-0.44607178518598f), Q31(-0.54233252016394f)}, +{Q31( 0.44226800932956f), Q31( 0.71326756742752f)}, {Q31( 0.03671907158312f), Q31( 0.63606389366675f)}, +{Q31( 0.52175424682195f), Q31(-0.85396826735705f)}, {Q31(-0.94701139690956f), Q31(-0.01826348194255f)}, +{Q31(-0.98759606946049f), Q31( 0.82288714303073f)}, {Q31( 0.87434794743625f), Q31( 0.89399495655433f)}, +{Q31(-0.93412041758744f), Q31( 0.41374052024363f)}, {Q31( 0.96063943315511f), Q31( 0.93116709541280f)}, +{Q31( 0.97534253457837f), Q31( 0.86150930812689f)}, {Q31( 0.99642466504163f), Q31( 0.70190043427512f)}, +{Q31(-0.94705089665984f), Q31(-0.29580042814306f)}, {Q31( 0.91599807087376f), Q31(-0.98147830385781f)}, +// Start of duplicated table +{Q31(-0.99948153278296f), Q31(-0.59483417516607f)}, {Q31( 0.97113454393991f), Q31(-0.67528515225647f)}, +{Q31( 0.14130051758487f), Q31(-0.95090983575689f)}, {Q31(-0.47005496701697f), Q31(-0.37340549728647f)}, +{Q31( 0.80705063769351f), Q31( 0.29653668284408f)}, {Q31(-0.38981478896926f), Q31( 0.89572605717087f)}, +{Q31(-0.01053049862020f), Q31(-0.66959058036166f)}, {Q31(-0.91266367957293f), Q31(-0.11522938140034f)}, +}; From patchwork Mon Sep 25 18:04:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43903 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp1403897pzh; Mon, 25 Sep 2023 11:05:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfPuGXm482z/mDnBzELqbtBseN6Wee640m6rbH8YzTMKQofrd64HdZ5+uYSiVollbvrvow X-Received: by 2002:a05:6402:1c01:b0:530:c34b:8277 with SMTP id ck1-20020a0564021c0100b00530c34b8277mr5837453edb.6.1695665105532; Mon, 25 Sep 2023 11:05:05 -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 w15-20020a50fa8f000000b005232d28e4fbsi9058307edr.583.2023.09.25.11.05.02; Mon, 25 Sep 2023 11:05:05 -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=IGeK5GK2; 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 5BF3C68C702; Mon, 25 Sep 2023 21:04:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01olkn2036.outbound.protection.outlook.com [40.92.65.36]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1BA1E68C9EB for ; Mon, 25 Sep 2023 21:04:10 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lXfbblKtCtgH4ntc4oTTcARilY25XUUjQz0UCxFC9TdB2BbTgOJ5sttb6zm0ymWCrlB28KMoDtv6R+tNVemUANsPFL1FqdrkLggYE+xeV1aEqTCliKwn6DoKjrvwQD9b+CJq55njp0coJ6AnlDOLuX9CxJGHhJmU4j1epXDHbMlKyhMRwhGtLyad0ZsBY3RUItKit6DhixFYS1jN1t1+9Mw0IMZElJTEPKnoSv6JdcJBEHcPAyma4sQks7yVVhdwx56IcWquwhDXOkgYPkS8ISwEf2iDof4aw6Eq55Gi4Ov4u9S1TFUwTRIBxjTKzK6e3ZG98bXew2N2zjv7T6azbw== 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=0cX3bps60+IwLm7a1AqDJeuYEOHulpPEKfhR80fe58o=; b=GQiaDi2ZpTmSA20y2OePxAC7s4M8shCcz8mDVDB3ccq6GVFQkRs5X2+iE8IhA2dm8kXfSvEQDgDlKrHnrtMo0NKeJHsDxc1Xpu8HwsRjSeV937E9feoO1wqQtv3bJnx40GbY5JIlPhD4WuCbIGSF91LSbsTtyl9IMCApsq4cRj+ceaEteHqoPcG3c2PEfYxCOEdpD9o/TbNxt9+65RniBWg0Vh064vybopHBMW2qR6VCk3wiHt1XPj6KvU9bcatoVGEn8OuWzVZYfsQDtCDAt1aHZVkCFTIUnLHAs9ux0LwIxUzuIrlyXca38pNOl8ZdwWg/jDvCcP+XUOOKAo2e5g== 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=0cX3bps60+IwLm7a1AqDJeuYEOHulpPEKfhR80fe58o=; b=IGeK5GK2YENn00cX1/98sRJJ1+qv05Rhn20lF+4UR9cOg0PjDq892H/EvEXmvcUNTxGnsRmjbAyZWftxuzvrhuFeBghCVV6NVDgfmX0NFw0Vm0ApdLxs5ZFgJvsnrb94Wm3Dg6JaMVi9ta32jiag7Dsgb8/tOgbNEN+TpZXFdRKIvjmEbrRho0DRODjJ5NDtsnqQWcmoS2ucAGpRFEmWokFrY7PieZX4sSkhxMR16b0N3PG3vwn8MbUxZ7dv9vHsdcvoMJLgzF6QypMpl4K55isArsgOMNbJ9CMXufvvmZ1nfbBWVF1Io5OZ01TzeWLejmBuI1NWVdmU16D3F40KXw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0271.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:270::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 18:04:03 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Mon, 25 Sep 2023 18:04:03 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Sep 2023 20:04:57 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [hLwzFzJYCuMPKdYMH+jUT1dNn4aE4sd6] X-ClientProxiedBy: ZR0P278CA0083.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::16) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230925180457.2060101-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0271:EE_ X-MS-Office365-Filtering-Correlation-Id: 7496c0f7-4ca4-43f0-217f-08dbbdf1cd3e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WaIKkqg/pulw0yKaylwrfcdJnPKoyBph3kbU0vConRxPEmS3ZGtXpnbWXnoxG+Dx6hrAbDP0samvRHXuxicOqLT1QKXw7oyhdkbNRs4FBzSbdv5eyFKUbaIMtChx2vMKJV4s8xQ0VRyay73xfnzj7rhB4QdhVK1+cfpBHvgQTjb2p1DJ6g+Nh3b4VBQhAlZ6dFPk86I1nWTBYiVv256uhg0m5GtehaEe0/lXGT+RJhFQGDdMh7WJZlJ0PGQnnzQu67ZGijElHmgT0RW3S+x+QkeBsWf2a0tHx875AFrjsc9Sx08n1/Z0qAxw1gKUnyuqJOqmsStYksfOH5UR1mG6sp6GGkgCaPoZyoEfsV4tSwzbHunXA4JrlpW2OrOQmyXkAXN62WxbHeb7tRMkqtjk5q+U9zQUgx52quGp/JIRe9FChj5P4c2gKVZI4806wQvJyV8Z50YX/jgvrbkXzpDO9WYCWjeQCXM/97Xm4yXNxThF+iWFKxGnhrkYuGlArOkLASPJsoTPHzgSdgDyXVfxn5BfDzw488fChdIxz6gnl1yJUrDY2NKYwdIP7P2JAuNASXwA7czrnnfCUgQYy/OKVPfhn2VNdyeU8eOn7D9uEYJQaViOXJ9Bznpz9IPIHuRy X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PG3N4DTP10Zvv6MqnWr2wZ2BO1ewAee3tZ0cm6g+v+DN+/XgEhtDLYeUQehH19UccY4EZHQVTI+aGeHAv3vHCqKMNflX7Cxuy2kweiFaxCLutSLrp70+wsubHE3XrOb9t6jRTYJ3aOscaC+UmAQHmnJaFu3WEDx0trTxaj8ClYgfzlOmMIFgTqPqrVtj6JCbRdvIwBPZigIcuZifD79oPmb77neoGJcPbb0PHGSI0M3ucbNeeLACAHwjypL0EL2qThku6UfwweFNWBhw7PPE3VXy810yLG01OWTxTwYvkcWuJK/xT9mlXx5UHsztN9MuhKwxkcofRfc6fcib76pHvqDXX7GfXk4H9yjRjmAOo3Oj19esxDpkCQJBAF090ZWBG8mbfP/HubWfykjpib3i4WU15Vgbbc+JwUNj3gteQbjbixOIw4GlRmhzwasvbNhrnSovRSNwAN1mz0NiLm8bdPHKP/yUO/UdP5ik2Tr0ipdk1QT7y4huVaLi1XCm68+t7jkTM1CLkiRfjo7qs1Tn8X0B1jy0+TC8/etw22zTpNBBpDSpO6mPfxE+Eo41fdsaVv7NPds75v9pf8hMdDvpg6XYu9hWK6WA6KLcSR5r0NcdT1O+4FIPpPNWO6vW8B+RcWJBymF5gGTyXNPU3AAl5hlfkPWWHGFyHchdsopxELtiEjRdNndr/vCby7pZ7b4uAHv/DR1i2K3CMFmevvqR+eQt75SNlcsZ4hI+LrsJWdpthtLTbj9zKw4Np/VP0AFkQq15zEObRnbbTLTbYnC+U0o4oqhirBc+hXW/aRImjJuc7Y8rQ1E4xUl/adKPqfux6MwIuMZv2bO82qUcBHrRf3rWFl/7ZD3iv2Ii4g89U4BqXDabCLeKdQ/J6WWTWbcuguNmgmIJ+w7M6nDZOTPNmbCdqLk7RMuPU72FTb0bZv87NFemMzvva8HktHJRQg4kD7BMWdxIUx0W7jMuLLUDWPAzWJc+RVkEeOXHTty8HQxvXuOvithsyBDRSuzO4zfuqaZBG+ikSkz8atyPbpWvfDIMgp7x4K9wtc/TaN0TiokbI6SeGNwihNDqhw2j8jf4Hi5ulhxqJfgdz01gwz4NpMGhvcAL6G3leF85zGBgDI21C3WTl/VlFS1fzzDrRDlQvpgRPDEr60Fye3BWZgqcrkHEc28fNidtwgneosyP/7CWszrZOA9YyJJiA/kd1PuqdU/pA88wJ75k/kIcKdiZdGy8KWaHLtMr2iN5mSLpqyr3++BrSJl/h1gmxA+Hnl4y X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7496c0f7-4ca4-43f0-217f-08dbbdf1cd3e X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 18:04:03.3928 (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: DU2P250MB0271 Subject: [FFmpeg-devel] [PATCH 9/9] avcodec/tests/.gitignore: Add bitstream test tools 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: NkDXYp2GAVxd Signed-off-by: Andreas Rheinhardt --- libavcodec/tests/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/tests/.gitignore b/libavcodec/tests/.gitignore index 5e0ccc5838..8e8878a881 100644 --- a/libavcodec/tests/.gitignore +++ b/libavcodec/tests/.gitignore @@ -2,6 +2,8 @@ /avcodec /avfft /avpacket +/bitstream_be +/bitstream_le /cabac /celp_math /codec_desc