[FFmpeg-devel] [PATCH] swscale: add generic yuv2yuv wrapper function

Michael Niedermayer michaelni
Thu Sep 16 16:11:46 CEST 2010


On Wed, Sep 15, 2010 at 10:42:26PM -0300, Ramiro Polla wrote:
> On Tue, Sep 14, 2010 at 12:39 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sat, Sep 11, 2010 at 02:15:39AM -0300, Ramiro Polla wrote:
> >> This is a patch series that cleans the yuv2yuv functions inside
> >> rgb2rgb.c a bit (and removes their global function pointers).
> >>
> >> Now I'm stuck in a bikeshed issue. There is one rgb2yuv function in
> >> there (rgb24toyv12). So "yuv2yuv_func" and "Yuv2YuvFunc" don't sound
> >> too great anymore. How should it be named?
> >
> > rgb->yuv needs a bit more work anyway as there are several yuv types but
> > it hardcodes one
> 
> I don't really understand what you mean here. Are you talking about
> yuv2rgb.c or rgb24toyv12()?

anything involving yuv has to one way or another deal with multiple yuv
variants. for yuv2yuv there will be a simple same yuv type case (what we
have now) and a case for differing yuv type.
but for rgb<->yuv there are coefficients that can be changed and so only
one case in the code has to exits, handling multiple yuv types should be
free

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

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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/20100916/103d96f7/attachment.pgp>



More information about the ffmpeg-devel mailing list