[FFmpeg-devel] [PATCH] get rid of nonsense palette pointer for RGB8, GRAY8 etc.

Michael Niedermayer michaelni
Sat Mar 21 01:32:19 CET 2009


On Sat, Mar 21, 2009 at 12:18:52AM +0100, Reimar D?ffinger wrote:
> On Fri, Mar 20, 2009 at 11:33:11PM +0100, Michael Niedermayer wrote:
> > On Fri, Mar 20, 2009 at 09:43:23PM +0100, Reimar D?ffinger wrote:
> > > On Fri, Mar 20, 2009 at 09:12:49PM +0100, Michael Niedermayer wrote:
> > > > about the avpicture_layout patch i dont understand it, avpicture_get_size()
> > > > should return the correct size
> > > 
> > > avpicture_get_size() returns the size needed for the memory buffer, that
> > > includes a palette even for GRAY8.
> > 
> > hmm avpicture_get_size)( use for malloc needs to include it the
> > muxer stuff should not, so i guess changing avpicture_get_size() is ok
> 
> Huh? I don't completely understand what you mean.
> You mean avpicture_get_size should return the size that the frame should
> allocate as raw data?

I dont know what it should do ;)
originally both the allocated size and the written out matched


> For PAL8, should that include the alignment for the palette or not?
> It's also a bit ugly because avpicture_get_size is part of the public
> API, though the description is vague enough that both behaviours match
> it...
> Attached patch would do that, though it does not improve how PAL8 is
> treated (palette is 4-byte aligned, palette is written as native-endian).

iam ok with this, also there might be alternative solutions iam ok with
but please fix the documentation of avpicture_get_size()

also a patch changing all the palettes in ffmpeg to RGBA (that is endian
independant) is welcome in principle but this would be alot of work ...

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

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- 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/20090321/a0e39087/attachment.pgp>



More information about the ffmpeg-devel mailing list