From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 7AC3145343 for ; Fri, 24 Feb 2023 01:19:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A60CA68C048; Fri, 24 Feb 2023 03:19:49 +0200 (EET) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7614068A9DF for ; Fri, 24 Feb 2023 03:19:43 +0200 (EET) Received: by mail-pg1-f177.google.com with SMTP id p6so6704122pga.0 for ; Thu, 23 Feb 2023 17:19:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=8NmBgIulKr/fI/fV7JgChqeLYByucQxdPvAQkkbfWXA=; b=qIMwfQaPCN4zGrS1iocBtbCZfjSPw9ADQCSxc6ojeMIVu1gToU/L+HSnTqHKG+SEMa U3nN6ZBHiQzgel3oJYiarIXnZbsNG3jlJhhUQHMkyJmCCT45BNfacogaeyk0gdE7l3/O ANQva7yKQEY08UKFwd1E53IQYijgTy4ywR/W2wj8fGKxn+Oe11TIRYLGZSB+FLHfhPD5 leh8txEUjr4aw++5sQcQYGmFHXwyuMUYEzbnONLR++rhEmfQIrFMVCvATFrwo44MkgIr HSKKJAwY91x7WPMt7X27khSEer0Wd1QfT0GQJpEv8q57oKxJg1HtR4R32mdeJLpwNzTc fXOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8NmBgIulKr/fI/fV7JgChqeLYByucQxdPvAQkkbfWXA=; b=lmD7CBk1eF+5PjzQQyVTDNAcgRS8FPKyJrd8EPDrxSW/K0hNehVLo/Emaolp1r3UxK 0HKp7oLiim9jynML0YoRSqn0fpnYegfxSBdmwAsok0bXeioZvvDWw1UDkbbg5/jXFSZW DpP0tCK+w/WaViVXZVly+vfM7INri+LdQyUeoHEEiu2W7kihXm+Erj/NiCuJ3nyIlbVI xGmAR48Jt6bGQqG8BkUrnhNgWaTrHE3hIzXXeQ/IGW2WWj7L1xFIbYrntaPsjsUMFyIY KYflDpHDtoprUyvOSFiVL3w5EVkuALmyZyzpX7yhiwJ5k9jhdGUe2xC1X99xyTDeGp1f vFpQ== X-Gm-Message-State: AO0yUKV1auWaeD6Q2wxvXoUunFab9wiSviduqxg8rI0X02hSOEGXa1EE 6Ab55P/9BsQNM+hqv4PXLnjslCMw7IPShPG1itNSoNLP X-Google-Smtp-Source: AK7set+CiYtO4bYtriABJD0ShqxLlqAUAW4eFOK4ts6LsbAgDHNT25Cd/C1iIOgjaNkvg/mgccfQ3Eg7yM/sqf5AC4M= X-Received: by 2002:a63:77c8:0:b0:503:a8:2793 with SMTP id s191-20020a6377c8000000b0050300a82793mr634926pgc.3.1677201581160; Thu, 23 Feb 2023 17:19:41 -0800 (PST) MIME-Version: 1.0 References: <20230220195703.1297421-1-jdarnley@obe.tv> In-Reply-To: <20230220195703.1297421-1-jdarnley@obe.tv> From: Thomas Mundt Date: Thu, 23 Feb 2023 19:19:29 -0600 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH 1/3] avfilter: move bwdif's filter_line init into a dedicated function 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Hi James, James Darnley schrieb am Mo., 20. Feb. 2023, 13:59: > --- > libavfilter/bwdif.h | 3 ++- > libavfilter/vf_bwdif.c | 13 +++++++++---- > libavfilter/x86/vf_bwdif_init.c | 4 +--- > 3 files changed, 12 insertions(+), 8 deletions(-) > > diff --git a/libavfilter/bwdif.h b/libavfilter/bwdif.h > index 889ff772ed..5749345f78 100644 > --- a/libavfilter/bwdif.h > +++ b/libavfilter/bwdif.h > @@ -37,6 +37,7 @@ typedef struct BWDIFContext { > int parity, int clip_max, int spat); > } BWDIFContext; > > -void ff_bwdif_init_x86(BWDIFContext *bwdif); > +void ff_bwdif_init_filter_line(BWDIFContext *bwdif, int bit_depth); > +void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth); > > #endif /* AVFILTER_BWDIF_H */ > diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c > index 65c617ebb3..34e8c5e234 100644 > --- a/libavfilter/vf_bwdif.c > +++ b/libavfilter/vf_bwdif.c > @@ -340,7 +340,14 @@ static int config_props(AVFilterLink *link) > > yadif->csp = av_pix_fmt_desc_get(link->format); > yadif->filter = filter; > - if (yadif->csp->comp[0].depth > 8) { > + ff_bwdif_init_filter_line(s, yadif->csp->comp[0].depth); > + > + return 0; > +} > + > +av_cold void ff_bwdif_init_filter_line(BWDIFContext *s, int bit_depth) > +{ > + if (bit_depth > 8) { > s->filter_intra = filter_intra_16bit; > s->filter_line = filter_line_c_16bit; > s->filter_edge = filter_edge_16bit; > @@ -351,10 +358,8 @@ static int config_props(AVFilterLink *link) > } > > #if ARCH_X86 > - ff_bwdif_init_x86(s); > + ff_bwdif_init_x86(s, bit_depth); > #endif > - > - return 0; > } > > > diff --git a/libavfilter/x86/vf_bwdif_init.c > b/libavfilter/x86/vf_bwdif_init.c > index e24e5cd9b1..ba7bc40c3d 100644 > --- a/libavfilter/x86/vf_bwdif_init.c > +++ b/libavfilter/x86/vf_bwdif_init.c > @@ -42,11 +42,9 @@ void ff_bwdif_filter_line_12bit_ssse3(void *dst, void > *prev, void *cur, void *ne > int mrefs2, int prefs3, int mrefs3, > int prefs4, > int mrefs4, int parity, int > clip_max); > > -av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif) > +av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth) > { > - YADIFContext *yadif = &bwdif->yadif; > int cpu_flags = av_get_cpu_flags(); > - int bit_depth = (!yadif->csp) ? 8 : yadif->csp->comp[0].depth; > > if (bit_depth <= 8) { > if (EXTERNAL_SSE2(cpu_flags)) > -- > 2.39.1 > I'm travelling at the moment and can only look at your patch set on my phone. At first glance it looks good. If you are not in a hurry, I would test it in two to three weeks when I am back home and have time. Best Regards, Thomas > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".