From patchwork Wed Jan 18 21:45:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 2248 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp1221906vsb; Wed, 18 Jan 2017 13:51:00 -0800 (PST) X-Received: by 10.223.177.130 with SMTP id q2mr4639476wra.39.1484776260005; Wed, 18 Jan 2017 13:51:00 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n5si1812627wra.117.2017.01.18.13.50.59; Wed, 18 Jan 2017 13:50:59 -0800 (PST) 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=@martin-st.20150623.gappssmtp.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D539068A471; Wed, 18 Jan 2017 23:50:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C864B689DEE for ; Wed, 18 Jan 2017 23:50:39 +0200 (EET) Received: by mail-lf0-f66.google.com with SMTP id q89so3410319lfi.1 for ; Wed, 18 Jan 2017 13:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=IQXZ/37j8eBjLtAJi91vKbygflIDUax9tFaGXksW4eY=; b=JyFoDUGoxIkzb+Ha9cporaUzmiFGRrH4wF0ftqWN/lO59puGotkV5UTc71KZwAWFzD aC/L4HXpVYCs00089ezpJotNHPXNe4FRR7aM04xVyHMph1T7YgSKp39+miYGygjtIAOe tscMBPM1EiPExriXtAwAAxdyLfflKX+0lkCgE5+ekinKutAle+mNinJp6Vig17PM0VPT VJku09c0xjt2lL0zVs/tG52GBEaVyJuKKcnxBLGfnPp2ktAFdE5B943S1ij2c45HDDQc xLWL9AOCP4gwf1iqUsY9odCqEP81Y6NS5xWfBjJMNJfo4RM1eYxiY9DC9j7ytvl5rUXx skEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=IQXZ/37j8eBjLtAJi91vKbygflIDUax9tFaGXksW4eY=; b=f4dgCy1SvfBXBPijrh24xFCwR5xuPXwSnWWnoaEaQuPH5xihqTI5IJmuirWlrHK3Xf U8TsSSVKxhwhobkMeSY6Ki8naBrb9zyY10UdE0MGt5+iFYBSYRK9oSHi3aSWs9QW8nNx oA941lUYCJtrX0CMZAdUePemeP9S2oXRTpIz1exOK76zRHDNPpqJ8UToIKesa3t6oyYM ejTjoO2qHmldd7KOTeYQwrNyOt0fkXAG3+rf6o/ZXjThit3AXuNCHAwe7SBfhQwoYuj2 p9rR8iEcIzusglvKO0L+5kZ78UeU9atWmZfRRDapzWkmL1o3Fx4v/tjWAO2JU0P7Gd4g nZww== X-Gm-Message-State: AIkVDXJQ475byG9iBYGCN0kYO3O4eWEKmYK4riToznmpg+QojLaF7rTz8QvjLxcAaYCPfw== X-Received: by 10.46.1.153 with SMTP id f25mr2473133lji.47.1484775921275; Wed, 18 Jan 2017 13:45:21 -0800 (PST) Received: from localhost.localdomain ([2001:470:28:852:3048:584b:aaef:61c1]) by smtp.gmail.com with ESMTPSA id s28sm852125ljd.20.2017.01.18.13.45.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Jan 2017 13:45:20 -0800 (PST) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 18 Jan 2017 23:45:12 +0200 Message-Id: <1484775915-25188-5-git-send-email-martin@martin.st> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484775915-25188-1-git-send-email-martin@martin.st> References: <1484775915-25188-1-git-send-email-martin@martin.st> Subject: [FFmpeg-devel] [PATCH 5/8] aarch64: vp9dsp: Restructure the bpp checks X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This work is sponsored by, and copyright, Google. This is more in line with how it will be extended for more bitdepths. --- libavcodec/aarch64/vp9dsp_init_aarch64.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/libavcodec/aarch64/vp9dsp_init_aarch64.c b/libavcodec/aarch64/vp9dsp_init_aarch64.c index 0bc200e..7b50540 100644 --- a/libavcodec/aarch64/vp9dsp_init_aarch64.c +++ b/libavcodec/aarch64/vp9dsp_init_aarch64.c @@ -96,13 +96,10 @@ define_8tap_2d_funcs(16) define_8tap_2d_funcs(8) define_8tap_2d_funcs(4) -static av_cold void vp9dsp_mc_init_aarch64(VP9DSPContext *dsp, int bpp) +static av_cold void vp9dsp_mc_init_aarch64(VP9DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); - if (bpp != 8) - return; - #define init_fpel(idx1, idx2, sz, type, suffix) \ dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = \ dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][0] = \ @@ -173,13 +170,10 @@ define_itxfm(idct, idct, 32); define_itxfm(iwht, iwht, 4); -static av_cold void vp9dsp_itxfm_init_aarch64(VP9DSPContext *dsp, int bpp) +static av_cold void vp9dsp_itxfm_init_aarch64(VP9DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); - if (bpp != 8) - return; - if (have_neon(cpu_flags)) { #define init_itxfm(tx, sz) \ dsp->itxfm_add[tx][DCT_DCT] = ff_vp9_idct_idct_##sz##_add_neon; \ @@ -219,13 +213,10 @@ define_loop_filters(48, 16); define_loop_filters(84, 16); define_loop_filters(88, 16); -static av_cold void vp9dsp_loopfilter_init_aarch64(VP9DSPContext *dsp, int bpp) +static av_cold void vp9dsp_loopfilter_init_aarch64(VP9DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); - if (bpp != 8) - return; - if (have_neon(cpu_flags)) { dsp->loop_filter_8[0][1] = ff_vp9_loop_filter_v_4_8_neon; dsp->loop_filter_8[0][0] = ff_vp9_loop_filter_h_4_8_neon; @@ -250,7 +241,10 @@ static av_cold void vp9dsp_loopfilter_init_aarch64(VP9DSPContext *dsp, int bpp) av_cold void ff_vp9dsp_init_aarch64(VP9DSPContext *dsp, int bpp) { - vp9dsp_mc_init_aarch64(dsp, bpp); - vp9dsp_loopfilter_init_aarch64(dsp, bpp); - vp9dsp_itxfm_init_aarch64(dsp, bpp); + if (bpp != 8) + return; + + vp9dsp_mc_init_aarch64(dsp); + vp9dsp_loopfilter_init_aarch64(dsp); + vp9dsp_itxfm_init_aarch64(dsp); }