mirror of
https://github.com/mpv-player/mpv
synced 2024-09-09 01:16:56 +02:00
10l - MMX rgb2bgr 32bpp expects num_of_bytes instead of num_of_pixels
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5962 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f958fc46bc
commit
4a7b9f410e
@ -533,7 +533,6 @@ static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, unsigned
|
|||||||
|
|
||||||
static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsigned int src_size)
|
static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsigned int src_size)
|
||||||
{
|
{
|
||||||
int num_pixels= src_size >> 2;
|
|
||||||
#ifdef HAVE_MMX
|
#ifdef HAVE_MMX
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"xorl %%eax, %%eax \n\t"
|
"xorl %%eax, %%eax \n\t"
|
||||||
@ -554,7 +553,7 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsign
|
|||||||
"addl $2, %%eax \n\t"
|
"addl $2, %%eax \n\t"
|
||||||
"cmpl %2, %%eax \n\t"
|
"cmpl %2, %%eax \n\t"
|
||||||
" jb 1b \n\t"
|
" jb 1b \n\t"
|
||||||
:: "r" (src), "r"(dst), "r" (num_pixels)
|
:: "r" (src), "r"(dst), "r" (src_size)
|
||||||
: "%eax"
|
: "%eax"
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -562,6 +561,7 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsign
|
|||||||
__asm __volatile(EMMS:::"memory");
|
__asm __volatile(EMMS:::"memory");
|
||||||
#else
|
#else
|
||||||
int i;
|
int i;
|
||||||
|
int num_pixels= src_size >> 2;
|
||||||
for(i=0; i<num_pixels; i++)
|
for(i=0; i<num_pixels; i++)
|
||||||
{
|
{
|
||||||
dst[4*i + 0] = src[4*i + 2];
|
dst[4*i + 0] = src[4*i + 2];
|
||||||
|
Loading…
Reference in New Issue
Block a user