diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-13 00:48:21 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-13 00:48:21 +0000 |
commit | 0141d839e3c4870a320737b3fcc500f3b4a1132e (patch) | |
tree | 089967e1f22fa1d8e9c5a378dac0b73bdf31da7f /postproc/rgb2rgb.c | |
parent | c6557f97c5b5dd178b89aa22975ff6807d7daa1d (diff) |
rgb24->bgr24
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5583 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc/rgb2rgb.c')
-rw-r--r-- | postproc/rgb2rgb.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/postproc/rgb2rgb.c b/postproc/rgb2rgb.c index 7e70858eff..b1178b8628 100644 --- a/postproc/rgb2rgb.c +++ b/postproc/rgb2rgb.c @@ -24,6 +24,9 @@ static const uint64_t mask32b __attribute__((aligned(8))) = 0x000000FF000000FFU static const uint64_t mask32g __attribute__((aligned(8))) = 0x0000FF000000FF00ULL; static const uint64_t mask32r __attribute__((aligned(8))) = 0x00FF000000FF0000ULL; static const uint64_t mask32 __attribute__((aligned(8))) = 0x00FFFFFF00FFFFFFULL; +static const uint64_t mask24b __attribute__((aligned(8))) = 0x00FF0000FF0000FFULL; +static const uint64_t mask24g __attribute__((aligned(8))) = 0xFF0000FF0000FF00ULL; +static const uint64_t mask24r __attribute__((aligned(8))) = 0x0000FF0000FF0000ULL; static const uint64_t mask24l __attribute__((aligned(8))) = 0x0000000000FFFFFFULL; static const uint64_t mask24h __attribute__((aligned(8))) = 0x0000FFFFFF000000ULL; static const uint64_t mask24hh __attribute__((aligned(8))) = 0xffff000000000000ULL; @@ -316,6 +319,23 @@ void rgb32tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) #endif } +void rgb24tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size) +{ +#ifdef CAN_COMPILE_X86_ASM + // ordered per speed fasterst first + if(gCpuCaps.hasMMX2) + rgb24tobgr24_MMX2(src, dst, src_size); + else if(gCpuCaps.has3DNow) + rgb24tobgr24_3DNow(src, dst, src_size); + else if(gCpuCaps.hasMMX) + rgb24tobgr24_MMX(src, dst, src_size); + else + rgb24tobgr24_C(src, dst, src_size); +#else + rgb24tobgr24_C(src, dst, src_size); +#endif +} + /** * * height should be a multiple of 2 and width should be a multiple of 16 (if this is a |