Entropy encoding device, entropy encoding / decoding device, and method thereof
By determining a scaling factor for updating symbol probabilities based on the type of video slice, the method addresses the inefficiencies in existing entropy encoding and decoding techniques, resulting in enhanced compression performance and accuracy.
Patent Information
- Application Number
- JP2024548424
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-09-08
- Filing Date
- 2023-03-09
- Publication Date
- 2025-04-15
AI Technical Summary
Existing entropy encoding and decoding methods in video compression, such as those used in H.264 and MPEG-4, face challenges in efficiently updating probabilistic models for context-based binary arithmetic encoding/decoding, particularly across different types of video slices.
The proposed method involves determining a scaling factor for updating the probability of occurrence of a symbol based on the type of slice in the bitstream. For I slices, a first function is used to determine the scaling factor, while for B slices or P slices, a second function is employed, with the scaling factor being used to update the probability of the symbol.
This approach enhances the efficiency of entropy encoding and decoding by adaptively updating probabilistic models based on the type of video slice, leading to improved compression performance and decoding accuracy.
Smart Images

Figure 2025510493000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to entropy coding and entropy decoding, and more particularly to a method and apparatus for updating a probability model in context-based binary arithmetic coding / decoding. [Background technology]
[0002] In H.264 and MPEG-4, a video signal is hierarchically divided into sequences, frames, slices, macroblocks, and blocks, and the blocks are the smallest processing units. In the encoding aspect, residual data of the blocks is obtained through intraframe or interframe prediction. The residual data is then compressed through transformation, quantization, scanning, run length coding, and entropy coding. As an entropy coding method, there is a context-based adaptive M-ary arithmetic coding (CAMAC). The context-based adaptive M-ary arithmetic coding (CAMAC) is an entropy coding method, and is also called context-based adaptive multi-symbol arithmetic coding. According to the context-based adaptive M-ary arithmetic coding (CAMAC), arithmetic coding is performed based on the occurrence probability of multiple symbols. Summary of the Invention [Means for solving the problem]
[0003] According to an embodiment of the present disclosure, there is provided an entropy decoding method. The entropy decoding method may also include acquiring information related to a type of slice from a bitstream. The entropy decoding method may also include arithmetically decoding a current symbol corresponding to a syntax element based on an occurrence probability of a symbol. The entropy decoding method may also include determining a first scaling factor for updating the occurrence probability of the symbol using a first function based on the information related to a slice type indicating an I slice. A value of the first function may be determined based on a first critical value. The entropy decoding method may also include determining the first scaling factor using a second function based on the information related to a slice type indicating a B slice or a P slice. A value of the second function may be determined based on a second critical value. The entropy decoding method may also include updating the occurrence probability of the symbol using the first scaling factor. The first critical value may be greater than or equal to the second critical value.
[0004] According to an embodiment of the present disclosure, there is provided an entropy decoding device. The entropy decoding device may also include at least one processor. The at least one processor may acquire information related to a type of slice from a bitstream. The at least one processor may arithmetically decode a current symbol corresponding to a syntax element based on an occurrence probability of a symbol. The at least one processor may determine a first scaling factor for updating the occurrence probability of the symbol using a first function based on the information related to the slice type indicating an I slice. A value of the first function may be determined based on a first critical value. The at least one processor may determine the first scaling factor using a second function based on the information related to the slice type indicating a B slice or a P slice. A value of the second function may be determined based on a second critical value. The at least one processor may update the occurrence probability of the symbol using the first scaling factor. The first critical value may be greater than or equal to the second critical value.
[0005] According to an embodiment of the present disclosure, there is provided an entropy coding method. The entropy coding method may also include obtaining information related to a type of slice from a bitstream. The entropy coding method may also include arithmetically coding a current symbol corresponding to a syntax element based on a probability of occurrence of a symbol. The entropy coding method may also include determining a first scaling factor for updating the probability of occurrence of the symbol using a first function based on the information related to a slice type indicating an I slice. A value of the first function may be determined based on a first critical value. The entropy coding method may also include determining the first scaling factor using a second function based on the information related to a slice type indicating a B slice or a P slice. A value of the second function may be determined based on a second critical value. The entropy coding method may also include updating the probability of occurrence of the symbol using the first scaling factor. The first critical value may be greater than or equal to the second critical value.
[0006] According to an embodiment of the present disclosure, there is provided an entropy coding device. The entropy coding device may also include at least one processor. The at least one processor may acquire information related to a type of slice from a bitstream. The at least one processor may arithmetically code a current symbol corresponding to a syntax element based on an occurrence probability of a symbol. The at least one processor may determine a first scaling factor for updating the occurrence probability of the symbol using a first function based on the information related to the slice type indicating an I slice. A value of the first function may be determined based on a first critical value. The at least one processor may determine the first scaling factor using a second function based on the information related to the slice type indicating a B slice or a P slice. A value of the second function may be determined based on a second critical value. The at least one processor may update the occurrence probability of the symbol using the first scaling factor. The first critical value may be greater than or equal to the second critical value. [Brief description of the drawings]
[0007] [Figure 1A] FIG. 2 is a block diagram of a video decoding device according to an embodiment of the present disclosure. [Figure 1B] FIG. 2 is a block diagram of a video decoder according to one embodiment of the present disclosure. [Figure 1C] FIG. 2 is a block diagram of a video decoding device according to an embodiment of the present disclosure. [Figure 2A] 1 is a block diagram of a video encoding device according to an embodiment of the present disclosure. [Figure 2B] FIG. 2 is a block diagram of a video decoder according to one embodiment of the present disclosure. [Figure 2C] 1 is a block diagram of a video encoding device according to an embodiment of the present disclosure. [Diagram 3] 1 is a diagram illustrating a process in which a video decoding device divides a current coding unit and determines at least one coding unit according to an embodiment of the present disclosure. [Figure 4] 1 is a diagram illustrating a process in which a video decoding device divides a coding unit having a non-square shape and determines at least one coding unit according to one embodiment of the present disclosure. [Diagram 5] 1 is a diagram illustrating a process in which a video decoding apparatus divides a coding unit based on at least one of block configuration information and partition mode information according to an embodiment of the present disclosure. [Figure 6] 1 is a diagram illustrating a method for a video decoding device to determine a predetermined coding unit from among an odd number of coding units according to one embodiment of the present disclosure. [Figure 7] 1 is a diagram illustrating an order in which multiple coding units are processed when a video decoding apparatus divides a current coding unit and determines multiple coding units according to an embodiment of the present disclosure. [Figure 8] 11 is a diagram illustrating a process in which a video decoding apparatus determines to divide a current coding unit into an odd number of coding units when the coding units cannot be processed in a predetermined order, according to an embodiment of the present disclosure. [Figure 9] 1 is a diagram illustrating a process in which a video decoding device divides a first coding unit and determines at least one coding unit according to one embodiment of the present disclosure. [Figure 10] A diagram illustrating that, according to one embodiment of the present disclosure, when a non-square second coding unit determined by a video decoding device by dividing a first coding unit satisfies certain conditions, the manner in which the second coding unit may be divided is restricted. [Figure 11] 13 is a diagram illustrating a process in which a video decoding device divides a square-shaped coding unit when the division mode information does not indicate division into four square-shaped coding units according to one embodiment of the present disclosure. [Figure 12] 1 is a diagram illustrating that a processing order between multiple coding units may differ depending on a division process of the coding units, according to an embodiment of the present disclosure. [Figure 13]A diagram illustrating a process in which the depth of a coding unit is determined as the shape and size of the coding unit change when a coding unit is recursively divided and multiple coding units are determined according to one embodiment of the present disclosure. [Figure 14] 1 is a diagram illustrating an index (PID: part index) for depth and coding unit partition that can be determined according to the type and size of a coding unit according to one embodiment of the present disclosure. [Figure 15] 1 is a diagram illustrating a plurality of coding units being determined based on a plurality of predetermined data units included in a picture according to one embodiment of the present disclosure. [Figure 16] 1 is a diagram illustrating processing blocks that are used to determine the order in which reference coding units included in a picture are determined according to one embodiment of the present disclosure. [Figure 17] 1 is a block diagram showing a configuration of an entropy encoding device according to an embodiment of the present disclosure. [Figure 18] 1 illustrates a probability update process used in context-based adaptive M-ary arithmetic coding (CAMAC) according to one embodiment of the present disclosure. [Figure 19A] 1 is a diagram illustrating a process of performing arithmetic coding based on context-based adaptive M-ary arithmetic coding (CAMAC) according to one embodiment of the present disclosure. [Figure 19B] 1 is a diagram illustrating a process of performing arithmetic coding based on context-based adaptive M-ary arithmetic coding (CAMAC) according to one embodiment of the present disclosure. [Figure 19C] 1 is a diagram illustrating a process of performing arithmetic coding based on context-based adaptive M-ary arithmetic coding (CAMAC) according to one embodiment of the present disclosure. [Figure 20] FIG. 13 is a diagram for comparing a probability update process using one scaling factor with a probability update process using multiple scaling factors. [Figure 21] 1 is a flowchart of a method for updating probabilities utilizing a scaling factor according to one embodiment of the present disclosure. [Figure 22]1 is a flowchart of a method for updating probabilities utilizing multiple scaling factors according to one embodiment of the present disclosure. [Figure 23] 4 is a flowchart of a method for updating the probability of occurrence of symbols using multiple scaling factors according to one embodiment of the present disclosure. [Figure 24] 4 is a flowchart of a method for determining a value of a scaling factor based on a syntax element corresponding to a current symbol, according to one embodiment of the present disclosure. [Diagram 25] 1 is a flowchart of a method for determining a number of symbols based on syntax elements according to one embodiment of the present disclosure. [Figure 26] 4 is a flowchart of a method for determining a probability of occurrence of a symbol based on a context model according to one embodiment of the present disclosure. [Figure 27] 1 is a block diagram showing a configuration of an entropy decoding device according to an embodiment of the present disclosure. [Figure 28] 1 is a flowchart of a method for updating probabilities utilizing a scaling factor according to one embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] In this disclosure, the phrase "at least one of a, b, or c" may refer to "a," "b," "c," "a and b," "a and c," "b and c," "any of a, b, and c," or variations thereof.
[0009] The advantages, features, and methods of achieving the disclosed embodiments will become clear with reference to the embodiments described below in conjunction with the accompanying drawings. However, the present disclosure is not limited to the embodiments disclosed below, and may be embodied in various different forms, but the present embodiments are provided only to complete the disclosure and to fully inform those skilled in the art of the scope of the invention.
[0010] The terms used in this specification are briefly explained, and the disclosed embodiments are specifically explained.
[0011] The terms used in this specification are currently widely used and common terms as much as possible, taking into consideration the functions in this disclosure, but they may vary depending on the intentions of engineers engaged in related fields, precedents, or the emergence of new technologies. In addition, in certain cases, the applicant may arbitrarily select terms, and in such cases, the meanings of the terms will be described in detail in the description of the invention. Therefore, the terms used in this disclosure must be defined based on the meanings of the terms and the overall content of this disclosure, rather than simply the names of the terms.
[0012] In this specification, the singular expression includes the plural expression unless the context clearly specifies otherwise.
[0013] Throughout the specification, when a part "comprises" a certain element, this does not mean excluding other elements, but also including other elements, unless specifically stated to the contrary.
[0014] The term "module" as used in the specification means a software configuration or a hardware component, and a "module" performs a certain function. However, the meaning of "module" is not limited to software or hardware. A "module" may be configured to exist on an addressable recording medium and to execute one or more processors. Thus, by way of example, a "module" includes components such as software components, object-oriented software components, class components, and task components, as well as processes, functions, attributes, procedures, subroutines, program code segments, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables. The functions provided in the components and "modules" may be further combined into fewer components and "modules" or further separated into additional components and "modules."
[0015] In one embodiment of the present disclosure, the "unit" may be embodied by a processor and a memory. The term "processor" should be broadly interpreted to include a general purpose processor, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a controller, a microcontroller, a state machine, and the like. In some environments, the term "processor" may also refer to an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), and the like. The term "processor" may also refer to a combination of processing devices, such as, for example, a combination of a digital signal processor (DSP) and a microprocessor, a combination of multiple microprocessors, a combination of one or more microprocessors in conjunction with a digital signal processor (DSP) core, or any other such configuration.
[0016] The term "memory" should be interpreted broadly to include any electronic component capable of storing electronic information. The term "memory" can also refer to various types of processor-readable media, such as random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage devices, registers, etc. A memory is in electronic communication with a processor if the processor can read information from / to the memory and / or write information to the memory. A memory integrated with the processor is in electronic communication with the processor.
[0017] Hereinafter, "image" may refer to a static image, such as a still from a video, or a moving image, ie, a moving image, such as the video itself.
[0018] Hereinafter, a "sample" refers to data assigned to a sampling position of an image and to data to be processed. For example, in a spatial domain image, a pixel value and a transform coefficient in a transform domain are also samples. A unit including at least one such sample may be defined as a block.
[0019] In the following, the present embodiment will be described in detail with reference to the accompanying drawings so that a person having ordinary skill in the art to which the present disclosure pertains can easily carry out the present disclosure. In the drawings, portions that are not relevant to the description will be omitted in order to clearly explain the present disclosure.
[0020] Hereinafter, preferred embodiments of the present disclosure will be described in detail with reference to FIGS.
[0021] FIG. 1A illustrates a block diagram of a video decoding device according to one embodiment of the present disclosure.
[0022] The video decoding device 100 also includes a receiving unit 110 and a decoding unit 120. The receiving unit 110 and the decoding unit 120 also include at least one processor. The receiving unit 110 and the decoding unit 120 also include a memory that stores instructions executed by the at least one processor.
[0023] The receiving unit 110 may receive a bitstream. The bitstream includes information obtained by encoding video by the video encoding device 150 described below. The bitstream may also be transmitted from the video encoding device 150. The video encoding device 150 and the video decoding device 100 may be connected to each other via a wired or wireless connection, and the receiving unit 110 may receive the bitstream via a wired or wireless connection. The receiving unit 110 may receive the bitstream from a recording medium such as an optical medium or a hard disk.
[0024] The decoder 120 may reconstruct an image based on information acquired from a received bitstream. The decoder 120 may acquire syntax elements for reconstructing an image from the bitstream. The decoder 120 may reconstruct the image based on the syntax elements.
[0025] The decoder 120 may entropy decode the syntax element acquired from the bitstream, and may use context-based adaptive M-ary arithmetic coding (CAMAC) as an entropy coding scheme. The context-based adaptive M-ary arithmetic coding (CAMAC) may be referred to as context-based multi-symbol arithmetic coding. In an embodiment of the present disclosure, the decoder 120 may determine at least one scaling factor for updating occurrence probabilities associated with symbols. The decoder 120 may acquire information related to a slice type from the bitstream. The decoder 120 may arithmetically decode a current symbol corresponding to the syntax element based on the occurrence probabilities of the symbols. If the information related to the slice type indicates an I slice, the decoder 120 may determine a first scaling factor for updating occurrence probabilities of the symbols using a first function. A value of the first function may be determined based on a first critical value. When the information regarding the slice type indicates a B slice or a P slice, the decoder 120 may determine a first scaling factor for updating the occurrence probability of a symbol using a second function. A value of the second function may be determined based on a second threshold value. The decoder 120 may update the occurrence probability of a symbol using the first scaling factor.
[0026] The operation of video decoding device 100 will be described in further detail in conjunction with FIG. 1B.
[0027] FIG. 1B illustrates a block diagram of a video decoder 6000 according to one embodiment of the present disclosure.
[0028] The video decoder 6000 according to an embodiment of the present disclosure performs the same operations as those performed by the decoder 120 of the video decoder 100 in decoding video data.
[0029] 1B, the entropy decoding unit 6150 receives coded video data to be decoded and coding information required for decoding from a bitstream 6050, and parses the coded video data and the coding information. The coded video data also includes quantized transform coefficients. The inverse quantization unit 6200 and the inverse transform unit 6250 restore residual data from the quantized transform coefficients.
[0030] As described below, in an embodiment of the present disclosure, the entropy decoder 6150 may determine at least one scaling factor for updating the occurrence probability of a symbol. The entropy decoder 6150 may obtain information related to a slice type from the bitstream 6050. The entropy decoder 6150 may arithmetically decode a current symbol corresponding to a syntax element based on the occurrence probability of the symbol. If the information related to the slice type indicates an I slice, the entropy decoder 6150 may determine a first scaling factor for updating the occurrence probability of a symbol using a first function. The value of the first function may be determined based on a first critical value. If the information related to the slice type indicates a B slice or a P slice, the entropy decoder 6150 may determine a first scaling factor for updating the occurrence probability of a symbol using a second function. The value of the second function may be determined based on a second critical value. The entropy decoder 6150 may use the first scaling factor to update the probability of occurrence of the symbol.
[0031] The intra prediction unit 6400 performs intra prediction for each block. The inter prediction unit 6350 performs inter prediction for each block using a reference image acquired by the reconstructed picture buffer 6300. By adding prediction data for each block generated by the intra prediction unit 6400 or the inter prediction unit 6350 and residual data, spatial domain data for a block of a current image is reconstructed, and the deblocking unit 6450 and the sample adaptive offset (SAO) performing unit 6500 may perform loop filtering on the reconstructed spatial domain data and output a filtered reconstructed image 6600. In addition, the reconstructed image stored in the reconstructed picture buffer 6300 may be output as a reference image.
[0032] In order to decode video data in the decoder 120 of the video decoder 100, the steps of the video decoder 6000 according to an embodiment of the present disclosure may be performed block by block.
[0033] FIG. 1C illustrates a block diagram of a video decoder 100 according to one embodiment.
[0034] The video decoder 100 according to an embodiment also includes a memory 130 and at least one processor 125 connected to the memory 130. The video decoder 100 according to an embodiment may operate as an individual processor or may operate under the control of a central processor. The memory 130 of the video decoder 100 may store data received from an external source and data generated by the processor.
[0035] The memory 130 of the video decoding apparatus 100 according to an embodiment of the present disclosure may also include at least one instruction configured to be executable by the at least one processor 125. The at least one instruction, when executed, may be configured to cause the at least one processor 125 to obtain information related to a slice type from a bitstream. The at least one instruction, when executed, may be configured to cause the at least one processor 125 to arithmetically decode a current symbol corresponding to a syntax element based on the occurrence probability of the symbol. The at least one instruction, when executed, may be configured to cause the at least one processor 125 to determine a first scaling factor for updating the occurrence probability of the symbol using a first function when the information related to the slice type indicates an I slice. A value of the first function may be determined based on a first critical value. The at least one instruction, when executed, may be configured to cause the at least one processor 125 to determine a first scaling factor using a second function if the information related to the slice type indicates a B slice or a P slice. A value of the second function may be determined based on a second threshold value. The at least one instruction, when executed, may be configured to cause the at least one processor 125 to update occurrence probabilities of symbols using the first scaling factor.
[0036] FIG. 2A illustrates a block diagram of a video encoding device according to one embodiment of the present disclosure.
[0037] The video encoding device 150 according to an embodiment of the present disclosure also includes an encoding unit 155 and an output unit 160 .
[0038] The encoding unit 155 and the output unit 160 may include at least one processor. The encoding unit 155 and the output unit 160 may also include a memory that stores instructions executed by the at least one processor. The encoding unit 155 and the output unit 160 may be implemented by separate hardware, or the encoding unit 155 and the output unit 160 may be included in a single piece of hardware.
[0039] The encoding unit 155 may obtain a prediction block of the current block according to a prediction mode of the current block, and may encode a residual, which is a difference between the current block and the prediction block, by transforming and quantizing the residual. The output unit 160 may generate a bitstream including information related to the prediction mode of the current block and structure information for determining data units having other hierarchical division forms, and output the bitstream.
[0040] The encoding unit 155 may entropy-encode the syntax element, which is encoding information generated in the encoding process, and may use Context-Based Adaptive M-ary Arithmetic Coding (CAMAC) as an entropy encoding method. The Context-Based Adaptive M-ary Arithmetic Coding (CAMAC) may be referred to as context-based multi-symbol arithmetic coding. In an embodiment of the present disclosure, the encoding unit 155 may acquire information related to a slice type. The encoding unit 155 may arithmetically code a current symbol corresponding to the syntax element based on an occurrence probability of the symbol. If the information related to the slice type indicates an I slice, the encoding unit 155 may determine a first scaling factor for updating the occurrence probability of the symbol using a first function. The value of the first function may be determined based on a first critical value. If the information related to the slice type indicates a B slice or a P slice, the encoding unit 155 may determine a first scaling factor using a second function. The value of the second function may be determined based on a second critical value.
[0041] FIG. 2B illustrates a block diagram of a video encoder according to one embodiment of the present disclosure.
[0042] The video encoding unit 7000 according to an embodiment of the present disclosure performs the same operations as those performed in the encoding unit 155 of the video encoding device 150 to encode video data.
[0043] That is, the intra prediction unit 7200 performs intra prediction for each block in the current image 7050, and the inter prediction unit 7150 performs inter prediction for each block using the current image 7050 and a reference image obtained by the reconstructed picture buffer 7100.
[0044] Residual data is generated by extracting prediction data for each block output from the intra prediction unit 7200 or the inter prediction unit 7150 from data for the block being encoded in the current image 7050, and the transform unit 7250 and the quantization unit 7300 can transform and quantize the residual data and output quantized transform coefficients for each block.
[0045] The inverse quantization unit 7450 and the inverse transform unit 7500 may perform inverse quantization and inverse transform on the quantized transform coefficients to restore spatial domain residual data. The restored spatial domain residual data is added to prediction data for each block output from the intra prediction unit 7200 or the inter prediction unit 7150 to restore spatial domain data for a block of the current image 7050. The deblocking unit 7550 and the SAO performing unit 7600 perform in-loop filtering on the restored spatial domain data to generate a filtered restored image. The generated restored image is stored in the restored picture buffer 7100. The restored image stored in the restored picture buffer 7100 may be used as a reference image for inter prediction of another image. The entropy coding unit 7350 may entropy code the quantized transform coefficients, and the entropy coded coefficients may be output as a bitstream 7400.
[0046] As described below, in an embodiment of the present disclosure, the entropy encoder 7350 may acquire information related to a slice type. The entropy encoder 7350 may arithmetically encode a current symbol corresponding to a syntax element based on the occurrence probability of the symbol. If the information related to the slice type indicates an I slice, the entropy encoder 7350 may determine a first scaling factor for updating the occurrence probability of the symbol using a first function. The value of the first function may be determined based on a first critical value. If the information related to the slice type indicates a B slice or a P slice, the entropy encoder 7350 may determine a first scaling factor using a second function. The value of the second function may be determined based on a second critical value.
[0047] Since the image encoder 7000 according to an embodiment of the present disclosure is applied to the image encoder 150, the operations of the image encoder 7000 according to an embodiment of the present disclosure may be performed on a block-by-block basis.
[0048] FIG. 2C illustrates a block diagram of a video encoding device 150 according to one embodiment.
[0049] The video encoding device 150 according to an embodiment also includes a memory 165 and at least one processor 170 connected to the memory 165. The video encoding device 150 according to an embodiment may operate as a separate processor or may operate under the control of a central processor. The memory 165 of the video encoding device 150 may store data received from an external source and data generated by the processor.
[0050] The memory 165 of the video encoding device 150 according to an embodiment of the present disclosure may also include at least one instruction configured to be executable by the at least one processor 170. The at least one instruction may be configured, when executed, to cause the at least one processor 170 to obtain information related to a slice type. The at least one instruction may be configured, when executed, to cause the at least one processor 170 to arithmetically code a current symbol corresponding to a syntax element based on the occurrence probability of the symbol. The at least one instruction may be configured, when executed, to cause the at least one processor 170 to determine a first scaling factor for updating the occurrence probability of a symbol using a first function when the information related to the slice type indicates an I slice. A value of the first function may be determined based on a first critical value. The at least one instruction may be configured, when executed, to cause the at least one processor 170 to determine a first scaling factor using a second function when the information related to the slice type indicates a B slice or a P slice. The value of the second function may be determined based on a second critical value.
[0051] In the following, the division of coding units according to one embodiment of the present disclosure will be described in detail.
[0052] First, one picture can be divided into one or more slices or one or more tiles. One slice or one tile is also a sequence of one or more coding tree units (CTUs). A coding tree block (CTB) is a concept that is contrasted with a coding unit (CTU).
[0053] A maximal coded block (CTB) means an NxN block containing NxN samples, where N is an integer. Each color component may be divided into one or more maximal coded blocks (CTBs).
[0054] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), the largest coding unit (CTU) is a unit that includes a largest coding block (CTB) of luma samples, two largest coding blocks (CTB) of chroma samples corresponding thereto, and syntax elements used to code the luma samples and chroma samples. When a picture is a monochrome picture, the largest coding unit (CTU) is a unit that includes a largest coding block (CTB) of monochrome samples and syntax elements used to code the monochrome samples. When a picture is a picture that is coded into color planes separated by color components, the largest coding unit (CTU) is a unit that includes the picture and syntax elements used to code samples of the picture.
[0055] One maximal coding block (CTB) may be divided into MxN coding blocks containing MxN samples (M, N are integers).
[0056] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) is a unit including a coding block of luma samples, two coding blocks of corresponding chroma samples, and syntax elements used to code the luma samples and chroma samples. When a picture is a monochrome picture, a coding unit is a unit including a coding block of monochrome samples and syntax elements used to code the monochrome samples. When a picture is a picture coded into color planes separated by color components, a coding unit is a unit including the picture and syntax elements used to code samples of the picture.
[0057] As described above, the largest coding block (CTB) and the largest coding unit (CTU) are concepts that are distinct from each other, and the coding block and the coding unit are concepts that are distinct from each other. That is, the (largest) coding unit means a data structure that includes a (largest) coding block including a sample and a syntax element corresponding to the (largest) coding unit. However, since a person skilled in the art can understand that the (largest) coding unit or the (largest) coding block refers to a block of a predetermined size including a predetermined number of samples, in the following specification, the largest coding block (CTB) and the largest coding unit (CTU), or the coding block and the coding unit, will be referred to without distinction unless there is a special reason.
[0058] The image may be divided into largest coding units (CTUs), the size of which may be determined based on information obtained from the bitstream, and the shape of the largest coding units (CTUs) may have the same size as a square, but is not limited thereto.
[0059] For example, information regarding a maximum size of a luma coding block may be obtained from a bitstream, where the maximum size of the luma coding block indicated by the information regarding the maximum size of the luma coding block may be one of 16x16, 32x32, 64x64, 128x128, and 256x256.
[0060] For example, information on the maximum size of a luma coding block that can be divided into two and the luma block size difference may be obtained from a bitstream. The information on the luma block size difference may indicate a size difference between a luma maximum coding unit and a maximum luma coding block that can be divided into two. Thus, the size of the luma maximum coding unit may be determined by combining the information on the maximum size of a luma coding block that can be divided into two obtained from the bitstream and the information on the luma block size difference. The size of the chroma maximum coding unit may also be determined by using the size of the luma maximum coding unit. For example, if the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma block is half the size of the luma block, and similarly, the size of the chroma maximum coding unit is half the size of the luma maximum coding unit.
[0061] In one embodiment, information regarding the maximum size of a luma coding block that can be binary split is obtained from a bitstream, so that the maximum size of the luma coding block that can be binary split can be variably determined. In contrast, the maximum size of a luma coding block that can be ternary split can be fixed. For example, in an I picture, the maximum size of a luma coding block that can be ternary split is 32x32, and in a P picture or B picture, the maximum size of a luma coding block that can be ternary split is also 64x64.
[0062] Also, the largest coding unit (CTU) may be hierarchically divided into coding units based on partition mode information acquired from the bitstream, where the partition mode information may include at least one of information indicating whether or not a quad split is performed, information indicating whether or not a multi-partition is performed, partition direction information, and partition type information acquired from the bitstream.
[0063] For example, the information indicating whether or not a quad is split may indicate whether the current coding unit is quad split (QUAD_SPLIT) or not quad split.
[0064] If the current coding unit is not split into quads, the information indicating whether the current coding unit is to be split further may indicate whether the current coding unit is to be split further (NO_SPLIT) or whether the current coding unit is to be split into binary / ternary.
[0065] If the current coding unit is binary-partitioned or ternary-partitioned, the division direction information indicates that the current coding unit is divided in one of the horizontal and vertical directions.
[0066] If the current coding unit is split horizontally or vertically, the split type information indicates that the current coding unit is split by binary splitting or ternary splitting.
[0067] The partition mode of the current coding unit may be determined according to the partition direction information and the partition type information. If the current coding unit is binary partitioned horizontally, the partition mode may be binary horizontal partition (SPLIT_BT_HOR), if the current coding unit is ternary partitioned horizontally, the partition mode may be ternary horizontal partition (SPLIT_TT_HOR), if the current coding unit is binary partitioned vertically, the partition mode may be binary vertical partition (SPLIT_BT_VER), and if the current coding unit is ternary partitioned vertically, the partition mode may be ternary vertical partition (SPLIT_BT_VER).
[0068] The video decoding device 100 may obtain partition mode information from a bin string from a bitstream. The type of the bitstream received by the video decoding device 100 may include a fixed length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. A bin string indicates information as a list of two bits. A bin string may be composed of at least one beat. The video decoding device 100 may obtain partition mode information corresponding to the bin string based on a partition rule. The video decoding device 100 may determine whether to partition a coding unit into quads or not, or the partition direction and partition type, based on a bin string.
[0069] A coding unit may be smaller than or equal to a maximum coding unit (CTU). For example, the maximum coding unit (CTU) is also a coding unit having a maximum size, and is therefore also a coding unit. If the partition mode information related to the maximum coding unit (CTU) indicates that the coding unit is not partitioned, the coding unit determined in the maximum coding unit (CTU) has the same size as the maximum coding unit (CTU). If the partition mode information related to the maximum coding unit (CTU) indicates that the coding unit is partitioned, the maximum coding unit (CTU) may be partitioned into coding units. Also, if the partition mode information related to the coding unit indicates partitioning, the coding unit may be further partitioned into coding units of smaller sizes. However, the partitioning of an image is not limited thereto, and the maximum coding unit (CTU) and the coding unit may not be distinguished from each other. The partitioning of coding units will be described in more detail with reference to FIG. 3 to FIG. 16.
[0070] Also, one or more prediction blocks for prediction may be determined from the coding unit, where the prediction blocks are the same as or smaller than the coding unit, and one or more transform blocks for transformation may be determined from the coding unit, where the transform blocks are the same as or smaller than the coding unit.
[0071] The shapes and sizes of the transform block and the prediction block are independent of each other.
[0072] In one embodiment, prediction may be performed on a coding unit using the coding unit as a predictive block, and transformation may be performed on a coding unit using the coding unit as a transform block.
[0073] The division of the coding unit will be described in more detail in FIG. 3 to FIG. 16. The current block and the neighboring blocks in the present disclosure may indicate one of a largest coding unit (CTU), a coding unit, a prediction block, and a transform block. In addition, the current block or the current coding unit is a block currently being decoded or encoded, or a block currently being divided. The neighboring blocks are also blocks that are reconstructed before the current block. The neighboring blocks may be spatially or temporally adjacent to the current block. The neighboring blocks may be located at one of the lower left side, the left side, the upper left side, the upper side, the upper right side, the right side, and the lower right side of the current block.
[0074] FIG. 3 illustrates a process in which the video decoding device 100 divides a current coding unit and determines at least one coding unit, according to an embodiment.
[0075] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N, where N is a positive integer. The block shape information is information indicating at least one of the shape, direction, width / height ratio, and width / height size of a coding unit.
[0076] The shape of the coding unit may be square or non-square. If the width and height of the coding unit are the same (i.e., the block shape of the coding unit is 4Nx4N), the video decoding device 100 may determine that the block shape information of the coding unit is square. The video decoding device 100 may determine that the shape of the coding unit is non-square.
[0077] If the width and height of a coding unit are different (i.e., the block shape of the coding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the video decoding device 100 may determine the block shape information of the coding unit to be non-square. If the block shape information of the coding unit is non-square, the video decoding device 100 may determine the ratio of the width and height in the block shape information of the coding unit to 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. Based on the width and height of the coding unit, the video decoding device 100 may determine whether the coding unit is horizontal or vertical. Furthermore, the video decoding device 100 may determine the size of the coding unit based on at least one of the width, height, and width of the coding unit.
[0078] According to an embodiment, the video decoding device 100 may determine the type of the coding unit using the block type information, and may determine the type of the coding unit to be partitioned using the partition type mode information. That is, depending on the block type indicated by the block type information used by the video decoding device 100, a partitioning method of the coding unit indicated by the partition type mode information may be determined.
[0079] The video decoding device 100 may acquire the partition mode information from the bitstream. However, the present invention is not limited thereto, and the video decoding device 100 and the video encoding device 150 may determine the partition mode information agreed upon in advance based on the block format information. The video decoding device 100 may determine the partition mode information agreed upon in advance for the maximum coding unit or the minimum coding unit. For example, the video decoding device 100 may determine the partition mode information as quad split for the maximum coding unit. Also, the video decoding device 100 may determine the partition mode information as "no split" for the minimum coding unit. Specifically, the video decoding device 100 may determine the size of the maximum coding unit as 256x256. The video decoding device 100 may determine the partition mode information agreed upon in advance as quad split. The quad split is a partition mode in which both the width and the height of the coding unit are divided into two equal parts. Based on the partition mode information, the video decoding device 100 may acquire a coding unit of 128x128 size from the maximum coding unit of 256x256 size. Also, the video decoding device 100 may determine the size of the minimum coding unit to be 4x4. The video decoding device 100 may acquire partition mode information indicating "no partition" for the minimum coding unit.
[0080] According to an embodiment, the video decoding apparatus 100 may use block shape information indicating that the current coding unit is square. For example, the video decoding apparatus 100 may determine whether to not split the square coding unit, to split it vertically, to split it horizontally, or to split it into four coding units, according to the partition shape mode information. Referring to FIG. 3, when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may determine a coding unit 310a having the same size as the current coding unit 300 according to the partition shape mode information indicating no partition, or may determine divided coding units 310b, 310c, 310d, 310e, and 310f according to the partition shape mode information indicating a predetermined partition method.
[0081] Referring to FIG. 3, the video decoding device 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the partition mode information indicating the division in the vertical direction, according to an embodiment. The video decoding device 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the partition mode information indicating the division in the horizontal direction. The video decoding device 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on the partition mode information indicating the division in the vertical and horizontal directions. The video decoding device 100 may determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the partition mode information indicating the ternary division in the vertical direction, according to an embodiment. The video decoding device 100 may determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the partition mode information indicating the ternary division in the horizontal direction. However, the division patterns into which the square coding unit may be divided are not limited to the above-mentioned patterns, but may include various patterns that may be indicated by the division pattern mode information. The predetermined division patterns into which the square coding unit may be divided will be described in detail below through various embodiments.
[0082] FIG. 4 illustrates a process in which the video decoding device 100 divides a non-square coding unit to determine at least one coding unit, according to an embodiment.
[0083] According to an embodiment, the video decoding apparatus 100 may use block shape information indicating that the current coding unit is non-square. The video decoding apparatus 100 may determine whether to not split the non-square current coding unit or to split it in a predetermined manner according to the partition mode information. Referring to FIG. 4, when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the video decoding apparatus 100 may determine a coding unit 410 or 460 having the same size as the current coding unit 400 or 450 according to the partition mode information indicating no partition, or may determine a partitioned coding unit 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, or 480c according to the partition mode information indicating a predetermined partition method. The predetermined partition method for partitioning a non-square coding unit will be described in detail below through various embodiments.
[0084] According to an embodiment, the video decoding device 100 may determine a form in which a coding unit is to be divided using the partition mode information, and in this case, the partition mode information may indicate the number of at least one coding unit to be generated by dividing the coding unit. Referring to FIG 4, when the partition mode information indicates that the current coding unit 400 or 450 is to be divided into two coding units, the video decoding device 100 may divide the current coding unit 400 or 450 based on the partition mode information and determine two coding units 420a, 420b or 470a, 470b included in the current coding unit.
[0085] According to an embodiment, when the video decoding device 100 divides the non-square shaped current coding unit 400 or 450 based on the division shape mode information, the video decoding device 100 may divide the current coding unit 400 or 450 by considering a position of a long side of the non-square shaped current coding unit 400 or 450. For example, the video decoding device 100 may divide the current coding unit 400 or 450 in a direction that divides the long side of the current coding unit 400 or 450 by considering the shape of the current coding unit 400 or 450, to determine a plurality of coding units.
[0086] According to an embodiment, when the partition mode information indicates that the coding unit is to be partitioned into an odd number of blocks (ternary partitioning), the video decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450. For example, when the partition mode information indicates that the current coding unit 400 or 450 is to be partitioned into three coding units, the video decoding device 100 may partition the current coding unit 400 or 450 into three coding units 430a, 430b, 430c, 480a, 480b, and 480c.
[0087] According to an embodiment, the width-to-height ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the width-to-height ratio is 4:1, the width is greater than the height, so the block shape information is also horizontal. When the width-to-height ratio is 1:4, the width is less than the height, so the block shape information is also vertical. The video decoding apparatus 100 may determine to divide the current coding unit into an odd number of blocks based on the partition shape mode information. In addition, the video decoding apparatus 100 may determine a partition 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 has a vertical direction in which the height is greater than the width, the video decoding apparatus 100 may divide the current coding unit 400 in the horizontal direction to determine coding units 430a, 430b, and 430c. Also, if the current coding unit 450 has a horizontal dimension in which the width is greater than the height, the video decoding apparatus 100 may divide the current coding unit 450 vertically to determine coding units 480a, 480b, and 480c.
[0088] According to an embodiment, the video decoding apparatus 100 determines an odd number of coding units included in the current coding unit 400 or 450, but the determined coding units are not all the same size. For example, the size of a certain coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c may be different from the other coding units 430a, 430c, 480a, and 480c. That is, the coding units that may be determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, the odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c may have different sizes.
[0089] According to an embodiment, when the partition mode information indicates that a coding unit is partitioned into an odd number of blocks, the video decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and may further place a certain restriction on at least one of the odd number of coding units generated by partitioning. Referring to FIG 4, the video decoding device 100 may perform a decoding process for the coding units 430b and 480b located in the center among three coding units 430a, 430b, 430c, 480a, 480b, and 480c generated by partitioning the current coding unit 400 or 450 differently from the other coding units 430a, 430c, 480a, and 480c. For example, the video decoding device 100 may limit the centrally located coding units 430b and 480b from being further divided, unlike the other coding units 430a, 430c, 480a, and 480c, or may limit them to being divided only a predetermined number of times.
[0090] FIG. 5 illustrates a process in which the video decoding apparatus 100 divides a coding unit based on at least one of block configuration information and partition configuration mode information, according to an embodiment.
[0091] According to an embodiment, the video decoding apparatus 100 may determine whether or not to divide the square-shaped first coding unit 500 into coding units based on at least one of the block shape information and the partition shape mode information. According to an embodiment, if the partition shape mode information indicates that the first coding unit 500 is to be partitioned in the horizontal direction, the video decoding apparatus 100 may divide the first coding unit 500 in the horizontal direction to determine the second coding unit 510. The first coding unit, the second coding unit, and the third coding unit used according to an embodiment are terms used to understand the partitioning context between the coding units. For example, if the first coding unit is partitioned, the second coding unit may be determined, and if the second coding unit is partitioned, the third coding unit may be determined. In the following, the relationship between the first coding unit, the second coding unit, and the third coding unit used may be understood according to the above-mentioned characteristics.
[0092] According to an embodiment, the video decoding device 100 may determine whether or not to divide the determined second coding unit 510 into coding units based on the partition mode information. Referring to FIG. 5, the video decoding device 100 may divide the non-square second coding unit 510 determined by dividing the first coding unit 500 into at least one third coding unit 520a, 520b, 520c, 520d based on the partition mode information, or may not divide the second coding unit 510. The video decoding device 100 acquires the partition mode information, and the video decoding device 100 may divide the first coding unit 500 based on the acquired partition mode information, for example, determine a plurality of second coding units 510 of various types, and the second coding units 510 may be divided according to the manner in which the first coding unit 500 is divided based on the partition mode information. According to an embodiment, when the first coding unit 500 is divided into the second coding unit 510 based on the division mode information related to the first coding unit 500, the second coding unit 510 may also be divided into, for example, the third coding units 520a, 520b, 520c, and 520d based on the division mode information related to the second coding unit 510. That is, the coding units may be recursively divided based on the division mode information related to each of the coding units. Thus, in a non-square coding unit, a square coding unit may be determined, and the square coding unit may be recursively divided to determine a non-square coding unit.
[0093] 5, among the odd number of third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510, a certain coding unit (e.g., a coding unit located in the middle or a square coding unit) may be divided recursively. According to an embodiment, the square third coding unit 520b, which is one of the odd number of third coding units 520b, 520c, and 520d, may be divided horizontally into a plurality of fourth coding units. The non-square fourth coding unit 530b or 530d, which is one of the plurality of fourth coding units 530a, 530b, 530c, and 530d, may also be divided into a plurality of coding units. For example, the non-square fourth coding unit 530b or 530d may be further divided into an odd number of coding units. Methods that may be used for the recursive division of the coding units will be described below through various embodiments.
[0094] According to an embodiment, the video decoding device 100 may divide each of the third coding units 520a, 520b, 520c, and 520d into coding units based on the partition mode information. Also, the video decoding device 100 may determine not to partition the second coding unit 510 based on the partition mode information. According to an embodiment, the video decoding device 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The video decoding device 100 may place a predetermined restriction on a certain third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the video decoding device 100 may restrict the coding unit 520c located in the middle of the odd number of third coding units 520b, 520c, and 520d so that it is not further divided or that it must be divided a configurable number of times.
[0095] 5, the video decoding apparatus 100 may restrict the third coding unit 520c located in the middle of the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to not be further divided, or to be divided into a predetermined division form (e.g., into only four coding units, or into a form corresponding to the division form of the second coding unit 510), or to be divided only a predetermined number of times (e.g., divided only n times (n>0)). However, the above restriction on the coding unit 520c located in the middle is merely an embodiment, and should not be construed as being limited to the above embodiment, but should be construed as including various restrictions that the coding unit 520c located in the middle may be decoded differently from the other coding units 520b and 520d.
[0096] According to an embodiment, the video decoding device 100 may obtain partition mode information used to partition the current coding unit from a predetermined position within the current coding unit.
[0097] FIG. 6 illustrates a method for the video decoding device 100 to determine a given coding unit from among an odd number of coding units according to one embodiment.
[0098] 6, the partition mode information of the current coding unit 600, 650 may be obtained from a sample at a predetermined position (e.g., samples 640, 690 located in the middle) among a plurality of samples included in the current coding unit 600, 650. However, the predetermined position in the current coding unit 600 from which at least one of the partition mode information may be obtained is not limited to the center position shown in FIG. 6, but may include various positions (e.g., top end, bottom end, left end, right end, top left end, bottom left end, top right end, bottom right end, etc.) that may be included in the current coding unit 600. The video decoding apparatus 100 may obtain the partition mode information obtained from the predetermined position and determine whether to partition the current coding unit into coding units of various types and sizes or not to divide the current coding unit.
[0099] According to an embodiment, when a current coding unit is divided into a predetermined number of coding units, the video decoding apparatus 100 may select one of the coding units. There are various methods for selecting one of the multiple coding units, which will be described below through various embodiments.
[0100] According to an embodiment, the video decoding apparatus 100 may divide a current coding unit into a plurality of coding units and determine a coding unit at a predetermined position.
[0101] According to an embodiment, the video decoding apparatus 100 may use information indicating the positions of each of the odd coding units to determine a coding unit located in the middle among the odd coding units. Referring to FIG 6, the video decoding apparatus 100 may divide a current coding unit 600 or a current coding unit 650 to determine odd coding units 620a, 620b, and 620c or odd coding units 660a, 660b, and 660c. The video decoding apparatus 100 may determine the middle coding unit 620b or the middle coding unit 660b using information regarding the positions of the odd coding units 620a, 620b, and 620c or the odd coding units 660a, 660b, and 660c. For example, the video decoding device 100 may determine the positions of the coding units 620a, 620b, and 620c based on information indicating positions of predetermined samples included in the coding units 620a, 620b, and 620c, thereby determining the center coding unit 620b. Specifically, the video decoding device 100 may determine the positions of the coding units 620a, 620b, and 620c based on information indicating positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c, thereby determining the center coding unit 620b.
[0102] According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, may also include information related to the positions or coordinates of the coding units 620a, 620b, and 620c in a picture. According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, may also include information indicating a width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and such width or height may correspond to information indicating a difference between the coordinates of the coding units 620a, 620b, and 620c in a picture. That is, the video decoding device 100 may determine the coding unit 620b located in the middle by directly using information related to the positions or coordinates of the coding units 620a, 620b, and 620c within the picture, or by using information related to the width or height of the coding unit corresponding to the difference between the coordinates.
[0103] According to an embodiment, information indicating a position of the top left sample 630a of the top coding unit 620a may indicate (xa, ya) coordinates, information indicating a position of the top left sample 530b of the middle coding unit 620b may indicate (xb, yb) coordinates, and information indicating a position of the top left sample 630c of the bottom coding unit 620c may indicate (xc, yc) coordinates. The video decoding apparatus 100 may determine the middle coding unit 620b using the coordinates of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the top left samples 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the middle sample 630b may be determined as the middle coding unit among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the top left samples 630a, 630b, and 630c may indicate absolute positions within a picture, and further, the (dxb, dyb) coordinates indicating the relative position of the top left sample 630b of the middle coding unit 620b and the (dxc, dyc) coordinates indicating the relative position of the top left sample 630c of the bottom coding unit 620c may be used. Furthermore, the method of determining a coding unit at a predetermined position by using the coordinates of a sample as information indicating the position of the sample included in the coding unit should not be interpreted as being limited to the above-mentioned method, but should be interpreted as various arithmetic methods that can use the coordinates of the sample.
[0104] According to an embodiment, the video decoding device 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select one of the coding units 620a, 620b, and 620c according to a predetermined criterion. For example, the video decoding device 100 may select the coding unit 620b having a different size from the coding units 620a, 620b, and 620c.
[0105] According to an embodiment, the video decoding device 100 may determine the width or height of each of the coding units 620a, 620b, and 620c using the (xa, ya) coordinates indicating the position of the top left sample 630a of the top coding unit 620a, the (xb, yb) coordinates indicating the position of the top left sample 630b of the middle coding unit 620b, and the (xc, yc) coordinates indicating the position of the top left sample 630c of the bottom coding unit 620c. The video decoding device 100 may determine the size of each of the coding units 620a, 620b, and 620c using the (xa, ya), (xb, yb), and (xc, yc) coordinates indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the video decoding device 100 may determine the width of the top coding unit 620a as the width of the current coding unit 600. The video decoding device 100 may determine the height of the top coding unit 620a as (yb-ya). According to an embodiment, the video decoding device 100 may determine the width of the middle coding unit 620b as the width of the current coding unit 600. The video decoding device 100 may determine the height of the middle coding unit 620b as (yc-yb). According to an embodiment, the video decoding device 100 may determine the width or height of the bottom coding unit 620c using the width or height of the current coding unit 600 and the widths and heights of the top coding unit 620a and the middle coding unit 620b. The video decoding device 100 may determine a coding unit having a size different from the other coding units based on the determined widths and heights of the coding units 620a, 620b, and 620c. 6, the video decoding apparatus 100 may determine a middle coding unit 620b having a size different from the sizes of an upper coding unit 620a and a lower coding unit 620c as a coding unit at a predetermined position. However, the above-described process of the video decoding apparatus 100 determining a coding unit having a size different from other coding units is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates, and therefore various processes of determining a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates may be used.
[0106] Video decoding device 100 may determine the width or height of each of coding units 660a, 660b, and 660c using the (xd, yd) coordinates indicating the position of the top left sample 670a of the left coding unit 660a, the (xe, ye) coordinates indicating the position of the top left sample 670b of the middle coding unit 660b, and the (xf, yf) coordinates indicating the position of the top left sample 670c of the right coding unit 660c. Video decoding device 100 may determine the size of each of coding units 660a, 660b, and 660c using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of coding units 660a, 660b, and 660c.
[0107] According to an embodiment, the video decoding device 100 may determine the width of the left coding unit 660a as (xe-xd). The video decoding device 100 may determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the video decoding device 100 may determine the width of the middle coding unit 660b as (xf-xe). The video decoding device 100 may determine the height of the middle coding unit 660b as the height of the current coding unit 600. According to an embodiment, the video decoding device 100 may determine the width or height of the right coding unit 660c using the width or height of the current coding unit 650 and the widths and heights of the left coding unit 660a and the middle coding unit 660b. The video decoding device 100 may determine a coding unit having a size different from other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. 6, the video decoding apparatus 100 may determine a middle coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as a coding unit at a predetermined position. However, the above-described process of the video decoding apparatus 100 determining a coding unit having a size different from other coding units is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates, and various processes of determining a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates may be used.
[0108] However, the position of the sample considered to determine the position of the coding unit is not to be interpreted as being limited to the upper left end as mentioned above, but rather, it is also to be interpreted that information related to the position of any sample included in the coding unit may be used.
[0109] According to an embodiment, the video decoding apparatus 100 may select a coding unit at a predetermined position from among an odd number of coding units determined by dividing the current coding unit, taking into consideration the shape of the current coding unit. For example, if the current coding unit is a non-square shape in which the width is greater than the height, the video decoding apparatus 100 may determine a coding unit at a predetermined position along the horizontal direction. That is, the video decoding apparatus 100 may determine one of the coding units at different positions in the horizontal direction and set a restriction on the coding unit. If the current coding unit is a non-square shape in which the height is greater than the width, the video decoding apparatus 100 may determine a coding unit at a predetermined position along the vertical direction. That is, the video decoding apparatus 100 may determine one of the coding units at different positions in the vertical direction and set a restriction on the coding unit.
[0110] According to an embodiment, the video decoding apparatus 100 may use information indicating the positions of each of the even number of coding units to determine a coding unit at a predetermined position among the even number of coding units. The video decoding apparatus 100 may divide (binary divide) the current coding unit to determine the even number of coding units, and may determine the coding unit at the predetermined position using information regarding the positions of the even number of coding units. A detailed process related to this process corresponds to the process of determining a coding unit at a predetermined position (e.g., a middle position) among the odd number of coding units described in FIG. 6, and therefore a detailed description thereof will be omitted.
[0111] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, in order to determine a coding unit at a predetermined position among the plurality of coding units, the video decoding apparatus 100 may use predetermined information related to the coding unit at a predetermined position during the division process. For example, in order to determine a coding unit at a center among the plurality of coding units into which the current coding unit is divided, the video decoding apparatus 100 may use at least one of block shape information and partition shape mode information stored in a sample included in a center coding unit during the division process.
[0112] 6, the video decoding apparatus 100 may divide a current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, and may determine a coding unit 620b located in the middle of the plurality of coding units 620a, 620b, and 620c. Furthermore, the video decoding apparatus 100 may determine the coding unit 620b located in the middle, taking into consideration a position where the partition mode information is acquired. That is, the partition mode information of the current coding unit 600 is acquired from a sample 640 located in the middle of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, the video decoding apparatus 100 may determine the coding unit 620b including the sample 640 as the coding unit located in the middle. However, information used to determine the coding unit located in the middle is not limited to the partition mode information, and various types of information may be used in the process of determining the coding unit located in the middle.
[0113] According to an embodiment, the predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample included in a coding unit to be determined. Referring to FIG. 6, the video decoding device 100 may use partition mode information obtained from a sample at a predetermined position in the current coding unit 600 (e.g., a sample at the middle of the current coding unit 600) to determine a coding unit at a predetermined position (e.g., a coding unit at the middle of the coding units) among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. That is, the video decoding device 100 may determine the sample at the predetermined position by considering the block format of the current coding unit 600, and may determine a coding unit 620b including a sample from which predetermined information (e.g., partition mode information) can be obtained among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may set a predetermined restriction. 6, according to an embodiment, the video decoding device 100 may determine a sample 640 located in the middle of a current coding unit 600 as a sample from which certain information may be acquired, and may place a certain restriction in a decoding process on a coding unit 620b including such a sample 640. However, the position of the sample from which certain information may be acquired is not limited to the above position, but may be a sample at any position included in the coding unit 620b to be determined for placing the restriction.
[0114] According to an embodiment, the position of a sample from which the predetermined information can be obtained may be determined according to the shape of the current coding unit 600. According to an embodiment, the block shape information may determine whether the shape of the current coding unit is square or non-square, and may determine the position of a sample from which the predetermined information can be obtained according to the shape. For example, the video decoding apparatus 100 may determine, using at least one of information related to the width and information related to the height of the current coding unit, a sample located on a boundary that divides at least one of the width and height of the current coding unit in half as a sample from which the predetermined information can be obtained. For another example, when the block shape information related to the current coding unit indicates that the current coding unit is non-square, the video decoding apparatus 100 may determine one of the samples adjacent to a boundary that divides the long side of the current coding unit in half as a sample from which the predetermined information can be obtained.
[0115] According to an embodiment, when the video decoding apparatus 100 divides a current coding unit into a plurality of coding units, the video decoding apparatus 100 may use partition mode information to determine a coding unit at a predetermined position among the plurality of coding units. According to an embodiment, the video decoding apparatus 100 may obtain partition mode information from a sample at a predetermined position included in the coding unit, and may divide the plurality of coding units generated by dividing the current coding unit using partition mode information obtained from a sample at a predetermined position included in each of the plurality of coding units. That is, the coding unit may be recursively divided using partition mode information obtained from a sample at a predetermined position included in each of the plurality of coding units. The recursive division process of the coding unit has been described with reference to FIG. 5, and therefore a detailed description thereof will be omitted.
[0116] In one embodiment, the video decoding device 100 may divide the current coding unit, determine at least one coding unit, and determine the order in which such at least one coding unit is decoded by a predetermined block (e.g., the current coding unit).
[0117] FIG. 7 illustrates an order in which multiple coding units are processed when the video decoding device 100 divides a current coding unit and determines multiple coding units, according to an embodiment.
[0118] According to one embodiment, the video decoding device 100 may, based on the partition mode information, partition the first coding unit 700 vertically to determine the second coding units 710a and 710b, partition the first coding unit 700 horizontally to determine the second coding units 730a and 730b, or partition the first coding unit 700 vertically and horizontally to determine the second coding units 750a, 750b, 750c, and 750d.
[0119] 7, the video decoding device 100 may determine an order in which second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction are processed in the horizontal direction (710c). The video decoding device 100 may determine a processing order in which second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction are processed in the vertical direction (730c). The video decoding device 100 may determine second coding units 750a, 750b, 750c, and 750d determined by dividing the first coding unit 700 in the vertical and horizontal directions in a predetermined order (e.g., raster scan order or Z scan order (750e)) in which coding units located in one row are processed and then coding units located in the next row are processed.
[0120] According to an embodiment, the video decoding apparatus 100 may recursively divide the coding units. Referring to FIG. 7, the video decoding apparatus 100 may divide the first coding unit 700 to determine a plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d, and recursively divide each of the determined coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. A method of dividing the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d may correspond to a method of dividing the first coding unit 700. 7, the video decoding apparatus 100 may divide the first coding unit 700 vertically to determine the second coding units 710a and 710b, and may further determine whether or not to divide the second coding units 710a and 710b independently.
[0121] According to an embodiment, the video decoding apparatus 100 divides the second coding unit 710a on the left side in the horizontal direction into third coding units 720a and 720b, and does not divide the second coding unit 710b on the right side.
[0122] According to an embodiment, the processing order of the coding units may be determined based on the division process of the coding units. In other words, the processing order of the divided coding units may be determined based on the processing order of the coding units immediately before the division. The video decoding apparatus 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the second coding unit 710a on the left side, independently of the second coding unit 710b on the right side. Since the second coding unit 710a on the left side is divided in the horizontal direction and the third coding units 720a and 720b are determined, the third coding units 720a and 720b may be processed in the vertical direction (720c). In addition, since the order in which the second coding unit 710a on the left side and the second coding unit 710b on the right side are processed corresponds to the horizontal direction (710c), the third coding units 720a and 720b included in the second coding unit 710a on the left side may be processed in the vertical direction (720c) before the right coding unit 710b is processed. The above content is intended to explain a process in which the processing order of the coding units is determined based on the coding units before division, and should not be construed as being limited to the above embodiment, but should be construed as being used in various methods in which the coding units determined by being divided in various forms may be processed independently in a predetermined order.
[0123] FIG. 8 illustrates a process in which the video decoding apparatus 100 determines to divide a current coding unit into an odd number of coding units when the coding units cannot be processed in a predetermined order, according to an embodiment.
[0124] According to an embodiment, the video decoding apparatus 100 may determine that the current coding unit is divided into an odd number of coding units based on the acquired division mode information. Referring to FIG. 8, a square-shaped first coding unit 800 may be divided into non-square-shaped second coding units 810a and 810b, and the second coding units 810a and 810b may be independently divided into third coding units 820a, 820b, 820c, 820d, and 820e. According to an embodiment, the video decoding apparatus 100 may divide the left coding unit 810a of the second coding unit in the horizontal direction to determine a plurality of third coding units 820a and 820b, and may divide the right coding unit 810b into an odd number of third coding units 820c, 820d, and 820e.
[0125] According to an embodiment, the video decoding device 100 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e can be processed in a predetermined order, and may determine whether there is an odd number of coding units. Referring to FIG. 8, the video decoding device 100 may recursively divide the first coding unit 800 to determine the third coding units 820a, 820b, 820c, 820d, and 820e. The video decoding device 100 may determine whether the first coding unit 800, the second coding unit 810a, 810b, or the third coding unit 820a, 820b, 820c, 820d, and 820e are divided into an odd number of coding units in the division type based on at least one of the block type information and the division type mode information. For example, the coding unit located on the right side of the second coding units 810a and 810b may be divided into an odd number of third coding units 820c, 820d, and 820e. The order in which the coding units included in the first coding unit 800 are processed may be a predetermined order (e.g., Z-scan order (830)), and the video decoding device 100 may determine whether the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into an odd number of coding units satisfy a condition that they can be processed in the predetermined order.
[0126] According to an embodiment, the video decoding apparatus 100 determines whether the third coding units 820a, 820b, 820c, 820d, and 820e included in the first coding unit 800 satisfy a condition that they may be processed in a predetermined order, the condition being related to whether at least one of the width and height of the second coding units 810a and 810b is divided in half along the boundary between the third coding units 820a, 820b, 820c, 820d, and 820e. For example, the third coding units 820a and 820b determined by dividing the height of the non-square left second coding unit 810a in half may satisfy the condition. Since the boundaries of the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into three coding units cannot divide the width or height of the right second coding unit 810b in half, it may be determined that the third coding units 820c, 820d, and 820e do not satisfy the condition. If such a condition is not satisfied, the video decoding device 100 may determine that there is a disconnection in the scanning order, and may determine that the right second coding unit 810b is to be divided into an odd number of coding units based on the determination result. According to an embodiment, when the coding units are divided into an odd number of coding units, the video decoding device 100 may set a predetermined restriction on a coding unit at a predetermined position among the divided coding units. The content of such a restriction or the predetermined position has been described through various embodiments, and detailed description thereof will be omitted.
[0127] FIG. 9 illustrates a process in which the video decoding device 100 divides a first coding unit 900 to determine at least one coding unit, according to one embodiment.
[0128] According to an embodiment, the video decoding device 100 may divide the first coding unit 900 based on the division mode information acquired via a receiving unit (not shown). The square-shaped first coding unit 900 may be divided into four square-shaped coding units or into a plurality of non-square-shaped coding units. For example, referring to FIG. 9, if the first coding unit 900 is a square and the division mode information indicates that the first coding unit 900 is to be divided into non-square coding units, the video decoding device 100 may divide the first coding unit 900 into a plurality of non-square coding units. Specifically, when the division mode information indicates that the first coding unit 900 is to be divided horizontally or vertically to determine an odd number of coding units, the video decoding device 100 may divide the square-shaped first coding unit 900 into second coding units 910a, 910b, and 910c determined by dividing it vertically, or second coding units 920a, 920b, and 920c determined by dividing it horizontally, as an odd number of coding units.
[0129] According to an embodiment, the video decoding apparatus 100 determines whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition that they can be processed in a predetermined order, and the condition is related to whether at least one of the width and height of the first coding unit 900 is divided in half along the boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to FIG 9, since the boundary of the second coding units 910a, 910b, and 910c determined by dividing the square-shaped first coding unit 900 in the vertical direction does not divide the width of the first coding unit 900 in half, it may be determined that the first coding unit 900 does not satisfy the condition that they can be processed in a predetermined order. In addition, since the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction do not divide the width of the first coding unit 900 in half, it may be determined that the first coding unit 900 does not satisfy the condition to be processed in a predetermined order. If such a condition is not satisfied, the video decoding device 100 may determine that there is a disconnection in the scanning order, and may determine that the first coding unit 900 is to be divided into an odd number of coding units based on the determination result. According to an embodiment, when the coding unit is divided into an odd number of coding units, the video decoding device 100 may set a predetermined restriction on a coding unit at a predetermined position among the divided coding units. The content of such a restriction or the predetermined position has been described through various embodiments, and detailed description thereof will be omitted.
[0130] According to an embodiment, the video decoding apparatus 100 may divide the first coding unit and determine various types of coding units.
[0131] 9, the video decoding apparatus 100 may divide a square-shaped first coding unit 900, a non-square-shaped first coding unit 930, or a non-square-shaped first coding unit 950 into various types of coding units.
[0132] FIG. 10 illustrates that, according to one embodiment, when a non-square second coding unit determined by dividing a first coding unit 1000 satisfies certain conditions, the video decoding device 100 restricts the manner in which the second coding unit may be divided.
[0133] According to an embodiment, the video decoding device 100 may determine to divide the square-shaped first coding unit 1000 into non-square-shaped second coding units 1010a, 1010b, 1020a, and 1020b based on the division mode information acquired via a receiving unit (not shown). The second coding units 1010a, 1010b, 1020a, and 1020b may be divided independently. Thus, the video decoding device 100 may determine whether to divide the first coding unit 1000 into a plurality of coding units or not to divide the first coding unit 1000 based on the division mode information associated with each of the second coding units 1010a, 1010b, 1020a, and 1020b. According to an embodiment, the video decoding device 100 may determine the third coding units 1012a and 1012b by dividing the left non-square-shaped second coding unit 1010a, which is determined by dividing the first coding unit 1000 vertically, horizontally. However, when the left second coding unit 1010a is divided in the horizontal direction, the video decoding device 100 may restrict the right second coding unit 1010b so that it cannot be divided in the horizontal direction in the same direction as the left second coding unit 1010a is divided. If the right second coding unit 1010b is divided in the same direction and the third coding units 1014a and 1014b are determined, the left second coding unit 1010a and the right second coding unit 1010b may be divided independently in the horizontal direction to determine the third coding units 1012a, 1012b, 1014a, and 1014b. However, this is the same result as when the video decoding device 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on the division mode information, which is inefficient in terms of video decoding.
[0134] According to an embodiment, the video decoding device 100 may vertically divide the non-square second coding unit 1020a or 1020b, which is determined by dividing the first coding unit 1000 in the horizontal direction, to determine the third coding units 1022a, 1022b, 1024a, and 1024b. However, when the video decoding device 100 divides one of the second coding units (e.g., the top second coding unit 1020a) in the vertical direction, the video decoding device 100 may restrict the other second coding units (e.g., the bottom coding unit 1020b) from being divided vertically in the same direction as the top second coding unit 1020a, for the above-mentioned reasons.
[0135] FIG. 11 illustrates a process in which the video decoding apparatus 100 divides a square coding unit when the division mode information does not indicate division into four square coding units, according to an embodiment.
[0136] According to an embodiment, the video decoding device 100 may divide the first coding unit 1100 based on the division mode information to determine the second coding units 1110a, 1110b, 1120a, and 1120b. The division mode information may include information related to various types into which the coding unit may be divided, but the information related to the various types may not include information for dividing the coding unit into four square coding units. According to such division mode information, the video decoding device 100 may not divide the square first coding unit 1100 into four square second coding units 1130a, 1130b, 1130c, and 1130d. Based on the division mode information, the video decoding device 100 may determine the non-square second coding units 1110a, 1110b, 1120a, and 1120b.
[0137] According to an embodiment, the video decoding apparatus 100 may independently divide the non-square second coding units 1110a, 1110b, 1120a, and 1120b, respectively, in a recursive manner, in which the second coding units 1110a, 1110b, 1120a, and 1120b are divided in a predetermined order, which is also a division method corresponding to the division method of the first coding unit 1100 based on the division mode information.
[0138] For example, the video decoding device 100 may divide the left second coding unit 1110a in the horizontal direction to determine square third coding units 1112a and 1112b, and divide the right second coding unit 1110b in the horizontal direction to determine square third coding units 1114a and 1114b. Furthermore, the video decoding device 100 may divide both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction to determine square third coding units 1116a, 1116b, 1116c, and 1116d. In this case, the coding units may be determined in the same form as when the first coding unit 1100 is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.
[0139] For another example, the video decoding device 100 may vertically divide the top second coding unit 1120a to determine square third coding units 1122a and 1122b, and vertically divide the bottom second coding unit 1120b to determine square third coding units 1124a and 1124b. Furthermore, the video decoding device 100 may vertically divide both the top second coding unit 1120a and the bottom second coding unit 1120b to determine square third coding units 1126a, 1126b, 1126a, and 1126b. In this case, the coding units may be determined in the same form as when the first coding unit 1100 is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.
[0140] FIG. 12 illustrates that a processing order among multiple coding units may vary depending on a division process of the coding units, according to an embodiment.
[0141] According to an embodiment, the video decoding apparatus 100 may divide the first coding unit 1200 based on the partition mode information. When the block shape is a square and the partition mode information indicates that the first coding unit 1200 is partitioned in at least one of the horizontal and vertical directions, the video decoding apparatus 100 may divide the first coding unit 1200 to determine, for example, second coding units 1210a, 1210b, 1220a, and 1220b. Referring to FIG. 12, the non-square second coding units 1210a, 1210b, 1220a, and 1220b determined by partitioning the first coding unit 1200 only in the horizontal or vertical direction may be independently divided based on the partition mode information associated with each of them. For example, the video decoding apparatus 100 may horizontally divide the second coding units 1210a and 1210b, which are generated by vertically dividing the first coding unit 1200, into third coding units 1216a, 1216b, 1216c, and 1216d, and may horizontally divide the second coding units 1220a and 1220b, which are generated by horizontally dividing the first coding unit 1200, into third coding units 1226a, 1226b, 1226c, and 1226d. The process of dividing the second coding units 1210a, 1210b, 1220a, and 1220b has been described above with reference to FIG. 11, and detailed description thereof will be omitted.
[0142] According to an embodiment, the video decoding device 100 may process the coding units in a predetermined order. The characteristics related to processing the coding units in a predetermined order have been described with reference to FIG. 7, and detailed description thereof will be omitted. Referring to FIG. 12, the video decoding device 100 may divide the square-shaped first coding unit 1200 to determine four square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. According to an embodiment, the video decoding device 100 may determine a processing order of the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d depending on the form in which the first coding unit 1200 is divided.
[0143] According to one embodiment, the video decoding device 100 horizontally divides the second coding units 1210a and 1210b generated by vertically dividing them to determine the third coding units 1216a, 1216b, 1216c, and 1216d. The video decoding device 100 may process the third coding units 1216a, 1216b, 1216c, and 1216d in an order (1217) of first vertically processing the third coding units 1216a and 1216c included in the left second coding unit 1210a, and then vertically processing the third coding units 1216b and 1216d included in the right second coding unit 1210b.
[0144] According to one embodiment, the video decoding device 100 vertically divides the second coding units 1220a and 1220b generated by dividing them horizontally to determine the third coding units 1226a, 1226b, 1226c, and 1226d, and the video decoding device 100 may process the third coding units 1226a, 1226b, 1226c, and 1226d in an order (1227) of first horizontally processing the third coding units 1226a and 1226b included in the upper second coding unit 1220a, and then horizontally processing the third coding units 1226c and 1226d included in the lower second coding unit 1220b.
[0145] 12, the second coding units 1210a, 1210b, 1220a, and 1220b are each divided to determine square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The second coding units 1210a and 1210b determined by dividing in the vertical direction and the second coding units 1220a and 1220b determined by dividing in the horizontal direction are divided in different shapes, but the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d determined thereafter ultimately result in the first coding unit 1200 being divided into coding units of the same shape. As a result, the video decoding device 100 may recursively divide the coding units through different processes based on the division type mode information, and as a result, even if the coding units are determined to have the same type, the video decoding device 100 may process multiple coding units determined to have the same type in different orders.
[0146] FIG. 13 illustrates a process of determining the depth of a coding unit according to one embodiment when a coding unit is recursively divided to determine multiple coding units, as the shape and size of the coding unit change.
[0147] According to an embodiment, the video decoding apparatus 100 may determine the depth of the coding unit according to a predetermined criterion. For example, the predetermined criterion may be the long side length of the coding unit. When the long side length of the current coding unit is divided into 2n (n>0) times the long side length of the coding unit before division, the video decoding apparatus 100 may determine that the depth of the current coding unit is increased by n from the depth of the coding unit before division. Hereinafter, a coding unit with an increased depth will be referred to as a coding unit of a lower depth. 13, according to an embodiment, the video decoding apparatus 100 may divide the square-shaped first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information may indicate "0:SQUARE") to determine a second coding unit 1302, a third coding unit 1304, etc., of a lower depth. If the size of the square-shaped first coding unit 1300 is 2Nx2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 by 1 / 2 may have a size of NxN. Furthermore, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 by 1 / 2 may have a size of N / 2xN / 2. In this case, the width and height of the third coding unit 1304 correspond to 1 / 4 times that of the first coding unit 1300. If the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, which is 1 / 2 the width and height of the first coding unit 1300, is also D+1, and the depth of the third coding unit 1304, which is 1 / 4 the width and height of the first coding unit 1300, is also D+2.
[0148] According to one embodiment, based on block shape information indicating a non-square shape (for example, the block shape information may indicate "1:NS_VER", indicating a non-square shape in which the height is greater than the width, or "2:NS_HOR", indicating a non-square shape in which the width is greater than the height), the video decoding device 100 may divide the first coding unit 1310 or 1320, which is non-square, and determine a second coding unit 1312 or 1322, a third coding unit 1314 or 1324, etc., of a lower depth.
[0149] The video decoding device 100 may divide at least one of the width and height of the first coding unit 1310 having a size of Nx2N to determine, for example, the second coding units 1302, 1312, 1322, etc. That is, the video decoding device 100 may divide the first coding unit 1310 in the horizontal direction to determine the second coding unit 1302 having a size of NxN or the second coding unit 1322 having a size of NxN / 2, and may divide the first coding unit 1310 in the horizontal direction and vertical direction to determine the second coding unit 1312 having a size of N / 2xN.
[0150] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the first coding unit 1320 having a size of 2NxN to determine, for example, the second coding units 1302, 1312, 1322, etc. That is, the video decoding device 100 may divide the first coding unit 1320 vertically to determine the second coding unit 1302 having a size of NxN or the second coding unit 1312 having a size of N / 2xN, and may divide the first coding unit 1320 horizontally and vertically to determine the second coding unit 1322 having a size of NxN / 2.
[0151] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1302 having a size of NxN, and determine, for example, the third coding units 1304, 1314, 1324, etc. That is, the video decoding device 100 may divide the second coding unit 1302 in the vertical and horizontal directions, and determine the third coding unit 1304 having a size of N / 2xN / 2, the third coding unit 1314 having a size of N / 4xN / 2, or the third coding unit 1324 having a size of N / 2xN / 4.
[0152] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1312 having a size of N / 2xN to determine, for example, the third coding units 1304, 1314, 1324, etc. That is, the video decoding device 100 may divide the second coding unit 1312 in the horizontal direction to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1324 having a size of N / 2xN / 4, or may divide the second coding unit 1312 in the vertical and horizontal directions to determine the third coding unit 1314 having a size of N / 4xN / 2.
[0153] According to an embodiment, the video decoding device 100 may divide at least one of the width and height of the second coding unit 1322 having a size of NxN / 2 to determine, for example, the third coding units 1304, 1314, 1324, etc. That is, the video decoding device 100 may divide the second coding unit 1322 vertically to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1314 having a size of N / 4xN / 2, or may divide the second coding unit 1322 vertically and horizontally to determine the third coding unit 1324 having a size of N / 2xN / 4.
[0154] According to an embodiment, the video decoding apparatus 100 may divide, for example, square-shaped coding units 1300, 1302, and 1304 in the horizontal or vertical direction. For example, the first coding unit 1300 having a size of 2Nx2N may be divided vertically to determine a first coding unit 1310 having a size of Nx2N, or may be divided horizontally to determine a first coding unit 1320 having a size of 2NxN. According to an embodiment, when the depth is determined based on the longest side length of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1300 having a size of 2Nx2N in the horizontal or vertical direction may be the same as the depth of the first coding unit 1300.
[0155] According to an embodiment, the width and height of the third coding unit 1314 or 1324 may be 1 / 4 times that of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322, which is 1 / 2 times the width and height of the first coding unit 1310 or 1320, is also D+1, and the depth of the third coding unit 1314 or 1324, which is 1 / 4 times the width and height of the first coding unit 1310 or 1320, is also D+2.
[0156] FIG. 14 illustrates a depth that may be determined according to the type and size of a coding unit, and an index (PID: part index) for coding unit partitions, according to one embodiment.
[0157] According to an embodiment, the video decoding device 100 may divide the square-shaped first coding unit 1400 to determine various types of second coding units. Referring to FIG 14, the video decoding device 100 may divide the first coding unit 1400 in at least one of a vertical direction and a horizontal direction according to the partition mode information to determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d. That is, the video decoding device 100 may determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d based on the partition mode information related to the first coding unit 1400.
[0158] According to an embodiment, the depths of the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d determined by the partition mode information related to the square-shaped first coding unit 1400 may be determined based on the long side length. For example, since the length of one side of the square-shaped first coding unit 1400 is the same as the long side length of the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b, the depths of the first coding unit 1400 and the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b can be regarded as being the same as D. In contrast, when the video decoding device 100 divides the first coding unit 1400 into four square-shaped second coding units 1406a, 1406b, 1406c, and 1406d based on the division mode information, the length of one side of the square-shaped second coding units 1406a, 1406b, 1406c, and 1406d is half the length of one side of the first coding unit 1400, so the depth of the second coding units 1406a, 1406b, 1406c, and 1406d is also a depth of (D+1), which is one depth lower than the depth D of the first coding unit 1400.
[0159] According to an embodiment, the video decoding device 100 may divide the first coding unit 1410, whose height is greater than its width, in the horizontal direction according to the partition mode information, and divide the first coding unit 1410 into a plurality of second coding units 1412a, 1412b, 1414a, 1414b, and 1414c. According to an embodiment, the video decoding device 100 may divide the first coding unit 1420, whose width is greater than its height, in the vertical direction according to the partition mode information, and divide the first coding unit 1420 into a plurality of second coding units 1422a, 1422b, 1424a, 1424b, and 1424c.
[0160] According to an embodiment, the depths of the second coding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, and 1424c determined by the partition mode information related to the non-square first coding unit 1410 or 1420 may be determined based on the long side length. For example, the length of one side of the square second coding units 1412a and 1412b is ½ times the length of one side of the non-square first coding unit 1410 whose height is greater than its width, so the depths of the square second coding units 1412a and 1412b are (D+1), which is one depth lower than the depth D of the non-square first coding unit 1410.
[0161] Furthermore, the video decoding device 100 may divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division mode 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, the length of the long side of the non-square second coding units 1414a and 1414c and the length of one side of the square second coding unit 1414b are 1 / 2 times the length of one side of the first coding unit 1410, so the depths of the second coding units 1414a, 1414b, and 1414c are also a depth (D+1) that is one depth lower than D, which is the depth of the first coding unit 1410. The video decoding device 100 may determine the depth of a coding unit associated with a non-square first coding unit 1420 whose width is greater than its height in a manner corresponding to the above-mentioned manner for determining the depth of a coding unit associated with the first coding unit 1410.
[0162] According to an embodiment, the video decoding apparatus 100 may determine the index (PID) for the divided coding unit partition based on the size ratio between the coding units when the coding units divided into an odd number of coding units are not the same size. Referring to FIG. 14, the coding unit 1414b located in the middle of the coding units 1414a, 1414b, and 1414c divided into an odd number of coding units has the same width as the other coding units 1414a and 1414c, but is twice as high as the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b located in the middle includes two other coding units 1414a and 1414c. Therefore, if the index (PID) of the coding unit 1414b located in the middle according to the scanning order is 1, the coding unit 1414c located next in the order has an index (PID) of 3, which is increased by 2. That is, discontinuity of the index (PID) values may exist. According to one embodiment, the video decoding device 100 may determine whether coding units divided into an odd number of parts are not the same size as each other based on whether there is a discontinuity in the index (PID) for partitioning between such divided coding units.
[0163] According to an embodiment, the video decoding apparatus 100 may determine whether the current coding unit is divided into a specific division type based on an index (PID) value for distinguishing a plurality of coding units determined by dividing the current coding unit. Referring to FIG. 14, the video decoding apparatus 100 may divide a first coding unit 1410 having a rectangular shape with a height greater than a width to determine an even number of coding units 1412a, 1412b or an odd number of coding units 1414a, 1414b, 1414c. The video decoding apparatus 100 may use an index (PID) indicating each coding unit to distinguish each of the plurality of coding units. According to an embodiment, the index (PID) may be obtained from a sample at a predetermined position (e.g., the top left sample) of each coding unit.
[0164] According to an embodiment, the video decoding device 100 may determine a coding unit at a predetermined position among the coding units determined by division using an index (PID) for coding unit division. According to an embodiment, when the division mode information related to a rectangular first coding unit 1410 whose height is greater than its width indicates that the first coding unit 1410 is divided into three coding units, the video decoding device 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The video decoding device 100 may assign an index (PID) related to each of the three coding units 1414a, 1414b, and 1414c. The video decoding device 100 may compare the indexes (PIDs) related to each coding unit to determine the middle coding unit among the odd number of coding units. The video decoder 100 may determine a coding unit 1414b having an index (PID) corresponding to a middle value among the indexes (PIDs) of the coding units as a coding unit in a middle position among the coding units determined by dividing the first coding unit 1410. According to an embodiment, in determining an index (PID) for a divided coding unit segment, if the coding units are not the same size, the video decoder 100 may determine an index (PID) based on a size ratio between the coding units. Referring to FIG. 14, the coding unit 1414b generated by dividing the first coding unit 1410 has the same width as the other coding units 1414a and 1414c, but is twice as high as the coding units 1414a and 1414c, which have different heights. In this case, if the index (PID) of the coding unit 1414b located in the middle is 1, the index (PID) of the coding unit 1414c located next thereto is 3, which is an increase of 2.In such a case, when the index (PID) increases uniformly but the increments are different, the video decoding device 100 may determine that the current coding unit is divided into a plurality of coding units including a coding unit having a different size from the other coding units. According to an embodiment, when the division mode information indicates that the current coding unit is divided into an odd number of coding units, the video decoding device 100 may divide the current coding unit into a form in which a coding unit at a predetermined position (e.g., a middle coding unit) among the odd number of coding units has a different size from the other coding units. In this case, the video decoding device 100 may determine the middle coding unit having a different size using an index (PID) related to the coding unit. However, the above index (PID) and the size or position of the coding unit at the predetermined position to be determined are specified for the purpose of explaining an embodiment, and should not be interpreted as being limited thereto, and various indexes (PIDs), positions and sizes of coding units may be used.
[0165] According to one embodiment, the video decoding device 100 may use a predetermined data unit from which the recursive division of the coding unit begins.
[0166] FIG. 15 illustrates a number of coding units being determined according to a number of predetermined data units included in a picture, according to one embodiment.
[0167] According to an embodiment, the predetermined data unit may be defined as a data unit from which a coding unit begins to be recursively divided using the division mode information. That is, the predetermined data unit may correspond to a coding unit of the highest depth used in a process of determining a plurality of coding units for dividing a current picture. Hereinafter, for convenience of explanation, such a predetermined data unit will be referred to as a reference data unit.
[0168] According to an embodiment, the reference data unit may have a predetermined size and shape. According to an embodiment, the reference coding unit may include MxN samples, where M and N may be equal to each other or may be integers expressed as a power of 2. That is, the reference data unit may have a square or non-square shape and may then be divided into an integer number of coding units.
[0169] According to an embodiment, the video decoding apparatus 100 may divide the current picture into a plurality of reference data units. According to an embodiment, the video decoding apparatus 100 may divide the reference data units into which the current picture is divided, using partition mode information associated with each of the reference data units. The division process of the reference data units may correspond to a division process using a quad-tree structure.
[0170] According to an embodiment, the video decoding apparatus 100 may determine in advance a minimum size that a reference data unit included in a current picture may have, and may determine reference data units of various sizes that are equal to or larger than the minimum size, and may determine at least one coding unit based on the determined reference data unit using partition mode information.
[0171] 15, the video decoding apparatus 100 may use a square-shaped reference coding unit 1500 or a non-square-shaped reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined according to various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) that may include at least one reference coding unit.
[0172] According to an embodiment, a receiving unit (not shown) of the video decoding apparatus 100 may obtain at least one of information related to the type of the base coding unit and information related to the size of the base coding unit from a bitstream for each of the various data units. The process of determining at least one coding unit included in the square-shaped base coding unit 1500 has been described through the process of dividing the current coding unit 300 in Fig. 3, and the process of determining at least one coding unit included in the non-square-shaped base coding unit 1502 has been described through the process of dividing the current coding unit 400 or 450 in Fig. 4, so detailed description thereof will be omitted.
[0173] According to an embodiment, the video decoding apparatus 100 may use an index (PID) for identifying the size and type of a reference coding unit in order to determine the size and type of the reference coding unit according to a certain data unit that is determined in advance based on a predetermined condition. That is, a receiving unit (not shown) may acquire only an index (PID) for identifying the size and type of a reference coding unit for each slice, slice segment, tile, tile group, maximum coding unit, etc. as a data unit that satisfies a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among the various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) from a bitstream. The video decoding apparatus 100 may determine the size and type of the reference data unit for each data unit that satisfies the predetermined condition by using the index (PID). When the information on the type of the reference coding unit and the information on the size of the reference coding unit are obtained from a bitstream for each data unit of a relatively small size and used, the bitstream is not used efficiently. Therefore, instead of directly obtaining the information on the type of the reference coding unit and the information on the size of the reference coding unit, only the index (PID) may be obtained and used. In this case, at least one of the size and type of the reference coding unit corresponding to the index (PID) indicating the size and type of the reference coding unit is determined in advance. That is, the video decoding apparatus 100 may determine at least one of the size and type of the reference coding unit included in the data unit serving as a reference for obtaining the index (PID) by selecting at least one of the size and type of the previously determined reference coding unit according to the index (PID).
[0174] According to an embodiment, the video decoding apparatus 100 may use at least one reference coding unit included in one maximum coding unit. That is, the maximum coding unit into which a video is divided may include at least one reference coding unit, and the coding units may be determined through a recursive division process of 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 is a size obtained by dividing the maximum coding unit n times according to a quad tree structure. That is, the video decoding apparatus 100 may determine the base coding unit by dividing the maximum coding unit n times according to a quad tree structure, and may divide the base coding unit based on at least one of block configuration information and partition configuration mode information according to an embodiment of the present disclosure.
[0175] FIG. 16 illustrates processing blocks that are responsible for determining a determination order of reference coding units included in a picture 1600 according to one embodiment.
[0176] According to an embodiment, the video decoding apparatus 100 may determine at least one processing block for dividing a picture. The processing block is a data unit including at least one reference coding unit for dividing a picture, and the at least one reference coding unit included in the processing block may be determined in a specific order. That is, the determination order of the at least one reference coding unit determined in each processing block corresponds to one of various orders in which the reference coding unit may be determined, and the determination order of the reference coding unit determined in each processing block may be different for each processing block. The determination order of the reference coding unit determined for each processing block may be one of various orders such as a raster scan, a Z-scan, an N-scan, an up-right diagonal scan, a horizontal scan, and a vertical scan, but the order that may be determined is not limited to the scan order.
[0177] According to an embodiment, the video decoding device 100 may obtain information related to a size of a processing block and determine a size of at least one processing block included in the image. The video decoding device 100 may obtain information related to a size of a processing block from a bitstream and determine a size of at least one processing block included in the image. The size of such a processing block may be a predetermined size of a data unit indicated by the information related to the size of the processing block.
[0178] According to an embodiment, a receiving unit (not shown) of the video decoding device 100 may obtain information on the size of a processing block for each specific data unit from a bitstream. For example, the information on the size of the processing block may be obtained from the bitstream as a data unit such as an image, a sequence, a picture, a slice, a slice segment, a tile, or a tile group. That is, the receiving unit (not shown) obtains information on the size of a processing block from the bitstream for each of the various data units described above, and the video decoding device 100 determines the size of at least one processing block for dividing a picture using the obtained information on the size of the processing block, and the size of such a processing block is also an integer multiple of a reference coding unit.
[0179] According to an embodiment, the video decoding device 100 may determine the size of the processing blocks 1602 and 1612 included in the picture 1600. For example, the video decoding device 100 may determine the size of the processing blocks based on information related to the size of the processing blocks 1602 or 1612 acquired from a bitstream. Referring to FIG. 16, according to an embodiment, the video decoding device 100 may determine the horizontal size of the processing blocks 1602 and 1612 to be four times the horizontal size of the reference coding unit and the vertical size of the processing blocks 1602 and 1612 to be four times the vertical size of the reference coding unit. The video decoding device 100 may determine an order in which at least one reference coding unit is determined within at least one processing block.
[0180] According to an embodiment, the video decoding device 100 may determine each of the processing blocks 1602 and 1612 included in the picture 1600 based on the size of the processing block, and may determine a determination order of at least one reference coding unit included in the processing blocks 1602 and 1612. According to an embodiment, the determination of the reference coding unit may also include determining the size of the reference coding unit.
[0181] According to an embodiment, the video decoding apparatus 100 may acquire information on a determination order of at least one reference coding unit included in at least one processing block from a bitstream, and may determine an order in which at least one reference coding unit is determined based on the acquired information on the determination order. The information on the determination order may be defined as an order or direction in which the reference coding units are determined within a processing block. That is, the order in which the reference coding units are determined may be determined independently for each processing block.
[0182] According to an embodiment, the video decoding apparatus 100 may obtain information regarding a determination order of the reference coding units from a bitstream for each specific data unit. For example, a receiving unit (not shown) may obtain information regarding a determination order of the reference coding units from a bitstream for each data unit such as an image, a sequence, a picture, a slice, a slice segment, a tile, a tile group, or a processing block. Since the information regarding the determination order of the reference coding units indicates a determination order of the reference coding units within a processing block, the information regarding the determination order may be obtained for each specific data unit including an integer number of processing blocks.
[0183] According to one embodiment, the video decoding device 100 may determine at least one reference coding unit based on the determined order.
[0184] According to an embodiment, a receiving unit (not shown) may acquire information related to a base coding unit determination order as information related to the processing blocks 1602 and 1612 from a bitstream, and the video decoding apparatus 100 may determine an order for determining at least one base coding unit included in the processing blocks 1602 and 1612, and may determine at least one base coding unit included in the picture 1600 according to the determination order of the coding units. Referring to FIG. 16, the video decoding apparatus 100 may determine a determination order (1604, 1614) of at least one base coding unit associated with each of the processing blocks 1602 and 1612. For example, when the information related to the determination order of the base coding units is acquired for each processing block, the determination order of the base coding units associated with each of the processing blocks 1602 and 1612 may be different for each processing block. When the reference coding unit determination order (1604) associated with the processing block 1602 is the raster scan order, the reference coding units included in the processing block 1602 may be determined in the raster scan order. On the other hand, when the reference coding unit determination order (1614) associated with another processing block 1612 is the reverse of the raster scan order, the reference coding units included in the processing block 1612 may be determined in the reverse of the raster scan order.
[0185] According to an embodiment, the video decoder 100 may decode at least one reference coding unit determined. The video decoder 100 may decode video based on the reference coding unit determined through the above-described embodiment. The method of decoding the reference coding unit may include various methods of decoding video.
[0186] According to an embodiment, the video decoding apparatus 100 may acquire and use block type information indicating a type of a current coding unit or partition type mode information indicating a method of dividing the current coding unit from a bitstream. The partition type mode information may be included in a bitstream related to various data units. For example, the video decoding apparatus 100 may use partition type mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, or a tile group header. Furthermore, the video decoding apparatus 100 may acquire and use a syntax element corresponding to block type information or partition type mode information from the bitstream for each of a maximum coding unit, a reference coding unit, and a processing block.
[0187] A method for determining a division rule according to an embodiment of the present disclosure will now be described in detail.
[0188] The video decoding device 100 may determine a partitioning rule for the image. The partitioning rule may be determined in advance between the video decoding device 100 and the video encoding device 150. The video decoding device 100 may determine the partitioning rule for the image based on information acquired from a bitstream. The video decoding device 100 may determine the partitioning rule based on information acquired from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, and a tile group header. The video decoding device 100 may determine the partitioning rule to differ depending on a frame, a slice, a temporal layer, a maximum coding unit, or a coding unit.
[0189] The video decoding device 100 may determine the partitioning rule based on the block type of the coding unit. The block type may include the size, shape, width and height ratio, and direction of the coding unit. The video encoding device 150 and the video decoding device 100 may determine in advance to determine the partitioning rule based on the block type of the coding unit. However, the present invention is not limited to this. The video decoding device 100 may determine the partitioning rule based on information obtained from a bitstream received from the video encoding device 150.
[0190] The shape of the coding unit may be square or non-square. If the width and height of the coding unit are the same, the video decoding device 100 may determine the shape of the coding unit to be square. If the width and height of the coding unit are not the same, the video decoding device 100 may determine the shape of the coding unit to be non-square.
[0191] The size of the coding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., 256x256. The size of the coding unit may be classified according to the long side length, short side length, or width of the coding unit. The video decoding device 100 may apply the same division rule to coding units classified into the same group. For example, the video decoding device 100 may classify coding units having the same long side length into the same size. In addition, the video decoding device 100 may apply the same division rule to coding units having the same long side length.
[0192] The ratio of the width and height of the coding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, or 16:1, etc. The direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate that the width of the coding unit is greater than the height. The vertical direction may indicate that the width of the coding unit is smaller than the height.
[0193] The video decoding device 100 may adaptively determine a partitioning rule based on the size of the coding unit. The video decoding device 100 may determine an allowable partitioning mode differently based on the size of the coding unit. For example, the video decoding device 100 may determine whether partitioning is allowed based on the size of the coding unit. The video decoding device 100 may determine a partitioning direction depending on the size of the coding unit. The video decoding device 100 may determine an allowable partitioning type depending on the size of the coding unit.
[0194] Determining the partitioning rule based on the size of the coding unit is also a partitioning rule that has been determined between the video encoding device 150 and the video decoding device 100. In addition, the video decoding device 100 may determine the partitioning rule based on information obtained from the bitstream.
[0195] The video decoding device 100 may adaptively determine the partitioning rule based on the position of the coding unit. The video decoding device 100 may adaptively determine the partitioning rule based on the position that the coding unit occupies in the video.
[0196] Furthermore, the video decoding apparatus 100 may determine a division rule such that the coding units generated in different division paths do not have the same block type. However, the present invention is not limited thereto, and the coding units generated in different division paths may have the same block type. The coding units generated in different division paths may have different decoding process orders. The decoding process order has been described with reference to FIG. 12, and therefore will not be described in detail.
[0197] Hereinafter, a process of performing entropy encoding and entropy decoding according to one or more embodiments disclosed herein will be described in detail with reference to Figures 17 to 28. The entropy encoding process and the entropy decoding process according to an embodiment of the present disclosure may be performed by the decoder 120 of the video decoder 100 of Figure 1A and the encoder 155 of the video encoder 150 of Figure 2A, or the processor 125 of the video decoder 100 of Figure 1C and the processor 170 of the video encoder 150 of Figure 2C. Specifically, the entropy encoding process and the entropy decoding process according to an embodiment of the present disclosure may be performed by the entropy decoder 6150 of the video decoder 6000 of Figure 1B and the entropy encoder 7350 of the video encoder 7000 of Figure 2B.
[0198] As described above, the video encoding device 150 according to an embodiment of the present disclosure performs encoding using coding units obtained by hierarchically dividing a maximum coding unit. The entropy encoding unit 7350 entropy-encodes coding information generated during the encoding process, for example, syntax elements such as quantized transform coefficients, prediction modes of prediction units, quantization parameters, and motion vectors. Context-based M-ary arithmetic coding (CAMAC) may be used as the entropy encoding method.
[0199] FIG. 17 is a block diagram showing a configuration of an entropy encoding device according to an embodiment of the present disclosure.
[0200] 17, an entropy coding apparatus 1700 according to one embodiment includes a symbol representation 1710, a context modeler 1720, and an arithmetic coder 1730. According to one embodiment of the present disclosure, the arithmetic coder 1730 also includes a regular coding engine 1732 and a bypass coding engine 1734.
[0201] According to an embodiment of the present disclosure, the syntax element input to the entropy encoding device 1700 is not a symbol. The symbol may be a number or a letter. For example, if the prediction mode is an intra prediction mode or an inter prediction mode, the symbol may be represented by the numbers 0 and 1, respectively. Alternatively, for example, if the prediction mode is an intra prediction mode or an inter prediction mode, the symbol may be represented by the letters intra or inter, respectively. However, the present invention is not limited thereto, and the symbol may be represented by various methods such as a combination of a number and a letter, or a number represented by a binary system. In the following, for convenience of explanation, a case where the symbol is a number will be described as an example. If the syntax element is not a symbol, the symbol representation unit 1710 outputs the syntax element to one symbol among M symbols. For example, if the input syntax element is not a symbol, the symbol representation unit 1710 may determine a corresponding symbol among symbols 0 to (M-1). Each syntax element may indicate a different value of M. Each symbol is coded via context-based adaptive M-ary arithmetic coding (CAMAC).
[0202] The symbol output from the symbol representation unit 1710 is arithmetically coded by the regular coding unit 1732 or the bypass coding unit 1734. If the frequency of the symbols of the syntax element is uniform, i.e., if the data has the same frequency of 0 to (M-1), the symbol is output to the bypass coding unit 1734 that does not use a probability value and is coded through the bypass coding unit 1734. It may be determined in advance whether the current symbol is arithmetically coded by the regular coding unit 1732 or the bypass coding unit 1734 according to the type of the syntax element. According to an embodiment, the symbol representation unit 1710 is also referred to as an M-ary representation.
[0203] The regular coding unit 1732 performs arithmetic coding on the symbol based on the probability model determined by the context modeler 1720. The context modeler 1720 provides the probability model for the current symbol to the regular coding unit 1732. The context modeler 1720 may determine the occurrence probability of the symbol based on the previously coded symbol, update the occurrence probability used to code the previous symbol, and output the updated probability to the regular coding unit 1732. According to one embodiment, the context modeler 1720 may determine one context model using a context index (ctxIdx). According to one embodiment, the context index may be determined on a symbol-by-symbol basis. The context modeler 1720 may determine the occurrence probability of the symbol that the determined context model has.
[0204] According to an embodiment of the present disclosure, the context modeler 1720 may determine at least one scaling factor for updating the occurrence probability associated with the symbol. The context modeler 1720 may update the occurrence probability associated with the symbol using at least one scaling factor depending on the current symbol. A process of updating the occurrence probability associated with a specific symbol will be described later.
[0205] The regular coding unit 1732 performs arithmetic coding based on the occurrence probability of symbols provided by the context modeler 1720 and the current symbol. According to an embodiment, the regular coding unit 1732 may determine a cumulative occurrence probability c(0) of symbol '0', a cumulative occurrence probability c(1) of symbol '1', or a cumulative occurrence probability c(M-1) of symbol 'M-1' based on the occurrence probability of symbols provided by the context modeler 1720. The cumulative occurrence probability c(k) for 'k' means the sum of the occurrence probabilities of symbols '0' through 'k'. That is, c(k)=P(0)+P(1)+...+P(k), where P(k) is the occurrence probability of symbol k. According to an embodiment, the regular coding unit 1732 may determine the occurrence probability P(0) of “0”, the occurrence probability P(1) of “1”, through the occurrence probability P(M-1) of “(M-1)” based on the occurrence probability of symbols provided from the context modeler 1720. For convenience of explanation, the cumulative occurrence probability of a symbol and the occurrence probability of a symbol are expressed separately, but according to an embodiment, the occurrence probability of a symbol may mean the cumulative occurrence probability of a symbol.
[0206] Arithmetic coding is performed by dividing a range indicating the occurrence probability c(0) to c(M-1) of the determined symbol and the probability interval for the current symbol, and outputting the binary value of the representative value belonging to the divided interval.
[0207] FIG. 18 is a diagram illustrating a probability update process used in context-based adaptive M-ary arithmetic coding (CAMAC) according to an embodiment of the present disclosure.
[0208] 18, a context model may be defined as a predetermined probability state corresponding to a predetermined number of symbols and a predetermined scaling factor. The context modeler 1720 may determine the probability state using the context model associated with the predetermined number of symbols and the predetermined scaling factor. Each probability state may be determined based on a state index. For example, a probability state associated with m may be determined based on state index i Cm When updating the probability using a predefined state transition table, it can be shown which probability state is to be transitioned from the current probability state. The probability state is changed according to the symbol currently being arithmetically coded. For example, if the symbol currently being arithmetically coded is greater than m, the probability state for symbol m (state i Cm ) is the forward state (state i Cm If the current symbol being arithmetically coded is smaller than or equal to m, the probability state for symbol m (state i Cm ) is the backward state (state i Cm The probability state is changed to Tr -1. k {} denotes the probability state transition direction after arithmetic coding when the symbol to be arithmetically coded is k.
[0209] When updating the probability or dividing the probability interval, if dense probability values are used, the amount of multiplication calculations increases and the hardware becomes burdensome. Therefore, a probability model in which the probability (Cm) shown in FIG. 18 is mapped to a predetermined value through a rounding operation or the like and the probability value is changed in a stepwise manner can be used.
[0210] According to an embodiment, the context modeler 1720 may calculate a probability associated with a symbol. The probability associated with the symbol may be updated based on previously determined probabilities associated with the symbol. For example, the probability associated with the symbol may be calculated based on previously updated probabilities associated with the symbol and a scaling factor, without relying on a pre-determined table. The greater the number of symbols and the number of context models, the more effective it may be to calculate based on previously updated probabilities associated with the symbol, without relying on a pre-determined table.
[0211] 19A is a diagram illustrating a process of performing arithmetic coding based on the context-based adaptive M-ary arithmetic coding (CAMAC) according to an embodiment of the present disclosure. FIG. 19B is a diagram illustrating a process of performing arithmetic coding based on the context-based adaptive M-ary arithmetic coding (CAMAC) according to an embodiment of the present disclosure. FIG. 19C is a diagram illustrating a process of performing arithmetic coding based on the context-based adaptive M-ary arithmetic coding (CAMAC) according to an embodiment of the present disclosure.
[0212] 19A, the context modeler 1720 provides the occurrence probability of a symbol, for example, c(1) to c(M-1), to the regular coding unit 1732. The regular coding unit 1732 divides a probability interval in consideration of the probability associated with the input symbol, and performs arithmetic coding. In FIG. 19A, it is assumed that the occurrence probability of '0' is c(1)=0.1, the occurrence probability of '1' is c(1)=0.2, the occurrence probability of 'k-1' is c(k-1)=0.6, and the occurrence probability of 'k' is c(k)=0.8. Here, c(k) may represent the cumulative occurrence probability. The regular coding unit 1732 first divides an input symbol, S 1 Since k is k, the regular coding unit 1732 selects (0.6, 0.8), which is a probability interval of the value of "k" in the interval (0, 1).The regular coding unit 1732 then selects 0.75 as a representative value indicating the interval (0.6, 0.8), and outputs "11" after the decimal point of the binary value 0.11, which corresponds to 0.75, to the bit stream.That is, the input symbol "k" is mapped to "11" and output.
[0213] 19B, the context modeler 1720 may encode multiple symbols. For purposes of illustration, the case where c(0) through c(M-1) are fixed will be described, but as noted above, the values of c(0) through c(M-1) may be updated each time a symbol is encoded.
[0214] First, the regular coding unit 1732 converts the input symbol S 1 Since k is the probability interval for the value of “k” in the interval (0,1), select (0.6,0.8), and then select the input bin S 2 Since the value of 1 is selected from the (0.6,0.8) interval, the probability interval (0.62,0.64) corresponding to "1" is selected, and the last input bin S 3 has a value of 0, so in (0.62, 0.64), the probability interval (0.62, 0.622) corresponding to 0 is finally determined. The regular coding unit 1732 then selects 0.62109375 as a representative value indicating the interval (0.62, 0.622), and outputs "10011111" after the decimal point in the binary value 0.10011111 corresponding to 0.62109375 to the bitstream. That is, the input symbols "K", "1", and "0" are mapped to "10011111" and output.
[0215] Referring to FIG. 19C, the arithmetic coding process using the context-based adaptive M-ary arithmetic coding (CAMAC) is currently available in the range R s , and such a range R s The lower bound of r 1 and the upper bound r 2 When arithmetic coding begins, R s =510, r 1 =0 and r 2 = 510. If the current symbol is k, the range R s is R k and the lower bound r 1 and the upper bound r 2is R k As shown in FIG. 19B, in the arithmetic coding process, the current symbol is updated to indicate a predetermined interval R s and outputs a binary value indicating the updated interval.
[0216] The process of updating the probabilistic model performed by the context modeler 1720 will now be described in detail.
[0217] The probability update process used in the context-based adaptive M-ary arithmetic coding (CAMAC) can be performed according to Equation 1 below.
number
[0218] According to one embodiment, to simplify the calculations, probability values may be expressed in terms of integer ranges instead of real ranges between 0 and 1. i But from 0 to 2 k (k is an integer) i Using c i =C i / 2 k We assume that we have values of the form i The reciprocal of α i Also, using powers of 2, the following formula:α i =1 / (2^Shift i )(Shift i In this case, the multiplication operation in Equation 1 may be replaced with a shift operation as shown in Equation 2 below. In Equation 2, ">>" is a right shift operator.
number
[0219] Scaling factor Shift i is the window size N, which indicates the number of symbols encoded before the current symbol. i =2^Shift i That is, the scaling factor Shift i When updating the probability of the current symbol, the previously encoded N i It can be shown that symbols are taken into account.
[0220] The scaling factor determines the sensitivity, which indicates how sensitively the probabilities used in the context-based adaptive M-ary arithmetic coding (CAMAC) are updated, and the robustness, which indicates whether or not the probabilities are insensitive to errors. For example, the scaling factor Shift i When the scaling factor Shift is small, that is, when a short window is used, the probability changes quickly and converges to the appropriate value quickly, but it is sensitive to individual data and is prone to fluctuations. i When is large, i.e., when a long window is used, the probability does not change quickly, but if the updated probability converges to a suitable value, there is little fluctuation, and the method operates stably without being sensitive to errors or noise.
[0221] To strike a balance between sensitivity and stability, the context modeler 1720 according to one embodiment of the present disclosure may use multiple different scaling factors when updating probabilities to generate multiple updated probabilities, and use the multiple updated probabilities to determine a final updated probability.
[0222] As the number of scaling factors used increases, the accuracy of the predicted probability may increase, but the computational complexity may also increase. Therefore, in the following description, the case where i is 1 or 2, i.e., the case where one scaling factor or two scaling factors are used to update the probability, will be mainly described. However, the probability update method according to the present disclosure can also be applied to the case where more than two scaling factors are used to update the probability.
[0223] In one embodiment, when two scaling factors are used, the context modeler 1720 may obtain two updated probabilities and determine a final updated probability from the two updated probabilities, as in Equation 3 or Equation 4 below. According to one embodiment, the final updated probability may be determined by a weighted sum of the two updated probabilities. According to one embodiment, the final updated probability is also a simple sum of the two updated probabilities.
number
number
[0224] Hereinafter, the probability updating method using multiple scaling factors will be described in detail with reference to FIGS.
[0225] FIG. 20 is a diagram for comparing a probability update process using one scaling factor with a probability update process using multiple scaling factors.
[0226] In the CAMAC encoding / decoding process, an entropy reset is performed for a predetermined data unit. For example, the entropy reset can be performed for each slice or each coding unit. The entropy reset means discarding the current probability value and performing CAMAC based on a previously determined probability value. In the probability update process performed after the reset process, the probability value set as the initial value is not an optimal value, but converges to a certain probability value as the update process is performed several times.
[0227] FIG. 20 illustrates the results of updating the probability using two methods based on the same symbol sequence and initial value. Graph 2010 shows the probability when one scaling factor corresponding to a small window is used, and graph 2020 shows the probability when two scaling factors corresponding to a small window and a large window are used. In FIG. 20, the x-axis shows the number of updates, and the y-axis shows the probability value. Referring to FIG. 20, when one scaling factor is used to update the probability (2010), the probability changes faster as the probability is updated, and converges to an appropriate value faster, but the more updates are repeated, the more fluctuations are likely to occur. On the other hand, when multiple scaling factors are used to update the probability (2020) according to one embodiment of the present disclosure, the probability does not change quickly, but when the updated probability converges to a value close to the appropriate value, there is little fluctuation, and it does not react sensitively to errors, noise, etc., and operates stably.
[0228] Therefore, the context modeler 1720 may consider the probability update process when a single scaling factor is used and when multiple scaling factors are used, and determine whether to perform the probability update using multiple scaling factors.
[0229] FIG. 21 is a flowchart of a method for updating probabilities utilizing scaling factors according to one embodiment of the present disclosure.
[0230] 21, in operation 2110, the context modeler 1720 may obtain information related to a slice type from a bitstream. The slice type may include an I slice, a B slice, or a P slice. The information related to the slice type may be included in a slice header. The context modeler 1720 may obtain information related to the slice header in the form of a bitstream.
[0231] In step 2120, the context modeler 1720 may arithmetically code the current symbol based on the probability of occurrence of the symbol, which may also be determined by the symbol representation unit 1710 to correspond to the syntax element. In one embodiment, the probability of occurrence of the symbol may also be the cumulative probability of occurrence. For example, the probability of occurrence of symbol k may also be the sum of the individual symbol probabilities of occurrence of symbols 0 to k. In one embodiment, the probability of occurrence of the symbol may also be the individual symbol probability of occurrence of the symbol.
[0232] According to an embodiment, the occurrence probability of a symbol may be determined independently for each of multiple context models corresponding to a syntax element. For example, the context modeler 1720 may obtain multiple scaling factor indexes (shiftIdx) specified by each context model and determine a value corresponding to each scaling factor index as a scaling factor.
[0233] To specify the scaling factors by the context model, additional memory space is required for the predefined scaling factor table. That is, for each scaling factor Shift iIf n bits are required to represent the value of, then to define two scaling factors for each context model, a memory of about n*2*[the number of context models] bits is required. For example, if a scaling factor is represented by 4 bits and there are 400 context models, a table specifying two scaling factors for each context model requires a total of 4*2*400=3,200 bits of ROM (read-only memory).
[0234] Thus, the context modeler 1720 according to one embodiment of the present disclosure may conserve memory required to determine some or all of the scaling factors by basing the scaling factors on values that are independent of the context model.
[0235] In one embodiment, only some context models may be configured to use the scaling factor specified by the context model. For example, a scaling factor may be specified only for a context model for coefficient coding. Or, as another example, a scaling factor may be specified only for a context model not for the coefficient coding. If a context model does not have a value for the specified scaling factor, the context modeler 1720 may determine the multiple scaling factors to a predetermined base value.
[0236] In one embodiment, at least one of the scaling factors may be determined to a predetermined value that is independent of the context model. For example, the context modeler 1720 may determine a first scaling factor Shift corresponding to a short window among the two scaling factors. 1 is determined as a fixed value M for all context models, and the second scaling factor Shift 2may be determined to a value specified by the context model, or conversely, the context modeller 1720 may determine the second scaling factor to a fixed value and the first scaling factor to a value specified by the context model.
[0237] As shown in Equation 4, the probability C i , from 0 to 2 k If we use integers up to , then k bits of memory are required to represent the probabilities. Therefore, if we use two scaling factors for each context model, two probabilities must be updated, so we need k*2*[number of context models] bits of memory. For example, i If is expressed by an integer within 215 and the number of context models is 400, then a total of 15*2*400=12,000 bits of RAM (random access memory) must be reserved for probability updates.
[0238] Thus, to reduce the memory required to represent the probabilities, various embodiments of the context modeler 1720 may determine, based on the context model, whether to use all of the multiple scaling factors to update the probabilities, or to use only some of the multiple scaling factors, but not all of them. In one embodiment, when determining that none of the multiple scaling factors are to be used, the context modeler 1720 may update the probabilities using only one of the multiple scaling factors. In that case, a single probability, e.g., P 1 This may reduce the memory required to represent the probabilities since only the values of .function..times ...
[0239] In one embodiment, the probabilities may be updated using multiple scaling factors only for some context models. For example, the probabilities may be updated using multiple scaling factors only for the context model for coefficient coding, and only one scaling factor may be used for the other context models. Or, conversely, the probabilities may be updated using multiple scaling factors only for the context model not for coefficient coding, and only one scaling factor may be used for the context model for coefficient coding.
[0240] In operation 2130, the context modeler 1720 may determine a first scaling factor using a first function if the slice type information indicates an I slice. The value of the first function may be determined based on a first critical value. For example, if the first critical value is th1, the first scaling factor shift i The value of shift i =b1+I(count>th1), where b1 is a predetermined constant, and the I(count>th1) function is a function that indicates a value greater than 0 if count is greater than th1, and indicates 0 if count is less than or equal to th1. For example, the I(count>th1) function is 1 if count is greater than th1, and is 0 if count is less than or equal to th1.
[0241] In one embodiment, count is also the number of times the symbol is arithmetically coded. In one embodiment, if there are multiple context models, count is also the number of times the symbol is arithmetically coded based on each context model. In one embodiment, b1 is also a value between 2 and 7. For convenience of explanation, the first scaling factor shift by one threshold value is set to 0. i Although an example in which the value of shift is determined is given above, the present invention is not limited thereto, and the shift may be determined based on a plurality of threshold values. iA value of the first scaling factor shift may be determined. i The value of may be determined by further considering other variables. For example, the first scaling factor shift i may be determined based on the number of symbols.
[0242] In operation 2140, the context modeler 1720 may determine a first scaling factor using a second function if the slice type information indicates a B slice or a P slice. The value of the second function may be determined based on a second critical value. For example, if the second critical value is th2, the first scaling factor shift i The value of shift i =b2+I(count>th2), where b2 is a predetermined constant, and the I(count>th2) function is a function that indicates a value greater than 0 if count exceeds th2, and indicates 0 if count is equal to or less than th2. In one embodiment, b2 is a value greater than or equal to 2 and less than or equal to 7. The first critical value is greater than or equal to the second critical value. Also, b2 is greater than or equal to b1. If the first critical value is greater than or equal to the second critical value, the value of the scaling factor determined based on the first critical value is smaller than the value of the scaling factor determined based on the second critical value. In such an example, the value of the scaling factor when the slice type is an I slice is smaller than the value of the scaling factor when the slice type is a B slice or a P slice. Since inter-slices have a relatively smaller amount of data to code than intra-slices, it is also advantageous for the value of the scaling factor to be smaller than that in B slices or P slices, so that the symbol occurrence probability of an I slice converges relatively quickly. Determining the scaling factor based on the slice type can save bit rate.
[0243] In step 2150, the context modeler 1720 may update the occurrence probability of the symbol using the first scaling factor. According to an embodiment, the context modeler 1720 may perform arithmetic coding and updating based on the occurrence probability of one symbol. As described above, the context modeler 1720 may perform arithmetic coding and updating based on the occurrence probabilities of multiple symbols. As shown in Equations 3 and 4, the context modeler 1720 may update the occurrence probabilities of the multiple symbols respectively, and finally update the occurrence probability of the symbol by weighting the updated occurrence probabilities of the multiple symbols. According to an embodiment, the context modeler 1720 may update the occurrence probability of the symbol by averaging the updated occurrence probabilities of the multiple symbols.
[0244] In one embodiment, the context modeler 1720 may determine a function using a first critical value as the first scaling factor and determine the value of the first scaling factor according to a predetermined condition. In one embodiment, the context modeler 1720 may determine a function using a second critical value as the first scaling factor and determine the value of the first scaling factor according to a predetermined condition. In one embodiment, the context modeler 1720 may determine a function using at least one of the first critical value or the second critical value as the first scaling factor and determine the value of the first scaling factor according to a predetermined condition.
[0245] 22 is a flow chart of a method for updating probabilities using multiple scaling factors according to one embodiment of the present disclosure. According to one embodiment, step 2210 may be performed after step 2140 of FIG.
[0246] 22, in operation 2210, the context modeler 1720 may determine a second scaling factor using a third function when the information related to the slice type indicates an I slice. The value of the third function may be determined based on a third critical value.
[0247] In operation 2220, if the information regarding the slice type indicates a B slice or a P slice, the context modeler 1720 may determine a second scaling factor using a fourth function, where the value of the fourth function may be determined based on a fourth critical value.
[0248] The method in which the context modeler 1720 determines the second scaling factor using the third function or determines the second scaling factor using the fourth function can be understood to be the same as the method in which the context modeler 1720 determines the second scaling factor based on the first critical value or the second critical value described in FIG. 21.
[0249] In step 2230, the context modeler 1720 may update the probability of occurrence of the symbol using the second scaling factor. According to one embodiment, the context modeler 1720 may update the probability of occurrence of the symbol using the first scaling factor and the second scaling factor obtained in Figure 21. As described above, the probability of occurrence of the symbol may be updated by calculating a weighted sum of the symbol occurrence probabilities corresponding to the multiple scaling factors updated based on each scaling factor.
[0250] According to an embodiment, when the information related to the slice type indicates an I slice, the weighted value of the probability corresponding to a scaling factor having a larger value among the multiple scaling factors is relatively large. For example, when the information related to the slice type indicates an I slice and the value of the first scaling factor is larger than or equal to the value of the second scaling factor, the weighted value related to the first probability is larger than or equal to the weighted value related to the second probability. When the slice type is an I slice, it is efficient that the weighted value related to the probability of the scaling factor being larger is large.
[0251] According to an embodiment, when the information on the slice type indicates a B slice or a P slice, the weighted value of the probability corresponding to the scaling factor having a larger value among the multiple scaling factors is relatively small. For example, when the information on the slice type indicates a B slice or a P slice and the value of the first scaling factor is larger than or equal to the value of the second scaling factor, the weighted value of the first probability is smaller than or equal to the weighted value of the second probability. When the slice type is a B slice or a P slice, it is efficient that the weighted value of the probability of the scaling factor being larger is smaller.
[0252] FIG. 23 is a flow chart of a method for updating the probability of occurrence of symbols using multiple scaling factors according to one embodiment of the present disclosure.
[0253] 23, the context modeler 1720 determines whether the information related to the slice type indicates an I-slice in step 2310. If the information related to the slice type indicates an I-slice, the process proceeds to step 2320, and if the information related to the slice type does not indicate an I-slice, the process proceeds to step 2330.
[0254] In step 2320, the context modeler 1720 may determine a first scaling factor using a first function whose value is determined based on the first and fifth critical values. For example, if the first critical value is th11 and the fifth critical value is th12, the first scaling factor shift i The value of shift i =b1+I(count>th11)+I(count>th12). b1 is also a predetermined constant, and the I(count>th11) and I(count>th12) functions may indicate values exceeding 0 when count exceeds th11 and th12. The constant b1, function I(count>th) and critical value th may be understood with reference to step 2130 of FIG. 21.
[0255] In operation 2330, the context modeler 1720 may determine a first scaling factor using a second function whose value is determined based on the second and sixth critical values. For example, if the second critical value is th21 and the sixth critical value is th22, the first scaling factor shift i The value of shift i =b2+I(count>th21)+I(count>th22).
[0256] In steps 2320 and 2330, shift i The formula for determining is merely an embodiment, and is not limited thereto, and may be determined by further including other factors.
[0257] According to one embodiment, the predefined critical value, such as the first critical value, may be a fixed value, for example 31. According to one embodiment, the predefined critical value may be a value specified by a context model. According to one embodiment, for some context models, the critical value specified by the context model may be used, and for other context models, a predefined fixed value may be used.
[0258] FIG. 24 is a flow chart of a method for determining a value of a scaling factor based on a syntax element corresponding to a current symbol, according to one embodiment of the present disclosure.
[0259] At step 2410, the context modeler 1720 may determine a count based on the number of times the syntax element corresponding to the current symbol has previously been arithmetically decoded.
[0260] According to an embodiment, the context modeler 1720 may determine the number of times that a syntax element corresponding to a current symbol has been arithmetically decoded before as a count. That is, each time the syntax element is arithmetically decoded, the count may be incremented by one. According to an embodiment, if the number of times that the syntax element has been arithmetically decoded before is equal to or greater than a predetermined value, the count may be indicated as a fixed value. For example, if a threshold value is 31 and the number of times that the syntax element has been arithmetically decoded before is not greater than 31, the count may be equal to the number of times that the syntax element has been arithmetically decoded before. If the threshold value is 31 and the number of times that the syntax element has been arithmetically decoded before is greater than or equal to 31, the count may be determined to a predetermined value. For example, the count may be fixed to 31, which corresponds to the threshold value, or to 32, which is increased by 1 from the threshold value. For ease of explanation, the critical value has been described as 31, but is not limited thereto, and the critical value may be determined to be another number, such as 63, at the discretion of one of ordinary skill in the art.
[0261] In step 2420, the context modeler 1720 may determine a value for a first scaling factor based on the count.
[0262] According to an embodiment, a value of the first function determined when the number of times arithmetically decoded is equal to or greater than the first critical value is greater than a value of the first function determined when the number of times arithmetically decoded is less than the first critical value. For example, a value of the first function determined when the number of times arithmetically decoded is equal to or greater than the first critical value is greater than a value of the first function determined when the number of times arithmetically decoded is less than the first critical value by about 1. For example, a function I(count>th1) for determining a value of a scaling factor has a value of 1 when count exceeds th1, and a value of 0 when count is equal to or less than th1.
[0263] FIG. 25 is a flowchart of a method for determining the number of symbols based on syntax elements according to one embodiment of the present disclosure.
[0264] At step 2510, the context modeler 1720 may obtain a request for a syntax element.
[0265] In step 2520, the context modeler 1720 may determine the number of symbols based on the type of the syntax element. The number of symbols may refer to the number of symbols that the syntax element can accommodate. For example, if the number of symbols is M (M is an integer), the syntax element can accommodate one symbol from 0 to (M-1). In some embodiments, the number of symbols may vary depending on the syntax element. The number of symbols may be pre-determined. In some embodiments, the number of symbols may be 2 to 16 inclusive. In some embodiments, the number of symbols may be 2 to 8 inclusive.
[0266] According to one embodiment, the scaling factor may be determined using the number of symbols. For example, the scaling factor may be i = b1 + I(count>th1) + min(log(M),2), where M is the number of symbols. That is, the scaling factor may be determined based on the result of comparing the number of symbols with a predetermined value (e.g., 2).
[0267] According to an embodiment, if the number of symbols is greater than or equal to a predetermined value, the value of the first scaling factor may be determined based on the predetermined value, and if the number of symbols is less than the predetermined value, the value of the first scaling factor may be determined based on the number of symbols, for example, the value of the scaling factor may be determined based on the smaller of the logarithm of the number of symbols and a predetermined value.
[0268] As the number of symbols increases, the number of factors (eg, probabilities) associated with each symbol also increases. Therefore, by varying the number of symbols for each syntax element, memory efficiency can be improved.
[0269] FIG. 26 is a flowchart of a method for determining the probability of occurrence of a symbol based on a context model according to one embodiment of the present disclosure.
[0270] In step 2610, the context modeler 1720 may obtain a request for a syntax element. Step 2610 may correspond to step 2510 of FIG.
[0271] In step 2620, the context modeler 1720 may determine a context model that corresponds to a predetermined condition among a plurality of context models corresponding to the syntax element.
[0272] In step 2630, the context modeler 1720 may obtain the probability of occurrence of the symbol from the determined context model. The multiple context models may be updated with independent determination of the probability of occurrence of the symbol, i.e., the probability of occurrence of the symbol obtained by the context model determined in step 2620 may be different.
[0273] FIG. 27 is a block diagram showing a configuration of an entropy decoding device according to an embodiment of the present disclosure.
[0274] 27, the entropy decoding apparatus 2700 includes a context modeler 2710, a regular decoding unit 2720, a bypass decoding unit 2730, and a symbol decoding unit 2740. The entropy decoding apparatus 2700 performs an inverse process of the entropy coding process performed in the entropy coding apparatus 1700 described above.
[0275] A bin encoded by bypass coding is output to the bypass decoding unit 2730 for decoding, and a bin encoded by regular coding is decoded by the regular decoding unit 2720. The regular decoding unit 2720 arithmetically decodes the current bin using a binary probability determined based on a previous bin decoded prior to the current bin provided by the context modeler 2710.
[0276] The context modeler 2710 provides bin-related probability models to the regular decoding unit 2720. Specifically, the context modeler 2710 determines the probability of a given binary value based on previously decoded bins, updates the probability of the binary value used to decode the previous bin, and outputs the updated probabilities to the regular decoding unit 2720.
[0277] According to an embodiment of the present disclosure, the context modeler 2710 may determine a plurality of scaling factors for updating the occurrence probability of a predetermined binary value associated with a current symbol. The context modeler 2710 may update the probability of the predetermined binary value using at least one of the plurality of scaling factors depending on the binary value of the current symbol. The probability update process performed by the context modeler 2710 is the same as the probability update process in the encoding process described above, and a detailed description thereof will be omitted.
[0278] The symbol decoding unit 2740 further maps the bin string restored by the regular decoding unit 2720 or the bypass decoding unit 2730 to a syntax element to restore the bin string.
[0279] FIG. 28 is a flowchart of a method for updating probabilities utilizing scaling factors according to one embodiment of the present disclosure.
[0280] 28, in operation 2810, the context modeler 2710 may obtain information related to a slice type from a bitstream. The slice type may include an I slice, a B slice, or a P slice. The information related to the slice type may be included in a slice header. The context modeler 2710 may obtain information related to the slice header in the form of a bitstream.
[0281] In operation 2820, the context modeler 2710 may arithmetically decode the current symbol based on the occurrence probability of the symbol. The current symbol may be determined by the symbol representation unit 1710 to correspond to the syntax element. In one embodiment, the occurrence probability of the symbol may be a cumulative occurrence probability. For example, the occurrence probability of symbol k may be the sum of the individual symbol occurrence probabilities of symbols 0 through k. In one embodiment, the occurrence probability of the symbol may be an individual symbol occurrence probability, which is the occurrence probability of the symbol.
[0282] According to an embodiment, the occurrence probability of a symbol may be determined independently for each of multiple context models corresponding to a syntax element. For example, the context modeler 2710 may obtain multiple scaling factor indexes (shiftIdx) specified by each context model and determine a value corresponding to each scaling factor index as a scaling factor.
[0283] In one embodiment, only some context models may be configured to use the scaling factor specified by the context model. For example, a scaling factor may be specified only for a context model for coefficient coding. Or, as another example, a scaling factor may be specified only for a context model that is not for coefficient coding. If there is no value of the scaling factor specified in the context model, the context modeler 2710 may determine the multiple scaling factors to a predetermined base value.
[0284] In one embodiment, at least one of the scaling factors may be determined to a predetermined value that is independent of the context model. For example, the context modeler 2710 may determine a first scaling factor Shift corresponding to a short window among the two scaling factors. 1 is determined to be a fixed value M for all context models, and the second scaling factor Shift 2 may be determined to a value specified by the context model, or conversely, the context modeller 2710 may determine the second scaling factor to a fixed value and the first scaling factor to a value specified by the context model.
[0285] As shown in Equation 4, the probability C i , from 0 to 2 k If we use integers between , and , then k bits of memory are required to represent the probabilities. Therefore, if we use two scaling factors for each context model, two probabilities must be updated, so k*2*[number of context models] bits of memory are required. For example, i If is represented by integers within 215 and the number of context models is 400, then a total of 15*2*400=12,000 bits of RAM must be reserved for probability updates.
[0286] Thus, to reduce the memory required to represent the probabilities, various embodiments of the context modeler 2710 may determine, based on the context model, whether to update the probabilities using all of the multiple scaling factors, or to update the probabilities using only some of the multiple scaling factors, but not all of them. In one embodiment, when determining that none of the multiple scaling factors are to be used, the context modeler 2710 may update the probabilities using only one of the multiple scaling factors. In that case, a single probability, e.g., P 1 This may reduce the memory required to represent the probabilities since only the values of .function..times ...
[0287] In one embodiment, the probabilities may be updated using multiple scaling factors only for some context models. For example, the probabilities may be updated using multiple scaling factors only for the context model for coefficient coding, and the probabilities may be updated using only one scaling factor for other context models. Or, conversely, the probabilities may be updated using multiple scaling factors only for the context model not for coefficient coding, and the probabilities may be updated using only one scaling factor for the context model for coefficient coding.
[0288] In operation 2830, the context modeler 2710 may determine a first scaling factor using a first function if the slice type information indicates an I slice. The value of the first function may be determined based on a first threshold value. For example, if the first threshold value is th1, the first scaling factor shift i The value of shift i=b1+I(count>th1), where b1 is a predetermined constant, and the I(count>th1) function is a function that indicates a value greater than 0 if count is greater than th1, and indicates 0 if count is less than or equal to th1. For example, the I(count>th1) function is 1 if count is greater than th1, and is 0 if count is less than or equal to th1.
[0289] In one embodiment, count is also the number of times the symbol is arithmetically coded. In one embodiment, if there are multiple context models, count is also the number of times the symbol is arithmetically coded based on each context model. In one embodiment, b1 is also a value between 2 and 7. For convenience of explanation, the first scaling factor shift by one threshold value is set to 0. i Although an example in which the value of shift is determined is given above, the present invention is not limited thereto, and the shift may be determined based on a plurality of threshold values. i A value of the first scaling factor shift may be determined. i The value of may be determined by further considering other variables. For example, the first scaling factor shift i may be determined based on the number of symbols.
[0290] In operation 2840, the context modeler 2710 may determine a first scaling factor using a second function if the slice type information indicates a B slice or a P slice. The value of the second function may be determined based on a second threshold value. For example, if the second threshold value is th2, the first scaling factor shift i The value of shift i=b2+I(count>th2), where b2 is a predetermined constant, and the I(count>th2) function is a function that indicates a value greater than 0 if count exceeds th2, and indicates 0 if count is equal to or less than th2. In one embodiment, b2 is a value greater than or equal to 2 and less than or equal to 7. The first critical value is greater than or equal to the second critical value. Also, b2 is greater than or equal to b1. If the first critical value is greater than or equal to the second critical value, the value of the scaling factor determined based on the first critical value is smaller than the value of the scaling factor determined based on the second critical value. In such an example, the value of the scaling factor when the slice type is an I slice is smaller than the value of the scaling factor when the slice type is a B slice or a P slice. Since inter-slices have a relatively smaller amount of data to code than intra-slices, it is also advantageous for the value of the scaling factor to be smaller than that in B slices or P slices, so that the symbol occurrence probability of an I slice converges relatively quickly. Determining the scaling factor based on the slice type can save bit rate.
[0291] In operation 2850, the context modeler 2710 may update the occurrence probability of the symbol using the first scaling factor. In some embodiments, the context modeler 2710 may perform arithmetic coding and updating based on the occurrence probability of one symbol. As described above, the context modeler 2710 may perform arithmetic coding and updating based on the occurrence probabilities of multiple symbols. As shown in Equations 3 and 4, the context modeler 2710 may update the occurrence probabilities of the multiple symbols individually, and may finally update the occurrence probability of the symbol by weighting the updated occurrence probabilities of the multiple symbols. In some embodiments, the context modeler 2710 may finally update the occurrence probability of the symbol by averaging the updated occurrence probabilities of the multiple symbols.
[0292] In one embodiment, the context modeler 2710 may determine a function using a first critical value as the first scaling factor and determine the value of the first scaling factor according to a predetermined condition. In one embodiment, the context modeler 2710 may determine a function using a second critical value as the first scaling factor and determine the value of the first scaling factor according to a predetermined condition. In one embodiment, the context modeler 2710 may determine a function using at least one of the first critical value or the second critical value as the first scaling factor and determine the value of the first scaling factor according to a predetermined condition.
[0293] According to an embodiment of the present disclosure, there is provided an entropy decoding method. The entropy decoding method may include acquiring information related to a slice type from a bitstream. The entropy decoding method may also include arithmetically decoding a current symbol corresponding to a syntax element based on an occurrence probability of a symbol. When the information related to a slice type indicates an I slice, the entropy decoding method may also include determining a first scaling factor for updating the occurrence probability of the symbol using a function whose value is determined based on a first critical value. When the information related to the slice type indicates a B slice or a P slice, the entropy decoding method may also include determining the first scaling factor using a second function. The value of the second function may be determined based on a second critical value. The entropy decoding method may also include updating the occurrence probability of the symbol using the first scaling factor. The first critical value may be greater than or equal to the second critical value.
[0294] According to an embodiment of the present disclosure, the entropy decoding method may also include determining a second scaling factor for updating the occurrence probability of the symbol using a third function when the slice type information indicates an I slice. A value of the third function may be determined based on a third critical value. The entropy decoding method may also include determining the second scaling factor using a fourth function when the slice type information indicates a B slice or a P slice. A value of the fourth function may be determined based on a fourth critical value. The entropy decoding method may also include updating the occurrence probability of the symbol using the first scaling factor and the second scaling factor. The third critical value may be greater than or equal to the fourth critical value.
[0295] According to an embodiment of the present disclosure, the entropy decoding method also includes updating a first probability associated with the symbol using the first scaling factor. The entropy decoding method also includes updating a second probability associated with the symbol using the second scaling factor. The entropy decoding method also includes updating a probability of occurrence of the symbol using an average of the first probability and the second probability.
[0296] According to an embodiment of the present disclosure, the entropy decoding method may also include updating a first probability associated with the symbol using the first scaling factor. The entropy decoding method may also include updating a second probability associated with the symbol using the second scaling factor. The entropy decoding method may update the probability of occurrence of the symbol using a weighted sum of the first probability and the second probability.
[0297] According to an embodiment of the present disclosure, if the slice type information indicates an I slice, a value of the first scaling factor is greater than or equal to a value of the second scaling factor, and if the slice type information indicates an I slice, a weight value associated with the first probability is greater than or equal to a weight value associated with the second probability.
[0298] According to an embodiment of the present disclosure, in the entropy decoding method, if the slice type information indicates a B slice or a P slice, a value of the first scaling factor is greater than or equal to a value of the second scaling factor, and if the slice type information indicates a B slice or a P slice, a weight value associated with the first probability is less than or equal to a weight value associated with the second probability.
[0299] According to one embodiment of the present disclosure, the first scaling factor may be determined based on the number of times a symbol corresponding to the syntax element has previously been arithmetically decoded.
[0300] According to one embodiment of the present disclosure, the value of the first function determined when the number of times the arithmetic decoding is performed is greater than or equal to the first critical value is greater than the value of the first function determined when the number of times the arithmetic decoding is performed is less than the first critical value.
[0301] According to one embodiment of the present disclosure, the value of the first function determined when the number of times arithmetically decoded is greater than or equal to the first critical value is about 1 greater than the value of the first function determined when the number of times arithmetically decoded is less than the first critical value.
[0302] According to an embodiment of the present disclosure, the entropy decoding method may also include obtaining a requirement for the syntax element. The entropy decoding method may also include determining a number of symbols based on a type of the syntax element.
[0303] According to an embodiment of the present disclosure, the value of the first scaling factor may be determined using the number of the symbols.
[0304] According to an embodiment of the present disclosure, if the number of symbols is greater than or equal to a predetermined value, the value of the first scaling factor may be determined based on the predetermined value, and if the number of symbols is less than a predetermined value, the value of the first scaling factor may be determined based on the number of symbols.
[0305] According to an embodiment of the present disclosure, when the number of symbols is M (M is an integer), the current symbol may correspond to an integer from 0 to (M-1), where M is one of 2 to 16.
[0306] According to an embodiment of the present disclosure, the entropy decoding method may also include obtaining a requirement for the syntax element, determining a context model corresponding to a predetermined condition from among a plurality of context models corresponding to the syntax element, and obtaining an occurrence probability of the symbol from the determined context model.
[0307] According to one embodiment of the present disclosure, the probability of occurrence of said symbols is also a cumulative distribution probability.
[0308] According to an embodiment of the present disclosure, a value of the first function may be determined based on the first critical value and the fifth critical value, and a value of the second function may be determined based on the second critical value and the sixth critical value.
[0309] According to an embodiment of the present disclosure, an entropy decoding device is provided. The entropy decoding device may also include at least one processor. The at least one processor may acquire information related to a slice type from a bitstream. The at least one processor may arithmetically decode a current symbol corresponding to a syntax element based on an occurrence probability of a symbol. If the information related to the slice type indicates an I slice, the at least one processor may determine a first scaling factor for updating the occurrence probability of the symbol using a first function. A value of the first function may be determined based on a first critical value. If the information related to the slice type indicates a B slice or a P slice, the at least one processor may determine the first scaling factor using a second function. A value of the second function may be determined based on a second critical value. The at least one processor may update the occurrence probability of the symbol using the first scaling factor. The first critical value may be greater than or equal to the second critical value.
[0310] According to an embodiment of the present disclosure, there is provided an entropy coding method. The entropy coding method may include obtaining information related to a slice type from a bitstream. The entropy coding method may also include arithmetically coding a current symbol corresponding to a syntax element based on an occurrence probability of a symbol. The entropy coding method may also include determining a first scaling factor for updating the occurrence probability of the symbol using a first function when the information related to the slice type indicates an I slice. A value of the first function may be determined based on a first critical value. The entropy coding method may also include determining the first scaling factor using a second function when the information related to the slice type indicates a B slice or a P slice. A value of the second function may be determined based on a second critical value. The entropy coding method may also include updating the occurrence probability of the symbol using the first scaling factor. The first critical value may be greater than or equal to the second critical value.
[0311] According to an embodiment of the present disclosure, there is provided an entropy coding device. The entropy coding device may also include at least one processor. The at least one processor may acquire information related to a slice type from a bitstream. The at least one processor may arithmetically code a current symbol corresponding to a syntax element based on an occurrence probability of a symbol. If the information related to the slice type indicates an I slice, the at least one processor may determine a first scaling factor for updating the occurrence probability of the symbol using a first function. A value of the first function may be determined based on a first critical value. If the information related to the slice type indicates a B slice or a P slice, the at least one processor may determine the first scaling factor using a second function. A value of the second function may be determined based on a second critical value. The at least one processor may update the occurrence probability of the symbol using the first scaling factor. The first critical value may be greater than or equal to the second critical value.
[0312] The above description focuses on various embodiments. It will be understood by those skilled in the art that the present disclosure can be embodied in modified forms without departing from the essential characteristics of the present disclosure. Therefore, the disclosed embodiments should be considered from an explanatory perspective, not a limiting one. The scope of the present disclosure is shown in the claims, not the above description, and all differences within the scope of the equivalents should be interpreted as being included in the present disclosure.
[0313] The above-described embodiments of the present disclosure can be created into a program executable by a computer and can be embodied in a general-purpose digital computer that runs the program using a computer-readable recording medium. The computer-readable recording medium includes recording media such as magnetic recording media (e.g., ROM, floppy disk, hard disk, etc.) and optically readable media (e.g., CD-ROM (compact disc read only memory), DVD (digital versatile disc)). [Explanation of symbols]
[0314] 1710 Symbol Expression Division 1720 Context Modeler 1732 Regular Coding Department 1734 Bypass coding section
Claims
1. In the entropy decoding method, obtaining information relating to a slice type from a bitstream; arithmetically decoding a current symbol corresponding to the syntax element based on the probability of occurrence of the symbol; determining a first scaling factor for updating the occurrence probability of the symbol using a first function based on the slice type information indicating an I slice, the value of the first function being determined based on a first threshold value; determining the first scaling factor using a second function based on the slice type information indicating a B slice or a P slice, the value of the second function being determined based on a second threshold value; and updating the probability of occurrence of the symbol using the first scaling factor; The entropy decoding method according to claim 1, wherein the first threshold value is greater than or equal to the second threshold value.
2. determining a second scaling factor for updating the occurrence probability of the symbol using a third function based on the slice type information indicating an I slice, the value of the third function being determined based on a third threshold value; determining the second scaling factor using a fourth function based on the slice type information indicating a B slice or a P slice, the value of the fourth function being determined based on a fourth critical value; The step of updating the probability of occurrence of the symbol using the first scaling factor comprises: updating the probability of occurrence of the symbol using the first scaling factor and the second scaling factor; The entropy decoding method of claim 1, wherein the third threshold value is greater than or equal to the fourth threshold value.
3. updating the probability of occurrence of the symbol using the first scaling factor and the second scaling factor, updating a first probability associated with the symbol using the first scaling factor; updating second probabilities associated with the symbols using the second scaling factor; 3. The method of claim 2, further comprising: updating the probability of occurrence of the symbol by using an average of the first probability and the second probability.
4. updating the probability of occurrence of the symbol using the first scaling factor and the second scaling factor, updating a first probability associated with the symbol using the first scaling factor; updating second probabilities associated with the symbols using the second scaling factor; 3. The method of claim 2, further comprising: updating the probability of occurrence of the symbol using a weighted sum of the first probability and the second probability.
5. Based on the information relating to the slice type indicating an I slice, the value of the first scaling factor is greater than or equal to the value of the second scaling factor; 5. The method of claim 4, wherein a weight value associated with the first probability is greater than or equal to a weight value associated with the second probability.
6. Based on the information regarding the slice type indicating a B slice or a P slice, the value of the first scaling factor is greater than or equal to the value of the second scaling factor; 5. The entropy decoding method of claim 4, wherein the weighting value associated with the first probability is equal to or smaller than the weighting value associated with the second probability.
7. The method of claim 1 , wherein the first scaling factor is determined based on a number of times a symbol corresponding to the syntax element has previously been arithmetically decoded.
8. 8. The entropy decoding method of claim 7, wherein a value of the first function determined when the number of times the arithmetic decoding is performed is equal to or greater than the first critical value is greater than a value of the first function determined when the number of times the arithmetic decoding is performed is less than the first critical value.
9. 8. The entropy decoding method of claim 7, wherein a value of the first function determined when the number of times arithmetically decoded is equal to or greater than the first critical value is greater than a value of the first function determined when the number of times arithmetically decoded is less than the first critical value by about 1.
10. obtaining a request for the syntax element; 2. The method of claim 1, further comprising: determining a number of symbols based on a type of the syntax element.
11. The entropy decoding method of claim 10, wherein the value of the first scaling factor is determined using the number of the symbols.
12. based on the number of symbols being greater than or equal to a predetermined value, a value of the first scaling factor is determined based on the predetermined value; The method of claim 11, wherein the value of the first scaling factor is determined based on the number of symbols, if the number of symbols is less than a predetermined value.
13. The entropy decoding method according to any one of claims 1 to 12, wherein the number of symbols is an integer M, and the current symbol corresponds to an integer between 0 and (M-1).
14. In the entropy decoding device, Obtaining information relating to slice types from the bitstream; arithmetically decoding a current symbol corresponding to the syntax element based on the occurrence probability of the symbol; determining a first scaling factor for updating the occurrence probability of the symbol using a first function based on the information related to the slice type indicating an I slice, the value of the first function being determined based on a first threshold value; determining the first scaling factor using a second function based on the slice type information indicating a B slice or a P slice, the value of the second function being determined based on a second critical value; at least one processor for updating the probabilities of occurrence of the symbols using the first scaling factor; The entropy decoding apparatus according to claim 1, wherein the first threshold value is greater than or equal to the second threshold value.
15. In the entropy coding method, obtaining information relating to a slice type; arithmetically encoding a current symbol corresponding to the syntax element based on the probability of occurrence of the symbol; determining a first scaling factor for updating the occurrence probability of the symbol using a first function based on the slice type information indicating an I slice, the value of the first function being determined based on a first threshold value; determining the first scaling factor using a second function based on the slice type information indicating a B slice or a P slice, the value of the second function being determined based on a second threshold value; and updating the probability of occurrence of the symbol using the first scaling factor; The entropy encoding method according to claim 1, wherein the first threshold value is greater than or equal to the second threshold value.