[FFmpeg-devel] Broken endian indication in pixfmt list

Michael Niedermayer michaelni at gmx.at
Wed Nov 5 02:44:12 CET 2014


On Wed, Nov 05, 2014 at 02:13:29AM +0100, wm4 wrote:
> The header pixfmt.h contains the following comment in the pixel format
> list doxygen:
> 
>  * @note
>  * Make sure that all newly added big-endian formats have (pix_fmt & 1) == 1
>  * and that all newly added little-endian formats have (pix_fmt & 1) == 0.
>  * This allows simpler detection of big vs little-endian.
> 

> This is currently broken for the following formats: nv20le/be gbrap16le/be

yes


> 
> Obviously, this can't be fixed until the next ABI bump. But more

can you post a patch which does make sure it gets fixed then?
and or that documentation corrected


[...]
> 
> Also, we should discuss whether swapped-endian formats should even
> exist. From what I can see, only the raw decoders/encoders make
> effective use of them. Wouldn't it be simpler to let the
> decoders/encoders do the byte-swapping?

they are usefull to avoid doubble swaping if both in and out are
non native endian.
also they are usefull for the user API of libswscale, which mey be
used by end user applications which have such non native formats

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141105/ebf71659/attachment.asc>


More information about the ffmpeg-devel mailing list