[MPlayer-cvslog] r23387 - in trunk: libmpcodecs/vf_zrmjpeg.c libvo/jpeg_enc.c
rik
subversion at mplayerhq.hu
Sun May 27 10:44:27 CEST 2007
Author: rik
Date: Sun May 27 10:44:27 2007
New Revision: 23387
Log:
compilation fix: ff_ _encode added and temporarily disabled mjpeg_write_tables
Modified:
trunk/libmpcodecs/vf_zrmjpeg.c
trunk/libvo/jpeg_enc.c
Modified: trunk/libmpcodecs/vf_zrmjpeg.c
==============================================================================
--- trunk/libmpcodecs/vf_zrmjpeg.c (original)
+++ trunk/libmpcodecs/vf_zrmjpeg.c Sun May 27 10:44:27 2007
@@ -453,7 +453,6 @@ static jpeg_enc_t *jpeg_enc_init(int w,
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 @@ static jpeg_enc_t *jpeg_enc_init(int w,
* 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 @@ static jpeg_enc_t *jpeg_enc_init(int w,
}
// 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 @@ static int jpeg_enc_frame(jpeg_enc_t *j,
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 @@ static int jpeg_enc_frame(jpeg_enc_t *j,
}
}
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 @@ static int jpeg_enc_frame(jpeg_enc_t *j,
* \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);
}
Modified: trunk/libvo/jpeg_enc.c
==============================================================================
--- trunk/libvo/jpeg_enc.c (original)
+++ trunk/libvo/jpeg_enc.c Sun May 27 10:44:27 2007
@@ -314,7 +314,6 @@ jpeg_enc_t *jpeg_enc_init(int w, int h,
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 @@ jpeg_enc_t *jpeg_enc_init(int w, int h,
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 @@ jpeg_enc_t *jpeg_enc_init(int w, int h,
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 @@ int jpeg_enc_frame(jpeg_enc_t *j, unsign
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 @@ int jpeg_enc_frame(jpeg_enc_t *j, unsign
}
}
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);
}
More information about the MPlayer-cvslog
mailing list