1、04 翻译任务9 Parsing processInputs to this process are bits from the RBSP.Outputs of this process are syntax element values.This process is invoked when the descriptor of a syntax element in the syntax tables in subclause 7.3 is equal toue(v), me(v), se(v), te(v) (see subclause 9.1), ce(v) (see subclaus
2、e 9.2), or ae(v) (see subclause 9.3).9.1 Parsing process for Exp-Golomb codesThis process is invoked when the descriptor of a syntax element in the syntax tables in subclause 7.3 is equal toue(v), me(v), se(v), or te(v). For syntax elements in subclauses 7.3.4 and 7.3.5, this process is invoked only
3、 when entropy_coding_mode_flag is equal to0.Inputs to this process are bits from the RBSP.Outputs of this process are syntax element values.Syntax elements coded as ue(v), me(v), or se(v) are Exp-Golomb-coded. Syntax elements coded as te(v) are truncated Exp-Golomb-coded. The parsing process for the
4、se syntax elements begins with reading the bits starting at the current location in the bitstream up to and including the first non-zero bit, and counting the number of leading bits that are equal to0. This process shall be equivalent to the following:leadingZeroBits = -1;for( b = 0; !b; leadingZero
5、Bits+ ) b = read_bits( 1 )The variable codeNum is then assigned as follows:codeNum = 2leadingZeroBits 1 + read_bits( leadingZeroBits )where the value returned from read_bits( leadingZeroBits ) is interpreted as a binary representation of an unsigned integer with most significant bit written first.Ta
6、ble91 illustrates the structure of the Exp-Golomb code by separating the bit string into “prefix” and “suffix” bits. The “prefix” bits are those bits that are parsed in the above pseudo-code for the computation of leadingZeroBits, and are shown as either 0 or 1 in the bit string column of Table91. T
7、he “suffix” bits are those bits that are parsed in the computation of codeNum and are shown as xi in Table91, with i being in the range 0 to leadingZeroBits-1, inclusive. Each xi can take on values 0 or 1.Table91 Bit strings with “prefix” and “suffix” bits and assignment to codeNum ranges (informati
8、ve)Bit string formRange of codeNum 10 0 1 x01-2 0 0 1 x1 x03-6 0 0 0 1 x2 x1 x07-14 0 0 0 0 1 x3 x2 x1 x015-300 0 0 0 0 1 x4 x3 x2 x1 x031-62Table92 illustrates explicitly the assignment of bit strings to codeNum values.Table92 Exp-Golomb bit strings and codeNum in explicit form and used as ue(v) (i
9、nformative)Bit stringcodeNum100 1 010 1 120 0 1 0 030 0 1 0 140 0 1 1 050 0 1 1 160 0 0 1 0 0 070 0 0 1 0 0 180 0 0 1 0 1 09Depending on the descriptor, the value of a syntax element is derived as follows.- If the syntax element is coded as ue(v), the value of the syntax element is equal to codeNum.
10、 - Otherwise, if the syntax element is coded as se(v), the value of the syntax element is derived by invoking the mapping process for signed Exp-Golomb codes as specified in subclause 9.1.1 with codeNum as the input.- Otherwise, if the syntax element is coded as me(v), the value of the syntax elemen
11、t is derived by invoking the mapping process for coded block pattern as specified in subclause 9.1.2 with codeNum as the input.- Otherwise (the syntax element is coded as te(v), the range of the syntax element shall be determined first. The range of this syntax element may be between 0 and x, with x
12、 being greater than or equal to1 and is used in the derivation of the value of a syntax element as follows- If x is greater than1, codeNum and the value of the syntax element shall be derived in the same way as for syntax elements coded as ue(v)- Otherwise (x is equal to1), the parsing process for c
13、odeNum which is equal to the value of the syntax element is given by a process equivalent to:b = read_bits( 1 )codeNum = !b9.1.1 Mapping process for signed Exp-Golomb codesInput to this process is codeNum as specified in subclause 9.1.Output of this process is a value of a syntax element coded as se
14、(v).The syntax element is assigned to the codeNum by ordering the syntax element by its absolute value in increasing order and representing the positive value for a given absolute value with the lower codeNum. Table93 provides the assignment rule.Table93 Assignment of syntax element to codeNum for s
15、igned Exp-Golomb coded syntax elements se(v)codeNumsyntax element value00112132425363k(1)k+1 Ceil( k2 )9.1.2 Mapping process for coded block patternInput to this process is codeNum as specified in subclause 9.1.Output of this process is a value of the syntax element coded_block_pattern coded as me(v
16、).Table94 shows the assignment of coded_block_pattern to codeNum depending on whether the macroblock prediction mode is equal to Intra_4x4 or Inter. Table94 Assignment of codeNum to values of coded_block_pattern for macroblock prediction modescodeNumcoded_block_patternIntra_4x4Inter04701311621513024
17、23452786293273038759111010131211141512394713437144511154613161614173618591910312012352119372221422326442428332535342637362742402844392914330245314463281733171834182035202436241937621389263922284025234132274233294334304436224540254638384741419.2 CAVLC parsing process for transform coefficient levelsT
18、his process is invoked when parsing syntax elements with descriptor equal toce(v) in subclause 7.3.5.3.1 and when entropy_coding_mode_flag is equal to0.Inputs to this process are bits from slice data, a maximum number of non-zero transform coefficient levels maxNumCoeff, the luma block index luma4x4
19、BlkIdx or the chroma block index chroma4x4BlkIdx of the current block of transform coefficient levels.Output of this process is the list coeffLevel containing transform coefficient levels of the luma block with block index luma4x4BlkIdx or the chroma block with block index chroma4x4BlkIdx.The proces
20、s is specified in the following ordered steps:1. All transform coefficient levels, with indices from 0 to maxNumCoeff - 1, in the list coeffLevel are set equal to0.2. The total number of non-zero transform coefficient levels TotalCoeff(coeff_token) and the number of trailing one transform coefficien
21、t levels TrailingOnes(coeff_token) are derived by parsing coeff_token (see subclause 9.2.1) as follows. - If the number of non-zero transform coefficient levels TotalCoeff(coeff_token) is equal to0, the list coeffLevel containing 0 values is returned and no further step is carried out. - Otherwise,
22、the following steps are carried out.a. The non-zero transform coefficient levels are derived by parsing trailing_ones_sign_flag, level_prefix, and level_suffix (see subclause 9.2.2).b. The runs of zero transform coefficient levels before each non-zero transform coefficient level are derived by parsi
23、ng total_zeros and run_before (see subclause 9.2.3).c. The level and run information are combined into the list coeffLevel (see subclause 9.2.4).9.2.1 Parsing process for total number of transform coefficient levels and trailing onesInputs to this process are bits from slice data, a maximum number o
24、f non-zero transform coefficient levels maxNumCoeff, the luma block index luma4x4BlkIdx or the chroma block index chroma4x4BlkIdx of the current block of transform.Outputs of this process are TotalCoeff(coeff_token) and TrailingOnes(coeff_token).The syntax element coeff_token is decoded using one of
25、 the five VLCs specified in five right-most columns of Table95. Each VLC specifies both TotalCoeff(coeff_token) and TrailingOnes(coeff_token) for a given codeword coeff_token. VLC selection is dependent upon a variable nC that is derived as follows.- If the CAVLC parsing process is invoked for Chrom
26、aDCLevel, nC is set equal to1,- Otherwise, the following applies.- When the CAVLC parsing process is invoked for Intra16x16DCLevel, luma4x4BlkIdx is set equal to0.- The variables blkA and blkB are derived as follows.- If the CAVLC parsing process is invoked for Intra16x16DCLevel, Intra16x16ACLevel,
27、or LumaLevel, the process specified in subclause 6.4.7.3 is invoked with luma4x4BlkIdx as the input, and the output is assigned to mbAddrA, mbAddrB, luma4x4BlkIdxA, and luma4x4BlkIdxB. The 4x4 luma block specified by mbAddrAluma4x4BlkIdxA is assigned toblkA, and the 4x4 luma block specified by mbAdd
28、rBluma4x4BlkIdxB is assigned toblkB.- Otherwise (the CAVLC parsing process is invoked for ChromaACLevel), the process specified in subclause 6.4.7.4 is invoked with chroma4x4BlkIdx as input, and the output is assigned to mbAddrA, mbAddrB, chroma4x4BlkIdxA, and chroma4x4BlkIdxB. The 4x4 chroma block
29、specified by mbAddrAiCbCrchroma4x4BlkIdxA is assigned toblkA, and the 4x4 chroma block specified by mbAddrBiCbCrluma4x4BlkIdxB is assigned toblkB.- Let nA and nB be the number of non-zero transform coefficient levels (given by TotalCoeff(coeff_token) in the block of transform coefficient levels blkA
30、 located to the left of the current block and the block of transform coefficient levels blkB located above the current block, respectively. - With N replaced by A and B, in mbAddrN, blkN, and nN the following applies.- If any of the following conditions is true, nN is set equal to0.- mbAddrN is not available- The current macroblock is coded using an Intra prediction mode, constrained_intra_pred_flag is equal to1 and mbAddrN is coded using Inter prediction and slice data partitioning is in use (nal_unit_type is in the range of 2 to4, inclusive).-
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1