[MPlayer-dev-eng] GBR24P default conversion to BGR24
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Mon Nov 7 19:50:28 CET 2011
On Sun, Nov 06, 2011 at 03:03:15PM +0100, Hans-Kristian Arntzen wrote:
> As FFmpeg upstream recently got an unscaled GBR24P -> RGB path in
> swscale, it might be a good idea to default the conversion to BGR24
> (or RGB24, whatever's the fastest).
>
> FFmpeg commit:
> http://git.videolan.org/?p=ffmpeg.git;a=commit;h=1e79926f9e8bbfa2920a1d40e36d9ffcf244fe0a
>
> Currently the GBR24P gets autoconverted to YUV444P for -vo gl, which
> isn't very ideal now.
>
> Attached is the very trivial patch to set preferred format. There
> might be a more ideal approach, i.e. supporting GBR24P directly in
> the various drivers, but that would probably create more work than
> necessary.
> --- libmpcodecs/vf_scale.c.old 2011-11-06 14:42:33.905341624 +0100
> +++ libmpcodecs/vf_scale.c 2011-11-06 14:42:59.225342167 +0100
> @@ -135,6 +135,7 @@
> {IMGFMT_UYVY, IMGFMT_422P},
> {IMGFMT_422P, IMGFMT_YUY2},
> {IMGFMT_422P, IMGFMT_UYVY},
> + {IMGFMT_GBR24P, IMGFMT_BGR24},
I extended it to make RGB24, BGR32 and RGB32 preferred targets
as well (e.g. in case of a theoretical VO that only supports
RGB32 and YV12 for example).
More information about the MPlayer-dev-eng
mailing list