Video Encoding Method, Apparatus, Electronic Device, and Computer-Readable Storage Medium
By reasonably selecting the macroblock mode in the H.264 encoding method, the preset encoding distortion measurement threshold is determined using rate distortion cost and quantization parameters, the problem of poor video encoding effect is solved, and the balance between optimization of encoding quality and code rate consumption under different quantization parameters is achieved.
Patent Information
- Application Number
- CN202211082494.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-06
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-09-06
AI Technical Summary
The existing H.264 encoding method is inappropriate in the selection of macroblock mode, resulting in poor video encoding effect. Especially in the complex scenarios of low code rate, improper selection of SKIP mode and INTER mode will lead to excessive encoding distortion or excessive bit rate consumption, affecting the video encoding effect.
By obtaining the rate distortion cost of SKIP mode, INTER mode and INTRA mode respectively, determine the preset encoding distortion measurement threshold based on the quantization parameters, and reasonably select the macroblock mode to optimize encoding quality and code rate consumption to avoid block effects and code rate overflow caused by improper selection.
While ensuring the quality of video encoding, it reduces the bit rate consumption, solves the problem of poor video encoding effect caused by inappropriate selection of macroblock modes, and improves the overall performance of video encoding.
Smart Images

Figure CN115460405B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of video coding, and in particular, to a video coding method, apparatus, electronic device, and computer-readable storage medium. Background Art
[0002] Currently, the macroblock mode selection method for H.264 coding uses a method based on Lagrangian rate-distortion optimization to obtain the macroblock mode with the minimum rate-distortion cost. However, the selected macroblock mode may not necessarily achieve the optimal subjective perception quality. For example, in complex scenes with low bitrates, inappropriate selection of the SKIP mode and INTER mode will cause excessive coding distortion of the macroblock, forming block effects, thereby affecting the video coding effect. While selecting the INTRA mode can improve the coding quality of the local area, it will increase the bitrate consumption, resulting in insufficient bitrate available for subsequent video frames and causing bitrate underflow, which will also affect the video coding effect. Summary of the Invention
[0003] The main purpose of the present application is to provide a video coding method, apparatus, electronic device, and computer-readable storage medium, aiming to solve the technical problem of poor video coding effect caused by inappropriate macroblock mode selection.
[0004] To achieve the above object, the present application provides a video coding method, which includes:
[0005] Respectively obtain a first rate-distortion cost under a first type of macroblock mode and a second rate-distortion cost under a second type of macroblock mode, where the first type of macroblock mode includes at least one of the SKIP mode and the INTER mode, and the second type of macroblock mode includes the INTRA mode;
[0006] If the second rate-distortion cost is less than the first rate-distortion cost, select the second type of macroblock mode to encode the current macroblock;
[0007] If the second rate-distortion cost is not less than the first rate-distortion cost, obtain the coding distortion measure of the current macroblock under the first type of macroblock mode and a preset coding distortion measure threshold corresponding to the current macroblock, where the preset coding distortion measure threshold is determined according to the quantization parameter of the current macroblock;
[0008] If the coding distortion measure is less than the preset coding distortion measure threshold, select the first type of macroblock mode to encode the current macroblock;
[0009] If the coding distortion measure is not less than the preset coding distortion measure threshold, select the second type of macroblock mode to encode the current macroblock.
[0010] Optionally, obtaining a preset coding distortion measure threshold corresponding to the current macroblock includes:
[0011] Obtaining the macroblock size and quantization parameter of the current macroblock;
[0012] Retrieving a preset coding distortion measure threshold corresponding to the current macroblock according to the macroblock size and the quantization parameter.
[0013] Optionally, before obtaining a preset coding distortion measure threshold corresponding to the current macroblock, the video coding method further includes:
[0014] Obtaining threshold setting auxiliary parameters corresponding to the current macroblock, where the threshold setting auxiliary parameters are determined according to the quantization parameter corresponding to the current macroblock;
[0015] Setting a preset coding distortion measure threshold according to the quantization parameter corresponding to the current macroblock, the macroblock size corresponding to the current macroblock, and the threshold setting auxiliary parameters.
[0016] Optionally, the step of obtaining threshold setting auxiliary parameters corresponding to the current macroblock includes:
[0017] Obtaining a preset average deviation threshold between the original pixel value and the corresponding coded pixel value corresponding to the current macroblock, where the preset average deviation threshold is a pixel deviation boundary value for evaluating whether coding distortion is obvious;
[0018] Retrieving threshold setting auxiliary parameters corresponding to the current macroblock according to the quantization parameter of the current macroblock and the preset average deviation threshold.
[0019] Optionally, before the step of obtaining a preset average deviation threshold between the original pixel value and the corresponding coded pixel value corresponding to the current macroblock, where the preset average deviation threshold is a pixel deviation boundary value for evaluating whether coding distortion is obvious, the video coding method further includes:
[0020] Obtaining a preset average deviation threshold corresponding to at least one target macroblock;
[0021] Calculating threshold setting auxiliary parameters corresponding to the target macroblock according to the preset average deviation threshold corresponding to the target macroblock and the corresponding quantization parameter.
[0022] Optionally, the step of calculating threshold setting auxiliary parameters corresponding to the target macroblock according to the preset average deviation threshold corresponding to the target macroblock and the corresponding quantization parameter includes:
[0023] Calculate a coding distortion measure boundary value according to the square value of a preset average deviation threshold of the target macroblock and the macroblock size of the target macroblock, where the coding distortion measure boundary value is a boundary value for evaluating whether the coding distortion is obvious;
[0024] Calculate a ratio between the coding distortion measure boundary value and the product of the macroblock size of the target macroblock and the quantization parameter to obtain the threshold setting auxiliary parameter.
[0025] Optionally, obtaining the coding distortion measure of the current macroblock in the first type of macroblock mode includes:
[0026] Obtain each original pixel value corresponding to the current macroblock and each coded pixel value of the current macroblock in the first type of macroblock mode;
[0027] Calculate the sum of squared differences between each original pixel value and the corresponding coded pixel value to obtain the coding distortion measure.
[0028] This application also provides a video coding device, where the video coding device includes:
[0029] A rate-distortion cost calculation module, configured to calculate a first rate-distortion cost in a first type of macroblock mode and a second rate-distortion cost in a second type of macroblock mode respectively, where the first type of macroblock mode includes at least one of a SKIP mode and an INTER mode, and the second type of macroblock mode includes an INTRA mode;
[0030] A first macroblock mode selection module, configured to select the second type of macroblock mode to encode the current macroblock if the second rate-distortion cost is less than the first rate-distortion cost;
[0031] An obtaining module, configured to obtain the coding distortion measure of the current macroblock in the first type of macroblock mode and a preset coding distortion measure threshold corresponding to the current macroblock if the second rate-distortion cost is not less than the first rate-distortion cost, where the preset coding distortion measure threshold is determined according to the quantization parameter of the current macroblock;
[0032] A second macroblock mode selection module, configured to select the first type of macroblock mode to encode the current macroblock if the coding distortion measure is less than the preset coding distortion measure threshold;
[0033] A third macroblock mode selection module, configured to select the second type of macroblock mode to encode the current macroblock if the coding distortion measure is not less than the preset coding distortion measure threshold.
[0034] Optionally, the obtaining module is further configured to:
[0035] Obtain the macroblock size and quantization parameter of the current macroblock;
[0036] Retrieve the preset coding distortion measure threshold corresponding to the current macroblock according to the macroblock size and the quantization parameter.
[0037] Optionally, the video coding device is further configured to:
[0038] Obtain the threshold setting auxiliary parameter corresponding to the current macroblock, where the threshold setting auxiliary parameter is determined according to the quantization parameter corresponding to the current macroblock;
[0039] Set the preset coding distortion measure threshold according to the quantization parameter corresponding to the current macroblock, the macroblock size corresponding to the current macroblock, and the threshold setting auxiliary parameter.
[0040] Optionally, the video coding device is further configured to:
[0041] Obtain the preset average deviation threshold between the original pixel values corresponding to the current macroblock and the coded pixel values corresponding thereto, where the preset average deviation threshold is the pixel deviation boundary value for evaluating whether the coding distortion is obvious;
[0042] Retrieve the threshold setting auxiliary parameter corresponding to the current macroblock according to the quantization parameter of the current macroblock and the preset average deviation threshold.
[0043] Optionally, the video coding device is further configured to:
[0044] Obtain the preset average deviation threshold corresponding to at least one target macroblock;
[0045] Calculate the threshold setting auxiliary parameter corresponding to the target macroblock according to the preset average deviation threshold corresponding to the target macroblock and the corresponding quantization parameter.
[0046] Optionally, the video coding device is further configured to:
[0047] Calculate the coding distortion measure boundary value according to the square value of the preset average deviation threshold of the target macroblock and the macroblock size of the target macroblock, where the coding distortion measure boundary value is the distortion measure boundary value for evaluating whether the coding distortion is obvious;
[0048] Calculate the ratio between the coding distortion measure boundary value and the product of the macroblock size and quantization parameter of the target macroblock to obtain the threshold setting auxiliary parameter.
[0049] Optionally, the obtaining module is further configured to:
[0050] Obtain each original pixel value corresponding to the current macroblock and each coded pixel value of the current macroblock in the first type of macroblock mode;
[0051] Calculate the sum of the squared differences between each of the original pixel values and the corresponding encoded pixel values to obtain the encoded distortion measure.
[0052] The present application also provides an electronic device. The electronic device is a physical device and includes: a memory, a processor, and a program of the video encoding method stored on the memory and executable on the processor. When the program of the video encoding method is executed by the processor, the steps of the video encoding method as described above can be implemented.
[0053] The present application also provides a computer-readable storage medium, on which a program for implementing the video encoding method is stored. When the program of the video encoding method is executed by a processor, the steps of the video encoding method as described above are implemented.
[0054] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the video encoding method as described above are implemented.
[0055] The present application provides a video encoding method, apparatus, electronic device, and computer-readable storage medium. First, the present application separately obtains a first rate-distortion cost in a first type of macroblock mode and a second rate-distortion cost in a second type of macroblock mode, where the first type of macroblock mode includes at least one of the SKIP mode and the INTER mode, and the second type of macroblock mode includes the INTRA mode; if the second rate-distortion cost is less than the first rate-distortion cost, it proves that selecting the SKIP mode or the INTER mode will cause excessive distortion in macroblock encoding, and it is necessary to select the INTER mode for video encoding to improve the encoding quality of video encoding; if the second rate-distortion cost is not less than the first rate-distortion cost, the encoding distortion measure of the current macroblock in the first type of macroblock mode and the preset encoding distortion measure threshold corresponding to the current macroblock are obtained. If the encoding distortion measure is less than the preset encoding distortion measure threshold, it proves that selecting the SKIP mode or the INTER mode will not cause excessive distortion in macroblock encoding, and the first type of macroblock mode can be selected for video encoding, which can ensure the local encoding effect without increasing the bitrate consumption; if the encoding distortion measure is not less than the preset encoding distortion measure threshold, it proves that selecting the SKIP mode or the INTER mode will cause relatively large distortion in macroblock encoding and is likely to form blocking artifacts, and it is necessary to select the second type of macroblock mode for video encoding to improve the encoding quality of video encoding and ensure that no obvious blocking artifacts are generated. Among them, since the preset encoding distortion measure threshold is determined according to the quantization parameter of the current macroblock, the present application fully considers the influence of the quantization parameter on the video encoding quality and the consumed bitrate, and can reasonably select the corresponding macroblock mode for video encoding under different quantization parameters. Therefore, it overcomes the technical defect that inappropriate selection of the SKIP mode and the INTER mode will cause excessive distortion in macroblock encoding, form blocking artifacts, and thus affect the video encoding effect. Selecting the INTRA mode can improve the encoding quality of the local area, but it will increase the bitrate consumption, resulting in insufficient bitrate available for subsequent video frames and causing bitrate underflow, which will also affect the video encoding effect, and solves the technical problem of poor video encoding effect caused by inappropriate selection of the macroblock mode. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for describing the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0058] Figure 1 It is a schematic flowchart of the first embodiment of the video encoding method of the present application;
[0059] Figure 2 It is a schematic flowchart of the second embodiment of the video encoding method of the present application;
[0060] Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the video encoding method in the embodiments of the present application.
[0061] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0062] To make the above objects, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0063] Referring to Figure 1 , the embodiments of the present application provide a video encoding method. In the first embodiment of the video encoding method of the present application, the video encoding method includes:
[0064] Step S10: Calculate the first rate-distortion cost in the first type of macroblock mode and the second rate-distortion cost in the second type of macroblock mode respectively, where the first type of macroblock mode includes at least one of the SKIP mode and the INTER mode, and the second type of macroblock mode includes the INTRA mode;
[0065] Step S20: If the second rate-distortion cost is less than the first rate-distortion cost, select the second type of macroblock mode to encode the current macroblock;
[0066] Step S30: If the second rate-distortion cost is not less than the first rate-distortion cost, obtain the encoding distortion measure of the current macroblock in the first type of macroblock mode and the preset encoding distortion measure threshold corresponding to the current macroblock, where the preset encoding distortion measure threshold is determined according to the quantization parameter of the current macroblock;
[0067] Step S40: If the encoding distortion measure is less than the preset encoding distortion measure threshold, select the first type of macroblock mode to encode the current macroblock;
[0068] Step S50, if the coding distortion measure is not less than the preset coding distortion measure threshold, then select the second type of macroblock mode to encode the current macroblock.
[0069] In this embodiment, it should be noted that currently, when using the H.264 coding method for inter-frame prediction, the Lagrangian rate-distortion optimization method is usually used to select the macroblock mode. Taking the P frame as an example, the rate-distortion costs of the SKIP mode, INTER mode (INTER16x16, INTER16x8, INTER8x16, INTER8x8), and INTRA (INTRA 16x16, INTRA 8x8, INTRA 4x4) modes are calculated in sequence, and the macroblock mode with the minimum rate-distortion cost is selected as the optimal prediction mode. The SKIP mode uses the motion vector of temporal / spatial prediction to obtain the matching block, thereby obtaining the pixel prediction value of the current macroblock. It does not encode the pixel residual and the motion vector residual. Its main feature is that the coding bit rate is small but the distortion is large. The INTER mode searches for a more accurate motion vector through motion estimation to obtain the matching block, and can encode the pixel residual and the motion vector residual. Usually, its coding distortion is smaller than that of the SKIP mode and larger than that of the INTRA mode. The INTRA mode uses the intra-frame prediction method to predict the pixel value of the current macroblock, and its feature is that it consumes more bit rate but has small coding distortion. The first type of macroblock mode includes at least one of the SKIP mode and the INTER mode, and the second type of macroblock mode includes the INTRA mode.
[0070] As an example, steps S10 to S50 include: respectively obtaining a first rate-distortion cost in the SKIP mode, a first rate-distortion cost in the INTER mode, and a second rate-distortion cost in the INTRA mode by using the Lagrangian rate-distortion optimization method; if the second rate-distortion cost is less than each of the first rate-distortion costs, it is proved that the INTRA mode is the optimal prediction mode for the current macroblock, and the INTRA mode is selected to encode the current macroblock; if the second rate-distortion cost is not less than each of the first rate-distortion costs, the minimum first rate-distortion cost is determined; obtaining the coding distortion measure of the current macroblock in the macroblock mode corresponding to the minimum first rate-distortion cost, and obtaining a preset coding distortion measure threshold corresponding to the current macroblock, where the preset coding distortion measure threshold is determined according to the quantization parameter of the current macroblock, and the macroblock mode corresponding to the minimum first rate-distortion cost of the current macroblock can be the SKIP mode or the INTER mode; determining whether the coding distortion measure is less than the preset coding distortion measure threshold, if the coding distortion measure is less than the preset coding distortion measure threshold, it is proved that the coding distortion of the macroblock mode corresponding to the minimum first rate-distortion cost is not obvious and will not affect the subjective perception quality, so the macroblock mode corresponding to the minimum first rate-distortion cost is selected to encode the current macroblock; if the coding distortion measure is not less than the preset coding distortion measure threshold, it is proved that the coding distortion of the macroblock mode corresponding to the minimum first rate-distortion cost is obvious and will affect the subjective perception quality, so the INTRA mode is selected to encode the current macroblock.
[0071] In the embodiment of the present application, when using the Lagrangian method to determine that the SKIP mode or the INTER mode is the optimal prediction mode, the SKIP mode or the INTER mode is not directly selected for encoding, but the preset coding distortion measure threshold determined according to the quantization parameter of the current macroblock is further used to determine whether the coding distortion of the SKIP mode or the INTER mode is obvious; if the coding distortion of the SKIP mode or the INTER mode is obvious, it is determined that using the SKIP mode or the INTER mode for encoding is likely to cause block effects and will reduce the video coding quality, so it is necessary to select the INTRA mode for encoding to improve the video coding quality; if the coding distortion of the SKIP mode or the INTER mode is obvious, it is determined that using the SKIP mode or the INTER mode for encoding is not likely to cause block effects and will not reduce the video coding quality, and the SKIP mode or the INTER mode can be selected to encode the current macroblock. While ensuring the video coding quality, the bitrate consumption can be reduced. Therefore, in the video coding in the embodiment of the present application, the macroblock mode selection is more reasonable, and the macroblock mode can be selected by taking into account both the video coding quality and the bitrate consumption. While ensuring the video coding quality, the bitrate consumption can be reduced.
[0072] As an example, it should be noted that the size of the quantization parameter reflects the video frame compression situation. If the quantization parameter decreases, more image details will be retained during video frame compression, but more bitrate will be consumed; if the quantization parameter increases, some image details will be lost during video frame compression, that is, the image distortion is larger, and the bitrate consumption will decrease at this time. Therefore, the size of the quantization parameter will affect both the video coding quality and the bitrate consumption. The step of obtaining the preset coding distortion measure threshold corresponding to the current macroblock includes:
[0073] Obtain the quantization parameter of the current macroblock, and query the preset coding distortion measure threshold corresponding to the quantization parameter of the current macroblock according to the mapping relationship between the quantization parameter and the preset coding distortion measure threshold. In the embodiment of the present application, based on the quantization parameter, the corresponding relationship between the quantization parameter and the preset coding distortion measure threshold is set, which can make the setting of the preset coding distortion measure threshold more reasonable, fully considering the influence of the quantization parameter on the video coding quality and the bitrate consumption, so that the macroblock mode selection can be more reasonable according to the preset coding distortion measure threshold.
[0074] Among them, obtaining the preset coding distortion measure threshold corresponding to the current macroblock includes:
[0075] Step A10, obtain the macroblock size and quantization parameter of the current macroblock;
[0076] Step A20, retrieve the preset coding distortion measure threshold corresponding to the current macroblock according to the macroblock size and the quantization parameter.
[0077] In this embodiment, it should be noted that since the coding distortion measure is the sum of the squares of the differences between all the original pixels and the corresponding coded pixels in the macroblock, the macroblock size is also one of the factors affecting the coding distortion size.
[0078] As an example, steps A10 to A20 include: obtaining the macroblock size and quantization parameter of the current macroblock; calculating the product between the macroblock size and the quantization parameter to obtain macroblock parameter information; querying the preset coding distortion measure threshold corresponding to the macroblock parameter information of the current macroblock according to the mapping relationship between the macroblock parameter information and the preset coding distortion measure threshold, where the macroblock size may be the number of pixel values in the current macroblock. In the embodiments of the present application, both the quantization parameter corresponding to the current macroblock and the corresponding macroblock size are used as the determining factors for selecting the preset coding distortion measure threshold, so that it is possible to select the preset coding distortion measure threshold based on both the quantization parameter corresponding to the current macroblock and the corresponding macroblock size, fully considering the influence of the quantization parameter and the macroblock size on the video coding quality and bitrate consumption. Therefore, the selection of the preset coding distortion measure threshold can be made more reasonable, so that macroblock mode selection can take into account both the video coding quality and the bitrate consumption, and while ensuring the video coding quality, the bitrate consumption can be reduced.
[0079] Among them, the obtaining the coding distortion measure of the current macroblock in the first type of macroblock mode includes:
[0080] Step S31, obtaining each original pixel value corresponding to the current macroblock and each coded pixel value of the current macroblock in the first type of macroblock mode;
[0081] Step S32, calculating the sum of squared differences between each original pixel value and the corresponding coded pixel value to obtain the coding distortion measure.
[0082] In this embodiment, each original pixel value corresponding to the current macroblock is obtained, and each coded pixel value corresponding to each original pixel value when coding using the first type of macroblock mode is obtained; the squared difference between each original pixel value and the corresponding coded pixel value is calculated, and the squared differences are summed to obtain the sum of squared differences, and this sum of squared differences is used as the coding distortion measure.
[0083] As an example, the calculation method for calculating the coding distortion measure is as follows:
[0084]
[0085] Among them, SSD is the coding distortion measure, I(m,n) is the original pixel value at the m-th row and n-th column in the current macroblock, Rec(m,n) is the coded pixel value at the m-th row and n-th column in the current macroblock, and N represents the number of pixels in one row or one column of the current macroblock, which can be 16 or 64.
[0086] An embodiment of the present application provides a video encoding method. First, a first rate-distortion cost in a first type of macroblock mode and a second rate-distortion cost in a second type of macroblock mode are respectively obtained. Among them, the first type of macroblock mode includes at least one of the SKIP mode and the INTER mode, and the second type of macroblock mode includes the INTRA mode. If the second rate-distortion cost is less than the first rate-distortion cost, it proves that selecting the SKIP mode or the INTER mode will cause excessive distortion in macroblock encoding, and the INTER mode needs to be selected for video encoding to improve the encoding quality of the video. If the second rate-distortion cost is not less than the first rate-distortion cost, the encoding distortion measure of the current macroblock in the first type of macroblock mode and the preset encoding distortion measure threshold corresponding to the current macroblock are obtained. If the encoding distortion measure is less than the preset encoding distortion measure threshold, it proves that selecting the SKIP mode or the INTER mode will not cause excessive distortion in macroblock encoding, and the first type of macroblock mode can be selected for video encoding, which can ensure the local encoding effect without increasing the bitrate consumption. If the encoding distortion measure is not less than the preset encoding distortion measure threshold, it proves that selecting the SKIP mode or the INTER mode will cause relatively large distortion in macroblock encoding and is likely to form blocking artifacts, and the second type of macroblock mode needs to be selected for video encoding to improve the encoding quality of the video and ensure that no obvious blocking artifacts are generated. Among them, since the preset encoding distortion measure threshold is determined according to the quantization parameter of the current macroblock, the embodiment of the present application fully considers the influence of the quantization parameter on the video encoding quality and the consumed bitrate, and can reasonably select the corresponding macroblock mode for video encoding under different quantization parameters. Therefore, it overcomes the technical defect that inappropriate selection of the SKIP mode and the INTER mode will cause excessive distortion in macroblock encoding and form blocking artifacts, thereby affecting the video encoding effect. Selecting the INTRA mode can improve the encoding quality of the local area, but it will increase the bitrate consumption, resulting in insufficient bitrate available for subsequent video frames and causing bitrate underflow, which will also affect the video encoding effect, and solves the technical problem of poor video encoding effect caused by inappropriate selection of the macroblock mode.
[0087] In another embodiment of the present application, the same or similar content as that in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, referring to Figure 2 , before obtaining the preset encoding distortion measure threshold corresponding to the current macroblock, the video encoding method further includes:
[0088] Step B10: Obtain a threshold setting auxiliary parameter corresponding to the current macroblock, where the threshold setting auxiliary parameter is determined according to the quantization parameter corresponding to the current macroblock;
[0089] Step B20: Set an auxiliary parameter according to the quantization parameter corresponding to the current macroblock, the macroblock size corresponding to the current macroblock, and the threshold, and set a preset coding distortion measure threshold.
[0090] In this embodiment, it should be noted that the threshold setting auxiliary parameter is an empirical value used to assist in setting the preset coding distortion measure threshold, and this threshold setting auxiliary parameter corresponds one-to-one with the quantization parameter of the current macroblock.
[0091] As an example, steps B10 to B20 include: obtaining the quantization parameter corresponding to the current macroblock, querying the threshold setting auxiliary parameter corresponding to the quantization parameter of the current macroblock according to the mapping relationship between the quantization parameter and the threshold setting auxiliary parameter; calculating the product of the quantization parameter corresponding to the current macroblock, the corresponding macroblock size, and the corresponding threshold setting auxiliary parameter to obtain a preset coding distortion measure threshold.
[0092] As an example, the calculation formula for calculating the preset coding distortion measure threshold is as follows:
[0093] SSD′ = a * N 2 * QP
[0094] Where SSD′ is the preset coding distortion measure threshold, a is the threshold setting auxiliary parameter corresponding to the current macroblock, N represents the number of pixels in a row or a column of the current macroblock, and QP is the quantization parameter of the current macroblock.
[0095] Among them, the step of obtaining the threshold setting auxiliary parameter corresponding to the current macroblock includes:
[0096] Step B11: Obtain a preset average deviation threshold between the original pixel value and the corresponding coded pixel value corresponding to the current macroblock, where the preset average deviation threshold is a pixel deviation boundary value for evaluating whether the coding distortion is obvious;
[0097] Step B22: Retrieve the threshold setting auxiliary parameter corresponding to the current macroblock according to the quantization parameter of the current macroblock and the preset average deviation threshold.
[0098] In this embodiment, it should be noted that the preset average deviation threshold is a pixel deviation boundary value between the preset original pixel value and the corresponding encoded pixel value, which is used to evaluate whether the encoding distortion of a single pixel value in a macroblock is obvious. For example, assume that the preset average deviation threshold is 20. If the average pixel deviation value between the original pixel value and the corresponding encoded pixel value of macroblock A is greater than 20, it is considered that the encoding distortion of a single pixel value in macroblock A is relatively obvious. If the average pixel deviation value between the original pixel value and the corresponding encoded pixel value of macroblock A is not greater than 20, it is considered that the encoding distortion of a single pixel value in macroblock A is not obvious.
[0099] As an example, steps B11 to B22 include: obtaining the preset average deviation threshold between the original pixel value and the corresponding encoded pixel value of the current macroblock, where the preset average deviation threshold is a pixel deviation boundary value for evaluating whether the encoding distortion is obvious; querying the threshold setting auxiliary parameter jointly corresponding to the quantization parameter and the preset average deviation threshold of the current macroblock according to the corresponding relationship among the quantization parameter, the preset average deviation threshold, and the threshold setting auxiliary parameter. In the embodiment of the present application, by presetting the corresponding relationship among the quantization parameter, the preset average deviation threshold, and the threshold setting auxiliary parameter, the threshold setting auxiliary parameter corresponding to the current macroblock can be quickly retrieved during encoding without temporarily calculating the threshold setting auxiliary parameter corresponding to the current macroblock, thereby improving the encoding efficiency.
[0100] Wherein, before the step of obtaining the preset average deviation threshold between the original pixel value and the corresponding encoded pixel value of the current macroblock, where the preset average deviation threshold is a pixel deviation boundary value for evaluating whether the encoding distortion is obvious, the video encoding method further includes:
[0101] Step C10, obtaining the preset average deviation threshold corresponding to at least one target macroblock;
[0102] Step C20, calculating the threshold setting auxiliary parameter corresponding to the target macroblock according to the preset average deviation threshold and the corresponding quantization parameter of the target macroblock.
[0103] In the embodiment of the present application, the preset average deviation thresholds of all macroblocks can be set to the same size threshold, or corresponding size thresholds can be set according to the macroblock size and quantization parameter of the macroblock.
[0104] As an example, steps C10 to C20 include: obtaining a preset average deviation threshold corresponding to at least one target macroblock; calculating a ratio between the square value of the preset average deviation threshold corresponding to the target macroblock and the quantization parameter corresponding to the target macroblock, and using this ratio as the threshold setting auxiliary parameter corresponding to the target macroblock. Embodiments of the present application set corresponding preset average deviation thresholds for all types of macroblocks.
[0105] Among them, the step of calculating the threshold setting auxiliary parameter corresponding to the target macroblock according to the preset average deviation threshold and the corresponding quantization parameter of the target macroblock includes:
[0106] Step C21, calculating a coding distortion measure limit value according to the square value of the preset average deviation threshold of the target macroblock and the macroblock size of the target macroblock, where the coding distortion measure limit value is a distortion measure limit value for evaluating whether the coding distortion is obvious;
[0107] Step C22, calculating a ratio between the coding distortion measure limit value and the product of the macroblock size and the quantization parameter of the target macroblock to obtain the threshold setting auxiliary parameter.
[0108] In this embodiment, it should be noted that the coding distortion measure limit value is a distortion measure limit value for evaluating whether the coding distortion of the entire macroblock is obvious. For example, assume that the coding distortion measure of macroblock A is B and the coding distortion measure limit value is A. If B is greater than A, it is considered that the coding distortion of the entire macroblock A is obvious; if B is not greater than A, it is considered that the coding distortion of the entire macroblock A is not obvious.
[0109] As an example, steps C21 to C22 include: calculating the product of the square value of the preset average deviation threshold corresponding to the target macroblock and the corresponding macroblock size, and using this product as the coding distortion measure limit value, where the coding distortion measure limit value is a distortion measure limit value for evaluating whether the coding distortion is obvious; calculating a ratio between the coding distortion measure limit value and the product of the macroblock size and the quantization parameter of the target macroblock to obtain the threshold setting auxiliary parameter. Embodiments of the present application realize reasonably setting the threshold setting auxiliary parameter of the macroblock according to the quantization parameter and the preset average deviation threshold of the macroblock, and then setting the preset coding distortion measure threshold according to the threshold setting auxiliary parameter. Therefore, in embodiments of the present application, it is possible to accurately determine whether the coding distortion of the macroblock is obvious according to the preset coding distortion measure threshold, and fully consider the influence of the quantization parameter on coding. Therefore, the coding effect can be improved.
[0110] As an example, the calculation formula for calculating the threshold setting auxiliary parameter is as follows:
[0111] M 2 *N 2= a * N 2 * QP
[0112] Wherein, M is the preset average deviation threshold, N represents the number of pixels in a row or a column of a macroblock, and N 2 represents the macroblock size, and M 2 * N 2 is the coding distortion measure limit value, a is the auxiliary parameter for threshold setting, QP is the quantization parameter. For example, assuming M is 20 and QP is 37, then a is 10.82.
[0113] In the embodiments of the present application, the auxiliary parameter for threshold setting corresponding to the current macroblock is obtained, wherein the auxiliary parameter for threshold setting is determined according to the quantization parameter corresponding to the current macroblock; according to the quantization parameter corresponding to the current macroblock, the macroblock size corresponding to the current macroblock, and the auxiliary parameter for threshold setting, a preset coding distortion measure threshold is set, wherein the preset coding distortion measure threshold is determined according to the preset average deviation threshold and the quantization parameter of the current macroblock. The preset average deviation threshold is the pixel deviation limit value for evaluating whether the coding distortion is obvious. Therefore, in the embodiments of the present application, the preset coding distortion measure threshold is reasonably set on the premise of fully considering the influence of the quantization parameter on the coding effect, so that it can be accurately judged whether the distortion is obvious when coding according to the first type of macroblock mode based on the preset coding distortion measure threshold. Thus, when the second rate-distortion cost is not less than the first rate-distortion cost, it can be further determined whether to select the first type of macroblock mode for coding, which can improve the accuracy and rationality of macroblock selection and lay a foundation for improving the video coding effect.
[0114] The embodiments of the present application also provide a video coding device, and the video coding device includes:
[0115] A rate-distortion cost calculation module, configured to calculate a first rate-distortion cost in the first type of macroblock mode and a second rate-distortion cost in the second type of macroblock mode respectively, wherein the first type of macroblock mode includes at least one of the SKIP mode and the INTER mode, and the second type of macroblock mode includes the INTRA mode;
[0116] A first macroblock mode selection module, configured to select the second type of macroblock mode to code the current macroblock if the second rate-distortion cost is less than the first rate-distortion cost;
[0117] An acquisition module, configured to obtain the coding distortion measure of the current macroblock in the first type of macroblock mode and the preset coding distortion measure threshold corresponding to the current macroblock if the second rate-distortion cost is not less than the first rate-distortion cost, wherein the preset coding distortion measure threshold is determined according to the quantization parameter of the current macroblock;
[0118] A second macroblock mode selection module, configured to select the first type of macroblock mode to encode the current macroblock if the encoding distortion measure is less than the preset encoding distortion measure threshold;
[0119] A third macroblock mode selection module, configured to select the second type of macroblock mode to encode the current macroblock if the encoding distortion measure is not less than the preset encoding distortion measure threshold.
[0120] Optionally, the obtaining module is further configured to:
[0121] Obtain the macroblock size and quantization parameter of the current macroblock;
[0122] Retrieve the preset encoding distortion measure threshold corresponding to the current macroblock according to the macroblock size and the quantization parameter.
[0123] Optionally, the video encoding device is further configured to:
[0124] Obtain a threshold setting auxiliary parameter corresponding to the current macroblock, where the threshold setting auxiliary parameter is determined according to the quantization parameter corresponding to the current macroblock;
[0125] Set the preset encoding distortion measure threshold according to the quantization parameter corresponding to the current macroblock, the macroblock size corresponding to the current macroblock, and the threshold setting auxiliary parameter.
[0126] Optionally, the video encoding device is further configured to:
[0127] Obtain a preset average deviation threshold between the original pixel value and the corresponding encoded pixel value corresponding to the current macroblock, where the preset average deviation threshold is a pixel deviation boundary value for evaluating whether the encoding distortion is obvious;
[0128] Retrieve the threshold setting auxiliary parameter corresponding to the current macroblock according to the quantization parameter of the current macroblock and the preset average deviation threshold.
[0129] Optionally, the video encoding device is further configured to:
[0130] Obtain the preset average deviation threshold corresponding to at least one target macroblock;
[0131] Calculate the threshold setting auxiliary parameter corresponding to the target macroblock according to the preset average deviation threshold corresponding to the target macroblock and the corresponding quantization parameter.
[0132] Optionally, the video encoding device is further configured to:
[0133] Calculate a coding distortion measure boundary value according to the square value of a preset average deviation threshold of the target macroblock and the macroblock size of the target macroblock, where the coding distortion measure boundary value is a boundary value for evaluating whether the coding distortion is obvious;
[0134] Calculate a ratio between the coding distortion measure boundary value and the product of the macroblock size and quantization parameter of the target macroblock to obtain the threshold setting auxiliary parameter.
[0135] Optionally, the obtaining module is further configured to:
[0136] Obtain each original pixel value corresponding to the current macroblock and each coded pixel value of the current macroblock in the first type of macroblock mode;
[0137] Calculate the sum of squared differences between each original pixel value and the corresponding coded pixel value to obtain the coding distortion measure.
[0138] The video coding device provided in this application adopts the video coding method in the above embodiment, and solves the technical problem of poor video coding effect caused by inappropriate macroblock mode selection. Compared with the prior art, the beneficial effects of the video coding device provided in the embodiments of this application are the same as those of the video coding method provided in the above embodiment, and other technical features in the video coding device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0139] An embodiment of this application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the video coding method in Embodiment 1 above.
[0140] Next, refer to Figure 3 , which shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle terminals (such as vehicle navigation terminals), etc. and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0141] As Figure 3As shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage device into the random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus.
[0142] Generally, the following systems may be connected to the I / O interface: input devices including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and a communication device. The communication device may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.
[0143] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device, or installed from the storage device, or installed from the ROM. When the computer program is executed by the processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0144] The electronic device provided by this application adopts the video encoding method in the above embodiment, and solves the technical problem of poor video encoding effect caused by inappropriate macroblock mode selection. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of this application are the same as those of the video encoding method provided by the first embodiment above, and other technical features in this electronic device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0145] It should be understood that each part of the present disclosure may be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
[0146] As described above, this is only the specific implementation manner of the present application. However, the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claimed rights.
[0147] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the video encoding method in the first embodiment above.
[0148] The computer-readable storage medium provided by the embodiments of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0149] The above computer-readable storage medium may be included in an electronic device; or it may exist separately without being assembled into the electronic device.
[0150] The above computer-readable storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to: respectively obtain a first rate-distortion cost in a first type of macroblock mode and a second rate-distortion cost in a second type of macroblock mode, where the first type of macroblock mode includes at least one of a SKIP mode and an INTER mode, and the second type of macroblock mode includes an INTRA mode; if the second rate-distortion cost is less than the first rate-distortion cost, select the second type of macroblock mode to encode the current macroblock; if the second rate-distortion cost is not less than the first rate-distortion cost, obtain a coding distortion measure of the current macroblock in the first type of macroblock mode and a preset coding distortion measure threshold corresponding to the current macroblock, where the preset coding distortion measure threshold is determined according to the quantization parameter of the current macroblock; if the coding distortion measure is less than the preset coding distortion measure threshold, select the first type of macroblock mode to encode the current macroblock; if the coding distortion measure is not less than the preset coding distortion measure threshold, select the second type of macroblock mode to encode the current macroblock.
[0151] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., by connecting through the Internet using an Internet service provider).
[0152] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0153] The modules described in the embodiments of the present disclosure can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0154] The computer-readable storage medium provided by the present application stores computer-readable program instructions for executing the above video encoding method, and solves the technical problem of poor video encoding effect caused by inappropriate macroblock mode selection. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiments of the present application are the same as those of the video encoding method provided by the above embodiments, and will not be elaborated here.
[0155] The present application also provides a computer program product, including a computer program, and the steps of the above video encoding method are implemented when the computer program is executed by a processor.
[0156] The computer program product provided by the present application solves the technical problem of poor video encoding effect caused by inappropriate macroblock mode selection. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiments of the present application are the same as those of the video encoding method provided by the above embodiments, and will not be elaborated here.
[0157] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied to other related technical fields, shall be included in the patent scope of the present application by the same token.
Claims
1. A video encoding method, characterized in that, The video encoding method includes: Calculating a first rate-distortion cost under a first type of macroblock mode and a second rate-distortion cost under a second type of macroblock mode respectively, where the first type of macroblock mode includes at least one of a SKIP mode and an INTER mode, and the second type of macroblock mode includes an INTRA mode; If the second rate-distortion cost is less than the first rate-distortion cost, select the second type of macroblock mode to encode the current macroblock; If the second rate-distortion cost is not less than the first rate-distortion cost, obtain the encoding distortion measure of the current macroblock under the first type of macroblock mode and a preset encoding distortion measure threshold corresponding to the current macroblock, where the preset encoding distortion measure threshold is determined according to the quantization parameter of the current macroblock; If the encoding distortion measure is less than the preset encoding distortion measure threshold, select the first type of macroblock mode to encode the current macroblock; If the encoding distortion measure is not less than the preset encoding distortion measure threshold, select the second type of macroblock mode to encode the current macroblock; Obtaining the preset encoding distortion measure threshold corresponding to the current macroblock includes: Obtaining the macroblock size and quantization parameter of the current macroblock; Retrieving the preset encoding distortion measure threshold corresponding to the current macroblock according to the macroblock size and the quantization parameter.
2. The video encoding method according to claim 1, wherein Before obtaining the preset encoding distortion measure threshold corresponding to the current macroblock, the video encoding method further includes: Obtaining a threshold setting auxiliary parameter corresponding to the current macroblock, where the threshold setting auxiliary parameter is determined according to the quantization parameter corresponding to the current macroblock; Setting the preset encoding distortion measure threshold according to the quantization parameter corresponding to the current macroblock, the macroblock size corresponding to the current macroblock, and the threshold setting auxiliary parameter.
3. The video encoding method according to claim 2, wherein The step of obtaining the threshold setting auxiliary parameter corresponding to the current macroblock includes: Obtaining a preset average deviation threshold between the original pixel value and the corresponding encoded pixel value of the current macroblock, where the preset average deviation threshold is a pixel deviation boundary value for evaluating whether the encoding distortion is obvious; Retrieving the threshold setting auxiliary parameter corresponding to the current macroblock according to the quantization parameter of the current macroblock and the preset average deviation threshold.
4. The video encoding method according to claim 3, wherein Before the step of obtaining the preset average deviation threshold between the original pixel value and the corresponding encoded pixel value of the current macroblock, where the preset average deviation threshold is a pixel deviation boundary value for evaluating whether the encoding distortion is obvious, the video encoding method further includes: Obtaining a preset average deviation threshold corresponding to at least one target macroblock; Calculating the threshold setting auxiliary parameter corresponding to the target macroblock according to the preset average deviation threshold corresponding to the target macroblock and the corresponding quantization parameter.
5. The video encoding method according to claim 4, wherein The step of calculating the threshold setting auxiliary parameter corresponding to the target macroblock according to the preset average deviation threshold corresponding to the target macroblock and the corresponding quantization parameter includes: Calculate a coding distortion measure boundary value according to the square value of a preset average deviation threshold of the target macroblock and the macroblock size of the target macroblock, where the coding distortion measure boundary value is a boundary value for evaluating whether the coding distortion is obvious; Calculate a ratio between the coding distortion measure boundary value and the product of the macroblock size and quantization parameter of the target macroblock to obtain the threshold setting auxiliary parameter.
6. The video encoding method according to claim 1, wherein The obtaining the coding distortion measure of the current macroblock in the first type of macroblock mode includes: Obtain each original pixel value corresponding to the current macroblock and each coded pixel value of the current macroblock in the first type of macroblock mode; Calculate the sum of squared differences between each original pixel value and the corresponding coded pixel value to obtain the coding distortion measure.
7. A video encoding device, characterized in that, The video coding apparatus includes: A rate-distortion cost obtaining module for respectively obtaining a first rate-distortion cost in a first type of macroblock mode and a second rate-distortion cost in a second type of macroblock mode, where the first type of macroblock mode includes at least one of a SKIP mode and an INTER mode, and the second type of macroblock mode includes an INTRA mode; A first macroblock mode selection module for, if the second rate-distortion cost is less than the first rate-distortion cost, selecting the second type of macroblock mode to encode the current macroblock; An obtaining module for, if the second rate-distortion cost is not less than the first rate-distortion cost, obtaining the coding distortion measure of the current macroblock in the first type of macroblock mode and a preset coding distortion measure threshold corresponding to the current macroblock, where the preset coding distortion measure threshold is determined according to the quantization parameter of the current macroblock; the obtaining module is further configured to obtain the macroblock size and quantization parameter of the current macroblock; retrieve the preset coding distortion measure threshold corresponding to the current macroblock according to the macroblock size and the quantization parameter; A second macroblock mode selection module for, if the coding distortion measure is less than the preset coding distortion measure threshold, selecting the first type of macroblock mode to encode the current macroblock; A third macroblock mode selection module for, if the coding distortion measure is not less than the preset coding distortion measure threshold, selecting the second type of macroblock mode to encode the current macroblock.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; where, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the steps of the video coding method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, A program for implementing a video coding method is stored on the computer-readable storage medium, and the program for implementing the video coding method is executed by a processor to implement the steps of the video coding method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Coding method for improving quality of B frame in H.264
CN110611819A