diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-26 08:46:53 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-26 23:43:56 +0100 |
commit | ce1a511e221b032acc863d86b8d5b1644af00445 (patch) | |
tree | ff184bf8d2d09b7b0bcbcb591dd82664b589550e /video/filter/vf_eq.c | |
parent | 7a0299478e169ea076fe57028fda1ef7292a5431 (diff) | |
download | mpv-ce1a511e221b032acc863d86b8d5b1644af00445.tar.bz2 mpv-ce1a511e221b032acc863d86b8d5b1644af00445.tar.xz |
video/filter: fix PIC compile on x86
When using PIC on x86 (eg with hardened toolchains) the ebx register is
reserverd and cannot be used in assembly code.
For vf_eq we allow the compiler to use memory as input.
For vf_noise we temoporarily borrow the ebp register.
This fixes #361.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Diffstat (limited to 'video/filter/vf_eq.c')
-rw-r--r-- | video/filter/vf_eq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/filter/vf_eq.c b/video/filter/vf_eq.c index 1bca39bab5..3cba73bc7b 100644 --- a/video/filter/vf_eq.c +++ b/video/filter/vf_eq.c @@ -133,6 +133,7 @@ void affine_1d_MMX (eq2_param_t *par, unsigned char *dst, unsigned char *src, int pel; short brvec[4]; short contvec[4]; + unsigned wcount = w >> 3; // printf("\nmmx: src=%p dst=%p w=%d h=%d ds=%d ss=%d\n",src,dst,w,h,dstride,sstride); @@ -170,7 +171,7 @@ void affine_1d_MMX (eq2_param_t *par, unsigned char *dst, unsigned char *src, "decl %%eax \n\t" "jnz 1b \n\t" : "=r" (src), "=r" (dst) - : "0" (src), "1" (dst), "r" (w >> 3), "r" (brvec), "r" (contvec) + : "0" (src), "1" (dst), "g" (wcount), "r" (brvec), "r" (contvec) : "%eax" ); |