From a649745642e5fb3812c01750e69476d356a42e95 Mon Sep 17 00:00:00 2001
From: Ihor Bobalo <bob@eleks.com>
Date: Thu, 7 Dec 2017 13:27:44 +0200
Subject: [PATCH] libavcodec/hevcdsp: compilation error fixed for ARM

Compilation error "out of range" fixed for armeabi-v7a. Compilation failed trying to build libvlc.aar for ARM7 android on ubuntu 16.04 host. Error messages is "Offset out of range". The reason of the error is assembler LDR directives in function "ff_hevc_transform_luma_4x4_neon_8" need local storage in range <1k, but no such storage provided. Fixed by added "ltorg" directive after the function end, allowing compiler to allocate the local storage just after the function code if neccessary.

Signed-off-by: Ihor Bobalo <bob@eleks.com>
---
 libavcodec/arm/hevcdsp_idct_neon.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/arm/hevcdsp_idct_neon.S b/libavcodec/arm/hevcdsp_idct_neon.S
index 139029a256..9b14ecb27c 100644
--- a/libavcodec/arm/hevcdsp_idct_neon.S
+++ b/libavcodec/arm/hevcdsp_idct_neon.S
@@ -288,6 +288,8 @@ function ff_hevc_transform_luma_4x4_neon_8, export=1
         bx lr
 endfunc
 
+        .ltorg
+
 .macro idct_4x4_dc bitdepth
 function ff_hevc_idct_4x4_dc_\bitdepth\()_neon, export=1
         ldrsh           r1, [r0]
-- 
2.14.1.windows.1

