Video encoding method and device, and video decoding method and device
By determining block characteristics and applying scale factors, the method improves encoding and decoding efficiency for high-resolution video, addressing inefficiencies in existing technologies.
Patent Information
- Application Number
- JP2023223621
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2013-07-02
- Filing Date
- 2023-12-28
- Publication Date
- 2026-03-04
- Estimated Expiration
- 2033-07-02
AI Technical Summary
Existing video encoding and decoding technologies face inefficiencies in handling high-resolution and high-quality video formats, particularly in transforming and quantizing residual signals, leading to suboptimal coding and decoding efficiency.
A method and apparatus for generating and scaling transform coefficients, including determining whether a block is a transform skip block, applying a scale factor based on the block's characteristics, and using a quantization matrix to improve encoding and decoding efficiency.
The proposed method enhances encoding and decoding efficiency by optimizing the transform process for blocks that skip frequency conversion, reducing distortion and improving subjective image quality.
Smart Images

Figure 0007824272000038 
Figure 0007824272000039 
Figure 0007824272000040
Abstract
Description
[Technical Field]
[0001] The present invention relates to video encoding and decoding, and more particularly to scaling of transform coefficients. This invention relates to a ring method and apparatus. [Background technology]
[0002] Recently, HD (High Definition) resolution (1280 x 1024 or 192 Broadcasting services with a resolution of 1080x1080 are expanding not only in Korea but also around the world. As a result, many users have become accustomed to high-resolution, high-quality images, and in response, many In addition to HDTV, the development of next-generation video equipment is also accelerating. UHD (Ultra High Definition) has a resolution four times higher than As interest in video continues to grow, video standards bodies are increasingly demanding higher resolution and quality video. In addition, the need for compression technology has become apparent. It maintains the same image quality through higher compression efficiency than H.264 / AVC used in the player. At the same time, there is a pressing need for a new standard that can provide significant gains in terms of frequency bands and storage. is.
[0003] Currently, MPEG (Moving Picture Experts Group) and VCEG ( Video Coding Experts Group is working together to develop next-generation video codecs. Standardization of HEVC (High Efficiency Video Coding), a standard for It encodes video, including UHD video, with twice the compression efficiency of H.264 / AVC. This will not only be HD and UHD video, but also 3D broadcasting and mobile communication networks. Even on networks, it will be possible to provide high-quality images at lower frequencies than currently available. Summary of the Invention [Problem to be solved by the invention]
[0004] The present invention relates to a video encoding / decoding method and apparatus that can improve encoding / decoding efficiency. Provide a place.
[0005] The present invention provides a method for generating transform coefficients (or residual signals) that can improve encoding / decoding efficiency. A method and apparatus for scaling is provided.
[0006] The present invention provides a method for transforming skip blocks that can improve encoding / decoding efficiency. The present invention provides a quantization / dequantization method and apparatus. [Means for solving the problem]
[0007] According to one aspect of the present invention, there is provided a video decoding method, the video decoding method comprising: The schedule for the current block is determined depending on whether the block is a transform skip block. deriving a scale factor for the current block based on the scale factor; The method includes performing scaling on the block.
[0008] The scale factor for the current block is determined by the position of the transform coefficients within the current block. and the transform skip block applies a transform to the current block. The inverse transform is a block that is not used, and indicates whether to apply the inverse transform to the current block. It is identified based on the information.
[0009] The step of deriving a scale factor for the current block comprises: If the block is a transform skip block, the basic Derive the scale factor.
[0010] The base scale factor has a predetermined scale factor value, and the predetermined scale factor The factor value is 16.
[0011] The basic scale factor depends on whether the current block uses a quantization matrix. Each has a different scale factor value.
[0012] The basic scale factor is determined based on whether the current block is a luminance block or a chrominance block. The blocks have different scale factor values depending on whether they are blocks or not.
[0013] A flag indicating whether a transform skip algorithm is used for the image including the current block. Lag is signaled via PPS (Picture Parameter Set) .
[0014] The basic scale factors include scale factor information for the luminance signal and the color difference signal. nothing.
[0015] The step of deriving a scale factor for the current block comprises: If the block is a transform skip block or the current block does not use a quantization matrix, If so, the basic scale factor is derived regardless of the position of the transform coefficient within the current block.
[0016] The step of deriving a scale factor for the current block comprises: If the block is not a transform skip block, the transform coefficients are determined based on the position of the transform coefficients in the current block. A scale factor for the current block is derived using the quantization matrix.
[0017] According to another aspect of the present invention, there is provided a video decoding device, The skip block for the current block is determined depending on whether the current block is a transformation skip block. A scale factor is derived, and a scale for the current block is calculated based on the scale factor. It includes an inverse quantization unit that performs scaling.
[0018] The scale factor for the current block is determined by the position of the transform coefficients within the current block. and the transform skip block applies a transform to the current block. Information indicating whether to apply a transformation to the current block. It is identified based on:
[0019] According to another aspect of the present invention, there is provided a video encoding method, the video encoding method comprising: The skip block for the current block is determined depending on whether the current block is a transformation skip block. deriving a scale factor; and adjusting the current block based on the scale factor. The method includes performing scaling on the block.
[0020] The scale factor for the current block is determined by the position of the transform coefficients within the current block. and the transform skip block applies a transform to the current block. Information indicating whether to apply a transformation to the current block. It is identified based on:
[0021] The step of deriving a scale factor for the current block comprises: If the block is a transform skip block, the basic Derive the scale factor.
[0022] The base scale factor has a predetermined scale factor value, and the predetermined scale factor The factor value is 16.
[0023] The basic scale factor depends on whether the current block uses a quantization matrix. Each has a different scale factor value.
[0024] The basic scale factor is determined based on whether the current block is a luminance block or a chrominance block. The blocks have different scale factor values depending on whether they are blocks or not.
[0025] A flag indicating whether a transform skip algorithm is used for the image including the current block. Lag is signaled via PPS (Picture Parameter Set) .
[0026] The basic scale factors include scale factor information for the luminance signal and the color difference signal. nothing.
[0027] The step of deriving a scale factor for the current block comprises: If the block is a transform skip block or the current block does not use a quantization matrix, If so, the basic scale factor is derived regardless of the position of the transform coefficient within the current block.
[0028] The step of deriving a scale factor for the current block comprises: If the block is not a transform skip block, the transform coefficients are determined based on the position of the transform coefficients in the current block. A scale factor for the current block is derived using the quantization matrix.
[0029] According to another aspect of the present invention, there is provided a video encoding device. The skip block for the current block is determined depending on whether the current block is a transformation skip block. A scale factor is derived, and a scale for the current block is calculated based on the scale factor. It includes a quantizer that performs scaling.
[0030] The scale factor for the current block is determined by the position of the transform coefficients within the current block. and the transform skip block applies a transform to the current block. Information indicating whether to apply a transformation to the current block. It is identified based on: [Effects of the Invention]
[0031] The block to which the transform skip algorithm is applied does not undergo the transform / inverse transform process. Therefore, the blocks have different transform coefficient characteristics from those that have undergone the existing transform / inverse transform processes. That is, the scaling method applied to the block that has undergone the existing transform / inverse transform process is If the transform is applied to skip blocks, it may reduce the coding / decoding efficiency. Therefore, for a transform skip block, the transform coefficients are By applying scale factors in a similar manner, encoding and decoding efficiency is increased. It can be done. [Brief explanation of the drawings]
[0032] [Figure 1] 1 is a block diagram showing a configuration of an embodiment of a video encoding device to which the present invention is applied. [Figure 2] 1 is a block diagram showing a configuration of an embodiment of a video decoding device to which the present invention is applied; [Figure 3] 1 is a diagram illustrating a schematic division structure of an image when encoding the image; [Figure 4] FIG. 1 is a diagram showing the form of a prediction unit (PU) that a coding unit (CU) can include. [Figure 5] FIG. 1 is a diagram showing the form of a transform unit (TU) that can be included in a coding unit (CU). [Figure 6] 4 is a flow chart illustrating a method for scaling a residual signal (or a transform coefficient) according to an embodiment of the present invention. [Figure 7] 10 is a flow chart illustrating a method for scaling a residual signal (or a transform coefficient) according to another embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0033] Hereinafter, the embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing the above, specific descriptions of related known structures or functions are provided in the present specification. If it is determined that the gist of the content will be unclear, the relevant explanation may be omitted.
[0034] As used herein, one component may be linked or connected to another component. When a component is referred to as being directly connected to or connected to other components, It means that there are other components in between. In this document, the content that states that a specific configuration is included does not exclude configurations other than the relevant configuration. However, additional configurations may be included within the scope of the present invention or the spirit of the present invention. This means that
[0035] Terms such as first and second may be used to describe various configurations. The features are not limited by the terms. The terms do not separate one feature from another. For example, the first configuration may be used without departing from the scope of the present invention. can be named the second configuration, and similarly, the second configuration can be named the first configuration. can.
[0036] In addition, the components shown in the embodiments of the present invention are independent in order to exhibit different characteristic functions. The components are shown in the figure, and each component may be a separate hardware or a single software configuration. That is, for the sake of convenience, each component is not intended to be a separate component. The components are listed as follows: at least two of the components are integrated. It consists of one component, or one component is divided into multiple components to perform a function. Both integrated and separated embodiments of each component are within the scope of the present invention. As long as it does not deviate from the quality, it is within the scope of the present invention.
[0037] In addition, some components are not essential components that perform essential functions in the present invention, It is merely an optional component for performance enhancement. It may include only the essential components for realizing the essence of the present invention, excluding the components that are not included in the invention, and may be used merely as a functional element. The present invention also includes a structure including only essential components, excluding optional components used for performance improvement. falls within the scope of rights.
[0038] First, for the convenience of explanation and understanding of the invention, a brief explanation will be given of the terms used in this specification. Reveal.
[0039] A unit means a unit of video encoding and decoding. In decoding, a coding or decoding unit is a unit that divides one image into smaller units. When encoding or decoding is performed by dividing the data, the divided unit is called a block. k), macroblock (MB), coding unit (Coding Unit) CU), Prediction Unit (PU), Transform Unit ( Transform Unit (TU), Coding Block (CB) ), Prediction Block (PB), Transform Block (Trans Also, one unit is small in size. It can be divided into smaller sub-units.
[0040] A block is an M×N array of samples, where M and N are It has a positive integer value, and a block refers to a two-dimensional array.
[0041] The Transform Unit (TU) performs transformation, inverse transformation, quantization, and inverse quantization. Residual signal coding, such as coding / decoding of transform coefficients It is the basic unit for performing encoding / decoding, and one conversion unit is small in size. It can be divided into multiple transform units. At this time, the residual signal If the signal exists in block form, the residual block ck).
[0042] The quantization matrix is used to measure the subjective quality or It refers to a matrix used in the quantization or dequantization process to improve the visual image quality. The scaling matrix is also called a scaling list.
[0043] The quantization matrix can be a fundamental matrix (default matrix), a non-fundamental matrix (non-def can be divided into a ault matrix and a flat matrix The base matrix refers to a predetermined quantization matrix that is predefined in the encoder and decoder. Non-basic matrices are not predefined in the encoder and decoder but are sent / received by the user. A planar matrix is a matrix in which all elements have the same value. means.
[0044] Scaling refers to the process of multiplying the transform coefficient levels by a factor, The resulting transform coefficients are then scaled using dequantization. It is also called.
[0045] Transform coefficients are generated after performing the transformation. In this specification, quantized transform coefficients are defined as coefficient values obtained by applying quantization to transform coefficients. The transform coefficient level is also the same as the transform coefficient. It is used as a nickname.
[0046] The quantization parameter is the quantization and inverse This means the value used when scaling the transform coefficient levels in quantization. The parameter is a value that is mapped to a quantization step size.
[0047] A parameter set is a structure within a bitstream. This corresponds to the header information and contains the sequence parameter set. r set), picture parameter set, adaptation It is commonly called a parameter set (adaptation parameter set).
[0048] FIG. 1 is a block diagram showing the configuration of an embodiment of a video encoding device to which the present invention is applied. be.
[0049] Referring to FIG. 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 transform unit 130, and a quantization unit 140 , an entropy coding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, The image processing unit 100 includes a filter unit 180 and a reference image buffer 190 .
[0050] The video encoding device 100 performs intra mode or inter mode on the input video. By encoding in inter mode, you can output a bitstream. If it is in intra mode, the switch 115 is switched to intra, and the When in the inter mode, the switch 115 can be switched to intra mode. The prediction means intra-frame prediction, and the inter-prediction means inter-frame prediction. 100 generates a predicted block for an input block of an input image, and then compares the input block with the predicted block. The residual from the predicted block can be coded. Image means original picture.
[0051] In the case of the intra mode, the intra prediction unit 120 predicts the already coded blocks around the current block. / Perform spatial prediction using pixel values of the decoded block to obtain the predicted block. A block can be generated.
[0052] In the case of the inter mode, the motion prediction unit 111 uses the reference image buffer 1 It searches for the area that best matches the input block in the reference image stored in 90. The motion compensation unit 112 performs motion compensation using the motion vector. The predicted block can be generated by performing the following: where the motion vector is , a 2D vector used for inter prediction, and is the current encoding / decoding target image and the reference image. The offset between the images can be indicated.
[0053] The subtractor 125 subtracts the residual block from the difference between the input block and the generated predicted block. (residual block) can be generated.
[0054] The transform unit 130 performs a transform on the residual block to It can output the transform coefficients. The quantization unit 140 then converts the input transform coefficients into quantization parameters (quantization parameters). quantization by quantization parameter (or quantization parameter) The quantized coefficients can be output.
[0055] The entropy coding unit 150 uses the value calculated by the quantization unit 140 or the value calculated during the coding process. By performing entropy coding based on the coding parameter values, etc., the bit rate is increased. It can output a bit stream. Entropy coding is applied. When used, symbols with a high probability of occurrence are assigned fewer bits. symbols with low probability of occurrence are assigned a larger number of bits By expressing it as a symbol, the size of the bit string for the symbol to be encoded is reduced. Therefore, the compression performance of video coding can be improved through entropy coding. The entropy coding unit 150 uses exponential-global Exponential-Golomb, CAVLC (Context-Adapt ive Variable Length Coding), CABAC(Context- Coding methods such as Adaptive Binary Arithmetic Coding The method can be used.
[0056] The video encoding device 100 according to the embodiment of FIG. 1 performs inter-prediction encoding, i.e., inter-frame prediction. To perform the encoding, the currently encoded image is decoded to be used as a reference image. Therefore, the quantized coefficients are inversely quantized by the inverse quantization unit 160. The inversely quantized and inversely transformed coefficients are then added to adder 1 The predicted block is added to the block 75 to generate a reconstructed block.
[0057] The reconstructed block passes through a filter unit 180, which performs a deblocking filter. (deblocking filter), SAO (Sample Adaptive O At least one of ffset, ALF (Adaptive Loop Filter) The above can be applied to the restored block or the restored image. Deblocking filters are also called in-loop filters. It can remove block distortion that occurs at the boundary between blocks. An appropriate offset value can be added to the pixel value to compensate for the error. ALF performs filtering based on the comparison between the restored video and the original video. The reconstructed blocks that have passed through the filter unit 180 are stored in the reference image buffer 190. It can be stored.
[0058] FIG. 2 is a block diagram showing the configuration of an embodiment of a video decoding device to which the present invention is applied. be.
[0059] Referring to FIG. 2, a video decoding apparatus 200 includes an entropy decoding unit 210, an inverse quantization unit 220, and an inverse quantization unit 230. unit 220, an inverse transform unit 230, an intra prediction unit 240, a motion compensation unit 250, an adder 255, It includes a filter unit 260 and a reference image buffer 270 .
[0060] The video decoding device 200 receives the bitstream output from the encoder and outputs it to the decoder. By performing decoding in trans-mode or inter-mode, the reconstructed image, i.e., If the mode is Intra, the switch is set to Intra. If the switch is in inter mode, it can be switched to inter. Cut.
[0061] The video decoding device 200 decodes a residual block ( A reconstructed residual block is obtained and a predicted block is generated. Then, the reconstructed residual block and the predicted block are added to form a reconstructed block, i.e., , a recovery block can be generated.
[0062] The entropy decoding unit 210 encodes the input bitstream according to a probability distribution. Tropic decoding and quantized coefficient form It is possible to generate symbols including symbols of different states.
[0063] When the entropy decoding method is applied, symbols with high occurrence probability are assigned a small number of symbols. symbols with low probability of occurrence are assigned a larger number of bits. By representing symbols in a multi-bit format, the size of the bit string for each symbol is reduced. It can be done.
[0064] The quantized coefficients are inversely quantized in the inverse quantization unit 220 and inversely transformed in the inverse transformation unit 230. The quantized coefficients are then inverse quantized and inverse transformed to generate the reconstructed residual block. It is possible.
[0065] In the case of the intra mode, the intra prediction unit 240 predicts the already decoded data around the current block. The predicted block is generated by performing spatial prediction using the pixel values of the block. In the case of the inter mode, the motion compensation unit 250 generates the motion vector and and performing motion compensation using the reference image stored in the reference image buffer 270. The predicted block can be generated by:
[0066] The residual block and the predicted block are added via adder 255, and the added block The signal can be passed through the filter unit 260. The filter unit 260 performs deblocking filtering. At least one of the following is applied to the restored block or the restored image: The filter unit 260 outputs a reconstructed image, i.e., a restored image. The restored image is stored in the reference image buffer 270 and used for inter-prediction. This can be done.
[0067] FIG. 3 shows a schematic diagram of a video division structure when encoding the video.
[0068] HEVC (High Efficiency Video Coding) is a In order to efficiently divide the image, the coding is performed into coding units (CUs). Execute.
[0069] Referring to FIG. 3, in HEVC, video 300 is defined as a large coding unit (LCU). After dividing it into LCUs (Least Coding Units), The division structure is determined for each LCU. The division structure is used to efficiently encode video within the LCU 310. This means the distribution of coding units (CUs) for It is determined by dividing one CU into four CUs, each of which is reduced by half vertically and horizontally. The divided CUs can be set to have the same vertical and horizontal dimensions as the CUs divided in the same way. The CU can be recursively divided into four CUs, each reduced in half.
[0070] In this case, the division of the CU can be performed recursively up to a predefined depth. The depth information is information indicating the size of the CU, and is stored for each CU. For example, L The depth of the CU is 0, and the depth of the SCU (Smallest Coding Unit) is set in advance. where LCU is the maximum coding unit depth as described above. SCU (Smallest Coding Unit) is a coding unit with a bit size. g Unit) is a coding unit having the minimum coding unit size. .
[0071] Each time LCU310 is divided into half horizontally and vertically, the depth of the CU increases by 1. For each depth, if no division is performed, the CU has a size of 2N x 2N. For a CU that executes the above, the CU is divided into four CUs with a size of NxN from a CU with a size of 2Nx2N. The size of N is reduced by half for each increment of depth.
[0072] Referring to FIG. 3, the size of the LCU with the minimum depth of 0 is 64×64 pixels. The size of the SCU with a depth of 3 is 8 x 8 pixels. In this case, the size of the C U(LCU) is represented at depth 0, 32x32 pixel CU is represented at depth 1, and 16x16 A pixel CU is represented with a depth of 2, and an 8x8 pixel CU (SCU) is represented with a depth of 3. can.
[0073] In addition, information on whether to divide a specific CU is provided via 1-bit division information for each CU. This partition information is included in all CUs except for the SCU. For example, if a CU is not divided, 0 can be stored in the division information. When dividing, 1 can be stored in the division information.
[0074] On the other hand, the CU divided from the LCU is a prediction unit (Pr ediction Unit (PU) or Prediction Block (PB), Transform Unit (TU or T), which is the basic unit for transformation The transform block (TB) can be configured as follows.
[0075] FIG. 4 shows the form of a prediction unit (PU) that a coding unit (CU) can include. show.
[0076] Among the CUs split from an LCU, those that are not further split have one or more prediction units. This act itself is called a partition. A prediction unit (hereinafter referred to as PU) is a basic unit for executing prediction. (skip) mode, inter mode, intra mode It can be coded in one of two ways and partitioned in various ways depending on the mode. Cut.
[0077] Referring to Figure 4, in the case of skip mode, there is no partition within the CU, and the same A 2N×2N mode 410 having a size can be supported.
[0078] In the case of inter-mode, there are eight types of partitioned forms within a CU, for example, 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, nR× 2N mode 445 can be supported.
[0079] In the case of intra mode, 2Nx2N mode 410 and NxN mode 425 are supported within the CU. It can be installed.
[0080] FIG. 5 shows the form of a transform unit (TU) that can be included in a coding unit (CU). show.
[0081] The transform unit (TU) performs spatial transformation and quantization / dequantization (scaling) within the CU. The TU is the basic unit used for the TU process. The TU has a square or rectangular shape. Of the CUs split from an LCU, CUs that are not further split can be split into one or more. A TU can be divided into 1 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 CU 510 can access multiple CUs at once through a quadtree structure. It can be divided into multiple TUs of various sizes.
[0083] On the other hand, HEVC uses intra-frame prediction (hereinafter referred to as intra-prediction) coding, like H.264 / AVC. In this case, the neighboring blocks located around the current block The intra prediction mode (or prediction direction) of the current block can be induced and coded. Cut.
[0084] As described above, the prediction is performed based on the intra prediction mode. The predicted image for the signal may have a difference value from the original image. The difference image, which has the difference values between the original image and the image, is transformed into an entropy image through frequency domain transformation and quantization. In this case, in order to improve the coding efficiency of the frequency domain transform, , Integer Transform, Integer Discrete Cosine Transform; DCT), integer Discrete Sine Transform (DST) Or, DCT / DST etc. depending on the intra prediction mode are selected depending on the block size. It can be applied in a systematic and adaptive manner.
[0085] Also, screen captures such as document videos or PowerPoint presentations are To improve coding efficiency in screen contents, conversion skip ( Transform SKIP) algorithm can be applied.
[0086] When applying the transform skip algorithm, the encoder performs a skip between the original image and the predicted image. The residual image (residual block) with the difference value is quantized without frequency conversion process to obtain the residual block. Then, at the decoder, we perform entropy coding on the residual block. Residual block recovered by entropy decoding and inverse quantization (scaling) Therefore, the block to which such a transform skip algorithm is applied is , skipping the frequency conversion / inverse conversion process.
[0087] In the quantization / dequantization process, the transformation coefficients in a block are adjusted to improve the subjective image quality. Applying different scale factors depending on the position On the other hand, when quantization / dequantization is performed, the position of the transform coefficients within the block is There is a way to apply the scale factor in the same way regardless of the size. is the SPS (Sequence Parameter Set) or P of the bitstream. It can be signaled via PS (Picture Parameter Set). Cut.
[0088] As an example of the process, a scaling process of the transform coefficients is ss for transform coefficients) is executed as follows: It is possible.
[0089] Scaling process of conversion coefficients
[0090] The input here is as follows:
[0091] -Width of the current conversion block Width;nW
[0092] -Height of the current conversion block; nH
[0093] -element c ij Array of transform coefficients with (nW×nH) array d
[0094] - Index for the luminance signal and chrominance signal of the current block; cIdx
[0095] If cIdx is '0', it means luminance signal, and cIdx is '1', or When cIdx is '2', it means the color difference signal. When cIdx is '1', it means the color difference signal. When cIdx is '2', it means Cr in the color difference signal.
[0096] -Quantization parameter; qP
[0097] The output here is as follows:
[0098] - Array for scaled transformation coefficients; (nW × nH) array d ij
[0099] The variable log2TrSize is log2TrSize=(Log2(nW)+Log2(n H))>>1. The variable shift is induced differently by cIdx. When cIx is '0' (luminance signal), shift=BitDepth Y +lo Derived from g2TrSize-5, otherwise (color difference signal), shift=B itDepth C +log2TrSize-5, where BitDept h Y and BitDepth C is the number of sample bits for the current video (e.g., 8 bits) means.
[0100] The array levelScale[] for the scaling variables is as shown in Equation 1 below. .
[0101]
number
[0102] The scaled transform coefficients are calculated through the following process.
[0103] First, the scale factor m ij is derived through the following process:
[0104] -If scaling_list_enable_flag is '0', m ij teeth , which is derived as the following Equation 2.
[0105]
number
[0106] -Otherwise, mij is derived as shown in the following Equation 3.
[0107]
number
[0108] Here, SizeID is derived from the size of the transform block according to Table 1 below. , RefMatrixID, and trafoType are calculated from the following formulas 4 and 5: In addition, in Equation 4, scaling_list_pred_matr ix_id_delta is the SPS (Sequence Parameter Set) of the bitstream. Signaling via Picture Parameter Set (PPS) or Picture Parameter Set (PPS) It will be ringed.
[0109]
number
[0110]
number
[0111] Table 1 shows an example of SizeID values according to the size of the transform block.
[0112] [Table 1]
[0113] Then, the scaled conversion factor d ij is derived from the following Equation 6.
[0114]
number
[0115] On the other hand, as mentioned above, the block to which the transform skip algorithm is applied (hereinafter referred to as the transform The skip block does not perform the frequency conversion process. The blocks that have undergone the transform process and the transform skip blocks have different transform coefficient characteristics. That is, the scaling applied to the block that has undergone the existing frequency conversion process can be If the coding method is directly applied to the transform skip block, the coding efficiency will decrease. can be done.
[0116] Therefore, in the present invention, scaling is performed taking into account the case of transform skip blocks. This provides a method for
[0117] In order to improve the subjective quality of the video in the encoder and decoder, the quantization matrix (basic matrix and When using non-essential matrices, the transform coefficients in the block are The scale factor (scale f) derived from the quantization matrix by the position of This method allows the block to be changed. When transforming, the energy of the remaining block is By utilizing the characteristic that the signal is compressed into the low frequency region where the human eye is generally sensitive, The quantization step size (s) is larger for the high frequency region, which is less sensitive to the human eye. This method is used to quantize the image to the human eye. This can improve the subjective image quality for sensitive areas.
[0118] However, if transform skipping is applied, the residual block undergoes frequency domain transform / inverse transform. In this case, the existing When applying the quantization / dequantization method used in the frequency domain, distortion within an image or block occurs. Therefore, when using a quantization matrix in a video, For blocks that do not perform multi-domain transform / inverse transform (transform skip blocks), A scaling (quantization / dequantization) method that can minimize distortion within a block is needed. For example, the quantization matrix is not applied to the transform skip block. Such methods allow the basic scale factor to be calculated independently of the position of the transform coefficients within the block. Factors can be applied in the same way.
[0119] [Example 1] Scales transform coefficients for transform skip blocks regardless of their positions within the block. Method and apparatus for applying rule factors in the same way
[0120] FIG. 6 illustrates a scaling method for residual signals (or transform coefficients) according to an embodiment of the present invention. 1 is a flow chart illustrating the method.
[0121] The method of FIG. 6 is performed by the encoding device of FIG. 1 or the decoding device of FIG. 2. More specifically, the quantization unit or the inverse quantization unit shown in FIG. In the embodiment of FIG. 6, for convenience of explanation, the method of FIG. 6 is implemented in the encoding device. Although it is described as being implemented in the decoding device, this can be applied in the same way in the decoding device.
[0122] Referring to FIG. 6, the scaling of the residual signal (or transform coefficients) of the current block is performed. The scale factor (m ij ) indicates that the current block is It can be induced by whether it is a conversion skip block or not.
[0123] The encoding device determines whether the current block is a transform skip block (S6 00).
[0124] At this time, whether the current block is a transformation skip block or not is determined by the transformation skip block. For example, the conversion skill can be determined based on the information indicating whether the conversion skill is a conversion skill. The information indicating whether it is a skip block is given by a flag (transSkipFlag). Such a flag, transSkipFlag, value is used to indicate the transformation sequence in the bitstream. The information for the key block can be derived by entropy decoding. If the current block is a transformation skip block, the transSkipFlag value is 1. If the current block is not a transformation skip block, the transSkipFlag value is 0. is.
[0125] If the current block is a transformation skip block (e.g., transSkipFl ag value is 1), the encoder calculates the position of the residual signal (or transform coefficients) in the current block. Regardless of the position, the scale factor (m ij ) is induced (S610).
[0126] At this time, as shown in Figure 6, the scale factor (m ij ) is the given base scale factor For example, a predetermined basic scale factor value (T) can be set to It is 16.
[0127] On the other hand, if the current block is not a transform skip block (e.g., transS If the kipFlag value is 0, the encoder performs the residual signal (or transform) Scale factor (m) based on the position of the ij ) is induced (S620).
[0128] In this case, the scale factor (m ij ) is the residual in the current block using the quantization matrix. The signal (or the transform coefficient) can be set differently depending on the position, as shown in FIG. Thus, the following equation 7 can be derived.
[0129]
number
[0130] where ScalingFactor is an array containing the scaling factors. SizeID is used to indicate the size of the current block (transform block or quantization matrix). The value is determined by the size of the current block (transformation block) as shown in Table 1 above. The ID value can be derived from RefMatrixID and trafoType as follows: These can be derived from the following Equations 8 and 9, respectively. nW denotes the width of the current block. Taste.
[0131]
number
[0132] Here, the MatrixID value is a prediction mode and a color component. t) means the type of quantization matrix, as shown in Table 2 below. The D value can be derived. scaling_list_pred_matrix_id _delta is the SPS (Sequence Parameter Set) of the bitstream. signaled via PPS (Picture Parameter Set) can be.
[0133]
number
[0134] Here, nW means the width of the current block, and nH means the height of the current block. .
[0135] Table 2 shows the MatrixID values according to the prediction mode and color component.
[0136] [Table 2]
[0137] FIG. 7 shows a scaling process for residual signals (or transform coefficients) according to another embodiment of the present invention. 1 is a flow chart illustrating a method.
[0138] The method of FIG. 7 is performed by the encoding device of FIG. 1 or the decoding device of FIG. 2. More specifically, the quantization unit or the inverse quantization unit shown in FIG. In the embodiment of FIG. 7, for convenience of explanation, the method of FIG. 7 is implemented in the encoding device. Although it is described as being implemented in the decoding device, this can be applied in the same way in the decoding device.
[0139] Referring to FIG. 7, the scaling of the residual signal (or transform coefficients) of the current block is performed. The scale factor (m ij ) indicates that the current block is It is guided by whether it is a transform skip block and whether the quantization matrix can be used. can be done.
[0140] The encoder determines whether the current block uses a quantization matrix and whether the transform skip block uses a quantization matrix. It is determined whether the item is a lock (S700).
[0141] At this time, whether the current block uses a quantization matrix is determined by the availability of the quantization matrix. For example, the information to indicate whether or not a quantization matrix can be used can be used. The information is a flag (scaling_list_enable_flag). The value of the flag scaling_list_enable_flag is the amount in the bitstream. Information regarding the use of the quantization matrix can be derived by entropy decoding. scaling_list_enable_f if the current block uses a quantization matrix If the lag value is 1 and the current block does not use a quantization matrix, then scaling_l The ist_enable_flag value is 0.
[0142] Also, whether the current block is a transformation skip block or not can be determined by the transformation skip block For example, it can be determined through information indicating whether or not a conversion skip is performed. The information indicating whether it is a block is a flag (transSkipFlag) Such a flag, transSkipFlag, value indicates the transformation skip in the bitstream. The information for the block can be derived by entropy decoding. If the block is a transformation skip block, the transSkipFlag value is 1 and the current If the current block is not a transformation skip block, the transSkipFlag value is 0. do.
[0143] If the current block is a transform skip block or does not use a quantization matrix, (e.g., transSkipFlag==1 or scaling_list_ena ble_flag==0), the encoder determines the residual signal (or transform coefficients) in the current block. Regardless of the position of the scale factor (m ij ) is induced (S710).
[0144] At this time, as shown in Figure 7, the scale factor (m ij ) is the given base scale factor For example, a predetermined basic scale factor value (T) can be set to It is 16.
[0145] Otherwise (current block is not a transform skip block and uses quantization matrix) In this case, the encoder selects the residual (or transform coefficient) based on its position within the current block. The scale factor (m ij ) is induced (S720).
[0146] In this case, the scale factor (m ij ) is the residual in the current block using the quantization matrix. It can be set differently depending on the position of the signal (or the transform coefficient), and the steps in FIG. The formula shown in step S720 can be derived as follows: The scale factor (m ij ) is the same as the explanation in FIG. 6 (step S620). Therefore, the explanation will be omitted here.
[0147] As described above with reference to FIGS. 6 and 7, the current block (the block to be currently encoded or decoded) If the transform skip block is a transform skip block, the position of the coefficient (or signal) in the current block Regardless of the scale factor, the scale factor has a predetermined value (T) for the current block (transform skip block). At this time, the scale factor value according to the embodiment of the present invention is It can be set differently depending on various coding parameters applied to the block.
[0148] For example, the scale factor value applied to the block depends on whether the quantization matrix is available. The parameter (e.g., scaling_list_enable_flag) value indicates can be set as follows:
[0149] -When using quantization matrices (e.g. scaling_list_enable_fla g==1), the basic scale factor value is set to 'T1' (m ij =T1)
[0150] -If you do not use quantization matrices (for example, scaling_list_enable_fl ag==0), the basic 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 may be predicted. If signaled via the bitstream, The decoder may parse the bitstream to determine the T1 and / or T2 values. can.
[0152] As another example, the scale factor value applied to the block may be the signal Information that can derive hue characteristics for (e.g., hue component index cIdx) The value can be set as follows: The hue component index cIdx is The value indicates the luminance signal (Y signal) or the color difference signal (Cb signal or Cr signal).
[0153] - Example 1: The basic schedule is determined depending on whether the signal of the corresponding block is a brightness signal (luminance signal). Set the control factor value to 'Ty' or 'Tc'. For example, for brightness signal, Set the scale factor value to 'Ty', and if it is not a brightness signal (if it is a color difference signal), Set the scale factor value to 'Tc'.
[0154] - Example 2: Set the basic scale factor value for each hue component of the corresponding block. For example, For a color difference signal (Y signal), the basic scale factor value is set to 'Ty', and the color difference signal is set to the Cb signal. If the color difference signal is a Cr signal, the basic scale factor value is set to 'Tcb'. Set the base scale factor value to 'Tcr'.
[0155] where Ty, Tc, Tcb and / or Tcr values are determined by the encoder and signaled. It may be signaled via the bitstream or may use a predetermined value. If the bitstream is encoded, the decoder parses the bitstream to obtain Ty, Tc, Tcb and and / or Tcr values can be determined.
[0156] The basic scale factor is determined by the coding parameters according to the embodiment of the present invention described above. The methods may be applied independently or in combination, but may not be applied to the same transformation step. For skip blocks, the coefficients (or The same scale factor value must always be applied regardless of the position of the signal.
[0157] The scaling process of the transform coefficients reflecting the above-described embodiment of the present invention is The process for transform coefficients is carried out as follows: can be carried out.
[0158] Scaling process of conversion coefficients
[0159] The input here is as follows:
[0160] -Width of the current conversion block Width;nW
[0161] -Height of the current conversion block; nH
[0162] -element c ij Array of transform coefficients with (nW×nH) array d
[0163] - Current conversion block conversion skip availability information
[0164] - Index for the luminance signal and chrominance signal of the current block; cIdx
[0165] If cIdx is '0', it means luminance signal, and cIdx is '1', or When cIdx is '2', it means the color difference signal. When cIdx is '1', it means the color difference signal. When cIdx is '2', it means Cr in the color difference signal.
[0166] -Quantization parameter; qP
[0167] The output here is as follows:
[0168] - Array for scaled transformation coefficients; (nW × nH) array d ij
[0169] The variable log2TrSize is log2TrSize=(Log2(nW)+Log2(n H))>>1. The variable shift is induced differently by cIdx. When cIx is '0' (luminance signal), shift=BitDepth Y +lo Derived from g2TrSize-5, otherwise (color difference signal), shift=B itDepth C +log2TrSize-5, where BitDept h Y and BitDepth C is the number of sample bits for the current video (e.g., 8 bits) means.
[0170] The array levelScale[] of the scaling variables is as shown in Equation 10 below.
[0171]
number
[0172] The scaled transform coefficients are calculated through the following process.
[0173] First, the scale factor m ij is derived through the following process:
[0174] -If scaling_list_enable_flag is '0' or If the current transform block is a transform skip block, m ij is derived as shown in the following formula 11. will be done.
[0175]
number
[0176] -Otherwise, m ij is derived as shown in the following Equation 12.
[0177]
number
[0178] Here, SizeID is derived from the block size through Table 1 above. RefMatrixID and trafoType are calculated using the following formulas 13 and 14. In addition, in Formula 13, scaling_list_pred_ma trix_id_delta is the SPS (Sequence Parameter The QoS is signaled via the QoS Network Configuration Manager (NGM).
[0179]
number
[0180]
number
[0181] Then, the scaled conversion factor d ij is derived from the following Equation 15.
[0182]
number
[0183] Meanwhile, the transform coefficients scaled through the scaling process as described above are transformed through the inverse transform process. At this time, the current transform block to which the transform skip is applied undergoes the inverse transform process. Instead, only the 'shift' operation process is performed as follows:
[0184] 1. If the cIdx of the current block is '0' (in the case of luminance signal), shift=1 3-Bit DepthY Otherwise (color difference signal), shift=13- BitDepth C is.
[0185] 2. Array r for the remaining blocks ij (i=0..(nW)-1,j=0..(nH)-1) is Set it as follows:
[0186] If shift is greater than '0', r ij =(d ij +(1<<(shift-1) ))>>shift, otherwise r ij =(d ij <<(-shift).
[0187] where d ij is the array for the scaled transform coefficients, and r ij is the scale The matrix refers to an array for a residual block obtained by inverse transforming the transformed coefficients.
[0188] As an example that reflects the inverse transformation process of the scaled transform coefficients described above, Transformation process for the conversion coefficients The part (caled transform coefficients) is executed as follows: It can be done.
[0189] Transformation process for scaled transform coefficients
[0190] The input here is as follows:
[0191] -Width of the current conversion block Width;nW
[0192] -Height of the current conversion block; nH
[0193] -element ij an array of scaled transform coefficients having (nW × nH) array d
[0194] -Conversion skip applicability information for the current block
[0195] - Index for the luminance signal and chrominance signal of the current block; cIdx
[0196] If cIdx is '0', it means luminance signal, and cIdx is '1', or When cIdx is '2', it means the color difference signal. When cIdx is '1', it means the color difference signal. When cIdx is '2', it means Cr in the color difference signal.
[0197] The output here is as follows:
[0198] - Array for the residual block obtained by inverse transforming the scaled transform coefficients; (nW ×nH)array r
[0199] The coding mode (PredMode) for the current block is the intra prediction mode (Intr a), and if the Log2(nW*nH) value is '4' and the cIdx value is '0', then the luminance The variable horizTrTyp depends on the intra-frame prediction direction mode (intra-prediction mode) of the signal. e and vertTrType are calculated via Table 3 below. If not, The variables horizTrType and vertTrType are set to '0'.
[0200] Table 3 shows the horizTrType and vertTrType values for each intra prediction mode. An example is shown below.
[0201] [Table 3]
[0202] The residual signal for the current block is obtained in the following order.
[0203] First, if a transformation skip is applied to the current block, apply the following: .
[0204] 1.If cIdx is '0', shift=13-BitDepth Y and Otherwise, shift=13-BitDepth C is.
[0205] 2. Array r for the remaining blocks ij (i=0..(nW)-1,j=0..(nH)-1) is Set it as follows:
[0206] -If shift is greater than '0', r ij =(d ij +(1<<(shift- 1)))>>shift, otherwise r ij =(d ij <<(-shift).
[0207] If transform skip for the current block does not apply, apply the following.
[0208] 1. Scaled variables with horizTrType and vertTrType values. First, the size (nW, nH) of the current block and the scale The input of the variable horizTrType is By performing a one-dimensional inverse transformation in the horizontal direction under the force, the array (nW × nH array e) Output.
[0209] 2. Next, receive the input of the array (nW×nH array e) and yg) is derived as shown in the following Equation 16.
[0210]
number
[0211] 3. Next, the size of the current block (nW, nH) and the array (nW×nH array g), It takes a number vertTrType as input and performs a one-dimensional inverse transform in the vertical direction.
[0212] 4. Next, the array r for the remaining block (nW × nH) is calculated by cIdx. It is set as shown in the following formula 17.
[0213]
number
[0214] Here, if cIdx is '0', shift=20-BitDept h Y otherwise, shift=20-BitDepth C It has a value of Bi tDepth means the number of bits of a sample for the current image (for example, 8 bits).
[0215] The scaling process of the transform coefficients as described above and the transformation for the scaled transform coefficients are By performing the process, the recovered residual block can be generated, and , the reconstructed residual block is subjected to a prediction generated via intra prediction or inter prediction. By adding the blocks together, a reconstructed block can be generated. The original block may be a block to which a loop filter has been applied, and the loop filter may be It may be a block that does not apply.
[0216] In the present invention, the basic schedule induced by whether it is a transform skip block is used. The present invention provides a method for signaling a policy factor.
[0217] According to an embodiment of the present invention, the block is guided by whether it is a transform skip block. The basic scale factor is set via the SPS (Sequence Parameter Set). The request can be signaled as follows:
[0218] Table 4 shows a table for signaling basic scale factor information according to one embodiment of the present invention. An example of SPS syntax is shown below.
[0219] [Table 4]
[0220] Referring to Table 4, transform_skip_enabled_flag is currently Indicates whether to use the skip transformation algorithm for sequences.
[0221] If the transform skip algorithm is used, the flat_scale_factor _y_minus16, flat_scale_factor_cb_minus16, fla t_scale_factor_cr_minus16 is signaled, where The value can be encoded (se(v)) in a form with a positive or negative sign, or , this value can be coded (ue(v)) in a form with 0 and positive signs.
[0222] flat_scale_factor_y_minus16 is the scale for the luminance signal It means the factor, e.g., flat_scale_factor_y_minus16 value If is '0', the scale factor for the luminance signal is obtained by adding '16' to the '0'. It has a value of '16'.
[0223] flat_scale_factor_cb_minus16 is the scaling factor for the color difference signal Cb. flat_scale_factor_cr_minus16 means the scale factor, This means the scale factor for the color difference signal Cr.
[0224] In this regard, the scale factor for the luminance signal or the color difference signal is expressed by the following Equation 1: 8 to 20 can be derived.
[0225] Here, the basic scaling factor FlatScalingFactor[cIdx] is It stores the scale factors for the hue and color difference signals. If cIdx is 0, it is the luminance (Y) signal; if it is 1, it is the Cb color difference signal; if it is 2, it is the Cr color difference signal. The signal can be specified by the FlatScalingFactor[cIdx] value. can have any range of values, for example, '-15' for an 8-bit signal. It can have values from '255-16'.
[0226] The basic scale factor for the luminance signal can be derived as follows: .
[0227]
number
[0228] The basic scale factor for the Cb color difference signal can be derived as shown in Equation 19. Cut.
[0229]
number
[0230] The basic scale factor for the Cr color difference signal can be derived as shown in Equation 20. Cut.
[0231]
number
[0232] According to the above-described embodiment of the present invention, the transform skip block is determined. The scaling of transform coefficients is achieved by reflecting the way in which the basic scale factors used are signaled. Scaling Process for transform coefficient cients) can be run as follows:
[0233] Scaling process of conversion coefficients
[0234] The input here is as follows:
[0235] -Width of the current conversion block Width;nW
[0236] -Height of the current conversion block; nH
[0237] -element c ij Array of transform coefficients with (nW×nH) array d
[0238] -TransSkipFlag: Whether or not conversion skip is applicable for the current conversion block
[0239] If the transSkipFlag value is 1, a transformation skip is applied to the current block. If the transSkipFlag value is 0, the current block is Indicates that it does not apply.
[0240] - Index for the luminance signal and chrominance signal of the current block; cIdx
[0241] If cIdx is '0', it means luminance signal, and cIdx is '1', or When cIdx is '2', it means the color difference signal. When cIdx is '1', it means the color difference signal. When cIdx is '2', it means Cr in the color difference signal.
[0242] -Quantization parameter; qP
[0243] The output here is as follows:
[0244] - Array for scaled transformation coefficients; (nW × nH) array d ij
[0245] The variable log2TrSize is log2TrSize=(Log2(nW)+Log2(n H))>>1. The variable shift is induced differently by cIdx. When cIx is '0' (luminance signal), shift=BitDepth Y +lo Derived from g2TrSize-5, otherwise (color difference signal), shift=B itDepth C +log2TrSize-5, where BitDept h Y and BitDepth C is the number of sample bits for the current video (e.g., 8 bits) means.
[0246] The array levelScale[] of the scaling variables is as shown in Equation 21 below.
[0247]
number
[0248] The scaled transform coefficients are calculated through the following process.
[0249] First, the scale factor m ij is derived through the following process:
[0250] -If scaling_list_enable_flag is '0', m ij teeth , which is derived as shown in the following Equation 22.
[0251]
number
[0252] -Otherwise (i.e. scaling_list_enable_flag is '1') In this case, m ij is derived as shown in the following Equation 23.
[0253]
number
[0254] Here, SizeID is derived from the block size through Table 1 above. RefMatrixID and trafoType are calculated using the following formulas 24 and 25. In Equation 24, scaling_list_pred_matri x_id_delta is the SPS (Sequence Parameter) of the bitstream. r Set).
[0255]
number
[0256]
number
[0257] Then, the scaled conversion factor d ij is derived from the following Equation 26.
[0258]
number
[0259] Meanwhile, according to an embodiment of the present invention, the block is induced depending on whether it is a transform skip block. The basic scale factor is not only SPS mentioned above, but also PPS (Picture Parametric) Signaled via the meter set or slice header It can also be signaled per CU or TU. do.
[0260] flat_scale_factor_y_minu signaled by the SPS mentioned above s16, flat_scale_factor_cb_minus16, flat_scal The e_factor_cr_minus16 value is the PPS (or SliceHeader, It can be updated and used with the CU, TU).
[0261] Table 5 shows a table for signaling basic scale factor information according to another embodiment of the present invention. An example of the PPS syntax is shown below.
[0262] [Table 5]
[0263] Referring to Table 5, transform_skip_enabled_flag is currently Indicates whether to use the transform skip algorithm for the video. If the transform skip algorithm is used, If cadence is used, pps_flat_scaling_factor_present The _flag value is signaled.
[0264] For example, if pps_flat_scaling_factor_present_fl If the ag value is '0', the flat_scale_factor_ y_minus16, flat_scale_factor_cb_minus16, fla t_scale_factor_cr_minus16 is the scale factor for the transform skip block. On the other hand, if pps_flat_scaling_f If the actor_present_flag value is '1', the fl applied in the SPS described above at_scale_factor_y_minus16, flat_scale_factor Update the _cb_minus16, flat_scale_factor_cr_minus16 values. The corresponding value is signaled for updating.
[0265] signaled flat_scale_factor_y_minus16, flat _scale_factor_cb_minus16, flat_scale_factor_ The cr_minus16 value is the scale factor for the transform skip block of the current image. In this case, this value can be used persistently until it is not changed again. Or, this value can be applied and used only for the current video and not used by the SPS for the next video. A scale factor value can be applied.
[0266] where flat_scale_factor_y_minus16, flat_scal e_factor_cb_minus16, flat_scale_factor_cr_mi nus16 can be coded (se(v)) in a form with a positive or negative sign. Alternatively, this value can be coded as ue(v) with zero and positive signs. .
[0267] flat_scale_factor_y_minus16, flat_scale_fac tor_cb_minus16, flat_scale_factor_cr_minus16 The values can be signaled with different values for the luminance signal and the color difference signal. For example, the flat_scale_factor_y_minus16 value is used for the luminance signal. The scale factor to be used, flat_scale_factor_cb_minus16, is the value of C b Scale factor for color difference signal, flat_scale_factor_cr_min The us16 value is used to signal the scale factor for the Cr color difference signal. Alternatively, you can use flat_scale_ as a scale factor for the luminance signal. factor_y_minus16, flat_ as the scale factor for the color difference signal You can also signal using scale_factor_cb_cr_minus16 Alternatively, a single value fla can be used as the scale factor for the luminance signal and the color difference signal. Signaling using t_scale_factor_y_cb_cr_minus16 It is also possible.
[0268] As mentioned above, flat_scale_fa signaled in SPS or PPS ctor_y_minus16, flat_scale_factor_cb_minus16 ,flat_scale_factor_cr_minus16 value is SliceHeade It can be updated and used with r (or CU, TU).
[0269] Table 6 shows a table for signaling basic scale factor information according to another embodiment of the present invention. An example of the slice header syntax is shown below.
[0270] [Table 6]
[0271] Referring to Table 6, transform_skip_enabled_flag is currently Indicates whether to use the transform skip algorithm for the slice. If the flat_scaling_factor_override_ A flag value is signaled.
[0272] For example, if the flat_scaling_factor_override_flag value If is '0', the flat_scale_fact applied by the SPS or PPS mentioned above or_y_minus16, flat_scale_factor_cb_minus16, f lat_scale_factor_cr_minus16 for transform skip blocks Use as a scaling factor. If the tor_override_flag value is '1', the applicable flat_scale_factor_y_minus16, flat_scale_f actor_cb_minus16, flat_scale_factor_cr_minus The corresponding value is signaled to update the 16 values.
[0273] flat_scale_factor_y_delta, flat_scale_facto r_cb_delta, flat_scale_factor_cr_delta values are Used as a scale factor for Rice transform skip blocks.
[0274] where flat_scale_factor_y_delta, flat_scale_f actor_cb_delta, flat_scale_factor_cr_delta values , can be coded (se(v)) in a form with a positive or negative sign. The value of can be coded (ue(v)) in a form with 0 and positive signs.
[0275] flat_scale_factor_y_delta, flat_scale_facto The r_cb_delta and flat_scale_factor_cr_delta values are the luminance signal The signal and the color difference signal may be signaled with different values. The flat_scale_factor_y_delta value is the scale factor for the luminance signal. The flat_scale_factor_cb_delta value is the scale factor for the Cb color difference signal. The scale factor, flat_scale_factor_cr_delta, is the value of the Cr color difference signal. It can be used when signaling a scale factor for flat_scale_factor_y_delt as the scale factor for degree signals a, flat_scale_factor_cb_ as the scale factor for the color difference signal It can also be signaled using cr_delta. Alternatively, it can be signaled using luminance and chrominance. A single value, flat_scale_factor_y_c, as the scale factor for the signal It can also be signaled using b_cr_delta.
[0276] As mentioned above, the signaled flat_scale_factor_y_delta , flat_scale_factor_cb_delta, flat_scale_fact or_cr_delta value is used to calculate the basic scale function as shown in Equations 27 to 29 below. It is possible to induce factors.
[0277] Here, the basic scaling factor FlatScalingFactor[cIdx] is It stores the scale factors for the hue and color difference signals. If cIdx is 0, it is the luminance (Y) signal; if it is 1, it is the Cb color difference signal; if it is 2, it is the Cr color difference signal. The signal can be specified by the FlatScalingFactor[cIdx] value. can have any range of values, for example, from '-15' to It can have a value of '255-16'.
[0278] The basic scale factor for the luminance signal is flat_scale_factor_y_d Using elta, it can be derived as in Equation 27.
[0279]
number
[0280] The basic scale factor for the Cb color difference signal is flat_scale_factor_ Using cb_delta, it can be derived as in Equation 28.
[0281]
number
[0282] The basic scale factor for the Cr color difference signal is flat_scale_factor_ Using cr_delta, it can be derived as shown in Equation 29.
[0283]
number
[0284] Meanwhile, the above-described embodiment is applied depending on the block size, CU depth, or TU depth. The scope can be different. In this way, the variable that determines the scope (e.g., The block size or depth information is a predetermined value that the encoder and decoder use. You can set it to use a value determined by the profile or level. The encoder may write the variable value to the bitstream, and the decoder may The RFC 2128 protocol may be configured to use this value from the bitstream.
[0285] When the application range is changed depending on the CU depth, the following three options are available as shown in Table 7. Method A can be applied only to depths greater than or equal to a given depth. Method B is a method that applies only to depths below a given depth, and Method C is a method that applies only to depths below a given depth. This method applies only to the specified depth.
[0286] Table 7 shows how to determine the range in which the method of the present invention is applied depending on the CU (or TU) depth. In Table 7, the 'O' notation indicates the method corresponding to the depth of the CU (or TU). The 'X' notation means that the corresponding method is applied to the corresponding depth of the CU (or TU). This means not to use.
[0287] [Table 7]
[0288] Referring to Table 7, when the CU (or TU) depth is 2, the method according to the embodiment of the present invention Methods A, B, and C can all be applied.
[0289] If the embodiment of the present invention is not applied to the entire depth of the CU (or TU), It can also be expressed using an indicator (e.g., flag), and is one greater than the maximum CU depth. Alternatively, a larger value can be expressed by signaling it as a CU depth value that indicates the scope of application. .
[0290] In addition, the range to which the method of the present invention is applied is determined by the CU (or TU) depth. The method can be applied differently depending on the size of the luminance block and the chrominance block. It can be applied differently to luminance and chrominance images.
[0291] Table 8 shows a set of methods for determining the application range depending on the size of the luminance block and the chrominance block. 1 is a schematic example of a combination.
[0292] [Table 8]
[0293] Among the methods in Table 8, method “To1” shows that the size of the luminance block is 8 (8×8, 8× 4, 2x8, etc.) and the size of the color difference block is 4 (4x4, 4x2, 2x4) , the first embodiment of the present invention (T1-Embodiment 1) is a luminance signal, a color difference signal, a horizontal signal, and a vertical signal. It can be applied to signals.
[0294] In the above-described embodiments, the method is based on a flow chart with a series of steps or blocks. Although described, the present invention is not limited to the order of steps, and certain steps The steps may occur in different orders or simultaneously with those described above. A person of ordinary skill in the art would recognize that the steps shown in the flowchart are not exclusive and may be combined with other steps. The steps of the flowchart may be included, or one or more steps of the flowchart may not affect the scope of the present invention. It can be seen that it can be removed without impact.
[0295] The above description is merely an illustrative example of the technical concept of the present invention, and is not intended to limit the scope of the present invention. A person having ordinary skill in the art would understand that the present invention is not limited to the essential characteristics of the present invention. Therefore, the disclosed embodiments of the present invention may be modified or altered in any manner without departing from the spirit or scope of the present invention. It is not intended to limit the technical ideas of the Ming Dynasty, but to explain them. The scope of the technical idea of the present invention is not limited by the examples. The scope of the invention must be interpreted according to the scope of the claims, and all technical ideas within the scope equivalent thereto are included. must be construed as being included within the scope of the present invention.
Claims
1. 1. A video decoding method involving a decoding device, comprising: deriving a scale factor for the current block based on whether the current block is a transform skip block; performing scaling on transform coefficients of the current block based on the scale factor; obtaining residual samples of the current block by selectively performing an inverse transform on the scaled transform coefficients; performing prediction on the current block to generate a predicted block; reconstructing the current block by adding the residual samples and the prediction block; Including, If the current block is not a transform skip block, a scale factor for the current block is derived based on a quantization matrix defined in the decoding device and a position of a transform coefficient within the current block; if the current block is the transform skip block, the scale factor for the current block is derived equal to a fixed constant value regardless of the position of the transform coefficient within the current block; The video decoding method, wherein the transform skip block is identified based on information indicating whether an inverse transform is applied to the current block.
2. 2. The video decoding method of claim 1, wherein the fixed constant value is 16.
3. 1. A video encoding method involving an encoding device, comprising: performing a prediction on the current block to generate a predicted block; generating residual samples of the current block by subtracting the predicted block from the current block; obtaining transform coefficients by selectively performing a transform on the residual samples of the current block; determining a scale factor for the current block according to whether the current block is a transform skip block; performing quantization on the transform coefficients of the current block based on the scale factor; Including, If the current block is not the transform skip block, the scale factor for the current block is determined based on a quantization matrix defined in the encoding device and a position of a transform coefficient within the current block; If the current block is the transform 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 transform coefficient within the current block; The video encoding method, wherein the indication of the transform skip block is encoded using information indicating whether to apply an inverse transform to the current block.
4. 4. The video encoding method according to claim 3, wherein the fixed constant value is 16.
Citation Information
Patent Citations
JPP6660970B
JPP7266515B