What is claimed is:
1. A decoding apparatus, comprising:
a processor; and
a memory storing instructions, which, when executed by the processor, cause the processor to:
calculate a first parameter based on a picture-level quantization parameter (QP) offset and a slice-level QP offset added to a luma QP (QPy), wherein the QPy has a QPy range including values 0 to 51;
set a chroma QP (QPc) by performing a mapping based on the first parameter, wherein the QPc is set such that QPc has a QPc range equal to the QPy range,
wherein the setting of the QPc includes performing a clipping operation to prevent the QPc being outside of the QPc range of 0 to 51; and
inversely quantize quantized data of a bit stream based on the set QPc, wherein the quantized data is decoded from the bit stream.
2. The decoding apparatus of claim 1 ,
wherein the instructions further cause the processor to set the QP C based on a mapping table, and
wherein the mapping table maps the QP C to the first parameter.
3. The decoding apparatus of claim 2 , wherein the instructions further cause the processor to:
set the QP C for a first chroma component based on a second parameter with the picture-level QP offset for the first chroma component added to the QP Y ; and
set the QP C for a second chroma component based on a third parameter with the picture-level QP offset for the second chroma component added to the QP Y .
4. The decoding apparatus of claim 1 , wherein the instructions further cause the processor to decode the bit stream to generate the quantized data.
5. A decoding method, comprising:
calculating a first parameter based on a picture-level quantization parameter (QP) offset and a slice-level QP offset added to a luma QP (QP Y ), wherein the QP Y is in a QP Y range including values 0 to 51;
setting a chroma QP (QP C ) by performing a mapping based on the first parameter, wherein the QP C is set such that the QP C has a QP C range equal to the QP Y range,
wherein the setting of the QP C includes performing a clipping operation to prevent the QP C being outside of the range of 0 to 51; and
inversely quantizing quantized data of a bit stream based on the set QP C ,
wherein the quantized data is decoded from the bit stream.
6. The decoding method of claim 5 , further comprising setting the QP C based on a mapping table, wherein the mapping table maps the QP C to the first parameter.
7. The decoding method of claim 6 , further comprising:
setting the QP C for a first chroma component based on a second parameter with the picture-level QP offset for the first chroma component added to the QP Y ; and
setting the QP C for a second chroma component based on a third parameter with the picture-level QP offset for the second chroma component added to the QP Y .
8. The decoding method of claim 7 , further comprising decoding the bit stream to generate the quantized data.
9. A non-transitory storage medium storing instructions that, when executed by a computing device, cause the computing device to perform operations comprising:
calculating a first parameter based on a picture-level quantization parameter (QP) offset and a slice-level QP offset added to a luma QP (QP Y ), wherein the QP Y has a QP Y range including values 0 to 51;
setting a chroma QP (QP C ) by performing a mapping based on the first parameter, wherein the QP C is set such that the QP C is in a QP C range equal to the QP Y range,
wherein the setting of the QP C includes performing a clipping operation to prevent the QP C being outside of the range of 0 to 51; and
inversely quantizing quantized data of a bit stream based on the set QP C ,
wherein the quantized data is decoded from the bit stream.
10. The non-transitory storage medium of claim 9 , wherein the instructions cause the computing device to perform operations further comprising setting the QP C based on a mapping table, wherein the mapping table maps the QP C to the first parameter.
11. The non-transitory storage medium of claim 10 , wherein the instructions cause the computing device to perform operations further comprising:
setting the QP C for a first chroma component based on a second parameter with the picture-level QP offset for the first chroma component added to the QP Y ; and
setting the QP C for a second chroma component based on a third parameter with the picture-level QP offset for the second chroma component added to the QP Y .
12. The non-transitory storage medium of claim 11 , wherein the instructions cause the computing device to perform operations further comprising decoding the bit stream to generate the quantized data.