summaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2018-03-31 21:54:32 +0300
committerMartin Storsjö <martin@martin.st>2018-03-31 21:54:56 +0300
commitf33f728470434a9981a53d7560d67657b93d1e26 (patch)
tree8904c9d5b3a65bfaf5b7bd94d79cc590f646930c /libswscale
parent0c25caa4708cc3a89a9ee9666d0257e6dc6a1573 (diff)
downloadffmpeg-streaming-f33f728470434a9981a53d7560d67657b93d1e26.zip
ffmpeg-streaming-f33f728470434a9981a53d7560d67657b93d1e26.tar.gz
arm: swscale: Only compile the rgb2yuv asm if .dn aliases are supported
Vanilla clang supports altmacro since clang 5.0, and thus doesn't require gas-preprocessor for building the arm assembly any longer. However, the built-in assembler doesn't support .dn directives. This readds checks that were removed in d7320ca3ed10f0d, when the last usage of .dn directives within libav were removed. Alternatively, the assembly could be rewritten to not use the .dn directive, making it available to clang users. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/arm/rgb2yuv_neon_16.S3
-rw-r--r--libswscale/arm/rgb2yuv_neon_32.S3
-rw-r--r--libswscale/arm/swscale_unscaled.c6
3 files changed, 12 insertions, 0 deletions
diff --git a/libswscale/arm/rgb2yuv_neon_16.S b/libswscale/arm/rgb2yuv_neon_16.S
index 601bc9a..ad7e679 100644
--- a/libswscale/arm/rgb2yuv_neon_16.S
+++ b/libswscale/arm/rgb2yuv_neon_16.S
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+#if HAVE_AS_DN_DIRECTIVE
#include "rgb2yuv_neon_common.S"
/* downsampled R16G16B16 x8 */
@@ -78,3 +80,4 @@ alias_qw c8x8x2, q10
.endm
loop_420sp rgbx, nv12, init, kernel_420_16x2, 16
+#endif
diff --git a/libswscale/arm/rgb2yuv_neon_32.S b/libswscale/arm/rgb2yuv_neon_32.S
index f51a5f1..4fd0f64 100644
--- a/libswscale/arm/rgb2yuv_neon_32.S
+++ b/libswscale/arm/rgb2yuv_neon_32.S
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+#if HAVE_AS_DN_DIRECTIVE
#include "rgb2yuv_neon_common.S"
/* downsampled R16G16B16 x8 */
@@ -117,3 +119,4 @@ alias_qw c8x8x2, q10
loop_420sp rgbx, nv12, init, kernel_420_16x2, 32
+#endif
diff --git a/libswscale/arm/swscale_unscaled.c b/libswscale/arm/swscale_unscaled.c
index e1597ab..e41f294 100644
--- a/libswscale/arm/swscale_unscaled.c
+++ b/libswscale/arm/swscale_unscaled.c
@@ -23,6 +23,7 @@
#include "libswscale/swscale_internal.h"
#include "libavutil/arm/cpu.h"
+#if HAVE_AS_DN_DIRECTIVE
extern void rgbx_to_nv12_neon_32(const uint8_t *src, uint8_t *y, uint8_t *chroma,
int width, int height,
int y_stride, int c_stride, int src_stride,
@@ -178,3 +179,8 @@ void ff_get_unscaled_swscale_arm(SwsContext *c)
if (have_neon(cpu_flags))
get_unscaled_swscale_neon(c);
}
+#else
+void ff_get_unscaled_swscale_arm(SwsContext *c)
+{
+}
+#endif
OpenPOWER on IntegriCloud