At 1340, the process selects one of the entries in the chroma QP offset table as containing the set of chroma QP offset values for the quantization group. In some embodiments, this operation entails receiving an index from the bitstream and using the received index to select an entry from the chroma QP offset table. In some embodiments that predictively encode the chroma QP offset values in the table, this process includes restoring the chroma QP offset values (of both chroma components) from the prediction or delta values.
The process then identifies (at 1350) luma QP values for the quantization group. As mentioned, in some embodiments, the luma QP values are defined for a quantization group that is the same for the chroma QP values. In some embodiments, quantization groups for luma QP and chroma QP are defined independently.
Next, the process computes (at 1360) chroma QP values. Some embodiments compute the chroma QP value from the identified luma QP values and from each identified chroma QP offset. In some embodiments, this is accomplished by adding the luma QP value with all of the identified chroma QP offsets (from the slice/picture level and from the QG level) as illustrated above in Equations (1)-(6).
The process then determines (at 1370) whether it has reached the end of the picture (if the higher level chroma QP offset is for the entire picture) or it has reached the end of the slice (if the higher level chroma QP offset is for the slice). If so, the process 1300 ends. If not, the process 1300 returns to 1330 to process the next quantization group.