 of this process are zero or more bits written to the RBSP and the updated variables codILow, codIRange, bitsOutstanding, and BinCountsInNALunits This encoding routine shown in Figure 9-11 applies to encoding of the end_of_slice_flag and of the bin indicating the I_PCM mb_type both associated with ctxIdx equal to 276. Rec. ITU-T H.264 (01/2012) EncodeTerminate(binVal) codIRange = codIRange - 2 binVal != 0 codILow = codILow + codIRange RenormE EncodeFlush BinCountsInNALunits = BinCountsInNALunits 1 H.264(09)_F9-11 Figure 9-11 - Flowchart of encoding a decision before termination When the value of binVal to encode is equal to 1, CABAC encoding is terminated and the flushing procedure shown in Figure 9-12 is applied. In this flushing procedure, the last bit written by WriteBits( B, N) is equal to 1. When encoding end_of_slice_flag, this last bit is interpreted as the rbsp_stop_one_bit. EncodeFlush codIRange = 2 RenormE PutBit((codILow >>9) & 1) WriteBits(((codILow >> 7) & 3) 1,2) H.264(09)_F9-12 Figure 9-12 - Flowchart of flushing at termination Rec. ITU-T H.264 (01/2012) 9.3.4.6 Byte stuffing process (informative) This clause does not form an integral part of this Recommendation | International Standard. This process is invoked after encoding the last macroblock of the last slice of a picture and after encapsulation. Inputs to this process are the number of bytes NumBytesInVcINALunits of all VCL NAL units of a picture, the number of macroblocks PicSizeInMbs in the picture, and the number of binary symbols BinCountsInNALunits resulting from encoding the contents of all VCL NAL units of the picture. NOTE - The value of BinCountsInNALunits is the result of encoding all slices of a coded picture. After initialising for the first slice of a coded picture as specified in clause 9.3.4.1, BinCountsInNALunits is incremented as specified in clauses 9.3.4.2, 9.3.4.4, and 9.3.4.5. Outputs of this process are zero or more bytes appended to the NAL unit. Let the variable k be set equal to Ceil( ( Ceil( 3 * ( 32 * BinCountsInNALu