Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/doc/libvorbis-devel-1.1.0/ drwxr-xr-x |
Viewing file: Select action/file-type: ![]() ![]()
Ogg Vorbis I format specification: helper equationsLast update to this document: October 15, 2002
OverviewThe equations below are used in multiple places by the Vorbis codec specification. Rather than cluttering up the main specification documents, they are defined here and linked in the main documents where appropriate.
1) [return_value] = 0; 2) if ( [x] is greater than zero ){ 3) increment [return_value]; 4) logical shift [x] one bit to the right, padding the MSb with zero 5) repeat at step 2) } 6) doneExamples:
float32_unpack"float32_unpack(x)" is intended to translate the packed binary representation of a Vorbis codebook float value into the representation used by the decoder for floating point numbers. For purposes of this example, we will unpack a Vorbis float32 into a host-native floating point number.
1) [mantissa] = [x] bitwise AND 0x1fffff (unsigned result) 2) [sign] = [x] bitwise AND 0x80000000 (unsigned result) 3) [exponent] = ( [x] bitwise AND 0x7fe00000) shifted right 21 bits (unsigned result) 4) if ( [sign] is nonzero ) then negate [mantissa] 5) return [mantissa] * ( 2 ^ ( [exponent] - 788 ) ) lookup1_values"lookup1_values(codebook_entries,codebook_dimensions)" is used to compute the correct length of the value index for a codebook VQ lookup table of lookup type 1. The values on this list are permuted to construct the VQ vector lookup table of size [codebook_entries].
The return value for this function is defined to be 'the greatest
integer value for which [return_value] to the power of
[codebook_dimensions] is less than or equal to
[codebook_entries]'.
1) [dy] = [y1] - [y0] 2) [adx] = [x1] - [x0] 3) [ady] = absolute value of [dy] 4) [err] = [ady] * ([X] - [x0]) 5) [off] = [err] / [adx] using integer division 6) if ( [dy] is less than zero ) { 7) [Y] = [y0] - [off] } else { 8) [Y] = [y0] + [off] } 9) done render_lineFloor decode type one uses the integer line drawing algorithm of "render_line(x0, y0, x1, y1, v)" to construct an integer floor curve for contiguous piecewise line segments. Note that it has not been relevant elsewhere, but here we must define integer division as rounding division of both positive and negative numbers toward zero.1) [dy] = [y1] - [y0] 2) [adx] = [x1] - [x0] 3) [ady] = absolute value of [dy] 4) [base] = [dy] / [adx] using integer division 5) [x] = [x0] 6) [y] = [y0] 7) [err] = 0 8) if ( [dy] is less than 0 ) { 9) [sy] = [base] - 1 } else { 10) [sy] = [base] + 1 } 11) [ady] = [ady] - (absolute value of [base]) * [adx] 12) vector [v] element [x] = [y] 13) iterate [x] over the range [x0]+1 ... [x1]-1 { 14) [err] = [err] + [ady]; 15) if ( [err] >= [adx] ) { 15) [err] = [err] - [adx] 16) [y] = [y] + [sy] } else { 17) [y] = [y] + [base] } 18) vector [v] element [x] = [y] } ![]() Ogg Vorbis is the first Ogg audio CODEC. Anyone may freely use and distribute the Ogg and Vorbis specification, whether in a private, public or corporate capacity. However, the Xiph.org Foundation and the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis specification and certify specification compliance. Xiph.org's Vorbis software CODEC implementation is distributed under a BSD-like license. This does not restrict third parties from distributing independent implementations of Vorbis software under other licenses. Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm) of the Xiph.org Foundation. These pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights reserved.
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0029 ]-- |