[vorbis] vbr / cbr / abr API calls
Akos Maroy
darkeye at tyrell.hu
Sun Aug 4 04:07:07 PDT 2002
Michael,
> Right. Remember to call vorbis_info_init(&vorbisInfo) before all of that.
OK. Now that we're on the matter, could you explain the possible
parameters of vorbis_encode_ctl() ? In vorbisenc.h I see the following:
<p>extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg);
#define OV_ECTL_RATEMANAGE_GET 0x10
#define OV_ECTL_RATEMANAGE_SET 0x11
#define OV_ECTL_RATEMANAGE_AVG 0x12
#define OV_ECTL_RATEMANAGE_HARD 0x13
#define OV_ECTL_LOWPASS_GET 0x20
#define OV_ECTL_LOWPASS_SET 0x21
#define OV_ECTL_IBLOCK_GET 0x30
#define OV_ECTL_IBLOCK_SET 0x31
<p>I understand these constants are the possible parameters for number in
the call to vorbis_encode_ctl().
<p>OV_ECTL_RATEMANAGE_GET
arg is expected to be a pointer to a struct ovectl_ratemanage_arg.
fills in the supplied struct ovectl_ratemanage_arg, representing the
current settings for rate management
OV_ECTL_RATEMANAGE_SET
arg is expected to be a pointer to a struct ovectl_ratemanage_arg.
sets rate management specified by the settings in the supplied arg. if
arg == 0, sets non-managed mode
OV_ECTL_RATEMANAGE_AVG
arg is expected to be a pointer to a struct ovectl_ratemanage_arg.
sets some things related to the bitrate_av_* values in arg?
OV_ECTL_RATEMANAGE_HARD
arg is expected to be a pointer to a struct ovectl_ratemanage_arg.
sets some thins related to bitrate_hard_* values in arg?
OV_ECTL_LOWPASS_GET
arg is expected to be a pointer to a double.
fills in the supplied double with the current value for lowpass
filtering (supposedly in Hz? or kHz?)
OV_ECTL_LOWPASS_SET
arg is expected to be a pointer to a double.
sets current value for lowpass filtering (supposedly in Hz? or kHz?)
supplied by arg
OV_ECTL_IBLOCK_GET
arg is expected to be a pointer to a double.
but what does this return?
OV_ECTL_IBLOCK_SET
arg is expected to be a pointer to a double.
but what does this set?
<p><p>The behaviour of OV_ECTL_RATEMANAGE_AVG and OV_ECTL_RATEMANAGE_HARD
suggests that members birate_av_* are related to some ABR-style
encoding, while bitrate_hard_* related to a CBR-style (or hard-set
limits) encoding. How does this work exaclty?
<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