Entropy decoding method, and decoding apparatus using same
The present invention relates to an entropy decoding method and to a decoding apparatus using same. The entropy decoding method according to the present invention comprises: a step of decoding a bin of a syntax element; and a step of acquiring information on the syntax element based on the decoded bin. In the step of decoding the bin, context-based decoding or bypass decoding is performed for each bin of the syntax element.
1 . A decoding apparatus for an image decoding, the decoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to:
decode a bin string for an intra_chroma_pred_mode syntax element;
derive a value of the intra_chroma_pred_mode syntax element based on the bin string; and
derive a chroma intra prediction mode of a current block based on the value of the intra_chroma_pred_mode syntax element,
wherein the bin string includes a first bin, a second bin, and a third bin,
wherein the first bin is decoded based on context information for the intra_chroma_pred_mode syntax element, and the second bin and the third bin are decoded based on bypass coding,
wherein the context information is derived based on a sum of an offset and a value represented by the first bin,
wherein the offset is determined based on a slice type for a current slice comprising the current block, and
wherein a value of the offset is equal to 0 based on the slice type being an I slice, the value of the offset is equal to 1 based on the slice type being a P slice, and the value of the offset is equal to 2 based on the slice type being a B slice.
2 . An encoding apparatus for an image encoding, the encoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to: divide an input picture into a plurality of blocks;
derive a chroma intra prediction mode of a current block among the plurality of blocks;
determine a value of an intra_chroma_pred_mode syntax element based on the chroma intra prediction mode; and
encode a bin string for the intra_chroma_pred_mode syntax element based on the value of the intra_chroma_pred_mode syntax element,
wherein the bin string includes a first bin, a second bin, and a third bin,
wherein the first bin is encoded based on context information for the intra_chroma_pred_mode syntax element, and the second bin and the third bin are encoded based on bypass coding,
wherein the context information is derived based on a sum of an offset and a value represented by the first bin,
wherein the offset is determined based on a slice type for a current slice comprising the current block, and
wherein a value of the offset is equal to 0 based on the slice type being an I slice, the value of the offset is equal to 1 based on the slice type being a P slice, and the value of the offset is equal to 2 based on the slice type being a B slice.
3 . An apparatus for transmitting data for an image, the apparatus comprising:
at least one processor configured to obtain a bitstream, wherein the bitstream is generated based on dividing an input picture into a plurality of blocks, deriving a chroma intra prediction mode of a current block among the plurality of blocks, determining a value of an intra_chroma_pred_mode syntax element based on the chroma intra prediction mode, and encoding a bin string for the intra_chroma pred_mode syntax element based on the value of the intra_chroma_pred_mode syntax element; and
a transmitter configured to transmit the data comprising the bitstream,
wherein the bin string includes a first bin, a second bin, and a third bin,
wherein the first bin is encoded based on context information for the intra_chroma_pred_mode syntax element, and the second bin and the third bin are encoded based on bypass coding,
wherein the context information is derived based on a sum of an offset and a value represented by the first bin,
wherein the offset is determined based on a slice type for a current slice comprising the current block, and
wherein a value of the offset is equal to 0 based on the slice type being an I slice, the value of the offset is equal to 1 based on the slice type being a P slice, and the value of the offset is equal to 2 based on the slice type being a B slice.