diff options
| author | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-25 12:13:48 +0000 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-25 12:15:07 +0000 |
| commit | 4218eb673113ec44d2706b13bbe44ce1ccd2a82a (patch) | |
| tree | e9d47cae22ba887f5547ae3fdf0d32bf20f7f7cd /testing/mpv | |
| parent | 1208bf2d9057025e5ad7ff0eca37df250bcc8903 (diff) | |
| download | aports-4218eb673113ec44d2706b13bbe44ce1ccd2a82a.tar.bz2 aports-4218eb673113ec44d2706b13bbe44ce1ccd2a82a.tar.xz | |
main/mpv: replace mplayer 2 with this new package
Diffstat (limited to 'testing/mpv')
| -rw-r--r-- | testing/mpv/APKBUILD | 49 | ||||
| -rw-r--r-- | testing/mpv/pic.patch | 97 |
2 files changed, 146 insertions, 0 deletions
diff --git a/testing/mpv/APKBUILD b/testing/mpv/APKBUILD new file mode 100644 index 0000000000..c704b92806 --- /dev/null +++ b/testing/mpv/APKBUILD @@ -0,0 +1,49 @@ +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=mpv +pkgver=0.2.3 +pkgrel=0 +pkgdesc="Video player based on MPlayer/mplayer2" +url="http://mpv.io/" +arch="all" +license="GPL" +depends= +makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev + libtheora-dev xvidcore-dev zlib-dev sdl-dev freetype-dev + x264-dev faac-dev ttf-dejavu libxvmc-dev alsa-lib-dev live-media-dev + mesa-dev ffmpeg-dev libass-dev perl clang" +install="" +subpackages="" +source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/mpv/archive/v$pkgver.tar.gz + pic.patch" + +_builddir="$srcdir"/mpv-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 +} + +md5sums="11f25760d7666e6d41d85f06cece8f17 mpv-0.2.3.tar.gz +2b3a2c74be5b1f1a26b4ae7db1abe778 pic.patch" +sha256sums="6a0fe8b889dabdde68011dd0d3694dd36a747fc88d64f9ac9aa1e5c5d51d210c mpv-0.2.3.tar.gz +6fd70c520557dffdbb27fbc1115beea801d55a187268850441091e49fb8794ff pic.patch" +sha512sums="db111172f9c483c07ad79e020d9cf92ccc93b73dcbb05d28be7165a4591ae5c415b7cc4d806f859857263857af96249590076b4ba09eb01b29601bdc20c45846 mpv-0.2.3.tar.gz +06cb0e620609b8a2344f5f28cef90e502949b69d483ddf02d2916c9323df58e3372c974ab4bdba9966a258ca0fe3aee7e70d661b8bd2eda5482dcd8d72e856b2 pic.patch" diff --git a/testing/mpv/pic.patch b/testing/mpv/pic.patch new file mode 100644 index 0000000000..d55207f1d8 --- /dev/null +++ b/testing/mpv/pic.patch @@ -0,0 +1,97 @@ +diff --git a/video/filter/vf_eq.c b/video/filter/vf_eq.c +index 1bca39b..3cba73b 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" + ); + +diff --git a/video/filter/vf_gradfun.c b/video/filter/vf_gradfun.c +index f7b39fa..c4955ee 100644 +--- a/video/filter/vf_gradfun.c ++++ b/video/filter/vf_gradfun.c +@@ -145,7 +145,7 @@ static void filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc, + "emms \n" + :"+r"(x) + :"r"(dst+width), "r"(src+width), "r"(dc+width/2), +- "rm"(thresh), "m"(*dithers), "m"(*pw_7f) ++ "g"(thresh), "m"(*dithers), "m"(*pw_7f) + :"memory" + ); + } +diff --git a/video/filter/vf_noise.c b/video/filter/vf_noise.c +index c81a1d1..d8220be 100644 +--- a/video/filter/vf_noise.c ++++ b/video/filter/vf_noise.c +@@ -216,13 +216,16 @@ static inline void lineNoise_C(uint8_t *dst, uint8_t *src, int8_t *noise, int le + #if HAVE_MMX + static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t **shift){ + x86_reg mmx_len= len&(~7); ++ uint8_t *src_mmx_len = src+mmx_len; + + __asm__ volatile( ++ "pushl %%"REG_BP" \n\t" ++ "mov %0, %%"REG_BP" \n\t" + "mov %5, %%"REG_a" \n\t" + ".align 4 \n\t" + "1: \n\t" + "movq (%1, %%"REG_a"), %%mm1 \n\t" +- "movq (%0, %%"REG_a"), %%mm0 \n\t" ++ "movq (%%"REG_BP", %%"REG_a"), %%mm0 \n\t" + "paddb (%2, %%"REG_a"), %%mm1 \n\t" + "paddb (%3, %%"REG_a"), %%mm1 \n\t" + "movq %%mm0, %%mm2 \n\t" +@@ -243,7 +246,9 @@ static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t + "movq %%mm1, (%4, %%"REG_a") \n\t" + "add $8, %%"REG_a" \n\t" + " js 1b \n\t" +- :: "r" (src+mmx_len), "r" (shift[0]+mmx_len), "r" (shift[1]+mmx_len), "r" (shift[2]+mmx_len), ++ "popl %%"REG_BP" \n\t" ++ :: "g" (src_mmx_len), "r" (shift[0]+mmx_len), ++ "r" (shift[1]+mmx_len), "r" (shift[2]+mmx_len), + "r" (dst+mmx_len), "g" (-mmx_len) + : "%"REG_a + ); +--- ./video/filter/vf_gradfun.c.orig 2013-11-25 10:55:18.192357135 +0000 ++++ ./video/filter/vf_gradfun.c 2013-11-25 11:02:13.784535500 +0000 +@@ -202,7 +202,10 @@ + #if HAVE_SSE2 && HAVE_6REGS + #define BLURV(load)\ + intptr_t x = -2*width;\ ++ intptr_t dc_width = dc+width; \ + __asm__ volatile(\ ++ "pushl %%ebp \n"\ ++ "mov %3, %%ebp \n"\ + "movdqa %6, %%xmm7 \n"\ + "1: \n"\ + load" (%4,%0), %%xmm0 \n"\ +@@ -220,13 +223,14 @@ + "movdqa (%1,%0), %%xmm1 \n"\ + "movdqa %%xmm0, (%1,%0) \n"\ + "psubw %%xmm1, %%xmm0 \n"\ +- "movdqa %%xmm0, (%3,%0) \n"\ ++ "movdqa %%xmm0, (%%ebp,%0) \n"\ + "add $16, %0 \n"\ + "jl 1b \n"\ ++ "popl %%ebp \n"\ + :"+&r"(x)\ + :"r"(buf+width),\ + "r"(buf1+width),\ +- "r"(dc+width),\ ++ "g"(dc_width),\ + "r"(src+width*2),\ + "r"(src+width*2+sstride),\ + "m"(*pw_ff)\ |
