[FFmpeg-devel] [PATCH] Add initial support for 12-bit color mode.
Sun Feb 28 19:17:22 CET 2010
On Sun, Feb 28, 2010 at 05:56:30PM +0100, Janusz Krzysztofik wrote:
> While trying to play video on my ARM OMAP1 based Amstrad Delta (E3) videophone
> with mplayer, I found it not compatible with the 12-bit LCD display my device
> is equipped with. To solve the problem, I patched several mplayer video output
> drivers to support my device. For them to be usefull, I also had to patch
> libswscale to be able to convert video to my device compatible RGB444 format.
> This patch adds rudimentary support for RGB12 aka RGB444 pixel format handling
> to ffmpeg libraries, including the definitions of new pixel format ids, the
> pixel format desciption and the info and extensions to core helper functions
> provided by libavcodec/imgconvert.c. Other patches, based on this one,
> providing converters and possibly other features, will follow.
> Created and tested against ffmpeg svn revision 22110 dated 2010-02-28.
> Signed-off-by: Janusz Krzysztofik <jkrzyszt at tis.icnet.pl>
> @@ -778,7 +814,10 @@ int avcodec_get_pix_fmt_loss(enum PixelF
> pf = &pix_fmt_info[dst_pix_fmt];
> if (pf->depth < ps->depth ||
> ((dst_pix_fmt == PIX_FMT_RGB555BE || dst_pix_fmt == PIX_FMT_RGB555LE) &&
> - (src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE)))
> + (src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE)) ||
> + ((dst_pix_fmt == PIX_FMT_RGB444BE || dst_pix_fmt == PIX_FMT_RGB444LE) &&
> + (src_pix_fmt == PIX_FMT_RGB555BE || src_pix_fmt == PIX_FMT_RGB555LE ||
> + src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE)))
is this missing bgr cases? also i suspect this can be done simpler
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel