From patchwork Wed Aug 7 17:39:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kolesa X-Patchwork-Id: 14305 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C4283447FD2 for ; Wed, 7 Aug 2019 20:39:28 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AF17668AAAB; Wed, 7 Aug 2019 20:39:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D39A168A879 for ; Wed, 7 Aug 2019 20:39:21 +0300 (EEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id B0F2E2208C; Wed, 7 Aug 2019 13:39:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 07 Aug 2019 13:39:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=octaforge.org; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=6WZK+1NWuDFpH emJZogVrzpjtL7zcGGeCFRUERlTxs8=; b=aJaiLPaNMcKpnuRJLgnS52rSqNIII DhKmYummTOHNXdWwEbSby3jynshGXFXLjpOjqHnV/5hSc4IzkRxeXmIGIeoczU1a yED6DfzJBzhLHzfk/qit6aUk9bEGMxHzPuH5lIwx+wAYjTucyYF9GPncDsAuPYjG Rk0JrxNB1JUjjmw5ii2CRQ8eYntdq5egx/dI2DI+HbIHpLnVMtJTlzXlX5fOlNKB FI30GkI4DAOnohLyyuxA+jk8kgOzmXyL6xpSQa0a3lkU2l/9C56XlMiLWFaZo2AH m3bPAN+SduJIkukDT95tMyxIVF8gDFefqFl7YLYu9JYrRCdeQ5pXeXvLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=6WZK+1NWuDFpHemJZogVrzpjtL7zcGGeCFRUERlTxs8=; b=pGaF8SFy Zee0kNDat+xspbsZT5rFtTUJYq8/CP8GEZGYRhlSoven1YHbsHan4YrJWAqPVKMS KraYCJQ+notdRpwkf5bITpgSdWGFi+ZvQHqnyNKdkfSnAt8RvVWzuJP5QOenJw/1 7wlkDH3bmqxMJIcG8zn8BjV6D7AKvkrjXnKyxjFNbBeq7AdaYx+c4IHaDg+5e3mJ aymOgt2legBkKxsy4WduHiY2eWUdehTjDbM0C2s/j47vpJ9koC+upzo5GEhOT+jM rs3Y8YFWi8jk9g9LpePocWyoU65Uol0sSoUXV2J69r4W0McBiCHFJE1vOg7/VgTU BPiBMwjyHqbh7g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudduvddgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeffrghnihgvlhcumfholhgvshgruceouggrnhhivghlseho tghtrghfohhrghgvrdhorhhgqeenucfkphepleegrdduuddvrdduvdekrddukeelnecurf grrhgrmhepmhgrihhlfhhrohhmpegurghnihgvlhesohgtthgrfhhorhhgvgdrohhrghen ucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost.localdomain (ip-94-112-128-189.net.upcbroadband.cz [94.112.128.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 0BAC180061; Wed, 7 Aug 2019 13:39:18 -0400 (EDT) From: Daniel Kolesa To: ffmpeg-devel@ffmpeg.org Date: Wed, 7 Aug 2019 19:39:07 +0200 Message-Id: <20190807173907.21750-3-daniel@octaforge.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190807173907.21750-1-daniel@octaforge.org> References: <20190807173907.21750-1-daniel@octaforge.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/2] swscale: Fix AltiVec/VSX build with recent GCC 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 Cc: Daniel Kolesa Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The argument to vec_splat_u16 must be a literal. By making the function always inline and marking the arguments const, gcc can turn those into literals, and avoid build errors like: swscale_vsx.c:165:53: error: argument 1 must be a 5-bit signed literal Fixes #7861. Signed-off-by: Daniel Kolesa --- libswscale/ppc/swscale_vsx.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libswscale/ppc/swscale_vsx.c b/libswscale/ppc/swscale_vsx.c index e6a35d3f78..af8b0e1fa3 100644 --- a/libswscale/ppc/swscale_vsx.c +++ b/libswscale/ppc/swscale_vsx.c @@ -154,8 +154,10 @@ static void yuv2plane1_nbps_u(const int16_t *src, uint16_t *dest, int dstW, } } -static void yuv2plane1_nbps_vsx(const int16_t *src, uint16_t *dest, int dstW, - int big_endian, int output_bits) +static av_always_inline void yuv2plane1_nbps_vsx(const int16_t *src, + uint16_t *dest, int dstW, + const int big_endian, + const int output_bits) { const int dst_u = -(uintptr_t)dest & 7; const int shift = 15 - output_bits; @@ -273,8 +275,10 @@ static void yuv2plane1_16_u(const int32_t *src, uint16_t *dest, int dstW, } } -static void yuv2plane1_16_vsx(const int32_t *src, uint16_t *dest, int dstW, - int big_endian, int output_bits) +static av_always_inline void yuv2plane1_16_vsx(const int32_t *src, + uint16_t *dest, int dstW, + const int big_endian, + int output_bits) { const int dst_u = -(uintptr_t)dest & 7; const int shift = 3;