[FFmpeg-devel] [PATCH v28] lavf/movenc: Add palette to video sample description

Michael Niedermayer michael at niedermayer.cc
Fri Feb 26 22:56:42 CET 2016


On Fri, Feb 26, 2016 at 08:00:58AM +0100, Mats Peterson wrote:
> On 02/26/2016 07:41 AM, Mats Peterson wrote:
> >>Look at this snippet from libavformat/qtpalette.c that stores a palette
> >>entry (palette[] is uint32_t):
> >>
> >>palette[i] = (a << 24 ) | (r << 16) | (g << 8) | (b);
> >>
> >>The way it is stored in memory is obviously dependent on the endianness
> >>of the machine. For little-endian machines, it will be BGRA, and for
> >>big-endian ones ARGB.
> >>
> >>Mats
> >>
> >
> >This shouldn't have any relevance, though. Something is possibly wrong
> >with the palette storage endian-wise when converting that matrix file
> >from yuv420p to pal8.
> >
> >Mats
> >
> 
> My final spam for some time. The palette is stored in host byte
> order internally, isn't it? Then I don't understand whatsoever why
> v26 of my movenc patch will fail on a big-endian machine. No
> AV_RL32() should be needed.

for normal AVPackets AVPacket.data should not be in some host
endian specific format

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

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160226/d37429e6/attachment.sig>


More information about the ffmpeg-devel mailing list