Ana səhifə

International organisation for standardisation organisation internationale de normalisation

Yüklə 1.39 Mb.
ölçüsü1.39 Mb.
1   ...   4   5   6   7   8   9   10   11   ...   23

2.2 Symbols and abbreviations

The mathematical operators used to describe this Recommendation†|†International Standard are similar to those used in the C programming language. However, integer division with truncation and rounding are specifically defined. The bitwise operators are defined assuming two's-complement representation of integers. Numbering and counting loops generally begin from 0.

2.2.1 Arithmetic operators

+ Addition.

- Subtraction (as a binary operator) or negation (as a unary operator).
++ Increment.
- - Decrement.
* or Multiplication.
^ Power.
/ Integer division with truncation of the result toward 0. For example, 7/4 and -7/-4 are truncated to 1 and -7/4 and 7/-4 are truncated to -1.
// Integer division with rounding to the nearest integer. Half-integer values are rounded away from 0 unless otherwise specified. For example 3//2 is rounded to 2, and -3//2 is rounded to
DIV Integer division with truncation of the result towards -.
% Modulus operator. Defined only for positive numbers.
Sign( ) Sign(x) = 1 x > 0

0 x == 0

-1 x < 0
NINT ( ) Nearest integer operator. Returns the nearest integer value to the real-valued argument. Half-integer values are rounded away from 0.
sin Sine.
cos Cosine.
exp Exponential.
Square root.
log10 Logarithm to base ten.
loge Logarithm to base e.

2.2.2 Logical operators

|| Logical OR.

&& Logical AND.
! Logical NOT.

2.2.3 Relational operators

Greater than.

Greater than or equal to.
Less than.
Less than or equal to.
== Equal to.
!= Not equal to.
max [,...,] the maximum value in the argument list.
min [,...,] the minimum value in the argument list.

2.2.4 Bitwise operators

& AND.
| OR.

Shift right with sign extension.
Shift left with 0 fill.

2.2.5 Assignment

= Assignment operator.

2.2.6 Mnemonics

The following mnemonics are defined to describe the different data types used in the coded bit-stream.

bslbf Bit string, left bit first, where "left" is the order in which bit strings are written in the Recommendation†|†International Standard. Bit strings are written as a string of 1s and 0s within single quote marks, e.g. '1000 0001'. Blanks within a bit string are for ease of reading and have no significance.
ch channel.
gr granule of 3 * 32 subband samples in audio Layer II, 18 * 32 sub-band samples in audio Layer III.
main_data The main_data portion of the bit stream contains the scale factors, Huffman encoded data, and ancillary information.
main_data_beg This gives the location in the bit stream of the beginning of the main_data for the frame. The location is equal to the ending location of the previous frame's main_data plus 1 bit. It is calculated from the main_data_end value of the previous frame.
part2_length this value contains the number of main_data bits used for scale factors.
rpchof remainder polynomial coefficients, highest order first.

sb subband.

scfsi scalefactor selector information.
switch_point_l Number of scalefactor band (long block scalefactor band) from which point on window switching is used.
switch_point_s Number of scalefactor band (short block scalefactor band) from which point on window switching is used.
tcimsbf two's complement integer, msb (sign) bit first.
uimsbf Unsigned integer, most significant bit first.
vlclbf Variable length code, left bit first, where "left" refers to the order in which the variable length codes are written.
window Number of actual time slot in case of block_type==2, 0 window 2.
The byte order of multi-byte words is most significant byte first.

2.2.7 Constants


e 2.71828182845

2.3 Method of describing bit stream syntax

The bit streams retrieved by the decoder are described in 2.4.1 on page 10 and 2.5.1 on page 53. Each data item in the bit stream is in bold type. It is described by its name, its length in bits, and a mnemonic for its type and order of transmission.

The action caused by a decoded data element in a bit stream depends on the value of that data element and on data elements previously decoded. The decoding of the data elements and definition of the state variables used in their decoding are described in the clauses containing the semantic description of the syntax. The following constructs are used to express the conditions when data elements are present, and are in normal type:
Note this syntax uses the "C"-code convention that a variable or expression evaluating to a non-zero value is equivalent to a condition that is true.

while ( condition ) {


. . .


If the condition is true, then the group of data elements occurs next in the data stream. This repeats until the condition is not true.

do {


. . . }

while ( condition )

The data element always occurs at least once. The data element is repeated until the condition is not true.

for (i = 0;i


. . .


The group of data elements occurs n times. Conditional constructs within the group of data elements may depend on the value of the loop control variable i, which is set to zero for the first occurrence, incremented to 1 for the second occurrence, and so forth.

As noted, the group of data elements may contain nested conditional constructs. For compactness, the {} are omitted when only one data element follows.

data_element []

data_element [] is an array of data. The number of data elements is indicated by the context.

data_element [n]

data_element [n] is the n+1th element of an array of data.

data_element [m..n]

is the inclusive range of bits between bit m and bit n in the data_element.

While the syntax is expressed in procedural terms, it should not be assumed that either Figure 2-6 on page 11 or Figure 2-7 on page 54 implements a satisfactory decoding procedure. In particular, they define a correct and error-free input bitstream. Actual decoders must include a means to look for start codes and sync bytes (Transport Stream) in order to begin decoding correctly, and to identify errors, erasures or insertions while decoding. The methods to identify these situations, and the actions to be taken, are not standardized.

1   ...   4   5   6   7   8   9   10   11   ...   23

Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur © 2016
rəhbərliyinə müraciət