[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec oggvorbis.c,1.19,1.20
Michael Niedermayer CVS
michael
Fri Sep 2 13:08:51 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv14106
Modified Files:
oggvorbis.c
Log Message:
fixed quality / vbr encoding patch by (Justin Ruggles, jruggle, earthlink net)
Index: oggvorbis.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/oggvorbis.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- oggvorbis.c 19 May 2005 11:45:10 -0000 1.19
+++ oggvorbis.c 2 Sep 2005 11:08:49 -0000 1.20
@@ -30,6 +30,11 @@
static int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) {
+ if(avccontext->flags & CODEC_FLAG_QSCALE) {
+ return vorbis_encode_init_vbr(vi, avccontext->channels,
+ avccontext->sample_rate,
+ avccontext->global_quality / (float)FF_QP2LAMBDA);
+ }
#ifdef OGGVORBIS_VBR_BY_ESTIMATE
/* variable bitrate by estimate */
@@ -87,6 +92,8 @@
vorbis_comment_clear(&context->vc);
avccontext->frame_size = OGGVORBIS_FRAME_SIZE ;
+ avccontext->time_base.den = avccontext->sample_rate;
+ avccontext->time_base.num = 1;
avccontext->coded_frame= avcodec_alloc_frame();
avccontext->coded_frame->key_frame= 1;
More information about the ffmpeg-cvslog
mailing list