[FFmpeg-devel] [PATCH 5/7] avfilter: use new constants in assembly
James Darnley
james.darnley at gmail.com
Fri Oct 2 19:08:32 CEST 2015
---
libavfilter/x86/Makefile | 2 ++
libavfilter/x86/af_volume.asm | 3 +--
libavfilter/x86/constants.asm | 1 +
libavfilter/x86/vf_fspp.asm | 3 +--
libavfilter/x86/vf_removegrain.asm | 3 +--
libavfilter/x86/vf_ssim.asm | 2 +-
libavfilter/x86/vf_yadif.asm | 6 +-----
libavfilter/x86/yadif-10.asm | 5 +----
libavfilter/x86/yadif-16.asm | 3 +--
9 files changed, 10 insertions(+), 18 deletions(-)
create mode 100644 libavfilter/x86/constants.asm
diff --git a/libavfilter/x86/Makefile b/libavfilter/x86/Makefile
index 5382027..8b33989 100644
--- a/libavfilter/x86/Makefile
+++ b/libavfilter/x86/Makefile
@@ -1,3 +1,5 @@
+YASM-OBJS += x86/constants.o
+
OBJS-$(CONFIG_EQ_FILTER) += x86/vf_eq.o
OBJS-$(CONFIG_FSPP_FILTER) += x86/vf_fspp_init.o
OBJS-$(CONFIG_GRADFUN_FILTER) += x86/vf_gradfun_init.o
diff --git a/libavfilter/x86/af_volume.asm b/libavfilter/x86/af_volume.asm
index 723ab1f..fc5ce83 100644
--- a/libavfilter/x86/af_volume.asm
+++ b/libavfilter/x86/af_volume.asm
@@ -20,13 +20,12 @@
;******************************************************************************
%include "libavutil/x86/x86util.asm"
+%include "libavutil/x86/constants.inc"
SECTION_RODATA 32
pd_1_256: times 4 dq 0x3F70000000000000
pd_int32_max: times 4 dq 0x41DFFFFFFFC00000
-pw_1: times 8 dw 1
-pw_128: times 8 dw 128
pq_128: times 2 dq 128
SECTION .text
diff --git a/libavfilter/x86/constants.asm b/libavfilter/x86/constants.asm
new file mode 100644
index 0000000..c144c6e
--- /dev/null
+++ b/libavfilter/x86/constants.asm
@@ -0,0 +1 @@
+%include "libavutil/x86/constants.asm"
diff --git a/libavfilter/x86/vf_fspp.asm b/libavfilter/x86/vf_fspp.asm
index c7f8f64..32cae8e 100644
--- a/libavfilter/x86/vf_fspp.asm
+++ b/libavfilter/x86/vf_fspp.asm
@@ -22,6 +22,7 @@
;******************************************************************************
%include "libavutil/x86/x86util.asm"
+%include "libavutil/x86/constants.inc"
SECTION_RODATA
@@ -39,8 +40,6 @@ pw_AC62: times 4 dw 0xAC62 ; FIX64(-2.613125930, 13)
pw_3642: times 4 dw 0x3642 ; FIX64(0.847759065, 14)
pw_2441: times 4 dw 0x2441 ; FIX64(0.566454497, 14)
pw_0CBB: times 4 dw 0x0CBB ; FIX64(0.198912367, 14)
-pw_4: times 4 dw 4
-pw_2: times 4 dw 2
SECTION .text
diff --git a/libavfilter/x86/vf_removegrain.asm b/libavfilter/x86/vf_removegrain.asm
index 0cc6e5f..3bef1c0 100644
--- a/libavfilter/x86/vf_removegrain.asm
+++ b/libavfilter/x86/vf_removegrain.asm
@@ -26,11 +26,10 @@
; row +1: a6 a7 a8
%include "libavutil/x86/x86util.asm"
+%include "libavutil/x86/constants.inc"
SECTION_RODATA 32
-pw_4: times 16 dw 4
-pw_8: times 16 dw 8
pw_div9: times 16 dw ((1<<16)+4)/9
SECTION .text
diff --git a/libavfilter/x86/vf_ssim.asm b/libavfilter/x86/vf_ssim.asm
index 3293e66..feecf29 100644
--- a/libavfilter/x86/vf_ssim.asm
+++ b/libavfilter/x86/vf_ssim.asm
@@ -21,10 +21,10 @@
;******************************************************************************
%include "libavutil/x86/x86util.asm"
+%include "libavutil/x86/constants.inc"
SECTION_RODATA
-pw_1: times 8 dw 1
ssim_c1: times 4 dd 416 ;(.01*.01*255*255*64 + .5)
ssim_c2: times 4 dd 235963 ;(.03*.03*255*255*64*63 + .5)
diff --git a/libavfilter/x86/vf_yadif.asm b/libavfilter/x86/vf_yadif.asm
index a29620c..9f7eb7f 100644
--- a/libavfilter/x86/vf_yadif.asm
+++ b/libavfilter/x86/vf_yadif.asm
@@ -22,11 +22,7 @@
;******************************************************************************
%include "libavutil/x86/x86util.asm"
-
-SECTION_RODATA
-
-pb_1: times 16 db 1
-pw_1: times 8 dw 1
+%include "libavutil/x86/constants.inc"
SECTION .text
diff --git a/libavfilter/x86/yadif-10.asm b/libavfilter/x86/yadif-10.asm
index 8853e0d..c53fb0b 100644
--- a/libavfilter/x86/yadif-10.asm
+++ b/libavfilter/x86/yadif-10.asm
@@ -23,10 +23,7 @@
;******************************************************************************
%include "libavutil/x86/x86util.asm"
-
-SECTION_RODATA
-
-pw_1: times 8 dw 1
+%include "libavutil/x86/constants.inc"
SECTION .text
diff --git a/libavfilter/x86/yadif-16.asm b/libavfilter/x86/yadif-16.asm
index 79d127d..d679752 100644
--- a/libavfilter/x86/yadif-16.asm
+++ b/libavfilter/x86/yadif-16.asm
@@ -23,12 +23,11 @@
;******************************************************************************
%include "libavutil/x86/x86util.asm"
+%include "libavutil/x86/constants.inc"
SECTION_RODATA
-pw_1: times 8 dw 1
pw_8000: times 8 dw 0x8000
-pd_1: times 4 dd 1
pd_8000: times 4 dd 0x8000
SECTION .text
--
2.5.3
More information about the ffmpeg-devel
mailing list