Encoding device, program, and model generation method

By integrating syntax element values and context values into the neural network model for quantization, the coding device optimizes transform coefficients, thereby improving coding efficiency.

JP7825447B2Active Publication Date: 2026-03-06NIPPON HOSO KYOKAI
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-02-14
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing quantization processes in video coding do not effectively utilize syntax element values and context values in determining quantized transform coefficients, limiting the efficiency of neural network models in improving quantization processing.

Method used

A coding device and method that incorporates a neural network model to adjust quantized transform coefficients based on inputting transform coefficients before and after quantization, along with syntax element values and context values, to optimize the quantization process.

Benefits of technology

Improves coding efficiency by more accurately adjusting transform coefficients post-quantization, enhancing the overall coding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007825447000003
    Figure 0007825447000003
  • Figure 0007825447000004
    Figure 0007825447000004
  • Figure 0007825447000005
    Figure 0007825447000005
Patent Text Reader

Abstract

To improve quantization processing using a neural network model.SOLUTION: An encoding device includes a quantization unit 122 that performs quantization on transform coefficients obtained by performing transform processing on a residual signal representing a difference between the original image and a predicted image, and an entropy encoding unit 130 that entropy-encodes a syntax element value for the transform coefficient using a context value of the syntax element value. The quantization unit 122 outputs the transform coefficients after optimal quantization by adjusting the transform coefficient after the quantization according to the output obtained by inputting the transform coefficients before the quantization, the transform coefficients after the quantization, the syntax element value, and the context value into a neural network model.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an encoding device, a program, and a model generation method. [Background technology]

[0002] Generally, a coding device for coding a moving image includes a quantization unit that quantizes transform coefficients obtained by performing a transform process on a residual signal representing the difference between an original image and a predicted image, and an entropy coding unit that entropy codes the quantized transform coefficients obtained by the quantization unit. The quantization unit, for example, calculates a quantization step (Q step ) to derive scaled transform coefficients expressed as real numbers, and then convert the scaled transform coefficients to integers (i.e., quantize them) by a rounding process to derive quantized transform coefficients.

[0003] In the High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC) formats, a technique called Rate Distortion Quantized Optimization (RDOQ) is used when the quantization unit derives (quantizes) the transform coefficients after quantization. In RDOQ, the optimal quantization process is determined by minimizing the Rate Distortion (RD) cost as shown in Equation (1).

[0004]

number

[0005] where λ is a constant determined by a quantization parameter such as QP, x is a transform coefficient before quantization, and q is a transform coefficient after quantization. D(q,x) is the quantization distortion, generally expressed as the residual sum of squares of x and q. R(q) is the bit rate when q is entropy-coded.

[0006] Entropy coding efficiently encodes input data by assigning codes of different lengths to the input data based on the probability of occurrence. In video coding, for example, CABAC (Context-based Adaptive Binary Arithmetic Coding), a highly efficient coding method, is used to perform lossless compression of syntax elements. The bit rate R(q), which corresponds to the second term in equation (1) above, is calculated using syntax elements for transform coefficients and their context values.

[0007] CABAC is an entropy coding method that uses binary arithmetic coding and context adaptive processing to estimate the probability of occurrence of a binary symbol based on the state of surrounding parameters (context values). Specifically, the number line is divided into intervals based on the value of the input binary symbol and the probability of occurrence of the Most Probable Symbol (MPS: a symbol with a high probability of appearing between 0 and 1), and the binary representation of the resulting interval is used as the codeword for the input binary symbol sequence. Here, the context value representing the MPS occurrence probability of the binary symbol is calculated according to a set rule that differs for each syntax element.

[0008] On the other hand, Non-Patent Document 1 describes a technique for improving coding efficiency in which a neural network is trained using quantization results obtained by a greedy method as training data to generate a neural network model, and a quantization unit determines the quantization process using the neural network model. In this technique (hereinafter referred to as "prior research"), the quantization unit adjusts the quantized transform coefficients using a quantization adjustment value obtained by inputting the transform coefficients before and after quantization into a neural network model. [Prior art documents] [Non-patent literature]

[0009] [Non-Patent Document 1] D. Kianfar, A. Wiggers, A. Said, R. Pourreza, T. Cohen, Parallelized Rate-Distortion Optimized Quantization using Deep Learning, IEEE MMSP 2020 Summary of the Invention [Problem to be solved by the invention]

[0010] In entropy coding, syntax element values ​​of transform coefficients after quantization by a quantizer are coded using their context values. Since syntax element values ​​and context values ​​are also used to determine the transform coefficients after quantization, it is believed that coding efficiency can be improved by taking syntax element values ​​and context values ​​into consideration in quantization processing using a neural network.

[0011] However, in previous studies, the quantized transform coefficients are used as inputs to the neural network model, but the syntax element values ​​and context values ​​calculated when determining the quantized transform coefficients are not used as inputs to the neural network model. This leaves room for improvement in the quantization process using the neural network model.

[0012] Therefore, an object of the present invention is to provide an encoding device, a program, and a model generation method that can improve quantization processing using a neural network model. [Means for solving the problem]

[0013] A coding device according to a first aspect includes a quantization unit that quantizes transform coefficients obtained by performing a transform process on a residual signal representing a difference between an original image and a predicted image, and an entropy coding unit that entropy codes syntax element values ​​for the transform coefficients using context values ​​of the syntax element values. The quantization unit adjusts the quantized transform coefficients according to an output obtained by inputting the transform coefficients before quantization, the transform coefficients after quantization, the syntax element values, and the context values ​​into a neural network model, thereby outputting the transform coefficients after optimal quantization.

[0014] A program according to the second aspect causes a computer to function as the encoding device according to the first aspect.

[0015] A model generation method according to a third aspect is a method for generating a trained neural network model for encoding, the model generation method including the steps of: acquiring, as training data, transform coefficients before quantization, the quantized transform coefficients, syntax element values ​​for the transform coefficients, context values ​​for the syntax element values, and the transform coefficients after optimal quantization derived using a full search or a greedy algorithm; performing machine learning using the training data; and generating a neural network model that receives, as input, the transform coefficients before quantization, the quantized transform coefficients, the syntax element values ​​for the transform coefficients, and the context values ​​for the syntax element values, and outputs an adjustment value for adjusting the transform coefficients after quantization to optimize them. [Effects of the Invention]

[0016] According to the present invention, it is possible to provide an encoding device, a program, and a model generation method that can improve quantization processing using a neural network model. [Brief explanation of the drawings]

[0017] [Figure 1] FIG. 1 is a diagram illustrating a configuration of an encoding device according to an embodiment. [Figure 2] FIG. 10 is a diagram illustrating an example of types of scan orders. [Figure 3] FIG. 2 is a diagram for explaining an overview of a quantization process according to the embodiment. [Figure 4] FIG. 2 is a diagram illustrating an example of the configuration of an RDOQ processing unit according to the embodiment. [Figure 5] FIG. 10 is a diagram illustrating an example of encoding of transform coefficients by an entropy encoding unit. [Figure 6] FIG. 2 is a diagram illustrating an example of the configuration of an optimization processing unit according to the embodiment. [Figure 7] FIG. 10 is a diagram illustrating a modified example of the configuration of an optimization processing unit according to the embodiment. [Figure 8] FIG. 2 is a diagram illustrating an example of a neural network model according to the embodiment. [Figure 9] FIG. 1 is a diagram illustrating a model generation method according to an embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0018] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The following description of the preferred embodiments will be given with reference to the accompanying drawings. In the following description of the drawings, the same or similar parts are designated by the same or similar reference numerals.

[0019] (Outline of the embodiment) An encoding device according to an embodiment includes a quantization unit that quantizes transform coefficients obtained by performing a transform process on a residual signal representing a difference between an original image and a predicted image, and an entropy encoding unit that entropy encodes syntax element values ​​for the transform coefficients using context values ​​of the syntax element values. The quantization unit adjusts the quantized transform coefficients according to an output obtained by inputting the transform coefficients before quantization, the quantized transform coefficients, the syntax element values, and the context values ​​into a neural network model, thereby outputting the optimally quantized transform coefficients.

[0020] In this way, not only the transform coefficients before quantization and the transform coefficients after quantization, but also the syntax element values ​​of the transform coefficients and their context values ​​are used as inputs to the neural network model. That is, the syntax element values ​​and their context values ​​are introduced as new input parameters to the neural network model. This makes it possible to more appropriately adjust the transform coefficients after quantization. Therefore, the quantization process using the neural network model can be improved, thereby improving coding efficiency.

[0021] (encoding device) (1) Encoding device configuration First, the configuration of the encoding device according to this embodiment will be described. The encoding device according to this embodiment encodes moving images as typified by MPEG. Fig. 1 is a diagram showing the configuration of an encoding device 1 according to this embodiment. The encoding device 1 is a device that encodes an image in units of blocks obtained by dividing the image.

[0022] As shown in FIG. 1, the encoding device 1 includes a block division unit 100, a subtraction unit 110, a transformation and quantization unit 120, an entropy encoding unit 130, an inverse quantization and inverse transform unit 140, a synthesis unit 150, a memory 160, and a prediction unit 170.

[0023] The block division unit 100 divides an input image, which is an input image in units of frames (or pictures) constituting a moving image, into a plurality of image blocks, and outputs the image blocks obtained by division to the subtraction unit 110. The size of the image blocks is, for example, 32×32 pixels, 16×16 pixels, 8×8 pixels, or 4×4 pixels. The shape of the image blocks is not limited to squares and may be rectangular (non-square). An image block is a unit (block to be coded) for coding by the coding device 1, and is a unit (block to be coded) for decoding by the decoding device. Such an image block is sometimes called a CU (Coding Unit).

[0024] The subtraction unit 110 calculates a prediction residual representing the difference (error) between the current block to be coded output by the block division unit 100 and a prediction block obtained by predicting the current block to be coded by the prediction unit 170. The subtraction unit 110 calculates the prediction residual by subtracting each pixel value of the prediction block from each pixel value of the block, and outputs the calculated prediction residual to the transformation and quantization unit 120.

[0025] The transform / quantization unit 120 performs transform processing and quantization processing on a block-by-block basis. The transform / quantization unit 120 includes a transform unit 121 and a quantization unit 122.

[0026] The transform unit 121 performs a transform process on the prediction residual output by the subtraction unit 110 to calculate a transform coefficient for each frequency component, and outputs the calculated transform coefficient to the quantization unit 122. The transform process (conversion) refers to a process of converting a pixel domain signal into a frequency domain signal, such as a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), or a transform obtained by integerizing these. The transform process may also include a transform skip that adjusts the pixel domain signal by scaling or the like without converting it into a frequency domain signal.

[0027] The quantization unit 122 performs a quantization process on the transform coefficients output by the transform unit 121, and outputs the quantized transform coefficients to the entropy coding unit 130 and the inverse quantization / inverse transform unit 140. Specifically, the quantization unit 122 performs a quantization process on two-dimensional transform coefficients obtained by performing a transform process on a residual signal representing the difference between a block of an original image and a block of a predicted image, and outputs two-dimensional quantized transform coefficients. In the quantization process according to this embodiment, a neural network model is used as a trained model generated in advance. Details of the quantization unit 122 will be described later.

[0028] The entropy coding unit 130 performs entropy coding on the quantized transform coefficients output by the quantization unit 122, compresses the data, generates a coded stream (bit stream), and outputs the coded stream to the outside of the coding device 1. Specifically, the entropy coding unit 130 converts (i.e., serializes) the two-dimensional quantized transform coefficients obtained by the quantization unit 122 into one-dimensional ones according to the scan order, and then performs entropy coding. For entropy coding, Huffman coding, CABAC, or the like can be used. In this embodiment, an example in which CABAC is used for entropy coding will be described, but other entropy coding methods may also be used.

[0029] The entropy coding unit 130 may use only one type of scan order, or may select one scan order from multiple types of scan orders depending on the intra prediction mode or transform skip. FIG. 2 is a diagram illustrating an example of types of scan orders. For example, a current block to be coded has a size of 8×8, and the entropy coding unit 130 performs scanning in units of 4×4 coefficient groups (CGs). The scan orders include three types: diagonal shown in FIG. 2(a), horizontal shown in FIG. 2(b), and vertical shown in FIG. 2(c). The entropy coding unit 130 converts (i.e., serializes) two-dimensional quantized transform coefficients into one dimension using the scan order selected depending on the intra prediction mode or transform skip, and then performs entropy coding such as CABAC. As a result of such serialization, 8×8 transform coefficients are converted into 64×1 transform coefficients. When selecting one scan order from multiple types of scan orders, the entropy coding unit 130 may output information indicating the selected scan order to the quantization unit 122.

[0030] CABAC is an entropy coding method that uses binary arithmetic coding and context adaptive processing, which estimates the probability of occurrence of a binary symbol based on the state (context) of surrounding parameters. The number line is divided into intervals based on the value of the input binary symbol and the MPS occurrence probability, and the binary representation of the final interval is used as the codeword for the input binary symbol sequence. The MPS occurrence probability of a binary symbol is estimated based on the values ​​of the binary symbols that have appeared up to that point. That is, based on a predetermined probability estimation model, the MPS occurrence probability of a binary symbol that appears subsequently is updated by increasing the MPS occurrence probability if the binary symbol is an MPS and decreasing the MPS occurrence probability if it is not an MPS.

[0031] In addition, the entropy coding unit 130 obtains control information such as the size and shape of each block to be coded from the block division unit 100, obtains control information related to the quantization process from the quantization unit 122, and obtains control information related to prediction (e.g., prediction mode and motion vector information) from the prediction unit 170, and also codes this control information.

[0032] The inverse quantization and inverse transform unit 140 performs inverse quantization processing and inverse transform processing on a block-by-block basis. The inverse quantization and inverse transform unit 140 includes an inverse quantization unit 141 and an inverse transform unit 142.

[0033] The inverse quantization unit 141 performs inverse quantization processing corresponding to the quantization processing performed by the quantization unit 122. Specifically, the inverse quantization unit 141 restores the transform coefficients by performing inverse quantization processing on the quantized transform coefficients output by the quantization unit 122, and outputs the restored transform coefficients to the inverse transform unit 142.

[0034] The inverse transform unit 142 performs inverse transform processing corresponding to the transform processing performed by the transform unit 121. For example, if the transform unit 121 performs DCT, the inverse transform unit 142 performs inverse DCT. The inverse transform unit 142 performs inverse transform processing on the transform coefficients output by the inverse quantization unit 141 to restore prediction residuals, and outputs restored prediction residuals, which are the restored prediction residuals, to the synthesis unit 150.

[0035] The synthesizing unit 150 synthesizes, on a pixel-by-pixel basis, the reconstructed prediction residual output by the inverse transform unit 142 with the predicted block output by the prediction unit 170. The synthesizing unit 150 adds each pixel value of the reconstructed prediction residual to each pixel value of the predicted block to decode (reconstruct) the current block to be coded, and outputs the decoded block to the memory 160. Note that a loop filter may be provided between the synthesizing unit 150 and the memory 160. The loop filter may include at least one of deblocking filter processing and SAO (sample adaptive offset).

[0036] The memory 160 accumulates the decoded blocks as decoded images in units of frames, and outputs the stored decoded images to the prediction unit 170.

[0037] The prediction unit 170 performs prediction processing on a block-by-block basis to generate a prediction block corresponding to the current block to be coded, and outputs the generated prediction block to the subtraction unit 110 and the synthesis unit 150. The prediction unit 170 performs inter prediction and intra prediction. In inter prediction, the prediction unit 170 uses a decoded image stored in the memory 160 as a reference image to calculate a motion vector using a technique such as block matching, predicts the current block to be coded, generates an inter prediction block, and outputs the generated inter prediction block. In intra prediction, the prediction unit 170 generates an intra prediction block by referring to decoded pixel values ​​adjacent to the current block to be coded in the decoded image stored in the memory 160, and outputs the generated intra prediction block.

[0038] (2) Quantization Next, the quantization process according to this embodiment will be described.

[0039] (2.1) Overview of quantization process Fig. 3 is a diagram for explaining an outline of the quantization process according to this embodiment. As shown in Fig. 3, the quantization unit 122 according to this embodiment includes an RDOQ processing unit 122A and an optimization processing unit 122B.

[0040] The RDOQ processing unit 122A quantizes two-dimensional transform coefficients output by the transform unit 121 on a block-by-block basis, and outputs the quantized transform coefficients to the entropy coding unit 130. For example, if the block to be coded has a size of 8×8, the 8×8 transform coefficients are input to the RDOQ processing unit 122A. As described above, the RDOQ processing unit 122A determines the optimal quantization process by minimizing the RD cost as shown in equation (1).

[0041]

number

[0042] where λ is a constant determined by a quantization parameter such as QP, x is a transform coefficient before quantization, and q is a transform coefficient after quantization. D(q,x) is the quantization distortion, generally expressed as the residual sum of squares of x and q. R(q) is the bit rate when q is entropy-coded.

[0043] When calculating the RD cost, the entropy coding unit 130 entropy codes the syntax element values ​​of the quantized transform coefficients using the context values ​​of the syntax element values. However, to find the optimal solution for the RD cost, a huge number of candidates must be searched. In this embodiment, as a practical method, RDOQ processing of HM, which is a test model of the HEVC standard, is adopted. Details of such RDOQ processing will be described later.

[0044] The optimization processing unit 122B performs optimal quantization on the quantized transform coefficients obtained by the RDOQ processing unit 122A using a neural network model, and outputs the optimally quantized transform coefficients to the entropy coding unit 130. Specifically, the quantization unit 122 adjusts the quantized transform coefficients according to the output obtained by inputting the transform coefficients before quantization, the transform coefficients after quantization, the syntax element values, and the context values ​​into a neural network model, thereby outputting the optimally quantized transform coefficients.

[0045] Here, the transform coefficients before quantization refer to the transform coefficients before quantization by the RDOQ processing unit 122A. In this embodiment, the transform coefficients before quantization are calculated based on the quantization step (Q step ) and is a transform coefficient expressed as a real number (i.e., a scaled transform coefficient) obtained by dividing the transform coefficient by . The quantized transform coefficient refers to the transform coefficient after quantization by the RDOQ processing unit 122A. The syntax element values ​​and context values ​​refer to the syntax element values ​​and context values ​​derived when quantization is performed by the RDOQ processing unit 122A.

[0046] The neural network model is a trained neural network model generated in advance. The neural network model according to this embodiment receives as input transform coefficients before quantization, transform coefficients after quantization, syntax element values, and context values, and outputs adjustment values ​​for adjusting the transform coefficients after quantization to optimize them. Details of the neural network model according to this embodiment will be described later.

[0047] Finally, the entropy coding unit 130 entropy codes the optimally quantized transform coefficients obtained by the optimization processing unit 122B, and outputs a bitstream.

[0048] (2.2) RDOQ treatment 4 is a diagram showing an example of the configuration of the RDOQ processing unit 122A according to this embodiment. The RDOQ processing unit 122A converts (quantizes) pre-quantization transform coefficients, specifically, scaled transform coefficients expressed as real numbers, into integers by rounding, and outputs the quantized transform coefficients.

[0049] As shown in FIG. 4, the RDOQ processing unit 122A includes a scalar quantization (SQ) processing unit 122A1, a level estimation (LE) processing unit 122A2, an AZ (all-zero CG) processing unit 122A3, a last significant coefficient processing (LAST processing) unit 122A4, and an SBH (sign bit hiding) processing unit 122A5.

[0050] The SQ processing unit 122A1 performs scalar quantization processing on the two-dimensional scaled transform coefficients and rounds each of the two-dimensional scaled transform coefficients. The LE processing unit 122A2 performs level estimation processing, calculates the RD cost when each transform coefficient is set to "-1" or "±0" (unchanged), and estimates the level at which the RD cost is most optimal. The scalar quantization processing and level estimation processing are performed on each transform coefficient for each CG, which is a group of 4x4 transform coefficients.

[0051] The AZ processing unit 122A3 determines whether to set all transform coefficients in each CG to zero based on the RD cost. The LAST processing unit 122A4 estimates the optimal position within the block of the last non-zero coefficient based on the RD cost. The SBH processing unit 122A5 performs processing to implicitly determine the sign of the last transform coefficient depending on whether the total sum of the transforms is even or odd.

[0052] In this way, the SQ processing unit 122A1, the LE processing unit 122A2, the AZ processing unit 122A3, the LAST processing unit 122A4, and the SBH processing unit 122A5 each calculate an RD cost for a candidate quantized transform coefficient, and derive the quantized transform coefficient that minimizes the cost. When calculating the RD cost, the entropy coding unit 130 estimates a bit rate R(q) when entropy coding the quantized transform coefficient.

[0053] Here, a description will be given of an example of encoding of transform coefficients by the entropy encoding unit 130. Fig. 5 is a diagram showing an example of encoding of transform coefficients by the entropy encoding unit 130. Fig. 5 shows an example in which the encoding target block is a transform block (TU: Transform Unit) having a size of 8 × 8, and the scan order is the diagonal order shown in Fig. 2(a).

[0054] As shown in Fig. 5, the entropy coding unit 130 entropy codes the positions and values ​​of significant components (significant coefficients) of the quantized transform coefficients, i.e., non-zero coefficients, and outputs the entropy-encoded positions and values. Specifically, the entropy coding unit 130 serializes the transform coefficients in a block from high frequency to low frequency in a predetermined scan order, and entropy-encodes the serialized transform coefficients. At this time, the entropy coding unit 130 signals to the decoding side a syntax element indicating the position of the last non-zero coefficient (Last Significant Coeff) on the highest frequency side among the serialized transform coefficients, and efficiently entropy-encodes the positions and values ​​of the significant coefficients from the last non-zero coefficient to the DC component.

[0055] Specifically, syntax elements for transform coefficients in HEVC include: last_sig_coeff_x_prefix last_sig_coeff_y_prefix last_sig_coeff_x_suffix last_sig_coeff_y_suffix coded_sub_block_flag sig_coeff_flag ·coeff_abs_level_greater1_flag ·coeff_abs_level_greater2_flag coeff_abs_level_remaining coeff_sign_flag exists.

[0056] Here, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix are syntax elements representing the x and y coordinates of the last non-zero coefficient determined by the LAST processing unit 122A4. coded_sub_block_flag is a syntax element representing the presence or absence of a non-zero coefficient in a sub-block (CG), sig_coeff_flag is a syntax element representing that the absolute value of a coefficient is 1 or greater, coeff_abs_level_greater1_flag is a syntax element representing that the absolute value of a coefficient is 2 or greater, coeff_abs_level_greater2_flag is a syntax element representing that the absolute value of a coefficient is 3 or greater, coeff_abs_level_remaining is a syntax element representing the value obtained by subtracting 3 from the absolute value of a coefficient, and coeff_sign_flag is a syntax element representing whether a coefficient is positive or negative.

[0057] Here, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix are syntax elements that each have one value for one transform coefficient, coded_sub_block_flag is a syntax element that has a value equal to the number of sub-blocks (CGs) of transform coefficients, and sig_coeff_flag, coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, coeff_abs_level_remaining, and coeff_sign_flag are represented by values ​​equal to the number of transform coefficients that change depending on the value of the transform coefficient and the position of the last non-zero coefficient of the transform coefficients.

[0058] Among these syntax elements, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, coded_sub_block_flag, sig_coeff_flag, coeff_abs_level_greater1_flag, and coeff_abs_level_greater2_flag are syntax elements for which entropy coding is performed using a context value, while last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, coeff_abs_level_remaining, and coeff_sign_flag are syntax elements for which entropy coding is performed by bypass processing without using a context value.

[0059] (2.3) Optimization process 6 is a diagram showing an example of the configuration of the optimization processing unit 122B according to this embodiment. As described above, the optimization processing unit 122B includes a QP that is calculated from the quantization parameter QP for the transform coefficients that have been subjected to transform processing such as DCT or DST. step The optimization unit 122B receives input of pre-quantization transform coefficients expressed as real numbers obtained by dividing by , quantized transform coefficients obtained by quantizing the pre-quantization transform coefficients using HM or VTM, which are test models for the HEVC or VVC system, and syntax element values ​​and context values ​​for the transform coefficients calculated during the quantization. Here, the pre-quantization transform coefficients and the quantized transform coefficients are each arranged two-dimensionally, and have a shape consisting of, for example, 8 × 8 transform coefficients. The optimization unit 122B performs optimal quantization to optimize the input quantized transform coefficients, and outputs the optimally quantized transform coefficients.

[0060] As shown in FIG. 6, the optimization processing unit 122B according to this embodiment includes a code acquisition unit 122B2, a code removal unit 122B3, a shape conversion unit 122B4, an adjustment value acquisition unit 122B6, and an adjustment value application unit 122B7.

[0061] The sign obtaining unit 122B2 obtains the positive or negative sign of either the input pre-quantization transform coefficient or the quantized transform coefficient, and outputs the obtained positive or negative sign to the adjustment value application unit 122B7. For example, the sign obtaining unit 122B2 obtains the positive or negative sign of each transform coefficient constituting the two-dimensional quantized transform coefficient, and outputs each obtained positive or negative sign to the adjustment value application unit 122B7.

[0062] The sign removal unit 122B3 removes the positive and negative signs from the input pre-quantization transform coefficients and quantized transform coefficients, and outputs the pre-quantization transform coefficients from which the positive and negative signs have been removed and the quantized transform coefficients from which the positive and negative signs have been removed to the adjustment value acquisition unit 122B6. ​​Specifically, the sign removal unit 122B3 removes the positive and negative signs from each transform coefficient constituting the two-dimensional pre-quantization transform coefficients, and also removes the positive and negative signs from each transform coefficient constituting the two-dimensional quantized transform coefficients. This enables processing of the neural network model independent of positive and negative signs. Note that the data from which the positive and negative signs have been removed is also used for learning when generating the neural network model.

[0063] The shape conversion unit 122B4 converts each of the input syntax element values ​​and context values ​​into the same shape as the transform coefficients, and outputs the shape-converted syntax element values ​​and shape-converted context values ​​to the adjustment value acquisition unit 122B6. ​​As described above, the input transform coefficients have a two-dimensional shape made up of m×n (m, n: integers equal to or greater than 1) transform coefficients, and in this embodiment, they have a two-dimensional shape made up of 8×8 transform coefficients. Therefore, the shape conversion unit 122B4 converts each of the input syntax element values ​​and context values ​​into an 8×8 shape.

[0064] For example, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix are each represented by a single value. Therefore, in the case of 8×8 transform coefficients, shape transform unit 122B4 replicates these syntax element values ​​and context values ​​by 64 and arranges them in the same shape as the transform coefficients.

[0065] The coded_sub_block_flag is expressed by a value corresponding to the number of sub-blocks (CG) of the transform coefficients. Therefore, in the case of 8×8 transform coefficients, there are four coded_sub_block_flag, and the shape transform unit 122B4 copies the syntax element values ​​and context values ​​to 16 each so that the values ​​are the same within the sub-block, and arranges them in the same shape as the transform coefficients.

[0066] The number of sig_coeff_flag, coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, coeff_abs_level_remaining, and coeff_sign_flag changes depending on the values ​​of the transform coefficients and the position of the last non-zero coefficient of the transform coefficients. Therefore, the shape conversion unit 122B4 arranges the syntax element values ​​and context values ​​in the same shape as the transform coefficients by filling in positions where no syntax element value or context value exists with a value that cannot occur, for example, -1.

[0067] The above operations allow any syntax element value and context value to be represented in the same form as the transform coefficient.

[0068] The adjustment value acquisition unit 122B6 inputs the pre-quantization transform coefficients from which the positive and negative signs have been removed by the sign removal unit 122B3, the quantized transform coefficients from which the positive and negative signs have been removed by the sign removal unit 122B3, and the syntax element values ​​and context values ​​whose shapes have been converted by the shape conversion unit 122B4 to a neural network model, acquires adjustment values ​​output from the neural network model, and outputs the acquired adjustment values ​​to the adjustment value application unit 122B7. The adjustment value can be, for example, one of two types of adjustment values, "-1" and "±0", for each transform coefficient, but three or more types of adjustment values ​​may also be used.

[0069] Here, the neural network model may be any model as long as it is a neural network whose inputs are transform coefficients before quantization, transform coefficients after quantization, syntax element values ​​of the transform coefficients, and context values, and whose output is an adjustment value for the transform coefficients after quantization. The neural network model may be generated by machine learning using, as training data, transform coefficients before quantization, the transform coefficients after quantization, syntax element values ​​for the transform coefficients, context values ​​for the syntax element values, and the transform coefficients after optimal quantization derived using a full search or greedy algorithm. An example of the configuration of a neural network model will be described later.

[0070] The adjustment value application unit 122B7 applies the adjustment value acquired by the adjustment value acquisition unit 122B6 and the positive / negative sign acquired by the sign acquisition unit 122B2 to the quantized transform coefficients from which the positive / negative signs have been removed by the sign removal unit 122B3, thereby outputting optimally quantized transform coefficients. For example, the adjustment value application unit 122B7 adjusts each quantized transform coefficient by subtracting each adjustment value acquired by the adjustment value acquisition unit 122B6 from each quantized transform coefficient from which the positive / negative signs have been removed by the sign removal unit 122B3. Then, the adjustment value application unit 122B7 assigns (multiplies) each adjusted quantized transform coefficient by each positive / negative sign acquired by the sign acquisition unit 122B2, thereby outputting optimally quantized transform coefficients.

[0071] As described above, the optimization processing unit 122B according to this embodiment uses not only the transform coefficients before and after quantization but also the syntax element values ​​of the transform coefficients and their context values ​​as inputs to the neural network model. This makes it possible to more appropriately adjust the transform coefficients after quantization. Therefore, the quantization process using the neural network model can be improved, thereby improving the coding efficiency of the coding device 1.

[0072] (2.4) Example of optimization process changes 7 is a diagram showing a modified example of the configuration of the optimization processing unit 122B according to this embodiment. Hereinafter, it is assumed that an LSTM, which is a one-dimensional neural network, is used as a neural network model. First, the input pre-quantization transform coefficients, post-quantization transform coefficients, syntax element values ​​of the transform coefficients, and context values ​​are converted from two dimensions to one dimension. Converting from two dimensions to one dimension according to the scan order of the transform coefficients, which indicates the entropy coding order, allows the neural network to take the entropy coding order into consideration.

[0073] As shown in FIG. 7, the optimization processing unit 122B according to this modification differs from the optimization processing unit 122B shown in FIG. 6 in that it further includes a serializing unit 122B1, a serializing unit 122B5, and a deserializing unit 122B8.

[0074] As described above, the entropy coding unit 130 converts (serializes) the two-dimensional transform coefficients after quantization into one-dimensional ones according to the scan order, and then performs entropy coding.

[0075] The serialization unit 122B1 converts (serializes) the input two-dimensional transform coefficients before quantization and the input two-dimensional transform coefficients after quantization into one dimension according to the scan order, and outputs the one-dimensional transform coefficients before quantization and the one-dimensional transform coefficients after quantization to the code removal unit 122B3 and the code acquisition unit 122B2.

[0076] The serialization unit 122B5 converts (serializes) each of the two-dimensional syntax element values ​​and two-dimensional context values ​​whose shapes have been converted by the shape conversion unit 122B4 into one dimension according to the scan order, and outputs the one-dimensional syntax element values ​​and one-dimensional context values ​​to the adjustment value acquisition unit 122B6.

[0077] In this way, the serialization units 122B1 and 122B5 convert the two-dimensional transform coefficients before quantization, the two-dimensional transform coefficients after quantization, the two-dimensional syntax element values, and the two-dimensional context values ​​into one-dimensional data according to the scan order. For example, in the HEVC format, there are three types of scan orders, diagonal, horizontal, and vertical, as shown in FIG. 2, depending on the mode of the predicted image. The serialization units 122B1 and 122B5 convert into one-dimensional data according to the scan order adopted for the corresponding transform coefficients. In the case of an 8x8 transform coefficient, the data is converted into a 64x1 shape by serialization.

[0078] In this modified example, the adjustment value acquisition unit 122B6 inputs the one-dimensional transform coefficients before quantization, the one-dimensional transform coefficients after quantization, the one-dimensional syntax element values, and the one-dimensional context values ​​into a neural network model, acquires the adjustment values ​​output from the neural network model, and outputs the acquired adjustment values ​​to the adjustment value application unit 122B7.

[0079] Here, a neural network model may be prepared for each scan order. For example, a one-dimensional neural network model corresponding to the diagonal scan order shown in Fig. 2(a), a one-dimensional neural network model corresponding to the horizontal scan order shown in Fig. 2(b), and a one-dimensional neural network model corresponding to the vertical scan order shown in Fig. 2(c) may be generated. The adjustment value acquisition unit 122B6 may identify, from among multiple neural network models corresponding to multiple scan orders, a neural network model corresponding to the scan order selected by the entropy encoding unit 130, and acquire the adjustment value using the identified neural network model.

[0080] The deserializing unit 122B8 performs the reverse process (deserialization) of the serialization performed by the serializing units 122B1 and 122B5 on the one-dimensional transform coefficients after optimal quantization output by the adjustment value application unit 122B7. That is, the deserializing unit 122B8 inversely transforms the one-dimensional transform coefficients after optimal quantization output by the adjustment value application unit 122B7 into two dimensions according to the scan order, and outputs the two-dimensional transform coefficients after optimal quantization.

[0081] In this way, according to this modification, the one-dimensional transform coefficients after quantization are adjusted according to the output obtained by inputting the one-dimensional transform coefficients before quantization and the one-dimensional transform coefficients after quantization into a one-dimensional neural network model. As described above, the entropy coding unit 130 converts the two-dimensional quantized transform coefficients obtained by the quantization unit 122 into one-dimensional ones according to the scan order, and then performs entropy coding such as CABAC. The MPS occurrence probability of a binary symbol in CABAC is estimated based on the values ​​of the binary symbols that have appeared up to that point.

[0082] Previous studies using 2D neural network models did not consider the scan order in entropy coding, and extracted features of coefficients that are not adjacent in the scan order in entropy coding using 2D neural network models. As a result, features with little correlation can lead to incorrect predictions (i.e., incorrect quantization adjustment values).

[0083] In contrast, in this modification, the scan order in entropy coding is taken into consideration. This makes it possible to extract the characteristics of adjacent coefficients in the scan order in entropy coding using a one-dimensional neural network model, and to derive optimal adjustment values. Therefore, by taking the scan order in entropy coding into consideration in the quantization process using a neural network model, it is possible to improve coding efficiency.

[0084] (2.5) An example of a neural network model 8 is a diagram showing an example of a neural network model according to this embodiment. As described above, the neural network model according to this embodiment receives inputs including transform coefficients before quantization with their signs removed, transform coefficients after quantization with their signs removed, syntax element values, and context values. When these are input to the neural network model, an adjustment value of −1 or ±0 for the transform coefficients after quantization is output.

[0085] In Figure 8, the values ​​in parentheses represent the dimensions, where batch is the batch size, block is the block size, channels is the number of channels, and embedding_dims is the number of dimensions of the embedding. The values ​​of channels and embedding_dims depend on the number of dimensions of the preceding fully connected (FC) and embedding, but the number of channels and dimensions may differ depending on each fully connected and embedding.

[0086] The values ​​used in the input and output are: transform_cofficient: Transform coefficients before quantization quantized_cofficient: Transform coefficients quantized by RDOQ processing of HM last_sig_coeff_x: x-coordinate of the last non-zero coefficient last_sig_coeff_y: y-coordinate of the last non-zero coefficient coeff_abs_level_remaining: The absolute value of the quantization coefficient minus 3 last_sig_coeff_x_prefix_ctx: Context value of last_sig_coeff_x_prefix last_sig_coeff_y_prefix_ctx: Context value of last_sig_coeff_y_prefix coded_sub_block_flag: Flag indicating whether there are non-zero coefficients in the sub-block coded_sub_block_flag_ctx: Context value of coded_sub_block_flag sig_coeff_flag: Flag indicating that the absolute value of the quantization coefficient is 1 or greater sig_coeff_flag_ctx: Context value of sig_coeff_flag coeff_abs_level_greater1_flag: Flag indicating that the absolute value of the quantization coefficient is 2 or greater coeff_abs_level_greater1_flag_ctx: Context value of coeff_abs_level_greater1_flag coeff_abs_level_greater2_flag: Flag indicating that the absolute value of the quantization coefficient is 3 or greater coeff_abs_level_greater2_flag_ctx: Context value of coeff_abs_level_greater2_flag coeff_sign_flag: Flag indicating whether the quantization coefficient is positive or negative ·adjustments: The adjustment value is the difference between the transform coefficients quantized by RDOQ processing and the transform coefficients after optimal quantization. Since the shape converter 122B4 converts the syntax element values ​​and context values ​​into the same shapes as the transform coefficients, the inputs are each expressed in the shape of batch size×64×1.

[0087] First, transform_cofficient and quantized_cofficient are combined and transformed into a shape of batch size × 64 × number of channels using a fully connected layer. During this processing, processing using Relu (activation function), Dropout, and Layer Normalization may also be performed.

[0088] Second, last_sig_coeff_x and last_sig_coeff_y are combined and transformed into a shape of batch size × 64 × number of channels using a fully connected layer. During processing, Relu, Dropout, and Layer Normalization may also be used. Coeff_abs_level_remaining is also transformed into a shape of batch size × 64 × number of channels using a fully connected layer. During processing, Relu, Dropout, and Layer Normalization may also be used. Other inputs are transformed into a shape of batch size × 64 × number of embedding dimensions by embedding.

[0089] Third, all the outputs of the first stage are combined and transformed into a shape of batch size × 64 × number of channels by a fully connected layer. During this process, Relu, Dropout, and Layer Normalization may also be applied.

[0090] Fourth, by inputting the data into the bidirectional LSTM and fully connected layer, a probability representing the adjustment value is output. The adjustment value is determined by selecting the value with the highest probability of representing the adjustment value. When performing this process, Relu, Dropout, and Layer Normalization may also be used. The bidirectional LSTM may have two or more layers instead of one. The adjustment value is not limited to two outputs, 1 and 0, and three or more adjustment values ​​may be estimated.

[0091] (Model generation method) Next, a model generation method according to this embodiment will be described. The model generation method according to this embodiment is a method for generating the above-mentioned neural network model as a trained model for encoding. This model generation method may be executed by a computer different from the encoding device 1, or may be executed by the encoding device 1. Hereinafter, an apparatus that executes the model generation method will be referred to as a model generation method apparatus. FIG. 9 is a diagram showing the model generation method according to this embodiment.

[0092] As shown in FIG. 9, in step S11, the model generation device acquires, as training data, the transform coefficients before quantization, the transform coefficients after quantization, syntax element values ​​of the transform coefficients, context values ​​of the syntax element values, and the transform coefficients after optimal quantization derived using a full search or greedy method.

[0093] In step S12, the model generation device performs machine learning using the training data acquired in step S11.

[0094] In step S13, the model generation device generates a neural network model, which is a trained model that receives as input the transform coefficients before quantization, the transform coefficients after quantization, syntax element values ​​of the transform coefficients, and context values ​​of the syntax element values, and outputs adjustment values ​​for deriving optimal transform coefficients after quantization.

[0095] (Other embodiments) In the above embodiment, an example has been described in which the size of the block to be coded (i.e., the size of the two-dimensional transform coefficients) is 8×8, but the block size is not limited to 8×8 and may be any size. Furthermore, the shape of the block (i.e., the shape of the two-dimensional transform coefficients) may be non-square.

[0096] When there are multiple candidate types of conversion processing used by the conversion unit 121, a separate neural network model may be generated for each type of conversion processing. For example, a neural network model corresponding to DCT-2 and a neural network model corresponding to DST-7 may be generated. In such a case, the adjustment value acquisition unit 122B6 may identify, from among multiple neural network models corresponding to multiple types of conversion processing, a neural network model corresponding to the type of conversion processing selected by the conversion unit 121, and acquire (derive) the quantization adjustment value using the identified neural network model.

[0097] The two-dimensional transform coefficients output by the transform unit 121 may have a block size selected from a plurality of predetermined block sizes. That is, there may be a plurality of block size candidates. The block size may be selected by the block division unit 100. In such a case, a separate neural network model may be generated for each block size. For example, a neural network model corresponding to a 4×4 block size and a neural network model corresponding to an 8×8 block size may be generated. In such a case, the adjustment value acquisition unit 122B6 may identify, from among a plurality of neural network models corresponding to a plurality of block sizes, a neural network model corresponding to the block size selected by the block division unit 100, and acquire (derive) the quantization adjustment value using the identified neural network model.

[0098] A program may be provided that causes a computer to execute each process performed by the encoding device 1. A program may be provided that causes a computer to execute each step of the model generation method. The program may be recorded on a computer-readable medium. Using a computer-readable medium, the program can be installed on a computer. Here, the computer-readable medium on which the program is recorded may be a non-transitory recording medium. The non-transitory recording medium is not particularly limited, and may be, for example, a recording medium such as a CD-ROM or a DVD-ROM. Furthermore, circuits that execute each process performed by the encoding device 1 may be integrated, and the encoding device 1 may be configured as a semiconductor integrated circuit (chip set, SoC).

[0099] The above describes the embodiments in detail with reference to the drawings, but the specific configuration is not limited to that described above, and various design changes can be made within the scope that does not deviate from the gist of the invention. [Explanation of symbols]

[0100] 1: Encoding device 100: Block division section 110: Subtraction section 120: Transformation and quantization unit 121: Conversion section 122: Quantization section 122A: RDOQ processing section 122A1: SQ processing section 122A2: LE processing unit 122A3: AZ processing section 122A4: LAST processing section 122A5: SBH processing unit 122B: Optimization processing section 122B1: Serialization section 122B2: Code acquisition section 122B3: Code removal section 122B4: Shape conversion section 122B5: Serialization section 122B6: Adjustment value acquisition unit 122B7: Adjustment value application section 122B8: Deserialization part 130: Entropy coding unit 140: Inverse conversion unit 141: Inverse quantization section 142: Inverse conversion unit 150: Synthesis section 160: Memory 170: Prediction Department

Claims

1. a quantization unit that quantizes transform coefficients obtained by performing a transform process on a residual signal representing a difference between an original image and a predicted image; an entropy coding unit that entropy codes syntax element values ​​for the transform coefficients using context values ​​of the syntax element values, the quantization unit adjusts the quantized transform coefficients according to an output obtained by inputting the transform coefficients before quantization, the transform coefficients after quantization, the syntax element values, and the context values ​​into a neural network model, thereby outputting the transform coefficients after optimal quantization.

2. The quantization unit a sign acquisition unit that acquires a positive or negative sign of either the transform coefficient before quantization or the transform coefficient after quantization; a sign removal unit that removes positive and negative signs from the transform coefficients before quantization and the transform coefficients after quantization; an adjustment value acquisition unit that inputs the transform coefficients before quantization from which the positive and negative signs have been removed, the transform coefficients after quantization from which the positive and negative signs have been removed, the syntax element values, and the context values ​​to the neural network model, and acquires adjustment values ​​output from the neural network model; the adjustment value obtained by the adjustment value obtaining unit and the positive / negative sign obtained by the sign obtaining unit to the quantized transform coefficient from which the positive / negative sign has been removed, thereby outputting the optimally quantized transform coefficient.

3. the transform coefficients have a two-dimensional shape made up of m×n transform coefficients (m and n are integers equal to or greater than 1); the quantization unit further includes a shape conversion unit that converts each of the syntax element values ​​and the context values ​​into the same shape as the transform coefficients; 3. The encoding device according to claim 2, wherein the adjustment value acquisition unit inputs the syntax element values ​​and the context values ​​converted by the shape conversion unit to the neural network model.

4. the entropy coding unit converts the two-dimensional transform coefficients after quantization into one-dimensional transform coefficients according to a scan order and then performs entropy coding; the quantization unit further includes a serialization unit that converts each of the two-dimensional transform coefficients before quantization, the two-dimensional transform coefficients after quantization, the two-dimensional syntax element values, and the two-dimensional context values ​​into one-dimensional values ​​according to the scan order; 4. The encoding device according to claim 3, wherein the adjustment value acquisition unit inputs the one-dimensional transform coefficients before quantization, the one-dimensional transform coefficients after quantization, the one-dimensional syntax element values, and the one-dimensional context values ​​to the neural network model.

5. the entropy coding unit converts two-dimensional quantized transform coefficients into one-dimensional ones in accordance with a scan order selected from a plurality of predetermined scan orders; 4. The encoding device according to claim 2, wherein the adjustment value acquisition unit identifies a neural network model corresponding to the selected scan order from among a plurality of neural network models corresponding to the plurality of scan orders, and acquires the adjustment value using the identified neural network model.

6. A program that causes a computer to function as the encoding device according to any one of claims 1 to 5.

7. A model generation method for generating a trained neural network model for encoding, comprising: A step of acquiring, as training data, transform coefficients before quantization, the transform coefficients after quantization, syntax element values ​​for the transform coefficients, context values ​​of the syntax element values, and the transform coefficients after optimal quantization derived using a full search or a greedy algorithm; performing machine learning using the training data; generating a neural network model that receives as input the transform coefficients before quantization, the transform coefficients after quantization, syntax element values ​​for the transform coefficients, and context values ​​for the syntax element values, and that outputs adjustment values ​​for adjusting the transform coefficients after quantization to optimize them; Model generation method.

Citation Information

Patent Citations

  • Image improvement apparatus

    JP2007110618A

  • Image decoding apparatus, image decoding method, and computer program

    JP2010118729A

  • Image processing device, image processing method, and image processing program

    JP2020088740A

  • Parallelized Rate-Distortion Optimal Quantization Using Deep Learning

    JP2023522575A

  • Parallelized rate-distortion optimized quantization using deep learning

    WO2021211270A1