[FFmpeg-devel] [RFC] Request for pixdesc API review

Stefano Sabatini stefano.sabatini-lala
Wed Nov 18 20:35:24 CET 2009


On date Wednesday 2009-11-18 18:14:30 +0100, Michael Niedermayer encoded:
> On Wed, Nov 18, 2009 at 12:47:00AM +0100, Stefano Sabatini wrote:
> > On date Tuesday 2009-11-17 16:24:16 +0100, Stefano Sabatini encoded:
[...]
> > > Alternatively we could have a bit in the component telling if the
> > > component is a chroma component, what about it?
> > 
> > I thought a little more about this other option, I have a slight
> > preference for it since it provides more expressivity to the pixdesc,
> > allowing to say for example if a pixel format contains chroma
> > components.
> > 
> > Also it *slightly* simplifies expressions of the kind:
> >    s = (i == 1 || i == 2) ? expr(log2_chroma) : 0;
> > 
> > which become:
> >    s = pixdesc->comp[i]->is_chroma ? expr(log2_chroma) ? 0;
> 
> thats not a simplification thats hugely worse code, the compiler
> can unroll and optimize away the first but not the second
> also it wastes the last spare bit in 16bits

So another attempt at clarifying docs.

Regards.
-- 
FFmpeg = Furious Fundamental Mere Portable Enigmatic Ghost
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clarify-docs-for-chroma-comp.patch
Type: text/x-diff
Size: 1220 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091118/4ca4ae31/attachment.patch>



More information about the ffmpeg-devel mailing list