56 codILow >= 512 codILow = codILow - 256 codILow = codILow - 512 bitsOutstanding = bitsOutstanding + 1 PutBit(0) PutBit(1) codIRange = codIRange << 1 codILow = codILow <<1 H.264(09)_F9-8 Figure 9-8 - Flowchart of renormalization in the encoder The PutBit() procedure described in Figure 9-9 provides carry over control. It uses the function WriteBits( B, N) that writes N bits with value B to the bitstream and advances the bitstream pointer by N bit positions. This function assumes the existence of a bitstream pointer with an indication of the position of the next bit to be written to the bitstream by the encoding process. Rec. ITU-T H.264 (01/2012) PutBit(B) firstBitFlag firstBitFlag = 0 WriteBits(B, 1) bitsOutstanding > 0 WriteBits(1-B,1) bitsOutstanding = bitsOutstanding - 1 H.264(09)_F9-9 Figure 9-9 - Flowchart of PutBit(B) 9.3.4.4 Bypass encoding process for binary decisions (informative) This clause does not form an integral part of this Recommendation | International Standard. Inputs to this process are the variables binVal, codILow, codIRange, bitsOutstanding, and BinCountsInNALunits. Output of this process is a bit written to the RBSP and the updated variables codILow, bitsOutstanding, and BinCountsInNALunits. This encoding process applies to all binary decisions with bypassFlag equal to 1. Renormalization is included in the specification of this process as given in Figure 9-10. Rec. ITU-T H.264 (01/2012) EncodeBypass(binVal) codILow = codILow << 1 binVal != 0 codILow = codILow + codIRange codILow >= PutBit(1) codILow < 512 PutBit(0) codILow = codILow - 1024 codILow = codILow - 512 bitsOutstanding = bitsOutstanding + 1 BinCountsInNALunits = BinCountsInNALunits +1 H.264(09)_F9-10 Figure 9-10 - Flowchart of encoding bypass 9.3.4.5 Encoding process for a binary decision before termination (informative) This clause does not form an integral part of this Recommendation | International Standard. Inputs to this process are the variables binVal, codIRange, codILow, bitsOutstanding, and BinCountsInNALunits. Outputs