Image encoding apparatus and method, image decoding apparatus and method, and storage medium
By determining whether orthogonal transformation processing is performed in the image encoding and decoding device and adaptively correcting the quantization parameters, the problem of increasing the code quantity when the quantization parameters in HEVC and VVC is less than 4 is solved, which improves the encoding efficiency and reduces the bitstream data volume.
Patent Information
- Application Number
- CN202411950046.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-09-17
- Filing Date
- 2020-08-05
- Publication Date
- 2025-02-25
AI Technical Summary
In encoding methods such as HEVC and VVC, when the quantization parameter is 4, the quantization step size is designed to be 1, resulting in the quantization step size being less than 1 when the quantization parameter is less than 4, increasing the grayscale and improving the image quality. However, when the orthogonal transformation is not used, the compressed image quality cannot be improved, and there is a problem of increasing the number of codes.
By introducing the first judgment means to the image encoding device and the decoding device, it is determined whether orthogonal transformation processing is performed on each color component in the block to be encoded or decoded. According to the judgment result, the corresponding quantization parameters are used for encoding or decoding, and the corrected quantization parameters are generated to reduce the unnecessary increase in the number of codes by adaptively correcting the quantization parameters.
By adaptively correcting the quantization parameters, unnecessary increase in the amount of code is reduced, encoding efficiency is improved, and the total data volume of the bitstream is reduced without changing the image quality.
Smart Images

Figure CN119520814A_ABST
Abstract
Description
[0001] (This application is a divisional application of an application filed on August 5, 2020, with application number 2020800653213 and invention name “Image encoding device and method, image decoding device and method, and storage medium”.) Technical Field
[0002] The present invention relates to image coding technology. Background Art
[0003] A High Efficiency Video Coding (HEVC) encoding method (hereinafter referred to as “HEVC”) is known as a compression encoding method for moving images.
[0004] Recently, activities to develop an international standard for an even more efficient encoding method as a successor to HEVC have been started, and ISO-IEC and ITU-T have jointly established the Joint Video Experts Group (JVET). JVET is promoting the standardization of the Versatile Video Coding (VVC) encoding method (hereinafter referred to as "VVC") as a successor encoding method to HEVC.
[0005] As a method for improving encoding efficiency for artificially created images that are not natural images, a transform skip technique is being considered that performs encoding by quantizing a prediction residual without performing an orthogonal transform. Japanese Patent Laid-Open No. 2015-521826 (Patent Document 1) describes the transform skip technique.
[0006] Prior art literature
[0007] Patent Literature
[0008] Patent Document 1: Japanese Patent Application Laid-Open No. 2015-521826 Summary of the invention
[0009] Problem that the invention aims to solve
[0010] Here, in HEVC, VVC, etc., when the quantization parameter used in the quantization process is 4, the quantization step (scaling factor) is designed to be 1. In other words, the quantization step is designed so that when the quantization parameter is 4, the value does not change between before and after quantization. In other words, if the quantization parameter is greater than 4, the quantization step will be greater than 1, and the quantized value will be smaller than the original value. On the contrary, if the quantization parameter is less than 4, the quantization step becomes a small value less than 1, and the quantized value becomes larger than the original value, thereby producing the effect of increasing the grayscale. In the case of an encoding process using a normal orthogonal transform, setting the quantization parameter to less than 4 increases the grayscale, and therefore has the effect of improving the image quality after compression compared to when the quantization parameter is 4. On the other hand, the problem with encoding processing that does not use an orthogonal transform is that even if the grayscale increases, the image quality after compression is not improved, and there is a larger amount of code.
[0011] The present invention achieved in order to solve the above-mentioned problems provides a technique for reducing the possibility of unnecessary increase in the code amount by adaptively correcting a quantization parameter.
[0012] Solutions for solving problems
[0013] In order to solve the above-mentioned problem, an image encoding device of the present invention has the following configuration. That is, an image encoding device for generating a bit stream by dividing an image into a plurality of blocks and encoding each block obtained by the division, the image encoding device being characterized by comprising: a first judgment unit for judging whether or not to perform an orthogonal transform process on the coefficients of each color component in the block to be encoded; and an encoding unit for encoding the block to be encoded using a first quantization parameter corresponding to the coefficients of each color component in the block to be encoded when the first judgment unit judges that the coefficients of each color component in the block to be encoded are to be orthogonally transformed, and encoding the block to be encoded using a second quantization parameter obtained by correcting the first quantization parameter when the first judgment unit judges that the coefficients of each color component in the block to be encoded are not to be orthogonally transformed, wherein the encoding unit derives the second quantization parameter by performing a predetermined judgment based on the first quantization parameter and a predetermined value, and correcting the first quantization parameter according to the judgment result of the predetermined judgment.
[0014] In addition, the image decoding device of the present invention has the following configuration. That is, an image decoding device for decoding a bit stream generated by encoding an image, the image decoding device decodes the encoded data corresponding to the block to be decoded in the image contained in the bit stream, and the image decoding device is characterized in that it includes: a first judgment unit for judging whether or not the residual coefficients of each color component in the block to be decoded have been subjected to orthogonal transformation processing; and a decoding unit for deriving a first quantization parameter corresponding to the residual coefficients of each color component in the block to be decoded based on information decoded from the bit stream when the first judgment unit judges that the residual coefficients of each color component in the block to be decoded have been subjected to orthogonal transformation processing, and The block to be decoded is decoded using the first quantization parameter, and when the first judgment unit judges that the residual coefficients of each color component in the block to be decoded are not orthogonally transformed, a first quantization parameter corresponding to the block to be decoded is derived based on information decoded from the bit stream, and the block to be decoded is decoded using a second quantization parameter obtained by correcting the first quantization parameter, wherein the information is decoded from the bit stream, and the decoding unit derives the second quantization parameter by making a predetermined judgment based on the first quantization parameter and a predetermined value, and correcting the first quantization parameter according to a judgment result of the predetermined judgment.
[0015] Effects of the Invention
[0016] According to the present invention, the possibility of unnecessary increase in the code amount can be reduced by adaptively correcting the quantization parameter.
[0017] Other features and advantages of the present invention will be apparent from the following description in conjunction with the accompanying drawings. Note that throughout the accompanying drawings, the same reference numerals represent the same or similar components. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0019] Figure 1 is a block diagram showing the configuration of the image encoding device according to the first embodiment.
[0020] Figure 2 is a block diagram showing the configuration of an image decoding device according to the second embodiment.
[0021] Figure 3 is a flowchart showing an image encoding process in the image encoding device according to the first embodiment.
[0022] Figure 4 is a flowchart showing an image decoding process in the image decoding device according to the second embodiment.
[0023] Figure 5 is a block diagram showing an example of the hardware configuration of a computer to which the image encoding device and the image decoding device according to the aforementioned embodiments can be applied.
[0024] Fig. 6A is a diagram showing an example of the configuration of a bit stream generated by the first embodiment and decoded by the second embodiment.
[0025] Figure 6B is a diagram showing an example of the configuration of a bit stream generated by the first embodiment and decoded by the second embodiment.
[0026] Fig. 7A 1 is a diagram showing an example of sub-block division used in each embodiment.
[0027] Figure 7B 1 is a diagram showing an example of sub-block division used in each embodiment.
[0028] Figure 7C 1 is a diagram showing an example of sub-block division used in each embodiment.
[0029] Fig.7D 1 is a diagram showing an example of sub-block division used in each embodiment.
[0030] Fig. 7E 1 is a diagram showing an example of sub-block division used in each embodiment.
[0031] Figure 7F 1 is a diagram showing an example of sub-block division used in each embodiment.
[0032] Description of Reference Numerals
[0033] 101, 112, 201, 208 terminals
[0034] 102 block segmentation units
[0035] 103 quantization value correction information generating unit
[0036] 104 prediction unit
[0037] 105 Transform / Quantization Unit
[0038] 106, 204 inverse quantization / inverse transform unit
[0039] 107, 205 Image reconstruction unit
[0040] 108, 206 frame memory
[0041] 109, 207 loop filter unit
[0042] 110 Coding Unit
[0043] 111 Integrated coding unit
[0044] 202 separation / decoding unit
[0045] 203 decoding unit DETAILED DESCRIPTION
[0046] Embodiments will be described in detail below with reference to the accompanying drawings. Note that the following embodiments are not intended to limit the scope of the claimed invention. Multiple features are described in these embodiments, but the invention is not limited to requiring all of these features, and multiple such features may be appropriately combined. In addition, in the accompanying drawings, the same figure mark is given to the same or similar configuration, and its redundant description is omitted.
[0047] Embodiments of the present invention will be described below based on the accompanying drawings. It should be noted that the configurations described in the following embodiments are examples, and the present invention is not intended to be limited to the configurations described in the following embodiments. Note that terms such as "basic block" and "sub-block" in the embodiments are terms used for convenience, and other terms may be used appropriately to the extent that their meanings remain unchanged. For example, "basic block" and "sub-block" may be referred to as "basic unit" and "sub-unit", or may be simply referred to as "block" or "unit".
[0048] First embodiment
[0049] Embodiments of the present invention will be described below with reference to the accompanying drawings.
[0050] Figure 1 is a block diagram showing an image encoding apparatus according to this embodiment. Figure 1 , 101 indicates a terminal to which image data is input.
[0051] Reference numeral 102 denotes a block division unit which divides an input image into a plurality of basic blocks and outputs an image in units of basic blocks to a subsequent stage. For example, a block of 128×128 pixels may be used as a basic block, or a block of 32×32 pixels may be used as a basic block.
[0052] 103 is a quantization value correction information generating unit, which generates quantization value correction information as information related to the process of correcting the quantization parameter defining the quantization step. There is no particular limitation on the method for generating the quantization value correction information, but the user may input the quantization value correction information, the image encoding device may calculate the quantization value correction information according to the characteristics of the input image, or may use a value specified in advance as an initial value. Note that the quantization parameter does not directly indicate the quantization step, and for example, it is designed as follows: when the quantization parameter is 4, the quantization step (scaling factor) is 1. The quantization step increases as the value of the quantization parameter increases.
[0053] 104 is a prediction unit that determines a method for dividing image data in units of basic blocks into sub-blocks. Then, the basic blocks are divided into sub-blocks having the determined shape and size. Then, predicted image data is generated by performing intra-frame prediction (which is prediction within a frame in units of sub-blocks) and inter-frame prediction (which is prediction between frames), etc. For example, the prediction unit 104 selects a prediction method to be performed for a sub-block from intra-frame prediction, inter-frame prediction, and predictive coding combining intra-frame prediction and inter-frame prediction, performs the selected prediction, and generates predicted image data for the sub-block. The prediction unit 104 also serves as a judgment component for judging what kind of encoding will be performed based on a flag, etc.
[0054] In addition, the prediction unit 104 calculates and outputs a prediction error based on the input image data and the predicted image data. For example, the prediction unit 104 calculates the difference between each pixel value in the subblock and each pixel value in the predicted image data generated by predicting the subblock as the prediction error.
[0055] The prediction unit 104 also outputs information required for prediction together with the prediction error. "Information required for prediction" is, for example, information indicating the segmentation state of the sub-block, a prediction mode indicating the prediction method of the sub-block, and a motion vector, etc. Hereinafter, the information required for prediction will be referred to as "prediction information". In a case where there are few types of colors (pixel values) used in a sub-block, it can be determined that palette encoding using a palette can compress data more efficiently. This determination can be made by an image encoding device or a user. In the case of making such a determination, palette encoding can be selected as a method for generating predicted image data. A "palette" has one or more entries associated with information indicating a color and an index for specifying information indicating the color.
[0056] In the case where palette encoding is selected, a flag indicating that palette encoding will be used (hereinafter referred to as a "palette flag") is output as prediction information. An index indicating which color in the palette is used for each pixel is also output as prediction information. In addition, information indicating a color that does not exist in the palette (for which there is no corresponding entry) (hereinafter referred to as an "escape value") is also output as prediction information. In this way, in palette encoding, information that directly indicates a color value can be used as an escape value to encode a color that does not exist in the palette without using a palette. For example, the prediction unit 104 can use an escape value to encode a specific pixel in a sub-block to be encoded using palette encoding. In other words, the prediction unit 104 can decide whether to use an escape value on a pixel-by-pixel basis. Encoding using an escape value is also referred to as "escape encoding."
[0057] 105 is a transform / quantization unit, which performs an orthogonal transform (orthogonal transform processing) on the above-mentioned prediction error in units of sub-blocks, and obtains transform coefficients representing each frequency component of the prediction error. The transform / quantization unit 105 is a transform / quantization unit that further quantizes the transform coefficient to obtain a residual coefficient (quantized transform coefficient). If transform skipping or palette encoding is used, orthogonal transform processing is not performed. Note that a function for performing orthogonal transform and a function for performing quantization may be provided separately.
[0058] 106 is an inverse quantization / inverse transform unit, which inversely quantizes the residual coefficient output from the transform / quantization unit 105, reconstructs the transform coefficient, and further performs inverse orthogonal transform (inverse orthogonal transform processing) to reconstruct the prediction error. If transform skip or palette encoding, etc. is used, the inverse orthogonal transform processing is not performed. This processing for reconstructing (deriving) the orthogonal transform coefficient will be referred to as "inverse quantization". Note that a function for performing inverse quantization and a function for performing inverse orthogonal transform processing can be provided separately. 108 is a frame memory for storing reconstructed image data.
[0059] 107 is an image reconstruction unit. The image reconstruction unit 107 generates predicted image data by appropriately referring to the frame memory 108 based on the prediction information output from the prediction unit 104, generates reconstructed image data from the predicted image data and the input prediction error, and outputs the reconstructed image data.
[0060] 109 is a loop filtering unit. The loop filtering unit 109 performs loop filtering processing such as deblocking filtering and sample adaptive offset on the reconstructed image, and then outputs the filtered image.
[0061] 110 is a coding unit. The coding unit 110 generates code data by coding the residual coefficient output from the transform / quantization unit 105 and the prediction information output from the prediction unit 104, and outputs the code data.
[0062] 111 is an integrated coding unit. The integrated coding unit 111 encodes the output from the quantization value correction information generating unit 103 and generates header code data. The integrated coding unit 111 also generates a bit stream and outputs the bit stream together with the code data output from the coding unit 110. Information indicating a quantization parameter is also encoded in the bit stream. For example, the information indicating a quantization parameter is information indicating a difference between a quantization parameter to be encoded and other quantization parameters (for example, a quantization parameter of a previous subblock).
[0063] Reference numeral 112 denotes a terminal for outputting the bit stream generated by the integrated coding unit 111 to the outside.
[0064] Next, an operation for encoding an image in the image encoding apparatus will be described. Although the present embodiment assumes a configuration in which moving image data is input in units of frames (in units of pictures), the configuration may be such that still image data of one frame is input.
[0065] Before encoding an image, if transform skip or palette coding is used, the quantization value correction information generation unit 103 generates quantization value correction information for correcting a quantization parameter at a later stage. If transform skip or palette coding is used, it is sufficient for the quantization value correction information generation unit 103 to generate at least quantization value correction information. However, in any case, generating quantization correction information can further reduce the amount of code. This embodiment assumes that the quantization value correction information includes, for example, information indicating QPmin, which is the minimum quantization value (minimum QP value) for correcting the quantization parameter. For example, if the quantization parameter is less than QPmin, the quantization parameter is corrected to QPmin. A detailed description of how to use the quantization value correction information will be given below. There is no particular limitation on the method for generating the quantization value correction information, but the user may input (specify) the quantization value correction information, the image coding device may calculate the quantization value correction information according to the characteristics of the input image, or a pre-specified initial value may be used. A value indicating that the quantization step size is 1 (for example, 4) may be used as the initial value. If transform skip or palette coding is used, the image quality will be the same as the case where the quantization step is 1 even if a quantization step size smaller than 1 is used, so it is appropriate to set QPmin to 4 in the case where transform skip or palette coding is used. Note that in the case where QPmin is set to the initial value, the quantization value correction information can be omitted. As will be described later, if QPmin is set to a value other than the initial value, the difference with respect to the initial value can be used as the quantization value correction information.
[0066] In addition, the quantization value correction information may be determined based on implementation restrictions when determining whether palette encoding is to be used in the prediction unit 104. In addition, the quantization value correction information may be determined based on implementation restrictions when determining whether orthogonal transform is to be performed in the transform / quantization unit 105.
[0067] Then, the generated quantization value correction information is input to the transform / quantization unit 105 , the inverse quantization / inverse transform unit 106 , and the integrated encoding unit 111 .
[0068] One frame's worth of image data input from the terminal 101 is input to the block division unit 102 .
[0069] The block division unit 102 divides the input image data into a plurality of basic blocks, and outputs an image in units of basic blocks to the prediction unit 104 .
[0070] The prediction unit 104 performs prediction processing on the image data input from the block division unit 102. Specifically, first, subblock division for dividing a basic block into smaller subblocks is set.
[0071] Figures 7A to 7F An example of a sub-block partitioning method is shown. A thick frame indicated by 700 represents a basic block, and for simplicity of explanation, a 32×32 pixel configuration is assumed, wherein each quadrilateral within the thick frame represents a sub-block. Figure 7B An example of conventional square sub-block partitioning is shown, in which a basic block of 32×32 pixels is partitioned into sub-blocks each having a size of 16×16 pixels. Figures 7C to 7F shows an example of rectangular sub-block partitioning, where a basic block is partitioned into Figure 7C The vertical 16×32 pixel sub-blocks in Fig.7D The horizontal sub-block of 32×16 pixels in Fig. 7E and Figure 7F In the embodiment of the present invention, the basic block is divided into rectangular sub-blocks at a ratio of 1:2:1. In this way, not only square sub-blocks but also rectangular sub-blocks are used for encoding processing.
[0072] Although this embodiment assumes that only undivided Fig. 7A The block shown is a basic block of 32×32 pixels, but the sub-block partitioning method is not limited to this. You can also use Figure 7B The quadtree partitioning shown in FIG. 7E and FIG. Figure 7F The ternary tree partitioning such as the partitioning shown, or Figure 7C and Fig.7D Binary tree partitioning such as the partitioning shown.
[0073] Then, the prediction unit 104 determines a prediction mode for each sub-block to be processed (block to be encoded). Specifically, the prediction unit 104 determines the prediction mode to be used in units of sub-blocks, such as intra-frame prediction using pixels encoded in the same frame as the frame containing the sub-block to be processed, or inter-frame prediction using pixels from different encoded frames.
[0074] The prediction unit 104 generates predicted image data based on the determined prediction mode and the encoded pixels, further generates a prediction error from the input image data and the predicted image data, and outputs the prediction error to the transform / quantization unit 105 .
[0075] The prediction unit 104 also outputs information such as sub-block partitioning and prediction mode as prediction information to the encoding unit 110 and the image reconstruction unit 107. However, for each sub-block to be processed, palette encoding may be selected instead of prediction modes such as intra prediction and inter prediction. In this case, a palette flag indicating whether palette encoding is to be used is output as prediction information. Then, if palette encoding is selected for the sub-block (for example, the palette flag is 1), an index indicating color information contained in a palette corresponding to each pixel and an escape value, etc. are also output as prediction information.
[0076] On the other hand, if palette encoding is not selected for the subblock, that is, if a prediction mode such as intra prediction or inter prediction is selected (for example, the value of the palette flag is 0), other prediction information, prediction error, etc. are output after the palette flag.
[0077] The transform / quantization unit 105 performs orthogonal transform processing and quantization processing on the prediction error output from the prediction unit 104. Specifically, first, it is determined whether or not to perform orthogonal transform processing on the prediction error of the sub-block using a prediction mode other than palette coding (such as intra-frame prediction or inter-frame prediction). Here, image coding of a natural image (such as an image generated by photographing a landscape or a person using a camera) is considered. Generally, in such image coding, the amount of data can be reduced without significant image quality degradation by performing orthogonal transform on the prediction error, decomposing the result into frequency components, and performing quantization processing that matches human visual characteristics. On the other hand, in artificial images (such as computer graphics) where the boundaries of objects in the image are prominent, the high-frequency components are large. Therefore, in some cases, the use of orthogonal transform actually increases the amount of data. Therefore, the transform / quantization unit 105 determines whether or not to perform orthogonal transform on each color component (Y, Cb, Cr) in the sub-block, and generates the determination result as transform skip information. In other words, transform skip information can be generated for each color component (Y, Cb, Cr). In other words, whether to perform transform skip may be determined for each color component. For example, two types of transform skip information may be generated, namely, transform skip information for the luma component (Y) and transform skip information for the chroma components (Cb and Cr).
[0078] If it is determined that the color component (Y, Cb or Cr) of the sub-block is to be orthogonally transformed, the prediction error corresponding to the color component is orthogonally transformed, and an orthogonal transformation coefficient is generated. Then, a quantization parameter is used to perform a quantization process, and a residual coefficient is generated. There is no particular limitation on the method used here for determining the actual value of the quantization parameter, but the user may input the quantization parameter, or the image encoding device may calculate the quantization parameter according to the characteristics of the input image (image complexity, etc.). A value pre-specified as an initial value may also be used. This embodiment assumes that a quantization parameter QP is calculated using a quantization parameter calculation unit (not shown) and the quantization parameter QP is input to the transformation / quantization unit 105. The orthogonal transformation coefficient of the luminance component (Y) of the sub-block is quantized using the quantization parameter QP, and a residual coefficient is generated. On the other hand, the orthogonal transformation coefficient of the Cb component of the sub-block is quantized using the quantization parameter QPcb to which the quantization parameter QP has been adjusted for the Cb component, and a residual coefficient is generated. Likewise, the orthogonal transform coefficient of the Cr component of the sub-block is quantized using the quantization parameter QPcr for which the quantization parameter QP has been adjusted for the Cr component, and a residual coefficient is generated. The method for calculating QPcb and QPcr according to QP is not particularly limited, but a table used for calculation may be prepared in advance. The table used for calculating QPcb and QPcr may also be encoded separately so that the same QPcb and QPcr may be calculated on the decoding side. If the table used for calculation is encoded separately, the table is encoded in the header of the sequence or picture of the bit stream using the integrated encoding unit 111 of the subsequent stage.
[0079] On the other hand, if it is determined that the color component of the sub-block is not to be orthogonally transformed, that is, if it is determined that the transformation is to be skipped, the prediction error is quantized using the corrected quantization parameter obtained by correcting the quantization parameter QP, and a residual coefficient is generated. Specifically, the prediction error of the luminance component (Y) of the sub-block is quantized using the QP' obtained by correcting the above QP, and a residual coefficient is generated. On the other hand, the prediction error of the Cb component of the sub-block is quantized using the QPcb' obtained by correcting the above QPcb, and a residual coefficient is generated. Similarly, the prediction error of the Cr component of the sub-block is quantized using the QPcr' obtained by correcting the above QPcr, and a residual coefficient is generated.
[0080] Here, a specific method for calculating the corrected quantization parameters (QP', QPcb', and QPcr') from the quantization parameters (QP, QPcb, and QPcr) will be described. The following formulas (1) to (3) indicating predetermined judgments are formulas for calculating the corrected quantization parameters (QP', QPcb', and QPcr') from the quantization parameters (QP, QPcb, and QPcr). QPmin is the minimum QP value (minimum value) used in the correction process input from the quantization value correction information generation unit 103.
[0081] QP'=Max(QPmin,QP)…(1)
[0082] QPcb'=Max(QPmin,QPcb)…(2)
[0083] QPcr'=Max(QPmin,QPcr)…(3)
[0084] (Here, Max(A,B) means the larger of A and B.)
[0085] For example, in the above formulas (1) to (3), if QPmin, which is the minimum QP value, is 4, the corrected quantization parameters (QP', QPcb', and QPcr') will never be lower than 4. In other words, the quantization step size will no longer be less than 1, which makes it possible to prevent an unnecessary increase in the amount of code when transform skipping is used. Although the configuration may be such that different minimum QP values are set for each of the Y, Cb, and Cr color components, in the present embodiment, the same minimum QP value (i.e., QPmin) is applied to all color components.
[0086] The residual coefficient and transform skip information generated in this manner are input to the inverse quantization / inverse transform unit 106 and the encoding unit 110 .
[0087] Next, the processing performed when palette encoding is performed on a subblock will be described. In palette encoding, since no prediction error is initially generated, orthogonal transform processing is not performed. Quantization processing is also not performed on pixels to which indexes indicating colors included in the palette are set.
[0088] On the other hand, for pixels having escape values set for encoding colors not present in the palette, the escape values themselves are quantized to limit the increase in the amount of code. In the quantization of the escape values, correction quantization parameters (QP', QPcb', and QPcr') are used instead of the above quantization parameters (QP, QPcb, and QPcr). This makes it possible to prevent unnecessary increase in the amount of code when using palette encoding in the same manner as when using transform skipping. Like the residual coefficients, the quantized escape values are input to the inverse quantization / inverse transform unit 106 and the encoding unit 110.
[0089] Next, the inverse quantization / inverse transformation unit 106 performs inverse quantization processing, inverse orthogonal transformation processing, and the like on the input residual coefficient.
[0090] Specifically, first, the residual coefficients of the sub-block are inversely quantized using a prediction mode other than palette coding (such as intra prediction or inter prediction), and the orthogonal transform coefficients are reconstructed.
[0091] Whether or not orthogonal transform is applied to each color component of each subblock is determined based on the transform skip flag input from the transform / quantization unit 105. A transform skip flag of 0 indicates that transform skip is not used. The quantization parameter used at this time is the same as that in the transform / quantization unit 105, and for the residual coefficient generated by performing the orthogonal transform process, the above-mentioned quantization parameter (QP, QPcb, and QPcr) is used for each color component.
[0092] On the other hand, if generated using transform skip (eg, transform skip flag is 1), then for the residual coefficients, the above-described corrected quantization parameters (QP′, QPcb′, and QPcr′) are used for each color component.
[0093] In other words, for the residual coefficient generated by performing the orthogonal transform process, the prediction error is reconstructed by performing inverse quantization using the quantization parameters (QP, QPcb, and QPcr) and further performing inverse orthogonal transform. On the other hand, for the residual coefficient generated by the transform skip, the prediction error is reconstructed by performing inverse quantization using the correction quantization parameters (QP', QPcb', and QPcr'). The prediction error reconstructed in this way is output to the image reconstruction unit 107.
[0094] If the sub-block has been palette-coded, the escaped value is reconstructed by inverse quantizing the quantized escaped value using the corrected quantization parameters (QP′, QPcb′, and QPcr′). The reconstructed escaped value is output to the image reconstruction unit 107 .
[0095] In the image reconstruction unit 107, if the palette flag input from the prediction unit 104 indicates that the sub-block is not palette-encoded, the frame memory 108 is appropriately referenced based on other prediction information, and a prediction image is reconstructed. Image data is reconstructed based on the reconstructed prediction image and the reconstructed prediction error input from the inverse quantization / inverse transform unit 106, and the image data is input to and stored in the frame memory 108. On the other hand, if the sub-block is palette-encoded, the image data is reconstructed using an index or escape value indicating which color in the palette is used for each pixel input as prediction information, and the image data is input to and stored in the frame memory 108.
[0096] The loop filtering unit 109 reads out the reconstructed image data from the frame memory 108 and performs loop filtering processing such as deblocking filtering, etc. The loop filtering processing is performed based on the prediction mode of the prediction unit 104, the value of the quantization parameter used by the transform / quantization unit 105, whether there is a non-zero value (hereinafter referred to as "significant coefficient") in the processing sub-block after quantization, and sub-block division information, etc. Then, the filtered image is input to the frame memory 108 again and stored again.
[0097] The encoding unit 110 generates code data by entropy encoding the residual coefficients generated by the transform / quantization unit 105 and the prediction information input from the prediction unit 104 in units of sub-blocks. Specifically, first, a palette flag indicating whether the sub-block is palette-encoded is encoded. If the sub-block is not palette-encoded, 0 is used as the palette flag input as the prediction information for entropy encoding, and then other prediction information and residual coefficients are entropy encoded, and code data is generated. On the other hand, if the sub-block is palette-encoded, 1 is used as the palette flag for entropy encoding, and then the index and escape value indicating which color in the palette is used for each pixel are encoded, and code data is generated. The entropy encoding method is not particularly specified, but Golomb encoding, arithmetic encoding, or Huffman encoding, etc. can be used. The generated code data is output to the integrated encoding unit 111.
[0098] The integrated coding unit 111 encodes the quantization value correction information input from the quantization value correction information generating unit 103, and generates a quantization value correction information code. The coding method is not particularly specified, but Golomb coding, arithmetic coding, Huffman coding, or the like may be used. This embodiment assumes that, as an example, 4 indicating a quantization step size of 1 is used as a reference (initial value), and the difference between the reference 4 and the minimum QP value QPmin as the quantization value correction information is encoded by Golomb coding. In this embodiment, QPmin is set to 4, so a 1-bit code 0 obtained by Golomb coding the difference 0 from the reference 4 is used as the quantization value correction information code. This makes it possible to minimize the amount of code in the quantization value correction information. In addition, in the case where a table for calculating QPcb and QPcr is encoded according to the above-mentioned quantization parameter QP, the table is also encoded here. A bit stream is formed by multiplexing this code data with the code data input from the coding unit 110 or the like. This bit stream is finally output from the terminal 112.
[0099] Fig. 6A An example of a bit stream including the encoded quantization value correction information is shown. The quantization control size information is included as a quantization control size information code in one of the headers of a sequence or a picture. Figure 6B As shown, this embodiment assumes that the information is contained in the header of the sequence. However, the location of the code is not limited to this, and as shown in FIG. Fig. 6A As shown, the information may be included in the header of the picture.
[0100] Figure 3 is a flowchart showing encoding processing in the image encoding device according to the first embodiment.
[0101] First, in step S301 , the block division unit 102 divides an input image in units of frames into units of basic blocks.
[0102] In step S302 , the quantization value correction information generation unit 103 determines quantization value correction information as information for processing to correct the quantization parameter. The integrated encoding unit 111 encodes the quantization value correction information.
[0103] In step S303, the prediction unit 104 performs prediction processing on the image data in units of the basic blocks generated in step S301, and generates prediction information (such as sub-block segmentation and prediction mode, etc.), and predicted image data. In addition, the prediction error is calculated based on the input image data and the predicted image data. However, in cases such as when there are few types of colors (pixel values) used in the sub-blocks and it can be determined that the data can be compressed more efficiently using palette encoding, palette encoding can be selected. The prediction unit 104 also generates a palette flag indicating whether to perform palette encoding on the sub-blocks.
[0104] In step S304, if a prediction mode other than palette coding is used for the sub-block, the transform / quantization unit 105 first determines whether or not to perform orthogonal transform processing on each color component (Y, Cb, Cr) of the prediction error calculated in step S303. Then, transform skip information is generated as a result of the determination. If it is determined that the color component is to be orthogonally transformed, the prediction error corresponding to the color component is orthogonally transformed, and an orthogonal transform coefficient is generated. Then, quantization is performed using quantization parameters (QP, QPcb, and QPcr), and a residual coefficient is generated. On the other hand, if it is determined that orthogonal transform processing is to be skipped for the color component, the prediction error corresponding to the color component is quantized using correction quantization parameters (QP', QPcb', and QPcr'), and a residual coefficient is generated. If the sub-block has been palette coded, the transform / quantization unit 105 quantizes the escape value using the correction quantization parameters (QP', QPcb', and QPcr'), and generates the quantized escape value.
[0105] In step S305, the inverse quantization / inverse transformation unit 106 performs inverse quantization processing and inverse orthogonal transformation processing on the residual coefficient generated in step S304. Specifically, when a prediction mode other than palette coding is used, the inverse quantization / inverse transformation unit 106 first determines whether orthogonal transformation is performed on each color component of each sub-block based on the transformation skip information generated in step S304. Based on the determination result, the residual coefficient is inversely quantized.
[0106] The quantization parameters used at this time are the same as those in step S304, and for the residual coefficients generated by performing the orthogonal transform process, the above-described quantization parameters (QP, QPcb, and QPcr) are used for each color component.
[0107] On the other hand, for the residual coefficient generated by transform skipping, the above-mentioned corrected quantization parameters (QP', QPcb', and QPcr') are used for each color component. In other words, for the residual coefficient generated by performing orthogonal transform processing, the prediction error is reconstructed by performing inverse quantization using the quantization parameters (QP, QPcb, and QPcr) and further performing inverse orthogonal transform. On the other hand, for the residual coefficient generated by transform skipping, the prediction error is reconstructed by performing inverse quantization using the corrected quantization parameters (QP', QPcb', and QPcr').
[0108] In addition, if the sub-block has been palette-coded, the escaped value is reconstructed by inversely quantizing the escaped value quantized in step S304 using the corrected quantization parameters (QP′, QPcb′, and QPcr′).
[0109] In step S306, if the palette flag generated in step S303 indicates that the sub-block is not palette-coded, the image reconstruction unit 107 reconstructs the predicted image based on the prediction information generated in step S303. The image data is further reconstructed according to the reconstructed predicted image and the prediction error generated in step S305. On the other hand, if the palette flag indicates that the sub-block is palette-coded, the image reconstruction unit 107 reconstructs the image data using an index or escape value indicating which color in the palette is used for each pixel.
[0110] In step S307, the encoding unit 110 encodes the prediction information generated in step S303 and the residual coefficient generated in step S304, and generates code data. Specifically, first, a palette flag indicating whether the sub-block is palette-encoded is encoded. If the sub-block is not palette-encoded, 0 is used as the palette flag input as the prediction information for entropy encoding, and then other prediction information and residual coefficients are entropy-encoded, and code data is generated.
[0111] On the other hand, if the sub-block is palette coded, 1 is entropy coded as the palette flag, and then the index and escape value indicating which color in the palette each pixel uses are encoded, and the code data is generated. In addition, other code data is included to generate a bit stream.
[0112] In step S308, the image encoding device determines whether the encoding of all basic blocks in the frame is completed; if the encoding of all basic blocks in the frame is completed, the sequence enters step S309, and if the encoding of all basic blocks in the frame is not completed, the sequence returns to step S303 for the next basic block.
[0113] In step S309 , the loop filtering unit 109 performs loop filtering processing on the image data reconstructed in step S306 , generates a filtered image, and ends the processing.
[0114] The above configuration and operation, in particular, by generating quantization value correction information in step S302 and using the quantization parameter corrected based on the quantization value correction information in steps S304 and S305, makes it possible to prevent an unnecessary increase in the amount of code. As a result, the total amount of data in the generated bit stream can be suppressed, and the encoding efficiency can be improved.
[0115] Although the present embodiment describes a configuration in which the quantization parameters corresponding to the color components (ie, Y, Cb, and Cr) are corrected, the present invention is not limited thereto. For example, for the common encoding of the chrominance residual coefficients for encoding the residual coefficients of Cb and Cr together in the study of VVC, a different quantization parameter QPcbcr is used, and this quantization parameter can be applied here.
[0116] QPcbcr'=Max(QPmin,QPcbcr)…(4)
[0117] In other words, as shown in the above formula (4), the configuration can be as follows: the prediction error in which the transform is skipped and the chrominance residual coefficients are jointly encoded is quantized using the correction quantization parameter QPcbcr'. This makes it possible to appropriately correct the quantization parameter for the prediction error in which the transform is skipped and the chrominance residual coefficients are jointly encoded, thereby preventing an unnecessary increase in the amount of code. In addition, since the quantization step size is not unnecessarily small, the processing load can be reduced.
[0118] In addition, although the present embodiment describes a configuration in which the quantization value is uniformly corrected based on a single instance of the quantization value correction information, a separate instance of the quantization value correction information may be used for each color component or for transform skip and palette encoding. Specifically, the configuration may be such that instead of QPmin, QPminY is defined for brightness, QPmincb is defined for Cb, and QPmincr is defined for Cr, and a separate quantization value correction is performed for each color component. In particular, in a case where the bit depth differs depending on the color component, this makes it possible to optimally correct the quantization parameter according to the bit depth. Similarly, the configuration may be such that instead of QPmin, QPminTS is defined for transform skip and QPminPLT is defined for palette encoding, and different quantization value corrections are performed according to each case. In particular, in a case where the bit depth of the input pixel value is different from the bit depth used in palette encoding, this makes it possible to optimally correct the quantization parameter according to each case.
[0119] Note that the quantization parameter can be corrected in the case of using transform skip or palette encoding. Even in this case, the possibility of unnecessarily increasing the amount of code can be reduced. However, correcting the quantization parameter in both cases can further reduce the possibility of unnecessarily increasing the amount of code.
[0120] Second embodiment
[0121] Figure 2 1 is a block diagram showing the configuration of an image decoding apparatus according to a second embodiment of the present invention. This embodiment will explain the decoding of the encoded data generated in the first embodiment as an example. The image decoding apparatus basically performs the inverse operation of the image encoding apparatus of the first embodiment.
[0122] 201 is a terminal to which the encoded bit stream is input.
[0123] 202 is a separation / decoding unit that separates information related to the decoding process and code data related to the coefficients from the bit stream and decodes them. The separation / decoding unit 202 also decodes the code data present in the header of the bit stream. In this embodiment, the quantization value correction information is reconstructed (the quantization value correction information is decoded) and output to the subsequent stage. The separation / decoding unit 202 performs Figure 1 The inverse operation of the operation of the integrated coding unit 111 in .
[0124] 203 is a decoding unit which decodes the code data input from the separation / decoding unit 202 and reconstructs the residual coefficient and prediction information.
[0125] 204 is an inverse quantization / inverse transform unit, which is Figure 1 As with 106, residual coefficients are input in units of sub-blocks, transform coefficients are obtained by performing inverse quantization, inverse orthogonal transform is further performed, and prediction errors are reconstructed. However, if transform skip or palette encoding or the like is used, inverse orthogonal transform processing is not performed. In addition, a function for performing inverse quantization and a function for performing inverse orthogonal transform may be provided separately. Note that the inverse quantization / inverse transform unit 204 also serves as a judgment component for judging what kind of encoding will be performed based on a flag or the like.
[0126] Note that information indicating a quantization parameter is also decoded from the bit stream using the decoding unit 203. For example, the information indicating the quantization parameter is a difference between the target quantization parameter and other quantization parameters (e.g., a quantization parameter of a previous sub-block). The other quantization parameter may be information indicating a difference between an average value of a plurality of quantization parameters of a plurality of other sub-blocks and the target quantization parameter. The inverse quantization / inverse transform unit 204 derives the target quantization parameter by, for example, adding the difference to the other quantization parameters. For the initial quantization parameter, the quantization parameter may be derived by adding the difference to the initial value decoded separately. The above-mentioned corrected quantization parameter is derived by correcting the quantization parameter derived in this manner.
[0127] 206 is a frame memory which stores image data of the reconstructed picture.
[0128] 205 is an image reconstruction unit. The image reconstruction unit 205 generates predicted image data by appropriately referring to the frame memory 206 based on the input prediction information. The method of generating predicted image data here is the same as that of the prediction unit 104 in the first embodiment, and a prediction method such as intra-frame prediction and inter-frame prediction is used. As described above, a prediction method combining intra-frame prediction and inter-frame prediction can also be used. In addition, as in the first embodiment, prediction processing is performed in units of sub-blocks. Then, reconstructed image data is generated based on the predicted image data and the prediction error reconstructed by the inverse quantization / inverse transform unit 204, and the reconstructed image data is output.
[0129] 207 is a loop filter unit. Figure 1 Like 109, the loop filtering unit 207 performs loop filtering processing such as deblocking filtering on the reconstructed image, and then outputs the filtered image.
[0130] Reference numeral 208 denotes a terminal for outputting the reconstructed image data to the outside, for example, outputting the reconstructed image to an external display device or the like.
[0131] The operation for decoding an image performed by the image decoding apparatus will be described below. In this embodiment, the bit stream generated in the first embodiment is decoded.
[0132] exist Figure 2 In the embodiment, the bit stream input from the terminal 201 is input to the separation / decoding unit 202. The separation / decoding unit 202 separates information related to the decoding process and code data related to the coefficients from the bit stream. The separation / decoding unit 202 also decodes the code data present in the header of the bit stream. Specifically, the quantization value correction information is reconstructed (the quantization value correction information is decoded). In the present embodiment, first, the quantization value correction information is decoded from the bit stream. Figure 6B The quantization value correction information code is extracted from the sequence header of the bit stream shown in FIG. 1 and decoded. Specifically, the 1-bit code "0" that was Golomb-coded in the first embodiment is Golomb-decoded to obtain 0, and further, 4 obtained by adding the reference 4 to 0 is set as QPmin as the quantization value correction information. The quantization value correction information obtained in this way is output to the inverse quantization / inverse transform unit 204. Then, the code data in units of basic blocks of picture data is reconstructed and also output to the decoding unit 203.
[0133] The decoding unit 203 decodes the code data and reconstructs the residual coefficient, prediction information and quantization parameter. The reconstructed residual coefficient and quantization parameter are output to the inverse quantization / inverse transform unit 204, and the reconstructed prediction information is output to the image reconstruction unit 205. The reconstructed prediction information includes information on sub-block division in the basic block, a palette flag, transform skip information, and the like.
[0134] The inverse quantization / inverse transformation unit 204 performs inverse quantization and inverse orthogonal transformation on the input residual coefficient. Specifically, first, it is determined based on the palette flag input from the decoding unit 203 whether palette encoding is performed on the subblock to be decoded.
[0135] If the sub-block is not palette-coded, an inverse quantization process is performed on the residual coefficient of the sub-block, and the orthogonal transform coefficient is reconstructed. The quantization parameter used in the inverse quantization process varies depending on whether the residual coefficient corresponding to each color component has been subjected to the orthogonal transform process, and whether the orthogonal transform process has been performed is determined based on the transform skip information input from the decoding unit 203. The quantization parameter used in the inverse quantization process is the same as that of the inverse quantization / inverse transform unit 106 of the first embodiment, and the above-mentioned quantization parameters (QP, QPcb, and QPcr) are used for each color component for the residual coefficient generated by performing the orthogonal transform process.
[0136] On the other hand, for the residual coefficient generated by the transform skip, the above-mentioned corrected quantization parameters (QP', QPcb', and QPcr') are used for each color component. In other words, for the residual coefficient generated by performing the orthogonal transform process, the prediction error is reconstructed by performing inverse quantization using the quantization parameters (QP, QPcb, and QPcr) and further performing inverse orthogonal transform. The prediction information reconstructed in this way is output to the image reconstruction unit 205.
[0137] If the sub-block to be decoded has been palette-encoded, the escape value is reconstructed by inversely quantizing the quantized escape value input from the decoding unit 203 using the corrected quantization parameters (QP', QPcb', and QPcr'). The reconstructed escape value is output to the image reconstruction unit 205. Note that the value in the sub-block reconstructed using the value other than the escape value (the value of the color contained in the palette indicated by the index) is also output to the image reconstruction unit 205 together with the escape value. The predicted image is constructed using these values output to the image reconstruction unit 205.
[0138] In the image reconstruction unit 205, if the palette flag input from the decoding unit 203 indicates that the subblock is not palette-encoded, the frame memory 206 is appropriately referenced based on other prediction information, and a predicted image is reconstructed. Image data is reconstructed based on the predicted image and the prediction error input from the inverse quantization / inverse transform unit 204, and the image data is input to and stored in the frame memory 206. Specifically, the image reconstruction unit 205 reconstructs the image data by adding the predicted image and the prediction error.
[0139] On the other hand, if the palette flag indicates that the subblock has been palette-encoded, the image data is reconstructed using an index indicating which color in the palette is used for each pixel, or an escape value, etc., input as prediction information. The image data is then input to and stored in the frame memory 206. The stored image data is used for reference during prediction.
[0140] and Figure 1Like 109, the loop filtering unit 207 reads out the reconstructed image from the frame memory 206, and performs loop filtering processing such as deblocking filtering and sampling adaptive offset, etc. Then, the filtered image is input to the frame memory 206 again.
[0141] The reconstructed image stored in the frame memory 206 is finally output to the outside from the terminal 208 .
[0142] Figure 4 is a flowchart showing an image decoding process in the image decoding device according to the second embodiment.
[0143] First, in step S401, the separation / decoding unit 202 separates information related to the decoding process and code data related to coefficients and the like from the bit stream, decodes the code data of the header, and reconstructs quantization value correction information.
[0144] In step S402, the decoding unit 203 decodes the code data separated in step S401, and reconstructs the residual coefficient, prediction information and quantization parameter. More specifically, first, a palette flag indicating whether the sub-block to be decoded is palette-encoded is reconstructed. If the reconstructed palette flag indicates 0, that is, the sub-block is not palette-encoded, then other prediction information, residual coefficients and transform skip information, etc. are reconstructed. On the other hand, if the reconstructed palette flag indicates 1, that is, the sub-block is palette-encoded, then an index indicating which color in the palette is used for each pixel, as well as a quantized escape value, etc. are reconstructed.
[0145] In step S403, if the sub-block to be decoded is not palette-coded, the inverse quantization / inverse transform unit 204 first determines whether orthogonal transform is performed on each color component of the sub-block based on the transform skip information reconstructed in step S402. Based on the result of the determination, inverse quantization processing is performed on the residual coefficient.
[0146] The quantization parameters used at this time are the same as those in step S305 of the first embodiment, and for the residual coefficients generated by performing the orthogonal transform process, the above-described quantization parameters (QP, QPcb, and QPcr) are used for each color component.
[0147] On the other hand, for the residual coefficient generated by transform skipping, the above-mentioned corrected quantization parameters (QP', QPcb', and QPcr') are used for each color component. In other words, for the residual coefficient generated by performing orthogonal transform processing, the prediction error is reconstructed by performing inverse quantization using the quantization parameters (QP, QPcb, and QPcr) and further performing inverse orthogonal transform. On the other hand, for the residual coefficient generated by transform skipping, the prediction error is reconstructed by performing inverse quantization using the corrected quantization parameters (QP', QPcb', and QPcr').
[0148] In addition, if the sub-block has been palette-coded, the escaped value is reconstructed by inversely quantizing the quantized escaped value reconstructed in step S402 using the corrected quantization parameters (QP′, QPcb′, and QPcr′).
[0149] In step S404, if the palette flag reconstructed in step S402 indicates that the subblock is not palette-coded, the image reconstruction unit 205 reconstructs the predicted image based on the prediction information generated in step S402. In addition, the image data is reconstructed based on the reconstructed predicted image and the prediction error generated in step S403.
[0150] In addition, if the palette flag indicates that the sub-block has been palette-encoded, the image reconstruction unit 205 reconstructs the image data using an index or escape value, etc., indicating which color in the palette is used for each pixel.
[0151] In step S405, the image decoding device determines whether the decoding of all basic blocks in the frame is completed; if the decoding of all basic blocks in the frame is completed, the sequence enters step S406, and if the decoding of all basic blocks in the frame is not completed, the sequence returns to step S402 for the next basic block.
[0152] In S406 , the loop filtering unit 207 performs loop filtering processing on the image data reconstructed in step S404 and generates a filtered image, after which the processing ends.
[0153] According to the above-described configuration and operation, a bit stream with less unnecessary increase in the code amount can be decoded by using the quantization parameter generated in the first embodiment and corrected based on the quantization value correction information.
[0154] Although it is assumed in this embodiment that Figure 6B The quantization control size information is included in the bit stream of the sequence header as shown in the decoding, but the encoding position of the information is not limited to this. The information can be as follows Fig. 6A The encoding shown is in the picture header of the image, or encoded in other locations.
[0155] Although the present embodiment describes a configuration in which the quantization parameters corresponding to the respective color components (i.e., Y, Cb, and Cr) are corrected, the present invention is not limited thereto. The configuration may be such that the residual coefficients in which the transform is skipped and the chrominance residual coefficients are jointly encoded are inversely quantized using QPcbcr', which is the corrected quantization parameter calculated by the above formula (4). This makes it possible to appropriately correct the quantization parameter for the residual coefficients in which the transform is skipped and the chrominance residual coefficients are jointly encoded, thereby making it possible to decode a bit stream that prevents an unnecessary increase in the amount of code. In addition, since the quantization step size is not unnecessarily small, the processing load can be reduced.
[0156] In addition, although the present embodiment describes a configuration in which the quantization value is uniformly corrected based on a single instance of the quantization value correction information, a separate instance of the quantization value correction information may be used for each color component or for transform skip and palette encoding. Specifically, the configuration may be such that instead of QPmin, QPminY is defined for luminance, QPmincb is defined for Cb, and QPmincr is defined for Cr, and a separate quantization value correction is performed for each color component. In particular, in a case where the bit depth differs depending on the color component, this makes it possible to optimally correct the quantization parameter according to the bit depth. Similarly, the configuration may be such that instead of QPmin, QPminTS is defined for transform skip and QPminPLT is defined for palette encoding, and different quantization value corrections are performed according to each case. In particular, in a case where the bit depth of the output pixel value is different from the bit depth used in palette encoding, this makes it possible to optimally correct the quantization parameter according to each case.
[0157] Note that the quantization parameter can be corrected in the case of using transform skip or palette encoding. Even in this case, the possibility of unnecessarily increasing the amount of code can be reduced. However, correcting the quantization parameter in both cases can further reduce the possibility of unnecessarily increasing the amount of code.
[0158] Third embodiment
[0159] Figure 1 and Figure 2 The various processing units shown are explained as being configured as hardware in the aforementioned embodiments. However, the processing performed by the processing units shown in the drawings may be configured by a computer program.
[0160] Figure 5 is a block diagram showing an example of the hardware configuration of a computer to which the image encoding device and the image decoding device according to the aforementioned embodiments can be applied.
[0161] The CPU 501 controls the entire computer using computer programs and data stored in the RAM 502 and the ROM 503, and executes the above-described processing as the processing performed by the image processing apparatus according to the aforementioned embodiment. In other words, the CPU 501 functions as Figure 1 and Figure 2 The processing unit shown. Various hardware processors other than the CPU can also be used.
[0162] The RAM 502 has an area for temporarily storing computer programs and data loaded from an external storage device 506, and data obtained from the outside via an I / F (interface) 507. The RAM 502 also has a work area used when the CPU 501 executes various processes. In other words, the RAM 502 can be allocated as a frame memory, for example, or various other areas can be appropriately provided.
[0163] Configuration data and a boot program of the computer and the like are stored in the ROM 503. The operation unit 504 is composed of a keyboard and a mouse and the like, and by manipulating the operation unit 504, the user of the computer can input various instructions to the CPU 501. The display unit 505 displays the result of processing by the CPU 501. The display unit 505 is composed of, for example, a liquid crystal display.
[0164] The external storage device 506 is a high-capacity information storage device represented by a hard disk drive device. The external storage device 506 stores an OS (operating system) and a program for the CPU 501 to implement the Figure 1 and Figure 2 The computer program etc. which implements the functions of each unit shown in the figure. The image data to be processed may also be stored in the external storage device 506.
[0165] The computer program and data stored in the external storage device 506 are appropriately loaded into the RAM 502 under the control of the CPU 501, and then processed by the CPU 501. A network such as a LAN and the Internet, and other devices such as a projection device and a display device, etc. can be connected to the I / F 507, and the computer can obtain and send various information via the I / F 507. 508 indicates a bus that connects the above-mentioned units to each other.
[0166] The operations realized by the above configuration are controlled by the CPU 501, which mainly performs the operations shown in the above flowchart.
[0167] Other embodiments
[0168] Each embodiment can also be implemented by supplying a storage medium having a computer program code that realizes the above functions to the system, and the system reads out and executes the computer program code. In this case, the computer program code read out from the storage medium itself realizes the functions of the above embodiments, and the storage medium storing the computer program code constitutes the present invention. In addition, the following situation is also included: the operating system (OS) running on the computer performs part or all of the actual processing based on the instructions in the program code, and the above functions are realized by the processing.
[0169] The present invention can also be implemented in the following form. The computer program code read from the storage medium can be written into a function expansion card installed in the computer or a memory provided in a function expansion unit connected to the computer. Then, the CPU or the like included in the function expansion card or the function expansion unit performs all or part of the actual processing based on the instructions included in the computer program code to realize the above functions. This also falls within the scope of the present invention.
[0170] If the present invention is applied to a storage medium as described above, the storage medium holds the codes of a computer program corresponding to the aforementioned flowchart.
[0171] (Other embodiments)
[0172] The present invention can be implemented by the following process: a program for implementing one or more functions of the above-mentioned embodiment is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read out and execute the program. The present invention can also be implemented by a circuit (e.g., ASIC) for implementing the one or more functions.
[0173] The present invention is not limited to the above-described embodiments, and various changes and modifications can be made within the spirit and scope of the present invention. Therefore, the claims are attached to disclose the scope of the present invention.
[0174] This application claims the benefit of Japanese Patent Application No. 2019-168858, filed on September 17, 2019, which is hereby incorporated by reference herein.
Claims
1. An image encoding device for generating a bit stream by encoding an image having a plurality of components including at least a luminance component and a chrominance component, the image encoding device comprising: a determination unit configured to determine whether to perform a transform process on the chrominance component in the block to be encoded; as well as an encoding unit configured to, when the determination unit determines that the transform process is to be performed on the chrominance component in the block to be encoded, encode the chrominance component in the block to be encoded using a first quantization parameter corresponding to the chrominance component in the block to be encoded, Wherein, when the first quantization parameter is less than a reference value and the determination unit determines that the transform process is not performed on the chrominance component in the block to be encoded, the encoding unit uses the reference value as the quantization parameter to encode the chrominance component in the block to be encoded, wherein the reference value is commonly used in the plurality of components, The reference value is a value that defines a minimum value of a quantization parameter when the determination unit determines that the transformation process is not performed. Wherein, the chrominance component is the Cr component, and The encoding unit encodes information indicating a difference between a value of a quantization parameter corresponding to a quantization step size of 1 and the reference value into the bit stream as information indicating the reference value.
2. An image decoding device for decoding a bit stream generated by encoding an image having a plurality of components including at least a luminance component and a chrominance component, the image decoding device comprising: a deriving unit configured to derive a first quantization parameter corresponding to a chroma component in a block to be decoded based on information decoded from the bitstream; A determination unit configured to determine whether to perform a transform process on the chrominance component in the block to be decoded; as well as a decoding unit configured to, when the determination unit determines that the chrominance component in the block to be decoded is to be subjected to the transform process, use the first quantization parameter to decode the chrominance component in the block to be decoded, Wherein, when the first quantization parameter is less than a reference value and the determination unit determines that the transform process is not performed on the chrominance component in the block to be decoded, the decoding unit uses the reference value as the quantization parameter to decode the chrominance component in the block to be decoded, wherein the reference value is commonly used in the plurality of components, The reference value is a value that defines a minimum value of a quantization parameter when the determination unit determines that the transformation process is not performed. Wherein, the chrominance component is the Cr component, and Here, the decoding unit decodes information indicating a difference between a value of a quantization parameter corresponding to a quantization step size of 1 and the reference value from the bit stream as the information indicating the reference value.
3. An image encoding method for generating a bit stream by encoding an image having a plurality of components including at least a luminance component and a chrominance component, the image encoding method comprising: Determining whether to perform transformation processing on the chrominance components in the block to be encoded; When it is determined that the transform process is to be performed on the chrominance component in the block to be encoded, encoding the chrominance component in the block to be encoded using a first quantization parameter corresponding to the chrominance component in the block to be encoded; as well as When the first quantization parameter is smaller than a reference value and it is determined that the transform process has not been performed on the chrominance component in the block to be encoded, the chrominance component in the block to be encoded is encoded using the reference value as a quantization parameter, wherein the reference value is commonly used in the plurality of components, The reference value is a value that defines a minimum value of a quantization parameter when it is determined that the transformation process is not performed. Wherein, the chrominance component is the Cr component, and The image encoding method further includes encoding information indicating a difference between a value of a quantization parameter corresponding to a quantization step size of 1 and the reference value into the bit stream as information indicating the reference value.
4. An image decoding method for decoding a bit stream generated by encoding an image having a plurality of components including at least a luminance component and a chrominance component, the image decoding method comprising: deriving a first quantization parameter corresponding to a chrominance component in a block to be decoded based on information decoded from the bitstream; Determining whether to perform transformation processing on the chrominance components in the block to be decoded; In a case where it is determined that the transform process is to be performed on the chrominance component in the block to be decoded, decoding the chrominance component in the block to be decoded using the first quantization parameter; as well as When the first quantization parameter is smaller than a reference value and it is determined that the transform process has not been performed on the chrominance component in the block to be decoded, the chrominance component in the block to be decoded is decoded using the reference value as a quantization parameter, wherein the reference value is commonly used in the plurality of components, The reference value is a value that defines a minimum value of a quantization parameter when it is determined that the transformation process is not performed. Wherein, the chrominance component is the Cr component, and The image decoding method further includes decoding, from the bit stream, information indicating a difference between a value of a quantization parameter corresponding to a quantization step size of 1 and the reference value as information indicating the reference value.
5. A non-transitory computer-readable storage medium storing a program for causing a computer for an image encoding device for generating a bit stream by encoding an image having a plurality of components including at least a luminance component and a chrominance component to function as: a determination unit configured to determine whether to perform a transform process on a chrominance component in a block to be encoded; and an encoding unit configured to, when the determination unit determines that the transform process is to be performed on the chrominance component in the block to be encoded, encode the chrominance component in the block to be encoded using a first quantization parameter corresponding to the chrominance component in the block to be encoded, in, When the first quantization parameter is smaller than a reference value and the determination unit determines that the transform process is not performed on the chrominance component in the block to be encoded, the encoding unit encodes the chrominance component in the block to be encoded using the reference value as the quantization parameter, wherein the reference value is commonly used in the plurality of components, The reference value is a value that defines a minimum value of a quantization parameter when the determination unit determines that the transformation process is not performed. Wherein, the chrominance component is the Cr component, and The encoding unit encodes information indicating a difference between a value of a quantization parameter corresponding to a quantization step size of 1 and the reference value into the bit stream as information indicating the reference value.
6. A non-transitory computer-readable storage medium storing a program for causing a computer of an image decoding device for decoding a bit stream generated by encoding an image having a plurality of components including at least a luminance component and a chrominance component to function as: a deriving unit configured to derive a first quantization parameter corresponding to a chroma component in a block to be decoded based on information decoded from the bitstream; A determination unit configured to determine whether to perform a transform process on the chrominance component in the block to be decoded; as well as a decoding unit configured to, when the determination unit determines that the chrominance component in the block to be decoded is to be subjected to the transform process, use the first quantization parameter to decode the chrominance component in the block to be decoded, Wherein, when the first quantization parameter is less than a reference value and the determination unit determines that the transform process is not performed on the chrominance component in the block to be decoded, the decoding unit uses the reference value as the quantization parameter to decode the chrominance component in the block to be decoded, wherein the reference value is commonly used in the plurality of components, The reference value is a value that defines a minimum value of a quantization parameter when the determination unit determines that the transformation process is not performed. Wherein, the chrominance component is the Cr component, and Here, the decoding unit decodes information indicating a difference between a value of a quantization parameter corresponding to a quantization step size of 1 and the reference value from the bit stream as the information indicating the reference value.
Citation Information
Patent Citations
Methods and devices for encoding or decoding images
JP2015521826A
Parking vehicle abnormality detection device
JP2019168858A