Rec. ITU-T H.264 (01/2012) 2. The variable codIRange is set equal to codIRange - codIRangeLPS and the following applies: If codIOffset is greater than or equal to codIRange, the variable binVal is set equal to 1 - valMPS, codIOffset is decremented by codIRange, and codIRange is set equal to codIRangeLPS. Otherwise, the variable binVal is set equal to valMPS. Given the value of binVal, the state transition is performed as specified in clause 9.3.3.2.1.1. Depending on the current value of codIRange, renormalization is performed as specified in clause 9.3.3.2.2. 9.3.3.2.1.1 State transition process Inputs to this process are the current pStateIdx, the decoded value binVal and valMPS values of the context variable associated with ctxIdx. Outputs of this process are the updated pStateIdx and valMPS of the context variable associated with ctxIdx. Depending on the decoded value binVal, the update of the two variables pStateIdx and valMPS associated with ctxIdx is derived as specified by the following pseudo-code: if( binVal = = valMPS) pStateIdx = transIdxMPS( pStateIdx ) else { (9-27) if( pStateIdx == 0) valMPS = 1 valMPS pStateIdx = transIdxLPS(pStateIdx Table 9-45 specifies the transition rules transIdxMPS() and transIdxLPS() after decoding the value of valMPS and 1 - valMPS, respectively. Rec. ITU-T H.264 (01/2012) DecodeDecision (ctxIdx) qCodIRangeIdx = (codIRange>>6) & 3 codIRangeLPS = rangeTabLPS[pStateIdx][qCodIRangeIdx] codIRange = codIRange - codIRangeLPS codIOffset >= codIRange binVal = !valMPS binVal = valMPS codIOffset = codIOffset - codIRange codIRange = codIRangeLPS pStateldx = transIdxMPS[pStateldx] pStateIdx 0? valMPS = 1 - valMPS pStateIdx = transIdxLPS[pStateIdx] RenormD H.264(09)_F9-3 Figure 9-3 - Flowchart for decoding a decision Rec. ITU-T H.264 (01/2012) Table 9-44 - Specification of rangeTabLPS depending on pStateIdx and qCodIRangeIdx qCodIRangeIdx qCodIRangeIdx pStateIdx pStateIdx Rec. ITU-T H.264 (01/2012) Table 9-45 - State transition table pStateIdx transIdxLPS transIdxMPS pStateIdx transIdxL