Methods and apparatus for entropy encoding and decoding video signals

By dividing the area of ​​the transformation coefficient in the video signal, identify and encode the position of the final non -zero coefficient, solve the problem of low entropy coding performance in the existing technology, and realize the reduction of the amount of data and the improvement of coding performance.

CN115297325BActive Publication Date: 2025-01-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210917838.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-04-13
Filing Date
2018-04-09
Publication Date
2025-01-28
Estimated Expiration
2038-04-09

AI Technical Summary

Technical Problem

In the existing video compression technology, entropy encoding performance is low, making it difficult to effectively compress and send syntax elements, resulting in a large amount of data.

Method used

By dividing the area of ​​the transformation coefficient, identify the position of the last non -zero coefficient, and use different encoding methods to encode according to the conditions to ensure that the final non -zero coefficient position is within a limited area.

Benefits of technology

Effectively reduce the amount of data required for the transformation coefficient with the signal, and improve the performance of entropy coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115297325B_ABST
    Figure CN115297325B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for entropy encoding and decoding a video signal. A method for decoding a video signal, the method comprising the following steps: decoding a syntax element indicating a last non-zero region from a bitstream, wherein the last non-zero region represents a region including the last non-zero transform coefficient in a scanning order; dividing a current block into a plurality of sub-regions; and determining the last non-zero region of the current block from the divided sub-regions based on the syntax element.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of a patent application with an international application number of 201880031914.0 (PCT / KR2018 / 004143) filed with the China Patent Office on November 14, 2019, with an international application date of April 9, 2018, and an invention name of “Method and device for entropy encoding and decoding video signals”. Technical Field

[0002] The present disclosure relates to a method for entropy encoding and decoding a video signal. More specifically, the present disclosure relates to a method and apparatus for encoding and decoding the position of the last non-zero coefficient when coding a transform coefficient. Background Art

[0003] Entropy coding is a process of losslessly compressing syntax elements determined by the encoding process and generating a raw byte sequence payload (RBSP). Entropy coding uses statistical information of syntax, and allocates short bits to frequently generated syntax, and long bits to other syntax, and then expresses the syntax elements as short data.

[0004] Among them, context-based adaptive binary arithmetic coding (CABAC) uses an adaptively updated context model based on the context of the syntax during the process of performing binary arithmetic coding and the previously generated symbols. However, CABAC has many operations and high complexity, and has a sequential structure, and is therefore difficult to operate in parallel.

[0005] Therefore, in video compression technology, there is a need to more efficiently compress and send syntax elements, and to this end, there is a need to improve the performance of entropy coding. Summary of the invention

[0006] Technical issues

[0007] An object of the present disclosure is to provide a method for coding a region to which a last non-zero transform coefficient belongs among regions obtained by splitting a transform unit.

[0008] Furthermore, an object of the present disclosure is to provide a method for coding a region to which a last non-zero transform coefficient belongs among regions obtained by recursively splitting a transform unit.

[0009] Furthermore, an object of the present disclosure is to provide a method of coding a position of a last non-zero coefficient while adaptively changing a coding method.

[0010] Furthermore, an object of the present disclosure is to provide a method for coding the position of the last non-zero coefficient by applying different coding methods according to various conditions.

[0011] In addition, an object of the present disclosure is to provide a method for coding the position of the last non-zero coefficient in consideration of a case where the position of the last non-zero coefficient is ensured to exist in a limited area.

[0012] Those skilled in the art will understand that the objectives that can be achieved by the present disclosure are not limited to the objectives that have been specifically described above, and the above and other objectives that can be achieved by the present disclosure will be more clearly understood from the following detailed description.

[0013] Technical Solutions

[0014] In one aspect of the present disclosure, a method for decoding a video signal may include: decoding a syntax element indicating a last non-zero region from a bitstream, the last non-zero region representing a region including a last non-zero transform coefficient in a scanning order; dividing a current block into a plurality of sub-regions; and determining the last non-zero region of the current block from among the divided sub-regions based on the syntax element.

[0015] Preferably, the method may further include decoding index information indicating a position of a last non-zero transform coefficient in a last non-zero region of the current block.

[0016] Preferably, the step of dividing the current block into a plurality of sub-regions may include dividing the current block into a plurality of sub-regions by recursively dividing the current block into regions with lower depths based on a predetermined division method.

[0017] Preferably, the syntax element may include information indicating, for each depth, a region including a last non-zero transform coefficient among regions having a lower depth split from the current block.

[0018] Preferably, the step of dividing the current block into a plurality of sub-regions may include grouping the width of the current block into a plurality of horizontal groups, and grouping the height of the current block into a plurality of vertical groups, wherein the current block is divided into a plurality of sub-regions based on the horizontal groups and the vertical groups.

[0019] Preferably, the syntax element may include information on a horizontal group or a vertical group indicating a last non-zero region among the horizontal group or the vertical group.

[0020] Preferably, the method may further include decoding a syntax element indicating the position of the last non-zero transform coefficient in the last non-zero region of the current block, wherein the syntax element indicating the last non-zero region is binarized using a truncated unary code, and the syntax element indicating the position of the last non-zero transform coefficient is binarized using a fixed-length code.

[0021] Preferably, the syntax element indicating the last non-zero region may be decoded in a normal mode using a context, and the syntax element indicating the position of the last non-zero transform coefficient may be decoded in a bypass mode not using a context.

[0022] Preferably, the method may also include adaptively determining a parameter set applied to the current block from among pre-stored parameter sets, wherein the parameter set includes at least one of a parameter indicating the number of horizontal groups or vertical groups, a parameter indicating the length of the code assigned to each group, and a parameter indicating a context index for the code assigned to each group.

[0023] Preferably, the step of adaptively determining the parameter set applied to the current block may include determining the parameter set applied to the current block based on a probability distribution of a position of a last non-zero transform coefficient.

[0024] Preferably, when the current block is a non-square block, the current block may be divided into sub-regions consisting of a specific number of pixels, wherein the specific number is determined according to a ratio of a width to a height of the current block.

[0025] Preferably, when the last non-zero transform coefficient exists within a specific region of the current block, the syntax element may be binarized using a truncated unary code allocated within the range of the specific region.

[0026] In another aspect of the present disclosure, an apparatus for decoding a video signal may include: a syntax element decoding unit for decoding a syntax element indicating a last non-zero region from a bitstream, the last non-zero region representing a region including a last non-zero transform coefficient in a scanning order; a sub-region segmentation unit for dividing a current block into a plurality of sub-regions; and a last non-zero region determination unit for determining a last non-zero region of the current block from among the divided sub-regions based on the syntax element.

[0027] Effect of the Invention

[0028] According to an embodiment of the present disclosure, the amount of data required to signal a transform coefficient may be reduced by effectively coding position information of a last non-zero coefficient.

[0029] Those skilled in the art will recognize that the effects that can be achieved by the present disclosure are not limited to what has been specifically described above, and the above and other effects that can be achieved by the present disclosure will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a block diagram illustrating a configuration of an encoder for encoding a video signal according to an embodiment of the present disclosure.

[0031] Figure 2is a block diagram illustrating a configuration of a decoder for decoding a video signal according to an embodiment of the present disclosure.

[0032] Figure 3 A schematic block diagram illustrating an entropy encoding unit to which context-based adaptive binary arithmetic coding (CABAC) is applied as an embodiment to which the present disclosure is applied.

[0033] Figure 4 A schematic block diagram illustrating an entropy decoding unit to which context-based adaptive binary arithmetic coding (CABAC) is applied as an embodiment to which the present disclosure is applied.

[0034] Figure 5 A flowchart of encoding performed according to context-based adaptive binary arithmetic coding (CABAC) as an embodiment to which the present disclosure is applied is illustrated.

[0035] Figure 6 A decoding flow chart performed according to context-based adaptive binary arithmetic coding (CABAC) as an embodiment to which the present disclosure is applied is illustrated.

[0036] Figure 7 is a flowchart illustrating a method for encoding position information of a last non-zero transform coefficient as an embodiment to which the present disclosure is applied.

[0037] Figure 8 A method for encoding position information of a last non-zero transform coefficient through recursive partitioning is illustrated as an embodiment to which the present disclosure is applied.

[0038] Fig. 9 A method for encoding position information of a last non-zero transform coefficient using a superpixel is illustrated as an embodiment to which the present disclosure is applied.

[0039] Fig.10 is a flowchart illustrating a method for decoding position information of a last non-zero transform coefficient as an embodiment to which the present disclosure is applied.

[0040] Fig.11 An apparatus for decoding position information of a last non-zero transform coefficient is illustrated as an embodiment to which the present disclosure is applied. DETAILED DESCRIPTION

[0041] Hereinafter, exemplary elements and operations according to embodiments of the present disclosure are described with reference to the accompanying drawings. However, it should be noted that the elements and operations of the present disclosure described with reference to the accompanying drawings are provided only as embodiments, and the technical spirit and core configuration and operation of the present disclosure are not limited thereto.

[0042] In addition, the terms used in this specification are common terms widely used now, but in special cases, terms randomly selected by the applicant are used. In this case, the meaning of the corresponding terms is clearly described in the detailed description of the corresponding part. Therefore, it should be noted that the present disclosure should not be interpreted only based on the names of the terms used in the corresponding description of this specification, and the present disclosure should be interpreted even by checking the meaning of the corresponding terms.

[0043] In addition, the terms used in the present disclosure are common terms selected to describe the present disclosure, but if there are such terms with similar meanings, they can be replaced with other terms for more appropriate analysis. For example, signal, data, sample, picture, frame and block can be appropriately replaced and interpreted in each compilation process.

[0044] In addition, the concepts and methods described in the present disclosure may be applied to other embodiments, and combinations of the embodiments may also be applied within the inventive concept of the present disclosure, although not explicitly described in the present disclosure.

[0045] Figure 1 A schematic block diagram of an encoder for encoding a video signal according to an embodiment of the present disclosure is shown.

[0046] refer to Figure 1 , the encoder 100 may include an image segmentation unit 110, a transform unit 120, a quantization unit 130, a dequantization unit 140, an inverse transform unit 150, a filtering unit 160, a DPB (decoded picture buffer) 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185 and an entropy encoding unit 190.

[0047] The image segmentation unit 110 may divide the input image (or picture, frame) input to the encoder 100 into one or more processing units. For example, the processing unit may be a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), or a transform unit (TU).

[0048] The encoder 100 may generate a residual signal by subtracting a prediction signal output from the inter prediction unit 180 or the intra prediction unit 185 from the input image signal. The generated residual signal may be transmitted to the transform unit 120.

[0049] The transform unit 120 may apply a transform technique to the residual signal to generate a transform coefficient. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). When the GBT represents the relationship information between pixels as a graph, the GBT means a transform obtained from a graph. The CNT means a transform obtained by generating a prediction signal using all previously reconstructed pixels and based thereon. In addition, the transform process may be applied to pixel blocks of the same size having a square, or to blocks of variable sizes other than a square.

[0050] The quantization unit 130 may quantize the transform coefficients and transmit the quantized coefficients to the entropy encoding unit 190. The entropy encoding unit 190 may entropy code the quantized signal and then output the entropy coded signal as a bitstream.

[0051] The quantized signal output from the quantization unit 130 may be used to generate a prediction signal. For example, the quantized signal may be dequantized and inversely transformed via the dequantization unit 140 and the inverse transform unit 150 in the loop, respectively, to reconstruct the residual signal. The reconstructed residual signal may be added to the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 to generate a reconstructed signal.

[0052] The filtering unit 160 may apply filtering to the reconstructed signal and then output the filtered reconstructed signal to the reproduction device or the decoded picture buffer 170. The filtered signal transmitted to the decoded picture buffer 170 may be used as a reference picture in the inter-frame prediction unit 180. In this way, using the filtered picture as a reference picture in the inter-picture prediction mode may not only improve picture quality but also improve coding efficiency.

[0053] The decoded picture buffer 170 may store the filtered picture to be used as a reference picture in the inter prediction unit 180 .

[0054] The inter-frame prediction unit 180 may perform temporal prediction and / or spatial prediction with reference to the reconstructed picture to remove temporal redundancy and / or spatial redundancy. In this case, the reference picture is used for prediction. In this case, in order to reduce the amount of motion information sent from the inter-frame prediction mode, the motion information may be predicted based on the correlation of the motion information between the neighboring blocks and the current block.

[0055] The intra prediction unit 185 can predict the current block by referring to samples near the block to be encoded currently. The intra prediction unit 185 can perform the following process to perform intra prediction. First, the intra prediction unit 185 can prepare reference samples required to generate a prediction signal. Then, the intra prediction unit 185 can use the prepared reference samples to generate a prediction signal. After that, the intra prediction unit 185 can encode the prediction mode. At this time, the reference sample can be prepared by reference sample filling and / or reference sample filtering. Since the reference sample undergoes a prediction and reconstruction process, there may be a quantization error. Therefore, in order to reduce such an error, a reference sample filtering process can be performed for each prediction mode used for intra prediction.

[0056] The prediction signal generated via the inter prediction unit 180 or the intra prediction unit 185 may be used to generate a reconstructed signal or to generate a residual signal.

[0057] Figure 2 A schematic block diagram of a decoder for decoding a video signal according to an embodiment of the present disclosure is shown.

[0058] refer to Figure 2 , the decoder 200 may include an entropy decoding unit 210 , a dequantization unit 220 , an inverse transform unit 230 , a filtering unit 240 , a decoded picture buffer (DPB) 250 , an inter-prediction unit 260 , and an intra-prediction unit 265 .

[0059] The reconstructed video signal output from the decoder 200 may be reproduced using a reproduction device.

[0060] The decoder 200 may receive Figure 1 The received signal may be entropy decoded via entropy decoding unit 210 .

[0061] The dequantization unit 220 may obtain a transform coefficient from the entropy-decoded signal using the quantization step size information.

[0062] The inverse transform unit 230 may inversely transform the transform coefficients to obtain a residual signal.

[0063] A reconstructed signal may be generated by adding the obtained residual signal to the prediction signal output from the inter prediction unit 260 or the intra prediction unit 265 .

[0064] The filtering unit 240 may apply filtering to the reconstructed signal, and may output the filtered reconstructed signal to the reproducing device or the decoded picture buffer unit 250. The filtered signal transmitted to the decoded picture buffer unit 250 may be used as a reference picture in the inter prediction unit 260.

[0065] Here, the detailed description of the filtering unit 160, the inter prediction unit 180, and the intra prediction unit 185 of the encoder 100 may be equally applied to the filtering unit 240, the inter prediction unit 260, and the intra prediction unit 265 of the decoder 200, respectively.

[0066] Figure 3 A schematic block diagram illustrating an entropy encoding unit to which context-based adaptive binary arithmetic coding (CABAC) is applied as an embodiment to which the present disclosure is applied.

[0067] The entropy coding unit 300 to which the present disclosure is applied includes a binarization unit 310, a context modeling unit 320, a binary arithmetic coding unit 330, and a memory 360, and the binary arithmetic coding unit 330 includes a normal binary coding unit 340 and a bypass binary coding unit 350. Here, the normal binary coding unit 340 and the bypass binary coding unit 350 may be referred to as a normal coding engine and a bypass coding engine, respectively.

[0068] The binarization unit 310 may receive a data symbol sequence and perform binarization thereon to output a binary symbol (bin) string including a binarization value of 0 or 1. The binarization unit 310 may map a syntax element to a binary symbol. Various binarization processes, such as unary (U), truncated unary (TU), k-order Exp-Golomb (EGk), and a fixed-length process, may be used for binarization. The binarization process may be selected based on the type of syntax element.

[0069] The output binary symbol string is sent to the context modeling unit 320.

[0070] The context modeling unit 320 selects the probability information required for coding the current block from the memory and sends the probability information to the binary arithmetic coding unit 330. For example, the context modeling unit 320 may select a context memory from the memory 360 based on the syntax element to be coded, and select the probability information required for coding the current syntax element by the bin index binIdx. Here, context refers to information about the probability of symbol generation, and context modeling refers to the process of estimating the probability required for binary arithmetic coding of the next bin based on information about the previously coded bin. In addition, the context may consist of a state indicating a specific probability value and a most likely symbol (MPS).

[0071] The context modeling unit 320 can provide the correct probability estimates required to achieve high coding efficiency. Therefore, different context models can be used for different binary symbols, and the probabilities of such context models can be updated based on previously coded binary symbol values.

[0072] Binary symbols with similar distributions can share the same context model. For the probability estimation of the context model of each binary symbol, at least one of the grammatical information of the bin, the bin index binIdx indicating the position of the bin in the bin string, the probability of the bin included in the neighboring blocks of the block containing the bin, and the decoded value of a specific grammatical element of the neighboring block can be used.

[0073] The binary arithmetic encoding unit 330 includes a normal binary encoding unit 340 and a bypass binary encoding unit 350, and performs entropy encoding on an output character string and outputs compressed data bits.

[0074] The conventional binary encoding unit 340 performs arithmetic coding based on recursive interval partitioning.

[0075] First, the interval (or segment or range) of the initial value from 0 to 1 is divided into two sub-intervals based on the binary symbol probability. The encoded bit provides an offset by which one of the intervals indicating 0 and 1 can be selected in the process of continuously decoding the binary symbol value when converted to a binary decimal.

[0076] After the binary symbol of the decoded pattern, the aforementioned interval can be updated so that the selected subinterval becomes the same, and the interval division process is repeated. The aforementioned interval and offset have limited bit precision, and therefore, each time the interval decreases below a certain value, renormalization may be required in order to maintain precision (i.e., in order to prevent the value from being excessively reduced and being misrepresented or from becoming zero and being lost). Renormalization can occur after encoding or decoding each binary symbol.

[0077] The bypass binary encoding unit 350 performs encoding without a context mode, and performs encoding by fixing the probability of the currently encoded bin to 0.5. This method can be used when it is difficult to determine the grammatical probability or when it is designed to be encoded at a high speed.

[0078] Figure 4 A schematic block diagram illustrating an entropy decoding unit to which context-based adaptive binary arithmetic coding (CABAC) is applied as an embodiment to which the present disclosure is applied.

[0079] The entropy decoding unit 400 includes a context modeling unit 410 , a binary arithmetic decoding unit 420 , a memory 450 , and a debinarization unit 460 , and the binary arithmetic decoding unit 420 includes a normal binary decoding unit 430 and a bypass binary decoding unit 440 .

[0080] The entropy decoding unit 400 receives the bitstream and confirms whether the bypass mode is applied to the current syntax element. Here, the bypass mode refers to fixing the probability of the current coded bin to 0.5 and performing coding without using the context model. When the bypass mode is not applied, the conventional binary decoding unit 430 performs binary arithmetic decoding according to the conventional mode.

[0081] Here, the context modeling unit 410 selects probability information required for decoding the current bit stream from the memory 450 and sends the probability information to the regular binary decoding unit 430 .

[0082] On the other hand, when the bypass mode is applied, the bypass binary decoding unit 440 performs binary arithmetic decoding according to the bypass mode.

[0083] The debinarization unit 460 receives the decoded bin in binary form from the binary arithmetic decoding unit 420, converts the bin into a syntax element value in integer form, and outputs the syntax element value. When the bin or bin string in binary form is a syntax element mapped to a syntax element value, the debinarization unit 460 may output the bin in binary form completely.

[0084] Figure 5 A flowchart of encoding performed according to context-based adaptive binary arithmetic coding (CABAC) as an embodiment to which the present disclosure is applied is illustrated.

[0085] The encoder may perform binarization on the syntax element (step S510).

[0086] The encoder may confirm whether to perform binary arithmetic coding according to the normal mode or to perform binary arithmetic coding according to the bypass mode (step S520).

[0087] In the normal mode, the encoder may select a context model (S530) and perform binary arithmetic coding based on the context model (S540). In addition, the encoder may update the context model (S550) and select an appropriate context model again based on the context model updated in step S530.

[0088] In the bypass mode, the encoder may perform binary arithmetic coding based on a probability of 0.5 (S560).

[0089] Figure 6 A decoding flow chart performed according to context-based adaptive binary arithmetic coding (CABAC) as an embodiment to which the present disclosure is applied is illustrated.

[0090] First, the decoder may receive a bitstream (step S610 ).

[0091] The decoder may confirm whether the normal mode is applied to the current syntax element or the bypass mode is applied to the current syntax element (S620). Here, whether to apply the bypass mode may be predetermined according to the syntax type.

[0092] In addition, the symbol to which the normal mode is applied and the symbol to which the bypass mode is applied may be combined to constitute a syntax element. In this case, the decoder may confirm whether the bypass mode is applied to the symbol of the current syntax element.

[0093] When the normal mode is applied as a result of the confirmation in step S620, the decoder can select a context model (S630) and perform binary arithmetic decoding (S640) based on the context model. In addition, the decoder can update the context model (S650) and select an appropriate context model again based on the context model updated in step S630.

[0094] When the bypass mode is applied as a result of the confirmation in step S620, the decoder may perform binary arithmetic decoding based on the probability of 0.5 (S660).

[0095] The decoder may perform inverse binarization on the decoded bin string (S670). For example, the decoder may receive the decoded bin in binary form, convert the decoded bin into a syntax element value in integer form, and output the syntax element value.

[0096] The present disclosure provides a method for coding a region to which a last non-zero transform coefficient belongs among regions obtained by splitting a transform unit.

[0097] Furthermore, the present disclosure provides a method for coding a region to which a last non-zero transform coefficient belongs among regions obtained by recursively splitting a transform unit.

[0098] Furthermore, the present disclosure provides a method of coding a position of a last non-zero coefficient while adaptively changing a coding method.

[0099] Furthermore, the present disclosure provides a method for coding a position of a last non-zero coefficient by applying different coding methods according to various conditions.

[0100] Furthermore, the present disclosure provides a method for coding the position of a last non-zero coefficient using an additional context according to horizontal and vertical coordinates of the last non-zero coefficient or the size and shape of a transform unit.

[0101] Furthermore, the present disclosure provides a method for coding a group to which a last non-zero coefficient belongs among grouped transform coefficient groups and coding an offset in the corresponding group.

[0102] In addition, the present disclosure provides a method of coding the position of the last non-zero coefficient in consideration of ensuring that the position of the last non-zero coefficient exists within a limited area.

[0103] According to the method provided by the present disclosure, the amount of data required to signal the transform coefficients can be reduced by effectively encoding the position information of the last non-zero coefficient.

[0104] Example 1

[0105] In conventional video coding standards (e.g., HEVC or JVET), the encoder / decoder first encodes / decodes the position information of the last non-zero transform coefficient in order to encode / decode the residual signal. Here, the encoder / decoder encodes / decodes the position (i.e., horizontal coordinates and vertical coordinates) of the last non-zero transform coefficient in the transform block. According to conventional methods, as the size of the transform block increases, a larger number of bits may be required to signal the coordinate value of the last non-zero transform coefficient in the transform block, and thus the coding efficiency may be reduced.

[0106] Therefore, the present disclosure provides a method for coding a region to which a last non-zero transform coefficient belongs among regions divided from a transform unit (or coding unit) to solve the above-mentioned problem and effectively encode position information about the last non-zero transform coefficient. Here, the last non-zero transform coefficient refers to a non-zero coefficient (i.e., a significant coefficient) located at the end in a scanning order within the current transform unit (or coding unit), and can be referred to as the last non-zero transform coefficient, the last significant coefficient, etc.

[0107] Figure 7 is a flowchart illustrating a method for encoding position information of a last non-zero transform coefficient as an embodiment to which the present disclosure is applied.

[0108] refer to Figure 7 Although the method described in this embodiment can be equally applied to an encoder and a decoder, it will be described based on the encoder for convenience.

[0109] The encoder obtains the transform coefficients of the current block (S701). The encoder may generate a prediction block by performing inter-frame or intra-frame prediction. The encoder may generate a residual block of the current block by subtracting the predicted block from the original image. The encoder may generate the transform coefficients by transforming the residual block, and may generate quantized transform coefficients by applying quantization to the transform coefficients.

[0110] The encoder divides the current block into a plurality of sub-regions (or lower regions) (S702). For example, the encoder may divide the current block into N sub-regions. In this case, the sub-regions may be exclusively divided regions or partially or completely overlapped divided regions. The current block (or current processing block) may be a coding unit, a coding block, a transform unit, a transform block, a prediction unit, a prediction block, etc.

[0111] The encoder encodes the last non-zero region of the current block among the divided sub-regions (S703). Here, the last non-zero region refers to a region including the last non-zero coefficient. For example, when the current block is divided into N sub-regions, the encoder can encode index information (or syntax elements) indicating the sub-region including the last non-zero transform coefficient among the N sub-regions.

[0112] In addition, steps S702 and S703 may be recursively (repeatedly) performed. In other words, the encoder may recursively (or repeatedly) divide the region to which the non-zero transform coefficient belongs into a region with a lower depth so as to represent the region as a more subdivided region. The encoder may select a region including the last non-zero coefficient from among the N sub-regions, and divide the region including the last non-zero coefficient into N sub-regions (or regions with a lower depth). The recursive division may be performed K times, and may be performed until the last non-zero region reaches a pixel unit. This will be described in detail later.

[0113] The encoder / decoder may subdivide the last non-zero region into pixel units or not. When the last non-zero region is not subdivided into pixel units, the encoder / decoder may encode / decode the coefficients in the final non-zero region (i.e., the last non-zero region with the lowest depth). For example, the encoder / decoder may encode / decode the last non-zero region, and then encode / decode the effective map (or effective coefficient map) indicating whether each coefficient in the final non-zero region has a non-zero value. That is, the encoder / decoder may encode / decode the presence or absence of non-zero coefficients by compiling the information indicating the final lower region in which the last non-zero coefficient exists and sending an effective flag for the position of all coefficients in the corresponding region.

[0114] In one embodiment, the method for encoding the position information of the last non-zero coefficient by recursive partitioning (e.g., determining the values ​​M, N, and K) may be determined according to the shape or size of the current block (e.g., coding block or transform block). For example, the shape may represent a square block or a non-square block, and the size may represent the width and height of the current block or the number of pixels (width*height) in the current block. The method for encoding the last non-zero region (e.g., determining the values ​​M, N, and K) may be predefined in the encoder / decoder, or may be sent from the encoder to the decoder in units of pictures or slices, coding units, or transform units.

[0115] The method for encoding the last non-zero area provided in the present disclosure may be used together with a conventional method of transmitting position information (ie, horizontal and vertical coordinates in a transform unit of the last non-zero transform coefficient) in units of pixels.

[0116] Hereinafter, a method of encoding position information of a last non-zero coefficient through recursive partitioning will be described.

[0117] Example 2

[0118] In an embodiment of the present disclosure, the encoder / decoder may divide the region in which the last non-zero coefficient exists into regions with lower depths, and then encode the region including the last non-zero coefficient among the regions with lower depths (i.e., the last non-zero region). Here, the lower depth indicates the number of divisions of the current block (or the current transform unit), and the depth may be increased by 1 whenever the current block with a depth of 0 is divided. The encoder / decoder may encode information indicating the last non-zero region among the regions with lower depths. The last non-zero region may be further hierarchically divided into regions with lower depths.

[0119] When it is assumed that a set including all pixels (or pixel positions) in the current block is P, as shown in Mathematical Expression 1, P can be divided into P(k).

[0120] [Mathematical expression 1]

[0121]

[0122] Referring to Mathematical Expression 1, P may be divided into P(k), and the depth of P(k) may increase by 1. The depth of P(k) is greater than the depth of P by 1. In other words, the depth of P including all pixels in the current block is 0 and the depth of P(k) is 1.

[0123] When the current block is recursively divided, P(k) may be further divided into subordinate regions with lower depths, and these subordinate regions may be further divided into regions with lower depths (regions with a depth increased by 1).

[0124] The area having a depth d can be expressed by Mathematical Expression 2.

[0125] [Mathematical expression 2]

[0126] P d (i0, i1, ..., i d )

[0127] When the current block having a depth of 0 (the i_0th region having a depth of 0) is divided into regions having a depth of 1, the region represented by Mathematical Expression 2 belongs to the i_1th region (or the region identified by i_1). When the current block is finally divided into regions having a depth of d, the region represented by Mathematical Expression 2 indicates the i_dth region (or the region identified by i_d). Here, the current block having a depth of 0 is the entire region, and the value i_d may have a value of 1.

[0128] The aforementioned recursive partitioning can be expressed by mathematical expression 3.

[0129] [Mathematical expression 3]

[0130]

[0131] P d+1 (i0, i1, ..., i d , i)∩P d+1 (i0, i1, ..., i d ,j)=φ,i,j=1,...,N d (i0, i1, ..., i d ), i≠j,

[0132] P d+1 (i0, i1, ..., i d , i)≠φ, i=1,...,N d (i0, i1, ..., i d )

[0133] Referring to Mathematical Expression 3, assume the case where subordinate regions are divided exclusively from each other. Here, N^(d)(i_0, i_1, ..., i_d) represents the number of subordinate regions divided at a depth d (ie, regions at a depth of d+1).

[0134] When the notations of Mathematical Expressions 2 and 3 are applied, the partitioning of the current block can be represented by Mathematical Expression 4.

[0135] [Mathematical expression 4]

[0136] P=P 0 (i0), N = N0 (i0), P(k)=P 1 (i0, k), where i0 = 1

[0137] Referring to Mathematical Expression 4, a current block having a depth of 0 may be divided into N regions having a depth of 1.

[0138] When P^(d)(i_0, i_1, ..., i_d) is not a leaf region, the encoder / decoder may encode a code that may distinguish P^(d)(i_0, i_1, ..., 1) to P^(d)(i_0, i_1, ..., N^(d-1)(i_0, i_1, ..., i_(d-1))). Here, the leaf region refers to a region that is no longer partitioned in the recursive (or hierarchical) partitioning. That is, the encoder / decoder may encode a region including the last non-zero transform coefficient for each depth from a region with a lower depth partitioned from the current block.

[0139] In order to encode the recursively divided area with a lower depth, various entropy coding methods can be used. For example, the encoder / decoder can perform binarization by assigning a binary code to each area, and applying binary arithmetic coding to the binary code. In addition, when the first area and the second area divided from the current block are divided into a plurality of subordinate areas, the coding method for identifying the subordinate area of ​​the first area may be different from the coding method for identifying the subordinate area of ​​the second area. For example, the encoder / decoder may apply binary arithmetic coding to the code for distinguishing the subordinate area of ​​the first area, and may apply non-binary arithmetic coding to the code for distinguishing the subordinate area of ​​the second area.

[0140] If the code for distinguishing P^(d)(i_0, i_1, ..., i_d) which is not a leaf region is s^(d)(i_0, i_1, ..., i_d), and the code indicating the position q of the last non-zero transform coefficient in region A which is a leaf region is s(A, q), the code used to encode q can be expressed by mathematical expression 5.

[0141] [Mathematical expression 5]

[0142]

[0143] Referring to Mathematical Expression 5, the current block can be divided into regions with a depth of d_q, and q can belong to a region with a depth of d. Here, the operator Π concatenates the code. q belongs to a region identified by region indexes i_0, i_1, ..., i_(d_q) at each depth.

[0144] Figure 8A method for encoding position information of a last non-zero transform coefficient through recursive partitioning is illustrated as an embodiment to which the present disclosure is applied.

[0145] refer to Figure 8 , assuming that the current block is a transform block having a size of 4×4. According to Mathematical Expression 4, the set P can be expressed by Mathematical Expression 6.

[0146] [Mathematical expression 6]

[0147] P=P 0 (1) = {q 11 ,q 12 ,q 13 ,q 14 ,q 21 ,q 22 ,q 23 ,q 24 ,q 31 ,q 32 ,q 33 ,q 34 ,q 41 ,q 42 ,q 43 ,q 44}

[0148] As represented by Mathematical Expression 7, P^(0)(1) may be divided into three regions with a depth of 1, and a code may be assigned to each of the divided regions.

[0149] [Mathematical expression 7]

[0150] P 1 (1, 1) = {q 11 ,q 12 ,q 13 ,q 21 ,q 22 ,q 31},s 1 (1, 1) = 0

[0151] P 1 (1, 2) = {q 14 ,q 23 ,q 32 ,q 41}, s 1 (1, 2) = 10

[0152] P 1 (1,3)={q 24 ,q 33 ,q 34 ,q 42 ,q 43 ,q 44},s1 (1,3)=11

[0153] In addition, P^(1)(1,1) and P^(1)(1,3) can be divided into 2 regions with a depth of 2 and 3 regions with a depth of 2, respectively, as represented by Mathematical Expression 8 and each divided region can be assigned a code.

[0154] [Mathematical expression 8]

[0155] P 2 (1, 1, 1) = {q 11},s 2 (1, 1, 1) = 0

[0156] P 2 (1, 1, 2) = {q 12 ,q 21},s 2 (1, 1, 2) = 10

[0157] P 2 (1, 1, 3) = {q 13 ,q 22 ,q 31},s 2 (1, 1, 3) = 11

[0158] P 2 (1,3,1)={q 24 ,q 33 ,q 42},s 2 (1, 3, 1) = 0

[0159] P 2 (1,3,2)={q 34 ,q 43 ,q 44},s 2 (1,3,2)=1

[0160] Here, P^(1)(1,2), P^(2)(1,1,1), P^(2)(1,1,2), P^(2)(1,1,3), P^(2)(1,3,1), P^(2)(1,3,2) regions may correspond to leaf regions. Codes for positions of coefficients belonging to respective leaf regions may be allocated as represented by Mathematical Expression 9.

[0161] [Mathematical expression 9]

[0162] s(P 1 (1, 2), q 14 )=00,s(P 1 (1, 2), q 23 )=01,s(P1 (1, 2), q 32 )=10,s(P 1 (1, 2), q 41 )=11

[0163] s(P 2 (1, 1, 1), q 11 )=φ

[0164] s(P 2 (1, 1, 2), q 12 )=0,s(P 2 (1, 1, 2), q 21 )=1

[0165] s(P 2 (1, 1, 3), q 22 )=0,s(P 2 (1, 1, 3), q 13 )=10,s(P 2 (1, 1, 3), q 31 )=11

[0166] s(P 2 (1, 3, 1), q 33 )=0,s(P 2 (1, 3, 1), q 24 )10,s(P 2 (1, 3, 1), q 42 )11

[0167] s(P 2 (1, 3, 2), q 44 )=0,s(P 2 (1, 3, 2), q 34 )=10,s(P 2 (1, 3, 2), q 43 )=11

[0168] Here, the area P^(2)(1, 1, 1) is an area divided into pixel units, and a code for identifying a coefficient at a specific position in the corresponding area may not be assigned.

[0169] If codes are allocated as represented by Mathematical Expressions 7 to 9 and the last non-zero transform coefficient is located at q_34, the encoder / decoder can encode the position information of the last non-zero transform coefficient as represented by Mathematical Expression 10.

[0170] [Mathematical expression 10]

[0171]

[0172] In mathematical expression 10, the operator Cascade code.

[0173] The method proposed in this embodiment can be applied regardless of the size or shape of the transform block. That is, the method can be applied not only to the case where the current block is a square block, but also to the case where the current block is a non-square block or a block of any shape.

[0174] Example 3

[0175] In an embodiment of the present disclosure, the encoder / decoder may divide the position information of the last non-zero transform coefficient into a prefix and a suffix and perform binarization on it. For example, the encoder / decoder may represent the prefix as a truncated unary code and the suffix as a fixed-length code.

[0176] The encoder / decoder may divide the horizontal coordinate (i.e., x coordinate) and the vertical coordinate (i.e., y coordinate) of the last non-zero transform coefficient into a prefix and a suffix, respectively, and perform binarization on them. If the prefix is ​​represented as a truncated unary code and the suffix is ​​represented as a fixed-length code, the encoder / decoder may group the coordinate values ​​and assign a binary code to each group, as shown in Table 1.

[0177] [Table 1]

[0178]

[0179] When it is assumed that the coordinate values ​​in the current block are divided into N groups, the codes in Table 1 can be represented by a parameter set B_k represented by Mathematical Expression 11.

[0180] [Mathematical expression 11]

[0181] B k = {N, P1, ..., P N , S1,...,S N , C p (i, j)(1≤i≤N, 1≤j≤P i ), C s (i, j)(1≤i≤N, 1≤j≤S i )}

[0182] Here, P_i represents the length of the prefix code for group i. S_i represents the length of the suffix code for group i. P_i can be determined as represented by Mathematical Expression 12.

[0183] [Mathematical expression 12]

[0184]

[0185] In addition, S_i can satisfy S_i≥0.

[0186] The conventional coding method using context for each bin (ie, binary symbol) can be applied to both prefix codes and suffix codes. That is, in mathematical expression 11, C_(p)(i, i) indicates the context index of the jth bin (ie, binary symbol) in the prefix of group i. Here, 1≤i≤N, 1≤j≤P_i and C_(p)(i, j)≥0 may be satisfied. If the number of contexts is N_C and the context index starts at 1, the encoder / decoder may be configured to mean bypass coding when the context index value is 0.

[0187] In addition, in mathematical expression 11, C_(s)(i, j) indicates the context index of the jth bin in the suffix of group i. Here, 1≤i≤N, 1≤j≤S_i and C_(s)(i, j)≥0 may be satisfied. If the number of contexts is N_C and the context index starts from 1, the encoder / decoder may be configured to mean bypass coding when the context index value is 0.

[0188] All parameter sets supported in the encoder / decoder can be expressed as a set represented by Mathematical Expression 13 based on Mathematical Expression 11

[0189] [Mathematical expression 13]

[0190]

[0191] Referring to mathematical expression 13, the encoder / decoder can support A parameter set is used to code the position of the last non-zero transform coefficient. The aforementioned parameter set may be referred to as a coding parameter, a coding parameter set, a coding method, etc.

[0192] In an embodiment of the present disclosure, the encoder / decoder can be A specific parameter set is adaptively determined among the parameter sets in order to code the position of the last non-zero transform coefficient and the last non-zero transform coefficient is coded using the determined parameter set.

[0193] In order to adaptively determine a specific parameter set from among a plurality of parameter sets, the encoder / decoder may pre-store (or include) various parameter sets. In the following, parameter sets will be exemplified.

[0194] When assuming the case where the width or height of the current block is 128, the encoder / decoder may assign a code to the position of each pixel (or coefficient) in the current block, as shown in Table 2.

[0195] [Table 2]

[0196] Location Prefix suffix Suffix Range Truncated unary code Fixed length - 0 0 - - 1 10 - - 2 110 - - 3 1110 - - 4-5 11110 X 0 to 1 6-7 111110 X 0 to 1 8-11 1111110 XX 0 to 3 12-15 11111110 XX 0 to 3 16-23 111111110 XXX 0 to 7 24-31 1111111110 XXX 0 to 7 32-47 11111111110 XXXX 0 to 15 48-63 111111111110 XXXX 0 to 15 64-95 1111111111110 XXXXX 0 to 31 96-127 1111111111111 XXXXX 0 to 31

[0197] Referring to Table 2, the encoder / decoder may divide the width or height of the current block into horizontal groups or vertical groups. In addition, the encoder / decoder may map a prefix represented as a truncated unary code to each horizontal group (or vertical group). The encoder / decoder may map a suffix represented as a fixed-length code to the position of a coefficient in a horizontal group (or vertical group).

[0198] In this case, the encoder / decoder can encode the prefix in normal mode using the context, and encode the suffix in bypass mode not using the context.

[0199] Typically, the position of the last non-zero coefficient of a transform block in an image may have a trend. Therefore, this trend (i.e., bin generation probability) can be effectively reflected by applying a normal mode to prefix coding, and the simplification and parallelization of implementation can be improved by applying a bypass mode to suffix coding.

[0200] The encoder / decoder can map the code so that the suffix length increases from a relatively low group to greater than 0, and the suffix length increases faster in the subsequent groups, as shown in Table 3. And by configuring the code as described above, a state in which the last non-zero transform coefficient is often located in a high frequency area in a non-square transform block can be reflected, and coding efficiency can be improved.

[0201] [Table 3]

[0202]

[0203] In addition, as shown in Table 4, the encoder / decoder can map the code so that the suffix length increases from a relatively high group to greater than 0. By configuring the code in this manner, it is possible to reflect a state in which the last non-zero transform coefficient is often located in a low frequency region and the probability that the last non-zero transform coefficient is located in a relatively high frequency region is sharply reduced.

[0204] [Table 4]

[0205]

[0206] Additionally, as shown in Table 5, the encoder / decoder may configure the code so that the point at which the suffix length increases to greater than 0 is maintained and the suffix length starts at 2.

[0207] [Table 5]

[0208]

[0209] Furthermore, as shown in Table 6, the encoder / decoder may apply normal coding instead of bypass coding to the first bin of the suffix.

[0210] [Table 6]

[0211]

[0212] Assume a case where the parameter set (or coding method) shown by Table 1, Mathematical Expressions 12 and 13 has been preset (or stored) in the encoder / decoder. In this case, the encoder / decoder can encode the last non-zero transform coefficient using the changed parameter set while adaptively changing the parameter set.

[0213] In an embodiment, the encoder / decoder may determine a parameter set for the current block based on the probability distribution of the last non-zero transform coefficient.

[0214] For example, when the coordinate value range in the current block is 1 to W, the encoder / decoder may divide the range of 1 to W into M segments. Whenever the coordinate value of the last non-zero coefficient is coded, the encoder / decoder may accumulate the count value of the segment where the last non-zero coefficient is located. The encoder / decoder may determine the parameter set (or coding method) of the segment with the highest cumulative count value as the parameter set of the current block. Alternatively, the encoder / decoder may calculate (accumulate) the probability that the last non-zero transform coefficient is located in M ​​segments, and then determine the parameter set of the segment with the highest probability value. The encoder / decoder may code the position of the last non-zero transform coefficient of the current block using the determined parameter set.

[0215] Here, when calculating the probability of each segment, the encoder / decoder can reflect the statistical information of all previously coded transform units (i.e., TUs), or can reflect only the statistical information in the currently coded CTU (or maximum coding unit), or can reflect only the statistical information of the CTU (or a specific number of CTUs) at a specific position among the neighboring CTUs.

[0216] For example, the encoder / decoder may select a segment having a cumulative probability value or a cumulative count value greater than a specific threshold from among the M segments, and determine the parameter set of the selected segment as the parameter set for coding the last non-zero transform coefficient of the current block.

[0217] In addition, for example, when selecting as many specific sections as the number preset in the compilation process, compilation can be performed using the parameter set for the corresponding section. Here, the preset number can be set differently for the section.

[0218] In addition, the encoder / decoder can determine the parameter set of the current block by a state machine method that determines the parameter set as a state. For example, if the state corresponding to the segment k among the M segments is the current state, the encoder / decoder can set a counter variable for the low-frequency direction and a counter variable for the high-frequency direction for each state. When compiling a frequency side lower than the current segment (i.e., a segment with smaller coordinates), the encoder / decoder can increase the counter value for the low-frequency direction, and when compiling the high-frequency side (i.e., a segment with larger coordinates), the counter value in the high-frequency direction can be increased.

[0219] When the counter value for the low frequency direction or the high frequency direction reaches a specific threshold, the encoder / decoder may shift the current state to the low frequency direction or the high frequency direction according to the increased counter value. If the current segment has been encoded, the counter value for the low frequency direction and the counter value for the high frequency direction may be reduced. Alternatively, when the segment of the low frequency direction has been encoded, the encoder / decoder may increase the corresponding counter value and simultaneously reduce the counter value of the high frequency direction (or the low frequency direction).

[0220] In another embodiment, the above-mentioned parameter sets (or coding methods) represented by Table 1, Mathematical Expressions 12 and 13 may be differently applied according to various conditions (eg, quantization parameter, block size, block shape, and prediction mode).

[0221] For example, the encoder / decoder may apply different sets of parameters depending on the block size.

[0222] In addition, the encoder / decoder can apply different parameter sets according to the block shape. For example, the encoder / decoder can apply different parameter sets for squares, non-squares with longer widths, and non-squares with longer heights. In addition, for non-square blocks with a width-to-height ratio of 2:1, 4:1, 8:1, 1:2, 1:4, and 1:8, the encoder / decoder can apply different parameter sets. In addition, for non-square blocks where the width-to-height ratio is 2:1, the encoder / decoder can apply different parameter sets according to the block size (e.g., width and height are 8×4, 16×8, and 32×16).

[0223] Furthermore, in the case of non-square blocks, the encoder / decoder can apply different parameter sets to the width and height of the current block. For example, in the case of 8×4, 16×8, and 32×16 non-square blocks, the encoder / decoder can apply the same parameter set to the longer sides 16, 16, and 32, and the same parameter set to the shorter sides 8, 4, and 8.

[0224] In addition, the encoder / decoder can apply different parameter sets only to the longer or shorter sides of the width or height of non-square blocks. For example, in the case of 8×16, 16×4 and 32×8 blocks, the encoder / decoder can apply separate parameter sets to the longer sides 16, 16 and 32.

[0225] Any coding method other than the coding methods proposed in Table 1 and mathematical expressions 12 and 13 may be used as the above-mentioned method for adaptively changing the coding method and the method for applying different coding methods according to various conditions. In addition, the method for adaptively changing the coding method and the method for applying different coding methods according to various conditions may be applied independently or combined and applied. For example, when the coding method is adaptively changed using a state machine, the encoder / decoder may set different state machines according to specific conditions.

[0226] In one embodiment, when the horizontal coordinates and vertical coordinates of the last non-zero transform coefficient are independently coded, the encoder / decoder may be configured to separately share a context set for coding the horizontal coordinates and a context set for coding the vertical coordinates. Here, a context set refers to a set of parameters that can be used to determine a context, and may be referred to as a context, a context model, etc. In addition, the encoder / decoder may apply separate context sets to square blocks, non-square blocks having longer sides in the horizontal direction, and non-square blocks having longer sides in the vertical direction, and may apply separate context sets only to non-square blocks having a specific value of a width-to-height ratio.

[0227] Example 4

[0228] In an embodiment of the present disclosure, when the current block is a non-square block, the encoder / decoder may divide the current block into sub-regions, each sub-region consisting of a set of a specific number of pixels to facilitate encoding the position of the last non-zero transform coefficient. In this case, the specific number may be determined based on the ratio of the width to the height of the current block. This will be described with reference to the following figure.

[0229] Fig. 9 A method for encoding position information of a last non-zero transform coefficient using a superpixel is illustrated as an embodiment to which the present disclosure is applied.

[0230] refer to Fig. 9 , it will be described under the assumption that the current block is 16×4. Here, the encoder / decoder may divide the current block into super pixels. Here, a super pixel refers to a set of a specific number of pixels, and the specific number may be determined by the ratio of the width to the height of the current block. Since the ratio of the width to the height of the current block is 4, a super pixel may consist of 4 pixels.

[0231] That is, when the position of the last non-zero transform coefficient is coded for a non-square block, such as Fig. 9 As shown in , a superpixel can be composed of 4 pixels, so that the number of superpixels in the horizontal direction in the current block is the same as the number of superpixels in the vertical direction. With this configuration, the encoder / decoder can encode the last non-zero area in units of superpixels, and the position of the last non-zero coefficient can be encoded as an offset within the superpixel. For example, when the encoder / decoder encodes the last non-zero area in units of superpixels, the encoder / decoder can encode the last non-zero area using the same method as the conventional method used to encode the last non-zero coefficient of HEVC.

[0232] In addition, the encoder / decoder can encode the offset by various methods. For example, when a superpixel consists of 4 pixels, the encoder / decoder can assign codes of 00, 01, 10, and 11 to the positions of each pixel. In addition, the encoder / decoder can assign separate contexts to two bins in the assigned codes, and then apply conventional coding. In addition, the encoder / decoder can assign different contexts in the horizontal and vertical directions. In addition, the encoder / decoder can assign separate contexts for each block size. In another embodiment, the encoder / decoder can apply a superpixel-based coding method only when the ratio of width to height is a specific ratio (e.g., 1:2 or 2:1).

[0233] Example 5

[0234] Under certain conditions, the encoder / decoder may position the last non-zero transform coefficient within a limited region regardless of the block size. For example, when the width and height of the current block are equal to or greater than a specific value, the current block is a block coded using inter-frame prediction (or intra-frame prediction), or the product of the width and height of the current block is equal to or greater than a specific value (i.e., the number of pixels in the current block is equal to or greater than a specific number), the encoder / decoder may position the last non-zero transform coefficient within a limited region of the current block.

[0235] In this case, the encoder / decoder may assign a truncated unary prefix code to a limited area. For example, when it is guaranteed that the last non-zero transform coefficient exists only in a 32×32 area at the upper left of a non-square block of 64×128, the encoder / decoder may apply a truncated unary code limited to 31 to the horizontal and vertical coordinate values. In this case, the code 111111111 may be assigned instead of the code 1111111110 as the prefix of the segments 24 to 31 in Table 2.

[0236] The above-described Embodiments 1 to 5 may be applied independently, or a plurality of embodiments may be combined and applied.

[0237] Fig.10 is a flowchart illustrating a method for decoding position information of a last non-zero transform coefficient as an embodiment to which the present disclosure is applied.

[0238] The decoder decodes a syntax element indicating a last non-zero region from a bitstream (S1001). Here, the last non-zero region indicates a region including the last non-zero transform coefficient in a scanning order.

[0239] The decoder divides the current block into a plurality of sub-regions (S1002).

[0240] As described above, the decoder can divide the current block into a plurality of sub-regions by recursively dividing the current block into regions with smaller depths based on a predetermined partitioning method. In this case, the decoder can decode information indicating a region including the last non-zero transform coefficient at each lower depth.

[0241] As described above, the decoder may group the width of the current block into multiple horizontal groups, and may group the height of the current block into multiple vertical groups. In this case, the decoder may divide the current block into multiple sub-regions based on the horizontal group and the vertical group. In addition, the decoder may decode information about the horizontal group or the vertical group, which indicates the last non-zero region among the horizontal group or the vertical group.

[0242] In addition, as described above, the syntax element indicating the last non-zero region may be binarized using a truncated unary code, and the syntax element indicating the position of the last non-zero transform coefficient region may be binarized using a fixed length code. In addition, the syntax element indicating the last non-zero region may be decoded in a normal mode using a context, and the syntax element indicating the position of the last non-zero transform coefficient region may be decoded in a bypass mode not using a context.

[0243] In addition, as described above, the decoder can adaptively determine the parameter set applied to the current block from the pre-stored parameter set. Here, the parameter set may include at least one of a parameter indicating the number of horizontal groups or vertical groups, a parameter indicating the length of the code assigned to each group, and a parameter indicating the context index used for the code assigned to each group, as represented by mathematical expression 11. The decoder can adaptively determine the parameter set applied to the current block based on the probability distribution of the last non-zero transform coefficient.

[0244] In addition, as described above, when the current block is a non-square block, the decoder may divide the current block into a specific number of pixels determined by the ratio of the width to the height of the current block. In addition, when the last non-zero transform coefficient exists in a specific area of ​​the current block, the syntax element may be binarized using a truncated unary code allocated within the range of the specific area.

[0245] The decoder determines a last non-zero region of the current block among the sub-regions divided in step S1002 based on the syntax elements decoded in step S1001 ( S1003 ).

[0246] As described above, the encoder may signal the last non-zero transform coefficient in the last non-zero region to the decoder. Here, the decoder may decode index information indicating the position of the last non-zero transform coefficient in the last non-zero region of the current block.

[0247] Fig.11 An apparatus for decoding position information of a last non-zero transform coefficient is illustrated as an embodiment to which the present disclosure is applied.

[0248] refer to Fig.11 , decoding device implementation Figures 6 to 10 Specifically, the decoding device may include a syntax element decoding unit 1101, a sub-region segmentation unit 1102 and a last non-zero region determination unit 1103.

[0249] The syntax element decoding unit 1101 decodes a syntax element indicating a last non-zero region from a bitstream. Here, the last non-zero region indicates a region including the last non-zero transform coefficient in a scanning order.

[0250] The sub-region dividing unit 1102 divides the current block into a plurality of sub-regions.

[0251] As described above, the sub-region segmentation unit 1102 can divide the current block into a plurality of sub-regions by recursively dividing the current block into regions with smaller depths based on a predetermined partitioning method. In this case, the sub-region segmentation unit 1102 can decode information indicating a region including the last non-zero transform coefficient at each lower depth.

[0252] As described above, the sub-region segmentation unit 1102 may group the width of the current block into a plurality of horizontal groups, and may group the height of the current block into a plurality of vertical groups. In this case, the sub-region segmentation unit 1102 may divide the current block into a plurality of sub-regions based on the horizontal group and the vertical group. In addition, the last non-zero region determination unit 1103 may decode information about a horizontal group or a vertical group indicating the last non-zero region among the horizontal group or the vertical group.

[0253] In addition, as described above, the syntax element indicating the last non-zero region may be binarized using a truncated unary code, and the syntax element indicating the position of the last non-zero transform coefficient region may be binarized using a fixed length code. In addition, the syntax element indicating the last non-zero region may be decoded in a normal mode using a context, and the syntax element indicating the position of the last non-zero transform coefficient region may be decoded in a bypass mode not using a context.

[0254] In addition, as described above, the last non-zero area determination unit 1103 can adaptively determine the parameter set applied to the current block from the pre-stored parameter set. Here, the parameter set may include at least one of a parameter indicating the number of horizontal groups or vertical groups, a parameter indicating the length of the code assigned to each group, and a parameter indicating the context index used for the code assigned to each group, as represented by mathematical expression 11. The last non-zero area determination unit 1103 can adaptively determine the parameter set applied to the current block based on the probability distribution of the last non-zero transform coefficient.

[0255] In addition, as described above, when the current block is a non-square block, the sub-region partitioning unit 1102 may divide the current block into a specific number of pixels determined by the ratio of the width to the height of the current block. In addition, when the last non-zero transform coefficient exists in a specific region of the current block, the syntax element may be binarized using a truncated unary code allocated within the range of the specific region.

[0256] The last non-zero region determining unit 1103 determines the last non-zero region of the current block from among the divided sub-regions based on the decoded syntax elements.

[0257] As described above, the encoder may signal the last non-zero transform coefficient in the last non-zero region to the decoder. Here, the decoder may decode index information indicating the position of the last non-zero transform coefficient in the last non-zero region of the current block.

[0258] The syntax element decoding unit 1101, the sub-region segmentation unit 1102, and the last non-zero region determination unit 1103 may be configured by being organically combined to facilitate the execution of the method proposed in the present disclosure. For example, the syntax element decoding performed by the syntax element decoding unit 1101 and the division performed by the sub-region segmentation unit 1102 may be organically performed for each depth.

[0259] As described above, the embodiments described in the present disclosure may be implemented and executed in a processor, a microprocessor, a controller, or a chip. For example, Figures 1 to 4 The illustrated functional units may be implemented and executed in a computer, a processor, a microprocessor, a controller or a chip.

[0260] In addition, the decoder and encoder to which the present disclosure is applied may be included in multimedia broadcast sending / receiving devices, mobile communication terminals, home theater video devices, digital theater video devices, surveillance cameras, video conversation devices, real-time communication devices such as video communication devices, mobile streaming devices, storage media, portable cameras, VoD service providing devices, Internet streaming service providing devices, 3D video devices, video phone devices, medical video devices, etc., and may be used to process video signals and data signals.

[0261] In addition, the processing method of the present disclosure can be manufactured in the form of a program executed by a computer and stored in a computer-readable recording medium. Multimedia data with a data structure according to the present disclosure can also be stored in a computer-readable recording medium. A computer-readable recording medium may include various recording devices capable of storing computer-readable data. Examples of computer-readable recording media may include a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. In addition, the computer-readable recording medium also includes the implementation of a carrier type (e.g., transmission via the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or sent via a wired / wireless communication network.

[0262] [Industrial Applicability]

[0263] Exemplary aspects of the present disclosure have been described for illustrative purposes, and those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from essential characteristics of the disclosure.

Claims

1. A method for decoding a video signal, the method comprising: Check whether the coding block is divided into multiple transform blocks; Based on the coding block being divided into a plurality of transform blocks, determining a limited area in the coding block based on a width and a height of the transform block, wherein a last non-zero transform coefficient is located in the limited area; obtaining first information about the position of the last non-zero transform coefficient within the limited region, wherein the first information about the position of the last non-zero transform coefficient includes prefix information for a horizontal position and prefix information for a vertical position of the last non-zero transform coefficient; and decoding the transform block based on the position of the last non-zero transform coefficient, The first information is binarized based on a truncated unary code.

2. The method according to claim 1, further comprising: Obtain second information indicating the last non-zero region, wherein: The last non-zero region represents a region containing the last non-zero transform coefficient in the scanning order; Dividing the coding block into a plurality of sub-regions; as well as A last non-zero region of the coding block among the plurality of sub-regions is determined based on the second information.

3. The method according to claim 2, in, The second information includes information about a horizontal group or a vertical group indicating the last non-zero area among the horizontal groups or the vertical groups.

4. The method according to claim 1, in, The limited area is determined based on a width and a height of the transform block.

5. The method according to claim 1, further comprising Dividing the transform block into a plurality of sub-regions, in, grouping the widths of the transform blocks into a plurality of horizontal groups and grouping the heights of the transform blocks into a plurality of vertical groups, and Wherein, based on the multiple horizontal groups and the multiple vertical groups, the transform block is divided into the multiple sub-regions.

6. A method for encoding a video signal, the method comprising: Generate a transform block of the current block; generating first information about a position of a last non-zero transform coefficient in the transform block, wherein the first information about the position of the last non-zero transform coefficient comprises prefix information for a horizontal position and prefix information for a vertical position of the last non-zero transform coefficient; Dividing the transform block into a plurality of sub-regions; and Based on the transform block being divided into a plurality of sub-regions, a limited region in the transform block is determined based on a width and a height of the transform block, wherein the last non-zero transform coefficient is located in the limited region, The first information is binarized based on a truncated unary code.

7. A computer-readable medium storing image information, on which a computer program / instruction is stored, characterized in that: The computer program / instructions, when executed by a processor, implement the following steps: Generate a transform block of the current block; generating first information about a position of a last non-zero transform coefficient in the transform block, wherein the first information about the position of the last non-zero transform coefficient comprises prefix information for a horizontal position and prefix information for a vertical position of the last non-zero transform coefficient; Dividing the transform block into a plurality of sub-regions; and Based on the transform block being divided into a plurality of sub-regions, a limited region in the transform block is determined based on a width and a height of the transform block, wherein the last non-zero transform coefficient is located in the limited region, The first information is binarized based on a truncated unary code.

8. A method for transmitting data, wherein the data comprises a bit stream for an image, the method comprising: Acquire a bitstream for the image, wherein the bitstream is generated by performing the following steps: generating a transform block of a current block, generating first information about a position of a last non-zero transform coefficient in the transform block, wherein the first information about the position of the last non-zero transform coefficient includes prefix information for a horizontal position and prefix information for a vertical position of the last non-zero transform coefficient, dividing the transform block into a plurality of sub-regions, and determining a limited region in the transform block based on a width and a height of the transform block based on the transform block being divided into the plurality of sub-regions, wherein the last non-zero transform coefficient is located in the limited region, wherein the first information is binarized based on a truncated unary code; and Data including the bit stream is transmitted.

Citation Information

Patent Citations

  • Context determination for entropy coding of run-length encoded transform coefficients

    CN104272736A

  • Binarisation of last position for higher throughput

    US20130114667A1