[x265] [PATCH] asm: move common constants into const-a.asm, remove unused constants

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Thu Dec 10 06:08:29 CET 2015


# HG changeset patch
# User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
# Date 1449723720 -19800
#      Thu Dec 10 10:32:00 2015 +0530
# Node ID ff08c87f20a7f3f36bfb0849bd2d10fc1f8da465
# Parent  33d04da2f68830ac51151cfbda8f38fb9a7e8bb9
asm: move common constants into const-a.asm, remove unused constants

diff -r 33d04da2f688 -r ff08c87f20a7 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm	Wed Dec 09 22:24:25 2015 +0530
+++ b/source/common/x86/blockcopy8.asm	Thu Dec 10 10:32:00 2015 +0530
@@ -28,8 +28,6 @@
 
 SECTION_RODATA 32
 
-tab_Vm:    db 0, 2, 4, 6, 8, 10, 12, 14, 0, 0, 0, 0, 0, 0, 0, 0
-
 cextern pb_4
 cextern pb_1
 cextern pb_16
diff -r 33d04da2f688 -r ff08c87f20a7 source/common/x86/const-a.asm
--- a/source/common/x86/const-a.asm	Wed Dec 09 22:24:25 2015 +0530
+++ b/source/common/x86/const-a.asm	Thu Dec 10 10:32:00 2015 +0530
@@ -40,8 +40,10 @@
 const pb_8,                 times 32 db 8
 const pb_15,                times 32 db 15
 const pb_16,                times 32 db 16
+const pb_31,                times 32 db 31
 const pb_32,                times 32 db 32
 const pb_64,                times 32 db 64
+const pb_124,               times 32 db 124
 const pb_128,               times 32 db 128
 const pb_a1,                times 16 db 0xa1
 
@@ -146,10 +148,6 @@
 const pd_planar16_mul2,     times  1 dd  15,  14,  13,  12,  11,  10,   9,   8,    7,   6,   5,   4,   3,   2,   1,   0
 const trans8_shuf,          times  1 dd   0,   4,   1,   5,   2,   6,   3,   7
 
-const popcnt_table
-%assign x 0
-%rep 256
-; population count
-db ((x>>0)&1)+((x>>1)&1)+((x>>2)&1)+((x>>3)&1)+((x>>4)&1)+((x>>5)&1)+((x>>6)&1)+((x>>7)&1)
-%assign x x+1
-%endrep
+;; 64-bit constants
+
+const pq_1,                 times 1 dq 1
diff -r 33d04da2f688 -r ff08c87f20a7 source/common/x86/loopfilter.asm
--- a/source/common/x86/loopfilter.asm	Wed Dec 09 22:24:25 2015 +0530
+++ b/source/common/x86/loopfilter.asm	Thu Dec 10 10:32:00 2015 +0530
@@ -29,15 +29,15 @@
 %include "x86util.asm"
 
 SECTION_RODATA 32
-pb_31:      times 32 db 31
-pb_124:     times 32 db 124
-pb_15:      times 32 db 15
 pb_movemask_32:  times 32 db 0x00
                  times 32 db 0xFF
 
 SECTION .text
 cextern pb_1
 cextern pb_01
+cextern pb_15
+cextern pb_31
+cextern pb_124
 cextern pb_128
 cextern pb_2
 cextern pw_2
diff -r 33d04da2f688 -r ff08c87f20a7 source/common/x86/mc-a.asm
--- a/source/common/x86/mc-a.asm	Wed Dec 09 22:24:25 2015 +0530
+++ b/source/common/x86/mc-a.asm	Thu Dec 10 10:32:00 2015 +0530
@@ -53,7 +53,6 @@
              times 8 db 2
              times 8 db 4
              times 8 db 6
-sq_1: times 1 dq 1
 
 SECTION .text
 
@@ -74,6 +73,7 @@
 cextern pw_pixel_max
 cextern pd_32
 cextern pd_64
+cextern pq_1
 
 ;====================================================================================================================
 ;void addAvg (int16_t* src0, int16_t* src1, pixel* dst, intptr_t src0Stride, intptr_t src1Stride, intptr_t dstStride)
@@ -3638,7 +3638,7 @@
     mova        m3, [r4+16]
     movd        m2, [r4+32]         ; denom
     mova        m4, [pw_pixel_max]
-    paddw       m2, [sq_1]          ; denom+1
+    paddw       m2, [pq_1]          ; denom+1
 %endmacro
 
 ; src1, src2
diff -r 33d04da2f688 -r ff08c87f20a7 source/common/x86/mc-a2.asm
--- a/source/common/x86/mc-a2.asm	Wed Dec 09 22:24:25 2015 +0530
+++ b/source/common/x86/mc-a2.asm	Thu Dec 10 10:32:00 2015 +0530
@@ -43,11 +43,7 @@
 deinterleave_shuf32a: db 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30
 deinterleave_shuf32b: db 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31
 %endif
-pw_1024: times 16 dw 1024
 
-pd_16: times 4 dd 16
-pd_0f: times 4 dd 0xffff
-pf_inv256: times 8 dd 0.00390625
 const pd_inv256,    times 4 dq 0.00390625
 const pd_0_5,       times 4 dq 0.5
 
@@ -59,9 +55,11 @@
 cextern pw_32
 cextern pw_512
 cextern pw_00ff
+cextern pw_1024
 cextern pw_3fff
 cextern pw_pixel_max
 cextern pd_ffff
+cextern pd_16
 
 ;The hpel_filter routines use non-temporal writes for output.
 ;The following defines may be uncommented for testing.
diff -r 33d04da2f688 -r ff08c87f20a7 source/common/x86/pixel-a.asm
--- a/source/common/x86/pixel-a.asm	Wed Dec 09 22:24:25 2015 +0530
+++ b/source/common/x86/pixel-a.asm	Thu Dec 10 10:32:00 2015 +0530
@@ -50,9 +50,6 @@
 transd_shuf1: SHUFFLE_MASK_W 0, 8, 2, 10, 4, 12, 6, 14
 transd_shuf2: SHUFFLE_MASK_W 1, 9, 3, 11, 5, 13, 7, 15
 
-sw_f0:     dq 0xfff0, 0
-pd_f0:     times 4 dd 0xffff0000
-
 SECTION .text
 
 cextern pb_0
@@ -67,7 +64,6 @@
 cextern pw_pmpmpmpm
 cextern pw_pmmpzzzz
 cextern pd_1
-cextern popcnt_table
 cextern pd_2
 cextern hmul_16p
 cextern pb_movemask


More information about the x265-devel mailing list