[Mplayer-cvslog] CVS: main mencoder.c,1.52,1.53
Alex Beregszaszi
alex at mplayer.dev.hu
Wed Dec 26 14:32:02 CET 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv4920
Modified Files:
mencoder.c
Log Message:
added support for I420 input (used by TV V4L) in lavc encoder
Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- mencoder.c 25 Dec 2001 21:59:07 -0000 1.52
+++ mencoder.c 26 Dec 2001 13:32:00 -0000 1.53
@@ -883,7 +883,7 @@
}
#if 1
- if (out_fmt != IMGFMT_YV12)
+ if (out_fmt != IMGFMT_YV12 && out_fmt != IMGFMT_I420)
{
printf("Not supported image format! (%s)\n",
vo_format_name(out_fmt));
@@ -896,8 +896,16 @@
int size = lavc_venc_context.width * lavc_venc_context.height;
/* Y */ lavc_venc_picture.data[0] = vo_image_ptr;
-/* U */ lavc_venc_picture.data[2] = lavc_venc_picture.data[0] + size;
-/* V */ lavc_venc_picture.data[1] = lavc_venc_picture.data[2] + size/4;
+ if (out_fmt == IMGFMT_YV12)
+ {
+/* U */ lavc_venc_picture.data[2] = lavc_venc_picture.data[0] + size;
+/* V */ lavc_venc_picture.data[1] = lavc_venc_picture.data[2] + size/4;
+ }
+ else /* IMGFMT_I420 */
+ {
+/* U */ lavc_venc_picture.data[1] = lavc_venc_picture.data[0] + size;
+/* V */ lavc_venc_picture.data[2] = lavc_venc_picture.data[1] + size/4;
+ }
lavc_venc_picture.linesize[0] = lavc_venc_context.width;
lavc_venc_picture.linesize[1] = lavc_venc_context.width / 2;
lavc_venc_picture.linesize[2] = lavc_venc_context.width / 2;
More information about the MPlayer-cvslog
mailing list