Video encoding device and program
The video encoding device addresses the challenge of subjective quality degradation in HDR/wide color gamut videos by adjusting chrominance QP offset and optimizing Lagrangian multipliers, enhancing the visual quality of encoded videos.
Patent Information
- Application Number
- JP2021159889
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2025-09-10
- Estimated Expiration
- 2041-09-29
AI Technical Summary
Existing video encoding methods, such as VVC and HEVC, struggle to effectively select coding tools and do not adequately account for the subjective quality degradation of vivid colors in HDR/wide color gamut videos, leading to suboptimal encoding results.
A video encoding device that generates degraded images considering both luminance and chrominance signals, adjusts the code amount for chrominance signals based on specific quality indices, and optimizes the Lagrangian multiplier to improve subjective quality by reducing chrominance QP offset and increasing the code amount for areas with greater perceived degradation.
Enhances the subjective quality of encoded videos with vivid colors by accounting for both luminance and chrominance signal degradation, resulting in improved visual experience for HDR/wide color gamut videos.
Smart Images

Figure 0007737277000001 
Figure 0007737277000002 
Figure 0007737277000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a video encoding device and a program. [Background technology]
[0002] Currently, the widely used video coding methods VVC (Versatile Video Coding) and HEVC (High Efficiency Video Coding) have a wider variety of coding tools than conventional methods, enabling efficient video compression. However, efficient coding using these methods poses the challenge of sequentially selecting an appropriate one from the vast number of tools. As described in Chapter 8.2 of Non-Patent Document 1, the HEVC reference software HM (HEVC test model) selects an appropriate coding mode using RD (rate-distortion) optimization based on a Lagrangian cost function, and the VVC reference software VTM (VVC Test Model) also uses the same algorithm. This cost function defines the relationship between the coding rate R (Rate) and coding distortion D (Distortion) as shown in Equation (1), and selects the mode that minimizes the cost J.
[0003] J=D+λR (1)
[0004] In equation (1), λ denotes the Lagrange multiplier, which is generally set to a larger value as the bit rate decreases. In both HM and VTM, the quantization parameter QP is determined based on λ when controlling the rate. As the coding distortion D in equation (1), the sum of squared errors (SSE) between the original image and the coded image (the image decoded after coding the original image) is mainly used because it has a high correlation with the image quality index PSNR (Peak Signal-to-Noise Ratio).
[0005] Although PSNR has been widely used due to its ease of calculation, there is a problem that the evaluation value based on the mean square error is not consistent with the degree of visual degradation. To solve this problem, Non-Patent Documents 2 and 3 describe a technique for improving the subjective quality of coded video by incorporating the score of VMAF (Video Multimethod Assessment Fusion), a picture quality index that has a high correlation with the degree of visual degradation, into the cost function of Equation (1).
[0006] The outline of the techniques disclosed in Non-Patent Documents 2 and 3 will be explained with reference to FIG. 4. In step 1, an original image S is converted into a degraded image S d In Non-Patent Document 2, this degraded image is generated by applying a Gaussian filter to the original image, while in Non-Patent Document 3, it is generated by encoding the original image (corresponding to the first pass of two-pass encoding).
[0007] In step 2, the original image S and the degraded image S d Divide into blocks (e.g., 64x64 pixels), and calculate the SSE and VMAF scores V for each block. d The blocks in the i-th row and j-th column of ij , S dij As a result, the change in SSE is ΔSSE ij =SSE(S ij ,S ij )-SSE(S ij ,S dij ), and the change in VMAF score V, ΔV ij =V(S ij ,S ij )-V(S ij ,S dij ) and then calculate the scaling variable a of the Lagrange multiplier λ. ij =ΔSSE ij / ΔV ij Ask for.
[0008] In step 3, when encoding the position corresponding to the block in row i and column j, the scaling variable a obtained in step 2 is used. ijis applied to the Lagrange multiplier λ, whose value is set on the assumption that SSE is used as the coding distortion D, to correct the Lagrange multiplier λ. Here, the variable a ij is the change in image quality index that reflects subjective quality, ΔV ij and the change in SSE, ΔSSE ij represents the ratio of ij The smaller the Lagrange multiplier λ after correction, the greater the subjective quality degradation due to the change in SSE. V For example, in Non-Patent Document 2, λ V = [6.0(1.0-exp(-0.05a))+0.8]×λ. This Lagrange multiplier λ V is used in the Lagrangian cost function shown in equation (1) to select the coding mode and perform coding.
[0009] Meanwhile, in recent years, HDR (High Dynamic Range) video, which can express a wider range of brightness than conventional video, and wide color gamut video, which can reproduce more vivid colors than conventional video, have become increasingly popular. The new 4K / 8K satellite broadcasting that began in 2018 adopts HDR / wide color gamut video, which possesses the properties of both, and the video format is specified in ITU-R Recommendation BT.2100. Because HDR / wide color gamut video has different properties compared to conventional SDR (Standard Dynamic Range) / standard color gamut video, the development of dedicated image quality indicators is underway, as described in, for example, Non-Patent Document 4. [Prior art documents] [Non-patent literature]
[0010] [Non-Patent Document 1] Edited by Sakae Okubo, "Impress Standard Textbook Series H.265 / HEVC Textbook," Impress Japan Co., Ltd., October 21, 2013 [Non-patent document 2] S. Deng, J. Han and Y. Xu, “VMAF Based Rate-Distortion Optimization for Video Coding,” 2020 IEEE 22nd International Workshop on Multimedia Signal Processing (MMSP), 2020, pp. 1-6. [Non-patent document 3] Z. Luo, Y. Huang, X. Wang, R. Xie and L. Song, “VMAF Oriented Perceptual Optimization for Video Coding,” 2019 IEEE International Symposium on Circuits and Systems (ISCAS), 2019, pp. 1-5. [Non-patent document 4] M. Rousselot, X. Ducloux, OL Meur and R. Cozot, “Quality Metric Aggregation for HDR / WCG Images,” 2019 IEEE International Conference on Image Processing (ICIP), 2019, pp. 3786-3790. Summary of the Invention [Problem to be solved by the invention]
[0011] The technologies described in Non-Patent Documents 2 and 3 use VMAF, which uses only the luminance signal as an image quality index for calculation, and do not take into account the degradation of color signals. Therefore, there is room for further improvement in the quality of images that include vivid colors, such as HDR / wide color gamut images.
[0012] In view of the above circumstances, an object of the present invention is to provide a video encoding device and a program that can improve subjective quality when compressing video that includes vivid colors, such as HDR / wide color gamut video. [Means for solving the problem]
[0013] In order to solve the above problem, one embodiment of a video encoding device is a video encoding device that encodes input video, and includes: a degraded image generation unit that generates a degraded image by degrading an original image of the input video; and a code amount adjustment unit that calculates an evaluation value of the degraded image by comparing the degraded image with the original image by applying an image quality index that takes into account a luminance signal and a chrominance signal; and, if a change in a first evaluation value calculated by applying the image quality index to the luminance signal and the chrominance signal is greater than a change in a second evaluation value calculated by applying the image quality index to only the luminance signal, adjusts the code amount for the color difference signal of the part to be encoded to be larger.
[0014] Furthermore, in one embodiment, the code amount adjustment unit may adjust the code amount for the chrominance signal of the encoding target portion to be increased by changing a chrominance QP offset used when encoding the encoding target portion to a smaller value, and may include an encoding unit that encodes the input video using the chrominance QP offset determined by the code amount adjustment unit.
[0015] Furthermore, in one embodiment, the code amount adjustment unit may adjust the code amount for the portion to be coded in accordance with a ratio of a change in the sum of squared errors, the sum of absolute errors, or the sum of absolute Hadamard transform errors calculated from the input video and the degraded image to a change in the first evaluation value, and may adjust the code amount for the portion to be coded so that the smaller the ratio of the change amounts is, the larger the code amount for the portion to be coded is.
[0016] Furthermore, in one embodiment, the code amount adjustment unit may be configured to adjust the code amount of the portion to be coded to be larger by reducing the Lagrangian multiplier used when calculating the coding cost of the portion to be coded, and may include a cost optimization unit that optimizes the cost in the coding process using the Lagrangian multiplier determined by the code amount adjustment unit.
[0017] Moreover, a program according to one embodiment causes a computer to function as the video encoding device. [Effects of the Invention]
[0018] According to the present invention, it is possible to improve the subjective quality when encoding video that includes vivid colors, such as HDR / wide color gamut video. [Brief explanation of the drawings]
[0019] [Figure 1] 1 is a block diagram illustrating an example of the configuration of a video encoding device according to an embodiment. [Figure 2] 2 is a block diagram illustrating an example of the configuration of an encoding unit of a video encoding device according to an embodiment. FIG. [Figure 3] 10 is a flowchart illustrating an example of a code amount adjustment method in a video encoding device according to an embodiment. [Figure 4] FIG. 1 is a diagram illustrating a conventional technique for improving the subjective quality of encoded video. DETAILED DESCRIPTION OF THE INVENTION
[0020] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0021] Fig. 1 is a block diagram showing an example of the configuration of a video encoding device according to an embodiment. The video encoding device 1 shown in Fig. 1 includes an encoding unit 10, a coding mode candidate derivation unit 30, a cost optimization unit 40, a degraded image generation unit 50, a code amount adjustment unit 60, and a coding result storage unit 70.
[0022] The video encoding device 1 encodes input video and outputs a bitstream, which is the encoding result, to the outside. In video encoding methods such as High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC), the input video is divided into the largest block unit called a Coding Tree Unit (CTU), encoding is performed for each CTU, and the division shape of Coding Units (CUs) within the CTU, the prediction mode, the transform mode, etc. for each CU are sequentially determined.
[0023] The coding mode candidate derivation unit 30 determines one or more coding mode candidates for the CTU to be processed and its internal CUs, based on input parameters such as a bit rate and a GOP (Group Of Picture) structure, and the coding modes selected so far. A coding mode is a combination of a coding tool and parameters (such as a DC prediction mode for intra prediction). The coding mode candidate derivation unit 30 can apply any known method, and for example, determines (prunes) a small number of candidate coding modes from a large number of coding modes, similar to the internal processing of the VTM reference software for VVC. The coding mode candidate derivation unit 30 then outputs the determined coding mode candidates to the coding unit 10.
[0024] The encoding unit 10 performs encoding processing on the input video by applying the input parameters and the encoding mode candidates determined by the encoding mode candidate derivation unit 30. Then, the encoding unit 10 outputs the encoding result to the cost optimization unit 40 and the encoding result storage unit 70, and also outputs the locally decoded image to the cost optimization unit 40. Details of the encoding unit 10 will be described later.
[0025] The cost optimization unit 40 determines, from among a plurality of coding modes, a coding mode (hereinafter referred to as an "optimal coding mode") that optimizes the coding cost of the coding unit 10. Then, the cost optimization unit 40 outputs the optimal coding mode to the coding mode candidate derivation unit 30 and the coding result storage unit 70. As shown in FIG. 1 , the cost optimization unit 40 includes a coding distortion calculation unit 41, a code amount calculation unit 42, and a coding mode determination unit 43.
[0026] The coding distortion calculation unit 41 compares the input video with the locally decoded image input from the encoding unit 10 to calculate the coding distortion D. Then, the coding distortion calculation unit 41 outputs the coding distortion D to the coding mode determination unit 43. In this embodiment, the evaluation value representing the coding distortion D is the sum of squared errors SSE, but is not limited to this and may be the sum of absolute differences SAD, the sum of absolute transformed differences SATD, or the like.
[0027] The code amount calculation unit 42 calculates the code amount R of the encoding result input from the encoding unit 10. Then, the code amount calculation unit 42 outputs the code amount R to the encoding mode determination unit 43.
[0028] The coding mode determination unit 43 determines the Lagrange multiplier λv input from the code amount adjustment unit 60 (to be described later). c The coding mode determination unit 43 calculates the cost J shown in equation (2) using the above formula and determines the optimal coding mode that minimizes the cost J. Then, the coding mode determination unit 43 outputs the determined optimal coding mode to the coding mode candidate derivation unit 30 and the coding result storage unit 70.
[0029] J=D+λv c R (2)
[0030] The encoding result storage unit 70 outputs the encoding result, which is encoded by the encoding unit 10 using the optimal encoding mode determined by the encoding mode determination unit 43, to the outside of the video encoding device 1. The encoding result is decoded by a decoding device (not shown).
[0031] The degraded image generator 50 performs filtering or encoding on the input video to generate a degraded image S from the original image S for each frame of the input video. d For the filtering process, a smoothing filter such as a Gaussian filter may be used. For the encoding process, an encoding method such as VVC or HEVC may be used. The degraded image generating unit 50 generates two types of degraded images S by changing the filter strength or the encoding bit rate. d1 and S d2 The degraded image generating unit 50 may then output the generated degraded image to the code amount adjusting unit 60.
[0032] The code amount adjustment unit 60 evaluates the image quality of the degraded image generated by the degraded image generation unit 50, taking into consideration the color signal, and adjusts the code amount of the portion of the input video to be coded based on the evaluation result. As shown in Fig. 1, the code amount adjustment unit 60 includes an image quality evaluation unit 61, a chrominance QP offset determination unit 62, and a Lagrangian multiplier scaling unit 63.
[0033] The image quality evaluation unit 61 calculates an evaluation value (score) of the degraded image for each block by applying an HDR / wide color gamut image quality index that takes into account the luminance signal and color signal and comparing the degraded image with the original image. The HDR / wide color gamut image quality index may be an index that evaluates image quality by taking into account the luminance signal and color signal, and may be, for example, a predetermined function or a machine-learned model. When an image is input to the HDR / wide color gamut image quality index, an evaluation value is output. In the following description, the first evaluation value calculated by applying the HDR / wide color gamut image quality index to the luminance signal and color signal is referred to as V c The second evaluation value calculated by applying the HDR / wide color gamut image quality index to the luminance signal only is V y The second evaluation value V y For example, if the image format input to the HDR / wide color gamut video image quality index is the RGB components of ITU-R Recommendation BT.2100, then R=G=B=0.2627×R+0.6780×G+0.0593×B can be calculated by converting and inputting the RGB components.
[0034] Furthermore, the image quality evaluation unit 61 compares the degraded image with the original image to calculate the sum of squared errors SSE for each block. c , the second evaluation value V y , and the sum of squared errors SSE are calculated using any block size, and may be, for example, 64×64 pixels.
[0035] The chrominance QP offset determination unit 62 determines the first evaluation value V c The change in the second evaluation value V y If the change in the chrominance QP offset is greater than the change in the chrominance QP offset, the chrominance QP offset determination unit 62 adjusts the code amount for the chrominance signal of the portion to be coded to increase it. Specifically, the chrominance QP offset determination unit 62 adjusts the chrominance QP offset. The chrominance QP offset determination unit 62 then outputs the adjusted chrominance QP offset to the coding unit 10.
[0036] The Lagrange multiplier scaling unit 63 calculates the first evaluation value V c The code amount for the portion to be coded is adjusted according to the ratio of the change in the sum of squared errors SSE to the change in the sum of squared errors SSE, so that the smaller the ratio of the change in the amount of change, the larger the code amount for the portion to be coded. Specifically, the Lagrangian multiplier is adjusted. Then, the Lagrangian multiplier scaling unit 63 scales the adjusted Lagrangian multiplier λv c to the coding mode determination unit 43.
[0037] Next, a specific example of the processing by the image quality assessment unit 61, the color difference QP offset determination unit 62, and the Lagrangian multiplier scaling unit 63 will be described with reference to one type of degraded image S d and two types of degraded images S d1 and S d2 The cases where
[0038] <1 type of degraded image S d When using > Original image S and degraded image S d The blocks in the i-th row and j-th column of ij , S dij Let one type of degraded image Sd When using SSE(S ij ,S ij ), SSE(S ij ,S dij ), V c (S ij ,S ij ), V c (S ij ,S dij ), V y (S ij ,S ij ), and V y (S ij ,S dij ) is calculated. Then, the change in SSE of the luminance signal, ΔSSE ij , evaluation value V c The change in ΔV cij , and the evaluation value V y The change in ΔV yij The image quality evaluation unit 61 calculates ΔV cij and ΔV yij is output to the chrominance QP offset determination unit 62, and ΔSSE ij and ΔV cij is output to the Lagrange multiplier scaling unit 63.
[0039] ΔSSE ij =SSE(S ij ,S ij )-SSE(S ij ,S dij ) (3) ΔV cij =V c (S ij ,S ij )-V c (S ij ,S dij ) (4) ΔV yij =V y (S ij ,S ij )-V y (S ij ,S dij ) (5)
[0040] The chrominance QP offset determination unit 62 determines V c The change in ΔV cijand V y The change in ΔV yij Variable b indicates the relationship between ij is calculated using equation (6).
[0041] b ij =ΔV cij / ΔV yij (6)
[0042] The chrominance QP offset determination unit 62 determines the variable b ij is compared with a threshold T. The threshold T is set to a value greater than 1, which indicates that the amount of change in degradation taking into account both the luminance signal and the chrominance signal is greater than the amount of change in degradation of only the luminance signal. ij is equal to or greater than the threshold T, the chrominance QP offset determination unit 62 increases the code amount of the chrominance signal and changes the chrominance QP offset used when encoding the encoding target portion of the input video to a smaller value in order to reduce the degree of degradation. ij is less than the threshold T, the value of the chrominance QP offset is not changed. Then, the chrominance QP offset determination unit 62 outputs the determined chrominance QP offset to the encoding unit 10.
[0043] Here, the chrominance QP offset is an offset value from the QP value of the luminance signal relative to the QP value of the chrominance signal, and is assumed to be predetermined. Since degradation of the chrominance signal is usually less noticeable than degradation of the luminance signal, the chrominance QP offset is set to a positive value to reduce the code amount for the chrominance signal. The chrominance QP offset determination unit 62 determines the QP offset of the variable b ij is equal to or greater than the threshold T, a predetermined value (e.g., 1) may be subtracted from the original chroma QP offset, or the variable b ij The chrominance QP offset may be changed so that it decreases as the chrominance QP offset increases above the threshold T.
[0044] The Lagrange multiplier scaling unit 63 calculates the sum of squared errors SSE and the evaluation value V c The scaling variable a indicates the relationship between the amount of change in cij is calculated using equation (7).
[0045] a cij =ΔSSE ij / ΔV cij (7)
[0046] In addition to the sum of squared errors SSE, the sum of absolute errors SAD, the sum of absolute errors SATD of Hadamard transform, etc. may be used as the coding distortion in the coding distortion calculation unit 41. In this case, the scaling variable of the Lagrange multiplier is adjusted to a c2ij =ΔSAD ij / ΔV cij , a c3ij =ΔSATD ij / ΔV cij This can be done as follows.
[0047] The Lagrange multiplier scaling unit 63 calculates a scaling variable a cij For example, the Lagrangian multiplier scaling unit 63 scales a predetermined Lagrangian multiplier λ using equation (8) in the same way as in Non-Patent Document 2, to obtain a new Lagrangian multiplier λ Vc In this equation, the scaling variable a cij The smaller the first evaluation value V c The change in ΔV cij is the change in the sum of squared errors SSE, ΔSSE ij The larger the Lagrange multiplier λ Vc As a result, the amount of code for the portion to be coded increases.
[0048] λ Vc =[6.0(1.0-exp(-0.05a cij ))+0.8]×λ(8)
[0049] <Two types of degraded images with different degrees of degradation S d1 and S d2 When using > Two types of degraded images S with different degrees of degradation d1 and S d2 When using SSE(Sij ,S d1ij ), SSE(S ij ,S d2ij ), V c (S ij ,S d1ij ), V c (S ij ,S d2ij ), V y (S ij ,S d1ij ), and V y (S ij ,S d2ij ) is calculated. Then, the change in SSE of the luminance signal, ΔSSE ij And, V c The change in ΔV cij And, V y The change in ΔV yij and are calculated by the equations (9) to (11), respectively. cij and ΔV yij is output to the chrominance QP offset determination unit 62, and ΔSSE ij and ΔV cij is output to the Lagrange multiplier scaling unit 63.
[0050] ΔSSE ij =SSE(S ij ,S d2ij )-SSE(S ij ,S d1ij )(9) ΔV cij =V c (S ij ,S d2ij )-V c (S ij ,S d1ij ) (10) ΔV yij =V y (S ij ,S d2ij )-V y (S ij ,S d1ij ) (11)
[0051] The processing of the chrominance QP offset determination unit 62 and the Lagrangian multiplier scaling unit 63 is performed for one type of degraded image S d Since this is the same as when using
[0052] In this way, in this specification, "evaluation value V c When there is only one type of degraded image, the change in the evaluation value V of the original image based on the original image is c and the evaluation value of the degraded image V c When there are two types of degraded images, a first degraded image and a second degraded image, the evaluation value V of the first degraded image based on the original image is c and the evaluation value V of the second degraded image c The difference between the evaluation value V y The same applies to "amount of change in" and "amount of change in sum of squared errors SSE."
[0053] (encoding section) Next, details of the encoding unit 10 will be described. Fig. 2 is a block diagram showing an example configuration of the encoding unit 10. The encoding unit 10 shown in Fig. 2 includes a block dividing unit 11, a subtraction unit 12, a transformation unit 13, a quantization unit 14, an inverse quantization unit 15, an inverse transformation unit 16, an addition unit 17, a storage unit 18, a prediction unit 19, and an entropy encoding unit 20.
[0054] The block division unit 11 divides an input video frame into block units such as CTU and CU for encoding processing, thereby generating block images, and outputs the block images to the subtraction unit 12 and the prediction unit 19 .
[0055] The subtraction unit 12 subtracts each pixel value of the predicted block image input from the prediction unit 19 described later from each pixel value of the block image input from the block division unit 11 to generate a residual block image indicating the difference between the block image and the predicted block image, and outputs the residual block image to the conversion unit 13.
[0056] The transform unit 13 performs a transform process such as an orthogonal transform on the residual block image input from the subtraction unit 12 to calculate transform coefficients, and outputs the transform coefficients to the quantization unit 14 .
[0057] The quantization unit 14 generates quantized coefficients by dividing the transform coefficients input from the transform unit 13 by a quantization step corresponding to the quantization parameter QP and quantizing the quantized coefficients, and outputs the quantized coefficients to the inverse quantization unit 15 and the entropy coding unit 20. The quantization parameter QP of the luminance signal is specified in advance by, for example, an encoding parameter. Alternatively, it is calculated based on the visual activity of the block image or a Lagrange multiplier. The quantization parameter QP of the chrominance signal is a value obtained by adding the chrominance QP offset determined by the chrominance QP offset determination unit 62 to the quantization parameter QP of the luminance signal. The quantization unit 14 reduces the amount of data.
[0058] The inverse quantization unit 15 restores the transform coefficients by multiplying the quantization coefficients input from the quantization unit 14 by the quantization step, and outputs the restored transform coefficients to the inverse transform unit 16 .
[0059] The inverse transform unit 16 performs inverse transform processing (processing to undo the transform performed by the transform unit 13) on the transform coefficients input from the inverse quantization unit 15 to restore a residual block image, and outputs the restored residual block image to the addition unit 17. For example, if the transform unit 13 performs a discrete cosine transform, the inverse transform unit 16 performs an inverse discrete cosine transform.
[0060] The adder 17 adds the residual block image input from the inverse transformer 16 and the predicted image input from the predictor 19, and outputs the result as a locally decoded image to the memory 18 and the coding distortion calculator 41 of the cost optimizer 40.
[0061] In this way, the encoding unit 10 multiplies the quantization coefficients by the quantization step to restore the transform coefficients, performs inverse transform processing on the transform coefficients to restore the residual block image, and adds the residual block image to an intra-predicted image or a motion-compensated predicted image to generate a locally decoded image. Note that the encoding unit 10 may perform post-processing, such as filtering using a deblocking filter, on the locally decoded image output by the adder 17 before outputting it to the storage unit 18.
[0062] The prediction unit 19 performs intra prediction (intra-frame prediction) or inter prediction (inter-frame prediction, motion compensated prediction). In intra prediction, an intra predicted image is generated by intra predicting a locally decoded image stored in the storage unit 18 according to an intra prediction mode. In inter prediction, a motion compensated predicted image is generated by motion compensated predicting a locally decoded image stored in the storage unit 18 according to a motion vector. The prediction unit 19 switches between the intra predicted image and the motion compensated predicted image to generate a predicted block image, and outputs the image to the subtraction unit 12 and the addition unit 17. The prediction unit 19 outputs prediction parameters (intra prediction mode and motion vector information) used in the prediction process to the entropy coding unit 20.
[0063] The entropy coding unit 20 performs entropy coding on the quantization coefficients input from the quantization unit 14, and parameters such as block size information, transformation information, and prediction parameters used in the coding process, performs data compression, and generates a bit stream as the coding result, and outputs it to the code amount calculation unit 42 of the cost optimization unit 40 and the coding result storage unit 70.
[0064] (code amount adjustment method) Next, a description will be given of a code amount adjustment method in the video encoding device 1. Fig. 3 is a flowchart showing an example of the code amount adjustment method in the video encoding device 1.
[0065] Inside the video encoding device 1, the video is encoded as a YC signal consisting of a luminance signal and a color difference signal. b C r The first evaluation value V c , the second evaluation value V y The size of the block (evaluation block) used to calculate the sum of squared errors SSE does not need to be the same as the CU.
[0066] In step S101, the chrominance QP offset determination unit 62 determines the variable b ijIf there are multiple evaluation blocks at the position corresponding to the CU, the variable b of the evaluation block at the top left position within the CU is used. ij You can use the variable b in multiple blocks. ij It may be an average or weighted average of the above.
[0067] In step S101, the threshold is set to a value greater than 1, which indicates that the amount of change in degradation taking into account both the luminance signal and the color signal is greater than the amount of change in degradation of the luminance signal alone. If the result in step S101 is YES, the process proceeds to step S102, and if the result is NO, the process proceeds to step S103.
[0068] In step S102, the chrominance QP offset determination unit 62 increases the code amount of the chrominance signal and changes the chrominance QP offset to a smaller value to reduce the degree of degradation. For example, if the value (default value) of the chrominance QP offset is +4, it is changed to +3.
[0069] In step S103, the Lagrange multiplier scaling unit 63 calculates a scaling variable a cij Scale the Lagrange multiplier λ using λ Vc Derive λ instead of the existing λ. Vc is applied to the cost function.
[0070] In this way, the video encoding device 1 calculates an evaluation value for the degraded image by comparing the degraded image with the original image using an image quality index that takes into account the luminance signal and the color signal. Then, the first evaluation value V calculated by applying the image quality index to the luminance signal and the color signal is c The change in ΔV cij is the second evaluation value V calculated by applying the image quality index only to the luminance signal. y The change in ΔV yijis larger, the code amount for the chrominance signal of the encoding target portion is adjusted to be larger. For example, the code amount for the chrominance signal of the encoding target portion is adjusted to be larger by changing the chrominance QP offset used when encoding the encoding target portion to a smaller value. Therefore, according to the present invention, it is possible to perform encoding that takes into account the degradation of color signals in video that includes vivid colors, such as HDR / wide color gamut video, and to obtain encoded video with higher subjective quality than conventional video.
[0071] The video encoding device 1 further calculates a first evaluation value V c The change in ΔV cij The code amount for the portion to be coded may be adjusted according to the ratio of the amount of change in the sum of squared errors SSE, the sum of absolute errors SAD, or the sum of absolute errors of the Hadamard transform SATD calculated from the input video and the degraded image to the sum of squared errors SSE, so that the code amount for the portion to be coded increases as the ratio of the amount of change decreases. This allows a larger amount of code to be allocated to blocks with greater subjective quality degradation, thereby further improving the subjective quality of the coded video.
[0072] (program) A computer capable of executing program instructions can also be used to function as the video encoding device 1. Here, the computer may be a general-purpose computer, a special-purpose computer, a workstation, a PC (Personal Computer), an electronic notepad, etc. The program instructions may be program code, code segments, etc. for performing the necessary tasks.
[0073] The computer includes a processor, a storage unit, an input unit, an output unit, and a communication interface. The processor may be a CPU (Central Processing Unit), an MPU (Micro Processing Unit), a GPU (Graphics Processing Unit), a DSP (Digital Signal Processor), an SoC (System on a Chip), or the like, and may be configured with multiple processors of the same or different types. The processor reads and executes programs from the storage unit to control the above components and perform various arithmetic processing. Note that at least a portion of these processing contents may be implemented by hardware. The input unit is an input interface that accepts user input operations and acquires information based on the user operations, such as a pointing device, keyboard, or mouse. The output unit is an output interface that outputs information, such as a display or speaker. The communication interface is an interface for communicating with external devices.
[0074] The program may be recorded on a computer-readable recording medium. Using such a recording medium, the program can be installed on a computer. Here, the recording 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 CD-ROM, a DVD-ROM, or a USB (Universal Serial Bus) memory. Furthermore, the program may be downloaded from an external device via a network.
[0075] For example, a program for causing a computer to function as the video encoding device 1 described above may include a step of generating a degraded image by degrading an original image of an input video; a step of calculating an evaluation value of the degraded image by comparing the degraded image with the original image by applying an image quality index that takes into account a luminance signal and a color signal; and a step of calculating a first evaluation value V calculated by applying the image quality index to the luminance signal and the color signal. c The change in ΔVcij is the second evaluation value V calculated by applying the image quality index only to the luminance signal. y The change in ΔV yij and if the difference is greater than 0, adjusting the code amount for the color difference signal of the part to be coded so that it is larger.
[0076] Although the above-described embodiments have been described as typical examples, it will be apparent to those skilled in the art that many modifications and substitutions can be made within the spirit and scope of the present invention. Therefore, the present invention should not be construed as being limited by the above-described embodiments, and various modifications and alterations are possible without departing from the scope of the claims. For example, multiple building blocks shown in the block diagrams of the embodiments can be combined into one, or one building block can be divided. [Explanation of symbols]
[0077] 1. Video Encoding Device 10 Encoding section 11 Block division section 12 Subtraction section 13 Conversion unit 14 Quantization section 15 Inverse quantization section 16 Inverse conversion unit 17 Addition section 18 Memory section 19 Prediction Department 20 Entropy coding unit 30 Coding mode candidate derivation unit 40 Cost Optimization Department 41 Coding distortion calculation unit 42 Code amount calculation unit 43 Encoding mode determination unit 50 Degraded image generation unit 60 Code amount adjustment section 61 Image Quality Evaluation Unit 62 Chrominance QP offset determination unit 63 Lagrange multiplier scaling part 70 Encoding result storage section
Claims
1. A video encoding device that encodes an input video, comprising: a degraded image generating unit that generates a degraded image by degrading an original image of an input video; a code amount adjustment unit that calculates an evaluation value of the degraded image by comparing the degraded image with the original image by applying an image quality index that takes into account a luminance signal and a color signal, and adjusts the code amount for the color difference signal of the encoding target portion to be increased when a change in a first evaluation value calculated by applying the image quality index to the luminance signal and the color signal is greater than a change in a second evaluation value calculated by applying the image quality index to only the luminance signal; A video encoding device comprising:
2. the code amount adjustment unit adjusts the code amount for the chrominance signal of the encoding target portion to be increased by changing a chrominance QP offset used when encoding the encoding target portion to a smaller value; an encoding unit that encodes the input video using the chrominance QP offset determined by the code amount adjustment unit; The video encoding device according to claim 1 .
3. 3. The video encoding device according to claim 1, wherein the code amount adjustment unit adjusts the code amount for the portion to be encoded in accordance with a ratio of a change in the first evaluation value to a change in a sum of squared errors, a sum of absolute errors, or a Hadamard transform absolute error sum calculated from the input video and the degraded image, and adjusts the code amount for the portion to be encoded so that the smaller the ratio of the change amounts is, the larger the code amount for the portion to be encoded is.
4. the code amount adjustment unit adjusts the code amount of the portion to be coded so as to be increased by reducing a Lagrangian multiplier used when calculating a coding cost of the portion to be coded, a cost optimization unit that optimizes the cost of the encoding process using the Lagrange multiplier determined by the code amount adjustment unit; The video encoding device according to claim 3 .
5. A program for causing a computer to function as the video encoding device according to any one of claims 1 to 4.
Citation Information
Patent Citations
Video encoding method, video encoding apparatus, and video encoding program
JP2018050256A
Image processing device, image processing method and program
JP2018101866A
Image encoding apparatus, image encoding method, and image encoding program
JP2019004304A
Color-difference signal form determination device, coding device, and program
JP2019176212A