comparison mjpeg.c @ 1892:5ac49e7a1b8f libavcodec

init cleanup
author michael
date Tue, 16 Mar 2004 16:11:29 +0000
parents 95612d423fde
children caee9c21b0b1
comparison
equal deleted inserted replaced
1891:f403b3e286b3 1892:5ac49e7a1b8f
860 860
861 /* ugly way to get the idct & scantable FIXME */ 861 /* ugly way to get the idct & scantable FIXME */
862 memset(&s2, 0, sizeof(MpegEncContext)); 862 memset(&s2, 0, sizeof(MpegEncContext));
863 s2.avctx= avctx; 863 s2.avctx= avctx;
864 // s2->out_format = FMT_MJPEG; 864 // s2->out_format = FMT_MJPEG;
865 s2.width = 8; 865 dsputil_init(&s2.dsp, avctx);
866 s2.height = 8; 866 DCT_common_init(&s2);
867 if (MPV_common_init(&s2) < 0) 867
868 return -1;
869 s->scantable= s2.intra_scantable; 868 s->scantable= s2.intra_scantable;
870 s->idct_put= s2.dsp.idct_put; 869 s->idct_put= s2.dsp.idct_put;
871 MPV_common_end(&s2);
872 870
873 s->mpeg_enc_ctx_allocated = 0; 871 s->mpeg_enc_ctx_allocated = 0;
874 s->buffer_size = 102400; /* smaller buffer should be enough, 872 s->buffer_size = 102400; /* smaller buffer should be enough,
875 but photojpg files could ahive bigger sizes */ 873 but photojpg files could ahive bigger sizes */
876 s->buffer = av_malloc(s->buffer_size); 874 s->buffer = av_malloc(s->buffer_size);