summaryrefslogtreecommitdiffstats
path: root/postproc/rgb2rgb.c
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-05 19:55:11 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-05 19:55:11 +0000
commitdeae6b59e225e878a54d2f55c9dd5ea5de71b49a (patch)
tree02ac149957c3e2e7ee8fea9f6f145657bba7df3c /postproc/rgb2rgb.c
parentbc8918936a039eadef6aafd088e8979dfed5db05 (diff)
downloadmpv-deae6b59e225e878a54d2f55c9dd5ea5de71b49a.tar.bz2
mpv-deae6b59e225e878a54d2f55c9dd5ea5de71b49a.tar.xz
unsigned stuff
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2726 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc/rgb2rgb.c')
-rw-r--r--postproc/rgb2rgb.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/postproc/rgb2rgb.c b/postproc/rgb2rgb.c
index 566a7850fa..ab28157e20 100644
--- a/postproc/rgb2rgb.c
+++ b/postproc/rgb2rgb.c
@@ -295,7 +295,8 @@ void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, cons
* problem for anyone then tell me, and ill fix it)
*/
void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
- int width, int height, int lumStride, int chromStride, int dstStride)
+ unsigned int width, unsigned int height,
+ unsigned int lumStride, unsigned int chromStride, unsigned int dstStride)
{
int y;
const int chromWidth= width>>1;
@@ -366,7 +367,8 @@ asm( EMMS" \n\t"
* problem for anyone then tell me, and ill fix it)
*/
void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
- int width, int height, int lumStride, int chromStride, int srcStride)
+ unsigned int width, unsigned int height,
+ unsigned int lumStride, unsigned int chromStride, unsigned int srcStride)
{
int y;
const int chromWidth= width>>1;
@@ -420,7 +422,12 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
"addl $8, %%eax \n\t"
"cmpl %4, %%eax \n\t"
" jb 1b \n\t"
+ ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "r" (chromWidth)
+ : "memory", "%eax"
+ );
+ asm volatile(
+ "xorl %%eax, %%eax \n\t"
"1: \n\t"
PREFETCH" 64(%0, %%eax, 4) \n\t"
"movq (%0, %%eax, 4), %%mm0 \n\t" // YUYV YUYV(0)
@@ -438,10 +445,10 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
MOVNTQ" %%mm2, 8(%1, %%eax, 2) \n\t"
"addl $8, %%eax \n\t"
- "cmpl %5, %%eax \n\t"
+ "cmpl %4, %%eax \n\t"
" jb 1b \n\t"
- ::"r"(src), "r"(ydst), "r"(udst), "r"(vdst), "r" (chromWidth), "m"(width)
+ ::"r"(src+srcStride), "r"(ydst+lumStride), "r"(udst), "r"(vdst), "r" (chromWidth)
: "memory", "%eax"
);
#else