Ana səhifə

Contents Page


Yüklə 2.59 Mb.
səhifə4/35
tarix25.06.2016
ölçüsü2.59 Mb.
1   2   3   4   5   6   7   8   9   ...   35

4 Abbreviations and symbols


The mathematical operators used to describe this specification are similar to those used in the C programming language. However, integer divisions with truncation and rounding are specifically defined. Numbering and counting loops generally begin from zero.

4.1 Arithmetic operators


+ Addition.

- Subtraction (as a binary operator) or negation (as a unary operator).

++ Increment. i.e. x++ is equivalent to x = x + 1

- - Decrement. i.e. x++ is equivalent to x = x - 1



Multiplication.

^ Power.


/ Integer division with truncation of the result toward zero. 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 zero unless otherwise specified. For example 3//2 is rounded to 2, and -3//2 is rounded to -2.

DIV Integer division with truncation of the result toward minus infinity. For example 3 DIV 2 is rounded to 1, and -3 DIV 2 is rounded to -2.

÷ Used to denote division in mathematical equations where no truncation or rounding is intended.

% Modulus operator. Defined only for positive numbers.

Sign( )

Abs( )

The summation of the f(i) with i taking integral values from a up to, but not including b.

4.2 Logical operators


|| Logical OR.

&& Logical AND.

! Logical NOT.

4.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.

4.4 Bitwise operators


& AND

| OR


>> Shift right with sign extension.

<< Shift left with zero fill.

4.5 Assignment


= Assignment operator.

4.6 Mnemonics


The following mnemonics are defined to describe the different data types used in the coded bitstream.

bslbf Bit string, left bit first, where “left” is the order in which bit strings are written in this specification. Bit strings are generally 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. For convenience large strings are occasionally written in hexadecimal, in this case conversion to a binary in the conventional manner will yield the value of the bit string. Thus the left most hexadecimal digit is first and in each hexadecimal digit the most significant of the four bits is first.

uimsbf Unsigned integer, most significant bit first.

simsbf Signed integer, in twos complement format, most significant (sign) bit first.

vlclbf Variable length code, left bit first, where “left” refers to the order in which the VLC codes are written. The byte order of multibyte words is most significant byte first.

4.7 Constants


π 3,141 592 653 58

e 2,718 281 828 45

5 Conventions

5.1 Method of describing bitstream syntax


The bitstream retrieved by the decoder is described in 6.2. Each data item in the bitstream 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 bitstream 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 6.3. The following constructs are used to express the conditions when data elements are present, and are in normal type:



while ( condition ) {

If the condition is true, then the group of data elements

data_element

occurs next in the data stream. This repeats until the

. . .

condition is not true.

}




do {




data_element

The data element always occurs at least once.

. . .




} while ( condition )

The data element is repeated until the condition is not true.

if ( condition ) {

If the condition is true, then the first group of data

data_element

elements occurs next in the data stream.

. . .






}




for ( i = m; i < n; i++) {

The group of data elements occurs (m-n) times. Conditional

data_element

constructs within the group of data elements may depend

}


m for the first occurrence, incremented by one for




the second occurrence, and so forth.

/* comment */

Explanatory comment that may be deleted entirely without




in any way altering the syntax.

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 and a variable or expression evaluating to a zero value is equivalent to a condition that is false. In many cases a literal string is used in a condition. For example;

if ( scalable_mode == “spatial scalability” )

In such cases the literal string is that used to describe the value of the bitstream element in 6.3. In this example, we see that “spatial scalability” is defined in Table 6-10 to be represented by the two bit binary number ‘01’.

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 [n] data_element [n] is the n+1th element of an array of data.

data_element [m][n] data_element [m][n] is the m+1, n+1th element of a two-dimensional array of data.

data_element [l][m][n] data_element [l][m][n] is the l+1, m+1, n+1th element of a three-dimensional array of data.

While the syntax is expressed in procedural terms, it should not be assumed that 6.2 implements a satisfactory decoding procedure. In particular, it defines a correct and error-free input bitstream. Actual decoders must include means to look for start codes 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 standardised.


1   2   3   4   5   6   7   8   9   ...   35


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