[FFmpeg-soc] [PATCH] Checks of sws_getContext() moved up

Michael Niedermayer michaelni at gmx.at
Thu Jul 10 02:14:06 CEST 2008


On Thu, Jul 10, 2008 at 02:06:57AM +0200, Michael Niedermayer wrote:
> On Thu, Jul 10, 2008 at 07:31:14AM +0900, Luca Barbato wrote:
> > Michael Niedermayer wrote:
> > > On Wed, Jul 09, 2008 at 10:59:35PM +0200, Michael Niedermayer wrote:
> > >> On Wed, Jul 09, 2008 at 11:34:01PM +0900, Keiji Costantini wrote:
> > >>> -- 
> > >>> Keiji Costantini
> > >>>
> > >>> >From fe4c17bce5fb24e499d647fce4d67c2f8b450035 Mon Sep 17 00:00:00 2001
> > >>> From: Keiji Costantini <lists at strites.net>
> > >>> Date: Wed, 9 Jul 2008 23:20:36 +0900
> > >>> Subject: [PATCH] Checks of sws_getContext() moved up
> > >> I dont see the sense in this change besides
> > >> it introduces 2 issues, emms must stay at the top no matter what or float code
> > >> will not work.
> > >> And handle_jpeg changes the format and must stay before the format checks
> > > 
> > > Besides the supported format checks might one day depend on the cpu ...
> > 
> > I'd have a sws_check_format() and put all the gory details there.
> 
> It IS seperated, its called isSupportedIn() and isSupportedOut()

Besides, they are not gory, they are just simple lists:

#define isSupportedIn(x)    (       \
           (x)==PIX_FMT_YUV420P     \
        || (x)==PIX_FMT_YUVA420P    \
        || (x)==PIX_FMT_YUYV422     \
        || (x)==PIX_FMT_UYVY422     \
        || (x)==PIX_FMT_RGB32       \
        || (x)==PIX_FMT_BGR24       \
        || (x)==PIX_FMT_BGR565      \
        || (x)==PIX_FMT_BGR555      \
        || (x)==PIX_FMT_BGR32       \
        || (x)==PIX_FMT_RGB24       \
        || (x)==PIX_FMT_RGB565      \
        || (x)==PIX_FMT_RGB555      \
        || (x)==PIX_FMT_GRAY8       \
        || (x)==PIX_FMT_YUV410P     \
        || (x)==PIX_FMT_GRAY16BE    \
        || (x)==PIX_FMT_GRAY16LE    \
        || (x)==PIX_FMT_YUV444P     \
        || (x)==PIX_FMT_YUV422P     \
        || (x)==PIX_FMT_YUV411P     \
        || (x)==PIX_FMT_PAL8        \
        || (x)==PIX_FMT_BGR8        \
        || (x)==PIX_FMT_RGB8        \
        || (x)==PIX_FMT_BGR4_BYTE   \
        || (x)==PIX_FMT_RGB4_BYTE   \
        || (x)==PIX_FMT_YUV440P     \
    )

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- 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-soc/attachments/20080710/38c8e458/attachment.pgp>


More information about the FFmpeg-soc mailing list