From patchwork Fri Apr 13 17:40:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Chaudhry X-Patchwork-Id: 8449 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.70 with SMTP id c67csp2178915jad; Sat, 14 Apr 2018 15:19:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+zFaU81t3nO94iM/i45a9oBblHwJvrBg/o02kgadhLqf3ZRKwx15Sg8xPoMhsyU6ckYFWg X-Received: by 10.28.230.91 with SMTP id d88mr6768982wmh.67.1523744386907; Sat, 14 Apr 2018 15:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523744386; cv=none; d=google.com; s=arc-20160816; b=j2pu9Q0HhuU1eFlq4EISDjzql8Ec91UWoTJFolAhJfq56Yy+vX9DOR9o033YkhforT PxEw+NkCBmC+BNleEDVRbQ6NqdMUUTi5qatSe1iJhhjzlshyxwUTHZWRvDsyREBRh2aV Jc1L7nPnNj1gt/hvjOG4d8vpkPcGbaGVfsVdcfyUCT07SFQ9+Y+Lx/DTTa6gbgt3UUxX qzXP2g7iZwWr1Bez63LXAscmNyG9S41FfoNCWeYl1uCG1a8n1BPfB2b3HZh0u7nmrFiD Q5hg/p3c4yVTZWYu8WUTcUS1Z7SbkIqXyBfrNTmCJkCeaD1JXa2s4wqjV6NzF359Z6+Q YVKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:to:message-id:date:from:mime-version :dkim-signature:delivered-to:arc-authentication-results; bh=Uifh7XUOiN3Q6p0piGgOFOTLKS4QeikbtHHxI66Jhfk=; b=UdNzYcpArX11BJbOvJlFQsevbXZPq8tqLZ48uhQPHyZMPZSw3PZmFwL3BpobdfwYMg 6TU8Z5fectGv+3wGVR05rtNZ3fgq66yLiTM+grtjjD1WaVA5/iU9Hq/4f9V4iJqPGrDt O8DVfZG/FjJPIPQJL88yDyLZQlL6/XuSh2mSRVXQunFetLkIJtKUWOM+WEv875jawsJk 2zzjQxdq1D3QYQdfe0+Mtm86WzbL5khaQ19S1me1s9auBwyMcp35gmzCK4DEwXrJRgq4 l9ikdA7kvoqFzp5HOrwMKPXkXOrpfzaJLgOSgMQF0R3MwkqjYfJX0rkeGJmGApIs42n5 VC9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20161025 header.b=Jj8jT3Ep; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m1si6406521wrj.293.2018.04.14.15.19.46; Sat, 14 Apr 2018 15:19:46 -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=@google.com header.s=20161025 header.b=Jj8jT3Ep; 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 D59C9689EEF; Sun, 15 Apr 2018 01:19:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yw0-f178.google.com (mail-yw0-f178.google.com [209.85.161.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 63B836807F0 for ; Fri, 13 Apr 2018 20:45:54 +0300 (EEST) Received: by mail-yw0-f178.google.com with SMTP id c9so1701547ywb.3 for ; Fri, 13 Apr 2018 10:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ukkBBmBUruj7/GFIeWdk9+6fzqq4jrj1uOHn0CPein0=; b=Jj8jT3EpHaxOpjlOffkFOWibcrCSb0apZHOunGtO4FbGoBjSdu/BiylScPdrDf+khb jOWmg6zsPe1fc6FCLSoGL30rkTjEFWsw0ybODY1s0bLpoKhCMlwhZwoAPOm86548jCDj 3be8l1JEk1YPSb2/FOaBCB9ms4KIHbFu+BEV+8eTTfH2r+0POLDt/Q7TSkqD8k1E5Rnp pGNgnieHtZhiFGbqujdqJt3vaGmKKcYhr5WxVTI6Okcaa+h5+pgizLvZOq+I1CM0tIKt 3mYWKjLVjiyD8i8bwmDXa5H01gigYBaIMMPH25FGTVrRQPh/4GZNESqCUxfbOX5G3S1D UYig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ukkBBmBUruj7/GFIeWdk9+6fzqq4jrj1uOHn0CPein0=; b=W4fB1WnNf6tPZUiyi5L2At7Q1xlDD2CgmNxzGgIS5ZlSfv20FsguNGkkclUrvZjT5M LGFGJkbPO2UFep/Ny9qGIW8yFHGp+KcWWAfG7NMBGpENXok7SOZlN4Dast2TFVAILN2C 5h07uuMNRk0LobxJm4plr7BhLgOK3+sbmsRRwrvWq0geQYLASfI3Ks3X64rlwdAVgOF/ Gn5HCRM3EkgaA5D06P5/334v4BqDy6S7FNjKPuFEzOZ59J9BcLygdWxYJhGwgykSTywa NA03mU34wXbWwTweChZwnZk++PGjy/+qmfSKVu5Uk4qq3YK5exAiAQTXXZ+48qPZoLyh W0/Q== X-Gm-Message-State: ALQs6tC3FMgTJp+RKiub+s78SuNZlYNeHYvvKJndiXoB78DrxEglxJwF Jt93T8jjpmIdgjXTFWoz+okAjK5TJr8k8L0o7sCLYRB2m10= X-Received: by 10.129.231.7 with SMTP id x7mr5314463ywl.196.1523641259367; Fri, 13 Apr 2018 10:40:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:2c4a:0:0:0:0:0 with HTTP; Fri, 13 Apr 2018 10:40:58 -0700 (PDT) From: Rahul Chaudhry Date: Fri, 13 Apr 2018 10:40:58 -0700 Message-ID: To: ffmpeg-devel@ffmpeg.org X-Mailman-Approved-At: Sun, 15 Apr 2018 01:19:19 +0300 Subject: [FFmpeg-devel] [PATCH] swresample/arm: avoid conditional branch to PLT in THUMB-2. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" When compiling for THUMB-2, the conditional branch to PLT results in a R_ARM_THM_JUMP19 relocation. Some linkers don't support this relocation in THUMB-2 (ld.gold), while others can end up truncating the relocation to fit (ld.bfd). Adding an "it eq" before the branch converts it into an unconditional branch, which uses R_ARM_THM_JUMP24 relocation that has a range of 16MB. See https://github.com/android-ndk/ndk/issues/337 for background. The current workaround is to disable neon during gstreamer build, which is not optimal and can be reverted after this patch: https://github.com/freedesktop/gstreamer-cerbero/commit/41556c415739fbc3a72c7eaee7e70a565b719b2f --- libswresample/arm/audio_convert_neon.S | 1 + 1 file changed, 1 insertion(+) diff --git libswresample/arm/audio_convert_neon.S libswresample/arm/audio_convert_neon.S index 1f88316ddec838dfe791b08cbe72533207994741..bc933fb4bd00071702f553cc0f3e74797c33ab12 100644 --- libswresample/arm/audio_convert_neon.S +++ libswresample/arm/audio_convert_neon.S @@ -134,6 +134,7 @@ function swri_oldapi_conv_fltp_to_s16_nch_neon, export=1 itt lt ldrlt r1, [r1] blt X(swri_oldapi_conv_flt_to_s16_neon) + it eq beq X(swri_oldapi_conv_fltp_to_s16_2ch_neon) push {r4-r8, lr}