[vorbis] vbr / cbr / abr API calls

Akos Maroy darkeye at tyrell.hu
Sat Aug 3 06:27:46 PDT 2002



Michael Smith wrote:
> vorbis_encode_init_vbr() does all mode initialisation in a single call.
> vorbis_encode_setup_vbr() only does partial mode setup, allowing you
> to fine-tune the encoder mode using vorbis_encode_ctl() before calling
> vorbis_encode_setup_init() to finalise the mode. This is useful for,
> for example, setting hard min/max on a quality-based mode.

then I need something like this:

<p>vorbis_encode_setup_vbr( &vorbisInfo,
                          getInChannel(),
                          getOutSampleRate(),
                          getOutQuality() );

if ( setMaxBitrate ) {
   struct ovectl_ratemanage_arg ai;
   vorbis_encode_ctl(&vi, OV_ECTL_RATEMANAGE_GET, &ai);
   ai.bitrate_hard_max = max_bitrate; // You only care about max, most
                                      // likely. You can also set min,
                                      // but it's probably not useful.
   ai.management_active = 1; // turn management on, so the above takes
                             // effect.
   vorbis_encode_ctl(&vorbisInfo, OV_ECTL_RATEMANAGE_SET, &ai);
}

vorbis_encode_setup_init( &vorbisInfo);

<p>Right?

Thanks,

<p>Akos

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list