Image encoding / decoding method and device

WO2026169019A1PCT designated stage Publication Date: 2026-08-13UNIVERSITY INDUSTRY COOPERATION GROUP OF KYUNG HEE UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2026-02-05
Publication Date
2026-08-13

Smart Images

  • Figure KR2026002183_13082026_PF_FP_ABST
    Figure KR2026002183_13082026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to an image encoding / decoding method and device. The image decoding method according to an embodiment of the present invention comprises the steps of: deriving an inverse-quantized transform coefficient of the current transform block; deriving a secondary inverse-transformed coefficient by performing a secondary inverse transform on the inverse-quantized transform coefficient; disposing the secondary inverse-transformed coefficient in a sub-block of the current transform block; and performing a primary inverse transform on the secondary inverse-transformed coefficient disposed in the sub-block, wherein the secondary inverse-transformed coefficient may be disposed in a partial region of the sub-block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method and device

[0001] The present invention relates to an image encoding / decoding method and apparatus, and more specifically, to an image encoding / decoding method and apparatus that improves the efficiency of secondary conversion.

[0002] Recently, the demand for multimedia data, such as video, has been increasing rapidly. In particular, the demand for high-resolution, high-quality video, such as HD (High Definition) and UHD (Ultra High Definition), is growing across various application fields. High-resolution, high-quality video data involves a much larger volume compared to conventional video data. Consequently, the transmission and storage costs for storing and / or transmitting such high-resolution, high-quality video data increase compared to conventional video data.

[0003] To solve these problems, high-efficiency video encoding / decoding technology for videos with higher resolution and quality is required.

[0004] To encode images, various techniques are used, such as intra-prediction techniques that predict pixel values ​​within the current picture using pixel information within the current picture, intra-prediction techniques that predict pixel values ​​from previous or subsequent pictures, transformation and quantization techniques to compress the energy of residual signals—the difference between the predicted signal and the original signal—and entropy coding techniques that assign short codes to values ​​with high frequency and long codes to values ​​with low frequency. Furthermore, to improve image encoding efficiency, various tools are being developed to implement each of these techniques. Additionally, to decode the encoded image, the image can be restored and reproduced through image decoding techniques that utilize technologies and tools corresponding to the image encoding techniques.

[0005] By utilizing these video encoding and video decoding technologies, video data can be effectively compressed, transmitted, stored, and played back.

[0006] The present disclosure aims to provide an image encoding / decoding method and apparatus that improves the inefficiency of primary and secondary conversion processes and enhances compression efficiency.

[0007] The technical problems to be solved by the present disclosure are not limited to those mentioned above. In addition, other technical problems not mentioned in the present disclosure will be clearly understood by those skilled in the art from the present disclosure.

[0008] An image decoding method according to one embodiment of the present invention comprises the steps of: deriving inverse quantized transform coefficients of a current transform block; performing a second inverse transform on the inverse quantized transform coefficients to derive second inverse transformed coefficients; placing the second inverse transformed coefficients in a sub-block of the current transform block; and performing a first inverse transform on the second inverse transformed coefficients placed in the sub-block, wherein the second inverse transformed coefficients may be characterized by being placed in a part region of the sub-block.

[0009] In the above image decoding method, the sub-block of the current conversion block may be characterized as being the upper-left sub-block among the sub-blocks divided into four from the current conversion block.

[0010] In the above image decoding method, the secondary inverse transformed coefficients may be characterized by being placed in a part of the lower block when the size of the current transformed block is greater than or equal to a predetermined size.

[0011] In the above image decoding method, a portion of the sub-block may be characterized as being determined as one of the predefined region candidates.

[0012] In the above image decoding method, the one region candidate may be characterized as being one of a rectangular region candidate including samples on the left, a rectangular region candidate including samples on the top, or a quadrant region candidate including samples on the left and top.

[0013] In the above image decoding method, one region candidate may be characterized by being determined based on information indicating one region candidate among the above-defined region candidates.

[0014] In the above image decoding method, one region candidate may be characterized by being determined based on the coding parameters of the current transformation block.

[0015] In the above image decoding method, the secondary inverse transformed coefficients may be characterized by being placed in a part of the sub-block according to the raster scan order.

[0016] In the above image decoding method, the secondary inverse transform coefficients may be characterized by being placed in a part of the sub-block according to a scan order determined based on the secondary inverse transform type.

[0017] In the above image decoding method, the value of the coefficient of the remaining area excluding a part of the lower block may be 0.

[0018] In the above image decoding method, the value of the coefficient of the remaining area excluding the lower block in the current conversion block may be 0.

[0019] A video encoding method according to one embodiment of the present invention comprises the steps of: deriving a first transformation coefficient by applying a first transformation to the residual of a current block; deriving a second transformation coefficient by applying a second transformation to the first transformation coefficient; placing the second transformation coefficient in a sub-block of the current transformation block; and quantizing the second transformation coefficient placed in the sub-block, wherein the second transformation coefficient may be characterized in that it is placed in a part of the sub-block.

[0020] A non-transient computer-readable recording medium storing a bitstream generated by an image encoding method according to an embodiment of the present invention can store a bitstream generated by an image encoding method, comprising the steps of: deriving a first-order transformation coefficient by applying a first-order transformation to the residual of a current block; deriving a second-order transformation coefficient by applying a second-order transformation to the first-order transformation coefficient; placing the second-order transformation coefficient in a sub-block of a current transformation block; and quantizing the second-order transformation coefficient placed in the sub-block, wherein the second-order transformation coefficient is placed in a part region of the sub-block.

[0021] A method for transmitting a bitstream generated by an image encoding method according to an embodiment of the present invention comprises the step of transmitting the bitstream, the step of deriving a second-order conversion coefficient by applying a second-order conversion to the first-order conversion coefficient, the step of placing the second-order conversion coefficient in a sub-block of a current conversion block, and the step of quantizing the second-order conversion coefficient placed in the sub-block, wherein the second-order converted coefficient is placed in a part region of the sub-block.

[0022] According to the present invention, an image encoding / decoding method and apparatus that improve compression efficiency by improving the inefficiency of the primary conversion and secondary conversion processes can be provided.

[0023] In addition, according to the present invention, a recording medium storing a bitstream generated by the image encoding method or device of the present invention may be provided.

[0024] The effects obtainable from the present invention are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art from the description below.

[0025] FIG. 1 is a block diagram showing an image encoding device according to one embodiment of the present invention.

[0026] FIG. 2 is a block diagram showing an image decoding device according to one embodiment of the present invention.

[0027] FIG. 3 is a schematic diagram showing a video coding system to which the present invention can be applied.

[0028] FIG. 4 is a diagram illustrating an exemplary content streaming system to which an embodiment according to the present invention can be applied.

[0029] FIG. 5 is a diagram illustrating one embodiment of a method for encoding residual coefficients.

[0030] FIG. 6 is a diagram illustrating an example of a method for arranging residual coefficients in the process of converting residual coefficients.

[0031] FIG. 7 is a diagram illustrating one embodiment of a method for decoding residual coefficients.

[0032] FIG. 8 is a diagram illustrating an example of a method for arranging conversion coefficients in the decoding process of conversion coefficients.

[0033] FIG. 9 is a diagram illustrating an example of a process for changing the arrangement of transformation coefficients according to a second inverse transformation according to an embodiment of the present disclosure.

[0034] FIG. 10 is a drawing illustrating an embodiment of a secondary inverse transformation method according to an embodiment of the present disclosure.

[0035] FIG. 11 is a drawing illustrating an embodiment of a secondary inverse transformation method according to an embodiment of the present disclosure.

[0036] FIG. 12 is a drawing illustrating an embodiment of a secondary inverse transformation method according to an embodiment of the present disclosure.

[0037] FIG. 13 is a drawing illustrating an embodiment of a secondary conversion method according to an embodiment of the present disclosure.

[0038] FIG. 14 is a drawing illustrating an embodiment of a secondary conversion method according to an embodiment of the present disclosure.

[0039] FIG. 15 is a drawing illustrating an embodiment of a secondary conversion method according to an embodiment of the present disclosure.

[0040] FIG. 16 is a flowchart illustrating an image decoding method according to one embodiment of the present disclosure.

[0041] FIG. 17 is a flowchart illustrating an image encoding method according to one embodiment of the present disclosure.

[0042] The present invention is susceptible to various modifications and may have various embodiments; specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the invention to specific embodiments, and it should be understood that the invention includes all modifications, equivalents, and substitutions that fall within the spirit and scope of the invention. Similar reference numerals have been used for similar components in the description of each drawing.

[0043] Terms such as "first," "second," etc., may be used to describe various components, but said components should not be limited by said terms. These terms are used solely for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be named the second component, and similarly, the second component may be named the first component. The term "and / or" includes a combination of a plurality of related described items or any of a plurality of related described items.

[0044] When it is stated that one component is "connected" or "connected" to another component, it should be understood that while it may be directly connected or connected to that other component, there may also be other components in between. On the other hand, when it is stated that one component is "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between.

[0045] The terms used in this application are used merely to describe specific embodiments and are not intended to limit the invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, terms such as "comprising" or "having" are intended to specify the presence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.

[0046] Hereinafter, embodiments of the present invention will be described in detail with reference to the attached drawings. Hereinafter, the same reference numerals are used for identical components in the drawings, and redundant descriptions of identical components are omitted.

[0047] FIG. 1 is a block diagram showing an image encoding device according to one embodiment of the present invention.

[0048] Referring to FIG. 1, the image encoding device (100) may include an image segmentation unit (101), an intra prediction unit (102), an inter prediction unit (103), a subtraction unit (104), a conversion unit (105), a quantization unit (106), an entropy encoding unit (107), an inverse quantization unit (108), an inverse conversion unit (109), an addition unit (110), a filter unit (111), and a memory (112).

[0049] Each component shown in FIG. 1 is depicted independently to represent different characteristic functions of the image encoding device and does not imply that each component consists of separate hardware or a single software unit. That is, each component is listed and included as a separate component for the convenience of explanation, but at least two of the components may be combined to form a single component, or a single component may be divided into multiple components to perform functions, and such integrated and separated embodiments of each component are included within the scope of the present invention as long as they do not deviate from the essence of the present invention.

[0050] Furthermore, some components may not be essential components performing an essential function in the present invention, but merely optional components for enhancing performance. The present invention may be implemented by including only the components essential for realizing the essence of the present invention, excluding components used solely for performance enhancement, and a structure including only the essential components, excluding optional components used solely for performance enhancement, is also included within the scope of the rights of the present invention.

[0051] The image segmentation unit (101) can divide the input image into at least one block. At this time, the input image or frame can be divided into tiles. The tiles are divided into superblocks having a predetermined size, and each superblock can be divided into blocks. The image segmentation unit (101) can recursively divide the superblock into blocks. Here, the superblock can be divided into 2 or 4 vertically or horizontally, or recursively divided into 4. Alternatively, the superblock can be divided once in the vertical and horizontal directions, respectively, into three blocks. In addition, the image segmentation unit (101) can divide the blocks into units of transform blocks, which are units of transformation and / or prediction.

[0052] The prediction unit (102, 103) may include an intra prediction unit (102) that performs intra prediction and an inter prediction unit (103) that performs inter prediction. The prediction unit (102, 103) may determine whether to use intra prediction or perform inter prediction for a prediction unit. Additionally, the prediction unit (102, 103) may determine specific information (e.g., intra prediction mode, inter prediction mode, motion vector, reference picture, etc.) according to the determined prediction method. At this time, the processing unit in which the prediction is performed and the processing unit in which the prediction method and specific details are determined may be different. For example, the prediction unit (102, 103) may determine the prediction method and prediction mode, etc. for each prediction unit and perform prediction according to the transformation unit.

[0053] According to another embodiment, the prediction unit may encode an input image using a third mode other than the intra mode and the inter mode (e.g., IBC (intra block copy), Palette mode, etc.). However, if the third mode has functional characteristics similar to the intra mode or the inter mode, the third mode may be classified as the intra mode or the inter mode. In this disclosure, the third mode will be described only when a specific description of the third mode is required.

[0054] The intra prediction unit (102) can generate a prediction block of the current block based on the intra prediction mode of the current block and reference pixel information around the current block, which is pixel information within the current picture. If the surrounding blocks of the current block are predicted by inter prediction, the reference pixels included in the inter-predicted surrounding blocks can be replaced with reference pixels in other surrounding blocks that are intra-predicted. That is, if a reference pixel is not available, the intra prediction unit (102) can perform intra prediction of the current block by replacing the unavailable reference pixel with at least one of the available reference pixels.

[0055] The intra prediction modes used for intra prediction may include a directional prediction mode that uses reference pixel information according to the prediction direction, a non-directional mode that does not use directional information, Recursive Intra prediction (RIP), and Paeth intra prediction modes. Additionally, the mode for predicting luminance information and the mode for predicting chrominance information may be different, and the intra prediction mode information of the luminance component block or the predicted luminance signal information may be utilized to predict chrominance information.

[0056] In particular, when the current block is a block of chroma components, the intra prediction unit (102) can perform chroma intra prediction based on the CFL (chroma from luma) mode using a lumina block corresponding to the current block. In particular, the intra prediction unit (102) can generate an intra prediction block for the current block by performing a cross component prediction (CCP) using at least one of a corresponding lumina block, a block adjacent to the corresponding lumina block, and a block adjacent to the chroma block. Here, the cross component prediction may be a multi-hypothesis cross component prediction (CCP).

[0057] The intra prediction unit (102) may perform filtering on a reference sample or a prediction pixel. According to one embodiment, the intra prediction unit (102) may perform filtering on a reference sample according to the prediction mode, size, and / or shape of the current prediction unit and generate a prediction sample using the filtered reference sample. According to another embodiment, the intra prediction unit (102) may generate a prediction sample and generate a filtered prediction sample by performing filtering on the prediction sample according to the prediction mode, size, and / or shape of the current prediction unit. The intra prediction unit (102) may determine whether to perform filtering and / or the intensity of filtering based on at least one of the prediction mode, size, shape, and encoding parameters of the current prediction unit.

[0058] The inter prediction unit (103) generates a prediction block using the previously restored reference image stored in memory (112), the inter block mode, the inter prediction mode, and motion information. Here, inter prediction may mean motion prediction or motion compensation.

[0059] Motion information may include, for example, motion vector stack information containing motion vector candidates, reference picture information, reference picture list indicators, motion compensation mode information, etc. Here, motion vector candidates may be motion vectors obtained as a result of performing spatial motion vector prediction and temporal motion vector prediction. Spatial motion vector prediction and temporal motion vector prediction may be performed dynamically.

[0060] The inter prediction unit (103) can perform motion vector prediction (MVP) to perform motion prediction and / or motion compensation, and apply a simple inter prediction mode, OBMC (Overlapped Block Motion Compensation), and a local warp mode using modified motion information based on an affine model to the encoding unit to perform motion prediction and / or motion compensation for the prediction unit.

[0061] Alternatively, the inter prediction unit (103) may perform motion prediction and / or motion compensation for the prediction unit by applying a compound prediction mode that synthesizes different prediction values. For example, the inter prediction unit (103) may perform motion prediction and / or motion compensation for the prediction unit by applying Compound Wedge Prediction, Frame distance based compound prediction, Inter-Intra Prediction, etc.

[0062] A residual block containing residual information, which is the difference value between the prediction unit generated in the prediction unit (102, 103) and the original block of the prediction unit, can be generated. The generated residual block can be input to the conversion unit (130) and converted.

[0063] The subtraction unit (104) subtracts the prediction block generated by the intra prediction unit (102) or the inter prediction unit (103) from the block currently to be encoded to generate a residual block of the current block. The residual (residual block) between the generated prediction block and the original block can be input to the conversion unit (105).

[0064] In addition, the prediction mode information and motion vector information used for prediction can be encoded in the entropy encoding unit (107) along with the residual value and transmitted to the decoder. When a specific encoding mode is used, it is also possible to encode the original block as is and transmit it to the decoder without generating a prediction block through the prediction unit (102, 103).

[0065] The transformation unit (105) can perform a transformation on a residual block containing residual data to generate and output a transformation coefficient. Here, the transformation coefficient may be a coefficient value generated by performing a transformation on the residual block. If there is no residual data, the transformation unit (105) may omit the transformation.

[0066] The conversion unit (105) can determine a conversion type and a conversion kernel based on at least one of coding parameters such as the size of the conversion block, color component, and prediction mode, and perform a conversion on the conversion block using the determined conversion type and conversion kernel.

[0067] According to one embodiment, the transformation unit (105) can perform a transformation using a transformation type and a transformation kernel according to at least one of DCT (Discrete Cosine Transform), ADST (Asymmetric Discrete Sine Transform), IDTX (Identity Transform), and WHT (Walsh Hadamard Transform). That is, the transformation unit (105) can derive a transform coefficient using a transformation type and a transformation kernel determined in a transformation block. The transform coefficient derived using a transformation type and a transformation kernel according to at least one of DCT, ADST, IDTX, and WHT can be referred to as a first-order transform coefficient. Additionally, the transformation unit (105) can derive a second-order transform coefficient by applying a second-order transform to the first-order transform coefficient. Furthermore, the transformation unit can rearrange the second-order transform coefficient according to a predetermined scan direction.

[0068] The quantization unit (106) can quantize the conversion coefficient or residual signal converted into the frequency domain by the conversion unit (105) according to a quantization parameter (QP). The quantization parameter may vary depending on the block or the importance of the image. The value calculated by the quantization unit (106) may be provided to the inverse quantization unit (108) and the entropy encoding unit (107).

[0069] The above-mentioned conversion unit (105) and / or quantization unit (106) may be optionally included in the image encoding device (100). That is, the image encoding device (100) may perform at least one of conversion or quantization on the residual data of the residual block, or may encode the residual block by skipping both conversion and quantization. Even if neither conversion nor quantization is performed in the image encoding device (100), or if neither conversion nor quantization is performed, the block that enters as input to the entropy encoding unit (107) is typically referred to as a conversion block.

[0070] The entropy encoding unit (107) can generate and output a bitstream by performing entropy encoding according to a probability distribution on values ​​output by the quantization unit (106), coding parameter values ​​output during the encoding process, information for decoding an image, etc. Here, the information for decoding an image may include syntax elements, etc.

[0071] Coding parameters may include information (flags, indexes, etc.) that is encoded in the encoding device (100) and signaled to the decoding device (200), such as syntax elements, as well as information derived during the encoding process or decoding process, and may refer to information required when encoding or decoding images.

[0072] The entropy encoding unit (107) can encode various information such as coefficient information of a transformation block, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information. The entropy encoding unit (107) can apply arithmetic coding to multiple symbols. In addition, the entropy encoding unit (107) can encode coefficients based on multiple levels. Here, the entropy encoding unit (107) can use an exponential Golomb coding method.

[0073] The inverse quantization unit (108) and the inverse transformation unit (109) can inverse quantize the values ​​quantized in the quantization unit (106) and inverse transform the values ​​transformed in the transformation unit (105). The residual value generated in the inverse quantization unit (108) and the inverse transformation unit (109) can be combined with the prediction unit predicted through the motion estimation unit, motion compensation unit, and intra prediction unit (102) included in the prediction unit (102, 103) to generate a reconstructed block. The addition unit (110) generates a reconstructed block by adding the prediction block generated in the prediction unit (102, 103) and the residual block generated through the inverse transformation unit (109).

[0074] The filter section (111) can apply edge loop filter, adaptive loop filter (ALF), CDEF (Constrained Directional Enhancement Filter), loop restoration filter, etc., to a restored sample, restored block, or restored image as a whole or part of the filtering technique.

[0075] The memory (112) can store a restored block or picture calculated through the filter unit (111). The memory (112) may include a reference picture buffer. Additionally, the stored restored block or picture in the memory (112) may be provided to the prediction unit (102, 103) when performing inter-prediction.

[0076] Next, an image decoding device according to one embodiment of the present invention will be described with reference to the drawings.

[0077] FIG. 2 is a block diagram showing an image decoding device (200) according to one embodiment of the present invention.

[0078] Referring to FIG. 2, the image decoding device (200) may include an entropy decoding unit (201), an inverse quantization unit (202), an inverse transformation unit (203), a prediction unit (204, 205), an adder unit (206), a filter unit (207), and a memory (208).

[0079] The video decoding device (200) can receive a bitstream output by the video encoding device (100). The video decoding device (200) can receive a bitstream stored in a computer-readable recording medium or receive a bitstream stream streamed through a wired / wireless transmission medium. The video decoding device (200) can decode the bitstream to generate a restored video or a decoded video, and can output the restored video or the decoded video.

[0080] The entropy decoding unit (201) can generate symbols by performing entropy decoding according to the probability distribution of the bitstream. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be the inverse process of the entropy encoding method described above.

[0081] The entropy decoding unit (201) can convert a one-dimensional vector-shaped coefficient into a two-dimensional block-shaped coefficient through a conversion coefficient scanning method to decode a conversion coefficient level (quantized level).

[0082] The entropy decoding unit (201) can perform entropy decoding in the opposite procedure to that which the entropy encoding unit (107) of the image encoding device (100) performed entropy encoding. For example, the entropy decoding unit (201) can perform entropy decoding by applying a method such as multi-level arithmetic encoding, exponential colom, etc., corresponding to the method performed in the image encoder.

[0083] The entropy decoding unit (201) can obtain various information such as coefficient information of a conversion block as described above, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information by decoding.

[0084] The inverse quantization unit (202) generates a conversion block by performing inverse quantization on the quantized conversion block. The inverse quantization unit (202) operates substantially the same as the inverse quantization unit (108) of FIG. 1.

[0085] The inverse transformation unit (203) performs an inverse transformation on the transformation block to generate a residual block. At this time, the transformation method may be determined based on information regarding the prediction method (inter or intra prediction), the size and / or shape of the block, the intra prediction mode, etc. The inverse transformation unit (203) operates substantially the same as the inverse transformation unit (109) of FIG. 1.

[0086] The prediction unit (204, 205) can generate a prediction block based on the prediction block generation information provided by the entropy decoding unit (201) and the previously decoded block or picture information provided by the memory (208).

[0087] The prediction unit (204, 205) may include an intra prediction unit (204) and an inter prediction unit (205). The prediction unit (204, 205) receives various information, such as prediction unit information input from the entropy decoding unit (201), prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, distinguishes the prediction unit from the current encoding unit, and determines the prediction mode of the prediction unit.

[0088] The intra prediction unit (204) can generate a prediction block of the current block based on the intra prediction mode of the current block and reference pixel information around the current block, which is pixel information within the current picture.

[0089] The intra prediction mode used for intra prediction may be one of the directional prediction mode, non-directional mode, RIP, or Paeth intra prediction mode. Additionally, the mode for predicting luminance information and the mode for predicting chrominance information may be different, and the intra prediction mode information of the luminance component block or the predicted luminance signal information may be utilized to predict chrominance information.

[0090] According to one embodiment, the intra prediction unit (204) may perform filtering on a reference sample and generate a prediction sample using the filtered reference sample. Alternatively, the intra prediction unit (204) may generate a prediction sample and perform filtering on the prediction sample to generate a filtered prediction sample. Here, whether filtering is applied and the strength of filtering application may be determined based on at least one of the prediction mode, size, shape, and encoding parameter of the current prediction unit.

[0091] The intra prediction unit (204) operates substantially the same as the intra prediction unit (102) of FIG. 1.

[0092] The inter prediction unit (205) can perform inter prediction for the current prediction unit based on information included in at least one of the previous or subsequent pictures of the current picture containing the current prediction unit, using information required for inter prediction of the current prediction unit provided by the video encoding device (100). Alternatively, it may perform inter prediction based on information of a partially restored area within the current picture containing the current prediction unit. The inter prediction unit (205) generates a prediction block using a reference image, an inter prediction mode, and motion information. Here, inter prediction may mean motion compensation.

[0093] Motion information may include, for example, motion vector stack information including motion vector candidates, reference picture information, reference picture list indicator, motion compensation mode information, etc.

[0094] The inter prediction unit (205) can operate substantially the same as the inter prediction unit (103) of FIG. 1.

[0095] The adder (206) generates a restoration block by adding the prediction block generated in the intra prediction unit (204) or the inter prediction unit (205) and the residual block generated through the inverse transformation unit (203). It operates substantially the same as the adder (110) of FIG. 1.

[0096] The filter section (207) can reduce various types of noise occurring in the restored blocks. The filter section (207) may include an edge loop filter, an adaptive loop filter (ALF), a CDEF (Constrained Directional Enhancement Filter), a loop restoration filter, etc.

[0097] The filter unit (207) may receive information regarding whether each filter is applied, information regarding the filter strength, etc. from the image encoding device (100). The filter unit (207) of the image decoding device (200) may receive filter-related information provided by the image encoding device (100) and perform filtering on the corresponding block in the image decoding device (200).

[0098] The filter section (207) can operate substantially the same as the filter section (111) of FIG. 1.

[0099] The memory (208) can store a restoration block generated by the adder (206). For example, the memory (208) may include a reference picture buffer. The memory (208) may operate substantially the same as the memory (112) of FIG. 1.

[0100]

[0101] FIG. 3 is a schematic diagram showing a video coding system to which the present invention can be applied.

[0102] A video coding system according to one embodiment may include an encoding device (10) and a decoding device (20). The encoding device (10) may transmit encoded video and / or image information or data to the decoding device (20) via a digital storage medium or network in the form of a file or streaming.

[0103] An encoding device (10) according to one embodiment may include an image generation unit (11), an encoding unit (12), and a transmission unit (13). A decoding device (20) according to one embodiment may include a receiving unit (21), a decoding unit (22), and an image playback unit (23). The encoding unit (12) may be called a video / image encoding unit, and the decoding unit (22) may be called a video / image decoding unit. The transmission unit (13) may be included in the encoding unit (12). The receiving unit (21) may be included in the decoding unit (22). The image playback unit (23) may include a display unit, and the display unit may be composed of a separate device or an external component.

[0104] The image generation unit (11) can acquire video / image through a process of capturing, synthesizing, or generating video / image. The image generation unit (11) may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / image, etc. The video / image generation device may include, for example, a computer, a tablet, and a smartphone, etc., and can generate video / image (electronically). For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process of generating related data.

[0105] The encoding unit (12) can encode the input video / image. The encoding unit (12) can perform a series of procedures such as prediction, conversion, and quantization for compression and encoding efficiency. The encoding unit (12) can output the encoded data (encoded video / image information) in the form of a bitstream. The detailed configuration of the encoding unit (12) can be configured in the same way as the encoding device (100) of FIG. 1 described above.

[0106] The transmission unit (13) can transmit encoded video / image information or data output in the form of a bitstream to the receiving unit (21) of the decoding device (20) via a digital storage medium or network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit (13) may include elements for creating a media file through a predetermined file format and elements for transmission via a broadcasting / communication network. The receiving unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).

[0107] The decoding unit (22) can decode a video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding unit (12). The detailed configuration of the decoding unit (22) can be configured in the same way as the decoding device (200) of FIG. 2 described above.

[0108] The image playback unit (23) can render the decoded video / image. The rendered video / image can be displayed through the display unit.

[0109]

[0110] FIG. 4 is a diagram illustrating an exemplary content streaming system to which an embodiment according to the present invention can be applied.

[0111] As illustrated in FIG. 4, a content streaming system to which an embodiment of the present invention is applied may largely include a multimedia input device, a media storage, an encoding server, a streaming server, a web server, and a user device.

[0112] The above encoding server plays the role of compressing content input from multimedia input devices, such as smartphones, cameras, and CCTVs, into digital data to generate a bitstream and transmitting it to the above streaming server. Alternatively, the encoding server plays the role of compressing content previously stored in a media storage into digital data to generate a bitstream and transmitting it to the above streaming server.

[0113] As another example, when multimedia input devices such as smartphones, cameras, and CCTVs directly generate bitstreams, the encoding server may be omitted.

[0114] The bitstream above may be generated by a video encoding method and / or video encoding device to which an embodiment of the present invention is applied, and the streaming server may temporarily or non-temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0115] The streaming server transmits multimedia data to a user device based on a user request through a web server, and the web server can act as a medium to inform the user of available services. When a user device requests a desired service from the web server, the web server forwards it to the streaming server, and the streaming server can transmit multimedia data to the user device. At this time, the content streaming system may include a separate control server, and in this case, the control server can perform the role of controlling commands and responses between each device within the content streaming system.

[0116] The streaming server can receive content from a media storage and / or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a seamless streaming service, the streaming server can store the bitstream for a certain period of time.

[0117] Examples of the above user devices may include mobile phones, smartphones, laptop computers, digital broadcasting terminals, PDAs (personal digital assistants), PMPs (portable multimedia players), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs (head-mounted displays)), digital TVs, desktop computers, digital signage, etc.

[0118] Each server within the above-mentioned content streaming system can be operated as a distributed server, and in this case, data received from each server can be processed in a distributed manner.

[0119]

[0120] In video coding standards, transformation techniques are used during the video encoding and decoding processes. A transformation technique converts residual values ​​in the pixel domain into the frequency domain and encodes the residual values ​​in the frequency domain.

[0121] Furthermore, the latest video coding standard specifications define a secondary transformation process that improves compression efficiency by performing additional transformations primarily on blocks with strong low-frequency components, complementing existing transformation techniques such as the Discrete Cosine Transform (DCT) and Discrete Sine Transform (DST).

[0122] Compression efficiency can be improved by performing an additional quadratic transformation process. However, since additional computations are performed during the quadratic transformation, the complexity of the transformation process increases and delays may occur.

[0123] In particular, to perform a quadratic transformation, it may be additionally necessary to change the scan order of the coefficients transformed in the first stage and to change the scan order of the coefficients transformed in the second stage. The process of changing the scan order can cause additional delays and may lead to throughput issues.

[0124] Accordingly, the present disclosure proposes a method for improving the scan order change method of coefficients performed before and after a quadratic transformation process. Through the method proposed in the present disclosure, the delay of the transformation process can be reduced.

[0125]

[0126] First, the method for encoding residual coefficients is explained below.

[0127] FIG. 5 is a diagram illustrating an example of a method for encoding residual coefficients. The method for encoding residual coefficients of FIG. 5 can be performed by an image encoding device.

[0128] Referring to FIG. 5, in step S510, the image encoding device can apply a first transformation to the residual coefficients to generate first transformation coefficients.

[0129] In step S520, the video encoding device can generate secondary transformation coefficients by applying a secondary transformation to the primary transformation coefficients.

[0130] In step S530, the video encoding device can generate quantized coefficients by applying quantization to the secondary transform coefficients.

[0131] And, in step S540, the video encoding device can generate a bitstream by entropy coding the quantized coefficients.

[0132]

[0133] During the encoding process of residual coefficients, the arrangement order of the residual coefficients may change during the first and second transformation processes. Below, the arrangement method of residual coefficients is explained in the transformation processes applied to the residual coefficients.

[0134]

[0135] FIG. 6 is a diagram illustrating an example of a method for arranging residual coefficients in the process of converting residual coefficients.

[0136] First, the video encoding device can generate a residual block for the current block. Then, the encoding device can generate primary transformation coefficients by applying a primary transformation to the residual block. The primary transformation coefficients can be placed in the transformation block according to the raster scan order.

[0137] Prior to applying the quadratic transformation, the image encoding device may rearrange the primary transformation coefficients on the transformation block. For example, the image encoding device may rearrange the primary transformation coefficients arranged according to the raster scan order according to the scan order set during the quadratic transformation process. For example, the scan order set during the quadratic transformation process may be a 4x4-based zigzag scan order, an 8x8-based zigzag scan order, etc. Here, the primary transformation coefficients may be arranged in a secondary array form.

[0138] The video encoding device can rearrange primary transform coefficients arranged in a secondary array form into a primary array form according to the scan order defined in the primary transform process. The video encoding device can generate secondary transform coefficients by applying a secondary transform to the primary transform coefficients in the primary array form. Here, the secondary transform coefficients can be generated in a primary array form.

[0139] In addition, the video encoding device can rearrange the secondary transformation coefficients in the form of a primary array into a secondary array according to the scan order related to the primary transformation process. For example, the scan order related to the primary transformation process may be a default scan order, a horizontal scan order, or a vertical scan order.

[0140] In the quantization and entropy encoding process, the quadratic transform coefficients arranged according to the scan order defined in the quadratic transform can be rearranged according to the diagonal scan order.

[0141]

[0142] Meanwhile, the method for decoding residual coefficients is explained below.

[0143] FIG. 7 is a diagram illustrating one embodiment of a method for decoding residual coefficients.

[0144] Referring to FIG. 7, in step S710, the image decoder applies entropy decoding to the bitstream to derive quantized coefficients.

[0145] In step S720, the image decoder can apply inverse quantization to the quantized coefficients. As a result of the inverse quantization, a quadratic transform coefficient can be derived.

[0146] In step S730, the image decoder may apply an inverse quadratic transformation to the quadratic transformation coefficients. As a result of the inverse quadratic transformation, the quadratic transformation coefficients may be derived.

[0147] In step S740, the image decoder may apply an inverse-first-order transformation to the first-order transformation coefficients. Residual coefficients may be generated as a result of the inverse-first-order transformation.

[0148]

[0149] Meanwhile, during the decoding process, the transformation coefficients can be arranged in the following order.

[0150]

[0151] FIG. 8 is a diagram illustrating an example of a method for arranging conversion coefficients in the decoding process of conversion coefficients.

[0152] First, in the entropy decoding and inverse quantization process, inverse quantized transform coefficients can be generated. The inverse quantized transform coefficients can be arranged in a diagonal scan order. Here, the inverse quantized transform coefficients can be quadratic transform coefficients and can be coefficients arranged in a first-order array form. Then, the inverse quantized transform coefficients can be rearranged into a second-order array form according to the diagonal scan order.

[0153] The quadratic transformation coefficients can be rearranged according to the changed order prior to applying the quadratic inverse transformation. The quadratic transformation coefficients arranged according to the diagonal scan order can be arranged in a linear array form according to the scan order related to the linear transformation process. For example, the scan order related to the linear transformation process may be the default scan order, the horizontal scan order, or the vertical scan order.

[0154] Linear transformation coefficients can be generated by applying an inverse quadratic transformation to the quadratic transformation coefficients in the form of a linear array. The linear transformation coefficients can be generated in the form of a linear array.

[0155] The first transformation coefficients in the form of a first array can be rearranged according to the scan order set during the second transformation process. For example, the scan order set during the second transformation process may be a 4x4-based zigzag scan order, an 8x8-based zigzag scan order, etc. Here, the first transformation coefficients can be arranged in the form of a second array.

[0156] Additionally, the primary transformation coefficients arranged in a secondary array form can be rearranged according to the changed order prior to applying the primary inverse transformation. The primary transformation coefficients arranged according to the scan order set during the secondary transformation process can be rearranged according to the raster scan order. Furthermore, the primary inverse transformation is applied to the primary transformation coefficients to generate residual coefficients. The residual coefficients may be coefficients arranged according to the raster scan order.

[0157]

[0158] However, for the second transformation process or the second inverse transformation process, the scan order of the transformation coefficients may be changed multiple times. For example, prior to the second transformation of the encoding process, the first transformation coefficients arranged according to the raster scan order may be rearranged according to the scan order set during the second transformation process. And, the second transformation coefficients generated as a result of performing the second transformation and arranged according to the scan order set during the second transformation process may be arranged in a second array form according to the scan order related to the first transformation process.

[0159] Meanwhile, prior to the secondary inverse transform of the decoding process, the secondary transform coefficients arranged according to the diagonal scan order can be arranged in a primary array form according to the scan order related to the primary transform process. Furthermore, the primary transform coefficients generated as a result of performing the secondary inverse transform and arranged according to the scan order set in the primary transform process can be rearranged according to the scan order set in the secondary transform process. Additionally, the primary inverse transform is applied to the primary transform coefficients to generate residual coefficients. The residual coefficients arranged according to the scan order set in the secondary transform process can be rearranged according to the raster scan order.

[0160] The process of changing the scan order of transformation coefficients can be performed in block units. Therefore, the scan order change process causes processing delays and can significantly affect throughput.

[0161] Accordingly, the present disclosure may provide a method for eliminating the process of changing the scan order of coefficients by applying a coefficient-aware technique to identify changes in the position of coefficients during the processing stage and changing the order of the quadratic transformation / inverse transformation matrices. Thus, the processing efficiency of the transformation process may be improved.

[0162]

[0163] Below, we explain the inverse coefficient transformation method based on the information of the first and second transformation coefficients.

[0164] The transform coefficients parsed from the entropy decoding results can be placed in a buffer according to the diagonal scan order. Then, the transform coefficients can be converted into residual coefficients through second-order inverse transform and first-order inverse transform processes. The residual coefficients can be placed in a buffer based on the raster scan.

[0165] To eliminate the process of changing the scan order of residual coefficients during the second-order and first-order inverse transforms, the correlation between the order and / or position of the transformed coefficients parsed after entropy coding and the order and / or position of the finally derived coefficients can be utilized. To derive this correlation, the process of changing the order of coefficients according to the transform process may be as described below.

[0166]

[0167] FIG. 9 is a diagram illustrating an example of a process for changing the arrangement of transformation coefficients according to a second inverse transformation according to an embodiment of the present disclosure.

[0168] Referring to FIG. 9, the entropy-decoded and parsed transformation coefficients can be mapped into a secondary array form in a buffer according to the diagonal scan order. The transformation coefficients can also be mapped into a primary array form according to the scan order set during the primary transformation process. For example, the scan order set during the primary transformation process may be a default scan order, a horizontal scan order, or a vertical scan order.

[0169] Among the transformation coefficients, a quadratic inverse transformation process can be performed using the number of coefficients applicable to the quadratic transformation as input values. As a result of the quadratic inverse transformation, a linear transformation coefficient in the form of a linear array can be generated.

[0170] In addition, the first transformation coefficients in the form of a first array can be rearranged according to the scan order set during the second transformation process. For example, the scan order set during the second transformation process may be a 4x4-based zigzag scan order, an 8x8-based zigzag scan order, etc. Here, the first transformation coefficients can be arranged in the form of a second array.

[0171] Therefore, based on the relationship between the order and / or position of each initial transformation coefficient and the order and / or position of the first transformation coefficients arranged in a second-order array, a correlation between the positions of the coefficients can be derived. Furthermore, considering this correlation, the order and / or position of the coefficients may be changed during the second-order inverse transformation process. Additionally, the basis kernel of the second-order inverse transformation may be rearranged. The basis kernel of the second-order inverse transformation may be referred to as the second-order inverse transformation matrix.

[0172] For example, by identifying the correlation between the positions of the coefficients before and after the quadratic transformation, the order of the coefficients before the quadratic transformation can be determined according to the raster scan order. Additionally, the order of the rows or columns of the inverse quadratic transformation matrix can be changed. Furthermore, when performing the inverse quadratic transformation using the rearranged transformation coefficients and the inverse quadratic transformation matrix, an inverse quadratic transformation result value arranged based on the raster scan order can be obtained without changing the scan order of the coefficients.

[0173]

[0174] Below, we explain inverse transformation methods to reduce delay in the first and second inverse transformation processes.

[0175]

[0176] FIG. 10 is a drawing illustrating an embodiment of a second inverse transform method according to an embodiment of the present disclosure. The second inverse transform method of FIG. 10 can be performed by an image decoder.

[0177] Referring to FIG. 10, the image decoder can generate inversely quantized transform coefficients by performing entropy decoding and inverse quantization. The inversely quantized transform coefficients may be coefficients arranged in a first-order array form. The order of the inversely quantized transform coefficients can be set based on the correlation between the order of the inversely quantized transform coefficients and the order of the coefficients finally derived as a result of the first-order inverse transform.

[0178] The image decoder can apply a second inverse transform to inverse quantized transform coefficients in the form of a first array. The image decoder can generate second inverse transformed transform coefficients using the inverse quantized transform coefficients in the form of a first array and the second inverse transform matrix. Here, the image decoder can determine the second inverse transform matrix based on at least one of the size of the current block, the first inverse transform type information of the current block, and the intra prediction mode information of the current block. Furthermore, the second inverse transform matrix used in the second inverse transform may be a matrix in which the order of rows or columns is changed based on the correlation between the order of the inverse quantized transform coefficients and the order of the coefficients finally derived as a result of the first inverse transform.

[0179] The inversely transformed transformation coefficients can be placed in the current transformation block in the form of a second array. The inversely transformed transformation coefficients can be placed in the second transformation block according to the raster scan order. Alternatively, the inversely transformed transformation coefficients can be placed in the second transformation block according to the scan order determined based on the inversely transformed type applied to the current transformation block. Furthermore, the inversely transformed transformation coefficients can be transposed and placed in the second transformation block. For example, whether to transpose is determined based on an intra prediction mode, and depending on whether to transpose, the inversely transformed transformation coefficients can be transposed and placed in the second transformation block.

[0180] And, the second-order inverse transformed transformation coefficients can be placed on all samples of the current transformation block.

[0181]

[0182] FIG. 11 is a drawing illustrating an embodiment of a second inverse transform method according to an embodiment of the present disclosure. The second inverse transform method of FIG. 11 can be performed by an image decoder.

[0183] Referring to FIG. 11, the image decoder can generate inversely quantized transform coefficients by performing entropy decoding and inverse quantization. The inversely quantized transform coefficients may be coefficients arranged in a first-order array form. The order of the inversely quantized transform coefficients can be set based on the correlation between the order of the inversely quantized transform coefficients and the order of the coefficients finally derived as a result of the first-order inverse transform.

[0184] The image decoder can apply a second inverse transform to inverse quantized transform coefficients in the form of a first array. The image decoder can generate second inverse transformed transform coefficients using the inverse quantized transform coefficients in the form of a first array and the second inverse transform matrix. Here, the image decoder can determine the second inverse transform matrix based on at least one of the size of the current block, the first inverse transform type information of the current block, and the intra prediction mode information of the current block. Furthermore, the second inverse transform matrix used in the second inverse transform may be a matrix in which the order of rows or columns is changed based on the correlation between the order of the inverse quantized transform coefficients and the order of the coefficients finally derived as a result of the first inverse transform.

[0185] The inversely transformed transformation coefficients can be placed in the current transformation block in the form of a second array. Here, the inversely transformed transformation coefficients can be placed in the secondary transformation block, which is a sub-block of the current transformation block. For example, the secondary transformation block may be a sub-block that is quarterly divided from the current transformation block. The secondary transformation block may be a sub-block located at the top left of the current transformation block. Furthermore, the inversely transformed transformation coefficients can be placed in the secondary transformation block according to the raster scan order. Alternatively, the inversely transformed transformation coefficients can be placed in the secondary transformation block according to the scan order determined based on the inversely transformed type applied to the current transformation block. Additionally, the inversely transformed transformation coefficients can be transposed and placed in the secondary transformation block. For example, whether to transpose is determined based on the intra prediction mode, and depending on the transpose, the inversely transformed transformation coefficients can be transposed and placed in the secondary transformation block.

[0186] According to one embodiment, the inversely transformed transformation coefficients can be placed in all samples of the quadratic transformation block. If the size of the current transformation block is less than a predefined value, the inversely transformed transformation coefficients can be placed in all samples of the quadratic transformation block. For example, if the size of the current transformation block is less than 8x8, the inversely transformed transformation coefficients can be placed in all samples of the quadratic transformation block. In addition, the values ​​of the samples of the current transformation block excluding the quadratic transformation block can be set to 0.

[0187] For example, the size of the current transformation block can be one of 8x4, 4x8, or 4x4. And, a 4x4 sub-block located to the left and / or top of the current transformation block can be defined as a quadratic transformation block. In this case, the quadratic transformation coefficients can be generated by applying a quadratic transformation to the values ​​of the first transformation coefficients of the quadratic transformation block. Here, according to one example, the number of quadratic transformation coefficients output as a result of the quadratic transformation in the quadratic transformation block can be 8.

[0188] In addition, the image decoder can generate 16 inversely transformed transformation coefficients by applying an inverse transformation to 8 inverse transformation coefficients obtained from the bitstream. In addition, the image decoder can place the generated 16 inversely transformed transformation coefficients in a inverse transformation block. That is, the inversely transformed transformation coefficients can be placed in a 4x4 sub-block located to the left and / or top of the current transformation block. In addition, the image decoder can set the transformation coefficient values ​​of the samples in the current transformation block, excluding the inverse transformation block, to 0.

[0189] According to another embodiment, the inversely transformed transformation coefficients may be placed in samples of a portion of the quadratic transformation block. If the size of the current transformation block is greater than or equal to a predefined value, the inversely transformed transformation coefficients may be placed in samples of a portion of the quadratic transformation block. For example, if the size of the current transformation block is 8x8 or greater, the inversely transformed transformation coefficients may be placed in samples of a portion of the quadratic transformation block. Here, the portion of the quadratic transformation block may have a predefined shape.

[0190] For example, an 8x8 sub-block located to the left and / or top of the current transformation block may be defined as a quadratic transformation block. In this case, quadratic transformation coefficients may be generated by applying a quadratic transformation to the values ​​of some of the primary transformation coefficients of the quadratic transformation block. According to one example, a quadratic transformation may be applied to 48 of the transformation coefficients of the 8x8 quadratic transformation block. And, the number of quadratic transformation coefficients output as a result of the quadratic transformation may be 32.

[0191] In addition, the image decoder can generate 48 inversely transformed transformation coefficients by applying an inverse transformation to 32 inversely transformed coefficients obtained from the bitstream. In addition, the image decoder can place the generated 48 inversely transformed transformation coefficients in a portion of the inversely transformed block. That is, the inversely transformed transformation coefficients can be placed in some samples of the inversely transformed block located to the left and / or top of the current transformation block. In addition, the image decoder can set the transformation coefficient values ​​of the samples of the current transformation block, excluding some samples of the inversely transformed block, to 0.

[0192] Here, some regions may be one region candidate determined from among predefined region candidates. For example, some regions of a quadratic transformation block may be one of a rectangular region containing samples to the left of the quadratic transformation block, a rectangular region candidate containing samples to the top of the quadratic transformation block, or a quadrant-shaped region candidate containing samples to the left and top of the quadratic transformation block.

[0193] Here, the shape of a portion of the quadratic transformation block may be determined based on explicitly signaled information. For example, the explicitly signaled information may be information indicating one of the predefined region candidates. Alternatively, the shape of a portion of the quadratic transformation block may be determined implicitly. For example, the shape of a portion of the quadratic transformation block may be determined based on coding parameters including the prediction mode (intra-prediction or inter-prediction) of the current transformation block, the intra-prediction mode, the index of the intra-prediction mode, the size and width of the current block, etc.

[0194] In addition, some regions may be determined to correspond to a second-order inverse transform matrix. For example, some regions may be determined from among predefined region candidates based on at least one of the size of the current block, the first-order inverse transform type information of the current block, and the intra-prediction mode information of the current block.

[0195] The values ​​of the samples in the remaining regions, excluding some regions of the quadratic transformation block, can be set to 0. Also, the values ​​of the samples in the current transformation block, excluding the quadratic transformation block, can be set to 0.

[0196]

[0197] According to one embodiment of the present disclosure, a second-order inverse transformation can be performed using at least some of the transformation coefficients. Here, the number of transformation coefficients may be determined according to the size of the current transformation block. For example, if the size of the current transformation block is 4x4, the number of transformation coefficients may be 16, and if the size of the current transformation block is 8x8, the number of transformation coefficients may be 48. Furthermore, the coefficients resulting from the second-order inverse transformation can be placed in a predefined region within the current transformation block. The predefined region may be referred to as a support region. A method for placing the coefficients resulting from the second-order transformation in a predefined region is described below.

[0198] The image decoder can determine a kernel identifier (kernel) indicating the kernel to be applied to the quadratic inverse transform and the type of the quadratic inverse transform. Here, the kernel to be applied to the quadratic inverse transform may be determined differently depending on the size of the current transform block. For example, the kernel applied to the quadratic inverse transform of an 8x8 block may be determined differently from the kernel applied to the quadratic inverse transform of a 4x4 block.

[0199] Furthermore, the kernel identifier can be determined based on coding parameters such as whether the current transformation block is inter-predicted, whether it is intra-predicted, the intra-predicted mode, and the first-order inverse transformation type. Additionally, the second-order inverse transformation type can be explicitly signaled. Therefore, the second-order inverse transformation kernel can be determined by a combination of a value derived based on the information of the current transformation block (e.g., kernel index) and a signaled value (e.g., second-order inverse transformation type).

[0200] The image decoder can determine a support area scan mapping table, which is information for mapping secondary inverse transform coefficients to a support area based on a kernel identifier and a secondary inverse transform type indicator. Different support area scan mapping tables may indicate different types of support areas for placing secondary inverse transform coefficients. Specifically, a secondary inverse transform scan mapping table that defines multiple support area scan mapping tables may be defined. In the secondary inverse transform scan mapping table, a support area scan mapping table can be defined based on the kernel index, the secondary inverse transform type value, and the number of secondary inverse transform coefficients. That is, based on the kernel index, the secondary inverse transform type value, and the number of secondary inverse transform coefficients, a support area scan mapping table can be determined from the secondary inverse transform scan mapping table.

[0201] The image decoder can determine the location of the quadratic inverse transform coefficients based on a determined support area scan mapping table and an index selected from a predefined scan sequence table. Here, the number of quadratic inverse transform coefficients corresponds to the size of the support area, and the location of the quadratic inverse transform coefficients may be a location within the support area. Here, the support area may be one of a rectangular area containing samples to the left of the quadratic transform block, a candidate rectangular area containing samples to the top of the quadratic transform block, or a quadrant-shaped area containing samples to the left and top of the quadratic transform block.

[0202] The image decoder can place the second-order inverse transform coefficients at a determined location within the support area. Additionally, the image decoder can set the coefficient values ​​at locations outside the support area to 0. Thus, the low-frequency components of the second-order inverse transform coefficients can be placed only within the support area.

[0203]

[0204] FIG. 12 is a diagram illustrating an embodiment of a second inverse transform method according to an embodiment of the present disclosure. The second inverse transform method of FIG. 12 can be performed by an image decoder.

[0205] Referring to FIG. 12, the image decoder can generate inversely quantized transform coefficients by performing entropy decoding and inverse quantization. The inversely quantized transform coefficients may be coefficients arranged in a first-order array form. The order of the inversely quantized transform coefficients can be set based on the correlation between the order of the inversely quantized transform coefficients and the order of the coefficients finally derived as a result of the first-order inverse transform.

[0206] The image decoder can apply a second inverse transform to a number of coefficients among the inverse quantized transform coefficients to which the second inverse transform is applicable. The image decoder can generate second inverse transformed transform coefficients using the inverse quantized transform coefficients in the form of a first array and a second inverse transform matrix. Here, the image decoder can determine the second inverse transform matrix based on at least one of the size of the current block, the first inverse transform type information of the current block, and the intra prediction mode information of the current block. Furthermore, the second inverse transform matrix used in the second inverse transform may be a matrix in which the order of rows or columns is changed based on the correlation between the order of the inverse quantized transform coefficients and the order of the coefficients finally derived as a result of the first inverse transform.

[0207] The inversely transformed transformation coefficients can be placed in the current transformation block in the form of a quadratic array. Here, the inversely transformed transformation coefficients can be placed in the quadratic transformation block, which is a sub-block of the current transformation block. For example, the quadratic transformation block may be a sub-block that is quarterly divided from the current transformation block. The quadratic transformation block may be a sub-block located at the top left of the current transformation block.

[0208] Additionally, the inversely transformed transformation coefficients can be placed in the secondary transformation block according to the raster scan order. Alternatively, the inversely transformed transformation coefficients can be placed in the secondary transformation block according to the scan order determined based on the inversely transformed type applied to the current transformation block. Furthermore, the inversely transformed transformation coefficients can be transposed and placed in the secondary transformation block. For example, whether to transpose is determined based on the intra prediction mode, and depending on the transposition, the inversely transformed transformation coefficients can be transposed and placed in the secondary transformation block.

[0209] Additionally, the second-order inverse-transformed transformation coefficient values ​​are placed in the current transformation block, so that the final transformation coefficients can be generated.

[0210] According to one embodiment, the second-order inverse transformed transformation coefficients can be placed in all samples of the second-order transformation block. If the size of the current transformation block is less than a predefined value, the second-order inverse transformed transformation coefficients can be placed in all samples of the second-order transformation block. For example, if the size of the current transformation block is less than 8x8, the second-order inverse transformed transformation coefficients can be placed in all samples of the second-order transformation block. Additionally, the values ​​of the coefficients that were not second-order inverse transformed among the inversely quantized transformation coefficients can be placed in the samples of the current transformation block excluding the second-order transformation block.

[0211] For example, the size of the current transformation block can be one of 8x4, 4x8, or 4x4. And, a 4x4 sub-block located to the left and / or top of the current transformation block can be defined as a quadratic transformation block. In this case, the quadratic transformation coefficients can be generated by applying a quadratic transformation to the values ​​of the first transformation coefficients of the quadratic transformation block. Here, according to one example, the number of quadratic transformation coefficients output as a result of the quadratic transformation in the quadratic transformation block can be 8.

[0212] In addition, the image decoder can generate 16 inversely transformed transformation coefficients by applying an inverse transformation to 8 inverse transformation coefficients obtained from the bitstream. In addition, the image decoder can place the generated 16 inversely transformed transformation coefficients in the inverse transformation block. That is, the inversely transformed transformation coefficients can be placed in a 4x4 sub-block located to the left and / or top of the current transformation block. In addition, the image decoder can set the transformation coefficient values ​​of the samples in the current transformation block, excluding the inverse transformation block, to the values ​​of the coefficients that have not been inversely transformed.

[0213] According to another embodiment, the inversely transformed transformation coefficients may be placed in samples of a portion of the quadratic transformation block. If the size of the current transformation block is greater than or equal to a predefined value, the inversely transformed transformation coefficients may be placed in samples of a portion of the quadratic transformation block. For example, if the size of the current transformation block is 8x8 or greater, the inversely transformed transformation coefficients may be placed in samples of a portion of the quadratic transformation block. Here, the portion of the quadratic transformation block may have a predefined shape.

[0214] For example, an 8x8 sub-block located to the left and / or top of the current transformation block may be defined as a quadratic transformation block. In this case, quadratic transformation coefficients may be generated by applying a quadratic transformation to the values ​​of some of the primary transformation coefficients of the quadratic transformation block. According to one example, a quadratic transformation may be applied to 48 of the transformation coefficients of the 8x8 quadratic transformation block. And, the number of quadratic transformation coefficients output as a result of the quadratic transformation may be 32.

[0215] In addition, the image decoder can generate 48 inversely transformed transformation coefficients by applying an inverse transformation to 32 transformation coefficients obtained from the bitstream. In addition, the image decoder can place the generated 48 inversely transformed transformation coefficients in a part area of ​​the transformation block. That is, the inversely transformed transformation coefficients can be placed in some samples of the transformation block located to the left and / or top of the current transformation block. In addition, the image decoder can set the transformation coefficient values ​​of the samples of the current transformation block, excluding some samples of the transformation block, to the values ​​of the coefficients that have not been inversely transformed.

[0216] Here, some regions may be one region candidate determined from among predefined region candidates. For example, some regions of a quadratic transformation block may be one of a rectangular region containing samples to the left of the quadratic transformation block, a rectangular region candidate containing samples to the top of the quadratic transformation block, or a quadrant-shaped region candidate containing samples to the left and top of the quadratic transformation block.

[0217] Here, some regions may be determined to correspond to a second-order inverse transform matrix. For example, some regions may be determined from among predefined region candidates based on at least one of the size of the current block, the first-order inverse transform type information of the current block, and the intra-prediction mode information of the current block.

[0218] The values ​​of the coefficients that were not inversely transformed among the inversely quantized transformation coefficients can be placed in the samples of the remaining region excluding a part of the second transformation block, and in the samples of the current transformation block excluding the second transformation block.

[0219]

[0220] FIG. 13 is a drawing illustrating an embodiment of a secondary conversion method according to an embodiment of the present disclosure. The secondary conversion method of FIG. 13 can be performed by an image encoding device.

[0221] Referring to FIG. 13, the image encoding device can generate first-order transformation coefficients by applying a first-order transformation to a residual block. Here, the first-order transformation coefficients may be coefficients arranged in a first-order array form. The order of the coefficients arranged in a first-order array form can be determined based on the correlation between the order of the residual coefficient values ​​and the order of the transformation coefficient values ​​finally derived as a result of the first-order transformation and the second-order transformation.

[0222] A video encoding device can generate quadratic transformation coefficients by applying a quadratic transformation to a first transformation coefficient in the form of a first array. Here, the quadratic transformation matrix used in the quadratic transformation may be a matrix in which the order of rows or columns is changed based on the correlation between the order of residual coefficient values ​​and the order of coefficient values ​​finally derived as a result of the first transformation and the quadratic transformation.

[0223] In the quadratic transformation process, quadratic transformation coefficients can be placed in the current transformation block in the form of a quadratic array. Quadratic transformation coefficients can be placed in the current transformation block according to the raster scan order. Alternatively, quadratic transformation coefficients can be placed in the quadratic transformation block according to the scan order determined based on the quadratic transformation type applied to the current transformation block.

[0224] And, the quadratic transformation coefficients can be placed on all samples of the current transformation block.

[0225]

[0226] FIG. 14 is a drawing illustrating an embodiment of a secondary conversion method according to an embodiment of the present disclosure. The secondary conversion method of FIG. 14 can be performed by an image encoding device.

[0227] Referring to FIG. 14, the image encoding device can generate first-order transformation coefficients by applying a first-order transformation to a residual block. Here, the first-order transformation coefficients may be coefficients arranged in a first-order array form. The order of the coefficients arranged in a first-order array form can be determined based on the correlation between the order of the residual coefficient values ​​and the order of the transformation coefficient values ​​finally derived as a result of the first-order transformation and the second-order transformation.

[0228] The video encoding device applies a quadratic transformation to the linear transformation coefficients in the form of a linear array, and the video encoding device can generate quadratic transformation coefficients using the linear transformation coefficients in the form of a linear array and the quadratic transformation matrix. Here, the video encoding device can apply a quadratic transformation to a number of coefficients among the linear transformation coefficients in the form of a linear array to which a quadratic transformation can be applied.

[0229] The video encoding device can determine a quadratic transformation matrix based on at least one of the size of the current block, the primary transformation type information of the current block, and the intra-prediction mode information of the current block. Additionally, the quadratic transformation matrix used in the quadratic transformation may be a matrix in which the order of rows or columns is changed based on the correlation between the order of residual coefficient values ​​and the order of coefficient values ​​finally derived as a result of the primary transformation and the quadratic transformation.

[0230] In the quadratic transformation process, quadratic transformation coefficients can be placed in the current transformation block in the form of a quadratic array. Here, the quadratic transformation coefficients can be placed in the quadratic transformation block, which is a sub-block of the current transformation block. For example, the quadratic transformation block may be a sub-block that is quarter-divided from the current transformation block. The quadratic transformation block may be a sub-block located at the top-left of the current transformation block. Furthermore, the quadratic transformation coefficients can be placed in the quadratic transformation block according to the raster scan order. Alternatively, the quadratic transformation coefficients can be placed in the quadratic transformation block according to the scan order determined based on the quadratic transformation type applied to the current transformation block.

[0231] According to one embodiment, quadratic transformation coefficients may be placed in all samples of a quadratic transformation block. If the size of the current transformation block is less than a predefined value, quadratic transformation coefficients may be placed in all samples of the quadratic transformation block. For example, if the size of the current transformation block is less than 8x8, quadratic transformation coefficients may be placed in all samples of the quadratic transformation block. Additionally, the values ​​of the samples of the current transformation block excluding the quadratic transformation block may be set to 0.

[0232] For example, the size of the current transformation block can be one of 8x4, 4x8, or 4x4. And, a 4x4 sub-block located to the left and / or top of the current transformation block can be defined as a quadratic transformation block. In this case, the quadratic transformation coefficients can be generated by applying a quadratic transformation to the values ​​of the quadratic transformation coefficients of the quadratic transformation block.

[0233] According to another embodiment, the quadratic transformation coefficients may be placed in samples of a portion of the quadratic transformation block. If the size of the current transformation block is greater than or equal to a predefined value, the quadratic transformation coefficients may be placed in samples of a portion of the quadratic transformation block. For example, if the size of the current transformation block is 8x8 or greater, the quadratic transformation coefficients may be placed in samples of a portion of the quadratic transformation block. Here, the portion of the quadratic transformation block may have a predefined shape.

[0234] For example, an 8x8 sub-block located to the left and / or top of the current transformation block may be defined as a quadratic transformation block. In this case, the quadratic transformation coefficients may be generated by applying a quadratic transformation to the values ​​of the coefficients in some regions of the quadratic transformation coefficients of the quadratic transformation block. According to one example, a quadratic transformation may be applied to 48 transformation coefficients among the transformation coefficients of the 8x8 quadratic transformation block. Here, some regions may be one region candidate determined from among predefined region candidates. For example, some regions of the quadratic transformation block may be one of a rectangular region containing samples to the left of the quadratic transformation block, a rectangular region candidate containing samples to the top of the quadratic transformation block, or a quadrant region candidate containing samples to the left and top of the quadratic transformation block.

[0235] Here, the shape of a portion of the quadratic transformation block may be determined based on explicitly signaled information. For example, the explicitly signaled information may be information indicating one of the predefined region candidates. Alternatively, the shape of a portion of the quadratic transformation block may be determined implicitly. For example, the shape of a portion of the quadratic transformation block may be determined based on coding parameters including the prediction mode (intra-prediction or inter-prediction) of the current transformation block, the intra-prediction mode, the index of the intra-prediction mode, the size and width of the current block, etc.

[0236] In addition, some regions may be determined to correspond to a quadratic transformation matrix. For example, some regions may be determined from among predefined region candidates based on at least one of the size of the current block, the linear transformation type information of the current block, and the intra-prediction mode information of the current block.

[0237] The values ​​of the samples in the remaining regions, excluding some regions of the quadratic transformation block, can be set to 0. Also, the values ​​of the samples in the current transformation block, excluding the quadratic transformation block, can be set to 0.

[0238]

[0239] According to one embodiment of the present disclosure, an image encoding device may perform a secondary transformation using at least some of the transformation coefficients. Here, the number of transformation coefficients may be determined according to the size of the current transformation block. For example, if the size of the current transformation block is 4x4, the number of transformation coefficients may be 16, and if the size of the current transformation block is 8x8, the number of transformation coefficients may be 48. In addition, at least some of the transformation coefficients may be coefficients placed in a predefined region within the current transformation block. The predefined region may be referred to as a support region. A method for performing a secondary transformation based on a predefined region is described below.

[0240] The video encoding device can determine a kernel identifier (kernel) indicating the kernel to be applied to the quadratic transformation and the type of the quadratic transformation. Here, the kernel to be applied to the quadratic transformation may be determined differently depending on the size of the current transformation block. For example, the kernel applied to the inverse quadratic transformation of an 8x8 block may be determined differently from the kernel applied to the inverse quadratic transformation of a 4x4 block.

[0241] Furthermore, the kernel identifier can be determined based on coding parameters such as whether the current transformation block is inter-predicted, whether it is intra-predicted, the intra-predicted mode, and the primary transformation type. Additionally, the secondary transformation type may be information that is explicitly signaled. Therefore, the secondary transformation kernel can be determined by a combination of a value derived based on the information of the current transformation block (e.g., kernel index) and a signaled value (e.g., secondary inverse transformation type).

[0242] The video encoding device can determine a support region scan mapping table based on a kernel identifier and a quadratic transform type indicator. Different support region scan mapping tables can indicate different shapes of support regions for placing quadratic inverse transform coefficients. Here, the support region may be one of a rectangular region containing samples to the left of the quadratic transform block, a candidate rectangular region containing samples to the top of the quadratic transform block, or a quadrature-shaped region containing samples to the left and top of the quadratic transform block.

[0243] Specifically, a quadratic transformation scan mapping table that defines multiple support area scan mapping tables may be defined. In the quadratic transformation scan mapping table, a support area scan mapping table may be defined based on the kernel index, the quadratic transformation type value, and the number of quadratic transformation coefficients. That is, based on the kernel index, the quadratic transformation type value, and the number of quadratic transformation coefficients, a support area scan mapping table may be determined from a quadratic inverse transformation scan mapping table.

[0244] The video encoding device can select transform coefficients of a support area based on a determined support area scan mapping table and rearrange the transform coefficients into a primary array according to an index selected from a predefined scan order table. Here, the number of transform coefficients may correspond to the size of the support area. Additionally, the video encoding device can apply a secondary transform to the transform coefficients rearranged into a primary array.

[0245]

[0246] FIG. 15 is a diagram illustrating an embodiment of a secondary conversion method according to an embodiment of the present disclosure. The secondary conversion method of FIG. 15 can be performed by an image encoding device.

[0247] Referring to FIG. 15, the image encoding device can generate first-order transformation coefficients by applying a first-order transformation to a residual block. Here, the first-order transformation coefficients may be coefficients arranged in a first-order array form. The order of the coefficients arranged in a first-order array form can be determined based on the correlation between the order of the residual coefficient values ​​and the order of the transformation coefficient values ​​finally derived as a result of the first-order transformation and the second-order transformation.

[0248] The video encoding device applies a quadratic transformation to the linear transformation coefficients in the form of a linear array, and the video encoding device can generate quadratic transformation coefficients using the linear transformation coefficients in the form of a linear array and the quadratic transformation matrix. Here, the video encoding device can apply a quadratic transformation to a number of coefficients among the linear transformation coefficients in the form of a linear array to which a quadratic transformation can be applied.

[0249] The video encoding device can determine a quadratic transformation matrix based on at least one of the size of the current block, the primary transformation type information of the current block, and the intra-prediction mode information of the current block. Additionally, the quadratic transformation matrix used in the quadratic transformation may be a matrix in which the order of rows or columns is changed based on the correlation between the order of residual coefficient values ​​and the order of coefficient values ​​finally derived as a result of the primary transformation and the quadratic transformation.

[0250] In the quadratic transformation process, quadratic transformation coefficients can be placed in the current transformation block in the form of a quadratic array. Here, the quadratic transformation coefficients can be placed in the quadratic transformation block, which is a sub-block of the current transformation block. For example, the quadratic transformation block may be a sub-block that is quarter-divided from the current transformation block. The quadratic transformation block may be a sub-block located at the top-left of the current transformation block. Furthermore, the quadratic transformation coefficients can be placed in the quadratic transformation block according to the raster scan order. Alternatively, the quadratic transformation coefficients can be placed in the quadratic transformation block according to the scan order determined based on the quadratic transformation type applied to the current transformation block.

[0251] Additionally, the primary transformation coefficient values ​​that have not been converted to the second degree are placed in the current transformation block, so that the final transformation coefficients can be generated.

[0252] According to one embodiment, quadratic transformation coefficients may be placed in all samples of a quadratic transformation block. If the size of the current transformation block is less than a predefined value, quadratic transformation coefficients may be placed in all samples of the quadratic transformation block. For example, if the size of the current transformation block is less than 8x8, quadratic transformation coefficients may be placed in all samples of the quadratic transformation block. Additionally, values ​​of the first transformation coefficients that have not undergone quadratic transformation may be placed in the samples of the current transformation block excluding the quadratic transformation block.

[0253] For example, the size of the current transformation block can be one of 8x4, 4x8, or 4x4. And, a 4x4 sub-block located to the left and / or top of the current transformation block can be defined as a quadratic transformation block. In this case, the quadratic transformation coefficients can be generated by applying a quadratic transformation to the values ​​of the quadratic transformation coefficients of the quadratic transformation block.

[0254] According to another embodiment, the quadratic transformation coefficients may be placed in samples of a portion of the quadratic transformation block. If the size of the current transformation block is greater than or equal to a predefined value, the quadratic transformation coefficients may be placed in samples of a portion of the quadratic transformation block. For example, if the size of the current transformation block is 8x8 or greater, the quadratic transformation coefficients may be placed in samples of a portion of the quadratic transformation block. Here, the portion of the quadratic transformation block may have a predefined shape.

[0255] For example, an 8x8 sub-block located to the left and / or top of the current transformation block may be defined as a quadratic transformation block. In this case, the quadratic transformation coefficients may be generated by applying a quadratic transformation to the values ​​of the coefficients in some regions of the quadratic transformation coefficients of the quadratic transformation block. According to one example, a quadratic transformation may be applied to 48 transformation coefficients among the transformation coefficients of the 8x8 quadratic transformation block. Here, the shape of some regions of the quadratic transformation block may be determined based on explicitly signaled information. For example, the explicitly signaled information may be information indicating one region candidate among predefined region candidates. Alternatively, the shape of some regions of the quadratic transformation block may be determined implicitly. For example, the shape of some regions of the quadratic transformation block may be determined based on coding parameters including the prediction mode (intra prediction or inter prediction) of the current transformation block, the intra prediction mode, the index of the intra prediction mode, the size and width of the current block, etc.

[0256] In addition, some regions may be one region candidate determined from among predefined region candidates. For example, some regions of a quadratic transformation block may be one of a rectangular region containing samples to the left of the quadratic transformation block, a rectangular region candidate containing samples to the top of the quadratic transformation block, or a quadrant-shaped region candidate containing samples to the left and top of the quadratic transformation block.

[0257] Here, some regions may be determined to correspond to a quadratic transformation matrix. For example, some regions may be determined from among predefined region candidates based on at least one of the size of the current block, the linear transformation type information of the current block, and the intra-prediction mode information of the current block.

[0258] The values ​​of the first-order transformation coefficients that have not been quadratic transformed can be placed on the samples of the remaining region excluding a part of the second-order transformation block, and on the samples of the current transformation block excluding the second-order transformation block.

[0259]

[0260] Image decoding methods using second-order inverse transform and first-order inverse transform may be as described below.

[0261]

[0262] FIG. 16 is a flowchart illustrating an image decoding method according to one embodiment of the present disclosure. The image decoding method of FIG. 16 can be performed by an image decoding device.

[0263] Referring to FIG. 16, the image decoder can derive the inverse quantized transform coefficients of the current transform block (S1610).

[0264] The image decoder can derive the second-inverse transformed coefficients by performing a second-inverse transform on the inversely quantized transform coefficients (S1620).

[0265] The image decoder can place the coefficients of the second inverse transform in the sub-block of the current transform block (S1630). The sub-block of the current transform block may be the upper-left sub-block among the sub-blocks divided into four from the current transform block.

[0266] The quadratic inverse transformed coefficients may be placed in a part of the sub-block. Additionally, if the size of the current transformation block is greater than or equal to a predetermined size, the quadratic inverse transformed coefficients may be placed in a part of the sub-block. A part of the sub-block may be determined as one of the predefined region candidates. Here, one region candidate may be one of a rectangular region candidate containing the samples on the left, a rectangular region candidate containing the samples at the top, or a quadrant region candidate containing both the left and top samples.

[0267] A single region candidate may be determined based on information indicating one of the predefined region candidates. Alternatively, a single region candidate may be determined based on the coding parameters of the current transformation block. The quadratic inverse transform coefficients may be placed in a portion of the sub-block according to the raster scan order. Alternatively, the quadratic inverse transform coefficients may be placed in a portion of the sub-block according to the scan order determined based on the quadratic inverse transform type.

[0268] And, the coefficient value of the remaining area excluding some area of ​​the sub-block can be set to 0. Also, in the current transformation block, the coefficient value of the remaining area excluding the sub-block can be set to 0.

[0269] The video decoder can perform a first-order inverse transform on the second-order inverse transform coefficients placed in the lower block (S1640).

[0270]

[0271] In addition, the image decoding method using first and second transformations may be as described below.

[0272]

[0273] FIG. 17 is a flowchart illustrating an image encoding method according to one embodiment of the present disclosure. The image encoding method of FIG. 17 can be performed by an image encoding device.

[0274] Referring to FIG. 17, the image encoding device can derive a first transformation coefficient by applying a first transformation to the residual of the current block (S1710).

[0275] The video encoding device can derive a second transformation coefficient by applying a second transformation to the first transformation coefficient (S1720).

[0276] The video encoding device may place the secondary transformation coefficients in the sub-block of the current transformation block (S1730). The sub-block of the current transformation block may be the upper-left sub-block among the sub-blocks divided into four from the current transformation block.

[0277] The quadratic transformation coefficient may be placed in a part of the sub-block. Additionally, if the size of the current transformation block is greater than or equal to a predetermined size, the quadratic transformation coefficient may be placed in a part of the sub-block. A part of the sub-block may be determined as one of the predefined region candidates. Here, one region candidate may be one of a rectangular region candidate containing the samples on the left, a rectangular region candidate containing the samples at the top, or a quadrant region candidate containing both the left and top samples.

[0278] A single region candidate can be determined based on the coding parameters of the current transformation block. Meanwhile, information indicating one of the predefined region candidates can be signaled.

[0279] The quadratic transformation coefficients may be placed in a portion of the sub-block according to the raster scan order. Alternatively, the quadratic transformation coefficients may be placed in a portion of the sub-block according to the scan order determined based on the quadratic transformation type.

[0280] And, the coefficient value of the remaining area excluding some area of ​​the sub-block can be set to 0. Also, in the current transformation block, the coefficient value of the remaining area excluding the sub-block can be set to 0.

[0281] The video encoding device can quantize the secondary transformation coefficients placed in the lower block (S1740).

[0282] A bitstream can be generated by a video encoding method including the steps described in FIG. 17. The bitstream can be stored on a non-transient computer-readable recording medium and can also be transmitted (or streamed).

[0283]

[0284] The exemplary methods of the present disclosure are described as a series of operations for clarity of description, but this is not intended to limit the order in which the steps are performed, and if necessary, each step may be performed simultaneously or in a different order. To implement the method according to the present disclosure, additional steps may be included in addition to the steps exemplified, steps excluding some steps and including the remaining steps, or steps excluding some steps and including additional steps.

[0285] The various embodiments of the present disclosure are not intended to list all possible combinations but to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.

[0286] Various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of implementation by hardware, it may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.

[0287] Alternatively, various embodiments of the present disclosure may be implemented in the form of program instructions that can be executed through various computer components and recorded on a computer-readable recording medium. And, a bitstream generated by the encoding method according to the embodiment may be stored on a non-transient computer-readable recording medium.

[0288] The above-mentioned computer-readable recording medium may include program instructions, data files, data structures, etc., either alone or in combination. The program instructions recorded on the above-mentioned computer-readable recording medium may be those specifically designed and configured for the present disclosure, or they may be those known and available to those skilled in the art of computer software.

[0289] In the foregoing, the present disclosure is described based on specific details, such as specific components, limited embodiments, and drawings. However, the embodiments of the present disclosure are provided merely to aid in the overall understanding of the present disclosure and are not intended to limit the present disclosure to the above embodiments. Accordingly, a person skilled in the art can make various modifications and variations from this description.

[0290] Accordingly, the scope of the present invention should not be limited to the embodiments described above, and all modifications equivalent to or equivalent to the claims set forth below, as well as the claims described below, shall be considered to fall within the scope of the concept of the present invention.

[0291] The present invention can be used in a device for encoding an image, a device for decoding an image, and a recording medium for storing a bitstream.

Claims

1. In a video decoding method, A step of deriving the inverse quantized transformation coefficients of the current transformation block; A step of deriving a second-order inverse transformed coefficient by performing a second-order inverse transformed coefficient on the above-mentioned inverse quantized transform coefficient; A step of placing the second-order inverse transformed coefficients in a sub-block of the current transformation block; and It includes the step of performing a first-order inverse transformation on the second-order inverse transformed coefficients placed in the above-mentioned sub-block, and An image decoding method characterized in that the above-mentioned secondary inverse transform coefficients are placed in a part of the above-mentioned sub-block.

2. In Paragraph 1, The sub-block of the above current conversion block is, An image decoding method characterized by being the upper left sub-block among the sub-blocks divided into four from the above current conversion block.

3. In Paragraph 1, The above-mentioned second-order inverse transformed coefficients are, An image decoding method characterized by being placed in a part of the lower block when the size of the current conversion block is greater than or equal to a predetermined size.

4. In Paragraph 1, A portion of the above sub-block is, An image decoding method characterized by being determined as one of the predefined region candidates.

5. In Paragraph 4, The above-mentioned one region candidate is, An image decoding method characterized by being one of a rectangular region candidate including samples on the left, a rectangular region candidate including samples on the top, and a quadrant region candidate including samples on the left and top.

6. In Paragraph 4, The above-mentioned one region candidate is, An image decoding method characterized by being determined based on information indicating one of the aforementioned predefined region candidates.

7. In Paragraph 4, The above-mentioned one region candidate is, An image decoding method characterized by being determined based on the coding parameters of the current conversion block.

8. In Paragraph 1, The above-mentioned second-order inverse transformed coefficients are, An image decoding method characterized by being placed in a part area of ​​the sub-block according to the raster scan order.

9. In Paragraph 1, The above-mentioned second-order inverse transformed coefficients are, An image decoding method characterized by being placed in a part of the sub-block according to a scan order determined based on a second inverse transform type.

10. In Paragraph 1, An image decoding method characterized by the fact that the coefficient value of the remaining area, excluding a part of the above-mentioned sub-block, is 0.

11. In Paragraph 1, An image decoding method characterized in that, in the current conversion block above, the value of the coefficient of the remaining area excluding the lower block is 0.

12. In a video encoding method, A step of deriving linear transformation coefficients by applying a linear transformation to the residuals of the current block; A step of deriving a second transformation coefficient by applying a second transformation to the first transformation coefficient above; The step of placing the above-mentioned quadratic transformation coefficients in the sub-blocks of the current transformation block; and It includes the step of quantizing the quadratic transformation coefficients placed in the above-mentioned sub-block, and An image encoding method characterized in that the above-mentioned second-order transformed coefficients are placed in a part of the above-mentioned sub-block.

13. A non-transient computer-readable recording medium storing a bitstream generated by a video encoding method, The above image encoding method is, A step of deriving linear transformation coefficients by applying a linear transformation to the residuals of the current block; A step of deriving a second transformation coefficient by applying a second transformation to the first transformation coefficient above; The step of placing the above-mentioned quadratic transformation coefficients in the sub-blocks of the current transformation block; and It includes the step of quantizing the quadratic transformation coefficients placed in the above-mentioned sub-block, and A non-transient computer-readable recording medium characterized by the above-mentioned secondary transformed coefficients being placed in a part area of ​​the above-mentioned sub-block.

14. A method for transmitting a bitstream generated by a video encoding method, The above transmission method includes the step of transmitting the bitstream, and The above image encoding method is, A step of deriving linear transformation coefficients by applying a linear transformation to the residuals of the current block; A step of deriving a second transformation coefficient by applying a second transformation to the first transformation coefficient above; The step of placing the above-mentioned quadratic transformation coefficients in the sub-blocks of the current transformation block; and It includes the step of quantizing the quadratic transformation coefficients placed in the above-mentioned sub-block, and A transmission method characterized in that the above-mentioned second-order transformed coefficients are placed in a part of the above-mentioned sub-block.