[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec oggvorbis.c,1.19,1.20
Rich Felker
dalias
Fri Sep 2 16:59:13 CEST 2005
On Fri, Sep 02, 2005 at 01:08:51PM +0200, Michael Niedermayer CVS wrote:
> 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;
This part seems to be orthogonal to the addition of vbr..
BTW, can be use lcm(framelength)/samplerate instead? Even if that's
not valid for framecopy from ogg, IMO it's totally valid when encoding
new vorbis streams..
Rich
More information about the ffmpeg-cvslog
mailing list