diff mpegvideo.c @ 229:f418b5c5ff67 libavcodec

PATCH by Rik Snel <rsnel@cube.dyndns.org> this patch enhances the jpeg header writer. It can be asked to omit quantisation and huffman tables and it can write different horizontal and vertical sampling factors. (the last thing is useless for libavcodec itself (because libavcodec only handles YUV420P at ecoder level), but the values are initialized so that operation of libavcodec is not impaired)
author arpi_esp
date Sat, 09 Feb 2002 01:23:41 +0000
parents ec1bc02a0a47
children ba9cd6fb6f0e
line wrap: on
line diff
--- a/mpegvideo.c	Sat Feb 09 00:38:44 2002 +0000
+++ b/mpegvideo.c	Sat Feb 09 01:23:41 2002 +0000
@@ -283,6 +283,13 @@
     case CODEC_ID_MJPEG:
         s->out_format = FMT_MJPEG;
         s->intra_only = 1; /* force intra only for jpeg */
+	s->mjpeg_write_tables = 1; /* write all tables */
+	s->mjpeg_vsample[0] = 2; /* set up default sampling factors */
+	s->mjpeg_vsample[1] = 1; /* the only currently supported values */
+	s->mjpeg_vsample[2] = 1; 
+	s->mjpeg_hsample[0] = 2; 
+	s->mjpeg_hsample[1] = 1; 
+	s->mjpeg_hsample[2] = 1; 
         if (mjpeg_init(s) < 0)
             return -1;
         break;