[MPlayer-dev-eng] [PATCH] Use PIX_FMT_YUVJ420 for mjpeg encoding

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Feb 21 16:25:18 CET 2005


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
-------------- next part --------------
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:


More information about the MPlayer-dev-eng mailing list