[MPlayer-dev-eng] [PATCH] Use PIX_FMT_YUVJ420 for mjpeg encoding
D Richard Felker III
dalias at aerifal.cx
Mon Feb 21 16:35:45 CET 2005
On Mon, Feb 21, 2005 at 04:25:18PM +0100, Reimar Döffinger wrote:
> Hi,
> the attached patch make mencoder use the "correct" colour space for
> mjpeg encoding so that vstrict=-1 is not needed anymore.
> Not sure if this is a really great idea... But the current situation
> also is no good.
>
> Greetings,
> Reimar Döffinger
> Index: libmpcodecs/ve_lavc.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
> retrieving revision 1.107
> diff -u -r1.107 ve_lavc.c
> --- libmpcodecs/ve_lavc.c 8 Jan 2005 19:16:21 -0000 1.107
> +++ libmpcodecs/ve_lavc.c 21 Feb 2005 15:25:00 -0000
> @@ -609,6 +609,10 @@
> switch(lavc_param_format)
> {
> case IMGFMT_YV12:
> + // HACK, mjpeg accepts PIX_FMT_YUV420P only with vstrict=-1
> + if (strcasecmp(lavc_param_vcodec, "mjpeg") == 0)
> + lavc_venc_context->pix_fmt = PIX_FMT_YUVJ420P;
> + else
> lavc_venc_context->pix_fmt = PIX_FMT_YUV420P;
> break;
> case IMGFMT_422P:
i'm in favor of committing this.
rich
More information about the MPlayer-dev-eng
mailing list