diff options
Diffstat (limited to 'vorbis/doc/vorbisenc')
-rw-r--r-- | vorbis/doc/vorbisenc/Makefile.am | 11 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/changes.html | 104 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/examples.html | 133 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/index.html | 40 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/ovectl_ratemanage2_arg.html | 92 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/ovectl_ratemanage_arg.html | 92 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/overview.html | 382 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/reference.html | 54 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/style.css | 7 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/vorbis_encode_ctl.html | 183 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/vorbis_encode_init.html | 88 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/vorbis_encode_init_vbr.html | 81 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/vorbis_encode_setup_init.html | 88 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/vorbis_encode_setup_managed.html | 102 | ||||
-rw-r--r-- | vorbis/doc/vorbisenc/vorbis_encode_setup_vbr.html | 90 |
15 files changed, 1547 insertions, 0 deletions
diff --git a/vorbis/doc/vorbisenc/Makefile.am b/vorbis/doc/vorbisenc/Makefile.am new file mode 100644 index 0000000..bbab3c5 --- /dev/null +++ b/vorbis/doc/vorbisenc/Makefile.am @@ -0,0 +1,11 @@ +## Process this file with automake to produce Makefile.in + +docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/vorbisenc + +doc_DATA = changes.html examples.html index.html ovectl_ratemanage2_arg.html \ + ovectl_ratemanage_arg.html overview.html reference.html style.css\ + vorbis_encode_ctl.html vorbis_encode_init.html vorbis_encode_setup_init.html \ + vorbis_encode_setup_managed.html vorbis_encode_setup_vbr.html \ + vorbis_encode_init_vbr.html + +EXTRA_DIST = $(doc_DATA) diff --git a/vorbis/doc/vorbisenc/changes.html b/vorbis/doc/vorbisenc/changes.html new file mode 100644 index 0000000..eb8460e --- /dev/null +++ b/vorbis/doc/vorbisenc/changes.html @@ -0,0 +1,104 @@ +<html> + +<head> +<title>libvorbisenc - Documentation</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>Libvorbisenc API changes 1.0 through 1.1</h1> + +This document describes API additions to libvorbisenc between release +1.0 and 1.1. + +<h2>1.0.1</h2> + +The programming API and binary application ABI are unchanged and fully +forward/backward compatible between release 1.0 and 1.0.1. Libvorbis, +libvorbisenc and libvorbisfile must match versions amongst themselves, +however. + +<h2>1.1</h2> + +The binary ABI from release 1.0.1 to 1.1 is backward compatible; +applications linked against libvorbis/libvorbisenc 1.0 and 1.0.1 will +continue to function correctly when upgrading the libvorbis and +libvorbisenc dynamic libraries without re-linking. <p> + +Release 1.1 adds several possible requests to the libvorbisenc <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> call in order to +reflect the shift to <a href="overview.html#BBR">bit-reservoir style +bitrate management</a>. In addition, several <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> requests are +deprecated (but functional) as they are redered semantically obsolete +by the <a href="overview.html#BBR">new bitrate management</a>.<p> + +<h3>Deprecated in 1.1</h3> + +These calls are still available to older codebases to preserve +compatability; the fields of the <a +href="ovectl_ratemanage_arg.html">ovectl_ratemanage_arg</a> argument +are mapped as closely as possible to the fields of the new <a +href="ovectl_ratemanage2_arg.html">ovectl_ratemanage2_arg</a> +structure. + +<dl> +<dt><a href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE_GET">OV_ECTL_RATEMANAGE_GET</a>:<dd> Use <a +href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE2_GET">OV_ECTL_RATEMANAGE2_GET</a> +instead. + + +<dt><a href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE_SET">OV_ECTL_RATEMANAGE_SET</a>:<dd> Use <a +href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE2_SET">OV_ECTL_RATEMANAGE2_SET</a> +instead. + +<dt><a href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE_AVG">OV_ECTL_RATEMANAGE_AVG</a>:<dd> Use <a +href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE2_SET">OV_ECTL_RATEMANAGE2_SET</a> +instead. + +<dt><a href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE_HARD">OV_ECTL_RATEMANAGE_HARD</a>:<dd> Use <a +href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE2_SET">OV_ECTL_RATEMANAGE2_SET</a> +instead. +</dl> + +<h3>Newly added in 1.1</h3> + +The following calls are added in 1.1 to semantically reflect movement +to a <a href="overview.html#BBR">bit-reservoir-based bitrate +management</a> scheme by introducing the <a +href="ovectl_ratemanage2_arg.html">ovectl_ratemanage2_arg</a> +structure in order to better represent the abilities of the bitrate +manager.<p> + +<dl> +<dt><a href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE2_GET">OV_ECTL_RATEMANAGE2_GET</a><dd> + +Used to query the current state of bitrate management setup. + +<dt><a href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE2_SET">OV_ECTL_RATEMANAGE2_SET</a><dd> + +Used to set or alter bitrate management settings. +</dl> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/examples.html b/vorbis/doc/vorbisenc/examples.html new file mode 100644 index 0000000..1fcc7e0 --- /dev/null +++ b/vorbis/doc/vorbisenc/examples.html @@ -0,0 +1,133 @@ +<html> + +<head> +<title>libvorbisenc - Documentation</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>Libvorbisenc Setup Examples</h1> + +VBR is always the recommended mode for Vorbis encoding when +there's no need to impose bitrate constraints. True VBR encoding will +always produce the most consistent quality output as well as the +highest quality for a the bits used. + +<p>The following code examples prepare a +<a href="../libvorbis/vorbis_info.html">vorbis_info</a> structure for encoding +use with libvorbis.<p> + +<h2>Example: encoding using a VBR quality mode</h2> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc><td><pre><b> + vorbis_info_init(&vi); + + /********************************************************************* + Encoding using a VBR quality mode. The usable range is -.1 + (lowest quality, smallest file) to 1.0 (highest quality, largest file). + Example quality mode .4: 44kHz stereo coupled, roughly 128kbps VBR + *********************************************************************/ + + ret = vorbis_encode_init_vbr(&vi,2,44100,.4); + + /********************************************************************* + do not continue if setup failed; this can happen if we ask for a + mode that libVorbis does not support (eg, too low a quality mode, etc, + will return 'OV_EIMPL') + *********************************************************************/ + + if(ret) exit(1); +</b></pre></td></tr></table> + +<h2>Example: encoding using average bitrate (ABR)</h2> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc><td><pre><b> + vorbis_info_init(&vi); + + /********************************************************************* + Encoding using an average bitrate mode (ABR). + example: 44kHz stereo coupled, average 128kbps ABR + *********************************************************************/ + + ret = vorbis_encode_init(&vi,2,44100,-1,128000,-1); + + /********************************************************************* + do not continue if setup failed; this can happen if we ask for a + mode that libVorbis does not support (eg, too low a bitrate, etc, + will return 'OV_EIMPL') + *********************************************************************/ + + if(ret) exit(1); +</b></pre></td></tr></table> + +<h2>Example: encoding using constant bitrate (CBR)</h2> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc><td><pre><b> + vorbis_info_init(&vi); + + /********************************************************************* + Encoding using a constant bitrate mode (CBR). + example: 44kHz stereo coupled, average 128kbps CBR + *********************************************************************/ + + ret = vorbis_encode_init(&vi,2,44100,128000,128000,128000); + + /********************************************************************* + do not continue if setup failed; this can happen if we ask for a + mode that libVorbis does not support (eg, too low a bitrate, etc, + will return 'OV_EIMPL') + *********************************************************************/ + + if(ret) exit(1); +</b></pre></td></tr></table> + +<h2>Example: encoding using VBR selected by approximate bitrate</h2> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc><td><pre><b> + vorbis_info_init(&vi); + + /********************************************************************* + Encode using a quality mode, but select that quality mode by asking for + an approximate bitrate. This is not ABR, it is true VBR, but selected + using the bitrate interface, and then turning bitrate management off: + *********************************************************************/ + + ret = ( vorbis_encode_setup_managed(&vi,2,44100,-1,128000,-1) || + vorbis_encode_ctl(&vi,OV_ECTL_RATEMANAGE2_SET,NULL) || + vorbis_encode_setup_init(&vi)); + + /********************************************************************* + do not continue if setup failed; this can happen if we ask for a + mode that libVorbis does not support (eg, too low a bitrate, etc, + will return 'OV_EIMPL') + *********************************************************************/ + + if(ret) exit(1); +</b></pre></td></tr></table> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/index.html b/vorbis/doc/vorbisenc/index.html new file mode 100644 index 0000000..ec9b988 --- /dev/null +++ b/vorbis/doc/vorbisenc/index.html @@ -0,0 +1,40 @@ +<html> + +<head> +<title>libvorbisenc - Documentation</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>Libvorbisenc Documentation</h1> + +<p> +Libvorbisenc is a convenient API for setting up an encoding environment using libvorbis. Libvorbisenc encapsulates the actions needed to set up the encoder properly. +<p> +<a href="overview.html">libvorbisenc api overview</a><br> +<a href="reference.html">libvorbisenc api reference</a><br> +<a href="changes.html">libvorbisenc api changes from 1.0 and 1.0.1</a><br> +<a href="examples.html">libvorbisenc encode setup examples</a><br> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/ovectl_ratemanage2_arg.html b/vorbis/doc/vorbisenc/ovectl_ratemanage2_arg.html new file mode 100644 index 0000000..3d9d417 --- /dev/null +++ b/vorbis/doc/vorbisenc/ovectl_ratemanage2_arg.html @@ -0,0 +1,92 @@ +<html> + +<head> +<title>vorbis - datatype - ovectl_ratemanage2_arg</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>ovectl_ratemanage2_arg</h1> + +<p><i>declared in "vorbis/vorbisenc.h"</i></p> + +<p> + +The ovectl_ratemanage2_arg structure is used with <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> and the OV_ECTL_RATEMANAGE2_GET and +OV_ECTL_RATEMANAGE2_SET calls in order to query and modify specifics +of the encoder's bitrate management configuration. + +<p> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td> +<pre><b>struct ovectl_ratemanage2_arg { + int management_active; + + long bitrate_limit_min_kbps; + long bitrate_limit_max_kbps; + long bitrate_limit_reservoir_bits; + double bitrate_limit_reservoir_bias; + + long bitrate_average_kbps; + double bitrate_average_damping; +};</b></pre> + </td> +</tr> +</table> + +<h3>Relevant Struct Members</h3> +<dl> +<dt><i>management_active</i></dt> +<dd>nonzero if bitrate management is active</dd> + +<dt><i>bitrate_limit_min_kbps</i></dt> +<dd>Lower allowed bitrate limit in kilobits per second</dd> +<dt><i>bitrate_limit_max_kbps</i></dt> +<dd>Upper allowed bitrate limit in kilobits per second</dd> +<dt><i>bitrate_limit_reservoir_bits</i></dt> +<dd>Size of the bitrate reservoir in bits</dd> +<dt><i>bitrate_limit_reservoir_bias</i></dt> + +<dd>Regulates the bitrate reservoir's preferred fill level in a range +from 0.0 to 1.0; 0.0 tries to bank bits to buffer against future +bitrate spikes, 1.0 buffers against future sudden drops in +instantaneous bitrate. Default is 0.1 </dd> + +<dt><i>bitrate_average_kbps</i></dt> +<dd>Average bitrate setting in kilobits per second</dd> + +<dt><i>bitrate_average_damping</i></dt> <dd>Slew rate limit setting +for average bitrate adjustment; sets the minimum time in seconds the +bitrate tracker may swing from one extreme to the other when boosting +or damping average bitrate.</dd> + + + +</dl> + + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/ovectl_ratemanage_arg.html b/vorbis/doc/vorbisenc/ovectl_ratemanage_arg.html new file mode 100644 index 0000000..48f5a62 --- /dev/null +++ b/vorbis/doc/vorbisenc/ovectl_ratemanage_arg.html @@ -0,0 +1,92 @@ +<html> + +<head> +<title>vorbis - datatype - ovectl_ratemanage_arg</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>ovectl_ratemanage_arg</h1> + +<p><i>declared in "vorbis/vorbisenc.h"</i></p> + +<p> + +The ovectl_ratemanage_arg structure is used with <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> and the OV_ECTL_RATEMANAGE_GET, +OV_ECTL_RATEMANAGE_SET, OV_ECTL_RATEMANAGE_AVG, +OV_ECTL_RATEMANAGE_HARD calls in order to query and modify specifics +of the encoder's bitrate management configuration. Note that this is +a deprecated interface; please use vorbis_encode_ctl() with the <a +href="ovectl_ratemanage2_arg.html">ovectl_ratemanage2_arg</a> struct +and OV_ECTL_RATEMANAGE2_GET and OV_ECTL_RATEMANAGE2_SET calls in new +code. + +<p> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td> +<pre><b>struct ovectl_ratemanage_arg { + int management_active; + + long bitrate_hard_min; + long bitrate_hard_max; + double bitrate_hard_window; + + long bitrate_av_lo; + long bitrate_av_hi; + double bitrate_av_window; + double bitrate_av_window_center; +};</b></pre> + </td> +</tr> +</table> + +<h3>Relevant Struct Members</h3> +<dl> + +<dt><i>management_active</i></dt> +<dd>nonzero if bitrate management is active</dd> + +<dt><i>bitrate_hard_min</i></dt> +<dd>hard lower limit (in kilobits per second) below which the stream bitrate will never be allowed for any given bitrate_hard_window seconds of time.</dd> +<dt><i>bitrate_hard_max</i></dt> +<dd>hard upper limit (in kilobits per second) above which the stream bitrate will never be allowed for any given bitrate_hard_window seconds of time.</dd> +<dt><i>bitrate_hard_window</i></dt> +<dd>the window period (in seconds) used to regulate the hard bitrate minimum and maximum</dd> + +<dt><i>bitrate_av_lo</i></dt> +<dd>soft lower limit (in kilobits per second) below which the average bitrate tracker will start nudging the bitrate higher.</dd> +<dt><i>bitrate_av_hi</i></dt> +<dd>soft upper limit (in kilobits per second) above which the average bitrate tracker will start nudging the bitrate lower.</dd> +<dt><i>bitrate_av_window</i></dt> +<dd>the window period (in seconds) used to regulate the average bitrate minimum and maximum.</dd> +<dt><i>bitrate_av_window_center</i></dt> +<dd>Regulates the relative centering of the average and hard windows; in libvorbis 1.0 and 1.0.1, the hard window regulation overlapped but followed the average window regulation. In libvorbis 1.1 a bit-reservoir interface replaces the old windowing interface; the older windowing interface is simulated and this field has no effect.</dd> + +</dl> + + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/overview.html b/vorbis/doc/vorbisenc/overview.html new file mode 100644 index 0000000..51af7b5 --- /dev/null +++ b/vorbis/doc/vorbisenc/overview.html @@ -0,0 +1,382 @@ +<html> + +<head> +<title>libvorbisenc - API Overview</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>Libvorbisenc API Overview</h1> + +<p>Libvorbisenc is an encoding convenience library intended to +encapsulate the elaborate setup that libvorbis requires for encoding. +Libvorbisenc gives easy access to all high-level adjustments an +application may require when encoding and also exposes some low-level +tuning parameters to allow applications to make detailed adjustments +to the encoding process. <p> + +All the <b>libvorbisenc</b> routines are declared in "vorbis/vorbisenc.h". + +<em>Note: libvorbis and libvorbisenc always +encode in a single pass. Thus, all possible encoding setups will work +properly with live input and produce streams that decode properly when +streamed. See the subsection titled <a href="#BBR">"managed bitrate +modes"</a> for details on setting limits on bitrate usage when Vorbis +streams are used in a limited-bandwidth environment.</em> + +<h2>workflow</h2> + +<p>Libvorbisenc is used only during encoder setup; its function +is to automate initialization of a multitude of settings in a +<tt>vorbis_info</tt> structure which libvorbis then uses as a reference +during the encoding process. Libvorbisenc plays no part in the +encoding process after setup. + +<p>Encode setup using libvorbisenc consists of three steps: + +<ol> +<li>high-level initialization of a <tt>vorbis_info</tt> structure by +calling one of <a +href="vorbis_encode_setup_vbr.html">vorbis_encode_setup_vbr()</a> or <a +href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a> +with the basic input audio parameters (rate and channels) and the +basic desired encoded audio output parameters (VBR quality or ABR/CBR +bitrate)<p> + +<li>optional adjustment of the basic setup defaults using <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a><p> + +<li>calling <a +href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a> to +finalize the high-level setup into the detailed low-level reference +values needed by libvorbis to encode audio. The <tt>vorbis_info</tt> +structure is then ready to use for encoding by libvorbis.<p> + +</ol> + +These three steps can be collapsed into a single call by using <a +href="vorbis_encode_init_vbr.html">vorbis_encode_init_vbr</a> to set up a +quality-based VBR stream or <a +href="vorbis_encode_init.html">vorbis_encode_init</a> to set up a managed +bitrate (ABR or CBR) stream.<p> + +<h2>adjustable encoding parameters</h2> + +<h3>input audio parameters</h3> + +<p> +<table border=1 color=black width=50% cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td><b>parameter</b></td> + <td><b>description</b></td> +</tr> +<tr valign=top> +<td>sampling rate</td> +<td> +The sampling rate (in samples per second) of the input audio. Common examples are 8000 for telephony, 44100 for CD audio and 48000 for DAT. Note that a mono sample (one center value) and a stereo sample (one left value and one right value) both are a single sample. + +</td> +</tr> +<tr valign=top> +<td>channels</td> +<td> + +The number of channels encoded in each input sample. By default, +stereo input modes (two channels) are 'coupled' by Vorbis 1.1 such +that the stereo relationship between the samples is taken into account +when encoding. Stereo coupling my be disabled by using <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> with <a +href="vorbis_encode_ctl.html#OV_ECTL_COUPLE_SET">OV_ECTL_COUPLE_SET</a>. + +</td> +</tr> +</table> + +<h3>quality and VBR modes</h3> + +Vorbis is natively a VBR codec; a user requests a given constant +<em>quality</em> and the encoder keeps the encoding quality constant +while allowing the bitrate to vary. 'Quality' modes (Variable BitRate) +will always produce the most consistent encoding results as well as +the highest quality for the amount of bits used. + +<p> +<table border=1 color=black width=50% cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td><b>parameter</b></td> + <td><b>description</b></td> +</tr> +<tr valign=top> +<td>quality</td> +<td> +A decimal float value requesting a desired quality. Libvorbisenc 1.1 allows quality requests in the range of -0.1 (lowest quality, smallest files) through +1.0 (highest-quality, largest files). Quality -0.1 is intended as an ultra-low setting in which low bitrate is much more important than quality consistency. Quality settings 0.0 and above are intended to produce consistent results at all times. + +</td> +</tr> +</table> + +<a name="BBR"> +<h3>managed bitrate modes</h3> + +Although the Vorbis codec is natively VBR, libvorbis includes +infrastructure for 'managing' the bitrate of streams by setting +minimum and maximum usage constraints, as well as functionality for +nudging a stream toward a desired average value. These features +should <em>only</em> be used when there is a requirement to limit +bitrate in some way. Although the difference is usually slight, +managed bitrate modes will always produce output inferior to VBR +(given equal bitrate usage). Setting overly or impossibly tight +bitrate management requirements can affect output quality dramatically +for the worse.<p> + +Beginning in libvorbis 1.1, bitrate management is implemented using a +<em>bit-reservoir</em> algorithm. The encoder has a fixed-size +reservoir used as a 'savings account' in encoding. When a frame is +smaller than the target rate, the unused bits go into the reservoir so +that they may be used by future frames. When a frame is larger than +target bitrate, it draws 'banked' bits out of the reservoir. Encoding +is managed so that the reservoir never goes negative (when a maximum +bitrate is specified) or fills beyond a fixed limit (when a minimum +bitrate is specified). An 'average bitrate' request is used as the +set-point in a long-range bitrate tracker which adjusts the encoder's +aggressiveness up or down depending on whether or not frames are coming +in larger or smaller than the requested average point. + +<p> +<table border=1 color=black width=50% cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td><b>parameter</b></td> + <td><b>description</b></td> +</tr> +<tr valign=top> +<td>maximum bitrate</td> <td> The maximum allowed bitrate, set in bits +per second. If the bitrate would otherwise rise such that oversized +frames would underflow the bit-reservoir by consuming banked bits, +bitrate management will force the encoder to use fewer bits per frame +by encoding with a more aggressive psychoacoustic model.<p> This +setting is a hard limit; the bitstream will never be allowed, under +any circumstances, to increase above the specified bitrate over the +average period set by the reservoir; it may momentarily rise over if +inspected on a granularity much finer than the average period across +the reservoir. Normally, the encoder will conserve bits gracefully by +using more aggressive psychoacoustics to shrink a frame when forced +to. However, if the encoder runs out of means of gracefully shrinking +a frame, it will simply take the smallest frame it can otherwise +generate and truncate it to the maximum allowed length. Note that +this is not an error and although it will obviously adversely affect +audio quality, a Vorbis decoder will be able to decode a truncated +frame into audio. + +</td> +</tr> + +<tr valign=top> +<td>average bitrate</td> + +<td> + +The average desired bitrate of a stream, set +in bits per second. Average bitrate is tracked via a reservoir like +minimum and maximum bitrate, however the averaging reservior does not +impose a hard limit; it is used to nudge the bitrate toward the +desired average by slowly adjusting the psychoacoustic aggressiveness. +As such, the reservoir size does not affect the average bitrate +behavior. Because this setting alone is not used to impose hard +bitrate limits, the bitrate of a stream produced using only the +<tt>average bitrate</tt> constraint will track the average over time +but not necessarily adhere strictly to that average for any given +period. Should a strict localized average be required, <tt>average +bitrate</tt> should be used along with <tt>minimum bitrate</tt> and +<tt>maximum bitrate</tt>. +</td> + +</tr> + +<tr valign=top> +<td>minimum bitrate</td> +<td> + The minimum allowed bitrate, set in bits per second. If +the bitrate would otherwise fall such that undersized frames would +overflow the bit-reservoir with unused bits, bitrate management will +force the encoder to use more bits per frame by encoding with a less +aggressive psychoacoustic model.<p> This setting is a hard limit; the +bitstream will never be allowed, under any circumstances, to drop +below the specified bitrate over the average period set by the +reservoir; it may momentarily fall under if inspected on a granularity +much finer than the average period across the reservoir. Normally, +the encoder will fill out undersided frames with additional useful +coding information by increasing the perceived quality of the stream. +If the encoder runs out of useful ways to consume more bits, it will +pad frames out with zeroes. +</td> +</tr> + +<tr valign=top> +<td>reservoir size</td> <td> The size of the minimum/maximum bitrate +tracking reservoir, set in bits. The reservoir is used as a 'bit +bank' to average out localized surges and dips in bitrate while +providing predictable, guaranteed buffering behavior for streams to be +used in situations with constrained transport bandwidth. The default +setting is two seconds of average bitrate.<p> + +When a single frame is larger than the maximum allowed overall +bitrate, the bits are 'borrowed' from the bitrate reservoir; if the +reservoir contains insufficient bits to cover the defecit, the encoder +must find some way to reduce the frame size. <p> + +When a frame is under the minimum limit, the surplus bits are placed +into the reservoir, banking them for future use. If the reservoir is +already full of banked bits, the encoder is forced to find some way to +make the frame larger.<p> + +If the frame size is between the minimum and maximum rates (thus +implying the minimum and maximum allowed rates are different), the +reservoir gravitates toward a fill point configured by the +<tt>reservoir bias</tt> setting described next. If the reservoir is +fuller than the fill point (a 'surplus of surplus'), the encoder will +consume a number bits from the reservoir equal to the number of the +bits by which the frame exceeds minimum size. If the reservoir is +emptier than the fillpoint (a 'surplus of defecit'), bits are returned +to the reservoir equaling the current frame's number of bits under the +maximum frame size. The idea of the fill point is to buffer against +both underruns and overruns, by trying to hold the reservoir to a +middle course. +</td> +</tr> + +<tr valign=top> +<td>reservoir bias</td> + +<td> + +Reservoir bias is a setting between 0.0 and 1.0 that biases bitrate +management toward smoothing bitrate spikes (0.0) or bitrate peaks +(1.0); the default setting is 0.1.<p> + +Using settings toward 0.0 causes the bitrate manager to hoard bits in +the bit reservoir such that there is a large pool of banked surplus to +draw upon during short spikes in bitrate. As a result, the encoder +will react less aggressively and less drastically to curtail framesize +during brief surges in bitrate.<p> + +Using settings toward 1.0 causes the bitrate manager to empty the bit +reservoir such that there is a large buffer available to store surplus +bits during sudden drops in bitrate. As a result, the encoder will +react less aggressively and less drastically to support minimum frame +sizes during drops in bitrate and will tend not to store any extra +bits in the reservoir for future bitrate spikes.<p> + +</td> +</tr> + +<tr valign=top> +<td>average track damping</td> +<td> + +A decimal value, in seconds, that controls how quickly the average +bitrate tracker is allowed to slew from enforcing minimum frame sizes +to maximum framesizes and vice versa. Default value is 1.5 +seconds.<p> + +When the 'average bitrate' setting is in use, the average bitrate +tracker uses an unbounded reservoir to track overall bitrate-to-date +in the stream. When bitrates are too low, the tracker will try to +nudge bitrates up and when the bitrate is too high, nudge it down. +The damping value regulates the maximum strength of the nudge; it +describes, in seconds, how quickly the tracker may transition from an +extreme nudge in one direction to an extreme nudge in the other.<p> + +</td> +</tr> + +</table> + +<h3>encoding model adjustments</h3> + +The <a href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> call provides +a generalized interface for making encoding setup adjustments to the +basic high-level setup provided by <a +href="vorbis_encode_setup_vbr.html">vorbis_encode_setup_vbr()</a> or <a +href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a>. +In reality, these two calls use <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> internally, and <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> can be used to adjust +most of the parameters set by other calls.<p> + +In Vorbis 1.1, <a href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> can +adjust the following additional parameters not described elsewhere: + +<p> +<table border=1 color=black width=50% cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td><b>parameter</b></td> + <td><b>description</b></td> +</tr> +<tr valign=top> +<td>management mode</td> <td> Configures whether or not bitrate +management is in use or not. Normally, this value is set implicitly +during encoding setup; however, the supported means of selecting a +quality mode by bitrate (that is, requesting a true VBR stream, but +doing so by asking for an approximate bitrate) is to use <a +href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a> +and then to explicitly turn off bitrate management by calling <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> with <a +href="vorbis_encode_ctl.html#OV_ECTL_RATEMANAGE2_SET">OV_ECTL_RATEMANAGE2_SET</a> +</td> +</tr> + +<tr valign=top> +<td>coupling</td> <td> Stereo encoding (and in the future, surround +encodings) are normally encoded assuming the channels form a stereo +image and that lossy-stereo modelling is appropriate; this is called +'coupling'. Stereo coupling may be explicitly enabled or disabled. +</td> +</tr> +<tr valign=top> +<td>lowpass</td> <td> Sets the hard lowpass of a given encoding mode; +this may be used to conserve a few bits in high-rate audio that has +limited bandwidth, or in testing of the encoder's acoustic model. The +encoder is generally already configured with ideal lowpasses (if any +at all) for given modes; use of this parameter is strongly discouraged +if the point is to try to 'improve' a given encoding mode for general +encoding. +</td> +</tr> + +<tr valign=top> +<td>impulse coding aggressiveness</td> <td>By default, libvorbis +attempts to compromise between preventing wide bitrate swings and +high-resolution impulse coding (which is required for the crispest +possible attacks, but also requires a relatively large momentary +bitrate increase). This parameter allows an application to tune the +compromise or eliminate it; A value of 0.0 indicates normal behavior +while a value of -15.0 requests maximum possible impulse +resolution.</td> +</tr> + +</table> + + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +</body> + +</html> + diff --git a/vorbis/doc/vorbisenc/reference.html b/vorbis/doc/vorbisenc/reference.html new file mode 100644 index 0000000..59d6432 --- /dev/null +++ b/vorbis/doc/vorbisenc/reference.html @@ -0,0 +1,54 @@ +<html> + +<head> +<title>Vorbisfile API Reference</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>vorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>Vorbisenc API Reference</h1> + +<h2>Data Structures</h2> + +<p> +<a href="../libvorbis/vorbis_info.html">vorbis_info</a> (from <a href="../libvorbis/index.html">libvorbis</a>)<br> +<a href="ovectl_ratemanage_arg.html">ovectl_ratemanage_arg</a><br> +<a href="ovectl_ratemanage2_arg.html">ovectl_ratemanage2_arg</a><br> +</p> + +<h2>Encoder Setup</h2> + +<p> +<a href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a><br> +<a href="vorbis_encode_init.html">vorbis_encode_init()</a><br> +<a href="vorbis_encode_init_vbr.html">vorbis_encode_init_vbr()</a><br> +<a href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a><br> +<a href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a><br> +<a href="vorbis_encode_setup_vbr.html">vorbis_encode_setup_vbr()</a><br> +</p> + +<p>The actual encoding is done using the <a href="../libvorbis/index.html">libvorbis API</a>.</p> + +<br> +<br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/style.css b/vorbis/doc/vorbisenc/style.css new file mode 100644 index 0000000..81cf417 --- /dev/null +++ b/vorbis/doc/vorbisenc/style.css @@ -0,0 +1,7 @@ +BODY { font-family: Helvetica, sans-serif } +TD { font-family: Helvetica, sans-serif } +P { font-family: Helvetica, sans-serif } +H1 { font-family: Helvetica, sans-serif } +H2 { font-family: Helvetica, sans-serif } +H4 { font-family: Helvetica, sans-serif } +P.tiny { font-size: 8pt } diff --git a/vorbis/doc/vorbisenc/vorbis_encode_ctl.html b/vorbis/doc/vorbisenc/vorbis_encode_ctl.html new file mode 100644 index 0000000..13de574 --- /dev/null +++ b/vorbis/doc/vorbisenc/vorbis_encode_ctl.html @@ -0,0 +1,183 @@ +<html> + +<head> +<title>libvorbisenc - function - vorbis_encode_ctl</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>vorbis_encode_ctl</h1> + +<p><i>declared in "vorbis/vorbisenc.h";</i></p> + +<p>This function implements a generic interface to miscellaneous +encoder settings similar to the clasasic UNIX 'ioctl()' system call. +Applications may use vorbis_encode_ctl() to query or set bitrate +management or quality mode details by using one of several +<i>request</i> arguments detailed below. Vorbis_encode_ctl() must be +called after one of <a +href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a> +or <a +href="vorbis_encode_setup_vbr.html">vorbis_encode_setup_vbr()</a>. +When used to modify settings, vorbis_encode_ctl() must be called +before <a +href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a>. + +<p> +<br><br> +<table border=0 color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td> +<pre><b> +extern int vorbis_encode_ctl(vorbis_info *vi,int request,void *arg); + +</b></pre> + </td> +</tr> +</table> + +<h3>Parameters</h3> +<dl> +<dt><i>vi</i></dt> +<dd>Pointer to an initialized <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct.</dd><p> +<dt><i>request</i></dt> +<dd>Specifies the desired action; possible request fields are detailed below.</dd><p> +<dt><i>arg</i></dt> +<dd>void * pointing to a data structure matching the request argument.</dd><p> +</dl><p> + +<h3>Requests</h3> +<dl> + +<dt><i>OV_ECTL_RATEMANAGE2_GET</i></dt> + +<dd><b>Argument: <a href="ovectl_ratemanage2_arg.html">struct +ovectl_ratemanage2_arg *</a></b><br> Used to query the current +encoder bitrate management setting. Also used to initialize fields of +an ovectl_ratemanage2_arg structure for use with +OV_ECTL_RATEMANAGE2_SET.</dd><p> + +<dt><i>OV_ECTL_RATEMANAGE2_SET</i></dt> +<dd><b>Argument: <a href="ovectl_ratemanage2_arg.html">struct +ovectl_ratemanage2_arg *</a></b><br> Used to set the current +encoder bitrate management settings to the values listed in the +ovectl_ratemanage2_arg. Passing a NULL pointer will disable bitrate +management. +</dd><p> + +<dt><i>OV_ECTL_LOWPASS_GET</i></dt> +<dd><b>Argument: double *</b><br> Returns the current encoder hard-lowpass +setting (kHz) in the double pointed to by arg. +</dd><p> + +<dt><i>OV_ECTL_LOWPASS_SET</i></dt> +<dd><b>Argument: double *</b><br> Sets the encoder hard-lowpass to the value +(kHz) pointed to by arg. Valid lowpass settings range from 2 to 99. +</dd><p> + +<dt><i>OV_ECTL_IBLOCK_GET</i></dt> +<dd><b>Argument: double *</b><br> Returns the current encoder impulse +block setting in the double pointed to by arg.</dd><p> + +<dt><i>OV_ECTL_IBLOCK_SET</i></dt> <dd><b>Argument: double *</b><br> Sets +the impulse block bias to the the value pointed to by arg; valid range +is -15.0 to 0.0 [default]. A negative impulse block bias will direct +to encoder to use more bits when incoding short blocks that contain +strong impulses, thus improving the accuracy of impulse encoding.</dd><p> + +<dt><i>OV_ECTL_COUPLING_GET</i></dt> +<dd><b>Argument: int *</b><br> +Returns the current encoder coupling enabled/disabled +setting in the int pointed to by arg. +</dd><p> + +<dt><i>OV_ECTL_COUPLING_SET</i></dt> +<dd><b>Argument: int *</b><br> +Enables/disables channel coupling in multichannel encoding according to arg. +*arg of zero disables all channel coupling, nonzero allows the encoder to use +coupling if a coupled mode is available for the input. At present, coupling +is available for stereo and 5.1 input modes. +</dd><p> + +<dt><i>OV_ECTL_RATEMANAGE_GET [deprecated]</i></dt> +<dd> + +<b>Argument: <a href="ovectl_ratemanage_arg.html">struct +ovectl_ratemanage_arg *</a></b><br> Old interface to querying bitrate +management settings; deprecated after move to bit-reservoir style +management in 1.1 rendered this interface partially obsolete. Please +use OV_ECTL_RATEMANGE2_GET instead. + +</dd><p> + +<dt><i>OV_ECTL_RATEMANAGE_SET [deprecated]</i></dt> +<dd> +<b>Argument: <a href="ovectl_ratemanage_arg.html">struct +ovectl_ratemanage_arg *</a></b><br> Old interface to modifying bitrate +management settings; deprecated after move to bit-reservoir style +management in 1.1 rendered this interface partially obsolete. Please +use OV_ECTL_RATEMANGE2_SET instead. +</dd><p> + +<dt><i>OV_ECTL_RATEMANAGE_AVG [deprecated]</i></dt> +<dd> +<b>Argument: <a href="ovectl_ratemanage_arg.html">struct +ovectl_ratemanage_arg *</a></b><br> Old interface to setting +average-bitrate encoding mode; deprecated after move to bit-reservoir +style management in 1.1 rendered this interface partially obsolete. +Please use OV_ECTL_RATEMANGE2_SET instead. +</dd><p> + +<dt><i>OV_ECTL_RATEMANAGE_HARD [deprecated]</i></dt> +<dd> +<b>Argument: <a href="ovectl_ratemanage_arg.html">struct +ovectl_ratemanage_arg *</a></b><br> Old interface to setting +bounded-bitrate encoding modes; deprecated after move to bit-reservoir +style management in 1.1 rendered this interface partially obsolete. +Please use OV_ECTL_RATEMANGE2_SET instead. +</dd><p> + + +</dl> + + +<h3>Return Values</h3> vorbis_encode_ctl() returns zero on success, +placing any further return information (such as the result of a query) +into the storage pointed to by <i>*arg</i>. On error, +vorbis_encode_ctl() may return one of the following error codes: + +<dl> + +<dt>OV_EINVAL</dt><dd>Invalid argument, or an attempt to modify a +setting after calling <a +href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a>.</dd><p> + +<dt>OV_EIMPL</dt><dd>Unimplemented or unknown request</dd><p> + +</dl> + +<p> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/vorbis_encode_init.html b/vorbis/doc/vorbisenc/vorbis_encode_init.html new file mode 100644 index 0000000..d371899 --- /dev/null +++ b/vorbis/doc/vorbisenc/vorbis_encode_init.html @@ -0,0 +1,88 @@ +<html> + +<head> +<title>libvorbisenc - function - vorbis_encode_init</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>vorbis_encode_init</h1> + +<p><i>declared in "vorbis/vorbisenc.h";</i></p> + +<p>This is the primary function within libvorbisenc for setting up managed bitrate modes. +<p>Before this function is called, the <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct should be initialized by using vorbis_info_init() from the libvorbis API. After encoding, vorbis_info_clear should be called. +<p>The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set constraints for the encoded file. This function uses these settings to select the appropriate encoding mode and set it up. +<p> +<br><br> +<table border=0 color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td> +<pre><b> +extern int vorbis_encode_init(<a href="../libvorbis/vorbis_info.html">vorbis_info</a> *vi, + long channels, + long rate, + + long max_bitrate, + long nominal_bitrate, + long min_bitrate); + +</b></pre> + </td> +</tr> +</table> + +<h3>Parameters</h3> +<dl> +<dt><i>vi</i></dt> +<dd>Pointer to an initialized <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct.</dd> +<dt><i>channels</i></dt> +<dd>The number of channels to be encoded.</dd> +<dt><i>rate</i></dt> +<dd>The sampling rate of the source audio.</dd> +<dt><i>max_bitrate</i></dt> +<dd>Desired maximum bitrate (limit). -1 indicates unset.</dd> +<dt><i>nominal_bitrate</i></dt> +<dd>Desired average, or central, bitrate. -1 indicates unset.</dd> +<dt><i>min_bitrate</i></dt> +<dd>Desired minimum bitrate. -1 indicates unset.</dd> +</dl> + + +<h3>Return Values</h3> +<blockquote> +<li> +0 for success</li> + +<li>less than zero for failure:</li> +<ul> +<li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li> +<li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li> +<li>OV_EIMPL - Unimplemented mode; unable to comply with bitrate request.</li> +</ul> +</blockquote> +<p> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/vorbis_encode_init_vbr.html b/vorbis/doc/vorbisenc/vorbis_encode_init_vbr.html new file mode 100644 index 0000000..800d257 --- /dev/null +++ b/vorbis/doc/vorbisenc/vorbis_encode_init_vbr.html @@ -0,0 +1,81 @@ +<html> + +<head> +<title>libvorbisenc - function - vorbis_encode_init_vbr</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>vorbis_encode_init_vbr</h1> + +<p><i>declared in "vorbis/vorbisenc.h";</i></p> + +<p>This is the primary function within libvorbisenc for setting up variable bitrate ("quality" based) modes. +<p>Before this function is called, the <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct should be initialized by using vorbis_info_init() from the libvorbis API. After encoding, vorbis_info_clear should be called. +<p> +<br><br> +<table border=0 color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td> +<pre><b> +extern int vorbis_encode_init_vbr(<a href="../libvorbis/vorbis_info.html">vorbis_info</a> *vi, + long channels, + long rate, + + float base_quality); + +</b></pre> + </td> +</tr> +</table> + +<h3>Parameters</h3> +<dl> +<dt><i>vi</i></dt> +<dd>Pointer to an initialized <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct.</dd> +<dt><i>channels</i></dt> +<dd>The number of channels to be encoded.</dd> +<dt><i>rate</i></dt> +<dd>The sampling rate of the source audio.</dd> +<dt><i>base_quality</i></dt> +<dd>Desired quality level, currently from -0.1 to 1.0 (lo to hi).</dd> +</dl> + + +<h3>Return Values</h3> +<blockquote> +<li> +0 for success</li> + +<li>less than zero for failure:</li> +<ul> +<li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li> +<li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li> +<li>OV_EIMPL - Unimplemented mode; unable to comply with quality level request.</li> +</ul> +</blockquote> +<p> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/vorbis_encode_setup_init.html b/vorbis/doc/vorbisenc/vorbis_encode_setup_init.html new file mode 100644 index 0000000..aa2c904 --- /dev/null +++ b/vorbis/doc/vorbisenc/vorbis_encode_setup_init.html @@ -0,0 +1,88 @@ +<html> + +<head> +<title>libvorbisenc - function - vorbis_encode_setup_init</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>vorbis_encode_setup_init</h1> + +<p><i>declared in "vorbis/vorbisenc.h";</i></p> + +<p>This function performs the last stage of three-step encoding setup, as described in the API overview under <a href="overview.html#BBR">managed bitrate modes</a>. + +<p>Before this function is called, the <a +href="../libvorbis/vorbis_info.html">vorbis_info</a> struct should be initialized +by using vorbis_info_init() from the libvorbis API, one of <a +href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a> +or <a +href="vorbis_encode_setup_vbr.html">vorbis_encode_setup_vbr()</a> +called to initialize the high-level encoding setup, and <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> called if +necessary to make encoding setup changes. vorbis_encode_setup_init() +finalizes the highlevel encoding structure into a complete encoding +setup after which the application may make no further setup changes.<p> + +After encoding, vorbis_info_clear should be called. +<p> +<br><br> +<table border=0 color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td> +<pre><b> +extern int vorbis_encode_setup_init(<a href="../libvorbis/vorbis_info.html">vorbis_info</a> *vi); + +</b></pre> + </td> +</tr> +</table> + +<h3>Parameters</h3> +<dl> +<dt><i>vi</i></dt> +<dd>Pointer to an initialized <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct.</dd> +</dl> + + +<h3>Return Values</h3> +<blockquote> +<li> +0 for success</li> + +<li>less than zero for failure:</li> +<ul> +<li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li> +<li>OV_EINVAL - Attempt to use vorbis_encode_setup_init() without first calling one of <a +href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a> +or <a +href="vorbis_encode_setup_vbr.html">vorbis_encode_setup_vbr()</a> +to initialize the high-level encoding setup +</li> +</ul> +</blockquote> +<p> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/vorbis_encode_setup_managed.html b/vorbis/doc/vorbisenc/vorbis_encode_setup_managed.html new file mode 100644 index 0000000..0389dde --- /dev/null +++ b/vorbis/doc/vorbisenc/vorbis_encode_setup_managed.html @@ -0,0 +1,102 @@ +<html> + +<head> +<title>libvorbisenc - function - vorbis_encode_setup_managed</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>vorbis_encode_setup_managed</h1> + +<p><i>declared in "vorbis/vorbisenc.h";</i></p> + +<p>This function performs step-one of a three-step bitrate-managed +encode setup. It functions similarly to the one-step setup performed +by <a href="vorbis_encode_init.html">vorbis_encode_init()</a> but +allows an application to make further encode setup tweaks using <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> before finally +calling <a +href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a> to +complete the setup process. + +<p>Before this function is called, the <a +href="../libvorbis/vorbis_info.html">vorbis_info</a> struct should be initialized +by using vorbis_info_init() from the libvorbis API. After encoding, +vorbis_info_clear should be called. + +<p>The max_bitrate, nominal_bitrate, and min_bitrate settings are used +to set constraints for the encoded file. This function uses these +settings to select the appropriate encoding mode and set it up. +<p> +<br><br> +<table border=0 color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td> +<pre><b> +extern int vorbis_encode_init(<a href="../libvorbis/vorbis_info.html">vorbis_info</a> *vi, + long channels, + long rate, + + long max_bitrate, + long nominal_bitrate, + long min_bitrate); + +</b></pre> + </td> +</tr> +</table> + +<h3>Parameters</h3> +<dl> +<dt><i>vi</i></dt> +<dd>Pointer to an initialized <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct.</dd> +<dt><i>channels</i></dt> +<dd>The number of channels to be encoded.</dd> +<dt><i>rate</i></dt> +<dd>The sampling rate of the source audio.</dd> +<dt><i>max_bitrate</i></dt> +<dd>Desired maximum bitrate (limit). -1 indicates unset.</dd> +<dt><i>nominal_bitrate</i></dt> +<dd>Desired average, or central, bitrate. -1 indicates unset.</dd> +<dt><i>min_bitrate</i></dt> +<dd>Desired minimum bitrate. -1 indicates unset.</dd> +</dl> + + +<h3>Return Values</h3> +<blockquote> +<li> +0 for success</li> + +<li>less than zero for failure:</li> +<ul> +<li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li> +<li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li> +<li>OV_EIMPL - Unimplemented mode; unable to comply with bitrate request.</li> +</ul> +</blockquote> +<p> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + + +</body> + +</html> diff --git a/vorbis/doc/vorbisenc/vorbis_encode_setup_vbr.html b/vorbis/doc/vorbisenc/vorbis_encode_setup_vbr.html new file mode 100644 index 0000000..e390edf --- /dev/null +++ b/vorbis/doc/vorbisenc/vorbis_encode_setup_vbr.html @@ -0,0 +1,90 @@ +<html> + +<head> +<title>libvorbisenc - function - vorbis_encode_setup_vbr</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>vorbis_encode_setup_vbr</h1> + +<p><i>declared in "vorbis/vorbisenc.h";</i></p> + +<p>This function performs step-one of a three-step variable bitrate +(quality-based) encode setup. It functions similarly to the one-step +setup performed by <a +href="vorbis_encode_init_vbr.html">vorbis_encode_init_vbr()</a> but +allows an application to make further encode setup tweaks using <a +href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> before finally +calling <a +href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a> to +complete the setup process. + +<p>Before this function is called, the <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct should be initialized by using vorbis_info_init() from the libvorbis API. After encoding, vorbis_info_clear should be called. +<p> +<br><br> +<table border=0 color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc> + <td> +<pre><b> +extern int vorbis_encode_init_vbr(<a href="../libvorbis/vorbis_info.html">vorbis_info</a> *vi, + long channels, + long rate, + + float base_quality); + +</b></pre> + </td> +</tr> +</table> + +<h3>Parameters</h3> +<dl> +<dt><i>vi</i></dt> +<dd>Pointer to an initialized <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct.</dd> +<dt><i>channels</i></dt> +<dd>The number of channels to be encoded.</dd> +<dt><i>rate</i></dt> +<dd>The sampling rate of the source audio.</dd> +<dt><i>base_quality</i></dt> +<dd>Desired quality level, currently from -0.1 to 1.0 (lo to hi).</dd> +</dl> + + +<h3>Return Values</h3> +<blockquote> +<li> +0 for success</li> + +<li>less than zero for failure:</li> +<ul> +<li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li> +<li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li> +<li>OV_EIMPL - Unimplemented mode; unable to comply with quality level request.</li> +</ul> +</blockquote> +<p> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + + +</body> + +</html> |