[FFmpeg-devel] [PATCH] Add non native 16bits RGB/BGR output support to libswscale

Michael Niedermayer michaelni
Wed Aug 12 20:42:08 CEST 2009


On Wed, Aug 12, 2009 at 02:06:55AM +0200, Alexis Ballier wrote:
> Hi,
> 
> Per subject. C version only as I'm really not sure how to deal with
> the mmx versions; suggestions are very welcome.

bswap16 their output?

we already have quite a bit of code, bloat for obscure formats seems
silly, and non native endian formats seem obscure ...

[...]

> @@ -909,8 +917,8 @@
>              dest+=6;\
>          }\
>          break;\
> -    case PIX_FMT_RGB565:\
> -    case PIX_FMT_BGR565:\
> +    case PIX_FMT_NE(RGB565BE,RGB565LE):\
> +    case PIX_FMT_NE(BGR565BE,BGR565LE):\
>          {\
>              const int dr1= dither_2x2_8[y&1    ][0];\
>              const int dg1= dither_2x2_4[y&1    ][0];\
> @@ -924,10 +932,25 @@
>              }\
>          }\
>          break;\
> -    case PIX_FMT_RGB555:\
> -    case PIX_FMT_BGR555:\
> +    case PIX_FMT_NE(RGB565LE,RGB565BE):\
> +    case PIX_FMT_NE(BGR565LE,BGR565BE):\

pointless?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090812/1d9d8199/attachment.pgp>



More information about the ffmpeg-devel mailing list