Video encoding method and apparatus, and video decoding method and apparatus
The method addresses inefficiencies in high-resolution video encoding by deriving a scale factor for transform skip blocks, enhancing encoding/decoding efficiency and image quality in UHD video processing.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- ELECTRONICS & TELECOMM RES INST
- Filing Date
- 2026-02-18
- Publication Date
- 2026-05-11
Smart Images

Figure 2026076347000001_ABST
Abstract
Description
[Technical Field]
[0001] This invention relates to the encoding and decoding of video, and more particularly to a scaling method and apparatus for conversion coefficients. [Background technology]
[0002] Recently, broadcast services with HD (High Definition) resolution (1280×1024 or 1920×1080) have been expanding not only in South Korea but also globally. As a result, many users have become accustomed to high-resolution, high-quality video, and in response, many organizations are accelerating the development of next-generation video equipment. Furthermore, as interest in UHD (Ultra High Definition), which has more than four times the resolution of HDTV, grows alongside HDTV, video standardization organizations have come to recognize the need for compression technology for higher resolution, higher-quality video. There is also a pressing need for a new standard that can maintain the same image quality through higher compression efficiency than H.264 / AVC, currently used in HDTVs, mobile phones, and Blu-ray players, while simultaneously gaining significant advantages in terms of frequency bandwidth and storage.
[0003] Currently, MPEG (Moving Picture Experts Group) and VCEG (Video Coding Experts Group) are jointly standardizing HEVC (High Efficiency Video Coding), a next-generation video codec, with the goal of encoding video, including UHD video, with twice the compression efficiency compared to H.264 / AVC. This will enable the delivery of high-quality video at lower frequencies than currently possible, not only for HD and UHD video, but also for 3D broadcasting and mobile communication networks. [Overview of the project] [Problems that the invention aims to solve]
[0004] The present invention provides a video encoding / decoding method and apparatus that can improve encoding / decoding efficiency.
[0005] The present invention provides a method and apparatus for scaling conversion coefficients (or residual signals) that can improve encoding / decoding efficiency.
[0006] The present invention provides a quantization / inverse quantization method and apparatus for a transform skip block that can improve encoding / decoding efficiency.
Means for Solving the Problems
[0007] According to one aspect of the present invention, a video decoding method is provided. The video decoding method includes a step of deriving a scale factor for the current block according to whether the current block is a transform skip block, and a step of performing scaling for the current block based on the scale factor.
[0008] The scale factor for the current block is derived based on the positions of the transform coefficients in the current block. The transform skip block is a block to which no transform is applied to the current block, and is specified based on information indicating whether an inverse transform is applied to the current block.
[0009] In the step of deriving the scale factor for the current block, when the current block is a transform skip block, a basic scale factor is derived regardless of the positions of the transform coefficients in the current block.
[0010] The basic scale factor has a predetermined scale factor value, and the predetermined scale factor value is 16.
[0011] The basic scale factor has different scale factor values depending on whether the current block uses a quantization matrix.
[0012] The basic scale factor has different scale factor values depending on whether the current block is a luminance block or a chrominance block.
[0013] A flag indicating whether the conversion skip algorithm is used for the video containing the aforementioned block is signaled via the Picture Parameter Set (PPS).
[0014] The aforementioned basic scale factor includes scale factor information for the luminance signal and the chrominance signal.
[0015] In the step of deriving the scale factor for the current block, if the current block is a transformation skip block or does not use a quantization matrix, the base scale factor is derived regardless of the position of the transformation coefficients within the current block.
[0016] In the step of deriving the scale factor for the current block, if the current block is not a transformation skip block, the scale factor for the current block is derived using the quantization matrix based on the position of the transformation coefficients within the current block.
[0017] According to another aspect of the present invention, a video decoding device is provided. The video decoding device includes an inverse quantization unit that derives a scale factor for the current block depending on whether the current block is a transformation skip block, and performs scaling for the current block based on the scale factor.
[0018] The scale factor for the current block is derived based on the position of the transformation coefficients within the current block, and the transformation skip blocks are blocks to which the transformation is not applied, and are identified based on information indicating whether or not the transformation is applied to the current block.
[0019] According to another aspect of the present invention, a video encoding method is provided. The video encoding method includes the steps of deriving a scale factor for the current block depending on whether the current block is a transformation skip block, and performing scaling on the current block based on the scale factor.
[0020] The scale factor for the current block is derived based on the position of the transformation coefficients within the current block, and the transformation skip blocks are blocks to which the transformation is not applied, and are identified based on information indicating whether or not the transformation is applied to the current block.
[0021] In the step of deriving the scale factor for the current block, if the current block is a transformation skip block, the base scale factor is derived regardless of the position of the transformation coefficients within the current block.
[0022] The aforementioned basic scale factor has a predetermined scale factor value, and the predetermined scale factor value is 16.
[0023] The aforementioned basic scale factor has different scale factor values depending on whether the current block uses a quantization matrix.
[0024] The basic scale factor has different scale factor values depending on whether the current block is a luminance block or a chrominance block.
[0025] A flag indicating whether the conversion skip algorithm is used for the video containing the aforementioned block is signaled via the Picture Parameter Set (PPS).
[0026] The aforementioned basic scale factor includes scale factor information for the luminance signal and the chrominance signal.
[0027] In the step of deriving the scale factor for the current block, if the current block is a transformation skip block or does not use a quantization matrix, the base scale factor is derived regardless of the position of the transformation coefficients within the current block.
[0028] In the step of deriving the scale factor for the current block, if the current block is not a transformation skip block, the scale factor for the current block is derived using the quantization matrix based on the position of the transformation coefficients within the current block.
[0029] According to another aspect of the present invention, a video encoding apparatus is provided. The video encoding apparatus includes a quantization unit that derives a scale factor for the current block depending on whether the current block is a transformation skip block, and performs scaling for the current block based on the scale factor.
[0030] The scale factor for the current block is derived based on the position of the transformation coefficients within the current block, and the transformation skip blocks are blocks to which the transformation is not applied, and are identified based on information indicating whether or not the transformation is applied to the current block. [Effects of the Invention]
[0031] Blocks to which the transformation-skipping algorithm is applied do not perform the transformation / inverse transformation process, and therefore have different transformation coefficient characteristics from blocks that have performed the existing transformation / inverse transformation process. That is, if the scaling method applied to blocks that have performed the existing transformation / inverse transformation process is applied directly to transformation-skipping blocks, the encoding / decoding efficiency can be reduced. Therefore, by applying the same scale factor to transformation-skipping blocks regardless of the position of the transformation coefficients within the block, the encoding and decoding efficiency can be increased. [Brief explanation of the drawing]
[0032] [Figure 1] This is a block diagram showing the configuration of one embodiment of a video encoding device to which the present invention is applied. [Figure 2] This is a block diagram showing the configuration of one embodiment of a video decoding device to which the present invention is applied. [Figure 3] This diagram schematically shows the segmentation structure of video when encoding video. [Figure 4] This diagram shows the possible configurations of prediction units (PUs) that a coding unit (CU) may contain. [Figure 5] This diagram shows the configuration of a conversion unit (TU) that a coding unit (CU) may contain. [Figure 6] This flowchart illustrates a scaling method for residual signals (or conversion coefficients) according to one embodiment of the present invention. [Figure 7] This flowchart illustrates a scaling method for residual signals (or conversion coefficients) according to another embodiment of the present invention. [Modes for carrying out the invention]
[0033] Embodiments of the present invention will be described in detail below with reference to the drawings. In describing the embodiments of this specification, if a specific description of a related known configuration or function is deemed to obscure the gist of this specification, such description may be omitted.
[0034] In this specification, when one component is described as being linked or connected to another component, it means that it is directly linked or connected to the other component, or that another component exists in between. Furthermore, in this specification, when a description includes a particular configuration, it does not exclude other configurations, but rather means that additional configurations may be included within the scope of the implementation of the present invention or the technical idea of the present invention.
[0035] Terms such as "first," "second," etc., can be used to describe various configurations, but the configurations are not limited by these terms. The terms are used for the purpose of distinguishing one configuration from another. For example, as long as it does not fall outside the scope of the rights of the present invention, the first configuration may be named the second configuration, and similarly, the second configuration may be named the first configuration.
[0036] Furthermore, the components shown in the embodiments of the present invention are illustrated independently to demonstrate distinct and characteristic functions, and this does not mean that each component constitutes separate hardware or a single software component. That is, each component is listed and included for the convenience of explanation, and at least two of these components may be integrated to form a single component, or a single component may be divided into multiple components to perform its function. Integrated and separated embodiments of each component are also included within the scope of the present invention, as long as they do not deviate from the essence of the present invention.
[0037] Furthermore, some components are not essential components that perform the essential functions of the present invention, but are merely optional components for improving performance. The present invention may include only the components essential to the essential realization of the present invention, excluding components used solely for performance improvement, and a structure including only the essential components, excluding optional components used solely for performance improvement, is also included within the scope of the rights of the present invention.
[0038] First, for the sake of explanation and understanding the invention, a brief explanation of the terms used in this specification will be provided.
[0039] A unit refers to a unit of video encoding and decoding. In video encoding / decoding, an encoding or decoding unit refers to a divided unit when a single video is divided into subdivided units for encoding or decoding. It is also called a block, macroblock (MB), coding unit (CU), prediction unit (PU), transform unit (TU), coding block (CB), prediction block (PB), or transform block (TB). Furthermore, a single unit can be divided into smaller subunits.
[0040] A block refers to an M x N array of samples, where M and N are positive integers. A block also represents a two-dimensional array.
[0041] A Transform Unit (TU) is the basic unit used when encoding / decoding a residual signal, such as in transform, inverse transform, quantization, inverse quantization, and transform coefficient coding / decoding. A single Transform Unit can be divided into multiple smaller Transform Units. When the residual signal exists in block form, it can be called a residual block.
[0042] A quantization matrix is a matrix used in the quantization or dequantization process to improve the subjective or objective image quality of an image. A quantization matrix is also called a scaling list.
[0043] Quantization matrices can be divided into default matrices, non-default matrices, and flat matrices. A default matrix refers to a predetermined quantization matrix that is predefined by the encoder and decoder. A non-default matrix refers to a quantization matrix that is not predefined by the encoder and decoder and is transmitted / received by the user. A flat matrix refers to a matrix in which all elements have the same value.
[0044] Scaling refers to the process of multiplying the transformation coefficient levels by factors, resulting in the generation of transformation coefficients. Scaling is also called dequantization.
[0045] A transform coefficient refers to the coefficient value generated after performing a transformation. In this specification, the quantized transform coefficient level, which is obtained by applying quantization to the transform coefficient, is also commonly referred to as a transform coefficient.
[0046] The quantization parameter is a value used to scale the transformation coefficient levels during quantization and inverse quantization. In this case, the quantization parameter is a value mapped to the quantization step size.
[0047] A parameter set is the header information within the structure of a bitstream, and is commonly referred to as a sequence parameter set, picture parameter set, or adaptation parameter set.
[0048] Figure 1 is a block diagram showing the configuration of one embodiment of a video encoding device to which the present invention is applied.
[0049] Referring to Figure 1, the video encoding device 100 includes a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switch 115, a subtractor 125, a conversion unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse conversion unit 170, an adder 175, a filter unit 180, and a reference video buffer 190.
[0050] The video encoding device 100 can output a bitstream by performing encoding on the input video in intra mode or inter mode. In intra mode, switch 115 can be switched to intra, and in inter mode, switch 115 can be switched to inter. Intra prediction means prediction within a screen, and inter prediction means prediction between screens. After generating prediction blocks for the input blocks of the input video, the video encoding device 100 can encode the difference (residual) between the input blocks and the prediction blocks. In this case, the input video means the original picture.
[0051] In intra mode, the intra prediction unit 120 can generate predicted blocks by performing spatial prediction using the pixel values of already encoded / decoded blocks surrounding the current block.
[0052] In intermode, the motion prediction unit 111 can find the region in the reference video stored in the reference video buffer 190 that best matches the input block during the motion prediction process and obtain a motion vector. The motion compensation unit 112 can generate a predicted block by performing motion compensation using the motion vector. Here, the motion vector is a two-dimensional vector used for interpretation and can indicate the offset between the video currently being encoded / decoded and the reference video.
[0053] The subtractor 125 can generate a residual block based on the difference between the input block and the generated predicted block.
[0054] The transformation unit 130 can output a transformation coefficient by performing a transformation on the residual block. Then, the quantization unit 140 can output a quantized coefficient by quantizing the input transformation coefficient using a quantization parameter (or quantization parameter).
[0055] The entropy coding unit 150 can output a bit stream by performing entropy coding based on values calculated by the quantization unit 140 or coding parameter values calculated during the coding process. When entropy coding is applied, symbols with a high probability of occurrence are assigned fewer bits, and symbols with a low probability of occurrence are assigned more bits, thereby reducing the size of the bit sequence for the symbols to be coded. Therefore, the compression performance of video coding can be improved through entropy coding. The entropy coding unit 150 can use coding methods such as Exponential-Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) for entropy coding.
[0056] The video encoding device 100 according to the embodiment in Figure 1 performs inter-predictive encoding, i.e., inter-frame predictive encoding. Therefore, the currently encoded video needs to be decoded and stored so that it can be used as a reference video. Accordingly, the quantized coefficients are dequantized in the dequantization unit 160 and inversely transformed in the inverse transformation unit 170. The dequantized and inversely transformed coefficients are added to the prediction block via the adder 175 to generate the restored block.
[0057] The restored block passes through the filter unit 180, which can apply at least one of the following filters to the restored block or restored video: a deblocking filter, SAO (Sample Adaptive Offset), or ALF (Adaptive Loop Filter). The filter unit 180 is also called an adaptive in-loop filter. The deblocking filter can remove block distortion that occurs at the boundaries between blocks. SAO can add an appropriate offset value to the pixel value to compensate for coding errors. ALF can perform filtering based on a comparison of the restored video with the original video. The restored block that has passed through the filter unit 180 can be stored in the reference video buffer 190.
[0058] Figure 2 is a block diagram showing the configuration of one embodiment of a video decoding device to which the present invention is applied.
[0059] Referring to Figure 2, the video decoding device 200 includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transformation unit 230, an intra prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260, and a reference video buffer 270.
[0060] The video decoding device 200 can receive the bitstream output from the encoder and perform decoding in intra-mode or inter-mode, thereby outputting a reconstructed video, i.e., a restored video. In intra-mode, the switch can be switched to intra, and in inter-mode, the switch can be switched to inter.
[0061] The video decoding device 200 can obtain a reconstructed residual block from the input bitstream, generate a predicted block, and then generate a reconstructed block, i.e., a reconstructed block, by adding the reconstructed residual block and the predicted block.
[0062] The entropy decoding unit 210 can entropy-decode the input bitstream using a probability distribution and generate symbols that include symbols in the form of quantized coefficients.
[0063] When the entropy decoding method is applied, the size of the bit sequence for each symbol can be reduced by assigning fewer bits to symbols with a high probability of occurrence and more bits to symbols with a low probability of occurrence.
[0064] The quantized coefficients are inversely quantized in the inverse quantization unit 220 and inversely transformed in the inverse transformation unit 230. As a result of the inverse quantization / inverse transformation of the quantized coefficients, a restored residual block can be generated.
[0065] In intra mode, the intra prediction unit 240 can generate predicted blocks by performing spatial prediction using the pixel values of already decoded blocks surrounding the current block. In inter mode, the motion compensation unit 250 can generate predicted blocks by performing motion compensation using the motion vector and the reference video stored in the reference video buffer 270.
[0066] The residual block and the prediction block are added via the adder 255, and the added block can pass through the filter unit 260. The filter unit 260 can apply at least one of the following filters: deblocking filter, SAO, and ALF, to the reconstructed block or the reconstructed image. The filter unit 260 can output the reconstructed image, i.e., the reconstructed image. The reconstructed image can be stored in the reference image buffer 270 and used for interpretation.
[0067] Figure 3 schematically shows the video segmentation structure when video is encoded.
[0068] In HEVC (High Efficiency Video Coding), encoding is performed on coding units (CUs) to efficiently divide the video.
[0069] Referring to Figure 3, HEVC sequentially divides the video 300 into Largest Coding Units (LCUs) (hereinafter referred to as LCUs), and then determines the division structure for each LCU. The division structure refers to the distribution of coding units (hereinafter referred to as CUs) for efficiently encoding the video within the LCU 310, and such a distribution can be determined by whether one CU is divided into four CUs, each reduced by half vertically and horizontally. A divided CU can be recursively divided into four CUs, each reduced by half vertically and horizontally, for each CU divided in the same manner.
[0070] In this case, the CU can be recursively divided up to a predetermined depth. Depth information indicates the size of the CU and is stored for each CU. For example, the depth of the LCU is 0, and the depth of the SCU (Smallest Coding Unit) is the predetermined maximum depth. Here, as mentioned above, the LCU is the coding unit with the largest coding unit size, and the SCU (Smallest Coding Unit) is the coding unit with the smallest coding unit size.
[0071] Each time the LCU310 is divided in half horizontally and vertically, the depth of the CU increases by 1. For each depth, a CU that is not divided has a size of 2N × 2N, while a CU that is divided is divided from a 2N × 2N CU into four CUs of N × N size. The size of N decreases by half each time the depth increases by 1.
[0072] Referring to Figure 3, the size of an LCU with a minimum depth of 0 is 64 x 64 pixels, and the size of an SCU with a maximum depth of 3 is 8 x 8 pixels. In this case, a 64 x 64 pixel CU (LCU) can be represented with a depth of 0, a 32 x 32 pixel CU can be represented with a depth of 1, a 16 x 16 pixel CU can be represented with a depth of 2, and an 8 x 8 pixel CU (SCU) can be represented with a depth of 3.
[0073] Furthermore, information regarding whether or not a particular CU (Control Unit) is to be split can be represented by a 1-bit splitting information for each CU. This splitting information can be included in all CUs except for SCUs. For example, if a CU is not to be split, 0 can be stored in the splitting information, and if a CU is to be split, 1 can be stored in the splitting information.
[0074] On the other hand, a CU separated from an LCU can consist of a Prediction Unit (PU or Prediction Block; PB), which is the basic unit for prediction, and a Transform Unit (TU or Transform Block; TB), which is the basic unit for transformation.
[0075] Figure 4 shows the configuration of a prediction unit (PU) that a coding unit (CU) may include.
[0076] Of the CUs separated from the LCU, those that cannot be further divided are divided into one or more prediction units, and this act itself is also called partitioning. A prediction unit (hereinafter referred to as PU) is the basic unit that performs predictions, and is encoded in one of the following modes: skip mode, inter mode, or intra mode, and can be partitioned in various forms depending on the mode.
[0077] Referring to Figure 4, in skip mode, it is possible to support a 2N×2N mode 410 that has the same size as the CU without partitions within the CU.
[0078] In intermode, the CU can support eight different partitioned configurations, such as 2N×2N mode 410, 2N×N mode 415, N×2N mode 420, N×N mode 425, 2N×nU mode 430, 2N×nD mode 435, nL×2N mode 440, and nR×2N mode 445.
[0079] In intra mode, the CU can support 2N×2N mode 410 and N×N mode 425.
[0080] Figure 5 shows the configuration of a conversion unit (TU) that a coding unit (CU) may contain.
[0081] A transformation unit (hereinafter referred to as TU) is the basic unit used within a CU for spatial transformation and quantization / dequantization (scaling) processes. A TU can have the form of a square or a rectangle. A CU that has been divided from an LCU and cannot be further divided can be divided into one or more TUs.
[0082] In this case, the division structure of the TU is a quad-tree structure. For example, as shown in Figure 5, one CU510 can be divided once or more times by a quad-tree structure, and can be composed of TUs of various sizes.
[0083] On the other hand, HEVC can perform intra-predictive coding (hereinafter referred to as intra-predictive coding) similar to H.264 / AVC. In this case, the intra-predictive mode (or prediction direction) of the current block can be induced from surrounding blocks located around the current block and coded.
[0084] As described above, the predicted image for a signal acquired by performing a prediction based on the intra-prediction mode may have a difference value from the original image. Such a difference image, which has a difference value between the predicted image and the original image, can be entropy encoded through frequency domain transformation and quantization. In this case, in order to improve the encoding efficiency of the frequency domain transformation, integer transformation, integer discrete cosine transform (DCT), integer discrete sine transform (DST), or intra-prediction mode dependent DCT / DST can be selectively and adaptively applied depending on the block size.
[0085] Furthermore, a Transform SKIP algorithm can be applied to improve encoding efficiency for screen content such as document videos or PowerPoint presentation videos.
[0086] When a transformation-skipping algorithm is applied, the encoder quantizes the difference image (residual block) containing the difference between the original image and the predicted image without the frequency transformation process, and then performs entropy coding on the residual block. The decoder then performs entropy decoding on the residual block and inverse quantization (scaling) to generate the restored residual block. Therefore, blocks to which such a transformation-skipping algorithm is applied skip the frequency transformation / inverse transformation process.
[0087] In the quantization / dequantization process, different scale factors can be applied depending on the position of the transformation coefficients within a block to improve the subjective image quality. Alternatively, there is a method of applying the same scale factor regardless of the position of the transformation coefficients within a block when performing quantization / dequantization. Whether or not such a method is applicable can be signaled via the bitstream's SPS (Sequence Parameter Set) or PPS (Picture Parameter Set).
[0088] As one embodiment of the above process, the scaling process for transform coefficients can be performed as follows.
[0089] Scaling process of transformation coefficients
[0090] The inputs here are as follows:
[0091] -Current width of the conversion block; nW
[0092] -Current height of the conversion block Height;nH
[0093] - element (element) c ij Array of conversion coefficients having (nW × nH)
[0094] - Index for the luminance and chrominance signals of the current block; cIdx
[0095] If cIdx is '0', it represents the luminance signal; if cIdx is '1' or cIdx is '2', it represents the chrominance signal. Furthermore, if cIdx is '1', it represents Cb in the chrominance signal; and if cIdx is '2', it represents Cr in the chrominance signal.
[0096] -Quantization parameter; qP
[0097] The output here is as follows:
[0098] -Array of scaled transformation coefficients; (nW × nH)array d ij
[0099] The variable log2TrSize is induced via log2TrSize=(Log2(nW)+Log2(nH))>>1. The variable shift is induced differently depending on cIdx. When cIx is '0' (for the luminance signal), shift=BitDepth Y Induced from +log2TrSize-5, otherwise (in the case of a color difference signal), shift=BitDepth C This is derived from +log2TrSize-5. Here, BitDepth Y and BitDepth C This refers to the current number of bits per sample for the video (e.g., 8 bits).
[0100] The array levelScale[] for the scaling variable is given by the following formula 1.
[0101]
number
[0102] The scaled transformation coefficients are calculated through the following process.
[0103] First, the scale factor m ij This is induced through the following process.
[0104] -If scaling_list_enable_flag is '0', m ij This is derived as shown in equation 2 below.
[0105]
number
[0106] - In other cases, m ij is derived as shown in the following Equation 3.
[0107]
Equation
[0108] Here, SizeID is derived through Table 1 below according to the size of the transform block, RefMatrixID, and trafoType are each derived from the following Equations 4 and 5. Also, in Equation 4, scaling_list_pred_matrix_id_delta is signaled via the SPS (Sequence Parameter Set) or PPS (Picture Parameter Set) of the bitstream.
[0109]
Equation
[0110]
Equation
[0111] Table 1 is an example showing the SizeID values according to the size of the transform block.
[0112]
Table 1
[0113] Next, the scaled transform coefficient d ij is derived from the following Equation 6.
[0114]
Equation
[0115] On the other hand, as mentioned above, blocks to which the conversion skip algorithm is applied (hereinafter referred to as conversion skip blocks) do not perform the frequency conversion process. Therefore, blocks that perform the existing frequency conversion process and conversion skip blocks can have different conversion coefficient characteristics. In other words, if the scaling method applied to blocks that perform the existing frequency conversion process is applied directly to conversion skip blocks, the coding efficiency can be reduced.
[0116] Therefore, the present invention provides a method for performing scaling while taking into account the case of conversion skip blocks.
[0117] When using quantization matrices (basic and non-basic matrices) in encoders and decoders to improve the subjective image quality of an image, they can be applied in such a way that the scale factor derived from the quantization matrix differs depending on the position of the transform coefficient within a block. This method utilizes the property that when a block is transformed, the energy of the residual block is compressed to the upper left edge of the block (low-frequency region), and thus quantization is performed with a larger step size in the high-frequency region, which is generally less sensitive to the human eye, than in the low-frequency region, which is more sensitive to the human eye. Through this method, subjective image quality can be improved in the human eye-sensitive region during image encoding.
[0118] However, when a transformation skip is applied, the remaining blocks do not undergo frequency-domain transformations / inverse transformations and are therefore not compressed to the lower frequency domain within the block. In such cases, applying the existing quantization / inverse quantization method used in the frequency domain has the disadvantage of severe distortion in the image or within the block. Therefore, when using quantization matrices in an image, a scaling (quantization / inverse quantization) method is needed for blocks that do not undergo frequency-domain transformations / inverse transformations (transformation-skipped blocks) that can minimize distortion in the image or within the block. For example, one method is to not apply the quantization matrix to transformation-skipped blocks. Such a method allows the base scale factor to be applied the same way regardless of the position of the transformation coefficients within the block.
[0119] [Example 1] Method and apparatus for applying the same scale factor to a conversion skip block regardless of the position of the conversion coefficient within the block.
[0120] Figure 6 is a flowchart showing a scaling method for residual signals (or conversion coefficients) according to one embodiment of the present invention.
[0121] The method shown in Figure 6 can be performed using the encoding device shown in Figure 1 or the decoding device shown in Figure 2, as described above. More specifically, it can be performed using the quantization unit or dequantization unit of Figure 1 or Figure 2. In the embodiment of Figure 6, for the sake of explanation, the method of Figure 6 is described as being performed using the encoding device, but it can be applied in the same way to the decoding device.
[0122] Referring to Figure 6, the scale factor (m) applied when scaling (quantizing or dequantizing) the residual signal (or transformation coefficient) of the current block is shown. ij This can be induced by whether the current block is a transformation skip block.
[0123] The encoding device determines whether the current block is a conversion skip block (S600).
[0124] At this point, whether the current block is a trans-skip block can be determined by information indicating whether it is a trans-skip block. For example, the information indicating whether it is a trans-skip block is a flag (transSkipFlag). The value of such a flag, transSkipFlag, can be derived by entropy decoding the information about trans-skip blocks in the bitstream. If the current block is a trans-skip block, the transSkipFlag value is 1, and if the current block is not a trans-skip block, the transSkipFlag value is 0.
[0125] If the current block is a trans-skip block (for example, if the transSkipFlag value is 1), the encoding device will scale the factor (m) regardless of the position of the residual signal (or trans-factor) within the current block. ij This induces (S610).
[0126] At this time, as shown in Figure 6, the scale factor (m ij ) can be set to a predetermined base scale factor value (T). For example, a predetermined base scale factor value (T) is 16.
[0127] In contrast, if the current block is not a trans-skip block (for example, if the transSkipFlag value is 0), the encoder uses a scale factor (m) based on the position of the residual signal (or trans-factor) within the current block. ij This induces (S620).
[0128] At this time, the scale factor (m ij ) can be set differently depending on the position of the residual signal (or transformation coefficient) in the current block using the quantization matrix, and can be derived as shown in Figure 6, as shown in Equation 7 below.
[0129]
number
[0130] Here, ScalingFactor is an array that stores the scale factor. SizeID is a value that indicates the size of the current block (transformation block or quantization matrix), and the SizeID value can be derived from the size of the current block (transformation block) as shown in Table 1 above. RefMatrixID and trafoType can be derived from equations 8 and 9 below, respectively. nW represents the width of the current block.
[0131]
number
[0132] Here, the MatrixID value represents the type of quantization matrix based on the prediction mode and color component. For example, the MatrixID value can be derived as shown in Table 2 below. scaling_list_pred_matrix_id_delta is signaled via the bitstream's SPS (Sequence Parameter Set) or PPS (Picture Parameter Set).
[0133]
number
[0134] Here, nW represents the current width of the block, and nH represents the current height of the block.
[0135] Table 2 shows the MatrixID values by prediction mode and color component.
[0136] [Table 2]
[0137] Figure 7 is a flowchart illustrating a scaling method for residual signals (or conversion coefficients) according to another embodiment of the present invention.
[0138] The method shown in Figure 7 can be performed using the encoding device shown in Figure 1 or the decoding device shown in Figure 2, as described above. More specifically, it can be performed using the quantization unit or dequantization unit of Figure 1 or Figure 2. In the embodiment of Figure 7, for the sake of explanation, the method of Figure 7 is described as being performed using the encoding device, but it can be applied in the same way to the decoding device.
[0139] Referring to Figure 7, the scale factor (m) applied when scaling (quantizing or dequantizing) the residual signal (or transformation coefficient) of the current block is shown. ij This can be derived from whether the current block is a transformation skip block and whether a quantization matrix can be used.
[0140] The encoding device determines whether the current block uses a quantization matrix and whether it is a transformation skip block (S700).
[0141] At this point, whether a block currently uses a quantization matrix can be determined through information indicating whether or not the quantization matrix is available. For example, the information indicating whether or not the quantization matrix is available is a flag (scaling_list_enable_flag). The value of such a flag, scaling_list_enable_flag, can be derived by entropy decoding the information regarding the use of the quantization matrix in the bitstream. If the block currently uses a quantization matrix, the scaling_list_enable_flag value is 1, and if the block currently does not use a quantization matrix, the scaling_list_enable_flag value is 0.
[0142] Furthermore, whether the current block is a trans-skip block can be determined through information indicating whether it is a trans-skip block. For example, the information indicating whether it is a trans-skip block is a flag (transSkipFlag). The value of such a flag, transSkipFlag, can be derived by entropy decoding the information about trans-skip blocks in the bitstream. If the current block is a trans-skip block, the transSkipFlag value is 1, and if the current block is not a trans-skip block, the transSkipFlag value is 0.
[0143] If the current block is a transform skip block or does not use a quantization matrix (e.g., transSkipFlag==1 or scaling_list_enable_flag==0), the encoder will not apply the scale factor (m) regardless of the position of the residual signal (or transform coefficient) within the current block. ij This induces (S710).
[0144] At this time, as shown in Figure 7, the scale factor (m ij ) can be set to a predetermined base scale factor value (T). For example, a predetermined base scale factor value (T) is 16.
[0145] Otherwise (when the current block is not a transformation skip block and a quantization matrix is used), the encoding device uses a scale factor (m) based on the position of the residual signal (or transformation coefficient) within the current block. ij This induces (S720).
[0146] At this time, the scale factor (m ij The scale factor (m) can be set to vary depending on the position of the residual signal (or transformation coefficient) in the current block using the quantization matrix, and can be derived as shown in the formula in step S720 of Figure 7. The scale factor (m) derived via the formula shown in step S720 ijThe explanation for this is the same as in Figure 6 (Step S620), so we will omit the explanation here.
[0147] As described above with reference to Figures 6 and 7, when the current block (the block currently to be encoded or decoded) is a conversion skip block, a scale factor having a predetermined value (T) is applied to the current block (conversion skip block) regardless of the position of the coefficients (or signals) within the current block. In this case, the scale factor value according to the embodiment of the present invention can be set to differ depending on the various encoding parameters applied to the block.
[0148] As an example, the scale factor value applied to the relevant block can be set as follows by the value of a parameter (e.g., scaling_list_enable_flag) that indicates whether or not the quantization matrix can be used.
[0149] -When using a quantization matrix (e.g., scaling_list_enable_flag==1), the base scale factor value is set to 'T1' (m ij =T1)
[0150] -If a quantization matrix is not used (e.g., scaling_list_enable_flag==0), the base scale factor value is set to 'T2' (m ij =T2)
[0151] Here, the T1 and / or T2 values may be determined and signaled by the encoder, or predetermined values may be used. If signaling is done via a bitstream, the decoder can parse the bitstream to obtain the T1 and / or T2 values.
[0152] As another example, the scale factor value applied to a given block can be set as follows by a value of information (e.g., hue component index cIdx) that can derive the hue characteristics of the signal in that block. The hue component index cIdx represents either the luminance signal (Y signal) or the chrominance signal (Cb signal or Cr signal) depending on its value.
[0153] -Example 1: Set the base scale factor value to 'Ty' or 'Tc' depending on whether the signal in the block is a brightness signal (luminance signal). For example, if it is a brightness signal, set the base scale factor value to 'Ty', and if it is not a brightness signal (i.e., a chrominance signal), set the base scale factor value to 'Tc'.
[0154] -Example 2: Set the base scale factor value for each hue component of the relevant block. For example, set the base scale factor value to 'Ty' for the luminance signal (Y signal), set the base scale factor value to 'Tcb' for the chrominance signal (Cb signal), and set the base scale factor value to 'Tcr' for the chrominance signal (Cr signal).
[0155] Here, the Ty, Tc, Tcb, and / or Tcr values may be determined and signaled by the encoder, or predetermined values may be used. If signaling is done via a bitstream, the decoder can parse the bitstream to obtain the Ty, Tc, Tcb, and / or Tcr values.
[0156] The method for determining the basic scale factor by encoding parameters according to the embodiments of the present invention described above may be applied independently or in combination, but the same scale factor value must always be applied to the same transformation skip block, regardless of the position of the coefficient (or signal) within the block (the block to be encoded or decoded).
[0157] The scaling process for transform coefficients, reflecting the embodiments of the present invention described above, can be performed as follows.
[0158] Scaling process of transformation coefficients
[0159] The inputs here are as follows:
[0160] -Current width of the conversion block; nW
[0161] -Current height of the conversion block Height;nH
[0162] - element (element) c ij Array of conversion coefficients having (nW × nH)
[0163] - Information on whether conversion skipping is currently applicable to the conversion block.
[0164] - Index for the luminance and chrominance signals of the current block; cIdx
[0165] If cIdx is '0', it represents the luminance signal; if cIdx is '1' or cIdx is '2', it represents the chrominance signal. Furthermore, if cIdx is '1', it represents Cb in the chrominance signal; and if cIdx is '2', it represents Cr in the chrominance signal.
[0166] -Quantization parameter; qP
[0167] The output here is as follows:
[0168] -Array of scaled transformation coefficients; (nW × nH)array d ij
[0169] The variable log2TrSize is induced via log2TrSize=(Log2(nW)+Log2(nH))>>1. The variable shift is induced differently depending on cIdx. When cIx is '0' (for the luminance signal), shift=BitDepth Y Induced from +log2TrSize-5, otherwise (in the case of a color difference signal), shift=BitDepth C This is derived from +log2TrSize-5. Here, BitDepth Y and BitDepth C This refers to the current number of bits per sample for the video (e.g., 8 bits).
[0170] The array of scaling variables, levelScale[], is given by the following formula 10.
[0171]
number
[0172] The scaled transformation coefficients are calculated through the following process.
[0173] First, the scale factor m ij This is induced through the following process.
[0174] -If scaling_list_enable_flag is '0', or if the current conversion block is a conversion skip block, m ij This is derived as shown in equation 11 below.
[0175]
number
[0176] -In other cases, m ij This is derived as shown in equation 12 below.
[0177]
number
[0178] Here, SizeID is derived from the block size via Table 1 mentioned above, and RefMatrixID and trafoType are derived from equations 13 and 14 below, respectively. In equation 13, scaling_list_pred_matrix_id_delta is signaled via the bitstream's SPS (Sequence Parameter Set).
[0179]
number
[0180]
number
[0181] Next, the scaled transformation coefficient d ij This is derived from the following equation 15.
[0182]
number
[0183] On the other hand, as described above, the transformation coefficients scaled through the scaling process undergo the inverse transformation process. In this case, the current transformation block to which transformation skipping has been applied does not perform the inverse transformation process, but only the 'shift' operation process as shown below.
[0184] 1. If the current block's cIdx is '0' (for the luminance signal), then shift = 13 - BitDepth Y And in other cases (for color difference signals), shift = 13 - BitDepth C That is the case.
[0185] 2. Array r for the remaining block ij(i=0..(nW)-1,j=0..(nH)-1) is set as follows.
[0186] If shift is greater than '0', r ij =(d ij +(1<<(shift-1)))>>shift, and otherwise r ij =(d ij <<(-shift)
[0187] Here, d ij is an array for scaled transformation coefficients, and r ij This represents the array for the residual blocks obtained by inversely transforming the scaled transformation coefficients.
[0188] As an example that reflects the inverse transformation process of the scaled transformation coefficients described above, the transformation process for scaled transformation coefficients can be performed as follows.
[0189] Transformation process for scaled transformation coefficients
[0190] The inputs here are as follows:
[0191] -Current width of the conversion block; nW
[0192] -Current height of the conversion block Height;nH
[0193] -element(d) ij An array of scaled transformation coefficients having (nW × nH)
[0194] - Information on whether conversion skipping is applicable to the current block.
[0195] - Index for the luminance and chrominance signals of the current block; cIdx
[0196] If cIdx is '0', it represents the luminance signal; if cIdx is '1' or cIdx is '2', it represents the chrominance signal. Furthermore, if cIdx is '1', it represents Cb in the chrominance signal; and if cIdx is '2', it represents Cr in the chrominance signal.
[0197] The output here is as follows:
[0198] - An array for the residual block obtained by inversely transforming the scaled transformation coefficients; (nW × nH) array r
[0199] If the current encoding mode for a block (PredMode) is Intra prediction mode, the Log2(nW*nH) value is '4', and the cIdx value is '0', then the variables horizTrType and vertTrType are determined by the Intra prediction mode of the luminance signal, as shown in Table 3 below. Otherwise, the variables horizTrType and vertTrType are set to '0'.
[0200] Table 3 shows an example of horizTrType and vertTrType values for the intra prediction mode.
[0201] [Table 3]
[0202] The residual signals for the current block are obtained in the following order.
[0203] First, if a conversion skip has been applied to the current block, apply the following:
[0204] 1. If cIdx is '0', then shift = 13 - BitDepth Y And in other cases, shift=13-BitDepth C That is the case.
[0205] 2. Array r for the remaining block ij (i=0..(nW)-1,j=0..(nH)-1) is set as follows.
[0206] -If shift is greater than '0', r ij =(d ij +(1<<(shift-1)))>>shift, and otherwise r ij =(d ij <<(-shift)
[0207] If conversion skipping is not currently applied to the block, apply the following:
[0208] 1. Perform an inverse transform process on the scaled transformation coefficients, which have variables horizTrType and vertTrType values. First, taking the current block size (nW, nH), the scaled transformation coefficient array (nW × nH array d), and the variable horizTrType as inputs, perform a one-dimensional inverse transform horizontally to output an array (nW × nH array e).
[0209] 2. Next, the array (nW×nH array e) is input, and the array (nW×nH array g) is generated as shown in equation 16 below.
[0210]
number
[0211] 3. Next, taking the current block size (nW, nH), array (nW × nH array g), and the variable vertTrType as input, we perform a one-dimensional inverse transform vertically.
[0212] 4. Next, the array (nW × nH) array r for the remaining block is set using cIdx as shown in equation 17 below.
[0213]
number
[0214] Here, if cIdx is '0', then shift = 20 - BitDepth Y And in other cases, shift=20-BitDepth C It has a value. BitDepth refers to the number of bits (e.g., 8 bits) of the sample for the current video.
[0215] The restored residual block can be generated by performing the scaling process for the transformation coefficients and the transformation process for the scaled transformation coefficients as described above. Then, the restored block can be generated by adding the predicted block generated via intra-prediction or inter-prediction to the restored residual block. In this case, the restored block may be a block to which a loop filter has been applied, or it may be a block to which a loop filter has not been applied.
[0216] The present invention provides a method for signaling the base scale factor, which is induced by whether or not a transformation skip block is present.
[0217] According to one embodiment of the present invention, the base scale factor induced by whether or not a transformation skip block is present can be signaled via SPS (Sequence Parameter Set).
[0218] Table 4 shows an example of SPS syntax for signaling basic scale factor information according to one embodiment of the present invention.
[0219] [Table 4]
[0220] Referring to Table 4, transform_skip_enabled_flag indicates whether the transform-skip algorithm is currently being used for the sequence.
[0221] If the conversion skip algorithm is used, flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 are signaled. Here, these values can be encoded (se(v)) in a form with a positive or negative sign, or they can be encoded (ue(v)) in a form with 0 and a positive sign.
[0222] flat_scale_factor_y_minus16 represents the scale factor for the luminance signal. For example, if the value of flat_scale_factor_y_minus16 is '0', the scale factor for the luminance signal will be '16' (0 + 16).
[0223] flat_scale_factor_cb_minus16 represents the scale factor for the chrominance signal Cb, and flat_scale_factor_cr_minus16 represents the scale factor for the chrominance signal Cr.
[0224] In connection with this, the scale factor for the luminance signal or chrominance signal can be derived as shown in equations 18 to 20 below.
[0225] Here, the basic scale factor FlatScalingFactor[cIdx] stores the scale factor for the luminance signal and the chrominance signal. For example, a hue component index cIdx of 0 indicates the luminance (Y) signal, 1 indicates the Cb chrominance signal, and 2 indicates the Cr chrominance signal. Furthermore, the FlatScalingFactor[cIdx] value can have any range of values; for example, for an 8-bit signal, it can have values from '-15' to '255-16'.
[0226] The basic scale factor for the luminance signal can be derived as in Equation 18.
[0227] [Number]
[0228] The basic scale factor for the Cb chrominance signal can be derived as in Equation 19.
[0229] [Number]
[0230] The basic scale factor for the Cr chrominance signal can be derived as in Equation 20.
[0231] [Number]
[0232] By reflecting a method of signaling a basic scale factor derived based on whether it is the conversion skip block according to an embodiment of the present invention described above, the scaling process for transform coefficients can be performed as follows.
[0233] Scaling process of transformation coefficients
[0234] The input here is as follows.
[0235] - Width of the current conversion block; nW
[0236] - Height of the current conversion block; nH
[0237] - Element c ijArray of conversion coefficients having; (nW×nH)array d
[0238] - Information on whether conversion skip can be applied to the current conversion block; transSkipFlag
[0239] When the transSkipFlag value is 1, it indicates that conversion skip has been applied to the current block. When the transSkipFlag value is 0, it indicates that conversion skip has not been applied to the current block.
[0240] - Index for the luminance signal and color difference signals of the current block; cIdx
[0241] If cIdx is '0', it means the luminance signal. If cIdx is '1' or cIdx is '2', it means the color difference signal. Also, when cIdx is '1', it means Cb as the color difference signal, and when cIdx is '2', it means Cr as the color difference signal.
[0242] - Quantization parameter; qP
[0243] The output here is as follows.
[0244] - Array for the scaled conversion coefficients; (nW×nH)array d ij
[0245] The variable log2TrSize is derived through log2TrSize=(Log2(nW)+Log2(nH))>>1. The variable shift is derived differently depending on cIdx. When cIx is '0' (in the case of the luminance signal), shift = BitDepth Y is derived from +log2TrSize - 5, and in other cases (in the case of the color difference signal), shift = BitDepth C is derived from +log2TrSize - 5. Here, BitDepth Y and BitDepth C mean the number of bits of the samples for the current video (e.g., 8 bits).
[0246] The array levelScale[] of scaling variables is as shown in the following Equation 21.
[0247]
Number
[0248] <第 The scaled conversion coefficient is calculated through the following process.
[0249] <第 First, the scale factor m ij is derived through the following process.
[0250] <第 - If the scaling_list_enable_flag is '0', m ij is derived as shown in the following Equation 22.
[0251] <第 <第
Number
[0252] <第 - Otherwise (that is, when the scaling_list_enable_flag is '1'), m ij is derived as shown in the following Equation 23. <第 <第
[0253] <第 <第
Number
[0254] <第 Here, SizeID is derived through Table 1 described above according to the block size, and RefMatrixID and trafoType are derived from the following Equation 24 and Equation 25 respectively. In Equation 24, scaling_list_pred_matrix_id_delta is signaled through the SPS (Sequence Parameter Set) of the bit stream. <第 <第
[0255] <第 <第
Number
[0256]
number
[0257] Next, the scaled transformation coefficient d ij This is derived from the following equation 26.
[0258]
number
[0259] On the other hand, the basic scale factor, which is induced by whether or not a conversion skip block is present according to the embodiment of the present invention, can be signaled not only through the aforementioned SPS, but also through the PPS (Picture Parameter Set) or SliceHeader. It can also be signaled in CU units or TU units.
[0260] The flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 values signaled by the aforementioned SPS can be updated and used in PPS (or SliceHeader, CU, TU).
[0261] Table 5 shows an example of PPS syntax for signaling basic scale factor information according to another embodiment of the present invention.
[0262] [Table 5]
[0263] Referring to Table 5, the transform_skip_enabled_flag indicates whether the transform skip algorithm is currently being used on the video. If the transform skip algorithm is being used, the pps_flat_scaling_factor_present_flag value is signaled.
[0264] For example, if the pps_flat_scaling_factor_present_flag value is '0', the flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 applied in the aforementioned SPS are used as scale factors for the conversion skip block. On the other hand, if the pps_flat_scaling_factor_present_flag value is '1', the corresponding value is signaled in order to update the flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 values applied in the aforementioned SPS.
[0265] The signaled flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 values are used as the scale factor for the current video's transformation skip block. These values can then be used persistently until they are changed again. Alternatively, these values can be applied only to the current video, and the scale factor values used in SPS can be applied to the next video.
[0266] Here, flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 can be encoded (se(v)) in a form with a positive or negative sign. Alternatively, these values can be encoded (ue(v)) in a form with 0 and a positive sign.
[0267] The flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 values can be different for each luminance signal and chrominance signal, and each can be used for signaling. For example, the flat_scale_factor_y_minus16 value can be used when signaling the scale factor for the luminance signal, the flat_scale_factor_cb_minus16 value can be used when signaling the scale factor for the Cb chrominance signal, and the flat_scale_factor_cr_minus16 value can be used when signaling the scale factor for the Cr chrominance signal. Alternatively, flat_scale_factor_y_minus16 can be used as the scale factor for the luminance signal and flat_scale_factor_cb_cr_minus16 can be used as the scale factor for the chrominance signal for signaling. Alternatively, a single value flat_scale_factor_y_cb_cr_minus16 can be used as the scale factor for both the luminance signal and the chrominance signal for signaling.
[0268] As mentioned above, the flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 values signaled by SPS or PPS can be updated and used in SliceHeader (or CU, TU).
[0269] Table 6 shows an example of a slice header syntax for signaling basic scale factor information according to another embodiment of the present invention.
[0270] [Table 6]
[0271] Referring to Table 6, the transform_skip_enabled_flag indicates whether the transform skip algorithm is currently used for the slice. If the transform skip algorithm is used, the flat_scaling_factor_override_flag value is signaled.
[0272] For example, if the flat_scaling_factor_override_flag value is '0', the flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 applied in the aforementioned SPS or PPS are used as scale factors for the conversion skip block. On the other hand, if the flat_scaling_factor_override_flag value is '1', the corresponding value is signaled to update the flat_scale_factor_y_minus16, flat_scale_factor_cb_minus16, and flat_scale_factor_cr_minus16 values applied in the aforementioned SPS or PPS.
[0273] The values flat_scale_factor_y_delta, flat_scale_factor_cb_delta, and flat_scale_factor_cr_delta are currently used as scale factors for the slice's transformation skip blocks.
[0274] Here, the values of flat_scale_factor_y_delta, flat_scale_factor_cb_delta, and flat_scale_factor_cr_delta can be encoded (se(v)) in a form with a positive or negative sign. Alternatively, these values can be encoded (ue(v)) in a form with 0 and a positive sign.
[0275] The flat_scale_factor_y_delta, flat_scale_factor_cb_delta, and flat_scale_factor_cr_delta values can be different for each luminance signal and chrominance signal, and can be used for signaling accordingly. For example, the flat_scale_factor_y_delta value can be used when signaling the scale factor for the luminance signal, the flat_scale_factor_cb_delta value can be used when signaling the scale factor for the Cb chrominance signal, and the flat_scale_factor_cr_delta value can be used when signaling the scale factor for the Cr chrominance signal. Alternatively, flat_scale_factor_y_delta can be used as the scale factor for the luminance signal and flat_scale_factor_cb_cr_delta can be used as the scale factor for the chrominance signal. Or, a single value flat_scale_factor_y_cb_cr_delta can be used as the scale factor for both the luminance signal and the chrominance signal.
[0276] As described above, the basic scale factor can be derived using the signaled flat_scale_factor_y_delta, flat_scale_factor_cb_delta, and flat_scale_factor_cr_delta values as shown in equations 27 to 29 below.
[0277] Here, the basic scale factor FlatScalingFactor[cIdx] stores the scale factor for the luminance signal and the chrominance signal. For example, a hue component index cIdx of 0 indicates the luminance (Y) signal, 1 indicates the Cb chrominance signal, and 2 indicates the Cr chrominance signal. Furthermore, the FlatScalingFactor[cIdx] value can have any range of values; for example, for an 8-bit signal, it can have values from '-15' to '255-16'.
[0278] The fundamental scale factor for the luminance signal can be derived using flat_scale_factor_y_delta as shown in Equation 27.
[0279]
number
[0280] The fundamental scale factor for a Cb chrominance signal can be derived using flat_scale_factor_cb_delta as shown in Equation 28.
[0281]
number
[0282] The fundamental scale factor for the Cr chrominance signal can be derived using flat_scale_factor_cr_delta as shown in Equation 29.
[0283]
number
[0284] On the other hand, the embodiments described above can have different scopes depending on the block size or CU depth or TU depth. The variables that determine the scope in this way (e.g., block size or depth information) may be set so that the encoder and decoder use predetermined values, or they may be set to use values determined by a profile or level, or the encoder may be set so that when it writes the variable value to the bitstream, the decoder retrieves and uses this value from the bitstream.
[0285] When the scope of application needs to vary depending on the CU depth, the following three methods can be applied, as illustrated in Table 7: Method A applies only to depths greater than or equal to a given depth, Method B applies only to depths less than or equal to a given depth, and Method C applies only to a given depth.
[0286] Table 7 shows an example of how to determine the scope to which the method of the present invention is applied based on the CU (or TU) depth. In Table 7, the notation 'O' means that the method is applied to the corresponding CU (or TU) depth, and the notation 'X' means that the method is not applied to the corresponding CU (or TU) depth.
[0287] [Table 7]
[0288] Referring to Table 7, when the CU (or TU) depth is 2, methods A, B, and C can all be applied to embodiments of the present invention.
[0289] If the embodiments of the present invention are not applied to all depths of the CU (or TU), this can be expressed using an arbitrary indicator (e.g., flag), or by signaling a value one greater than the maximum CU depth as the CU depth value indicating the scope of application.
[0290] Furthermore, the method for determining the scope to which the method of the present invention is applied based on the CU (or TU) depth described above can be applied differently depending on the size of the luminance block and the chrominance block, and can also be applied differently to the luminance image and the chrominance image.
[0291] Table 8 shows a schematic example of a combination of methods for determining the applicability range based on the size of the luminance block and chrominance block.
[0292] [Table 8]
[0293] Looking at method "T1" in Table 8, when the size of the luminance block is 8 (8×8, 8×4, 2×8, etc.) and the size of the chrominance block is 4 (4×4, 4×2, 2×4), Example 1 of the present invention (T1-Example 1) can be applied to the luminance signal and chrominance signal, as well as the horizontal signal and vertical signal.
[0294] In the embodiments described above, the method is explained based on a flowchart in a series of steps or blocks, but the present invention is not limited to the order of the steps, and some steps may occur with other steps, in a different order, or simultaneously. Furthermore, a person with ordinary skill in the art will understand that the steps shown in the flowchart are not exclusive, other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.
[0295] The above description is merely illustrative of the technical concept of the present invention, and a person with ordinary skill in the art to which the present invention belongs can make various modifications and variations within the bounds of the essential characteristics of the present invention. Therefore, the embodiments disclosed herein are for illustrative purposes only, not to limit the technical concept of the present invention, and the scope of the technical concept of the present invention is not limited by such embodiments. The scope of protection of the present invention must be interpreted in accordance with the claims, and all technical concepts within an equivalent scope must be interpreted as being included in the scope of the rights of the present invention.
Claims
1. An image decoding method including a decoding device, A step of deriving a scale factor for the current block based on whether the current block is a conversion skip block; A step of scaling the current block to a transformation coefficient based on the scale factor; A step of obtaining a residual sample of the current block by selectively performing an inverse transform on the scaled transformation coefficients; A step of performing a prediction on the current block and generating a predicted block; A step of restoring the current block based on the residual sample and the predicted block; Includes, If the current block is not a transformation skip block, the scale factor for the current block is derived based on the quantization matrix defined by the decoding device and the position of the transformation coefficients within the current block. If the current block is the conversion skip block, the scale factor for the current block is derived to be equal to a fixed constant value, regardless of the position of the conversion coefficient within the current block. The transformation skip block is identified based on information indicating whether or not to apply the inverse transformation to the current block. The image decoding method is characterized in that the prediction is an intra-prediction.
2. The image decoding method according to claim 1, characterized in that the fixed constant value is 16.
3. An image coding method including an encoding device, Steps to perform a prediction on the current block and generate a predicted block; A step of generating a residual sample of the current block based on the current block and the predicted block, The steps include obtaining conversion coefficients by selectively performing a transformation on the residual sample of the current block, The steps include determining the scale factor for the current block based on whether or not the current block is a conversion skip block, A step of performing quantization on the transformation coefficient of the current block based on the scale factor; Includes, If the current block is not the transformation skip block, the scale factor for the current block is determined based on the quantization matrix defined by the encoding device and the position of the transformation coefficients within the current block. If the current block is the conversion skip block, the scale factor for the current block is determined to be equal to a fixed constant value, regardless of the position of the conversion coefficient within the current block. The instruction for the transformation skip block is encoded using information indicating whether or not to apply the inverse transformation to the current block. The image coding method is characterized in that the prediction is an intra-prediction.
4. The image coding method according to claim 3, characterized in that the fixed constant value is 16.
5. A method for transmitting a bitstream generated by an image coding method with an encoding device, The steps include transmitting the bitstream, Includes, The aforementioned image encoding method is Steps to perform a prediction on the current block and generate a predicted block; A step of generating a residual sample of the current block based on the current block and the predicted block, The steps include obtaining conversion coefficients by selectively performing a transformation on the residual sample of the current block, The steps include determining the scale factor for the current block based on whether or not the current block is a conversion skip block, A step of performing quantization on the transformation coefficient of the current block based on the scale factor; Includes, If the current block is not the transformation skip block, the scale factor for the current block is determined based on the quantization matrix defined by the encoding device and the position of the transformation coefficients within the current block. If the current block is the conversion skip block, the scale factor for the current block is determined to be equal to a fixed constant value, regardless of the position of the conversion coefficient within the current block. The instruction for the transformation skip block is encoded using information indicating whether or not to apply the inverse transformation to the current block. A method for transmitting a bitstream, characterized in that the prediction is an intra-prediction.
6. The method for transmitting a bitstream according to claim 5, characterized in that the fixed constant value is 16.