Method and apparatus for entropy encoding using hierarchical data unit, and method and apparatus for decoding
Provided are video encoding and decoding methods and apparatuses. The video encoding method includes: encoding a video based on data units having a hierarchical structure; determining a context model used for entropy encoding a syntax element of a data unit based on at least one piece of additional information of the data units; and entropy encoding the syntax element by using the determined context model.
1. A video decoding apparatus comprising:
a receiver which obtains, from a bitstream, a split transformation flag indicating whether a transformation unit included in a coding unit is split, and obtains a current transformation unit from the coding unit based on the split transformation flag;
a context modeler which determines a context model using a context model index determined based on a size of the current transformation unit and a value of a color component index of a picture to which the transformation unit belongs, without using any syntax elements from blocks neighboring the coding unit, wherein the color component index is set with respect to a luminance color component, a first chrominance color component, and a second chrominance color component, and the color component index for the luminance color component has a value of zero, the color component index for the first chrominance color component has a value of one, and the color component index for the second chrominance color component has a value of two; and
an entropy decoder which obtains a transformation coefficient flag indicating whether at least one non-zero coefficient is included in a block of the current transformation unit by entropy-decoding the bitsteam using Context Adaptive Binary Arithmetic Coding (CABAC) based on the context model, and obtains a transformation coefficient included in the current transformation unit based on the transformation coefficient flag,
wherein the entropy decoder performs the entropy-decoding according to a context-adaptive binary arithmetic decoding process,
wherein the context model includes information indicating a most probable symbol (MPS), and
wherein the receiver, the context modeler and the entropy decoder are implemented by at least one processor.