Video encoding device and program
The video encoding device optimizes HDR/wide color gamut encoding by adjusting code allocation based on luminance and color signal degradation, addressing the limitations of PSNR and rate consideration in existing technologies to enhance visual quality and efficiency.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- NIPPON HOSO KYOKAI
- Filing Date
- 2022-06-20
- Publication Date
- 2026-06-24
Smart Images

Figure 0007879748000006 
Figure 0007879748000007 
Figure 0007879748000008
Abstract
Description
[Technical Field]
[0001] This invention relates to a video encoding device and a program. [Background technology]
[0002] Currently, the widely adopted video coding methods VVC (Versatile Video Coding) and HEVC (High Efficiency Video Coding) have a wider variety of coding tools compared to conventional methods, allowing for efficient video compression. On the other hand, efficiently coding using these methods presents the challenge of sequentially selecting the appropriate tool from a vast number of options. As described in Chapter 8.2 of Non-Patent Document 1, the HEVC reference software HM (HEVC test Model) selects the appropriate coding mode through RD (rate-distortion) optimization based on the Lagrangian cost function, and the same algorithm is employed in the VVC reference software VTM (VVC Test Model). In this cost function, the relationship between the coding rate R and coding distortion D is defined as shown in equation (1), and the mode that minimizes the cost J is selected.
[0003] J = D + λR (1)
[0004] However, in equation (1), λ represents the Lagrangian multiplier, and is generally set to a larger value as the bitrate decreases. In both HM and VTM, the quantization parameter QP is determined based on this Lagrangian multiplier λ when controlling the bitrate. As for the coding distortion D in equation (1), the sum of squared errors SSE (Sum of Squared Error) 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] However, although PSNR has been widely used conventionally due to its simplicity in calculation, there is an issue that the evaluation value based on the mean squared error deviates from the visual degradation degree. To solve this problem, Non-Patent Document 2 describes a technique for improving the subjective quality of encoded video by reflecting the score of the video quality metric VMAF (Video Multimethod Assessment Fusion), which has a high correlation with the visual degradation degree, in the cost function of Equation (1).
[0006] Using FIG. 9, the outline of the technique disclosed in Non-Patent Document 2 will be described. First, the encoded image f obtained by pre-encoding the original image h with QP = QP d and the encoded image f' obtained by pre-encoding the original image h with QP = QP' (in the experiment of Non-Patent Document 2, QP' = QP d + 5 is set) are used to generate the composite image g i . Here, the composite image g i is obtained by replacing the i-th CTU (Coding Tree Unit) of the encoded image f with the i-th CTU of the encoded image f'. Using these images, the scaling coefficient s i for the i-th CTU is obtained by Equation (2) and applied to the Lagrange multiplier λ in the cost function as shown in Equation (3) for encoding. In Equation (2), VMAF(x, y) represents the VMAF score when x is the reference image and y is the evaluation image.
[0007]
Equation
[0008] In recent years, the popularity of HDR (High Dynamic Range) images that can represent a wider range of brightness than before and wide-color-gamut images that can reproduce brighter colors than before has been increasing. In the new 4K / 8K satellite broadcast that started in 2018, HDR / wide-color-gamut images with both of these properties are adopted, and the video format is defined in ITU-R Recommendation BT.2100. Since HDR / wide-color-gamut images have different properties compared to conventional SDR (Standard Dynamic Range) / standard-color-gamut images, for example, the development of dedicated image quality metrics described in Non-Patent Document 3 has been progressing.
Prior Art Documents
Non-Patent Documents
[0009]
Non-Patent Document 1
Non-Patent Document 2
Non-Patent Document 3
Summary of the Invention
Problems to be Solved by the Invention
[0010] The technology described in Non-Patent Literature 2 employs VMAF, which uses only the luminance signal as an image quality index and does not consider the degradation of the color signal, thus having the problem of being unsuitable for HDR / wide color gamut video containing vivid colors. Furthermore, it has the problem of only estimating the distortion D of the cost function from the encoded image and not considering the rate R.
[0011] In view of these circumstances, the object of the present invention is to provide a video encoding device and program capable of improving subjective quality when encoding video containing vivid colors such as HDR / wide color gamut video. [Means for solving the problem]
[0012] To solve the above problems, a video encoding device according to one embodiment is a video encoding device that encodes the original image of an input video, and comprises: a degraded image generation unit that generates a degraded image obtained by degrading the original image; a code amount adjustment unit that obtains a first estimated value of the degree of degradation for each block of the degraded image and a second estimated value of the code amount for each block of the degraded image, and adjusts the code amount for the part to be encoded according to the difference between a first rank obtained by sorting the first estimated values in order of magnitude and a second rank obtained by sorting the second estimated values in order of magnitude, wherein the code amount adjustment unit obtains the first estimated value by comparing the original image and the degraded image using a first image quality index which calculates an index value from a luminance signal and a color signal.
[0013] Furthermore, in one embodiment, the code amount estimation unit may obtain the second estimated value from the original image and the degraded image using a second image quality index that calculates an index value from the luminance signal.
[0014] Furthermore, in one embodiment, the coding amount adjustment unit determines that the coding target is greater the first rank obtained by sorting the first estimated values in descending order is greater than the second rank obtained by sorting the second estimated values in descending order. portion The sign value for may be adjusted to be smaller.
[0015] Furthermore, the program according to one embodiment causes the computer to function as the video encoding device. [Effects of the Invention]
[0016] According to the present invention, it is possible to improve subjective quality when encoding images that include vivid colors, such as HDR / wide color gamut images. [Brief explanation of the drawing]
[0017] [Figure 1] This block diagram shows an example configuration of a video encoding device according to one embodiment. [Figure 2] This figure illustrates the processing of the degradation degree estimation unit and the code amount estimation unit in a video encoding device according to one embodiment. [Figure 3] This diagram shows the relative magnitudes of CTU values for encoded images obtained by encoding HDR / wide color gamut original images. [Figure 4] This figure shows the relative magnitudes of the first estimated values, obtained from the images used to derive Figure 3. [Figure 5] This figure shows the relative magnitudes of the second estimated values, obtained from the images used to derive Figure 3. [Figure 6] This is a flowchart showing an example of a method for adjusting the code amount in a video encoding device according to one embodiment. [Figure 7] This figure illustrates the processing of the scaling coefficient determination unit in a video encoding device according to one embodiment. [Figure 8] This is a block diagram showing an example of the configuration of the encoding unit in a video encoding device according to one embodiment. [Figure 9] This diagram illustrates a technique for incorporating the score of the conventional image quality metric VMAF into the cost function. [Modes for carrying out the invention]
[0018] One embodiment of the present invention will be described in detail below with reference to the drawings.
[0019] Figure 1 is a block diagram showing an example configuration of a video encoding device according to one embodiment. The video encoding device 1 shown in Figure 1 comprises an encoding unit 10, an encoding mode candidate derivation unit 30, a cost optimization unit 40, a degraded image generation unit 50, a code amount adjustment unit 60, and an encoding result storage unit 70.
[0020] The video encoding device 1 encodes the input video and outputs the resulting bitstream to the outside. In video encoding schemes such as HEVC and VVC, the input video is divided into the largest block units called CTUs (Coding Tree Units), and encoding processing is performed for each CTU. The Coding Unit (CU) division shape within the CTU, the prediction mode for each CU, the conversion mode, etc. are determined sequentially.
[0021] 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 bitrate and GOP (Group Of Picture) structure, and the coding modes selected so far. The coding mode is a combination of coding tools and parameters (such as the DC prediction mode for intra prediction). The coding mode candidate derivation unit 30 can apply any known method, for example, similar to the internal processing of the VVC reference software VTM, it determines (prunes) a small number of candidate modes from a large number of coding modes. The coding mode candidate derivation unit 30 then outputs the determined coding mode candidates to the coding unit 10.
[0022] The encoding unit 10 applies the input parameters and the encoding mode candidate determined by the encoding mode candidate derivation unit 30 to the input video and performs encoding processing. The encoding unit 10 then 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.
[0023] The cost optimization unit 40 determines the encoding mode that optimizes the encoding cost of the encoding unit 10 from among multiple encoding modes (hereinafter referred to as the "optimal encoding mode"). The cost optimization unit 40 then outputs the optimal encoding mode to the encoding mode candidate derivation unit 30 and the encoding result storage unit 70. As shown in Figure 1, the cost optimization unit 40 includes an encoding distortion calculation unit 41, a code amount calculation unit 42, and an encoding mode determination unit 43.
[0024] The encoding distortion calculation unit 41 compares the input video with the locally decoded image input from the encoding unit 10 and calculates the encoding distortion D. The encoding distortion calculation unit 41 then outputs the encoding distortion D to the encoding mode determination unit 43. In this embodiment, the evaluation value representing the encoding distortion D is the sum of squared errors SSE, but it is not limited to this, and may also be the sum of absolute differences SAD, the sum of absolute transformed differences SATD, etc.
[0025] The code amount calculation unit 42 calculates the code amount R of the encoding result input from the encoding unit 10. The code amount calculation unit 42 then outputs the code amount R to the encoding mode determination unit 43.
[0026] In this embodiment, the cost function is defined by equation (4), and by adjusting the scaling coefficient a with respect to the Lagrange multiplier λ, efficient HDR / wide color gamut video coding with improved subjective quality is performed. In this embodiment, the scaling coefficient a is set for each CTU (often set to 128 x 128 pixels), but it may also be set for blocks of any size, such as 64 x 64 pixels or 32 x 32 pixels.
[0027] J = D + aλR (4)
[0028] The coding mode determination unit 43 calculates the cost J shown in equation (4) using the scaling coefficient a input from the code amount adjustment unit 60, and determines the optimal coding mode that minimizes the cost J. The coding mode determination unit 43 then outputs the determined optimal coding mode to the coding mode candidate derivation unit 30 and the coding result storage unit 70.
[0029] The encoding result storage unit 70 outputs the encoding result 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).
[0030] The degraded image generation unit 50 applies filtering or encoding processing to the input video to generate a degraded image f from the original image h for each frame of the input video. For filtering, a smoothing filter such as a Gaussian filter may be used. For encoding, encoding schemes such as VVC and HEVC may be used. The degraded image generation unit 50 then outputs the generated degraded image f to the code amount adjustment unit 60.
[0031] The code amount adjustment unit 60 obtains an estimated value (first estimate) of the degree of degradation for each block of the degraded image f, and an estimated value (second estimate) of the code amount for each block of the degraded image f. The code amount for the part of the input video to be encoded (original image) is adjusted according to the difference between the rank (first rank) obtained by sorting the first estimates in order of magnitude and the rank (second rank) obtained by sorting the second estimates in order of magnitude. As shown in Figure 1, the code amount adjustment unit 60 comprises a degradation degree estimation unit 61, a code amount estimation unit 62, and a scaling coefficient determination unit 63.
[0032] The degradation degree estimation unit 61 compares the original image h and the degraded image f using the HDR / wide color gamut image quality index (the first image quality index Vc) that calculates an index value from the luminance signal and the color signal, and obtains an estimated value of the degradation degree for each block of the degraded image f. The first image quality index Vc may be an index that evaluates the image quality in consideration of the luminance signal and the color signal. For example, it may be a predetermined function, a learned machine learning model, or an index described in Non-Patent Document 3. When an image is input to the first image quality index Vc, an estimated value of the degradation degree is output.
[0033] The code amount estimation unit 62 obtains an estimated value of the code amount for each block of the degraded image f. When the degraded image f is generated by the encoding process in the degraded image generation unit 50, the "estimated value of the code amount" may be the actual code amount. In the present embodiment, the original image h and the degraded image f are compared using an image quality index (the second image quality index V) that calculates an index value only from the luminance signal, and an estimated value of the code amount for each block of the degraded image f is obtained. The second image quality index V is an image quality index that considers only the luminance signal, and may be a value obtained in the same manner as the first image quality index Vc using an image composed only of the luminance signal. For example, when the input video format of the first image quality index Vc is the RGB component of BT.2100, the RGB of the images f, g i , h is converted to R = G = B = 0.2627×R + 0.6780×G + 0.0593×B and input to calculate the second image quality index V.
[0034] FIG. 2 is a diagram for explaining the processing of the degradation degree estimation unit 61 and the code amount estimation unit 62. As shown in FIG. 2, the degradation degree estimation unit 61 and the code amount estimation unit 62 perform pre-encoding on the original image h as an encoded image f with a quantization parameter QP = QP d and generate a composite image g i from the encoded image f and the original image h. Here, the composite image g i is obtained by replacing the i-th CTU of the encoded image f with the i-th CTU of the original image h.
[0035] The degradation degree estimation unit 61 uses the encoded image f, the original image h, and the composite image g iUsing this, as shown in equation (5), the change in each block of the first image quality index Vc is expressed as the first estimated value ΔVc i It is calculated as follows. The first image quality index Vc evaluates image quality by considering the luminance signal and color signal, so it is close to subjective image quality. Therefore, the first estimated value ΔVc i This represents the estimator of the skewness (corresponding to D in the cost function) at the i-th CTU.
[0036] ΔVc i =Vc(h,g i )-Vc(h,f) (5)
[0037] The code amount estimation unit 62 uses the encoded image f, the original image h, and the composite image g. i Using this, the change in each block of the second image quality index V is expressed as the second estimated value ΔV, as shown in equation (6) below. i It is calculated as follows: Second estimated value ΔV i This represents the estimator of the sign quantity (corresponding to R in the cost function) at the i-th CTU.
[0038] ΔV i =V(h,g i )-V(h,f) (6)
[0039] Figure 3 shows, as an example, the relationship of the magnitude of the code amount for each CTU in the encoded image F, obtained by encoding the HDR / wide-gamut original image H with the quantization parameter QP=37 using VTM. VTM performs RD optimization that emphasizes the luminance signal. The image size is 1920×1080, and the CTU size is 128×128 pixels. Figure 4 shows the first estimated value ΔVc calculated from the original image H and encoded image F. i The relative magnitudes are shown. Figure 5 shows the second estimated value ΔV calculated from the original image H and encoded image F. i This shows the relative magnitudes of the values. In Figures 3, 4, and 5, blocks with larger values are shown with thicker frames, and blocks with smaller values are shown with thinner frames. Furthermore, in blocks shown with thicker frames, a greater number of diagonal lines indicates a larger value, and in blocks shown with thinner frames, a greater number of dots indicates a larger value. Figures 3, 4, and 5 show the first estimated value ΔVc. iThe correlation between the magnitude of the sign value and the second estimate ΔV is not high, but i It can be seen that there is a high correlation between the magnitude of the code value and the code value. This trend is not limited to the images used in Figure 3, but was confirmed by multiple images.
[0040] The scaling coefficient determination unit 63 determines the first estimated value ΔVc i The ranking (1st rank) when sorted by size and the 2nd estimated value ΔV i The ranking (second rank) obtained by sorting them in order of size is determined and compared. The scaling coefficient determination unit 63 adjusts the amount of code for the encoding target in the block of the encoding target to be increased or decreased according to the difference between the first rank and the second rank.
[0041] Generally, by increasing the code size in areas with significant subjective degradation and decreasing the code size in areas with minimal subjective degradation, it is possible to perform encoding that is both subjectively high-quality and efficient. Therefore, the scaling coefficient determination unit 63 determines the first estimated value ΔVc for each of the total N blocks in the screen. i and the second estimated value ΔV i The results are then sorted in descending or ascending order, and the scaling coefficient a shown in equation (4) is changed for blocks with large differences in rank. In the example shown in Figures 3, 4, and 5, the number of blocks N = 15 × 9 = 135, and the ranks from 1 to 135 are determined for Figures 4 and 5.
[0042] (code amount adjustment method) Next, the processing of the scaling coefficient determination unit 63 will be explained with reference to Figures 6 and 7. Figure 6 is a flowchart showing an example of a code amount adjustment method by the scaling coefficient determination unit 63. Figure 7 is a diagram illustrating the processing of the scaling coefficient determination unit 63 when the number of blocks N=12.
[0043] In step S101, for each block, the first estimate ΔVc i and the second estimated value ΔV i Calculate.
[0044] In step S102, the first estimated value ΔVci When sorted in descending order (from greatest distortion to least distortion), the first rank is O1. i And the second estimated value ΔV i The second-ranked element when sorted in descending order (from largest to smallest sign value) is O2. i To find this, see Figure 7(a) O1 i Figure 7(b) shows O2 i Figure 7(c) shows O1 i -O2 i This indicates.
[0045] In video encoding, it is desirable that the amount of code is assigned to the parts with greater subjective distortion, therefore O1 i -O2 i Ideally, the result should be 0. Therefore, the scaling coefficient determination unit 63 changes the scaling coefficient a shown in equation (4) to bring it closer to the ideal state when the difference in rank is large. In this embodiment, a large difference in rank is defined as a difference of more than or equal to the threshold T shown in equation (7) when there are a total of N blocks. The right-hand side of equation (7) is the ceiling function and means the smallest integer greater than or equal to N / 2. For example, when N=12, T=6. In this embodiment, there is only one threshold for the difference in rank, but multiple thresholds for the difference in rank may be set to gradually increase or decrease the value of the scaling coefficient a.
[0046]
number
[0047] In step S103, it is determined whether the following equation (8) is satisfied. If step S103 is Yes, the process proceeds to step S104; if step S103 is No, the process proceeds to step S105. In the example shown in Figure 7, block α satisfies equation (8).
[0048]
number
[0049] If equation (8) is satisfied, then the first priority is O1.i (First estimated value ΔVc) i (small), 2nd place O2 i (Second estimated value ΔV) is small i Since the value is large, it means that a large amount of code is allocated to the part where subjective distortion is small. Therefore, in order to correct this, in step S104, the scaling coefficient a of the CTU is determined to be a value greater than 1 (for example, 1.2).
[0050] In step S105, it is determined whether the following equation (9) is satisfied. If step S105 is Yes, the process proceeds to step S106; if step S105 is No, the process proceeds to step S107. In the example shown in Figure 7, block β satisfies equation (9).
[0051]
number
[0052] If equation (9) is satisfied, then the first priority is O1. i (The first estimated value ΔVc) is small. i (Large), 2nd place O2 i (Second estimated value ΔV) is large i Since (is small), it means that a small amount of code is assigned to the part where subjective distortion is large. Therefore, in order to correct this, in step S106, the scaling coefficient a of the CTU is determined to be a value less than 1 (for example, 0.8).
[0053] In step S107, the scaling factor a is determined to be 1. By encoding using the modified scaling factor a as described above, the encoding efficiency can be improved when compressing video containing vivid colors, such as HDR / wide color gamut video.
[0054] Thus, the scaling coefficient determination unit 63 determines the first estimated value ΔVc in the block of the portion to be encoded. i The above first rank O1 is obtained by sorting in descending order. i However, the second estimated value ΔV iThe second-ranked result when sorted in descending order is O2 i The larger the value is, the smaller the code amount is adjusted (the scaling coefficient a is determined to be greater than 1). In other words, the scaling coefficient determination unit 63 determines the first estimated value ΔVc in the block of the part to be encoded. i The first rank when sorted in descending order is O1 i However, the second estimated value ΔV i The second-ranked result when sorted in descending order is O2 i The smaller the value, the larger the sign quantity is adjusted (the scaling factor a is set to a value less than 1).
[0055] In this embodiment, coding efficiency is improved by changing the scaling coefficient a of the Lagrange multiplier λ. However, instead of the scaling coefficient determination unit 63, a quantization parameter adjustment unit may be provided to change the quantization parameter QP. In this case, the quantization parameter adjustment unit determines the first estimated value ΔVc in the block of the portion to be coded. i The above first rank O1 is obtained by sorting in descending order. i However, the second estimated value ΔV i The second-ranked result when sorted in descending order is O2 i The larger the value, the smaller the code amount is adjusted (the quantization parameter QP is increased). In other words, the quantization parameter adjustment unit adjusts the first estimated value ΔVc in the block of the part to be encoded. i The first rank when sorted in descending order is O1 i However, the second estimated value ΔV i The second-ranked result when sorted in descending order is O2 i The smaller the value, the more the sign quantity is adjusted to increase (the quantization parameter QP is adjusted to decrease).
[0056] (encoding section) Next, the details of the encoding unit 10 will be described. Figure 8 is a block diagram showing an example configuration of the encoding unit 10. The encoding unit 10 shown in Figure 8 comprises a block division 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.
[0057] The block division unit 11 generates block images by dividing the input video frames into block units such as CTU and CU, which undergo encoding processing, and outputs them to the subtraction unit 12 and the prediction unit 19.
[0058] The subtraction unit 12 subtracts the pixel values of the predicted block image input from the prediction unit 19 (described later) from the pixel values of the block image input from the block division unit 11 to generate a residual block image that shows the difference between the block image and the predicted block image, and outputs it to the conversion unit 13.
[0059] The conversion unit 13 performs conversion processing, such as orthogonal transformation, on the residual block image input from the subtraction unit 12 to calculate conversion coefficients and outputs them to the quantization unit 14.
[0060] The quantization unit 14 generates quantization coefficients by dividing the conversion coefficients input from the conversion unit 13 by a quantization step corresponding to the quantization parameter QP, and outputs them to the inverse quantization unit 15 and the entropy coding unit 20. The quantization unit 14 reduces the amount of data.
[0061] The inverse quantization unit 15 restores the conversion coefficients by multiplying the quantization coefficients input from the quantization unit 14 by the quantization step, and outputs them to the inverse conversion unit 16.
[0062] The inverse transform unit 16 performs an inverse transform process (a process that reverses the transformation performed by the transform unit 13) on the transformation coefficients input from the inverse quantization unit 15 to reconstruct the residual block image and outputs it to the adder 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.
[0063] The summing unit 17 adds the residual block image input from the inverse transform unit 16 and the predicted image input from the prediction unit 19, and outputs the local decoded image to the storage unit 18 and the coding distortion calculation unit 41 of the cost optimization unit 40.
[0064] In this way, the encoding unit 10 restores the transformation coefficients by multiplying the quantization coefficients by the quantization step, performs an inverse transformation on the transformation coefficients to restore the residual block image, and adds the residual block image and the intra-prediction image or motion-compensated prediction image to generate a locally decoded image. The encoding unit 10 may also perform post-processing, such as filtering by a deblocking filter, on the locally decoded image output by the summing unit 17 before outputting it to the storage unit 18.
[0065] The prediction unit 19 performs intra-prediction (intra-screen prediction) or inter-prediction (inter-screen prediction, motion-compensated prediction). In intra-prediction, it generates an intra-predicted image based on the local decoded image stored in the memory unit 18, according to the intra-prediction mode. In inter-prediction, it generates a motion-compensated predicted image based on the local decoded image stored in the memory unit 18, according to the motion vector. The prediction unit 19 switches between the intra-predicted image and the motion-compensated predicted image to form a predicted block image, which it outputs to the subtraction unit 12 and the addition unit 17. The prediction unit 19 outputs the prediction parameters (intra-prediction mode and motion vector information) used in the prediction process to the entropy coding unit 20.
[0066] The entropy coding unit 20 performs entropy coding on the quantization coefficients input from the quantization unit 14, as well as parameters such as block size information, transformation information, and prediction parameters used in the coding process, compresses the data, generates a bitstream which is 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.
[0067] (Experimental results) Table 1 shows experimental results when the video encoding device 1 according to this embodiment was applied to a certain HDR / wide color gamut image. The image quality index Vc is an index with a maximum value of 1, where the value increases as the image gets closer to the original image. It was confirmed that encoding with the video encoding device 1 has the effect of improving the objective evaluation value while reducing the amount of code compared to prior encoding.
[0068] [Table 1]
[0069] Thus, the video encoding device 1 according to this embodiment can improve subjective quality when compressing video containing vivid colors, such as HDR / wide color gamut video, by estimating the relationship between the coding distortion D of the cost function and the rate R using an image quality index.
[0070] (program) To function as the above-described video encoding device 1, a computer capable of executing program instructions can also be used. Here, the computer may be a general-purpose computer, a dedicated computer, a workstation, a PC (Personal Computer), an electronic notepad, etc. The program instructions may be program code, code segments, etc., for executing the required tasks.
[0071] A computer comprises a processor, a memory unit, an input unit, an output unit, and a communication interface. The processor may be a CPU (Central Processing Unit), MPU (Micro Processing Unit), GPU (Graphics Processing Unit), DSP (Digital Signal Processor), SoC (System on a Chip), etc., and may be composed of multiple processors of the same or different types. The processor controls each of the above components and performs various calculations by reading and executing programs from the memory unit. At least a part of these processes may be implemented in hardware. The input unit is an input interface that receives user input operations and acquires information based on 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.
[0072] The program may be recorded on a computer-readable recording medium. Using such a medium, the program can be installed on the computer. The recording medium on which the program is recorded may be a non-transitory recording medium. Non-transitory recording media are not particularly limited, but may include, for example, CD-ROMs, DVD-ROMs, or USB (Universal Serial Bus) memory. Alternatively, the program may be downloaded from an external device via a network.
[0073] For example, a program to make a computer function as the above-mentioned video encoding device 1 causes the computer to perform the following steps: a degraded image generation step that generates a degraded image by degrading the original image; a code amount adjustment step that calculates a first estimated value of the degree of degradation for each block of the degraded image and a second estimated value of the code amount for each block of the degraded image, and adjusts the code amount for the part to be encoded according to the difference between a first rank obtained by sorting the first estimated values in order of magnitude and a second rank obtained by sorting the second estimated values in order of magnitude; and the code amount adjustment step compares the original image and the degraded image using a first image quality index that calculates an index value from the luminance signal and the color signal to obtain the first estimated value.
[0074] Although the embodiments described above are representative examples, it will be apparent to those skilled in the art that many modifications and substitutions are possible within the spirit and scope of the present invention. Therefore, the present invention should not be interpreted as being limited by the embodiments described above, and various modifications or changes are possible without departing from the scope of the claims. For example, it is possible to combine multiple component blocks shown in the configuration diagram of the embodiments into one, or to divide one component block. [Explanation of symbols]
[0075] 1. Video encoding device 10 Encoding section 11 Block division section 12 Subtraction Unit 13 Conversion section 14 Quantization section 15 Inverse quantization section 16 Inverse Transform Section 17 Addition section 18 Memory section 19 Prediction Section 20 Entropy coding unit 30 Encoding 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 Deterioration degree estimation part 62 Code amount estimator 63 Scaling coefficient determination unit 70 Encoding result storage unit
Claims
1. A video encoding device for encoding the original image of an input video, A degraded image generation unit that generates a degraded image by degrading the original image, The system includes a first estimated value of the degree of degradation for each block of the degraded image and a second estimated value of the code amount for each block of the degraded image, and a code amount adjustment unit that adjusts the code amount for the part to be encoded according to the difference between a first rank obtained by sorting the first estimated values in order of magnitude and a second rank obtained by sorting the second estimated values in order of magnitude. The code amount adjustment unit is a video encoding device that compares the original image and the degraded image using a first image quality index that calculates an index value from a luminance signal and a color signal, and obtains the first estimated value.
2. The video encoding apparatus according to claim 1, wherein the code amount adjustment unit obtains the second estimated value from the original image and the degraded image using a second image quality index which calculates an index value from a luminance signal.
3. The video encoding apparatus according to claim 1 or 2, wherein the code amount adjustment unit adjusts the code amount for the portion to be encoded to decrease as the first rank obtained by sorting the first estimated values in descending order is greater than the second rank obtained by sorting the second estimated values in descending order.
4. A program for causing a computer to function as a video encoding device according to claim 1 or 2.