changeset 23369:700408f4cb51

compilation fix: ff_ _encode added and temporarily disabled mjpeg_write_tables
author rik
date Sun, 27 May 2007 08:44:27 +0000
parents cef784b467ac
children f3add453c968
files libmpcodecs/vf_zrmjpeg.c libvo/jpeg_enc.c
diffstat 2 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_zrmjpeg.c	Sat May 26 20:27:45 2007 +0000
+++ b/libmpcodecs/vf_zrmjpeg.c	Sun May 27 08:44:27 2007 +0000
@@ -453,7 +453,6 @@
 	j->s->height = h;
 	j->s->qscale = q;		// Encoding quality
 
-	j->s->mjpeg_data_only_frames = 0;
 	j->s->out_format = FMT_MJPEG;
 	j->s->intra_only = 1;		// Generate only intra pictures for jpeg
 	j->s->encoding = 1;		// Set mode to encode
@@ -469,7 +468,7 @@
 	 * The current setup is simply YUV422, with two horizontal Y components
 	 * for every UV component.
 	 */
-	j->s->mjpeg_write_tables = 1;	// setup to write tables
+	//FIXME j->s->mjpeg_write_tables = 1;	// setup to write tables
 	j->s->mjpeg_vsample[0] = 1;	// 1 appearance of Y vertically
 	j->s->mjpeg_vsample[1] = 1;	// 1 appearance of U vertically
 	j->s->mjpeg_vsample[2] = 1;	// 1 appearance of V vertically
@@ -491,7 +490,7 @@
 	}
 
 	// Build mjpeg huffman code tables, setting up j->s->mjpeg_ctx
-	if (mjpeg_init(j->s) < 0) {
+	if (ff_mjpeg_encode_init(j->s) < 0) {
 		av_free(j->s);
 		av_free(j);
 		return NULL;
@@ -575,7 +574,7 @@
 	init_put_bits(&j->s->pb, bufr, 1024*256);
 
 	// Emit the mjpeg header blocks
-	mjpeg_picture_header(j->s);
+	ff_mjpeg_encode_picture_header(j->s);
 
 	j->s->header_bits = put_bits_count(&j->s->pb);
 
@@ -619,11 +618,12 @@
 		}
 	}
 	emms_c();
-	mjpeg_picture_trailer(j->s);
+	ff_mjpeg_encode_picture_trailer(j->s);
 	flush_put_bits(&j->s->pb);
 
-	if (j->s->mjpeg_write_tables == 1)
-		j->s->mjpeg_write_tables = 0;
+	//FIXME
+	//if (j->s->mjpeg_write_tables == 1)
+	//	j->s->mjpeg_write_tables = 0;
 
 	return pbBufPtr(&(j->s->pb)) - j->s->pb.buf;
 }
@@ -635,7 +635,7 @@
  * \param j pointer to jpeg_enc structure
  */
 static void jpeg_enc_uninit(jpeg_enc_t *j) {
-	mjpeg_close(j->s);
+	ff_mjpeg_encode_close(j->s);
 	av_free(j->s);
 	av_free(j);
 }
--- a/libvo/jpeg_enc.c	Sat May 26 20:27:45 2007 +0000
+++ b/libvo/jpeg_enc.c	Sun May 27 08:44:27 2007 +0000
@@ -314,7 +314,6 @@
 	j->s->height = h;
 	j->s->qscale = q;
 
-	j->s->mjpeg_data_only_frames = 0;
 	j->s->out_format = FMT_MJPEG;
 	j->s->intra_only = 1;
 	j->s->encoding = 1;
@@ -322,7 +321,7 @@
 	j->s->y_dc_scale = 8;
 	j->s->c_dc_scale = 8;
 
-	j->s->mjpeg_write_tables = 1;
+	//FIXME j->s->mjpeg_write_tables = 1;
 	j->s->mjpeg_vsample[0] = 1;
 	j->s->mjpeg_vsample[1] = 1;
 	j->s->mjpeg_vsample[2] = 1;
@@ -343,7 +342,7 @@
 		avcodec_inited=1;
 	}
 
-	if (mjpeg_init(j->s) < 0) {
+	if (ff_mjpeg_encode_init(j->s) < 0) {
 		av_free(j->s);
 		av_free(j);
 		return NULL;
@@ -385,7 +384,7 @@
 
 	init_put_bits(&j->s->pb, bufr, 1024*256);
 
-	mjpeg_picture_header(j->s);
+	ff_mjpeg_encode_picture_header(j->s);
 
 	j->s->header_bits = put_bits_count(&j->s->pb);
 
@@ -490,17 +489,18 @@
 		}
 	}
 	emms_c();
-	mjpeg_picture_trailer(j->s);
+	ff_mjpeg_encode_picture_trailer(j->s);
 	flush_put_bits(&j->s->pb);	
 
-	if (j->s->mjpeg_write_tables == 1)
-		j->s->mjpeg_write_tables = 0;
+	//FIXME
+	//if (j->s->mjpeg_write_tables == 1)
+	//	j->s->mjpeg_write_tables = 0;
 	
 	return pbBufPtr(&(j->s->pb)) - j->s->pb.buf;
 }
 
 void jpeg_enc_uninit(jpeg_enc_t *j) {
-	mjpeg_close(j->s);
+	ff_mjpeg_encode_close(j->s);
 	av_free(j->s);
 	av_free(j);
 }