[FFmpeg-devel] [PATCH] yuv2rgb: Trailing pixels are not converted if destination width is not multiple of 4

Michael Niedermayer michaelni
Sun May 3 02:25:42 CEST 2009


On Fri, May 01, 2009 at 10:07:49AM +0200, C?dric Schieli wrote:
> 2009/4/30 Michael Niedermayer <michaelni at gmx.at>:
> > On Thu, Apr 30, 2009 at 09:45:31PM +0200, C?dric Schieli wrote:
> >> 2009/4/30 Michael Niedermayer <michaelni at gmx.at>:
> >> > On Mon, Apr 27, 2009 at 04:08:13PM +0200, C?dric Schieli wrote:
> > [...]
> >> > besides i dont see how it could even work, it still has to be a multiple
> >> > of 2.
> >>
> >> yes, but ffmpeg do not accept an odd destination width anyway.
> >
> > thats a very lame excuse, not all files are generated by ffmpeg and the
> > check might be removed
> 
> I know, that's why
> >> I'm ok it would be better to find a full fix
> 
> >>
> >> >
> >> > also was this bug always existing or is it new since the yuv2rgb rewrite?
> >>
> >> I did not test, but a quick look at the old yuv2rgb.c makes me think
> >> it was already there
> >
> > until its confirmed that the old code was buggy too i think we should
> > refrain from adding bloat, maybe it used a simpler fix
> 
> I can now confirm the bug was already there with the old code (tested
> with a -r{2009-02-21} checkout of both ffmpeg and libswscale).
> 
> The only way I can think of (for the moment) to remove the bloat would
> impair performance, so maybe we should have both ways and use
> CONFIG_SMALL to choose ?

id like only simple code for obscure cases, this is just about videos
that have a width that is not a multiple of 4. If the <0.1% speed loss
bother one, she can just round the width down and loose 2 pixels.

i do not want to have code in every filter that is specially optimized
for x*4+1 another for x*4+2 and another for x*4+3 width.

the amount of work to maintain that is in no relation to the gain

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

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- 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/20090503/720855c6/attachment.pgp>



More information about the ffmpeg-devel mailing list