[FFmpeg-cvslog] Add PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
Peter Ross
pross at xvid.org
Sat Mar 19 05:29:01 CET 2011
On Thu, Mar 17, 2011 at 03:52:47PM +0100, Peter Ross wrote:
> ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Thu Mar 17 21:15:57 2011 +1100| [e309fdc7018a1027d187ec27fb1d69a41a4ee167] | committer: Michael Niedermayer
>
> Add PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats
>
[..]
> --- a/libavutil/pixfmt.h
> +++ b/libavutil/pixfmt.h
> @@ -133,6 +133,8 @@ enum PixelFormat {
> PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
> PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
> PIX_FMT_Y400A, ///< 8bit gray, 8bit alpha
> + PIX_FMT_BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian
> + PIX_FMT_BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian
> PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
> };
Problem: libswscale's isBE(pixfmt) macro examines the least significant bit of the pixel
format value to determine pixel format endianess. Odd is big-endian, even is little endian.
PIX_FMT_Y400A interrupts the order of the enums, so the PIX_FMT_BGR48BE and PIX_FMT_BGR48LE
values are wrong. Fix enclosed.
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-unused-pixel-format-PIX_FMT_UNUSED-to-make-PIX_F.patch
Type: text/x-diff
Size: 1338 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20110319/5f120299/attachment-0001.bin>
-------------- 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-cvslog/attachments/20110319/5f120299/attachment-0001.asc>
More information about the ffmpeg-cvslog
mailing list