Commit 1556d0d3 by Błażej Szczygieł

libvpx: Necessary modifications

- convert ARM assembly (NEON) files, - add rtcd for run-time CPU features detection, - modify "system_state.h", - "arm_cpudetect.c" fixes.
parent 5268443f
#ifndef VP8_RTCD_H_
#define VP8_RTCD_H_
#ifdef RTCD_C
#define RTCD_EXTERN
#else
#define RTCD_EXTERN extern
#endif
/*
* VP8
*/
struct blockd;
struct loop_filter_info;
#ifdef __cplusplus
extern "C" {
#endif
void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c
void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c
void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c
void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c
void vp8_clear_system_state_c();
#define vp8_clear_system_state vp8_clear_system_state_c
void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
#define vp8_copy_mem16x16 vp8_copy_mem16x16_c
void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
#define vp8_copy_mem8x4 vp8_copy_mem8x4_c
void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
#define vp8_copy_mem8x8 vp8_copy_mem8x8_c
void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
#define vp8_dc_only_idct_add vp8_dc_only_idct_add_c
void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride);
#define vp8_dequant_idct_add vp8_dequant_idct_add_c
void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c
void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c
void vp8_dequantize_b_c(struct blockd*, short *dqc);
#define vp8_dequantize_b vp8_dequantize_b_c
void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
#define vp8_loop_filter_bh vp8_loop_filter_bh_c
void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
#define vp8_loop_filter_bv vp8_loop_filter_bv_c
void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
#define vp8_loop_filter_mbh vp8_loop_filter_mbh_c
void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
#define vp8_loop_filter_mbv vp8_loop_filter_mbv_c
void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit);
#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c
void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit);
#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c
void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c
void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c
void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
#define vp8_short_idct4x4llm vp8_short_idct4x4llm_c
void vp8_short_inv_walsh4x4_c(short *input, short *output);
#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c
void vp8_short_inv_walsh4x4_1_c(short *input, short *output);
#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c
void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c
void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c
void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c
void vp8_rtcd(void);
#ifdef RTCD_C
static void setup_rtcd_internal(void)
{
}
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif
#ifndef VP9_RTCD_H_
#define VP9_RTCD_H_
#ifdef RTCD_C
#define RTCD_EXTERN
#else
#define RTCD_EXTERN extern
#endif
/*
* VP9
*/
#include "vp9/common/vp9_common.h"
#ifdef __cplusplus
extern "C" {
#endif
void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type);
#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c
void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iht4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
RTCD_EXTERN void (*vp9_iht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
RTCD_EXTERN void (*vp9_iht8x8_64_add)(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_rtcd(void);
#ifdef RTCD_C
#include "vpx_ports/arm.h"
static void setup_rtcd_internal(void)
{
int flags = arm_cpu_caps();
vp9_iht4x4_16_add = vp9_iht4x4_16_add_c;
#if HAVE_NEON
if (flags & HAS_NEON) vp9_iht4x4_16_add = vp9_iht4x4_16_add_neon;
#endif
vp9_iht8x8_64_add = vp9_iht8x8_64_add_c;
#if HAVE_NEON
if (flags & HAS_NEON) vp9_iht8x8_64_add = vp9_iht8x8_64_add_neon;
#endif
}
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif
#ifndef VP9_RTCD_H_
#define VP9_RTCD_H_
#ifdef RTCD_C
#define RTCD_EXTERN
#else
#define RTCD_EXTERN extern
#endif
/*
* VP9
*/
#include "vp9/common/vp9_common.h"
#ifdef __cplusplus
extern "C" {
#endif
void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type);
#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c
void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
#define vp9_iht4x4_16_add vp9_iht4x4_16_add_c
void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
#define vp9_iht8x8_64_add vp9_iht8x8_64_add_c
void vp9_rtcd(void);
#ifdef RTCD_C
static void setup_rtcd_internal(void)
{
}
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif
#ifndef VP9_RTCD_H_
#define VP9_RTCD_H_
#ifdef RTCD_C
#define RTCD_EXTERN
#else
#define RTCD_EXTERN extern
#endif
/*
* VP9
*/
#include "vp9/common/vp9_common.h"
#ifdef __cplusplus
extern "C" {
#endif
void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type);
void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pitch, int tx_type);
RTCD_EXTERN void (*vp9_iht16x16_256_add)(const tran_low_t *input, uint8_t *output, int pitch, int tx_type);
void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
RTCD_EXTERN void (*vp9_iht4x4_16_add)(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
RTCD_EXTERN void (*vp9_iht8x8_64_add)(const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_rtcd(void);
#ifdef RTCD_C
#include "vpx_ports/x86.h"
static void setup_rtcd_internal(void)
{
int flags = x86_simd_caps();
vp9_iht16x16_256_add = vp9_iht16x16_256_add_c;
if (flags & HAS_SSE2) vp9_iht16x16_256_add = vp9_iht16x16_256_add_sse2;
vp9_iht4x4_16_add = vp9_iht4x4_16_add_c;
if (flags & HAS_SSE2) vp9_iht4x4_16_add = vp9_iht4x4_16_add_sse2;
vp9_iht8x8_64_add = vp9_iht8x8_64_add_c;
if (flags & HAS_SSE2) vp9_iht8x8_64_add = vp9_iht8x8_64_add_sse2;
}
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif
#include "vpx_config.h"
#if defined(WEBM_X86ASM) && (ARCH_X86 || ARCH_X86_64)
#include "rtcd/vp8_rtcd_x86.h"
#elif defined(WEBM_ARMASM) && ARCH_ARM
#include "rtcd/vp8_rtcd_arm.h"
#else
#include "rtcd/vp8_rtcd_c.h"
#endif
#include "vpx_config.h"
#if defined(WEBM_X86ASM) && (ARCH_X86 || ARCH_X86_64)
#include "rtcd/vp9_rtcd_x86.h"
#elif defined(WEBM_ARMASM) && ARCH_ARM
#include "rtcd/vp9_rtcd_arm.h"
#else
#include "rtcd/vp9_rtcd_c.h"
#endif
%ifdef X86_32
ARCH_X86 equ 1
ARCH_X86_64 equ 0
%elifdef X86_64
ARCH_X86 equ 0
ARCH_X86_64 equ 1
%endif
HAVE_VPX_PORTS equ 1
CONFIG_DEPENDENCY_TRACKING equ 0
CONFIG_EXTERNAL_BUILD equ 0
CONFIG_INSTALL_DOCS equ 0
CONFIG_INSTALL_BINS equ 0
CONFIG_INSTALL_LIBS equ 0
CONFIG_INSTALL_SRCS equ 0
CONFIG_USE_X86INC equ 1
CONFIG_DEBUG equ 0
CONFIG_GPROF equ 0
CONFIG_GCOV equ 0
CONFIG_RVCT equ 0
CONFIG_PIC equ 1 ;TODO: autodetect
CONFIG_CODEC_SRCS equ 0
CONFIG_DEBUG_LIBS equ 0
CONFIG_DEQUANT_TOKENS equ 0
CONFIG_DC_RECON equ 0
CONFIG_RUNTIME_CPU_DETECT equ 1
CONFIG_POSTPROC equ 0
CONFIG_VP9_POSTPROC equ 0
CONFIG_MULTITHREAD equ 1
CONFIG_INTERNAL_STATS equ 0
CONFIG_VP8_ENCODER equ 0
CONFIG_VP8_DECODER equ 1
CONFIG_VP9_ENCODER equ 0
CONFIG_VP9_DECODER equ 1
CONFIG_VP8 equ 1
CONFIG_VP9 equ 1
CONFIG_ENCODERS equ 0
CONFIG_DECODERS equ 1
CONFIG_STATIC_MSVCRT equ 0
CONFIG_SPATIAL_RESAMPLING equ 0
CONFIG_REALTIME_ONLY equ 0
CONFIG_ONTHEFLY_BITPACKING equ 0
CONFIG_ERROR_CONCEALMENT equ 0
CONFIG_SHARED equ 0
CONFIG_STATIC equ 0
CONFIG_SMALL equ 0
CONFIG_POSTPROC_VISUALIZER equ 0
CONFIG_OS_SUPPORT equ 1
CONFIG_UNIT_TESTS equ 0
CONFIG_WEBM_IO equ 0
CONFIG_LIBYUV equ 0
CONFIG_DECODE_PERF_TESTS equ 0
CONFIG_ENCODE_PERF_TESTS equ 0
CONFIG_MULTI_RES_ENCODING equ 0
CONFIG_TEMPORAL_DENOISING equ 1
CONFIG_VP9_TEMPORAL_DENOISING equ 0
CONFIG_COEFFICIENT_RANGE_CHECKING equ 0
CONFIG_VP9_HIGHBITDEPTH equ 0
CONFIG_BETTER_HW_COMPATIBILITY equ 0
CONFIG_EXPERIMENTAL equ 0
CONFIG_SIZE_LIMIT equ 0
CONFIG_SPATIAL_SVC equ 0
CONFIG_FP_MB_STATS equ 0
CONFIG_EMULATE_HARDWARE equ 0
CONFIG_MISC_FIXES equ 0
/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
/* */
/* Use of this source code is governed by a BSD-style license */
/* that can be found in the LICENSE file in the root of the source */
/* tree. An additional intellectual property rights grant can be found */
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
/* This file automatically generated by configure. Do not edit! */
#ifndef VPX_CONFIG_H
#define VPX_CONFIG_H
#define RESTRICT
#define INLINE inline
#define HAVE_MIPS32 0
#define HAVE_MEDIA 0
#if defined(__i386) || defined(__i386__) || defined(_M_IX86)
#define ARCH_X86 1
#define ARCH_X86_64 0
#define ARCH_ARM 0
#define HAVE_NEON 0
#define HAVE_NEON_ASM 0
#define HAVE_MMX 1
#define HAVE_SSE2 1
#define HAVE_SSSE3 1
#define HAVE_AVX2 1
#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
#define ARCH_X86 0
#define ARCH_X86_64 1
#define ARCH_ARM 0
#define HAVE_NEON 0
#define HAVE_NEON_ASM 0
#define HAVE_MMX 1
#define HAVE_SSE2 1
#define HAVE_SSSE3 1
#define HAVE_AVX2 1
#elif defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__aarch64__)
#define ARCH_X86 0
#define ARCH_X86_64 0
#define ARCH_ARM 1
#define HAVE_NEON 1
#define HAVE_NEON_ASM 1
#else
#define ARCH_X86 0
#define ARCH_X86_64 0
#define ARCH_ARM 0
#define HAVE_NEON 0
#define HAVE_NEON_ASM 0
#endif
#define CONFIG_BIG_ENDIAN 0 //TODO: Autodetect
#ifdef _WIN32
#define HAVE_PTHREAD_H 0
#define HAVE_UNISTD_H 0
#else
#define HAVE_PTHREAD_H 1
#define HAVE_UNISTD_H 1
#endif
/**/
#define HAVE_VPX_PORTS 1
#define CONFIG_DEPENDENCY_TRACKING 0
#define CONFIG_EXTERNAL_BUILD 0
#define CONFIG_INSTALL_DOCS 0
#define CONFIG_INSTALL_BINS 0
#define CONFIG_INSTALL_LIBS 0
#define CONFIG_INSTALL_SRCS 0
#define CONFIG_DEBUG 0
#define CONFIG_GPROF 0
#define CONFIG_GCOV 0
#define CONFIG_RVCT 0
#define CONFIG_CODEC_SRCS 0
#define CONFIG_DEBUG_LIBS 0
#define CONFIG_DEQUANT_TOKENS 0
#define CONFIG_DC_RECON 0
#define CONFIG_RUNTIME_CPU_DETECT 1
#define CONFIG_POSTPROC 0
#define CONFIG_VP9_POSTPROC 0
#define CONFIG_MULTITHREAD 1
#define CONFIG_INTERNAL_STATS 0
#define CONFIG_VP8_ENCODER 0
#define CONFIG_VP8_DECODER 1
#define CONFIG_VP9_ENCODER 0
#define CONFIG_VP9_DECODER 1
#define CONFIG_VP8 1
#define CONFIG_VP9 1
#define CONFIG_ENCODERS 0
#define CONFIG_DECODERS 1
#define CONFIG_STATIC_MSVCRT 0
#define CONFIG_SPATIAL_RESAMPLING 0
#define CONFIG_REALTIME_ONLY 0
#define CONFIG_ONTHEFLY_BITPACKING 0
#define CONFIG_ERROR_CONCEALMENT 0
#define CONFIG_SHARED 0
#define CONFIG_STATIC 0
#define CONFIG_SMALL 0
#define CONFIG_POSTPROC_VISUALIZER 0
#define CONFIG_OS_SUPPORT 1
#define CONFIG_UNIT_TESTS 0
#define CONFIG_WEBM_IO 0
#define CONFIG_LIBYUV 0
#define CONFIG_DECODE_PERF_TESTS 0
#define CONFIG_ENCODE_PERF_TESTS 0
#define CONFIG_MULTI_RES_ENCODING 0
#define CONFIG_TEMPORAL_DENOISING 0
#define CONFIG_VP9_TEMPORAL_DENOISING 0
#define CONFIG_COEFFICIENT_RANGE_CHECKING 0
#define CONFIG_VP9_HIGHBITDEPTH 0
#define CONFIG_BETTER_HW_COMPATIBILITY 0
#define CONFIG_EXPERIMENTAL 0
#define CONFIG_SIZE_LIMIT 0
#define CONFIG_SPATIAL_SVC 0
#define CONFIG_FP_MB_STATS 0
#define CONFIG_EMULATE_HARDWARE 0
#define CONFIG_MISC_FIXES 0
#endif /* VPX_CONFIG_H */
; This file was created from a .asm file
; using the ads2armasm_ms.pl script.
;
; Copyright (c) 2014 The WebM project authors. All Rights Reserved.
;
......@@ -20,11 +22,10 @@
EXPORT |vpx_tm_predictor_8x8_neon|
EXPORT |vpx_tm_predictor_16x16_neon|
EXPORT |vpx_tm_predictor_32x32_neon|
ARM
REQUIRE8
PRESERVE8
AREA ||.text||, CODE, READONLY, ALIGN=2
AREA |.text|, CODE, READONLY, ALIGN=2
;void vpx_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -42,6 +43,7 @@
vst1.32 {d0[0]}, [r0], r1
bx lr
ENDP ; |vpx_v_predictor_4x4_neon|
ALIGN 4
;void vpx_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -63,6 +65,7 @@
vst1.8 {d0}, [r0], r1
bx lr
ENDP ; |vpx_v_predictor_8x8_neon|
ALIGN 4
;void vpx_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -92,6 +95,7 @@
vst1.8 {q0}, [r0], r1
bx lr
ENDP ; |vpx_v_predictor_16x16_neon|
ALIGN 4
;void vpx_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -125,6 +129,7 @@ loop_v
bgt loop_v
bx lr
ENDP ; |vpx_v_predictor_32x32_neon|
ALIGN 4
;void vpx_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -146,6 +151,7 @@ loop_v
vst1.32 {d0[0]}, [r0], r1
bx lr
ENDP ; |vpx_h_predictor_4x4_neon|
ALIGN 4
;void vpx_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -175,6 +181,7 @@ loop_v
vst1.64 {d0}, [r0], r1
bx lr
ENDP ; |vpx_h_predictor_8x8_neon|
ALIGN 4
;void vpx_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -220,6 +227,7 @@ loop_v
vst1.8 {q0}, [r0], r1
bx lr
ENDP ; |vpx_h_predictor_16x16_neon|
ALIGN 4
;void vpx_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -286,6 +294,7 @@ loop_h
bgt loop_h
bx lr
ENDP ; |vpx_h_predictor_32x32_neon|
ALIGN 4
;void vpx_tm_predictor_4x4_neon (uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -332,6 +341,7 @@ loop_h
vst1.32 {d1[0]}, [r0], r1
bx lr
ENDP ; |vpx_tm_predictor_4x4_neon|
ALIGN 4
;void vpx_tm_predictor_8x8_neon (uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -404,6 +414,7 @@ loop_h
bx lr
ENDP ; |vpx_tm_predictor_8x8_neon|
ALIGN 4
;void vpx_tm_predictor_16x16_neon (uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -497,6 +508,7 @@ loop_16x16_neon
bx lr
ENDP ; |vpx_tm_predictor_16x16_neon|
ALIGN 4
;void vpx_tm_predictor_32x32_neon (uint8_t *dst, ptrdiff_t y_stride,
; const uint8_t *above,
......@@ -626,5 +638,6 @@ loop_32x32_neon
bx lr
ENDP ; |vpx_tm_predictor_32x32_neon|
ALIGN 4
END
; This file was created from a .asm file
; using the ads2armasm_ms.pl script.
;
; Copyright (c) 2013 The WebM project authors. All Rights Reserved.
;
......@@ -11,9 +13,8 @@
EXPORT |vpx_lpf_horizontal_edge_8_neon|
EXPORT |vpx_lpf_horizontal_edge_16_neon|
EXPORT |vpx_lpf_vertical_16_neon|
ARM
AREA ||.text||, CODE, READONLY, ALIGN=2
AREA |.text|, CODE, READONLY, ALIGN=2
; void mb_lpf_horizontal_edge(uint8_t *s, int p,
; const uint8_t *blimit,
......@@ -117,6 +118,7 @@ h_next
pop {r4-r8, pc}
ENDP ; |mb_lpf_horizontal_edge|
ALIGN 4
; void vpx_lpf_horizontal_edge_8_neon(uint8_t *s, int pitch,
; const uint8_t *blimit,
......@@ -131,6 +133,7 @@ h_next
mov r12, #1
b mb_lpf_horizontal_edge
ENDP ; |vpx_lpf_horizontal_edge_8_neon|
ALIGN 4
; void vpx_lpf_horizontal_edge_16_neon(uint8_t *s, int pitch,
; const uint8_t *blimit,
......@@ -145,6 +148,7 @@ h_next
mov r12, #2
b mb_lpf_horizontal_edge
ENDP ; |vpx_lpf_horizontal_edge_16_neon|
ALIGN 4
; void vpx_lpf_vertical_16_neon(uint8_t *s, int p,
; const uint8_t *blimit,
......@@ -309,6 +313,7 @@ v_end
pop {r4-r8, pc}
ENDP ; |vpx_lpf_vertical_16_neon|
ALIGN 4
; void vpx_wide_mbfilter_neon();
; This is a helper function for the loopfilters. The invidual functions do the
......@@ -631,5 +636,6 @@ v_end
bx lr
ENDP ; |vpx_wide_mbfilter_neon|
ALIGN 4
END
; This file was created from a .asm file
; using the ads2armasm_ms.pl script.
;
; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
;
......@@ -12,11 +14,10 @@
EXPORT |vpx_push_neon|
EXPORT |vpx_pop_neon|
ARM
REQUIRE8
PRESERVE8
AREA ||.text||, CODE, READONLY, ALIGN=2
AREA |.text|, CODE, READONLY, ALIGN=2
|vpx_push_neon| PROC
vst1.i64 {d8, d9, d10, d11}, [r0]!
......@@ -24,6 +25,7 @@
bx lr
ENDP
ALIGN 4
|vpx_pop_neon| PROC
vld1.i64 {d8, d9, d10, d11}, [r0]!
......@@ -31,6 +33,7 @@
bx lr
ENDP
ALIGN 4
END
@ This file was created from a .asm file
@ using the ads2gas.pl script.
.equ DO1STROUNDING, 0
@
@ Copyright (c) 2010 The WebM project authors. All Rights Reserved.
@
@ Use of this source code is governed by a BSD-style license
@ that can be found in the LICENSE file in the root of the source
@ tree. An additional intellectual property rights grant can be found
@ in the file PATENTS. All contributing project authors may
@ be found in the AUTHORS file in the root of the source tree.
@
.global vpx_push_neon
.type vpx_push_neon, function
.global vpx_pop_neon
.type vpx_pop_neon, function
.arm
.eabi_attribute 24, 1 @Tag_ABI_align_needed
.eabi_attribute 25, 1 @Tag_ABI_align_preserved
.text
.p2align 2
_vpx_push_neon:
vpx_push_neon: @ PROC
vst1.i64 {d8, d9, d10, d11}, [r0]!
vst1.i64 {d12, d13, d14, d15}, [r0]!
bx lr
.size vpx_push_neon, .-vpx_push_neon @ ENDP
_vpx_pop_neon:
vpx_pop_neon: @ PROC
vld1.i64 {d8, d9, d10, d11}, [r0]!
vld1.i64 {d12, d13, d14, d15}, [r0]!
bx lr
.size vpx_pop_neon, .-vpx_pop_neon @ ENDP
.section .note.GNU-stack,"",%progbits
@ This file was created from a .asm file
@ using the ads2gas_apple.pl script.
.set WIDE_REFERENCE, 0
.set ARCHITECTURE, 5
.set DO1STROUNDING, 0
@
@ Copyright (c) 2010 The WebM project authors. All Rights Reserved.
@
@ Use of this source code is governed by a BSD-style license
@ that can be found in the LICENSE file in the root of the source
@ tree. An additional intellectual property rights grant can be found
@ in the file PATENTS. All contributing project authors may
@ be found in the AUTHORS file in the root of the source tree.
@
.globl _vpx_push_neon
.globl vpx_push_neon
.globl _vpx_pop_neon
.globl vpx_pop_neon
@ ARM
@
@ PRESERVE8
.text
.p2align 2
_vpx_push_neon:
vpx_push_neon: @
vst1.i64 {d8, d9, d10, d11}, [r0]!
vst1.i64 {d12, d13, d14, d15}, [r0]!
bx lr
@
_vpx_pop_neon:
vpx_pop_neon: @
vld1.i64 {d8, d9, d10, d11}, [r0]!
vld1.i64 {d12, d13, d14, d15}, [r0]!
bx lr
@
#include "vpx_config.h"
#if defined(WEBM_X86ASM) && (ARCH_X86 || ARCH_X86_64)
#include "rtcd/vpx_dsp_rtcd_x86.h"
#elif defined(WEBM_ARMASM) && ARCH_ARM
#include "rtcd/vpx_dsp_rtcd_arm.h"
#else
#include "rtcd/vpx_dsp_rtcd_c.h"
#endif
......@@ -38,26 +38,7 @@ static int arm_cpu_env_mask(void) {
}
#if !CONFIG_RUNTIME_CPU_DETECT
int arm_cpu_caps(void) {
/* This function should actually be a no-op. There is no way to adjust any of
* these because the RTCD tables do not exist: the functions are called
* statically */
int flags;
int mask;
if (!arm_cpu_env_flags(&flags)) {
return flags;
}
mask = arm_cpu_env_mask();
#if HAVE_MEDIA
flags |= HAS_MEDIA;
#endif /* HAVE_MEDIA */
#if HAVE_NEON || HAVE_NEON_ASM
flags |= HAS_NEON;
#endif /* HAVE_NEON || HAVE_NEON_ASM */
return flags & mask;
}
#error "CONFIG_RUNTIME_CPU_DETECT should be enabled!"
#elif defined(_MSC_VER) /* end !CONFIG_RUNTIME_CPU_DETECT */
/*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/
#define WIN32_LEAN_AND_MEAN
......@@ -76,28 +57,28 @@ int arm_cpu_caps(void) {
* All of these instructions should be essentially nops.
*/
#if HAVE_MEDIA
if (mask & HAS_MEDIA)
if (mask & HAS_MEDIA) {
__try {
/*SHADD8 r3,r3,r3*/
__emit(0xE6333F93);
flags |= HAS_MEDIA;
} __except (GetExceptionCode() == EXCEPTION_ILLEGAL_INSTRUCTION) {
/*Ignore exception.*/
}
}
}
#endif /* HAVE_MEDIA */
#if HAVE_NEON || HAVE_NEON_ASM
if (mask &HAS_NEON) {
__try {
/*VORR q0,q0,q0*/
__emit(0xF2200150);
flags |= HAS_NEON;
} __except (GetExceptionCode() == EXCEPTION_ILLEGAL_INSTRUCTION) {
/*Ignore exception.*/
if (mask &HAS_NEON) {
__try {
/*VORR q0,q0,q0*/
__emit(0xF2200150);
flags |= HAS_NEON;
} __except (GetExceptionCode() == EXCEPTION_ILLEGAL_INSTRUCTION) {
/*Ignore exception.*/
}
}
}
#endif /* HAVE_NEON || HAVE_NEON_ASM */
return flags & mask;
return flags & mask;
}
#elif defined(__ANDROID__) /* end _MSC_VER */
......@@ -170,6 +151,20 @@ int arm_cpu_caps(void) {
return flags & mask;
}
#else /* end __linux__ */
#error "--enable-runtime-cpu-detect selected, but no CPU detection method " \
"available for your platform. Reconfigure with --disable-runtime-cpu-detect."
int arm_cpu_caps(void) {
int flags;
int mask;
if (!arm_cpu_env_flags(&flags)) {
return flags;
}
mask = arm_cpu_env_mask();
#if HAVE_MEDIA
flags |= HAS_MEDIA;
#endif /* HAVE_MEDIA */
#if HAVE_NEON || HAVE_NEON_ASM
flags |= HAS_NEON;
#endif /* HAVE_NEON || HAVE_NEON_ASM */
return flags & mask;
}
#warning "ARM run-time CPU detection is disabled for this platform..."
#endif
......@@ -13,10 +13,10 @@
#include "./vpx_config.h"
#if ARCH_X86 || ARCH_X86_64
void vpx_reset_mmx_state(void);
#define vpx_clear_system_state() vpx_reset_mmx_state()
#if defined(WEBM_X86ASM) && (ARCH_X86 || ARCH_X86_64)
void vpx_reset_mmx_state(void);
#define vpx_clear_system_state() vpx_reset_mmx_state()
#else
#define vpx_clear_system_state()
#define vpx_clear_system_state()
#endif // ARCH_X86 || ARCH_X86_64
#endif // VPX_PORTS_SYSTEM_STATE_H_
#ifndef VPX_SCALE_RTCD_H_
#define VPX_SCALE_RTCD_H_
#ifdef RTCD_C
#define RTCD_EXTERN
#else
#define RTCD_EXTERN extern
#endif
struct yv12_buffer_config;
#ifdef __cplusplus
extern "C" {
#endif
void vp8_yv12_copy_frame_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc);
#define vp8_yv12_copy_frame vp8_yv12_copy_frame_c
void vp8_yv12_extend_frame_borders_c(struct yv12_buffer_config *ybf);
#define vp8_yv12_extend_frame_borders vp8_yv12_extend_frame_borders_c
void vpx_extend_frame_borders_c(struct yv12_buffer_config *ybf);
#define vpx_extend_frame_borders vpx_extend_frame_borders_c
void vpx_extend_frame_inner_borders_c(struct yv12_buffer_config *ybf);
#define vpx_extend_frame_inner_borders vpx_extend_frame_inner_borders_c
void vpx_yv12_copy_y_c(const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc);
#define vpx_yv12_copy_y vpx_yv12_copy_y_c
void vpx_scale_rtcd(void);
#ifdef RTCD_C
static void setup_rtcd_internal(void)
{
//Only MIPS has something here, but it is not supported
}
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment