diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-08-06 07:43:39 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-06 18:36:31 +0200 |
commit | 4e128ab0b1b32d2e0a1a8350e224b8d6cc534f93 (patch) | |
tree | d0033797b32f27be09ac7567ab55c1ed507ec8f3 | |
parent | 305f72aee77bc36d1da9feaec42f9ddcdc9b0689 (diff) | |
download | ffmpeg-4e128ab0b1b32d2e0a1a8350e224b8d6cc534f93.tar.gz |
x86: vpx/h264/hevc/mpeg2: share constants
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/x86/constants.c | 5 | ||||
-rw-r--r-- | libavcodec/x86/constants.h | 5 | ||||
-rw-r--r-- | libavcodec/x86/h264_intrapred_10bit.asm | 2 | ||||
-rw-r--r-- | libavcodec/x86/hevc_deblock.asm | 2 | ||||
-rw-r--r-- | libavcodec/x86/hpeldsp.asm | 3 | ||||
-rw-r--r-- | libavcodec/x86/vp8dsp.asm | 2 | ||||
-rw-r--r-- | libavcodec/x86/vp9intrapred.asm | 8 | ||||
-rw-r--r-- | libavcodec/x86/vp9itxfm.asm | 9 | ||||
-rw-r--r-- | libavcodec/x86/vp9lpf.asm | 4 | ||||
-rw-r--r-- | libavcodec/x86/vp9mc.asm | 3 |
10 files changed, 27 insertions, 16 deletions
diff --git a/libavcodec/x86/constants.c b/libavcodec/x86/constants.c index 7608bb32e1..ee3f1a5e2a 100644 --- a/libavcodec/x86/constants.c +++ b/libavcodec/x86/constants.c @@ -43,8 +43,13 @@ DECLARE_ALIGNED(16, const xmm_reg, ff_pw_64) = { 0x0040004000400040ULL, 0x004 DECLARE_ALIGNED(8, const uint64_t, ff_pw_96) = 0x0060006000600060ULL; DECLARE_ALIGNED(8, const uint64_t, ff_pw_128) = 0x0080008000800080ULL; DECLARE_ALIGNED(8, const uint64_t, ff_pw_255) = 0x00ff00ff00ff00ffULL; +DECLARE_ALIGNED(16, const xmm_reg, ff_pw_256) = { 0x0100010001000100ULL, 0x0100010001000100ULL }; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_512) = { 0x0200020002000200ULL, 0x0200020002000200ULL }; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_1019) = { 0x03FB03FB03FB03FBULL, 0x03FB03FB03FB03FBULL }; +DECLARE_ALIGNED(16, const xmm_reg, ff_pw_1024) = { 0x0400040004000400ULL, 0x0400040004000400ULL }; +DECLARE_ALIGNED(16, const xmm_reg, ff_pw_2048) = { 0x0800080008000800ULL, 0x0800080008000800ULL }; +DECLARE_ALIGNED(16, const xmm_reg, ff_pw_8192) = { 0x2000200020002000ULL, 0x2000200020002000ULL }; +DECLARE_ALIGNED(16, const xmm_reg, ff_pw_m1) = { 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL }; DECLARE_ALIGNED(16, const xmm_reg, ff_pb_0) = { 0x0000000000000000ULL, 0x0000000000000000ULL }; DECLARE_ALIGNED(32, const ymm_reg, ff_pb_1) = { 0x0101010101010101ULL, 0x0101010101010101ULL, diff --git a/libavcodec/x86/constants.h b/libavcodec/x86/constants.h index 3ebf171adc..4520515c9c 100644 --- a/libavcodec/x86/constants.h +++ b/libavcodec/x86/constants.h @@ -43,6 +43,11 @@ extern const xmm_reg ff_pw_64; extern const uint64_t ff_pw_96; extern const uint64_t ff_pw_128; extern const uint64_t ff_pw_255; +extern const xmm_reg ff_pw_512; +extern const xmm_reg ff_pw_1024; +extern const xmm_reg ff_pw_2048; +extern const xmm_reg ff_pw_8192; +extern const xmm_reg ff_pw_m1; extern const ymm_reg ff_pb_1; extern const ymm_reg ff_pb_3; diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm index 9dee577e1d..b60a21037f 100644 --- a/libavcodec/x86/h264_intrapred_10bit.asm +++ b/libavcodec/x86/h264_intrapred_10bit.asm @@ -26,6 +26,7 @@ SECTION_RODATA +cextern pw_512 cextern pw_16 cextern pw_8 cextern pw_4 @@ -35,7 +36,6 @@ cextern pw_1 pw_m32101234: dw -3, -2, -1, 0, 1, 2, 3, 4 pw_m3: times 8 dw -3 pw_pixel_max: times 8 dw ((1 << 10)-1) -pw_512: times 8 dw 512 pd_17: times 4 dd 17 pd_16: times 4 dd 16 diff --git a/libavcodec/x86/hevc_deblock.asm b/libavcodec/x86/hevc_deblock.asm index 8f58916402..f92cb2c0a5 100644 --- a/libavcodec/x86/hevc_deblock.asm +++ b/libavcodec/x86/hevc_deblock.asm @@ -28,12 +28,12 @@ SECTION_RODATA pw_pixel_max_12: times 8 dw ((1 << 12)-1) pw_pixel_max_10: times 8 dw ((1 << 10)-1) -pw_m1: times 8 dw -1 pw_m2: times 8 dw -2 pd_1 : times 4 dd 1 cextern pw_4 cextern pw_8 +cextern pw_m1 SECTION .text INIT_XMM sse2 diff --git a/libavcodec/x86/hpeldsp.asm b/libavcodec/x86/hpeldsp.asm index a702b8bc34..2cef8e698c 100644 --- a/libavcodec/x86/hpeldsp.asm +++ b/libavcodec/x86/hpeldsp.asm @@ -30,10 +30,11 @@ SECTION_RODATA cextern pb_1 cextern pw_2 -pw_8192: times 8 dw (1<<13) pb_interleave16: db 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 pb_interleave8: db 0, 4, 1, 5, 2, 6, 3, 7 +cextern pw_8192 + SECTION_TEXT ; void ff_put_pixels8_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h) diff --git a/libavcodec/x86/vp8dsp.asm b/libavcodec/x86/vp8dsp.asm index 77cc2f3044..538b3f4a9b 100644 --- a/libavcodec/x86/vp8dsp.asm +++ b/libavcodec/x86/vp8dsp.asm @@ -143,13 +143,13 @@ filter_h6_shuf1: db 0, 5, 1, 6, 2, 7, 3, 8, 4, 9, 5, 10, 6, 11, 7, 12 filter_h6_shuf2: db 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9 filter_h6_shuf3: db 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11 -pw_256: times 8 dw 256 pw_20091: times 4 dw 20091 pw_17734: times 4 dw 17734 cextern pw_3 cextern pw_4 cextern pw_64 +cextern pw_256 SECTION .text diff --git a/libavcodec/x86/vp9intrapred.asm b/libavcodec/x86/vp9intrapred.asm index 1d8d219b3d..86b925a55a 100644 --- a/libavcodec/x86/vp9intrapred.asm +++ b/libavcodec/x86/vp9intrapred.asm @@ -33,11 +33,7 @@ SECTION_RODATA 32 pw_m256: times 16 dw -256 pw_m255: times 16 dw -255 -pw_512: times 8 dw 512 -pw_1024: times 8 dw 1024 -pw_2048: times 8 dw 2048 pw_4096: times 8 dw 4096 -pw_8192: times 8 dw 8192 pb_4x3_4x2_4x1_4x0: times 4 db 3 times 4 db 2 @@ -77,6 +73,10 @@ pb_15: times 16 db 15 cextern pb_1 cextern pb_3 +cextern pw_512 +cextern pw_1024 +cextern pw_2048 +cextern pw_8192 SECTION .text diff --git a/libavcodec/x86/vp9itxfm.asm b/libavcodec/x86/vp9itxfm.asm index 8087c2e336..6cce0aa196 100644 --- a/libavcodec/x86/vp9itxfm.asm +++ b/libavcodec/x86/vp9itxfm.asm @@ -66,10 +66,11 @@ pw_m5283_m15212: times 4 dw -5283, -15212 pw_13377x2: times 8 dw 13377*2 pd_8192: times 4 dd 8192 -pw_2048: times 8 dw 2048 -pw_1024: times 8 dw 1024 -pw_512: times 8 dw 512 -pw_m1: times 8 dw -1 + +cextern pw_512 +cextern pw_1024 +cextern pw_2048 +cextern pw_m1 SECTION .text diff --git a/libavcodec/x86/vp9lpf.asm b/libavcodec/x86/vp9lpf.asm index def7d5a9d3..cb57a25333 100644 --- a/libavcodec/x86/vp9lpf.asm +++ b/libavcodec/x86/vp9lpf.asm @@ -36,8 +36,8 @@ pb_81: times 16 db 0x81 pb_f8: times 16 db 0xf8 pb_fe: times 16 db 0xfe -pw_4: times 8 dw 4 -pw_8: times 8 dw 8 +cextern pw_4 +cextern pw_8 ; with mix functions, two 8-bit thresholds are stored in a 16-bit storage, ; the following mask is used to splat both in the same register diff --git a/libavcodec/x86/vp9mc.asm b/libavcodec/x86/vp9mc.asm index 7c2a38c8b3..aa10001be4 100644 --- a/libavcodec/x86/vp9mc.asm +++ b/libavcodec/x86/vp9mc.asm @@ -24,8 +24,7 @@ SECTION_RODATA -; FIXME share with vp8dsp.asm -pw_256: times 8 dw 256 +cextern pw_256 %macro F8_TAPS 8 times 8 db %1, %2 |