[FFmpeg-devel] [PATCH] swscale: Add support for unscaled 8-bit Packed RGB -> Planar RGB

Michael Niedermayer michaelni at gmx.at
Sun Feb 10 00:15:40 CET 2013


On Sat, Feb 09, 2013 at 05:56:27PM -0500, Derek Buitenhuis wrote:
> On 2013-02-09 5:06 PM, Michael Niedermayer wrote:
> > that can be simplified with a
> > if(alpha_first)
> >     src++;
> > outside the loop, i think
> 
> You're right. Will do.
> 

> > these 2 can be simplified with 2  FFSWAP
> > the advantage is smaller code size if the compiler chooses to inline
> > packed24togbr24p
> 
> I wrote it to match a805cefd8b81e551ab7dfb6a7ae8b5a1512e7893, for consistency.
> If this changes, that should change too.

yes



> 
> I also notice a mistake I made: 
> 
> > +    if (srcFormat == AV_PIX_FMT_GBRP && isPlanarRGB(dstFormat) && isByteRGB(dstFormat))
> > +        c->swScale = rgbToPlanarRgbWrapper;
> 
> This is the wrong check. srcFormat should NOT be GBRP.

thats not the only bug in this line, 
isByteRGB(dstFormat) implies dstFormat is packed


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

Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130210/e903da44/attachment.asc>


More information about the ffmpeg-devel mailing list