[FFmpeg-devel] [PATCH] rgb2rgb: use optimized rgb32tobgr32() instead of shuffle_bytes_2103()
Michael Niedermayer
michaelni
Sat Sep 11 10:47:55 CEST 2010
On Sat, Sep 11, 2010 at 02:05:00AM -0300, Ramiro Polla wrote:
> $subj
> rgb2rgb.c | 1 -
> rgb2rgb.h | 1 -
> swscale.c | 2 +-
> 3 files changed, 1 insertion(+), 3 deletions(-)
> 84f4fae2b8681d2394a1ed40b3051221dacdc1c4 0001-rgb2rgb-use-optimized-rgb32tobgr32-instead-of-shu.patch
> From 52540a23b9813ddfb436927903f1519aa58c6738 Mon Sep 17 00:00:00 2001
> From: Ramiro Polla <ramiro.polla at gmail.com>
> Date: Fri, 10 Sep 2010 22:42:50 -0300
> Subject: [PATCH] rgb2rgb: use optimized rgb32tobgr32() instead of shuffle_bytes_2103()
>
> ---
> rgb2rgb.c | 1 -
> rgb2rgb.h | 1 -
> swscale.c | 2 +-
> 3 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/rgb2rgb.c b/rgb2rgb.c
> index 3eab9d8..2280ff7 100644
> --- a/rgb2rgb.c
> +++ b/rgb2rgb.c
> @@ -435,7 +435,6 @@ void shuffle_bytes_##a##b##c##d(const uint8_t *src, uint8_t *dst, long src_size)
>
> DEFINE_SHUFFLE_BYTES(0, 3, 2, 1);
> DEFINE_SHUFFLE_BYTES(1, 2, 3, 0);
> -DEFINE_SHUFFLE_BYTES(2, 1, 0, 3);
> DEFINE_SHUFFLE_BYTES(3, 0, 1, 2);
> DEFINE_SHUFFLE_BYTES(3, 2, 1, 0);
>
> diff --git a/rgb2rgb.h b/rgb2rgb.h
> index 2e182dd..af6097c 100644
> --- a/rgb2rgb.h
> +++ b/rgb2rgb.h
> @@ -65,7 +65,6 @@ void bgr8torgb8 (const uint8_t *src, uint8_t *dst, long src_size);
>
> void shuffle_bytes_0321(const uint8_t *src, uint8_t *dst, long src_size);
> void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, long src_size);
> -void shuffle_bytes_2103(const uint8_t *src, uint8_t *dst, long src_size);
> void shuffle_bytes_3012(const uint8_t *src, uint8_t *dst, long src_size);
> void shuffle_bytes_3210(const uint8_t *src, uint8_t *dst, long src_size);
>
> diff --git a/swscale.c b/swscale.c
> index 6ceddfd..92c4fc9 100644
> --- a/swscale.c
> +++ b/swscale.c
> @@ -1495,7 +1495,7 @@ static int rgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[],
> else if (CONV_IS(ABGR, BGRA)
> || CONV_IS(ARGB, RGBA)) conv = shuffle_bytes_1230;
> else if (CONV_IS(BGRA, RGBA)
> - || CONV_IS(RGBA, BGRA)) conv = shuffle_bytes_2103;
> + || CONV_IS(RGBA, BGRA)) conv = rgb32tobgr32;
there is no reason to make the function name inconsistent
and a benchmark may be interresting
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I wish the Xiph folks would stop pretending they've got something they
do not. Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100911/333c8d21/attachment.pgp>
More information about the ffmpeg-devel
mailing list