Method and apparatus for entropy encoding / decoding a coefficient level
By determining the Rice parameters to parse and debinarize the coefficient level information, the problem of low efficiency in the encoding and decoding of coefficient level information in the existing technology is solved, thereby improving the compression and reconstruction quality of video signals.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SAMSUNG ELECTRONICS CO LTD
- Filing Date
- 2019-11-12
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, there are insufficient methods for determining Rice parameters during the entropy coding and decoding of video signals, resulting in low efficiency in the coding and decoding of coefficient level information.
The Rice parameter is determined based on the basic level of the current coefficient. This parameter is then used to parse and debinarize the coefficient level information, thereby achieving accurate identification of the coefficient size.
It improves the efficiency of encoding and decoding coefficient level information, thereby enhancing the compression and reconstruction quality of video signals.
Smart Images

Figure CN116132677B_ABST
Abstract
Description
Method and apparatus for entropy encoding / decoding of coefficient levels
[0001] This application is a divisional application of the invention patent application filed on November 12, 2019, with application number "201980074187.0" and titled "Method and apparatus for entropy encoding of coefficient levels and method and apparatus for entropy decoding of coefficient levels". Technical Field
[0002] This disclosure relates to encoding and decoding video, and more specifically, to a method and apparatus for encoding and decoding grade information of coefficients included in image data. Background Technology
[0003] In H.264, MPEG-4, and other similar formats, video signals are hierarchically divided into sequences, frames, stripes, macroblocks, and blocks, with the block being the smallest processing unit. In terms of encoding, residual data for each block is obtained through intra-frame or inter-frame prediction. This residual data is compressed using transform, quantization, scan, run-length coding, and entropy coding. In entropy coding, syntax elements (e.g., transform coefficients or motion vector information) are entropy-coded to output a bitstream. In terms of decoding, syntax elements are extracted from the bitstream, and decoding is performed based on these extracted syntax elements. Summary of the Invention
[0004] Technical issues
[0005] This disclosure aims to provide an improved method and apparatus for determining Rice parameters to entropy entropy entropy encoding / decoding coefficient level information indicating the magnitude of coefficients.
[0006] Solution to the problem
[0007] According to embodiments of this disclosure, a method for decoding coefficients included in image data includes: determining a Rice parameter for the current coefficient based on the base level of the current coefficient; parsing coefficient level information indicating the size of the current coefficient from a bitstream using the determined Rice parameter; and identifying the size of the current coefficient by debinarizing the coefficient level information using the determined Rice parameter.
[0008] According to another embodiment of this disclosure, an apparatus for decoding coefficients included in image data includes: at least one processor and a memory, wherein the memory stores at least one instruction configured to be executable by the at least one processor, and the at least one instruction is configured to, when executed, cause the at least one processor to: determine a Rice parameter for the current coefficient based on a base level of the current coefficient; parse coefficient level information indicating the size of the current coefficient from a bitstream using the determined Rice parameter; and identify the size of the current coefficient by debinarizing the coefficient level information using the determined Rice parameter.
[0009] According to another embodiment of this disclosure, a method for encoding coefficients included in image data includes: obtaining coefficient level information indicating the magnitude of a current coefficient; determining a Rice parameter for the current coefficient based on the base level of the current coefficient; binarizing the coefficient level information using the determined Rice parameter; and generating a bitstream including the binarized coefficient level information.
[0010] According to another embodiment of this disclosure, an apparatus for encoding coefficients included in image data includes: at least one processor and a memory, wherein the memory stores at least one instruction configured to be executable by the at least one processor, and the at least one instruction is configured to, when executed, cause the at least one processor to: obtain coefficient level information indicating the magnitude of a current coefficient; determine a Rice parameter for the current coefficient based on the base level of the current coefficient; binarize the coefficient level information using the determined Rice parameter; and generate a bitstream including the binarized coefficient level information. Attached Figure Description
[0011] Figure 1a is a block diagram of an image decoding apparatus according to an embodiment of the present disclosure.
[0012] Figure 1b is a block diagram of an image decoder according to an embodiment of the present disclosure.
[0013] Figure 1c is a block diagram of an image decoding apparatus according to an embodiment of the present disclosure.
[0014] Figure 2a is a block diagram of an image encoding device according to an embodiment of the present disclosure.
[0015] Figure 2b is a block diagram of an image encoder according to an embodiment of the present disclosure.
[0016] Figure 2c is a block diagram of an image encoding device according to an embodiment of the present disclosure.
[0017] Figure 3 illustrates a process performed by an image decoding device according to an embodiment of the present disclosure, in which at least one coding unit is determined by dividing the current coding unit.
[0018] Figure 4 illustrates a process performed by an image decoding device according to an embodiment of the present disclosure, in which at least one coding unit is determined by dividing a non-square coding unit.
[0019] Figure 5 illustrates a process performed by an image decoding device according to an embodiment of the present disclosure, which involves dividing an encoding unit based on at least one of block shape information and segmentation shape pattern information.
[0020] Figure 6 illustrates a method performed by an image decoding device, according to an embodiment of the present disclosure, for determining a specific coding unit from an odd number of coding units.
[0021] Figure 7 illustrates the order in which an image decoding device processes multiple coding units when it determines multiple coding units by dividing the current coding unit according to an embodiment of the present disclosure.
[0022] Figure 8 illustrates the process performed by an image decoding device, according to an embodiment of the present disclosure, to determine that the current coding unit will be divided into an odd number of coding units when the coding units cannot be processed in a specific order.
[0023] Figure 9 illustrates a process performed by an image decoding device according to an embodiment of the present disclosure, in which at least one coding unit is determined by dividing a first coding unit.
[0024] Figure 10 illustrates that, according to an embodiment of the present disclosure, when the second coding unit, which has a non-square shape, is determined by the image decoding device by dividing the first coding unit, the shape into which the second coding unit can be divided is limited under certain conditions.
[0025] Figure 11 illustrates the process of dividing a square coding unit by an image decoding device when the division shape pattern information cannot indicate that the square coding unit is divided into four square coding units, according to an embodiment of the present disclosure.
[0026] Figure 12 illustrates how the processing order among multiple coding units can be changed according to the process of dividing the coding units, based on an embodiment of the present disclosure.
[0027] Figure 13 illustrates the process of determining the depth of a coding unit as the shape and size of the coding unit change, when the coding unit is recursively divided such that multiple coding units are determined, according to an embodiment.
[0028] Figure 14 illustrates a depth that can be determined based on the shape and size of the coding unit according to an embodiment of the present disclosure, and a partial index (PID) for distinguishing coding units.
[0029] Figure 15 illustrates the determination of multiple coding units based on multiple specific data units included in a picture according to an embodiment of the present disclosure.
[0030] Figure 16 illustrates a processing block according to an embodiment of the present disclosure, which serves as the basis for determining the order of reference coding units included in a frame.
[0031] Figure 17 is a diagram illustrating a transform block to be entropy encoded according to an embodiment of the present disclosure.
[0032] Figure 18 is a flowchart of the entropy encoding and entropy decoding process for coefficient level information according to an embodiment of the present disclosure.
[0033] Figure 19 is a block diagram illustrating the configuration of an entropy coding device according to an embodiment of the present disclosure.
[0034] Figure 20 is a diagram illustrating the rank information of coefficients included in the transformation block according to an embodiment of the present disclosure.
[0035] Figure 21 is a diagram illustrating the level information of coefficients included in the transformation block according to another embodiment of the present disclosure.
[0036] Figure 22 shows an example of a pseudocode used to encode coefficient level information.
[0037] Figure 23 shows another example of a pseudocode used to encode coefficient level information.
[0038] Figure 24 is a diagram illustrating a method for determining Rice parameters according to embodiments of the present disclosure.
[0039] Figure 25 is a flowchart of a method for entropy encoding coefficient level information according to an embodiment of the present disclosure.
[0040] Figure 26 is a block diagram illustrating the configuration of an entropy decoding device according to an embodiment of the present disclosure.
[0041] Figure 27 is a flowchart of a method for entropy decoding of coefficient level information according to an embodiment of the present disclosure. Detailed Implementation
[0042] The advantages and features of the embodiments of this disclosure, as well as methods of implementing them, will be apparent from the following description of embodiments of this disclosure taken in conjunction with the accompanying drawings. However, this disclosure is not limited to the embodiments set forth herein and can be implemented in many different forms. The embodiments of this disclosure are provided only so that this disclosure will be thorough and complete, and will fully convey the scope of this disclosure to those skilled in the art.
[0043] The terminology used herein will be briefly described, and then embodiments of the present disclosure as set forth herein will be described in detail.
[0044] In this specification, widely used and common terms are selected where possible, taking into account the function of this disclosure. However, non-common terms may be selected based on the intent of those skilled in the art, precedent, or new technologies. Some terms may be arbitrarily chosen by the applicant. In such cases, the meaning of these terms will be explained in detail in the corresponding sections of this disclosure. Therefore, the terms used herein should be defined not based on their names but on their meanings and the entire context of this disclosure.
[0045] As used herein, the singular form is also intended to include the plural form, unless the context explicitly indicates otherwise.
[0046] It should be understood that when an element is referred to as "including" another element, unless otherwise stated, that element may also include other elements.
[0047] The term "unit" as used herein should be understood as a software or hardware component that performs a specific function. However, the term "unit" is not limited to software or hardware. The term "unit" can be configured to be stored in addressable storage media or reproduced by one or more processors. Therefore, the term "unit" can include, for example, components (such as software components, object-oriented software components, class components, and task components), processes, functions, attributes, procedures, subroutines, program code snippets, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and parameters. The functionality provided in components and "units" can be combined into a small number of components and "units," or can be divided into subcomponents and "subunits."
[0048] According to embodiments of this disclosure, a "cell" can be implemented using a processor and memory. The term "processor" should be broadly interpreted to include general-purpose processors, central processing units (CPUs), microprocessors, digital signal processors (DSPs), controllers, microcontrollers, state machines, etc. In some cases, "processor" may refer to application-specific integrated circuits (ASICs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), etc. The term "processor" may refer to a combination of processing devices, such as a combination of a DSP and a microprocessor, a combination of multiple microprocessors, a combination of one or more microprocessors integrated with a DSP core, or any other combination of configurations.
[0049] The term "memory" should be broadly interpreted to include any electronic component capable of storing electronic information. "Memory" can refer to various types of processor-readable media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage devices, registers, etc. Memory can be considered to be in electronic communication with the processor when the processor can read information from and / or write information to it. Memory integrated within the processor communicates electronically with the processor.
[0050] The term “image” as used here should be understood to include still images, such as videos, as well as moving images (i.e., dynamic images) that are part of a video.
[0051] The term "sample" is used here to refer to data assigned to a sampling location in an image, i.e., the data to be processed. For example, a sample can be a pixel value in the spatial domain and a transform coefficient in the transform domain. A unit comprising at least one sample can be defined as a block.
[0052] In the following, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings, enabling those skilled in the art to readily implement the embodiments of the present disclosure. For clarity, portions unrelated to the description of the present disclosure have been omitted from the drawings.
[0053] In the following, embodiments of the present disclosure will be described in detail with reference to Figures 1 to 26.
[0054] Figure 1a is a block diagram of an image decoding apparatus according to an embodiment of the present disclosure.
[0055] Image decoding device 100 may include receiver 110 and decoder 120. Receiver 110 and decoder 120 may include at least one processor. In addition, receiver 110 and decoder 120 may include memory storing instructions to be executed by said at least one processor.
[0056] Receiver 110 can receive bitstreams. The bitstreams include information about an image encoded by image encoding device 2200, which will be described later. Additionally, bitstreams can be transmitted from image encoding device 150. Image encoding device 150 and image decoding device 100 can be connected via wired or wireless means, and receiver 110 can receive bitstreams via wired or wireless means. Receiver 110 can receive bitstreams from storage media such as optical media or hard disks.
[0057] Decoder 120 can reconstruct an image based on information obtained from the received bitstream. Decoder 120 can obtain syntax elements for reconstructing the image from the bitstream. Decoder 120 can reconstruct the image based on said syntax elements.
[0058] Decoder 120 can perform entropy decoding on the syntax elements of the encoded information obtained from the bitstream. The encoded information includes information about the quantization coefficients as a result of encoding residual data of an image. According to embodiments of this disclosure, decoder 120 can parse coefficient level information indicating the magnitude of the coefficients from the bitstream using the Rice parameter. Decoder 120 can identify the magnitude of the coefficients by performing entropy decoding on the coefficient level information using the Rice parameter.
[0059] The operation of the image decoding device 100 will be described in more detail with reference to FIG1b.
[0060] Figure 1b is a block diagram of an image decoder 6000 according to an embodiment of the present disclosure.
[0061] The image decoder 6000 according to an embodiment of the present disclosure performs the operations required by the decoder 120 of the image decoding device 100 to decode image data.
[0062] Referring to Figure 1b, the entropy decoder 6150 parses the encoded image data to be decoded and the encoded information required for decoding from the bitstream 6050. The encoded image data is quantized transform coefficients, and the dequantizer 6200 and the inverse transform 6250 reconstruct the residual data from the quantized transform coefficients.
[0063] As described below, in embodiments of this disclosure, the entropy decoder 6150 can determine a Rice parameter for the current coefficient based on the base level of the current coefficient. The entropy decoder 6150 can parse coefficient level information indicating the size of the current coefficient from the bitstream 6050 using the determined Rice parameter. The entropy decoder 6150 can identify the size of the current coefficient by debinarizing the parsed coefficient level information using the determined Rice parameter.
[0064] Intra-frame predictor 6400 performs intra-frame prediction for each block. Inter-frame predictor 6350 performs inter-frame prediction for each block using a reference image obtained from the reconstructed image buffer 6300. Spatial domain data of the current image blocks can be reconstructed by adding the residual data to the predicted data for each block generated by the intra-frame predictor 6400 or the inter-frame predictor 6350, and the deblocking unit 6450 and the SAO executor 6500 can perform loop filtering on the reconstructed spatial domain data and output a filtered reconstructed image 6600. The reconstructed image stored in the reconstructed image buffer 6300 can be output as a reference image.
[0065] According to embodiments of this disclosure, the operation can be performed sequentially by the image decoder 6000 for each block, so that the decoder 120 of the image decoding device 100 can decode the image data.
[0066] Figure 1c is a block diagram of an image decoding device 100 according to an embodiment of the present disclosure.
[0067] An image decoding device 100 according to an embodiment of the present disclosure may include a memory 130 and at least one processor 125 connected to the memory 130. In embodiments of the present disclosure, operation of the image decoding device 100 may be performed by a single processor or under the control of a central processing unit. The memory 130 of the image decoding device 100 may store data received from an external source and data generated by the at least one processor 125.
[0068] In embodiments of this disclosure, the memory 130 of the image decoding device 100 may store at least one instruction configured to be executable by the at least one processor 125. The at least one instruction may be configured to, when executed, cause the at least one processor 125 to: determine a Rice parameter for the current coefficient based on the base level of the current coefficient; parse coefficient level information indicating the size of the current coefficient from the bitstream using the determined Rice parameter; and debinarize the coefficient level information using the determined Rice parameter, thereby identifying the size of the current coefficient.
[0069] Figure 2a is a block diagram of an image encoding device according to an embodiment of the present disclosure.
[0070] Image encoding device 150 according to embodiments of the present disclosure may include encoder 155 and output device 160.
[0071] The encoder 155 and output device 160 may include at least one processor. The encoder 155 and output device 160 may also include memory storing instructions to be executed by the at least one processor. The encoder 155 and output device 160 may be implemented as separate hardware components or included in a single hardware component.
[0072] Encoder 155 can obtain the prediction block of the current block according to the prediction mode of the current block, and transform, quantize and encode the residual, which is the difference between the current block and the prediction block. Outputter 160 can generate a bit stream including information about the prediction mode of the current block and configuration information for determining the data units of the hierarchical partitioning form, and output the bit stream.
[0073] Encoder 155 can entropy encode syntax elements, wherein the syntax elements are encoded information generated during the encoding process. In embodiments of this disclosure, encoder 155 can obtain coefficient level information indicating the magnitude of coefficients included in image data. Encoder 155 can entropy encode the coefficient level information using the Rice parameter and generate a bitstream including the encoded coefficient level information.
[0074] Figure 2a is a block diagram of an image encoder according to an embodiment of the present disclosure.
[0075] The image encoder 7000 according to an embodiment of the present disclosure performs the operations required by the encoder 120 of the image encoding device 150 to encode image data.
[0076] In other words, the intra-predictor 7200 performs intra-prediction for each block of the current image 7050, and the inter-predictor 7150 performs inter-prediction for each block using the current image 7050 and a reference image obtained by the reconstructed image buffer 7100.
[0077] Residual data can be generated by subtracting the predicted data of each block output from the intra-frame predictor 7200 or the inter-frame predictor 7150 from the data of the current image 7050 to be encoded, and the transformer 7250 and the quantizer 7300 can perform transform and quantization on the residual data and output the quantized transform coefficients for each block.
[0078] The dequantizer 7450 and inverse transform 7500 reconstruct the spatial domain residual data by performing dequantization and inverse transform on the quantized transform coefficients. The reconstructed spatial domain residual data can be added to the prediction data for each block output from the intra-frame predictor 7200 or the inter-frame predictor 7150 to reconstruct the spatial domain data of the current image 7050. The deblocking unit 7550 and the SAO executor 7600 perform intra-loop filtering on the reconstructed spatial domain data to generate a filtered reconstructed image. The generated reconstructed image is stored in the reconstructed image buffer 7100. The reconstructed image stored in the reconstructed image buffer 7100 can be used as a reference image for inter-frame prediction of other images. The entropy encoder 7350 entropy-encodes the quantized transform coefficients and outputs the entropy-encoded coefficients in the bitstream 7400.
[0079] As described below, in embodiments of this disclosure, the entropy encoder 7350 can obtain coefficient level information indicating the magnitude of the current coefficient. The entropy encoder 7350 can determine a Rice parameter for the current coefficient based on its basic level. The entropy encoder 7350 can binarize the coefficient level information using the determined Rice parameter. The entropy encoder 7350 can generate a bitstream including the binarized coefficient level information.
[0080] In order to apply the image encoder 7000 according to an embodiment of the present disclosure to the image encoding device 150, the operation of the image encoder 7000 according to an embodiment of the present disclosure may be performed for each block.
[0081] Figure 2c is a block diagram of an image encoding device 150 according to an embodiment of the present disclosure.
[0082] An image encoding device 150 according to an embodiment of the present disclosure may include a memory 165 and at least one processor 170 connected to the memory 165. In embodiments of the present disclosure, operation of the image encoding device 150 may be performed by a single processor or under the control of a central processing unit. The memory 165 of the image encoding device 150 may store data received from an external source and data generated by the at least one processor 170.
[0083] In embodiments of this disclosure, the memory 165 of the image encoding device 150 may store at least one instruction configured to be executable by the at least one processor 170. When executed, the at least one instruction causes the at least one processor 170 to perform the following operations: obtain coefficient level information indicating the magnitude of a current coefficient; determine a Rice parameter for the current coefficient based on the base level of the current coefficient; binarize the coefficient level information using the determined Rice parameter; and generate a bitstream including the binarized coefficient level information.
[0084] The division of coding units will be described in detail below based on embodiments of the present disclosure.
[0085] First, a frame can be divided into one or more stripes or one or more parallel blocks. A stripe or a parallel block can be a sequence of one or more maximum coding units (coding tree units (CTUs)). There exists a maximum coding block (coding tree block (CTB) that is conceptually equivalent to a maximum coding unit (CTU).
[0086] A maximum coding unit (CTB) represents an N×N block containing N×N samples (N being an integer). Each color component can be divided into one or more maximum coding blocks.
[0087] When the image has three sample arrays (sample arrays for the Y, Cr, and Cb components), the Maximum Coding Unit (CTU) includes a maximum coding block for the luma samples, two corresponding maximum coding blocks for the chroma samples, and syntax elements for encoding the luma and chroma samples. When the image is monochrome, the CTU includes a maximum coding block for the monochrome samples and syntax elements for encoding the monochrome samples. When the image is encoded in a color plane separated according to the color components, the CTU includes syntax elements for encoding the image and its samples.
[0088] A maximum code block (CTB) can be divided into M×N code blocks containing M×N samples (M and N are integers).
[0089] When the image has sample arrays for the Y, Cr, and Cb components, the encoding unit (CU) includes an encoding block for the luminance samples, two corresponding encoding blocks for the chrominance samples, and syntax elements for encoding the luminance and chrominance samples. When the image is monochrome, the encoding unit includes an encoding block for the monochrome samples and syntax elements for encoding the monochrome samples. When the image is encoded in a color plane separated according to the color components, the encoding unit includes syntax elements for encoding the image and its samples.
[0090] As described above, the maximum coding block and the maximum coding unit are conceptually distinct from each other, and the coding block and the coding unit are also conceptually distinct from each other. That is, the (maximum) coding unit refers to a data structure that includes the (maximum) coding block containing the corresponding samples and the syntax elements corresponding to the (maximum) coding block. However, because those skilled in the art understand that the (maximum) coding unit or the (maximum) coding block refers to a block of a specific size containing a specific number of samples, the maximum coding block and the maximum coding unit or the coding block and the coding unit will be referred to in the following description without distinction unless otherwise described.
[0091] The image can be divided into maximum coding units (CTUs). The size of each CTU can be determined based on information obtained from the bitstream. Each CTU can be a square of the same size. However, the embodiments are not limited to this.
[0092] For example, information about the maximum size of a luminance-coded block can be obtained from the bitstream. For example, the maximum size of a luminance-coded block, indicated by the information about the maximum size of the luminance-coded block, can be one of 16×16, 32×32, 64×64, 128×128, and 256×256.
[0093] For example, information about the luma block size difference and the maximum size of a luma coding block that can be divided into two can be obtained from the bitstream. The information about the luma block size difference can refer to the size difference between the maximum luma coding unit and the maximum luma coding block that can be divided into two. Therefore, when the information about the maximum size of the luma coding block that can be divided into two and the information about the luma block size difference obtained from the bitstream are combined, the size of the maximum luma coding unit can be determined. The size of the maximum chroma coding unit can be determined using the size of the maximum luma coding unit. For example, when the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma block can be half the size of the luma block, and the size of the maximum chroma coding unit can be half the size of the maximum luma coding unit.
[0094] According to the embodiment, since the information about the maximum size of a luminance coding block that can be divided into two parts is obtained from the bitstream, the maximum size of the luminance coding block that can be divided into two parts can be variably determined. Conversely, the maximum size of a luminance coding block that can be divided into three parts can be fixed. For example, the maximum size of a luminance coding block that can be divided into three parts in an I-frame can be 32×32, and the maximum size of a luminance coding block that can be divided into three parts in a P-frame or B-frame can be 64×64.
[0095] Furthermore, the maximum coding unit can be hierarchically divided into coding units based on the partition shape pattern information obtained from the bit stream. At least one of the following can be obtained from the bit stream as partition shape pattern information: information indicating whether a quad partition is performed, information indicating whether a multi-partition is performed, partition direction information, and partition type information.
[0096] For example, information indicating whether to perform a quad partition can indicate whether the current coding unit will be quad partitioned (QUAD_SPLIT) or not.
[0097] When the current coding unit is not quad-partitioned, the information indicating whether to perform multi-partitioning can indicate whether the current coding unit will not be partitioned again (NO_SPLIT) or will be partitioned twice / three times.
[0098] When the current coding unit is divided into two or three parts, the division direction information indicates that the current coding unit is divided in one of the horizontal or vertical directions.
[0099] When the current coding unit is divided in the horizontal or vertical direction, the division type information indicates whether the current coding unit is divided into two or three parts.
[0100] The partitioning mode of the current coding unit can be determined based on the partitioning direction and partitioning type information. When the current coding unit is partitioned by two horizontally, the partitioning mode can be determined as a horizontal two-part partitioning mode (SPLIT_BT_HOR); when the current coding unit is partitioned by three horizontally, the partitioning mode can be determined as a horizontal three-part partitioning mode (SPLIT_TT_HOR); when the current coding unit is partitioned by two vertically, the partitioning mode can be determined as a vertical two-part partitioning mode (SPLIT_BT_VER); and when the current coding unit is partitioned by three vertically, the partitioning mode can be determined as a vertical three-part partitioning mode (SPLIT_TT_VER).
[0101] Image decoding device 100 can obtain partitioning shape pattern information from a binary bit string in a bit stream. The bit stream received by image decoding device 100 may be in the form of fixed-length binary code, unary code, truncated unary code, predetermined binary code, etc. The binary bit string is information about binary numbers. The binary bit string may include at least one bit. Image decoding device 100 can obtain partitioning shape pattern information corresponding to the binary bit string based on partitioning rules. Image decoding device 100 can determine, based on a binary bit string, whether to perform four partitions on the coding unit, whether not to partition the coding unit, the partitioning direction, and the partitioning type.
[0102] A coding unit may be less than or equal to the largest coding unit. For example, since the largest coding unit is the coding unit with the largest size, it is one of the coding units. When the partitioning shape pattern information regarding the largest coding unit indicates that partitioning is not performed, the coding units determined within the largest coding unit have the same size as that largest coding unit. When the partitioning shape pattern information regarding the largest coding unit indicates that partitioning is performed, the largest coding unit can be partitioned into coding units. Furthermore, when the partitioning shape pattern information regarding coding units indicates that partitioning is performed, the coding unit can be partitioned into smaller coding units. However, the partitioning of the image is not limited to this, and the largest coding unit and coding units may not be distinguished. The partitioning of coding units will be described in detail with reference to Figures 3 to 16.
[0103] Furthermore, one or more prediction blocks for prediction can be determined from the coding unit. The prediction blocks may be equal to or smaller than the coding unit. Furthermore, one or more transform blocks for transform can be determined from the coding unit. The transform blocks may be equal to or smaller than the coding unit.
[0104] The shapes and sizes of the transform blocks and the prediction blocks can be independent of each other.
[0105] In another embodiment, prediction can be performed by using the coding unit as a prediction unit. Furthermore, transformation can be performed by using the coding unit as a transform block.
[0106] The partitioning of coding units will be described in detail with reference to Figures 3 through 16. The current block and neighboring blocks in this disclosure can refer to one of the maximum coding unit, coding unit, prediction block, and transform block. Furthermore, the current block of the current coding unit is the block currently being decoded or encoded, or the block currently being partitioned. Neighboring blocks can be blocks reconstructed prior to the current block. Neighboring blocks can be spatially or temporally adjacent to the current block. Neighboring blocks can be located in one of the following positions: lower left, left side, upper left, above, upper right, right side, or lower right of the current block.
[0107] Figure 3 illustrates a process performed by an image decoding device 100 according to an embodiment to determine at least one coding unit by dividing the current coding unit.
[0108] The block shape may include 4N×4N, 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N. Here, N can be a positive integer. Block shape information is information indicating at least one of the following: shape, orientation, aspect ratio, and dimensions of width and height.
[0109] The shape of the encoding unit can be square or non-square. When the width and height of the encoding unit are the same (i.e., when the block shape of the encoding unit is 4N×4N), the image decoding device 100 can determine the block shape information of the encoding unit as square. The image decoding device 100 can also determine the shape of the encoding unit as non-square.
[0110] When the width and height of the coding unit are different from each other (i.e., when the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N), the image decoding device 100 can determine the block shape information of the coding unit as a non-square shape. When the shape of the coding unit is non-square, the image decoding device 100 can determine the aspect ratio in the block shape information of the coding unit as at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1. Furthermore, the image decoding device 100 can determine whether the coding unit is horizontal or vertical based on its width and height. Additionally, the image decoding device 100 can determine the size of the coding unit based on at least one of its width, height, or area.
[0111] According to an embodiment, the image decoding device 100 can determine the shape of the coding unit by using block shape information, and can determine the coding unit partitioning method by using partition shape pattern information. That is, the coding unit partitioning method indicated by the partition shape pattern information can be determined based on the block shape indicated by the block shape information used by the image decoding device 100.
[0112] Image decoding device 100 can obtain partition shape pattern information from the bitstream. However, the embodiments are not limited to this, and image decoding device 100 and image encoding device 150 can determine pre-agreed partition shape pattern information based on block shape information. Image decoding device 100 can determine pre-agreed partition shape pattern information for the largest or smallest coding unit. For example, image decoding device 100 can determine the partition shape pattern information for the largest coding unit as a four-part partition. Furthermore, image decoding device 100 can determine the partition shape pattern information for the smallest coding unit as "no partitioning". Specifically, image decoding device 100 can determine the size of the largest coding unit to be 256×256. Image decoding device 100 can determine the pre-agreed partition shape pattern information as a four-part partition. A four-part partition is a partition shape pattern in which both the width and height of the coding unit are divided into two equal parts. Image decoding device 100 can obtain a 128×128 coding unit from the 256×256-sized largest coding unit based on the partition shape pattern information. Furthermore, image decoding device 100 can determine the size of the smallest coding unit to be 4×4. Image decoding device 100 can obtain partitioning shape pattern information indicating "do not perform partitioning" for the smallest coding unit.
[0113] According to an embodiment, the image decoding device 100 can use block shape information indicating that the current encoding unit has a square shape. For example, the image decoding device 100 can determine whether to not divide the square encoding unit, whether to divide the square encoding unit vertically, whether to divide the square encoding unit horizontally, or whether to divide the square encoding unit into four encoding units based on the division shape pattern information. Referring to FIG3, when the block shape information of the current encoding unit 300 indicates a square shape, the decoder 120 can determine an encoding unit 310a with the same size as the current encoding unit 300 based on the division shape pattern information indicating that no division is performed, or it can determine encoding units 310b, 310c, 310d, 310e, or 310f divided based on the division shape pattern information indicating a specific division method.
[0114] Referring to FIG3, according to an embodiment, the image decoding device 100 can determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on division shape pattern information indicating that division is performed in the vertical direction. The image decoding device 100 can determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on division shape pattern information indicating that division is performed in the horizontal direction. The image decoding device 100 can determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on division shape pattern information indicating that division is performed in both the vertical and horizontal directions. According to an embodiment, the image decoding device 100 can determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on division shape pattern information indicating that three divisions are performed in the vertical direction. The image decoding device 100 can determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on division shape pattern information indicating that three divisions are performed in the horizontal direction. However, the method of dividing square coding units is not limited to the above methods, and the division shape pattern information can indicate various methods. The following describes in detail, with regard to various embodiments, a specific partitioning method for dividing square coding units.
[0115] Figure 4 illustrates a process performed by an image decoding device 100 according to an embodiment to determine at least one coding unit by dividing a non-square coding unit.
[0116] According to an embodiment, the image decoding device 100 can use block shape information indicating that the current coding unit has a non-square shape. The image decoding device 100 can determine whether to not divide the non-square current coding unit or to divide the non-square current coding unit using a specific division method based on the division shape pattern information. Referring to FIG4, when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the image decoding device 100 can determine coding units 410 or 460 with the same size as the current coding unit 400 or 450 based on the division shape pattern information indicating that division is not performed, or it can determine coding units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c divided based on the division shape pattern information indicating a specific division method. Specific division methods for dividing non-square coding units will be described in detail below with respect to various embodiments.
[0117] According to an embodiment, the image decoding device 100 can determine the division method of the coding unit by using division shape pattern information, and in this case, the division shape pattern information can indicate the number of one or more coding units generated by dividing the coding unit. Referring to FIG4, when the division shape pattern information indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding device 100 can determine the two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450 by dividing the current coding unit 400 or 450 based on the division shape pattern information.
[0118] According to an embodiment, when the image decoding device 100 divides a non-square current coding unit 400 or 450 based on division shape pattern information, the image decoding device 100 may consider the position of the long side of the non-square current coding unit 400 or 450 to divide the current coding unit. For example, the image decoding device 100 may consider the shape of the current coding unit 400 or 450 and determine multiple coding units by dividing the long side of the current coding unit 400 or 450.
[0119] According to an embodiment, when the partitioning shape pattern information indicates that the coding unit is divided (tripartitely divided) into an odd number of blocks, the image decoding device 100 can determine the odd number of coding units included in the current coding unit 400 or 450. For example, when the partitioning shape pattern information indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding device 100 can divide the current coding unit 400 or 450 into three coding units 430a, 430b and 430c or 480a, 480b and 480c.
[0120] According to an embodiment, the aspect ratio of the current coding unit 400 or 450 can be 4:1 or 1:4. When the aspect ratio is 4:1, because the width is longer than the height, the block shape information can be horizontal. When the aspect ratio is 1:4, because the width is shorter than the height, the block shape information can be vertical. The image decoding device 100 can determine whether to divide the current coding unit into an odd number of blocks based on the division shape pattern information. Furthermore, the image decoding device 100 can determine the division direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 corresponds to the vertical direction, because the height of the current coding unit 400 is greater than the width of the current coding unit 400, the image decoding device 100 can determine coding units 430a, 430b, and 430c by dividing the current coding unit 400 in the horizontal direction. Furthermore, when the current coding unit 450 corresponds to the horizontal direction, since the width of the current coding unit 450 is greater than the height of the current coding unit 450, the image decoding device 100 can determine the coding units 480a, 480b and 480c by dividing the current coding unit 450 in the vertical direction.
[0121] According to an embodiment, the image decoding device 100 can determine an odd number of coding units included in the current coding unit 400 or 450, and not all determined coding units may have the same size. For example, a particular coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, and 430c, or 480a, 480b, and 480c, may have a different size than the other coding units 430a and 430c or 480a and 480c. That is, the coding units determined by dividing the current coding unit 400 or 450 may have multiple sizes, and in some cases, all the odd number of coding units 430a, 430b, and 430c, or 480a, 480b, and 480c, may have different sizes.
[0122] According to an embodiment, when the shape pattern information indicates that the coding unit is divided into an odd number of blocks, the image decoding device 100 can determine the odd number of coding units included in the current coding unit 400 or 450, and furthermore, can impose specific restrictions on at least one of the odd number of coding units generated by dividing the current coding unit 400 or 450. Referring to FIG4, the image decoding device 100 can set the decoding process for coding unit 430b or 480b to be different from the decoding process for other coding units 430a and 430c or 480a or 480c, wherein coding unit 430b or 480b is located at the center of the three coding units 430a, 430b and 430c or 480a, 480b and 480c generated by dividing the current coding unit 400 or 450. For example, unlike other coding units 430a and 430c or 480a and 480c, the image decoding device 100 may restrict the coding unit 430b or 480b at the center position from being divided or only divided a specific number of times.
[0123] Figure 5 illustrates a process performed by an image decoding device 100 according to an embodiment, which divides the encoding unit based on at least one of block shape information and segmentation shape pattern information.
[0124] According to an embodiment, the image decoding device 100 can determine whether to divide the first coding unit 500 of the square into coding units or not to divide the first coding unit 500 of the square, based on at least one of block shape information and partition shape pattern information. According to an embodiment, when the partition shape pattern information indicates that the first coding unit 500 is divided in the horizontal direction, the image decoding device 100 can determine the second coding unit 510 by dividing the first coding unit 500 in the horizontal direction. The terms first coding unit, second coding unit, and third coding unit used in the embodiment are terms used to understand the relationship before and after the division of coding units. For example, the second coding unit can be determined by dividing the first coding unit, and the third coding unit can be determined by dividing the second coding unit. It will be understood that the structure of the first coding unit, second coding unit, and third coding unit follows the above description.
[0125] According to an embodiment, the image decoding device 100 may determine, based on the division shape pattern information, whether to divide the determined second coding unit 510 into coding units or not to divide the determined second coding unit 510. Referring to FIG5, the image decoding device 100 may divide the non-square second coding unit 510 determined by dividing the first coding unit 500 into one or more third coding units 520a, or 520b, 520c and 520d, or may not divide the non-square second coding unit 510 determined by dividing the first coding unit 500. The image decoding device 100 may obtain the division shape pattern information, and may determine a plurality of second coding units (e.g., 510) of various shapes by dividing the first coding unit 500 based on the obtained division shape pattern information, and may divide the second coding unit 510 by using the division method of the first coding unit 500 based on the division shape pattern information. According to an embodiment, when the first coding unit 500 is divided into a second coding unit 510 based on the division shape pattern information of the first coding unit 500, the second coding unit 510 can also be divided into a third coding unit 520a, or 520b, 520c, and 520d based on the division shape pattern information of the second coding unit 510. That is, coding units can be recursively divided based on the division shape pattern information of each coding unit. Therefore, square coding units can be determined by dividing non-square coding units, and non-square coding units can be determined by recursively dividing square coding units.
[0126] Referring to Figure 5, specific coding units (e.g., coding units at the center or square coding units) among an odd number of third coding units 520b, 520c, and 520d determined by dividing a non-square second coding unit 510 can be recursively partitioned. According to an embodiment, a square third coding unit 520c among the odd number of third coding units 520b, 520c, and 520d can be horizontally divided into multiple fourth coding units. Non-square fourth coding units 530b or 530d among the multiple fourth coding units 530a, 530b, 530c, and 530d can again be partitioned into multiple coding units. For example, a non-square fourth coding unit 530b or 530d can again be partitioned into an odd number of coding units. Methods for recursively partitioning coding units will be described below with respect to various embodiments.
[0127] According to an embodiment, the image decoding device 100 can divide each of the third coding units 520a, or 520b, 520c, and 520d, into coding units based on the division shape pattern information. Furthermore, the image decoding device 100 can determine, based on the division shape pattern information, not to divide the second coding unit 510. According to an embodiment, the image decoding device 100 can divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding device 100 can impose specific restrictions on certain third coding units among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 can limit the number of times the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d will not be divided or will be divided.
[0128] Referring to FIG5, the image decoding device 100 may restrict the third coding unit 520c at the center position of the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to no longer be divided, to be divided using a specific division method (e.g., divided into only four coding units or divided using the division method of the second coding unit 510), or to be divided only a specific number of times (e.g., divided only n times (where n>0)). However, the restriction on the third coding unit 520c at the center position is not limited to the above examples and may include various restrictions for decoding the third coding unit 520c at the center position differently from the other third coding units 520b and 520d.
[0129] According to an embodiment, the image decoding device 100 can obtain partitioning shape pattern information for partitioning the current coding unit from a specific position in the current coding unit.
[0130] Figure 6 illustrates a method for determining a specific coding unit from an odd number of coding units, performed by an image decoding device 100 according to an embodiment.
[0131] Referring to Figure 6, the division shape pattern information of the current encoding unit 600 or 650 can be obtained from a sample at a specific location among a plurality of samples included in the current encoding unit 600 or 650 (e.g., sample 640 or 690 at the center location). However, the specific location in the current encoding unit 600 from which the division shape pattern information can be obtained is not limited to the center location in Figure 6, and can include various locations included in the current encoding unit 600 (e.g., top, bottom, left, right, upper left, lower left, upper right, and lower right locations). The image decoding device 100 can obtain the division shape pattern information from the specific location and can determine whether to divide the current encoding unit into encoding units of various shapes and sizes or not to divide the current encoding unit.
[0132] According to an embodiment, when the current coding unit is divided into a specific number of coding units, the image decoding device 100 may select one coding unit from the coding units. As will be described below with respect to various embodiments, various methods may be used to select one coding unit from a plurality of coding units.
[0133] According to an embodiment, the image decoding device 100 can divide the current coding unit into multiple coding units and determine the coding unit at a specific location.
[0134] According to an embodiment, the image decoding device 100 can use information indicating the positions of an odd number of coding units to determine the coding unit at the center position among the odd number of coding units. Referring to FIG6, the image decoding device 100 can determine an odd number of coding units 620a, 620b, and 620c or an odd number of coding units 660a, 660b, and 660c by dividing the current coding unit 600 or the current coding unit 650. The image decoding device 100 can determine an intermediate coding unit 620b or an intermediate coding unit 660b by using information about the positions of the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c. For example, the image decoding device 100 can determine the coding unit 620b at the center position by determining the positions of coding units 620a, 620b, and 620c based on information indicating the positions of specific samples included in coding units 620a, 620b, and 620c. In detail, the image decoding device 100 can determine the position of the encoding units 620a, 620b and 620c based on the information indicating the positions of the upper left samples 630a, 630b and 630c of the encoding units 620a, 620b and 620c, and determine the encoding unit 620b at the center position.
[0135] According to an embodiment, the information indicating the positions of the top-left samples 630a, 630b, and 630c included in encoding units 620a, 620b, and 620c respectively may include information about the positions or coordinates of the encoding units 620a, 620b, and 620c in the image. According to an embodiment, the information indicating the positions of the top-left samples 630a, 630b, and 630c included in the encoding units 620a, 620b, and 620c respectively may include information indicating the width or height of the encoding units 620a, 620b, and 620c included in the current encoding unit 600, and the width or height may correspond to information indicating the difference between the coordinates of the encoding units 620a, 620b, and 620c in the image. That is, the image decoding device 100 can determine the encoding unit 620b at the center position by directly using information about the positions or coordinates of the encoding units 620a, 620b, and 620c in the image, or by using information about the width or height corresponding to the difference between the coordinates of the encoding units.
[0136] According to an embodiment, the information indicating the position of the upper left sample 630a of the upper encoding unit 620a may include coordinates (xa, ya), the information indicating the position of the upper left sample 630b of the middle encoding unit 620b may include coordinates (xb, yb), and the information indicating the position of the upper left sample 630c of the lower encoding unit 620c may include coordinates (xc, yc). The image decoding device 100 can determine the middle encoding unit 620b by using the coordinates of the upper left samples 630a, 630b, and 630c included in the encoding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the upper left samples 630a, 630b, and 630c are sorted in ascending or descending order, the encoding unit 620b including the coordinates (xb, yb) of the sample 630b at the center position can be determined as the encoding unit at the center position among the encoding units 620a, 620b, and 620c determined by dividing the current encoding unit 600. However, the coordinates indicating the positions of the top-left samples 630a, 630b, and 630c may include coordinates indicating absolute positions within the frame, or coordinates (dxb, dyb) indicating the relative position of the top-left sample 630b of the intermediate encoding unit 620b relative to the top-left sample 630a of the upper encoding unit 620a, and coordinates (dxc, dyc) indicating the relative position of the top-left sample 630c of the lower encoding unit 620c relative to the top-left sample 630a of the upper encoding unit 620a. The method of determining the encoding unit at a specific location by using the coordinates of samples included in the encoding unit as information indicating the position of the samples is not limited to the methods described above, and may include various arithmetic methods capable of using the coordinates of the samples.
[0137] According to an embodiment, the image decoding device 100 can divide the current encoding unit 600 into a plurality of encoding units 620a, 620b, and 620c, and can select one of the encoding units 620a, 620b, and 620c based on a specific criterion. For example, the image decoding device 100 can select encoding unit 620b, whose size is different from that of other encoding units, from the encoding units 620a, 620b, and 620c.
[0138] According to an embodiment, the image decoding device 100 can determine the width or height of each of the encoding units 620a, 620b, and 620c by using coordinates (xa, ya) indicating the position of the upper left sample point 630a of the upper encoding unit 620a, coordinates (xb, yb) indicating the position of the upper left sample point 630b of the middle encoding unit 620b, and coordinates (xc, yc) indicating the position of the upper left sample point 630c of the lower encoding unit 620c. The image decoding device 100 can determine the respective dimensions of the encoding units 620a, 620b, and 620c by using coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the encoding units 620a, 620b, and 620c. According to an embodiment, the image decoding device 100 can determine the width of the upper encoding unit 620a as the width of the current encoding unit 600. The image decoding device 100 can determine the height of the upper encoding unit 620a as yb-ya. According to an embodiment, the image decoding device 100 can determine the width of the intermediate encoding unit 620b as the width of the current encoding unit 600. The image decoding device 100 can determine the height of the intermediate encoding unit 620b as yc-yb. According to an embodiment, the image decoding device 100 can determine the width or height of the lower encoding unit 620c by using the width or height of the current encoding unit 600 or the width or height of the upper encoding unit 620a and the intermediate encoding unit 620b. The image decoding device 100 can determine an encoding unit with a size different from the dimensions of other encoding units based on the determined widths and heights of the encoding units 620a, 620b, and 620c. Referring to FIG6, the image decoding device 100 can determine the intermediate encoding unit 620b, which has a size different from the dimensions of the upper encoding unit 620a and the lower encoding unit 620c, as an encoding unit at a specific position. However, the above-described method performed by the image decoding device 100 to determine a coding unit with a size different from that of other coding units corresponds only to the example of determining a coding unit at a specific location by using the size of a coding unit determined based on the coordinates of a sample point. Therefore, various methods can be used to determine a coding unit at a specific location by comparing the size of a coding unit determined based on the coordinates of a specific sample point.
[0139] The image decoding device 100 can determine the width or height of each of the encoding units 660a, 660b, and 660c by using coordinates (xd, yd) indicating the position of the upper left sample 670a of the left encoding unit 660a, coordinates (xe, ye) indicating the position of the upper left sample 670b of the middle encoding unit 660b, and coordinates (xf, yf) indicating the position of the upper left sample 670c of the right encoding unit 660c. The image decoding device 100 can also determine the corresponding dimensions of the encoding units 660a, 660b, and 660c by using coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the encoding units 660a, 660b, and 660c.
[0140] According to an embodiment, the image decoding device 100 can determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 can determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 can determine the width of the middle coding unit 660b as xf-xe. The image decoding device 100 can determine the height of the middle coding unit 660b as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 can determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 or the width or height of the left coding unit 660a and the middle coding unit 660b. The image decoding device 100 can determine coding units with dimensions different from those of other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. Referring to FIG6, the image decoding device 100 can determine an intermediate encoding unit 660b, whose size differs from that of the left encoding unit 660a and the right encoding unit 660c, as an encoding unit at a specific location. However, the method described above by the image decoding device 100 for determining an encoding unit whose size differs from that of other encoding units corresponds only to the example of determining an encoding unit at a specific location by using the size of the encoding unit determined based on the coordinates of sample points. Therefore, various methods can be used to determine an encoding unit at a specific location by comparing the size of the encoding unit determined based on the coordinates of specific sample points.
[0141] However, the position of the sample points considered in determining the position of the coding unit is not limited to the upper left position mentioned above, and information about any position of the sample points included in the coding unit can be used.
[0142] According to an embodiment, the image decoding device 100 may consider the shape of the current coding unit and select a coding unit at a specific location from an odd number of coding units determined by dividing the current coding unit. For example, when the current coding unit has a non-square shape with a width greater than its height, the image decoding device 100 may determine a coding unit at a specific location along the horizontal direction. That is, the image decoding device 100 may determine one coding unit from the coding units at different locations along the horizontal direction and impose restrictions on that coding unit. When the current coding unit has a non-square shape with a height greater than its width, the image decoding device 100 may determine a coding unit at a specific location along the vertical direction. That is, the image decoding device 100 may determine one coding unit from the coding units at different locations along the vertical direction and may impose restrictions on that coding unit.
[0143] According to an embodiment, the image decoding device 100 can use information indicating the positions of each of the even-numbered coding units to determine a coding unit at a specific position among the even-numbered coding units. The image decoding device 100 can determine the even-numbered coding units by dividing (bi-dividing) the current coding unit, and can determine the coding unit at a specific position by using information about the positions of the even-numbered coding units. The associated operations correspond to the operations described above in detail with respect to FIG. 6 for determining a coding unit at a specific position (e.g., the center position) among the odd-numbered coding units, and therefore are not described in detail here.
[0144] According to an embodiment, when a non-square current coding unit is divided into multiple coding units, specific information about the coding unit at a specific location can be used in the division operation to determine the coding unit at that specific location among the multiple coding units. For example, the image decoding device 100 can use at least one of block shape information and division shape pattern information stored in the samples included in the intermediate coding unit to determine the coding unit at the center position among the multiple coding units determined by dividing the current coding unit in the division operation.
[0145] Referring to Figure 6, the image decoding device 100 can divide the current coding unit 600 into multiple coding units 620a, 620b, and 620c based on the division shape pattern information, and can determine the coding unit 620b at the center position among the multiple coding units 620a, 620b, and 620c. Furthermore, the image decoding device 100 can determine the coding unit 620b at the center position by considering the location where the division shape pattern information is obtained. That is, the division shape pattern information of the current coding unit 600 can be obtained from the sample point 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into multiple coding units 620a, 620b, and 620c based on the division shape pattern information, the coding unit 620b including the sample point 640 can be determined as the coding unit at the center position. However, the information used to determine the coding unit at the center position is not limited to the division shape pattern information, and various types of information can be used to determine the coding unit at the center position.
[0146] According to an embodiment, specific information for identifying a coding unit at a specific location can be obtained from specific samples included in the coding unit to be determined. Referring to FIG6, the image decoding device 100 can use the partitioning shape pattern information obtained from samples at a specific location in the current coding unit 600 (e.g., samples at the center of the current coding unit 600) to determine a coding unit at a specific location (e.g., a coding unit at the center of the partitioned coding units) among a plurality of coding units 620a, 620b, and 620c determined by partitioning the current coding unit 600. That is, the image decoding device 100 can determine the samples at a specific location by considering the block shape of the current coding unit 600, and can determine a coding unit 620b including samples from which specific information (e.g., partitioning shape pattern information) can be obtained from the plurality of coding units 620a, 620b, and 620c determined by partitioning the current coding unit 600, and can impose specific constraints on the coding unit 620b. Referring to FIG6, according to an embodiment, during the decoding operation, the image decoding device 100 may determine a sample 640 at the center position of the current encoding unit 600 as a sample from which specific information can be obtained, and may impose specific restrictions on the encoding unit 620b including the sample 640. However, the position of the sample from which specific information can be obtained is not limited to the above-described position, and may include any position of the sample included in the encoding unit 620b that will be determined for restriction.
[0147] According to an embodiment, the location of a sample point from which specific information can be obtained can be determined based on the shape of the current coding unit 600. According to an embodiment, block shape information can indicate whether the current coding unit has a square shape or a non-square shape, and the location of the sample point from which specific information can be obtained can be determined based on this shape. For example, the image decoding device 100 can determine a sample point located on a boundary that bisects at least one of the width and height of the current coding unit as a sample point from which specific information can be obtained by using at least one of information about the width and information about the height of the current coding unit. As another example, when the block shape information associated with the current coding unit indicates a non-square shape, the image decoding device 100 can determine one of the sample points adjacent to the boundary that bisects the longer side of the current coding unit as a sample point from which specific information can be obtained.
[0148] According to an embodiment, when the current coding unit is divided into multiple coding units, the image decoding device 100 can use partition shape pattern information to determine the coding unit at a specific location among the multiple coding units. According to an embodiment, the image decoding device 100 can obtain partition shape pattern information from samples at specific locations within the coding units, and can partition multiple coding units generated by partitioning the current coding unit using the partition shape pattern information, wherein the partition shape pattern information is obtained from samples at specific locations within each of the multiple coding units. That is, coding units can be recursively partitioned based on partition shape pattern information, wherein the partition shape pattern information is obtained from samples at specific locations within each coding unit. The operation of recursively partitioning coding units has already been described above with respect to FIG. 5, and therefore its detailed description will not be provided here.
[0149] According to an embodiment, the image decoding device 100 can determine one or more coding units by dividing the current coding unit, and can determine the order in which the one or more coding units are decoded based on a specific block (e.g., the current coding unit).
[0150] Figure 7 illustrates the order in which the image decoding device 100 processes the plurality of coding units when it determines the plurality of coding units by dividing the current coding unit, according to an embodiment.
[0151] According to an embodiment, based on the division shape pattern information, the image decoding device 100 can determine the second coding units 710a and 710b by dividing the first coding unit 700 in the vertical direction, determine the second coding units 730a and 730b by dividing the first coding unit 700 in the horizontal direction, or determine the second coding units 750a, 750b, 750c and 750d by dividing the first coding unit 700 in both the vertical and horizontal directions.
[0152] Referring to FIG7, the image decoding device 100 may determine to process second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction in a horizontal direction sequence 710c. The image decoding device 100 may determine to process second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction in a vertical direction sequence 730c. The image decoding device 100 may determine to process second coding units 750a, 750b, 750c, and 750d determined by dividing the first coding unit 700 in the vertical and horizontal directions in a specific order (e.g., according to raster scan order or zigzag scan order 750e), wherein the specific order is used to process coding units in one row and then process coding units in the next row.
[0153] According to an embodiment, the image decoding device 100 can recursively divide the coding units. Referring to FIG7, the image decoding device 100 can determine a plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c and 750d by dividing the first coding unit 700, and can recursively divide each of the determined plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c and 750d. The method of dividing the plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c and 750d can correspond to the method of dividing the first coding unit 700. Thus, each of the plurality of coding units 710a and 710b, 730a and 730b, or 750a, 750b, 750c and 750d can be independently divided into a plurality of coding units. Referring to FIG7, the image decoding device 100 can determine the second coding units 710a and 710b by dividing the first coding unit 700 in the vertical direction, and can determine whether to independently divide or not divide each of the second coding units 710a and 710b.
[0154] According to an embodiment, the image decoding device 100 can determine the third coding units 720a and 720b by dividing the left second coding unit 710a in the horizontal direction, and may not divide the right second coding unit 710b.
[0155] According to an embodiment, the processing order of coding units can be determined based on the operation of dividing coding units. In other words, the processing order of the divided coding units can be determined based on the processing order of the coding units immediately preceding the division. The image decoding device 100 can determine the processing order of the third coding units 720a and 720b determined by dividing the left second coding unit 710a independently of the right second coding unit 710b. Because the third coding units 720a and 720b are determined by dividing the left second coding unit 710a in the horizontal direction, the third coding units 720a and 720b can be processed in the vertical order 720c. Because the left second coding unit 710a and the right second coding unit 710b are processed in the horizontal order 710c, the right second coding unit 710b can be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed in the vertical order 720c. The operation of determining the processing order of coding units based on the coding units before partitioning is not limited to the above example, and various methods can be used to process the partitioned coding units and the coding units determined to be of various shapes independently in a specific order.
[0156] Figure 8 illustrates the process performed by the image decoding device 100, according to an embodiment, to determine that the current coding unit will be divided into an odd number of coding units when the coding units cannot be processed in a specific order.
[0157] According to an embodiment, the image decoding device 100 can determine that the current coding unit will be divided into an odd number of coding units based on the obtained division shape pattern information. Referring to FIG8, the square first coding unit 800 can be divided into non-square second coding units 810a and 810b, and the second coding units 810a and 810b can be independently divided into third coding units 820a and 820b, as well as 820c, 820d, and 820e. According to an embodiment, the image decoding device 100 can determine a plurality of third coding units 820a and 820b by dividing the left second coding unit 810a in the horizontal direction, and can divide the right second coding unit 810b into an odd number of third coding units 820c, 820d, and 820e.
[0158] According to an embodiment, the image decoding device 100 can determine whether any coding unit is divided into an odd number of coding units by determining whether the third coding units 820a and 820b, as well as 820c, 820d and 820e, can be processed in a specific order. Referring to FIG8, the image decoding device 100 can determine the third coding units 820a and 820b, as well as 820c, 820d and 820e, by recursively dividing the first coding unit 800. The image decoding device 100 can determine whether any one of the following coding units is divided into an odd number of coding units based on at least one of block shape information and division shape pattern information: the first coding unit 800, the second coding units 810a and 810b, and the third coding units 820a and 820b, as well as 820c, 820d and 820e. For example, the rightmost second coding unit 810b of the second coding units 810a and 810b can be divided into an odd number of third coding units 820c, 820d and 820e. The processing order of the multiple coding units included in the first coding unit 800 can be a specific order (e.g., zigzag scanning order 830). The image decoding device 100 can determine whether the third coding units 820c, 820d, and 820e, which are determined by dividing the right second coding unit 810b into an odd number of coding units, meet the conditions for processing in a specific order.
[0159] According to an embodiment, the image decoding device 100 can determine whether the third encoding units 820a and 820b, and 820c to 820e included in the first encoding unit 800 satisfy a condition for processing in a specific order, and this condition relates to whether at least one of the width and height of the second encoding units 810a and 810b is halved along the boundary of the third encoding units 820a and 820b, and 820c to 820e. For example, the third encoding units 820a and 820b determined when the height of the non-square-shaped left second encoding unit 810a is halved can satisfy the condition. Because the boundary of the third encoding units 820c, 820d, and 820e determined when the right second encoding unit 810b is divided into three encoding units fails to halve the width or height of the right second encoding unit 810b, it can be determined that the third encoding units 820c, 820d, and 820e do not satisfy the condition. When the conditions described above are not met, the image decoding device 100 can determine that the scanning order is discontinuous, and based on the determination result, can determine that the right-side second coding unit 810b will be divided into an odd number of coding units. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 can impose specific restrictions on the coding units at specific positions within the divided coding units. These restrictions or specific positions have been described above with respect to various embodiments, and therefore their detailed description will not be provided here.
[0160] Figure 9 illustrates a process performed by an image decoding device 100 according to an embodiment, which involves dividing a first encoding unit 900 to determine at least one encoding unit.
[0161] According to an embodiment, the image decoding device 100 can divide the first coding unit 900 based on division shape pattern information obtained by a receiver (not shown). The square first coding unit 900 can be divided into four square coding units, or it can be divided into multiple non-square coding units. For example, referring to FIG9, when the division shape pattern information indicates that the first coding unit 900 should be divided into non-square coding units, the image decoding device 100 can divide the first coding unit 900 into multiple non-square coding units. Specifically, when the division shape pattern information indicates that an odd number of coding units should be determined by dividing the first coding unit 900 in the horizontal or vertical direction, the image decoding device 100 can divide the square first coding unit 900 into an odd number of coding units (e.g., second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 in the vertical direction, or second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction).
[0162] According to an embodiment, the image decoding device 100 can determine whether the second encoding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first encoding unit 900 satisfy a condition for processing in a specific order, and this condition relates to whether at least one of the width and height of the first encoding unit 900 is halved along the boundaries of the second encoding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to FIG9, since the boundaries of the second encoding units 910a, 910b, and 910c determined by the first encoding unit 900, which is divided into squares in the vertical direction, do not halve the width of the first encoding unit 900, it can be determined that the first encoding unit 900 does not satisfy the condition for processing in a specific order. Furthermore, because the boundaries of the second coding units 920a, 920b, and 920c, defined by the first coding unit 900 which divides the square in the horizontal direction, do not halve the height of the first coding unit 900, it can be determined that the first coding unit 900 does not meet the conditions for processing in a specific order. When the conditions are not met as described above, the image decoding device 100 can determine that the scanning order is discontinuous, and can determine, based on the determination result, that the first coding unit 900 is divided into an odd number of coding units. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 can impose specific restrictions on the coding units at specific positions within the divided coding units. These restrictions or specific positions have already been described above with respect to various embodiments, and therefore will not be described in detail here.
[0163] According to an embodiment, the image decoding device 100 can determine coding units of various shapes by dividing a first coding unit.
[0164] Referring to Figure 9, the image decoding device 100 can divide the square first encoding unit 900 or the non-square first encoding unit 930 or 950 into encoding units of various shapes.
[0165] Figure 10 shows that, according to an embodiment, when the image decoding device 100 divides the first encoding unit 1000 and determines a second encoding unit with a non-square shape, the shape of the second encoding unit is limited if certain conditions are met.
[0166] According to an embodiment, the image decoding device 100 can determine, based on the division shape pattern information obtained by a receiver (not shown), to divide a square first coding unit 1000 into non-square second coding units 1010a and 1010b, or 1020a and 1020b. The second coding units 1010a and 1010b, or 1020a and 1020b, can be divided independently. Thus, the image decoding device 100 can determine, based on the division shape pattern information of each of the second coding units 1010a and 1010b, or 1020a and 1020b, to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b, into multiple coding units, or not to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b. According to an embodiment, the image decoding device 100 can determine the third coding units 1012a and 1012b by dividing the non-square left second coding unit 1010a, determined by dividing the first coding unit 1000 in the vertical direction, in the horizontal direction. However, when the left second coding unit 1010a is divided in the horizontal direction, the image decoding device 100 can restrict the right second coding unit 1010b to not be divided in the horizontal direction in which the left second coding unit 1010a is divided. When the third coding units 1014a and 1014b are determined by dividing the right second coding unit 1010b in the same direction, since the left second coding unit 1010a and the right second second coding unit 1010b are divided independently in the horizontal direction, the third coding units 1012a and 1012b, or 1014a and 1014b, can be determined. However, this situation works in the same way as when the image decoding device 100 divides the first encoding unit 1000 into four squares, namely the second encoding units 1030a, 1030b, 1030c and 1030d, based on the division shape pattern information, and may be inefficient in terms of image decoding.
[0167] According to an embodiment, the image decoding device 100 can determine third coding units 1022a and 1022b, or 1024a and 1024b, by dividing a non-square second coding unit 1020a or 1020b, determined by dividing a first coding unit 1000 in the horizontal direction, in the vertical direction. However, when a second coding unit (e.g., the upper second coding unit 1020a) is divided in the vertical direction, for the reasons described above, the image decoding device 100 can restrict another second coding unit (e.g., the lower second coding unit 1020b) to not be divided in the vertical direction in which the upper second coding unit 1020a is divided.
[0168] Figure 11 illustrates the process of dividing a square coding unit by an image decoding device 100 when the division shape pattern information cannot indicate that the square coding unit is divided into four square coding units, according to an embodiment.
[0169] According to an embodiment, the image decoding device 100 can determine second coding units 1110a and 1110b, or 1120a and 1120b, etc., by dividing the first coding unit 1100 based on division shape pattern information. The division shape pattern information may include information about various methods of dividing the coding units, but may not include information for dividing the coding unit into four square coding units. Based on such division shape pattern information, the image decoding device 100 may not divide the square first coding unit 1100 into four square coding units 1130a, 1130b, 1130c, and 1130d. The image decoding device 100 can determine non-square second coding units 1110a and 1110b, or 1120a and 1120b, etc., based on the division shape pattern information.
[0170] According to an embodiment, the image decoding device 100 can independently divide non-square second coding units 1110a and 1110b, or 1120a and 1120b, etc. Each of the second coding units 1110a and 1110b, or 1120a and 1120b, etc., can be recursively divided in a specific order, and this division method can correspond to the method of dividing the first coding unit 1100 based on the division shape pattern information.
[0171] For example, the image decoding device 100 can determine the third coding units 1112a and 1112b of the square by dividing the left second coding unit 1110a in the horizontal direction, and can determine the third coding units 1114a and 1114b of the square by dividing the right second coding unit 1110b in the horizontal direction. Furthermore, the image decoding device 100 can determine the third coding units 1116a, 1116b, 1116c, and 1116d of the square by dividing both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction. In this case, coding units with the same shape as the second coding units 1130a, 1130b, 1130c, and 1130d of the four squares divided from the first coding unit 1100 can be determined.
[0172] As another example, the image decoding device 100 can determine the third coding units 1122a and 1122b of the square by dividing the upper second coding unit 1120a in the vertical direction, and can determine the third coding units 1124a and 1124b of the square by dividing the lower second coding unit 1120b in the vertical direction. Furthermore, the image decoding device 100 can determine the third coding units 1126a, 1126b, 1126c, and 1126d of the square by dividing both the upper second coding unit 1120a and the lower second coding unit 1120b in the vertical direction. In this case, coding units with the same shape as the second coding units 1130a, 1130b, 1130c, and 1130d of the four squares divided from the first coding unit 1100 can be determined.
[0173] Figure 12 shows that the processing order among multiple coding units according to an embodiment can be changed according to the process of dividing the coding units.
[0174] According to an embodiment, the image decoding device 100 can divide the first coding unit 1200 based on the division shape pattern information. When the block shape indicates a square shape and the division shape pattern information indicates that the first coding unit 1200 is divided in at least one direction, either horizontal or vertical, the image decoding device 100 can determine second coding units 1210a and 1210b, or 1220a and 1220b, etc., by dividing the first coding unit 1200. Referring to FIG12, the non-square second coding units 1210a and 1210b, or 1220a and 1220b, determined by dividing the first coding unit 1200 only in the horizontal or vertical direction, can be independently divided based on the division shape pattern information of each coding unit. For example, the image decoding device 100 can determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction. The operation of dividing the second coding units 1210a and 1210b, or 1220a and 1220b, has already been described above with respect to FIG. 11, so its detailed description will not be provided here.
[0175] According to an embodiment, the image decoding device 100 can process encoding units in a specific order. The operation of processing encoding units in a specific order has already been described above with reference to FIG. 7, therefore its detailed description will not be provided here. Referring to FIG. 12, the image decoding device 100 can determine the processing order of the four square third encoding units 1216a, 1216b, 1216c, and 1216d, as well as 1226a, 1226b, 1226c, and 1226d, by dividing the first encoding unit 1200 into squares. According to an embodiment, the image decoding device 100 can determine the processing order of the third encoding units 1216a, 1216b, 1216c, and 1216d, as well as 1226a, 1226b, 1226c, and 1226d, based on the division method of the first encoding unit 1200.
[0176] According to an embodiment, the image decoding device 100 can determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can process the third coding units 1216a, 1216b, 1216c, and 1216d in the following processing order 1217: first, the third coding units 1216a and 1216c included in the left second coding unit 1210a are processed in the vertical direction, and then the third coding units 1216b and 1216d included in the right second coding unit 1210b are processed in the vertical direction.
[0177] According to an embodiment, the image decoding device 100 can determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction, and can process the third coding units 1226a, 1226b, 1226c, and 1226d in the following processing order 1227: firstly, the third coding units 1226a and 1226b included in the upper second coding unit 1220a are processed in the horizontal direction, and then the third coding units 1226c and 1226d included in the lower second coding unit 1220b are processed in the horizontal direction.
[0178] Referring to Figure 12, the third coding units 1216a, 1216b, 1216c, and 1216d, as well as 1226a, 1226b, 1226c, and 1226d of the square can be determined by dividing the second coding units 1210a and 1210b, and 1220a and 1220b, respectively. Although the second coding units 1210a and 1210b determined by dividing the first coding unit 1200 in the vertical direction are different from the second coding units 1220a and 1220b determined by dividing the first coding unit 1200 in the horizontal direction, the third coding units 1216a, 1216b, 1216c, and 1216d, as well as the third coding units 1226a, 1226b, 1226c, and 1226d derived from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b, ultimately show coding units of the same shape derived from the first coding unit 1200. Thus, by recursively dividing the coding units in different ways based on the division shape pattern information, even if the coding units are ultimately determined to have the same shape, the image decoding device 100 can process multiple coding units in different orders.
[0179] Figure 13 illustrates the process of determining the depth of a coding unit when the shape and size of the coding unit change, according to an embodiment, as the coding unit is recursively divided such that multiple coding units are determined.
[0180] According to an embodiment, the image decoding device 100 can determine the depth of a coding unit based on a specific criterion. For example, the specific criterion may be the length of the long side of the coding unit. When the length of the long side of the coding unit before partitioning is 2n (n>0) times the length of the long side of the current coding unit after partitioning, the image decoding device 100 can determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before partitioning. In the following description, a coding unit with an increased depth is referred to as a deeper coding unit.
[0181] Referring to FIG13, according to an embodiment, the image decoding device 100 can determine a deeper second coding unit 1302 and a third coding unit 1304 by dividing a square into a first coding unit 1300 based on block shape information indicating the shape of the square (e.g., the block shape information may be represented as "0: SQUARE"). Assuming the size of the first coding unit 1300 is 2N×2N, the second coding unit 1302, determined by dividing the width and height of the first coding unit 1300 by half, can have a size of N×N. Furthermore, the third coding unit 1304, determined by dividing the width and height of the second coding unit 1302 by half, can have a size of N / 2×N / 2. In this case, the width and height of the third coding unit 1304 are 1 / 4 of the width and height of the first coding unit 1300. When the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, whose width and height are half of the width and height of the first coding unit 1300, can be D+1, and the depth of the third coding unit 1304, whose width and height are one-quarter of the width and height of the first coding unit 1300, can be D+2.
[0182] According to an embodiment, the image decoding device 100 can determine a deeper second encoding unit 1312 or 1322 and a third encoding unit 1314 or 1324 by dividing a non-square first encoding unit 1310 or 1320 based on block shape information indicating a non-square shape (e.g., the block shape information can be represented as "1: NS_VER" indicating a non-square shape with a height greater than its width, or as "2: NS_HOR" indicating a non-square shape with a width greater than its height).
[0183] The image decoding device 100 can determine the second encoding unit 1302, 1312, or 1322 by dividing the width and height of the first encoding unit 1310, which has a size of N×2N. That is, the image decoding device 100 can determine the second encoding unit 1302 or the second encoding unit 1322 with a size of N×N by dividing the first encoding unit 1310 in the horizontal direction, or it can determine the second encoding unit 1312 with a size of N / 2×N by dividing the first encoding unit 1310 in both the horizontal and vertical directions.
[0184] According to an embodiment, the image decoding device 100 can determine the second encoding unit 1302, 1312, or 1322 by dividing the width and height of the first encoding unit 1320, which has a size of 2N×N. That is, the image decoding device 100 can determine the second encoding unit 1302 or the second encoding unit 1312 with a size of N×N by dividing the first encoding unit 1320 in the vertical direction, or it can determine the second encoding unit 1322 with a size of N×N / 2 by dividing the first encoding unit 1320 in both the horizontal and vertical directions.
[0185] According to an embodiment, the image decoding device 100 can determine a third encoding unit 1304, 1314, or 1324 by dividing the width and height of a second encoding unit 1302 with a size of N×N. That is, the image decoding device 100 can determine a third encoding unit 1304 with a size of N / 2×N / 2, a third encoding unit 1314 with a size of N / 4×N / 2, or a third encoding unit 1324 with a size of N / 2×N / 4 by dividing the second encoding unit 1302 in the vertical and horizontal directions.
[0186] According to an embodiment, the image decoding device 100 can determine the third encoding unit 1304, 1314, or 1324 by dividing the width and height of the second encoding unit 1312, which has a size of N / 2 × N. That is, the image decoding device 100 can determine the third encoding unit 1304 or the third encoding unit 1324 with a size of N / 2 × N / 4 by dividing the second encoding unit 1312 in the horizontal direction, or it can determine the third encoding unit 1314 with a size of N / 4 × N / 2 by dividing the second encoding unit 1312 in both the vertical and horizontal directions.
[0187] According to an embodiment, the image decoding device 100 can determine the third encoding unit 1304, 1314, or 1324 by dividing the width and height of the second encoding unit 1322, which has a size of N×N / 2. That is, the image decoding device 100 can determine the third encoding unit 1304 or the third encoding unit 1314 with a size of N / 2×N / 2 by dividing the second encoding unit 1322 in the vertical direction, or it can determine the third encoding unit 1324 with a size of N / 2×N / 4 by dividing the second encoding unit 1322 in both the vertical and horizontal directions.
[0188] According to an embodiment, the image decoding device 100 can divide square coding units 1300, 1302, or 1304 in the horizontal or vertical direction. For example, the image decoding device 100 can determine a first coding unit 1310 of size N×2N by dividing a first coding unit 1300 of size 2N×2N in the vertical direction, or it can determine a first coding unit 1320 of size 2N×N by dividing a first coding unit 1300 of size 2N×2N in the horizontal direction. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing a first coding unit 1300 of size 2N×2N in the horizontal or vertical direction can be equal to the depth of the first coding unit 1300.
[0189] According to an embodiment, the width and height of the third encoding unit 1314 or 1324 can be 1 / 4 of the width and height of the first encoding unit 1310 or 1320. When the depth of the first encoding unit 1310 or 1320 is D, the depth of the second encoding unit 1312 or 1322, whose width and height are 1 / 2 of the width and height of the first encoding unit 1310 or 1320, can be D+1, and the depth of the third encoding unit 1314 or 1324, whose width and height are 1 / 4 of the width and height of the first encoding unit 1310 or 1320, can be D+2.
[0190] Figure 14 illustrates the depth that can be determined based on the shape and size of the coding unit according to an embodiment, as well as the partial index (PID) used to distinguish the coding units.
[0191] According to an embodiment, the image decoding device 100 can determine second coding units of various shapes by dividing the first coding unit 1400 into squares. Referring to FIG14, the image decoding device 100 can determine second coding units 1402a and 1402b, second coding units 1404a and 1404b, and second coding units 1406a, 1406b, 1406c, and 1406d by dividing the first coding unit 1400 in at least one direction, in the vertical and horizontal directions, based on the division shape pattern information. That is, the image decoding device 100 can determine the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d based on the division shape pattern information of the first coding unit 1400.
[0192] According to an embodiment, the depths of the second coding units 1402a and 1402b, second coding units 1404a and 1404b, and second coding units 1406a, 1406b, 1406c, and 1406d, determined based on the division shape pattern information of the square first coding unit 1400, can be determined based on the length of their longer sides. For example, since the length of the side of the square first coding unit 1400 is equal to the length of the longer side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b can have the same depth, such as D. However, when the image decoding device 100 divides the first encoding unit 1400 into four square second encoding units 1406a, 1406b, 1406c and 1406d based on the division shape pattern information, the depth of the second encoding units 1406a, 1406b, 1406c and 1406d can be D+1 deeper than the depth D of the first encoding unit 1400 because the length of the side of the square second encoding units 1406a, 1406b, 1406c and 1406d is 1 / 2 the length of the side of the first encoding unit 1400.
[0193] According to an embodiment, the image decoding device 100 can determine a plurality of second encoding units 1412a and 1412b, as well as 1414a, 1414b, and 1414c, by dividing a first encoding unit 1410 in the horizontal direction with a height greater than its width based on division shape pattern information. According to an embodiment, the image decoding device 100 can determine a plurality of second encoding units 1422a and 1422b, as well as 1424a, 1424b, and 1424c, by dividing a first encoding unit 1420 in the vertical direction with a width greater than its height based on division shape pattern information.
[0194] According to an embodiment, the depths of the second coding units 1412a and 1412b, and 1414a, 1414b and 1414c, or 1422a and 1422b, and 1424a, 1424b and 1424c, determined based on the division shape pattern information of the non-square first coding unit 1410 or 1420, can be determined based on the length of their longer sides. For example, since the length of the side of the square second coding units 1412a and 1412b is half the length of the longer side of the non-square first coding unit 1410 whose height is greater than its width, the depth of the square second coding units 1412a and 1412b is D+1 deeper than the depth D of the non-square first coding unit 1410.
[0195] Furthermore, the image decoding device 100 can divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division shape pattern information. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, since the length of the long side of the non-square second coding units 1414a and 1414c and the length of the side of the square second coding unit 1414b are half the length of the long side of the first coding unit 1410, the depth of the second coding units 1414a, 1414b, and 1414c can be D+1, which is 1 deeper than the depth D of the non-square first coding unit 1410. The image decoding device 100 can determine the depth of the coding unit divided from the first coding unit 1420, which has a width longer than its height and has a non-square shape, by using the method described above for determining the depth of the coding unit divided from the first coding unit 1410.
[0196] According to an embodiment, when an odd number of the divided coding units do not have equal sizes, the image decoding device 100 can determine the PID used to identify the divided coding units based on the size ratio between the coding units. Referring to FIG14, the width of the coding unit 1414b at the center of the odd number of divided coding units 1414a, 1414b, and 1414c may be equal to the width of the other coding units 1414a and 1414c, and its height may be twice the height of the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b at the center may include two other coding units 1414a or 1414c. Therefore, when the PID of the coding unit 1414b at the center is 1 based on the scan order, the PID of the coding unit 1414c located adjacent to the coding unit 1414b may be increased by 2 and thus may be 3. That is, there may be discontinuous PID values. According to an embodiment, the image decoding device 100 can determine whether an odd number of divided coding units do not have equal sizes based on whether there is a discontinuity in the PID used to identify the divided coding units.
[0197] According to an embodiment, the image decoding device 100 may determine whether to use a specific partitioning method based on PID values used to identify multiple coding units determined by partitioning the current coding unit. Referring to FIG14, the image decoding device 100 may determine an even number of coding units 1412a and 1412b or an odd number of coding units 1414a, 1414b and 1414c by partitioning a first coding unit 1410 having a rectangular shape with a height longer than its width. The image decoding device 100 may use the PID indicating the corresponding coding unit to identify the corresponding coding unit. According to an embodiment, the PID may be obtained from a sample point at a specific location of each coding unit (e.g., the upper left sample point).
[0198] According to an embodiment, the image decoding device 100 can determine the coding unit at a specific location within the divided coding units by using a PID for distinguishing coding units. According to an embodiment, when the division shape pattern information of a first coding unit 1410 having a rectangular shape with a height greater than its width indicates that the coding unit should be divided into three coding units, the image decoding device 100 can divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding device 100 can assign a PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding device 100 can compare the PIDs of an odd number of divided coding units to determine the coding unit at the center position within the coding units. The image decoding device 100 can determine the coding unit 1414b, whose PID corresponds to the median value among the PIDs of the coding units, as the coding unit at the center position within the coding units determined by dividing the first coding unit 1410. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding device 100 can determine the PID used to distinguish the divided coding units based on the size ratio between the coding units. Referring to FIG14, the width of the coding unit 1414b generated by dividing the first coding unit 1410 can be equal to the width of the other coding units 1414a and 1414c, and its height can be twice the height of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c located adjacent to the coding unit 1414b can be increased by 2 and therefore can be 3. When the PID does not increase uniformly as described above, the image decoding device 100 can determine that the coding unit is divided into a plurality of coding units, wherein the plurality of coding units includes coding units with sizes different from those of the other coding units. According to an embodiment, when the partitioning shape pattern information indicates that the coding unit should be divided into an odd number of coding units, the image decoding device 100 may partition the current coding unit in such a way that the coding unit at a specific position (e.g., the coding unit at the center position) among the odd number of coding units has a size different from that of the other coding units. In this case, the image decoding device 100 can determine the coding unit at the center position with a different size by using the PID of the coding unit. However, the PID of the coding unit at a specific position and the size or position are not limited to the examples described above, and various PIDs of coding units as well as various positions and sizes can be used.
[0199] According to an embodiment, the image decoding device 100 may use a specific data unit, in which encoding units are recursively divided.
[0200] Figure 15 illustrates the determination of multiple encoding units based on multiple specific data units included in the picture according to an embodiment.
[0201] According to an embodiment, a specific data unit can be defined as a data unit that recursively divides coding units by using division shape pattern information. That is, a specific data unit can correspond to a coding unit used to determine the highest depth of multiple coding units divided from the current frame. In the following description, for ease of explanation, the specific data unit is referred to as a reference data unit.
[0202] According to an embodiment, the reference data unit may have a specific size and a specific shape. According to an embodiment, the reference data unit may include M×N sample points. Here, M and N may be equal to each other and may be integers represented as powers of 2. That is, the reference data unit may have a square shape or a non-square shape and may be divided into an integer number of encoding units.
[0203] According to an embodiment, the image decoding device 100 can divide the current frame into multiple reference data units. According to an embodiment, the image decoding device 100 can divide the multiple reference data units from the current frame using the division shape pattern information of each reference data unit. The operation of dividing the reference data units can correspond to a division operation using a quadtree structure.
[0204] According to an embodiment, the image decoding device 100 can predetermine the minimum allowed size of the reference data units included in the current frame. Therefore, the image decoding device 100 can determine various reference data units having sizes equal to or greater than the minimum size, and can determine one or more coding units by referring to the determined reference data units and using partitioning shape pattern information.
[0205] Referring to FIG15, the image decoding device 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined based on various data units (e.g., sequences, frames, stripes, strip segments, parallel blocks, parallel block groups, maximum coding units, etc.) that can include one or more reference coding units.
[0206] According to an embodiment, the receiver (not shown) of the image decoding device 100 can obtain from the bitstream at least one of reference coding unit shape information and reference coding unit size information for each of the various data units. The operation of dividing a square reference coding unit 1500 into one or more coding units has already been described above with respect to the operation of dividing the current coding unit 300 in FIG. 3, and the operation of dividing a non-square reference coding unit 1502 into one or more coding units has already been described above with respect to the operation of dividing the current coding unit 400 or 450 in FIG. 4. Therefore, a detailed description thereof will not be provided here.
[0207] According to an embodiment, the image decoding device 100 can determine the size and shape of a reference coding unit using a PID (PID) for identifying the size and shape of the reference coding unit, based on a set of data units predetermined according to specific conditions. That is, the receiver (not shown) can obtain from the bitstream only the PID for identifying the size and shape of the reference coding unit for each slice, slice segment, parallel block, parallel block group, or maximum coding unit, wherein the slice, slice segment, parallel block, parallel block group, or maximum coding unit is a data unit (e.g., a data unit with a size equal to or smaller than the slice) among various data units (e.g., a sequence, a frame, a slice, a slice segment, a parallel block, a parallel block group, a maximum coding unit, etc.) that meets specific conditions (e.g., a data unit with a size equal to or smaller than the slice). The image decoding device 100 can determine the size and shape of the reference coding unit for each data unit that meets the specific conditions by using the PID. When obtaining and using reference coding unit shape information and reference coding unit size information from the bitstream based on each data unit with a relatively small size, the efficiency of using the bitstream may be low, and therefore, it is preferable to obtain and use only the PID, rather than directly obtaining the reference coding unit shape information and reference coding unit size information. In this case, at least one of the dimensions and shapes of the reference coding unit corresponding to the PID used to identify the dimensions and shape of the reference coding unit can be predetermined. That is, the image decoding device 100 can determine at least one of the dimensions and shapes of the reference coding unit included in the data unit used as the unit for obtaining the PID by selecting at least one of the dimensions and shapes of the reference coding unit predetermined based on the PID.
[0208] According to an embodiment, the image decoding device 100 may use one or more reference coding units included in the maximum coding unit. That is, the maximum coding unit divided from the image may include one or more reference coding units, and the coding unit can be determined by recursively dividing each reference coding unit. According to an embodiment, at least one of the width and height of the maximum coding unit may be an integer multiple of at least one of the width and height of the reference coding unit. According to an embodiment, the size of the reference coding unit can be obtained by dividing the maximum coding unit n times based on a quadtree structure. That is, according to an embodiment, the image decoding device 100 may determine the reference coding unit by dividing the maximum coding unit n times based on a quadtree structure, and may divide the reference coding unit based on at least one of block shape information and division shape pattern information.
[0209] Figure 16 illustrates a processing block according to an embodiment of the present disclosure, used for determining the order of reference coding units included in the frame 1600.
[0210] According to embodiments of this disclosure, the image decoding device 100 can determine at least one processing block for dividing a screen. A processing block refers to a data unit that includes at least one reference coding unit for dividing the image, and the at least one reference coding unit included in the processing block can be determined in a specific order. That is, the order in which the at least one reference coding unit in each processing block is determined can be one of various orders for determining reference coding units, and the order in which the reference coding units in each processing block are determined can be different for each processing block. The order in which the reference coding units are determined for each processing block can be one of various orders, such as raster scan order, zigzag scan order, N-shaped scan order, upper right diagonal scan order, horizontal scan order, and vertical scan order, but is not limited thereto.
[0211] According to embodiments of this disclosure, the image decoding device 100 can determine the size of at least one processing block included in an image by obtaining processing block size information. The image decoding device 100 can determine the size of at least one processing block included in an image by obtaining processing block size information from a bitstream. The size of the at least one processing block can be the size of a data unit indicated by the processing block size information.
[0212] According to embodiments of this disclosure, a receiver (not shown) of the image decoding device 100 can obtain processing block size information for a specific data unit from a bitstream. For example, processing block size information can be obtained from the bitstream for data units (such as images, sequences, frames, stripes, strip segments, parallel blocks, and groups of parallel blocks). That is, the receiver can obtain processing block size information for each data unit within the data unit from the bitstream, and the image decoding device 100 can determine the size of at least one processing block used to divide a frame by using the obtained processing block size information. The size of the at least one processing block can be an integer multiple of the size of a reference coding unit.
[0213] According to embodiments of this disclosure, the image decoding device 100 can determine the dimensions of processing blocks 1602 and 1612 included in the frame 1600. For example, the image decoding device 100 can determine the dimensions of the processing blocks based on processing block size information obtained from the bitstream. Referring to FIG16, according to embodiments of this disclosure, the image decoding device 100 can determine the width of processing blocks 1602 and 1612 to be four times the width of a reference coding unit, and determine the height of processing blocks 1602 and 1612 to be four times the height of a reference coding unit. The image decoding device 100 can determine the order in which at least one reference coding unit in the at least one processing block is determined.
[0214] According to embodiments of the present disclosure, the image decoding device 100 may determine processing blocks 1602 and 1612 included in the image 1600 based on the size of the at least one processing block, and determine the order in which at least one reference coding unit in processing blocks 1602 and 1612 is determined. According to embodiments of the present disclosure, the operation of determining the reference coding unit may include determining the size of the reference coding unit.
[0215] According to embodiments of this disclosure, the image decoding device 100 can obtain information from a bitstream relating to determining the order of at least one reference coding unit included in at least one processing block, and determine the order of the at least one reference coding unit based on the obtained order information. The order information can be defined as the order or direction in which the reference coding units are determined within the processing block. That is, the order of the reference coding units can be determined independently for each processing block.
[0216] According to embodiments of this disclosure, the image decoding device 100 can obtain information from the bitstream relating to the order of determining reference coding units for each specific data unit. For example, a receiver can obtain information from the bitstream relating to the order of determining reference coding units for each data unit (such as an image, sequence, frame, strip, strip fragment, or processing block). Because the information relating to the order of determining reference coding units indicates the order of determining reference coding units within a processing block, information about the order can be obtained for each specific data unit comprising an integer number of processing blocks.
[0217] According to embodiments of this disclosure, the image decoding device 100 may determine at least one reference coding unit based on the said sequence.
[0218] According to embodiments of this disclosure, the receiver can obtain information related to the order of determining reference coding units from the bitstream as information associated with processing blocks 1602 and 1612, and the image decoding device 100 can determine the order of the reference coding units included in processing blocks 1602 and 1612, and determine at least one reference coding unit included in the frame 1600 based on the determined order. Referring to FIG16, the image decoding device 100 can determine orders 1604 and 1614 for determining at least one reference coding unit associated with processing blocks 1602 and 1612, respectively. For example, when information related to the order of determining reference coding units is obtained for each processing block, the orders 1604 and 1614 associated with processing blocks 1602 and 1612 may be different for each processing block. When the order 1604 associated with processing block 1602 is a raster scan order, the reference coding unit included in processing block 1602 can be determined according to the raster scan order. When the order 1614 associated with the processing block 1612 is the reverse of the raster scan order, the reference coding unit included in the processing block 1612 can be determined according to the order that is the reverse of the raster scan order.
[0219] According to embodiments of this disclosure, the image decoding device 100 can decode at least one determined reference coding unit. The image decoding device 100 can decode an image based on the reference coding unit determined according to the above embodiments. Methods for decoding the reference coding unit may include various methods for decoding an image.
[0220] According to an embodiment, the image decoding device 100 can obtain block shape information indicating the shape of the current coding unit or partition shape pattern information indicating the partitioning method of the current coding unit from the bitstream, and can use the obtained information. The partition shape pattern information can be included in the bitstream associated with various data units. For example, the image decoding device 100 can use the partition shape pattern information included in sequence parameter sets, picture parameter sets, video parameter sets, strip headers, strip segment headers, parallel block headers, or parallel block group headers. Furthermore, the image decoding device 100 can obtain syntax elements corresponding to the block shape information or partition shape pattern information from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and can use the obtained syntax elements.
[0221] The method for determining partitioning rules according to embodiments of the present disclosure will be described in detail below.
[0222] Image decoding device 100 can determine the partitioning rules of an image. The partitioning rules can be predetermined between image decoding device 100 and image encoding device 150. Image decoding device 100 can determine the partitioning rules based on information obtained from the bitstream. Image decoding device 100 can determine the partitioning rules based on information obtained from at least one of sequence parameter set, picture parameter set, video parameter set, strip header, strip segment header, parallel block header, and parallel block group header. Image decoding device 100 can determine the partitioning rules differently based on frames, stripes, time layers, maximum coding units, or coding units.
[0223] Image decoding device 100 may determine partitioning rules based on the block shape of the coding unit. The block shape may include the size, shape, aspect ratio, and orientation of the coding unit. Image encoding device 150 and image decoding device 100 may predetermine the partitioning rules based on the block shape of the coding unit. However, this disclosure is not limited thereto. Image decoding device 100 may determine partitioning rules based on information obtained from the bitstream received from image encoding device 150.
[0224] The shape of the encoding unit may include a square and a non-square shape. When the width and height of the encoding unit are equal, the image decoding device 100 may determine the shape of the encoding unit as a square. Furthermore, when the width and height of the encoding unit are not equal, the image decoding device 100 may determine the shape of the encoding unit as a non-square shape.
[0225] The size of the coding unit can include various sizes, such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8, and up to 256×256. The size of the coding unit can be classified based on the length of its long side, the length of its short side, or its area. The image decoding device 100 can apply the same classification rules to coding units classified into the same group. For example, the image decoding device 100 can classify coding units with the same long side length as having the same size. Furthermore, the image decoding device 100 can apply the same classification rules to coding units with the same long side length.
[0226] The aspect ratio of the coding unit can include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, etc. Furthermore, the orientation of the coding unit can include horizontal and vertical directions. A horizontal orientation indicates that the width of the coding unit is longer than its height. A vertical orientation indicates that the width of the coding unit is shorter than its height.
[0227] The image decoding device 100 can adaptively determine the partitioning rules based on the size of the coding unit. The image decoding device 100 can determine the permissible partitioning shape patterns based on different coding unit sizes. For example, the image decoding device 100 can determine whether a partition is permissible based on the size of the coding unit. The image decoding device 100 can determine the partitioning direction based on the size of the coding unit. The image decoding device 100 can determine the permissible partitioning type based on the size of the coding unit.
[0228] The partitioning rule determined based on the size of the coding unit can be a pre-determined partitioning rule between the image encoding device 150 and the image decoding device 100. Alternatively, the image decoding device 100 can determine the partitioning rule based on information obtained from the bitstream.
[0229] The image decoding device 100 can adaptively determine the partitioning rules based on the position of the coding units in the image.
[0230] Furthermore, the image decoding device 100 can determine partitioning rules such that encoding units generated via different partitioning paths do not have the same block shape. However, the embodiment is not limited to this, and encoding units generated via different partitioning paths may have the same block shape. Encoding units generated via different partitioning paths may have different decoding processing orders. Since the decoding processing order has already been described above with reference to FIG12, its details will not be provided again.
[0231] The entropy encoding and entropy decoding processes for coefficients included in image data according to embodiments of the present disclosure will now be described in detail with reference to FIGS. 17 to 27. The entropy encoding and entropy decoding processes according to embodiments of the present disclosure can be performed by the decoder 120 of the image decoding device 100 of FIG. 1a and the encoder 155 of the image encoding device 150 of FIG. 2a, or by the processor 125 of the image decoding device 100 of FIG. 1c and the processor 170 of the image encoding device 150 of FIG. 2c. Specifically, the entropy encoding and entropy decoding processes according to embodiments of the present disclosure can be performed by the entropy decoder 6150 of the decoder 6000 of FIG. 1b and the entropy encoder 7350 of the encoder 7000 of FIG. 2b.
[0232] As described above, the image encoding apparatus 150 according to embodiments of this disclosure performs encoding using encoding units obtained by hierarchically dividing the maximum encoding unit. Prediction blocks and transform blocks to be used in prediction and transform processing can be determined independently of other data units based on cost. As described above, encoding units having a hierarchical structure and included in the maximum encoding unit can be recursively encoded to determine the optimal encoding unit, such that data units with a tree structure can be configured. That is, for each maximum encoding unit, encoding units with a tree structure, prediction blocks with a tree structure, and transform blocks with a tree structure can be determined. For decoding, it is necessary to transmit hierarchical information as structural information of the data units as a hierarchical structure, as well as non-hierarchical information for decoding.
[0233] As described above with reference to Figures 3 to 16, the information related to the hierarchical structure is the information required to determine the coding unit with a tree structure, the prediction block with a tree structure, and the transform block with a tree structure, and includes the size information of the largest coding unit, the block shape information, the partition shape pattern information, etc.
[0234] In addition to hierarchical information, the encoded information includes prediction mode information, motion vector information, prediction direction information, color component information applied to the corresponding data unit when multiple color components are used, transform coefficient information, etc., for intra / inter-frame prediction of each block. In the following description, hierarchical and non-hierarchical information may be referred to as syntax elements to be entropy encoded and entropy decoded.
[0235] The residual data in the transform block represents the pixel difference between the prediction block and the original video data block in the pixel domain. The image coding device 150 can transform the pixel difference into transform coefficients in the transform domain (such as the frequency domain) and quantize these transform coefficients for further compression. The image coding device 150 can transmit the quantized values (i.e., coefficient levels) of the transform coefficients as signals for various syntax elements described below. In embodiments of this disclosure, the transform process may be omitted, and in this case, the coefficients included in the transform block may represent quantized coefficients obtained by quantizing the residual data that has not yet been transformed.
[0236] Embodiments of this disclosure relate to the efficient entropy encoding and decoding of the ranks (i.e., magnitude information of the coefficients) of coefficients included in transform blocks within syntactic elements. The entropy encoding and decoding processes for coefficient ranks will be described in detail below.
[0237] Figure 17 is a diagram illustrating a transform block to be entropy encoded according to an embodiment of the present disclosure. Figure 17 shows the transform block 1700 having a size of 8×8, but the size of the transform block 1700 is not limited to 8×8 and the transform block 1700 can have various sizes, such as a square shape with a size of 4×4, 16×16, 32×32, 64×64 or 128×128, or a non-square shape with a size of 4×16, 16×4, 8×16, 16×8, 8×32, 32×8, 16×64 or 64×16.
[0238] Referring to Figure 17, the coefficients included in transform block 1700 can be serialized according to a specific scan order and processed sequentially for entropy encoding and entropy decoding. For example, as shown in Figure 17, the scan order can be a diagonal scan order starting from the leftmost side. Alternatively, as shown in Figure 17, the scan order can be a reverse diagonal scan order starting from the rightmost side below. As another example, the scan order can be a horizontal scan order, a vertical scan order, or a zigzag scan order. Optionally, the scan order can be set to the opposite direction of the scan orders described above. However, the scan order is not limited to these.
[0239] For entropy encoding and entropy decoding of the coefficients included in transform block 1700, transform block 1700 can be divided into coefficient groups with smaller sizes. According to an embodiment of this disclosure, as shown in FIG17, coefficient group 1710 may correspond to a 4×4 sub-block obtained by dividing transform block 1700. According to another embodiment of this disclosure, transform blocks can be configured for every sixteen consecutive coefficients according to the scan order.
[0240] Entropy encoding and decoding of syntax elements related to the coefficient levels of a transform block can be performed on a coefficient group basis. The process of processing coefficient level information will be described below for, for example, a 4×4 sub-block of coefficient groups. Those skilled in the art will understand that this disclosure is applicable to other types of coefficient groups.
[0241] Figure 18 is a flowchart of the entropy encoding and entropy decoding process for coefficient level information according to an embodiment of the present disclosure.
[0242] Referring to Figure 18, the size of each coefficient included in the coefficient group can be encoded using at least one of the following: a level mapping information indicating whether the absolute value of each coefficient is greater than a specific value and coefficient level information indicating the absolute or relative size value of each coefficient.
[0243] Specifically, according to embodiments of this disclosure, the syntax element sig_flag 1810 indicating whether the coefficient is a valid coefficient (non-zero value), the syntax element gt1_flag 1820 indicating whether the absolute value of the coefficient is greater than 1, the syntax element par_flag 1830 indicating the parity of the absolute value of the coefficient, and the syntax element gtX_flag 1840 indicating whether the absolute value of the coefficient is greater than a specific number X can be signaled as level mapping information. The number X can be determined as a natural number greater than or equal to 3. For example, the syntax element gt3_flag indicating whether the absolute value of the coefficient is greater than 3 can be signaled.
[0244] According to another embodiment of this disclosure, the syntax element sig_flag 1810 indicating whether the coefficient is a valid coefficient (non-zero value), the syntax element gt1_flag 1820 indicating whether the absolute value of the coefficient is greater than 1, and the syntax element gtX_flag 1840 indicating whether the absolute value of the coefficient is greater than a specific number X can be signaled as level mapping information. The number X can be determined as a natural number greater than or equal to 2. For example, the syntax element gt2_flag indicating whether the absolute value of the coefficient is greater than 2 can be signaled.
[0245] Furthermore, the syntax element abs_remainder 1850, which indicates the absolute value of the remainder of the coefficient, and the syntax element abs_level 1860, which indicates the absolute value of the coefficient, can be sent as coefficient level information using signals. However, embodiments of this disclosure are not limited thereto, and some syntax elements may be omitted or other syntax elements may be added.
[0246] In operation 1810, the syntax element sig_flag can be determined as a valid mapping indicating whether the coefficients included in the coefficient group are valid coefficients (non-zero values). The value of the syntax element sig_flag can be determined to be 1 for coefficients that are non-zero values.
[0247] In operation 1820, when the syntax element sig_flag has a valid coefficient with a value of 1, the syntax element gt1_flag, which serves as a flag indicating whether the absolute value of the coefficient is greater than 1, can be determined. When the syntax element gt1_flag is 1, the absolute value of the coefficient is greater than 1. When the syntax element gt1_flag is 0, the absolute value of the coefficient is 1. In operation 1810, when the syntax element sig_flag has a value of 0, the syntax element gt1_flag for the corresponding coefficient is not signaled and is treated as 0.
[0248] In operation 1830, when the syntax element gt1_flag has a valid coefficient with a value of 1, the syntax element par_flag, which serves as a flag indicating the parity of the coefficient, can be set. When the syntax element par_flag is 1, the absolute value of the coefficient is odd. When the syntax element par_flag is 0, the absolute value of the coefficient is even. In operation 1820, when the syntax element gt1_flag has a value of 0, the syntax element par_flag for the corresponding coefficient is not signaled and is considered 0. In embodiments of this disclosure, operation 1830 can be omitted.
[0249] In operation 1840, if the syntax element gt1_flag has a valid coefficient with a value of 1, the syntax element gtX_flag can be set as a flag indicating whether the absolute value of the coefficient is greater than a specific value X.
[0250] In embodiments of this disclosure, when the syntax element `par_flag` is sent with a signal, the number X can be a natural number greater than or equal to 3. For example, when the syntax element `par_flag` is sent with a signal, the syntax element `gt3_flag` indicating whether the absolute value of the coefficient is greater than 3 can be sent with a signal. When the syntax element `gt3_flag` is 1, the absolute value of the coefficient is greater than 4 when the syntax element `par_flag` is 1, and the absolute value of the coefficient is 4 when the syntax element `par_flag` is 0. When the syntax element `gt3_flag` is 0, the absolute value of the coefficient is 3 when the syntax element `par_flag` is 1, and the absolute value of the coefficient is 2 when the syntax element `par_flag` is 0.
[0251] In another embodiment of this disclosure, when the syntax element par_flag is not signaled, the number X can be a natural number greater than or equal to 2. For example, when the syntax element par_flag is not signaled, the syntax element gt2_flag, which indicates whether the absolute value of the coefficient is greater than 2, can be signaled. When the syntax element gt2_flag is 1, the absolute value of the coefficient is greater than 2. When the syntax element gt2_flag is 0, the absolute value of the coefficient is 2.
[0252] When in operation 1820, if the syntax element gt1_flag has a value of 0, the syntax element gtX_flag for the corresponding coefficient is not signaled and is treated as 0.
[0253] In this embodiment, after operation 1840 and before operation 1850, one or more flags (not shown in FIG18) may be signaled, for example, the syntax element gtn_flag indicating whether the absolute value of the coefficient is greater than n (n is a natural number greater than X). For example, when the syntax element par_flag is signaled, in addition to the syntax element gt3_flag signaled in operation 1840, the syntax elements gt5_flag, gt7_flag, and gt9_flag indicating whether the absolute value of the coefficient is greater than 5, 7, and 9 may also be signaled. As another example, when the syntax element par_flag is not signaled, in addition to the syntax element gt2_flag signaled in operation 1840, the syntax elements gt3_flag, gt4_flag, and gt5_flag indicating whether the absolute value of the coefficient is greater than 3, 4, and 5 may also be signaled.
[0254] In embodiments of this disclosure, the number of syntax elements to be signaled in operations 1810 to 1840 may be limited. In this case, when the number of syntax elements signaled exceeds the limit, execution of operations 1810 to 1840 may be stopped or omitted, and operation 1850 may continue.
[0255] In operation 1850, a syntax element `abs_remainder` can be set for coefficients that have not yet been encoded in previous operations, indicating the absolute value of the remainder of the coefficient. The syntax element `abs_remainder` has the difference between the absolute value of the coefficient and the base level. The base level refers to the value that has been encoded using syntax elements from operations 1810 to 1840, i.e., the smallest absolute value that the corresponding coefficient can have.
[0256] In embodiments of this disclosure, the base level can be determined based on the syntax elements determined in operations 1810 to 1840 (i.e., level mapping information indicating whether the absolute value of the indicator coefficient is greater than a specific value). In embodiments of this disclosure, the base level can be determined based on whether the syntax elements in operations 1810 to 1840 are signaled.
[0257] In operation 1860, a syntax element `abs_level` indicating the absolute value of the coefficients can be set for coefficients that have not yet been encoded in previous operations. For example, when all of the syntax elements `sig_flag`, `gt1_flag`, `par_flag`, and `gtX_flag` are not signaled due to limitations on the number of syntax elements that will be signaled, all absolute values of the coefficients can be signaled as the syntax element `abs_level`. In embodiments of this disclosure, operation 1860 can be omitted.
[0258] FIG. 19 is a block diagram showing a configuration of an entropy encoding device according to an embodiment of the present disclosure. The entropy encoding device 1900 of FIG. 19 corresponds to the entropy encoder 7350 of the image encoder 7000 of FIG. 2b.
[0259] Referring to FIG. 19, an entropy encoding device 1900 according to an embodiment of the present disclosure includes a binarizer 1910, a context modeler 1920, and a binary arithmetic encoder 1930. The binary arithmetic encoder 1930 includes a normal coding engine 1932 and a bypass coding engine 1934.
[0260] Since the syntax elements input to the entropy encoding device 1900 may not be binary values, when the syntax elements are not binary values, the binarizer 1910 binarizes the syntax elements and outputs a binary bit string composed of binary values 0 or 1. A binary bit represents each bit of a stream composed of 0 or 1, and a set of binary bits may be referred to as a binary bit string. The binarizer 1910 maps the value of the syntax element to binary bits 0 and 1 by applying one of fixed-length binarization, truncated Rice binarization, k-th order exponential Golomb binarization, Golomb binarization, and Golomb-Rice binarization according to the type of the syntax element, and outputs the syntax element.
[0261] The binarizer 1910 according to an embodiment of the present disclosure may determine a Rice parameter for performing Golomb-Rice binarization on syntax elements abs_remainder and abs_level representing an absolute value or a relative value of a coefficient. A method for determining the Rice parameter will be described in detail below.
[0262] A process of performing Golomb-Rice binarization on a syntax element (e.g., the syntax element abs_remainder) by the binarizer 1910 when the Rice parameter is determined will be described below. The binarizer 1910 obtains a parameter cTrMax according to the equation: cTrMax = 4 << cRiceParam by using the determined Rice parameter cRiceParam. The parameter cTrMax is used as a criterion for dividing the syntax element abs_remainder into a prefix and a suffix.
[0263] Binarizer 1910 obtains a prefix with a value not exceeding the parameter cTrMax and a suffix indicating the portion exceeding cTrMax by partitioning the value of the syntax element abs_remainder based on the parameter cTrMax. Binarizer 1910 determines that the prefix is within the range not exceeding cTrMax according to the equation: Prefix = Min(cTrMax, abs_remainder). A suffix exists only if the current syntax element abs_remainder has a value greater than cTrMax. The suffix corresponds to the value (abs_remainder - cTrMax). When the value of the syntax element abs_remainder does not exceed cTrMax, only the prefix exists. For example, when the value of the syntax element abs_remainder is 10 and the parameter cTrMax is 7, the syntax element abs_remainder is partitioned into a prefix with a value of 7 and a suffix with a value of 3. As another example, when the value of the syntax element abs_remainder is 6 and the parameter cTrMax is 7, the syntax element abs_remainder is divided into a prefix with a value of 6 and no suffix is included.
[0264] When determining the prefix and suffix by partitioning the value of the syntax element `abs_remainder` based on the parameter `cTrMax`, the binarizer 1910 binarizes the prefix and suffix according to a predetermined binarization method and outputs the binary bit string corresponding to the prefix and the binary bit string corresponding to the suffix. For example, the binarizer 1910 can binarize the prefix with a value corresponding to Min(cTrMax, abs_remainder) and output a binary bit string according to a truncated univariate binarization method, and can binarize the suffix with a value corresponding to (abs_remainder - cTrMax) and output a binary bit string according to a k-order exponent Golomb binarization method. The value of k can be determined using the defined Rice parameter `cRiceParam`. For example, the value of k could be `cRiceParam + 1`.
[0265] The binarizer 1910 can generate binary bit strings corresponding to prefixes and suffixes based on a pre-set table (lookup table method) according to the Rice parameter cRiceParam. When using the lookup table method, the table can be pre-set so that as the value of the cRiceParam increases, the length of the binary bit string corresponding to larger values decreases.
[0266] The binary bits output from binarizer 1910 are arithmetically encoded using either the regular encoding engine 1932 or the bypass encoding engine 1934. When the binary bits obtained by binarizing the syntax elements are evenly distributed—that is, when the binary bits are data with the same frequency of 0 and 1—then the binary bit is output to and encoded by the bypass encoding engine 1934, which does not use probability values. Whether the current binary bit will be arithmetically encoded by the regular encoding engine 1932 or the bypass encoding engine 1934 can be predetermined based on the type of the syntax element.
[0267] The context modeler 1920 provides the regular encoding engine 1932 with a probabilistic model for encoding the bit string corresponding to the syntax element. Specifically, the context modeler 1920 adaptively predicts the probability of occurrence of the binary value used to encode each binary value of the bit string for the current syntax element based on the context, and outputs information about the predicted probability of occurrence to the regular encoding engine 1932.
[0268] The context model is a probabilistic model for binary bits and includes information indicating whether 0 or 1 corresponds to the most likely symbol (MPS) or the least likely symbol (LPS) and the probability of MPS or LPS.
[0269] The regular encoding engine 1932 performs binary arithmetic encoding on the bit string corresponding to the current syntax element based on information about MPS and LPS provided by the context modeler 1920, as well as information about the probability of MPS or LPS.
[0270] In embodiments of this disclosure, in the syntax elements related to coefficient levels, context-adaptive binary arithmetic coding (CABAC) can be performed on flags (i.e., syntax elements sig_flag, gt1_flag, par_flag, and gtX_flag) that have only values of 0 or 1, using conventional coding. In embodiments of this disclosure, in the syntax elements related to coefficient levels, binarization and bypass coding can be performed on syntax elements such as abs_remainder and abs_level that may have values other than 0 and 1.
[0271] The process of entropy encoding of the level information of coefficients included in the transform block according to an embodiment of the present disclosure will now be described in detail with reference to Figures 20 to 24.
[0272] Figure 20 is a diagram illustrating the rank information of coefficients included in the transformation block according to an embodiment of the present disclosure.
[0273] Referring to Figure 20, assume that the coefficients included in a coefficient group in the form of a 4×4 sub-block have an absolute value abs_level2000. The absolute value abs_level 2000 can be an absolute value obtained by transforming the residual data into transform coefficients and quantizing those transform coefficients. Alternatively, the absolute value abs_level 2000 can be an absolute value obtained by quantizing the residual data that has not yet been transformed. The coefficients included in the coefficient group can be processed sequentially according to the specific scan order shown in Figure 20.
[0274] According to embodiments of this disclosure, as described above, the size of each coefficient included in a coefficient group can be represented using the syntax element sig_flag 2010 indicating whether the coefficient is a valid coefficient other than 0, the syntax element gt1_flag 2020 indicating whether the absolute value of the coefficient is greater than 1, the syntax element par_flag 2030 indicating the parity of the absolute value of the coefficient, the syntax element gt3_flag 2040 indicating whether the absolute value of the coefficient is greater than 3, the syntax element abs_remainder 2050 indicating the absolute value of the remainder of the coefficient, and the syntax element abs_level2000 indicating the absolute value of the coefficient.
[0275] For valid coefficients (excluding 0) included in the coefficient group, the value of the syntax element sig_flag2010 is set to 1. When a coefficient is not a valid coefficient, that is, when the coefficient is 0, the syntax element sig_flag 2010 is signaled as 0.
[0276] For valid coefficients in the coefficient group whose syntax `sig_flag 2010` has a value of 1, the value of syntax element `gt1_flag 2020` can be set to 1 when the coefficient has an absolute value greater than 1. That is, for coefficients with an absolute value of 1, syntax element `gt1_flag 2020` is sent as 0 using a signal. For coefficients where syntax element `sig_flag 2010` is 0, syntax element `gt1_flag 2020` is not sent using a signal.
[0277] The value of the syntax element par_flag 2030, which indicates the parity of the absolute value of a coefficient, can be set for coefficients whose syntax element gt1_flag 2020 has a value of 1 within a coefficient group. When the absolute value of a coefficient is odd, the syntax element par_flag 2030 is set to 1, and when the absolute value of a coefficient is even, the syntax element par_flag 2030 is set to 0. For coefficients whose syntax element gt1_flag 2020 is 0, the syntax element par_flag 2030 is not signaled.
[0278] The value of syntax element gt3_flag 2040 can be set for coefficients in the coefficient group whose syntax element gt1_flag 2020 has a value of 1. When syntax element par_flag 2030 is signaled, syntax element gt3_flag 2040 can indicate whether the absolute value of the coefficient is greater than 3 or 4, depending on the value of syntax element par_flag 2030. When the coefficient is 2 or 3, syntax element gt3_flag 2040 is signaled as 0; when the coefficient is 2, syntax element par_flag 2030 is signaled as 0; and when the coefficient is 3, syntax element par_flag 2030 is signaled as 1. When the coefficient is greater than 3, syntax element gt3_flag 2040 is signaled as 1, and syntax element par_flag 2030 is signaled as 0 or 1 depending on the parity of the coefficient. For the coefficient of syntax element gt1_flag2020 which is 0, syntax element gt3_flag 2040 is not signaled.
[0279] For coefficients in the coefficient group whose syntax element gt3_flag 2040 has a value of 1, the absolute remainder of the coefficient can be set to the syntax element abs_remainder 2050. When the syntax element gt3_flag 2040 has a value of 1, the minimum absolute value of the coefficient is 4, and therefore the base level can be determined to be 4. Thus, the absolute remainder of the coefficient is obtained by subtracting 4 from the coefficient's level. However, since the syntax element par_flag 2030 represents the parity of the absolute value, it is sufficient to signal the value obtained by dividing the absolute remainder of the coefficient in half. In this case, the value of the syntax element abs_remainder 2050 can be determined by the equation: abs_remainder = (abs_level - 4) >> 1. For coefficients whose syntax element gt3_flag 2040 is 0, the syntax element abs_remainder 2050 is not signaled.
[0280] Through the above processing, the syntax element representing the coefficient level is determined and encoded by the entropy encoder 7350 and transmitted in the bitstream. The entropy decoder 6150 can parse the value of the syntax element from the bitstream and decode the parsed value to reconstruct the coefficient level abs_level according to the equation: abs_level = sig_flag + gt1_flag + par_flag + 2*gt3_flag + 2*abs_remainder.
[0281] In embodiments of this disclosure, for all or some of the above-mentioned syntax elements sig_flag, gt1_flag, par_flag, gt3_flag and abs_remainder that are not sent with signals in the coefficient group, all absolute values of the coefficients can be sent with signals as the syntax element abs_level 2000.
[0282] Figure 21 is a diagram illustrating the level information of coefficients included in the transformation block according to another embodiment of the present disclosure.
[0283] Unlike the example shown in Figure 20, the parity of the absolute value of the coefficients is not used in the example shown in Figure 21. That is, according to embodiments of this disclosure, the magnitude of each coefficient included in the coefficient group can be represented by the following syntax elements: sig_flag 2110 indicating whether each coefficient is a valid coefficient other than 0, gt1_flag 2120 indicating whether the absolute value of each coefficient is greater than 1, gt2_flag 2130 indicating whether the absolute value of each coefficient is greater than 2, abs_remainder 2140 indicating the absolute value of the remainder of each coefficient, and abs_level 2100 indicating the absolute value of each coefficient.
[0284] The syntax elements sig_flag 2110 and gt1_flag 2120 in Figure 21 correspond to the syntax elements sig_flag 2010 and gt1_flag 2020 in Figure 20, and therefore their redundant descriptions are omitted here.
[0285] For coefficients in the coefficient group whose syntax element gt1_flag 2120 has a value of 1, the value of syntax element gt2_flag 2130 can be set if the coefficient has an absolute value greater than 1. That is, for syntax elements whose absolute value is 2, syntax element gt2_flag 2130 is sent as 0 using a signal. For coefficients whose syntax element gt1_flag 2120 is 0, syntax element gt2_flag 2130 is not sent using a signal.
[0286] For coefficients in the coefficient group whose syntax element gt2_flag 2130 has a value of 1, the absolute value of the remainder of the coefficient can be set to the syntax element abs_remainder 2140. When the syntax element gt2_flag 2130 has a value of 1, the minimum absolute value of the coefficient is 3, and therefore the base level can be determined to be 3. Therefore, the syntax element abs_remainder 2140 can be determined as the value obtained by subtracting 3 from the level of the coefficient. That is, the value of the syntax element abs_remainder 2140 can be determined by the equation: abs_remainder = abs_level - 3. For coefficients whose syntax element gt2_flag 2130 is 0, the syntax element abs_remainder 2140 is not signaled.
[0287] Through the above processing, the syntax element representing the coefficient level is determined and encoded by the entropy encoder 7350 and transmitted in the bitstream. The entropy decoder 6150 can parse the value of the syntax element from the bitstream and decode the parsed value to reconstruct the coefficient level abs_level according to the equation abs_level = sig_flag + gt1_flag + gt2_flag + abs_remainder.
[0288] In embodiments of this disclosure, for all or some of the above-mentioned syntax elements sig_flag, gt1_flag, gt2_flag and abs_remainder that are not sent with signals in the coefficient group, all absolute values of the coefficients can be sent with signals as the syntax element abs_level 2100.
[0289] Figure 22 shows an example of a pseudocode used to encode coefficient level information.
[0290] The entropy encoder 7350 can perform one or more encoding channels to determine and encode the value of the syntax element for each coefficient included in the coefficient group according to a specific scan order.
[0291] Referring to Figure 22, in the first channel 2210, the entropy encoder 7350 can encode the syntax elements sig_flag, gt1_flag, and par_flag for each coefficient included in the coefficient group according to the scan order. The entropy encoder 7350 can determine the syntax element sig_flag of the current coefficient, and determine the syntax element gt1_flag when the syntax element sig_flag is 1, and determine the syntax element par_flag when the syntax element gt1_flag is 1. The determined syntax elements sig_flag, gt1_flag, and par_flag can be CABAC encoded using a preset context model.
[0292] In embodiments of this disclosure, the number of binary bits to be signaled in the first channel 2210 can be limited. For example, the total number of syntax elements sig_flag, gt1_flag, and par_flag to be signaled for a coefficient group can be limited to a first threshold or less. When the total number of syntax elements sig_flag, gt1_flag, and par_flag to be signaled reaches the first threshold, the entropy encoder 7350 can stop executing the first channel 2210 and execute the second channel 2220.
[0293] The entropy encoder 7350 can return to the beginning of the coefficient group according to the scan order and execute the second channel 2220. In the second channel 2220, the entropy encoder 7350 can encode the syntax element gt3_flag for each coefficient included in the coefficient group according to the scan order. When the syntax element gt1_flag is 1, the entropy encoder 7350 can determine the syntax element gt3_flag and perform CABAC encoding on the determined syntax element gt3_flag using a preset context model.
[0294] In embodiments of this disclosure, the number of binary bits to be signaled in the second channel 2220 can be limited. For example, the number of syntax elements gt3_flag to be signaled in a coefficient group can be limited to a second threshold or less. When the number of syntax elements gt3_flag to be signaled reaches the second threshold, the entropy encoder 7350 can stop executing the second channel 2220 and execute the third channel 2230.
[0295] The entropy encoder 7350 can return to the initial position of the coefficient group according to the scan order and execute the third channel 2230. In the third channel 2230, the entropy encoder 7350 can determine the syntax element abs_remainder for the coefficients of both the first channel 2210 and the second channel 2220 according to the scan order. When both the first channel 2210 and the second channel 2220 are executed, the minimum absolute value of the coefficient is 4, and therefore the base level can be determined to be 4 in the third channel 2230. Therefore, the syntax element abs_remainder can be determined based on the value obtained by subtracting 4 from the absolute value of the coefficient. The determined syntax element abs_remainder can be Golomb-Rice binarized using the Rice parameter determined by the method described below.
[0296] The entropy encoder 7350 can proceed with the fourth channel 2230 starting with the coefficients immediately following the end of the third channel 2230. In the fourth channel 2240, the entropy encoder 7350 can determine the syntax element abs_remainder for coefficients for which only the first channel 2210 was executed and the second channel 2220 was not executed, based on the scan order. When only the first channel 2210 was executed and the second channel 2220 was not executed, the minimum absolute value of the coefficient is 2, and therefore the base level can be determined as 2 in the fourth channel 2240. Therefore, the syntax element abs_remainder can be determined based on the value obtained by subtracting 2 from the absolute value of the coefficient. The determined syntax element abs_remainder can be Golomb-Rice binarized using the Rice parameter determined by the method described below.
[0297] The entropy encoder 7350 can proceed to the fifth channel 2250 starting with the coefficients immediately following the end of the fourth channel 2240. In the fifth channel 2250, the entropy encoder 7350 can determine the syntax element `abs_level`, which indicates the absolute value of the coefficients, based on the scan order for coefficients for which neither the first channel 2210 nor the second channel 2220 was executed. When neither the first channel 2210 nor the second channel 2220 was executed, the minimum absolute value of the coefficient is 2, and therefore the base level can be determined to be 0 in the fifth channel 2250. The determined syntax element `abs_level` can be Golomb-Rice binarized using the Rice parameter determined by the method described below.
[0298] In embodiments of this disclosure, the entropy encoder 7350 can determine whether the number of coefficients to be encoded in the fifth channel 2250 is greater than a specific threshold. That is, the entropy encoder 7350 can determine whether the number of syntax elements `abs_level` is greater than the threshold. When it is determined that the number of coefficients to be encoded in the fifth channel 2250 is greater than the threshold, the entropy encoder 7350 can also signal a flag indicating whether all coefficients to be encoded in the fifth channel 2250 are greater than a specific value (e.g., 1).
[0299] In embodiments of this disclosure, the entropy encoder 7350 can determine whether the level of the coefficients in the last encoded coefficient group before the fifth channel 2250 is greater than a specific threshold. That is, the entropy encoder 7350 can determine whether the magnitude of the last encoded coefficient based on context is greater than the threshold. When it is determined that the level of the coefficients in the last encoded coefficient group before the fifth channel 2250 is greater than the threshold, the entropy encoder 7350 can also signal a flag indicating whether all coefficients to be encoded in the fifth channel 2250 are greater than a specific value (e.g., 1).
[0300] Figure 23 shows another example of pseudocode used to encode coefficient level information. Unlike that shown in Figure 22, in the example shown in Figure 23, the syntax element gt3_flag can be encoded together with the syntax elements sig_flag, gt1_flag, and par_flag in the first channel 2310, and can be processed in a different channel.
[0301] Referring to Figure 23, in the first channel 2310, the entropy encoder 7350 can encode the syntax elements sig_flag, gt1_flag, and par_flag for each coefficient included in the coefficient group according to the scan order. The entropy encoder 7350 can determine the syntax element sig_flag of the current coefficient, and determine the syntax element gt1_flag when the syntax element sig_flag is 1, and determine the syntax elements par_flag and gt3_flag when the syntax element gt1_flag is 1. The determined syntax elements sig_flag, gt1_flag, par_flag, and gt3_flag can be CABAC encoded using a preset context model.
[0302] In embodiments of this disclosure, the number of binary bits to be signaled in the first channel 2310 can be limited. For example, the total number of syntax elements sig_flag, gt1_flag, par_flag, and gt3_flag to be signaled for a coefficient group can be limited to a third threshold or less. When the total number of syntax elements sig_flag, gt1_flag, par_flag, and gt3_flag signaled reaches the third threshold, the entropy encoder 7350 can stop executing the first channel 2310 and execute the second channel 2320.
[0303] The entropy encoder 7350 can return to the beginning of the coefficient group according to the scan order and execute the second channel 2220. In the second channel 2320, the entropy encoder 7350 can determine the syntax element abs_remainder for the coefficients for which the first channel 2310 was executed, according to the scan order. When the first channel 2310 was executed, the minimum absolute value of the coefficient was 4, and therefore the base level can be determined as 4 in the second channel 2320. Therefore, the syntax element abs_remainder can be determined based on the value obtained by subtracting 4 from the absolute value of the coefficient. The determined syntax element abs_remainder can be Golomb-Rice binarized using the Rice parameter determined by the method described below.
[0304] The entropy encoder 7350 can proceed to the third channel 2330 starting with the coefficients immediately following the end of the second channel 2320. In the third channel 2330, the entropy encoder 7350 can determine a syntax element `abs_remainder` indicating the absolute value of the coefficients for the coefficients for which the first channel 2310 was not performed, based on the scan order. When the first channel 2310 was not performed, the minimum absolute value of the coefficient is 0, and therefore the base level can be determined to be 0 in the third channel 2330. The determined syntax element `abs_level` can be Golomb-Rice binarized using the Rice parameter determined by the method described below.
[0305] The method for determining the Rice parameters of the Golomb-Rice binarization used to indicate the coefficient level for the syntax elements abs_remainder and abs_level will be described in detail below.
[0306] The Rice parameter can be initialized at the beginning of each coefficient group. In MPEG-4 (HEVC) and similar formats, the Rice parameter is initialized to zero at the beginning of each coefficient group. In embodiments of this disclosure, the Rice parameter of the current coefficient group can be initialized with reference to the coefficient level of a previously encoded or decoded coefficient group. The referenced coefficient level can be the last coefficient level or the average coefficient level of a previously encoded or decoded coefficient group.
[0307] In embodiments of this disclosure, the Rice parameters of the current coefficient group can be initialized by referring to the Rice parameters of previously encoded or decoded coefficient groups. In embodiments of this disclosure, the Rice parameters of the current coefficient group can be initialized by referring to the Rice parameters of coefficient groups adjacent to the current coefficient group. For example, the initial Rice parameter of the current coefficient group can be determined based on the Rice parameters of the coefficient groups to the right of the current coefficient group and the Rice parameters of the coefficient groups below the current coefficient group. The Rice parameters of the referenced coefficient groups can be the first Rice parameter, the last Rice parameter, or the average Rice parameter of the referenced coefficient groups.
[0308] In MPEG-4 (HEVC) and similar systems, the Rice parameter is conditionally updated based on the current coefficient level and the value of the Rice parameter. Specifically, when the previous coefficient size is cLastAbsCoeff and the previous Rice parameter is cLastRiceParam, the Rice parameter cRiceParam to be used for binarization of the current coefficient is determined based on the following algorithm:
[0309] If cLastAbsCoeff>3*(1< <cLastRiceParam)
[0310] Then cRiceParam=Min(cLastRiceParam+1,4)
[0311] As described in the algorithm above, the binarizer 1910 compares the magnitude of the previous coefficient cLastAbsCoeff with a threshold obtained based on the previous Rice parameter cLastRiceParam, and updates the Rice parameter cRiceParam when the comparison shows that the magnitude of the previous coefficient cLastAbsCoeff is greater than the threshold. When the Rice parameter cRiceParam is updated, the Rice parameter cRiceParam is progressively increased by +1 compared to the previous Rice parameter cLastRiceParam.
[0312] However, when the syntax element to be binarized is not the absolute value of the coefficient `abs_level` but the absolute value of the coefficient's remainder `abs_remainder`, it is actually Golomb-Rice encoding performed on the level relative to the base level, rather than on all the absolute values of the coefficients. In this case, as in the algorithm above, setting the Rice parameter based on all the absolute values of the previous coefficients without considering the base level may not achieve optimal encoding efficiency. In various embodiments of this disclosure, the Rice parameter is determined based on the base level, thereby providing improved encoding performance.
[0313] In embodiments of this disclosure, the base level can be determined based on the syntax elements sig_flag, gt1_flag, par_flag, or gtX_flag, which indicates whether the absolute value of the current coefficient is greater than a specific value. In embodiments of this disclosure, when the base level is baseLevel, the base level baseLevel can be determined by the equation: baseLevel = sig_flag + gt1_flag + 2 * gt3_flag when par_flag is signaled. In embodiments of this disclosure, when par_flag is not signaled, the base level baseLevel can be determined by the equation: baseLevel = sig_flag + gt1_flag + gt2_flag.
[0314] In embodiments of this disclosure, the base level can be determined based on whether syntax elements (e.g., syntax elements sig_flag, gt1_flag, par_flag, and gtX_flag) are signaled. In embodiments of this disclosure, when all syntax elements sig_flag, gt1_flag, par_flag, and gt3_flag are signaled, the base level can be determined as 4. In embodiments of this disclosure, when the syntax element gt3_flag is not signaled due to a limitation on the number of syntax elements to be signaled, and only syntax elements sig_flag, gt1_flag, and par_flag are signaled, the base level can be determined as 2. In embodiments of this disclosure, when none of the syntax elements sig_flag, gt1_flag, par_flag, and gt3_flag are signaled due to a limitation on the number of syntax elements to be signaled, the base level can be determined as 0.
[0315] In embodiments of this disclosure, when all syntax elements sig_flag, gt1_flag, and gt2_flag are signaled, the base level can be determined to be 3. In embodiments of this disclosure, when syntax element gt2_flag is not signaled and only syntax elements sig_flag and gt1_flag are signaled due to limitations on the number of syntax elements that can be signaled, the base level can be determined to be 2.
[0316] In embodiments of this disclosure, the base level can be determined based on the coefficient level information to be encoded. For example, when the syntax element abs_remainder is encoded, the base level can be determined to be 2, 3, or 4. For example, when the syntax element abs_level is encoded, the base level can be determined to be 0.
[0317] According to the various embodiments of this disclosure described above, when considering the base level when determining the Rice parameter, a single Rice parameter determination method can be applied to coefficient level information with different base levels. That is, the Rice parameter can be determined using a common method across various encoding channels used to encode the different syntax elements abs_remainder and abs_level shown in Figures 22 and 23.
[0318] In embodiments of this disclosure, the Rice parameter may be determined based on the rank of a particular coefficient among those encoded prior to the current coefficient. This will be described in detail below with reference to FIG24.
[0319] Figure 24 is a diagram illustrating a method for determining Rice parameters according to embodiments of the present disclosure.
[0320] According to embodiments of this disclosure, the Rice parameter can be determined based on the ranking of one or more coefficients encoded before the current coefficient. For example, when a diagonal scan order is used and the current coefficient is positioned (i,j) in the transform block, the Rice parameter can be determined by referring to the ranking of n coefficients at positions (i+1,j-1), (i+2,j-2), (i+3,j-3), ..., (i+n,jn).
[0321] According to embodiments of this disclosure, the Rice parameter can be determined based on the rank of coefficients encoded before the current coefficient and whose positions are adjacent to the current coefficient. For example, as shown in FIG24, when a reverse diagonal scan order starting from the bottom right corner is adopted and the current coefficient's position 2410 in the transform block is (i,j), the Rice parameter can be determined based on the rank of coefficients 2420 at positions (i,j+1), (i,j+2), (i+1,j), (i+2,j), and (i+1,j+1).
[0322] The entropy encoder 7350 can determine the Rice parameter in parallel by referring to neighboring coefficients rather than to coefficients immediately preceding the current coefficient. Referring to the neighboring coefficients shown in Figure 24, the Rice parameter of coefficient 2430 in the diagonal direction can be derived in parallel even when the encoding of previous coefficients is not yet complete. Therefore, the values of consecutive syntax elements can be encoded simultaneously, making the aforementioned method of referring to neighboring coefficients potentially more suitable for hardware implementations.
[0323] In embodiments of this disclosure, the Rice parameter can be determined by referring to a pre-set table based on statistics of the ranks of coefficients encoded before the current coefficient. In embodiments of this disclosure, when the sum of the absolute values of a particular coefficient is sum, the pseudocode for determining the Rice parameter cRiceParam can be represented as follows:
[0324] cRiceParam=goRicePars[min(sum,31)]
[0325] In this case, goRicePars[i] represents the Rice parameter corresponding to index i based on the preset table.
[0326] According to embodiments of this disclosure, the Rice parameter can be determined based on the relative level of the coefficients. That is, the Rice parameter can be determined based on the difference between the absolute value of the coefficient and the current base level of the coefficient. As mentioned above, in practice, the level relative to the base level, rather than the total absolute value of the coefficient, can be Golomb-Rice encoded. Therefore, in this case, encoding performance can be improved by considering the relative levels of previously encoded or decoded coefficients when determining the Rice parameter. In embodiments of this disclosure, when the current base level is baseLevel, the number of specific coefficients is n, and the sum of the absolute values of the coefficients is sum, the pseudocode for determining the Rice parameter cRiceParam can be represented as follows:
[0327] cRiceParam=goRicePars[max(min(sum-n*baseLevel,31),0]
[0328] According to embodiments of this disclosure, the Rice parameter can be determined based on the absolute value of available coefficients among specific coefficients surrounding the current coefficient. For example, when the current coefficient is close to the boundary of the current transform block, some coefficients surrounding the current coefficient may be located outside the current transform block. In this case, only coefficients located within the current transform block can be determined as available coefficients. In embodiments of this disclosure, when the current base level is baseLevel, the number of available coefficients surrounding the current coefficient is numValidProb, and the sum of the absolute values of the available coefficients is sum, the pseudocode for determining the Rice parameter cRiceParam can be represented as follows:
[0329] cRiceParam=goRicePars[max(min(sum-numValidProb*baseLevel,31),0]
[0330] According to embodiments of this disclosure, the Rice parameter can be determined based on whether par_flag is signaled. When the coefficient level is signaled using par_flag, the value of abs_remainder, which will be binarized into Golomb-Rice code, can be a value obtained by dividing the level in half relative to the base level. Therefore, encoding performance can be improved by determining the Rice parameter considering the above description. In embodiments of this disclosure, when the current base level is baseLevel, the number of available coefficients around the current coefficient is numValidProb, and the sum of the absolute values of the available coefficients is sum, the pseudocode for determining the Rice parameter cRiceParam can be represented as follows:
[0331] cRiceParam=goRicePars[max(min((sum-numValidProb*baseLevel)>>shift,31),0]
[0332] Where shift = baseLevel == 0?0:1;
[0333] According to the pseudocode, when the base level is 0, it means that par_flag is not signaled, and therefore the difference between the absolute value of the reference coefficient and the base level is used directly. Conversely, when the base level is 1, it means that par_flag is signaled, and therefore the value is obtained by dividing the difference between the absolute value of the reference coefficient and the base level by half through a bit shift operation.
[0334] Figure 25 is a flowchart of a method for entropy encoding coefficient level information according to an embodiment of the present disclosure.
[0335] Referring to Figure 25, in operation 2510, the entropy encoder 7350 can obtain coefficient level information indicating the magnitude of the current coefficient. The coefficient level information can be the syntax element `abs_level` indicating the absolute value of the current coefficient. Alternatively, the coefficient level information can be the syntax element `abs_remainder` representing the absolute value of the remainder of the current coefficient (i.e., the difference between the absolute value of the current coefficient and the base level). The coefficient level information can be obtained on a group basis, including the current coefficient.
[0336] In operation 2520, the entropy encoder 7350 can determine the Rice parameter for the current coefficient based on the base level of the current coefficient.
[0337] In embodiments of this disclosure, a base level can be determined based on at least one level mapping information indicating whether the absolute value of the current coefficient is greater than a specific value. The level mapping information may include at least one of the following: a syntax element `sig_flag` indicating whether the absolute value of the current coefficient is greater than 0; a syntax element `gt1_flag` indicating whether the absolute value of the current coefficient is greater than 1; a syntax element `par_flag` indicating the parity of the absolute value of the current coefficient; or a syntax element `gtX_flag` indicating whether the absolute value of the current coefficient is greater than a specific number X. In embodiments of this disclosure, the base level can be determined based on the value of a syntax element determined for the current coefficient. In embodiments of this disclosure, the base level can be determined based on whether a syntax element for the current coefficient is signaled. In embodiments of this disclosure, the base level can be determined based on the level information of the coefficient to be encoded.
[0338] In embodiments of this disclosure, the entropy encoder 7350 may determine the Rice parameter based on the absolute value of a specific coefficient among those encoded prior to the encoding of the current coefficient. In embodiments of this disclosure, the coefficient may be determined as a coefficient encoded immediately preceding the current coefficient. In embodiments of this disclosure, the coefficient may be determined as coefficients located around the current coefficient. In embodiments of this disclosure, the coefficient may be determined as available coefficients among those located around the current coefficient.
[0339] In embodiments of this disclosure, the entropy encoder 7350 may determine the Rice parameter by referring to a pre-set table based on statistics of the absolute values of coefficients. In embodiments of this disclosure, the entropy encoder 7350 may determine the Rice parameter based on the difference between the absolute value of a coefficient and the base level of the current coefficient.
[0340] In operation 2530, the entropy encoder 7350 can binarize the coefficient level information using the determined Rice parameters. The coefficient level information can be binarized using the Rice parameters via Golomb-Rice binarization.
[0341] In operation 2540, the entropy encoder 7350 can generate a bitstream including binarized coefficient level information. In embodiments of this disclosure, the binarized coefficient level information (e.g., syntax elements abs_remainder and abs_level) can be bypassed and encoded. In embodiments of this disclosure, the level mapping information (e.g., syntax elements sig_flag, gt1_flag, par_flag, and gtX_flag) can be conventionally encoded based on context.
[0342] Figure 26 is a block diagram illustrating the configuration of an entropy decoding device according to an embodiment of the present disclosure. The entropy decoding device 6000 of Figure 26 corresponds to the entropy decoder 6150 of the image decoder 6000 of Figure 2b.
[0343] Referring to Figure 26, the entropy decoding device 2600 includes a context modeler 2610, a regular decoding engine 2620, a bypass decoding engine 2630, and a debinarizer 2640. The entropy decoding device 2600 performs the inverse processing of the entropy encoding process performed by the entropy encoding device 1900 of Figure 19.
[0344] The binary bits encoded via bypass encoding are output to and decoded by the bypass decoding engine 2630, while the binary bits encoded via regular encoding are decoded by the regular decoding engine 2620. The regular decoding engine 2620 performs arithmetic decoding on the current binary bit by using the probability of the binary value determined based on the previous binary bits decoded before the current binary bit provided by the context modeler 2610.
[0345] The context modeler 2610 provides a probability model for the binary bits to the regular decoding engine 2620. Specifically, the context modeler 2610 determines the probability of a specific binary value based on the previously decoded binary bits, updates the probability of the binary value used to decode the previous binary bits, and outputs the updated probability to the regular decoding engine 2620.
[0346] The debinarizer 2640 reconstructs the binary bit string reconstructed by the regular decoding engine 2620 or the bypass decoding engine 2630 by mapping the binary bit string to syntax elements.
[0347] According to embodiments of the present disclosure, the debinarizer 2640 can determine Rice parameters for Golomb-Rice binarization of the syntax elements abs_remainder and abs_level representing the level (i.e., size information) of coefficients. Similar to the binarizer 1910 of FIG. 19 above, the debinarizer 2640 can determine the Rice parameters for the current coefficients using the methods described above in various embodiments of the present disclosure.
[0348] The following describes the parsing and Golomb-Rice binarization of syntax elements (e.g., syntax element abs_remainder) by binarizer 1910 when the Rice parameter is determined. Debinarizer 2640 can determine the number of bits to be parsed from the bitstream based on the determined Rice parameter. Debinarizer 2640 divides the parsed bit string into a prefix bit string and a suffix bit string, wherein the prefix bit string corresponds to the bit string obtained by binarizing the value corresponding to Min(cTrMax, abs_remainder) using a truncated univariate binarization method, and the suffix bit string corresponds to the bit string obtained by binarizing the value corresponding to (abs_remainder - cTrMax) using a k-order exponential Golomb binarization method (k is cRiceParam+1). The syntax element `abs_remainder` is reconstructed by debinding the prefix bit string using a truncated univariate debinding method and the suffix bit string using a k-order exponential Golomb debinding method. In embodiments of this disclosure, the debinizer 2640 can parse and debind the bit string based on a table (lookup table method) pre-set according to the Rice parameter `cRiceParam`.
[0349] In addition to the syntax elements `abs_remainder` and `abs_level`, the entropy decoding device 2500 also performs arithmetic decoding on the syntax elements `sig_flag`, `gt1_flag`, `par_flag`, and `gtX_flag`, which indicate the level of the coefficients in the transform block, and outputs the decoding result. When these syntax elements are reconstructed, the data included in the transform block can be decoded based on the reconstructed syntax elements through inverse quantization, inverse transform, and predictive decoding processes.
[0350] Figure 27 is a flowchart of a method for entropy decoding of coefficient level information according to an embodiment of the present disclosure.
[0351] Referring to Figure 27, in operation 2710, the entropy decoder 6150 can determine the Rice parameter for the current coefficient based on the base level of the current coefficient.
[0352] In embodiments of this disclosure, a base level can be determined based on at least one level mapping information indicating whether the absolute value of the current coefficient is greater than a specific value. The level mapping information may include at least one of the following: a syntax element `sig_flag` indicating whether the absolute value of the current coefficient is greater than 0; a syntax element `gt1_flag` indicating whether the absolute value of the current coefficient is greater than 1; a syntax element `par_flag` indicating the parity of the absolute value of the current coefficient; or a syntax element `gtX_flag` indicating whether the absolute value of the current coefficient is greater than a specific number X. In embodiments of this disclosure, when the syntax element `par_flag` is signaled, the syntax element `gtX_flag` may be a syntax element `gt3_flag` indicating whether the absolute value of the current coefficient is greater than 3; and when the syntax element `par_flag` is not signaled, the syntax element `gtX_flag` may be a syntax element `gt2_flag` indicating whether the absolute value of the coefficient is greater than 2. In embodiments of this disclosure, a base level can be determined based on the value of a syntax element determined for the current coefficient. In embodiments of this disclosure, a base level can be determined based on whether a syntax element is signaled for the current coefficient. In embodiments of this disclosure, the base level can be determined based on the coefficient level information to be encoded.
[0353] In embodiments of this disclosure, the entropy decoder 6150 may determine the Rice parameter based on the absolute value of a specific coefficient among those decoded prior to the current coefficient. In embodiments of this disclosure, the coefficient may be determined as a coefficient decoded immediately preceding the current coefficient. In embodiments of this disclosure, the coefficient may be determined as coefficients located around the current coefficient. In embodiments of this disclosure, the coefficient may be determined as available coefficients among those located around the current coefficient.
[0354] In embodiments of this disclosure, the entropy decoder 6150 may determine the Rice parameter based on a pre-set table of statistics of the absolute values of coefficients decoded prior to the current coefficient. In embodiments of this disclosure, the entropy decoder 6150 may determine the Rice parameter based on the difference between the absolute value of a coefficient and the base level of the current coefficient.
[0355] In operation 2720, the entropy decoder 6150 can parse coefficient level information indicating the magnitude of the current coefficient from the bitstream using the determined Rice parameter. The coefficient level information can be the syntax element `abs_level` indicating the absolute value of the current coefficient. Alternatively, the coefficient level information can be the syntax element `abs_remainder` representing the absolute value of the remainder of the current coefficient (i.e., the difference between the absolute value of the current coefficient and the base level). The coefficient level information can be obtained on a group basis, including the current coefficient.
[0356] In operation 2730, the entropy decoder 6150 can identify the magnitude of the current coefficient by debinarizing the parsed coefficient level information using the determined Rice parameter. In embodiments of this disclosure, the coefficient level information (e.g., syntax elements abs_remainder and abs_level) can be bypassed and decoded. The coefficient level information can be debinarized using the Rice parameter with Golomb-Rice parameter.
[0357] Various embodiments of this disclosure have been described above. Those skilled in the art will understand that this disclosure can be implemented in many different forms without departing from its essential characteristics. Therefore, the embodiments of this disclosure set forth herein should be considered in a descriptive sense only and not for limiting purposes. The scope of this disclosure is set forth in the claims rather than in the foregoing description, and all differences falling within the scope equivalent to that of this disclosure should be construed as being included within this disclosure.
[0358] The embodiments described above can be written as computer-executable programs and implemented by a general-purpose digital computer that operates the program via a computer-readable recording medium. The computer-readable recording medium may include storage media such as magnetic storage media (e.g., ROM, floppy disk, hard disk, etc.) and optical recording media (e.g., CD-ROM, DVD, etc.).
Claims
1. A method for entropy decoding of coefficients included in video data, the method comprising: Obtain the absolute value of the coefficient at the predetermined position from the coefficients that were entropy-decoded before the current coefficient; The sum of the absolute values of the coefficients determining the predetermined position; The Rice parameter is determined based on the difference between the sum of the absolute values and the base level; Entropy decoding in bypass mode is performed on the bitstream to obtain coefficient level information about the absolute value of the current coefficient; and the absolute value of the current coefficient is obtained based on the coefficient level information and the determined Rice parameter, wherein the coefficient at the predetermined position includes at least one of a first coefficient adjacent to the right of the current coefficient, a second coefficient adjacent to the right of the first coefficient, a third coefficient adjacent to the lower side of the current coefficient, a fourth coefficient adjacent to the lower side of the third coefficient, or a fifth coefficient adjacent in the lower right diagonal direction of the current coefficient, wherein the basic level is determined based on whether level mapping information is obtained from the bitstream, wherein the level mapping information indicates whether the absolute value of the current coefficient is greater than a predetermined value and is encoded according to context-adaptive binary arithmetic code CABAC.
2. An apparatus for entropy decoding of coefficients included in video data, the apparatus comprising: At least one processor; The system also includes a memory storing at least one instruction configured to be executable by the at least one processor. The at least one instruction is configured to, when executed, cause the at least one processor to: obtain the absolute value of a coefficient at a predetermined position from coefficients entropy-decoded prior to the current coefficient; determine the sum of the absolute values of the coefficients at the predetermined position; determine a Rice parameter based on the difference between the sum of the absolute values and a base level; perform entropy decoding in bypass mode on the bitstream to obtain coefficient level information regarding the absolute value of the current coefficient; and obtain the absolute value of the current coefficient based on the coefficient level information and the determined Rice parameter. The coefficients at the predetermined positions include at least one of a first coefficient adjacent to the right of the current coefficient, a second coefficient adjacent to the right of the first coefficient, a third coefficient adjacent to the lower side of the current coefficient, a fourth coefficient adjacent to the lower side of the third coefficient, or a fifth coefficient adjacent in the lower right diagonal direction of the current coefficient. The base level is determined based on whether level mapping information is obtained from the bitstream, wherein the level mapping information indicates whether the absolute value of the current coefficient is greater than a predetermined value and encoded according to context-adaptive binary arithmetic code CABAC.
3. An apparatus for entropy encoding coefficients included in video data, wherein, The device includes: at least one processor; and a memory, wherein the memory stores at least one instruction configured to be executable by the at least one processor, wherein the at least one instruction is configured to, when executed, cause the at least one processor to perform the following operations: obtain coefficient level information regarding the absolute value of a current coefficient; obtain the absolute value of a coefficient at a predetermined position from coefficients entropy-encoded prior to the current coefficient; determine the sum of the absolute values of the coefficients at the predetermined position; determine a Rice parameter based on the difference between the sum of the absolute values and a base level; binarize the coefficient level information using the determined Rice parameter; and indicate whether the absolute value of the current coefficient is greater than a predetermined value. The value's rank mapping information is encoded; and a bitstream comprising binarized coefficient rank information and encoded rank mapping information is generated, wherein the coefficient at the predetermined position includes at least one of a first coefficient adjacent to the right of the current coefficient, a second coefficient adjacent to the right of the first coefficient, a third coefficient adjacent to the lower side of the current coefficient, a fourth coefficient adjacent to the lower side of the third coefficient, or a fifth coefficient adjacent in the lower right diagonal direction of the current coefficient, wherein the basic rank is determined based on whether the rank mapping information is obtained from the bitstream, wherein the rank mapping information indicates whether the absolute value of the current coefficient is greater than a predetermined value and is encoded according to context-adaptive binary arithmetic code CABAC.
4. A method for transmitting a bit stream, comprising: Perform an encoding method to generate the bit stream; The bitstream is transmitted, wherein the encoding method includes: obtaining coefficient level information about the absolute value of a current coefficient; obtaining the absolute value of a coefficient at a predetermined position from coefficients entropy-encoded before the current coefficient; determining the sum of the absolute values of the coefficients at the predetermined position; determining a Rice parameter based on the difference between the sum of the absolute values and a base level; binarizing the coefficient level information using the determined Rice parameter; encoding level mapping information indicating whether the absolute value of the current coefficient is greater than a predetermined value; and generating the bitstream including the binarized coefficient level information and the encoded level mapping information, wherein the coefficient at the predetermined position includes at least one of a first coefficient adjacent to the right of the current coefficient, a second coefficient adjacent to the right of the first coefficient, a third coefficient adjacent to the lower side of the current coefficient, a fourth coefficient adjacent to the lower side of the third coefficient, or a fifth coefficient adjacent in the lower right diagonal direction of the current coefficient, wherein the base level is determined based on whether the level mapping information is obtained from the bitstream, wherein the level mapping information indicates whether the absolute value of the current coefficient is greater than a predetermined value and is encoded according to context-adaptive binary arithmetic encoding CABAC.
Citation Information
Patent Citations
Parameter update method for entropy coding and decoding of conversion coefficient level, and entropy coding device and entropy decoding device of conversion coefficient level using same
CN104365099A
Parameter update method for entropy coding and decoding of conversion coefficient level, and entropy coding device and entropy decoding device of conversion coefficient level using same
CN104869423A