Quantization parameter determination method and apparatus

By updating the RQ model with the discrete parameters of the video frame to be encoded and the refresh frame, the problem of the LCEVC encoder being unable to accurately control the bitrate is solved, and the accurate setting of the quantization parameters and bitrate control of the video frame are realized.

CN116156169BActive Publication Date: 2026-05-12HISENSE VISUAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HISENSE VISUAL TECH CO LTD
Filing Date
2022-12-19
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

When using constant quantization parameters to encode video frames, the existing LCEVC encoder cannot accurately control the bitrate of the video frames, making it impossible to accurately set the quantization parameters according to the target bitrate.

Method used

By obtaining the first discrete parameter of the video frame to be encoded and the second discrete parameter of the refresh frame with the smallest interval, the reference RQ model is updated, and the quantization parameters of the video frame to be encoded are determined according to the first RQ model and the target bitrate.

Benefits of technology

It achieves accurate determination of quantization parameters of the video frame to be encoded based on the target bitrate, ensuring the accuracy of the bitrate of the video frame stream output by the LCEVC encoder.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116156169B_ABST
    Figure CN116156169B_ABST
Patent Text Reader

Abstract

Some embodiments of the present application provide a quantization parameter determination method and device, relating to the technical field of video coding. The method comprises: obtaining a to-be-encoded video; determining whether the to-be-encoded video frame is an I-frame; if not, obtaining a first dispersion parameter and a second dispersion parameter, the first dispersion parameter and the second dispersion parameter respectively representing the dispersion of pixel values of each pixel point in the to-be-encoded video frame and a reference video frame; the reference video frame is the I-frame with the minimum interval from the to-be-encoded video frame; updating a reference rate-quantization parameter (RQ) model according to the first dispersion parameter and the second dispersion parameter to obtain a first RQ model; the reference RQ model is the RQ model of the reference video frame; and determining the quantization parameter corresponding to the to-be-encoded video frame according to the first RQ model and a target rate. The method is used for accurately setting the quantization parameter corresponding to the video frame according to the target rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Some embodiments of this application relate to the field of video coding technology. More specifically, they relate to a method and apparatus for determining quantization parameters. Background Technology

[0002] High-definition (HD) and ultra-high-definition (UHD) videos are increasingly favored by the public because they offer clearer image quality and more realistic perceived quality. However, as resolution and bit depth increase, the amount of video data also increases. To improve video compression efficiency and reduce data size, the Low Complexity Enhancement Video Coding (LCEVC) standard has been proposed.

[0003] In related technologies, when encoding a video frame sequence using an LCEVC encoder, a constant quantization parameter (QP) is used to quantize and encode all video frames in the sequence. However, LCEVC encoder bitrate control requires the encoder to output a bitstream at the expected bitrate. But when the same quantization parameter is used to encode different video frames, the bitrate of the output bitstream is not the same, making it impossible to accurately control the bitrate of the corresponding video frame using the quantization parameter. Therefore, how to accurately set the quantization parameter for a video frame according to the target bitrate is a problem that urgently needs to be solved. Summary of the Invention

[0004] An exemplary embodiment of this application provides a method and apparatus for determining quantization parameters, used to accurately set the quantization parameters corresponding to video frames according to a target bitrate.

[0005] The technical solutions provided by some embodiments of this application are as follows:

[0006] Firstly, some embodiments of this application provide a method for determining quantization parameters, including:

[0007] Obtain the video to be encoded;

[0008] Determine whether the video frame to be encoded is a refresh frame. When the video frame to be encoded is not a refresh frame, the video frame to be encoded is encoded with reference to the already encoded video frame. When the video frame to be encoded is a refresh frame, the video frame to be encoded is not encoded with reference to the already encoded video frame.

[0009] If not, then obtain the first dispersion parameter and the second dispersion parameter. The first dispersion parameter and the second dispersion parameter are used to characterize the dispersion of the pixel values ​​of each pixel point in the video frame to be encoded and the reference video frame, respectively. The reference video frame is the refresh frame with the smallest interval to the video frame to be encoded.

[0010] The reference bitrate-quantization parameter RQ model is updated based on the first and second discrete parameters to obtain the first RQ model; the reference RQ model is the RQ model of the reference video frame.

[0011] The quantization parameters corresponding to the video frame to be encoded are determined based on the first RQ model and the target bit rate.

[0012] Secondly, some embodiments of this application provide a quantization parameter determination apparatus, including:

[0013] Memory, configured to store computer programs;

[0014] The processor is configured to, when a computer program is invoked, cause the means for determining the bit rate control parameters to implement the quantization parameter determination method described in the first aspect.

[0015] Thirdly, some embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a computing device, causes the computing device to implement the quantization parameter determination method described in the first aspect.

[0016] Fourthly, some embodiments of this application provide a computer program product that, when run on a computer, enables the computer to implement the quantization parameter determination method.

[0017] As can be seen from the above technical solutions, the quantization parameter determination method provided in some embodiments of this application, when determining the quantization parameters of the video frame to be encoded, firstly determines whether the video frame to be encoded is a refresh frame that is not encoded with reference to an already encoded video frame during encoding. If the video frame to be encoded is not a refresh frame, a first discreteness for characterizing the pixel values ​​of each pixel in the video frame to be encoded and a second discreteness for characterizing the pixel values ​​of each pixel in the refresh frame with the smallest interval to the video frame to be encoded are obtained. Based on the first discreteness parameter, the second discreteness parameter, and the reference RQ model of the reference frame, a first RQ model is obtained. Finally, the quantization parameters corresponding to the video frame to be encoded are determined based on the first RQ model and the target bitrate. Since the dispersion of pixel values ​​of each pixel in a video frame is directly related to the bitrate of the corresponding bitstream, some embodiments of this application can obtain the similarity between the video frame to be encoded and the refresh frame with the smallest encoding interval in the bitrate dimension based on the first dispersion parameter and the second dispersion parameter. Then, based on the similarity, the reference RQ model is updated to accurately obtain the first RQ model of the video frame to be encoded. Therefore, some embodiments of this application can accurately determine the quantization parameters corresponding to the video frame to be encoded based on the target bitrate. Attached Figure Description

[0018] To more clearly illustrate the implementation methods in some embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0019] Figure 1 A schematic diagram of a video decoder framework in some embodiments of this application is shown;

[0020] Figure 2 The following is a schematic diagram of the structure of the LCEVC encoder in some embodiments of this application;

[0021] Figure 3 The diagram illustrates the H.264 / AVC and H.265 bitrate allocation process in some embodiments of this application.

[0022] Figure 4 The following is a schematic diagram of the LCEVC encoder rate allocation process in some embodiments of this application;

[0023] Figure 5 A flowchart of a method for determining quantization parameters in some embodiments of this application is shown;

[0024] Figure 6 The graphs showing the logarithms of quantization step size and bit rate in some embodiments of this application are illustrated.

[0025] Figure 7 A flowchart of a method for determining quantization parameters in some embodiments of this application is shown;

[0026] Figure 8 A flowchart of a method for determining quantization parameters in some embodiments of this application is shown;

[0027] Figure 9 A flowchart of a method for determining quantization parameters in some embodiments of this application is shown. Detailed Implementation

[0028] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.

[0029] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0030] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0031] Reference Figure 1 The diagram shows a block diagram of a video decoding system 100 in some embodiments of this application. For example... Figure 1 As shown, the video decoding system 100 includes a source device 11 and a destination device 12. The source device 11 acquires raw video data from a video source 111, encodes the raw video data using a video encoder 112 to obtain encoded video data, and provides the encoded video data output by the video encoder 112 to the destination device 12 via an output interface 113. The destination device 12 acquires the encoded video data provided by the source device 11 via an input interface 121, decodes the encoded video data using a video decoder 122 to obtain decoded video data, and inputs the decoded video data into a player 123 to play the video. The source device 11 and the destination device 12 can include any of a wide range of devices, such as personal computers, laptops, tablets, set-top boxes, mobile phones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc.

[0032] In some embodiments, the video source 111 of the source device 11 can be a video recording device, such as a camera. In other embodiments, the video source 111 can be a component capable of generating video based on computer graphics, such as a screen recording component, an animation generation component, etc.

[0033] In some embodiments, the destination device 12 may receive video encoded data provided by the source device 11 via a computer-readable medium. The computer-readable medium may include any type of media or device capable of moving video encoded data from the source device 11 to the destination device 12. In one example, the computer-readable medium may include a communication medium. The communication medium may modulate the video encoded data according to a communication standard (e.g., a wireless communication protocol) and transmit it to the destination device 12. The communication medium may include any wireless or wired communication medium, such as radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet network (e.g., a local area network, a wide area network, or a global network, such as the Internet). The communication medium may include a router, switch, base station, or any other device that can be used to facilitate communication from the source device 11 to the destination device 12.

[0034] In some instances, video encoded data can be output from the output interface 113 of the source device 11 to a storage device. Correspondingly, video encoded data can be accessed from the storage device via the input interface 123 of the destination device 12. The storage device can comprise any of a variety of distributed or locally accessed data storage media, such as hard disk drives, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing video encoded data. In another instance, the storage device can correspond to a server or intermediate storage device capable of holding the video encoded data generated by the source device 11. The destination device 12 can obtain the stored video encoded data from the storage device via streaming or downloading. The file server can be any type of server capable of storing and transmitting encoded video data to the destination device 12. In some embodiments, the file server includes a web server (e.g., for a website), an FTP server, a network-attached storage device, or a local disk drive. The destination device 12 can access the encoded video data via any standard data connection, including an Internet connection. This may include a wireless channel (e.g., Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both suitable for accessing encoded video data stored on a file server. Transmission of encoded video data from the storage device may be streaming transmission, download transmission, or a combination thereof.

[0035] As mentioned above, video encoding can be understood as the process of compressing video data, and video decoding can be understood as the process of restoring compressed video data. The video encoder 112 can be understood as a set of standard rules in the video data compression process, and the video decoder 122 can be understood as a set of standard rules in the video data restoration process. In general, the video decoder 122 needs to use a decoding method that corresponds to the encoding method used by the video encoder 121 in order to correctly decode the video data.

[0036] Currently, video coding standards have evolved from the initial ISO / IEC MPEG-1, through ISO / IEC MPEG-2, ISO / IEC MPEG-4, Advanced Video Coding (AVC), High Efficiency Video Coding (HEVC), and finally to Versatile Video Coding (VVC) and HEVC. Although some embodiments in this application are described within the context of the HEVC standard, those skilled in the art will understand that the video coding and decoding methods provided in this application are applicable to any suitable video decoding standard.

[0037] The quantization parameter determination method provided in some embodiments of this application is used to determine the quantization parameters when encoding video frames based on the LCEVC encoder, and to control the LCEVC encoder to encode video frames according to the quantization parameters corresponding to the video frames, so that the bit rate of the video frame bitstream output by the LCEVC encoder is the target bit rate. Therefore, the structure of the LCEVC encoder is first described below.

[0038] Reference Figure 2 As shown, the LCEVC encoder includes: a first downsampling layer 21, a second downsampling layer 22, a basic coding layer 23, a first upsampling layer 24, a first enhancement layer 25, a restoration layer 26, a fusion layer 27, a second upsampling layer 28, and a second enhancement layer 29.

[0039] The first downsampling layer 21 is used to downsample the video frames to be encoded in order to reduce the resolution of the video frames to be encoded.

[0040] The second downsampling layer 22 is used to further downsample the output of the first downsampling layer 21 to further reduce the resolution of the video frame to be encoded.

[0041] The basic coding layer 23 is used to encode the output of the second downsampling layer 22 through the basic layer encoder to generate the bitstream of the basic coding layer 23. It should be noted that the basic layer encoder can be any encoder, such as: Advanced Video Coding (AVC), High Efficiency Video Coding (HEVC) encoder, Versatile Video Coding (VVC) encoder, etc.

[0042] The first upsampling layer 24 is used to upsample the coded reconstructed image of the basic coding layer 23 to improve the resolution of the coded reconstructed image of the basic coding layer 23.

[0043] The first enhancement layer 25 is used to calculate the residual (L1 residual) between the output of the first downsampling layer 21 and the output of the first upsampling layer 24, and to perform transformation, quantization and entropy encoding on the L1 residual in sequence to obtain the L1 enhancement coefficient.

[0044] The restoration layer 26 is used to sequentially perform inverse quantization, inverse transformation, and filtering on the data obtained by quantization from the first enhancement layer 25, as well as to obtain the output of the restoration layer 26.

[0045] The fusion layer 27 is used to add and fuse the output of the restoration layer 26 and the output of the first upsampling layer 24 to obtain the output of the fusion layer 27.

[0046] The second upsampling layer 28 is used to upsample the output of the fusion layer 27 to improve the resolution of the image output by the fusion layer 17.

[0047] The second enhancement layer 29 is used to calculate the residual (L2 residual) between the output of the second upsampling layer 28 and the original video frame to be encoded, and to sequentially perform temporal prediction, transformation, quantization and entropy coding on the L2 residual to obtain the L2 enhancement coefficients.

[0048] The quantization control parameters of the basic coding layer 23, the first enhancement layer 25, and the second upsampling layer 28 together constitute the rate control parameters of the LCEVC encoder. The encoding process of the LCEVC encoder can be described by the following formula:

[0049] out=E2(E1(E0(x,BaseRate),W1),W2)

[0050] Where x represents the input of the LCEVC encoder; out represents the output of the LCEVC encoder; E2, E1 and E0 represent the encoding functions of the second upsampling layer 28, the first enhancement layer 25 and the basic coding layer 23, respectively; BaseRate, SW1 and SW2 represent the bit rate control parameters of the basic coding layer 23, the first enhancement layer 25 and the second upsampling layer 28, respectively.

[0051] As described above, the LCEVC encoder's encoding process for a video frame includes: quantization when the basic coding layer generates the basic bitstream, quantization of the L1 residual by the first enhancement layer 25, and quantization of the L1 residual by the second enhancement layer 29. All three quantizations require the control of quantization parameters and all affect the bitrate of the final generated bitstream. Therefore, some embodiments of this application determine that the quantization parameters can control one or more of the three quantizations of the LCEVC encoder to achieve final bitrate control.

[0052] Currently, the enhancement layer in the LCEVC reference encoder lacks a rate control algorithm, using a constant quantization parameter for the entire video frame sequence, thus failing to accurately control the output bitrate. To address this issue, an RQ model needs to be constructed, and the more accurate the RQ model, the more accurate the rate control.

[0053] Several RQ models already exist in video coding standards such as H.264 / Advanced Video Coding (AVC) and H.265. For example... Figure 3 As shown, the process from bitrate allocation to obtaining the final actual bitrate in coding standards such as H.264 / AVC and H.265 includes:

[0054] S31. Allocate the bitrate step by step according to the expected total bitrate, starting from the video frame sequence (Group of Pictures, GOP), video frame, and image block.

[0055] The implementation of step S31 (allocating bitrate step by step according to the expected total bitrate, starting from GOP, video frames, and image blocks) may include: first, allocating a constant bitrate to each GOP based on the target bitrate requirement; then, allocating a bitrate to each video frame in the GOP based on the number of video frames in the GOP and the bitrate allocated to the GOP; and finally, allocating a bitrate to each image block based on the bitrate of the video frame and the size and number of image blocks in the video frame. It should be noted that the target bitrate allocated in step S31 is not the final bitrate of the encoded stream. During the actual encoding process, the bitrates of GOPs, video frames, and image blocks will be dynamically adjusted based on the bitrate consumption during the actual encoding process.

[0056] S32. Preliminary quantitative parameters are obtained through prediction.

[0057] In some embodiments, the quantization parameters of a video frame or image block can be calculated based on the RQ model and the bitrate allocated to the video frame or image block. That is, the bitrate allocated to the video frame or image block is substituted into the RQ model to calculate the quantization parameters corresponding to the video frame or image block. The initial quantization parameters are not directly used for quantization encoding, but need to be dynamically adjusted according to the bitrate consumption during the actual encoding process.

[0058] S33. Perform actual encoding based on quantization parameters. The encoding process involves the selection of various blocks and encoding modes.

[0059] That is, in actual encoding, the GOP first needs to be split into individual video frames, and then the split video frames are input into the encoder one by one. After receiving the video frames, the encoder needs to divide the video frames into image blocks, and then select the corresponding encoding mode for encoding according to the characteristics of the divided image blocks.

[0060] S34. The final actual coding rate is obtained by Lagrange optimization.

[0061] Bitrate allocation is essentially a Lagrange-constrained problem of finding the extreme value. That is, the bitrate allocated to a GOP is a constant G, N. I N B N P T represents the number of I-frames, B-frames, and P-frames in a GOP, respectively. I T B T P Let represent the average bitrate allocated to I-frames, B-frames, and P-frames. Then the Lagrange constraint is:

[0062] N I *T I +N B *T B +N P *T P =G

[0063] To minimize distortion under the above constraints, we need to minimize the value of the following expression:

[0064]

[0065] Among them, Q I Q B Q P Let T represent the average quantization parameters of I-frame, B-frame, and P-frame, respectively, and T... t *Q t =X t t = I, P, B, X t It is a constant, specifically used for complexity estimation of I-frames, B-frames, and P-frames.

[0066] In general, T in actual calculations t It can be simplified to the following formula:

[0067] T t =X t G / ∑K t X t N t

[0068] Among them, K t It is a constant.

[0069] In addition, to fully consider the encoding of the previous frame, a linear feedback mechanism needs to be introduced to limit the bitrate allocated to the nth frame of type t to T. t,n Specifically:

[0070]

[0071] Among them, T prev The bitrate used in the previous frame.

[0072] Furthermore, to ensure minimum quality requirements, T was also specified. t,n The following restrictions were imposed:

[0073] T t,n =max(R / 8F,(1-λ)X) t,n-1 G / ∑X t,n-1 N t +aT prev

[0074] Where F is the frame rate.

[0075] Based on all the above constraints, to ensure that the encoded image buffer neither overflows nor underflows, the bitrate allocated to each video frame satisfies the following formula:

[0076]

[0077] Where β is a constant. For example, β = 0.9.

[0078] like Figure 4 As shown, in the LCEVC standard, the process from step-by-step rate allocation to the final encoded rate includes:

[0079] S41. Allocate the bitrate step by step according to the expected total bitrate, starting from the video frame sequence (Group of Pictures, GOP) and then the video frame order.

[0080] The implementation of step S41 is similar to that of step S31 above, except that the smallest granularity of bitrate allocation is the video frame, and there is no need to allocate bitrate to the image blocks of the video frame.

[0081] S42. Determine the quantization parameters.

[0082] Similarly, the bitrate allocated to the video frame is substituted into the RQ model to calculate the quantization parameters corresponding to the video frame. Unlike encoding standards such as H.264 / AVC and H.265, the quantization parameters determined here are directly used for quantization encoding without requiring dynamic adjustment.

[0083] S43, Encode to obtain the bitrate.

[0084] The biggest difference from encoding standards such as H.264 / AVC and H.265 is that the bitrate obtained here is the actual bitrate of the encoded bitstream, which is the accurate bitrate rather than the bitrate obtained based on Lagrange optimization.

[0085] As mentioned above, the LCEVC standard does not allocate bitrate for image blocks; therefore, the smallest granularity of bitrate allocation is the video frame. After the bitrate of a video frame is determined, a specific quantization parameter is predicted based on the bitrate of the video frame, and the accurate bitrate is obtained by encoding based on the predicted quantization parameter.

[0086] The LCEVC standard differs from H.264 / AVC and H.265 in two aspects regarding bitrate allocation. First, the granularity of bitrate allocation: H.264 / AVC and H.265 allocate bitrate at the image block level, while LCEVC allocates it at the video frame level. Second, after determining the quantization parameters, H.264 / AVC and H.265 require a complex mode selection encoding process, while LCEVC does not.

[0087] Based on the first difference, because H.264 / AVC and H.265 divide video frames into multiple image blocks and encode them separately, a single video frame contains a large number of image blocks. Different image blocks within the same video frame can be encoded using different quantization parameters. Even if some image blocks are assigned an inaccurate bitrate, subsequent image blocks can be allocated the remaining bitrate, thus maintaining a stable bitrate for the final video frame. However, in the LCEVC standard, since the smallest granularity of bitrate allocation is the video frame (meaning each video frame has only one quantization parameter), inaccurate quantization parameter prediction leads to significant bitrate fluctuations between video frames, resulting in substantial quality variations. Therefore, compared to H.264 / AVC and H.265, the LCEVC standard requires more accurate prediction of quantization parameters.

[0088] Based on the second difference, since the LCEVC standard's encoding process does not involve a complex mode selection process and is relatively simple, the time complexity will not increase significantly even with multiple quantizations under the LCEVC standard.

[0089] Since the LCEVC standard requires more accurate prediction of quantization parameters compared to H.264 / AVC and H.265, and the time complexity of multiple quantizations under the LCEVC standard does not increase significantly, some embodiments of this application propose a scheme to improve the accuracy of the final bit rate by using multiple quantizations.

[0090] Based on the above, some embodiments of this application provide a method for determining quantitative parameters, referring to... Figure 5 As shown, the method for determining the quantization parameters includes the following steps S51 to S54:

[0091] S51. Obtain the video to be encoded.

[0092] In some embodiments, each video frame of the video to be encoded can be input into the encoder sequentially, so that the encoder treats each video frame of the video to be encoded as the video to be encoded one by one.

[0093] S52. Determine whether the video frame to be encoded is a refresh frame.

[0094] Specifically, when the video to be encoded is not a refreshed frame, the video to be encoded is encoded with reference to the already encoded video frame; when the video to be encoded is a refreshed frame, the video to be encoded is not encoded with reference to the already encoded video frame.

[0095] Specifically, during video encoding, if all video frames are encoded with reference to an already encoded video frame preceding them, an encoding error in any one video frame will cause encoding errors in all subsequent video frames, resulting in extremely low fault tolerance. To address this issue, during actual video encoding, one or more special video frames are designated in the video frame sequence. When the video encoder encodes a designated special video frame, it clears the cached reference data, thereby preventing previous encoding errors from propagating to subsequent video frames. This clearing of the cached reference data and the absence of reference frames during encoding are what are referred to as refresh frames in some embodiments of this application.

[0096] In some embodiments, the refresh frame can be the first video frame of each video frame sequence. When the refresh frame is the first video frame of each video frame sequence, the above step S51 (determining whether the video frame to be encoded is a refresh frame) includes: determining whether the video frame to be encoded is the first video frame of the current video frame sequence; if yes, then determining that the video frame to be encoded is the refresh frame; if no, then determining that the video frame to be encoded is not the refresh frame.

[0097] In some embodiments, a refresh frame can be set at a preset number of video frames. When a refresh frame is set at a preset number of video frames, the above step S51 (determining whether the video frame to be encoded is a refresh frame) includes: determining whether the interval between the video frame to be encoded and the previous refresh frame reaches a preset number; if yes, then determining that the video frame to be encoded is the refresh frame; if no, then determining that the video frame to be encoded is not the refresh frame.

[0098] Of course, refresh frames in video frames can also be specified in other ways, and each video frame to be encoded can be determined in a corresponding way. Some embodiments of this application do not limit this, and the determination of whether each video frame is a refresh frame shall prevail.

[0099] In step S52 above, if the video frame to be encoded is not the refresh frame, then steps S53 to S55 are executed.

[0100] S53. Obtain the first dispersion parameter and the second dispersion parameter.

[0101] Wherein, the first discrete parameter and the second discrete parameter are used to characterize the discreteness of the pixel values ​​of each pixel point in the video frame to be encoded and the reference video frame, respectively; the reference video frame is the refresh frame with the smallest interval from the video frame to be encoded.

[0102] In some embodiments, the first dispersion parameter may be the variance of the pixel values ​​of each pixel in the video frame to be encoded, and the second dispersion parameter may be the variance of the pixel values ​​of each pixel in the reference video frame.

[0103] In some embodiments, the first dispersion parameter may be the standard deviation of the pixel values ​​of each pixel in the video frame to be encoded, and the second dispersion parameter may be the standard deviation of the pixel values ​​of each pixel in the reference video frame.

[0104] Of course, the first dispersion parameter and the second dispersion parameter can also be other parameters that characterize the dispersion of pixel values ​​of each pixel in the video frame to be encoded, such as range, coefficient of variation, etc. Some embodiments of this application do not limit this, and the first dispersion parameter is used as the standard that it can characterize the dispersion of pixel values ​​of each pixel in the video frame to be encoded, and the first dispersion parameter can characterize the dispersion of pixel values ​​of each pixel in the reference video frame.

[0105] The entropy coding method used in the LCEVC standard is run-length encoding. Run-length encoding is an arithmetic coding method; for example, the string "aaabccddddd" can be represented as "3a1b2c5d" after run-length encoding. Since run-length encoding is closely related to data distribution, the more concentrated the pixel values ​​of a video frame (the lower the dispersion), the higher the encoding efficiency. Therefore, in this embodiment, a first dispersion parameter, which characterizes the dispersion of pixel values ​​in each pixel of the video frame to be encoded, is obtained as the basis for updating the RQ model.

[0106] S54. Update the reference rate-quantization parameter (QP) model according to the first discrete parameter and the second discrete parameter to obtain the first RQ model.

[0107] The reference RQ model is the RQ model of the reference video frame.

[0108] The RQ model for video frames will be explained below.

[0109] Reference Figure 6 As shown, Figure 6 This is a graph showing the logarithm of the quantization step size and bit rate for the quantization parameters of video frames 1 to 4. Figure 6 As shown, the quantization parameter and the logarithm of the bitrate exhibit a linear relationship, meaning the relationship between the quantization parameter and the bitrate is logarithmic. Furthermore, from... Figure 6 It can be seen that the relationship between quantization parameters and bitrate is different for different video frames (for example: Figure 6 (The curve 61 corresponding to video frame 1 and the curve 62 corresponding to video frame 2 do not overlap). Therefore, different linear parameters need to be used to fit the logarithm of the quantization parameter and the bitrate based on the content of the video frame. The final linear equation Q = λlnR + γ obtained by fitting the logarithm of the quantization parameter and the bitrate is the RQ model of the video frame.

[0110] The linear equation Q = λlnR + γ includes two parameters: the slope (λ) and the intercept (γ). Therefore, updating the reference RQ model based on the first and second dispersion parameters to obtain the first RQ model includes: updating the slope and / or intercept of the reference RQ model based on the first and second dispersion parameters to obtain the first RQ model.

[0111] S55. Determine the quantization parameters corresponding to the video frame to be encoded based on the first RQ model and the target bit rate.

[0112] In some embodiments, step S55 (determining the quantization parameters corresponding to the video frame to be encoded based on the first RQ model and the target bitrate) includes: substituting the target bitrate into the first RQ model to calculate the quantization parameters corresponding to the video frame to be encoded.

[0113] The quantization parameter determination method provided in some embodiments of this application, when determining the quantization parameters of a video frame to be encoded, first determines whether the video frame to be encoded is a refresh frame encoded with reference to an already encoded video frame. If the video frame to be encoded is not a refresh frame, it obtains a first dispersion of pixel values ​​representing each pixel in the video frame to be encoded, and a second dispersion of pixel values ​​representing each pixel in the refresh frame with the smallest interval to the video frame to be encoded. Based on the first dispersion parameter, the second dispersion parameter, and the reference RQ model of the reference frame, it obtains a first RQ model, and then determines the quantization parameters corresponding to the video frame to be encoded based on the first RQ model and the target bitrate. Since the dispersion of pixel values ​​in a video frame is directly related to the bitrate of the corresponding bitstream, some embodiments of this application can obtain the similarity of the video frame to be encoded and the refresh frame with the smallest interval in the bitrate dimension based on the first dispersion parameter and the second dispersion parameter. Then, based on the similarity, it updates the reference RQ model to accurately obtain the first RQ model of the video frame to be encoded. Therefore, some embodiments of this application can accurately determine the quantization parameters corresponding to the video frame to be encoded based on the target bitrate.

[0114] As an extension and refinement of the above embodiments, some embodiments of this application provide another method for determining quantitative parameters, see below. Figure 7 As shown, the method for determining the quantization parameters includes the following steps S701 to S708:

[0115] S701, Obtain the video to be encoded.

[0116] S702. Determine whether the video frame to be encoded is a refresh frame.

[0117] Specifically, when the video to be encoded is not a refreshed frame, the video to be encoded is encoded with reference to the already encoded video frame; when the video to be encoded is a refreshed frame, the video to be encoded is not encoded with reference to the already encoded video frame.

[0118] The implementation methods for obtaining and determining whether the video frame to be encoded is a refresh frame in steps S701 and S702 are the same as those in steps S51 and S52. To avoid redundancy, they will not be explained in detail here.

[0119] In step S702 above, if the video frame to be encoded is not a refresh frame, then proceed to the next steps S703 to S709.

[0120] S703. Calculate the variance of the pixel values ​​of each pixel in the video frame to be encoded to obtain the first dispersion parameter.

[0121] In some embodiments, the variance of the pixel values ​​of each pixel in the video frame to be encoded can be calculated using the following formula:

[0122]

[0123] in, Let X be the variance of the pixel values ​​of each pixel in the video frame to be encoded, μ be the pixel value of each pixel in the video frame to be encoded, and N be the number of pixels in the video frame to be encoded (the resolution of the video frame to be encoded).

[0124] S704. Calculate the variance of the pixel values ​​of each pixel in the reference video frame to obtain the second dispersion parameter.

[0125] The implementation of step S704 is similar to that of step S703 above, and will not be described in detail here.

[0126] S705. Obtain the first slope based on the first dispersion parameter, the second dispersion parameter, and the slope of the reference RQ model.

[0127] In some embodiments, step S705 (obtaining the first slope based on the first dispersion parameter, the second dispersion parameter, and the slope of the reference RQ model) includes the following steps 705a to 705c:

[0128] Step 705a: Calculate the difference between the second discrete parameter and the first discrete parameter to obtain the first calculated value.

[0129] Let the first calculated value be denoted as m, and the second dispersion parameter be denoted as... The second dispersion parameter is denoted as Then we have:

[0130]

[0131] Step 705b: Calculate the ratio of the first calculated value to the second discreteness parameter to obtain the second calculated value.

[0132] Let the second calculated value be denoted as n, then we have:

[0133]

[0134] Step 705c: Calculate the product of the second calculated value and the slope of the reference RQ model to obtain the first slope.

[0135] Let the first slope be denoted as λ. i Let the slope of the reference RQ model be denoted as λ0, then we have:

[0136]

[0137] S706. Update the intercept of the reference RQ model according to the first discrete parameter and the second discrete parameter to obtain the first intercept.

[0138] In some embodiments, step S706 (updating the intercept of the reference RQ model based on the first dispersion parameter and the second dispersion parameter to obtain the first intercept) includes the following steps 706a to 706c:

[0139] Step 706a: Calculate the difference between the second discrete parameter and the first discrete parameter to obtain the first calculated value.

[0140] Similarly, let the first calculated value be denoted as m, and the second dispersion parameter be denoted as... The second dispersion parameter is denoted as Then we have:

[0141]

[0142] Step 706b: Calculate the ratio of the first calculated value to the second discreteness parameter to obtain the second calculated value.

[0143] Similarly, if we denote the second calculated value as n, then we have:

[0144]

[0145] Step 706c: Calculate the product of the second calculated value and the intercept of the reference RQ model to obtain the first intercept.

[0146] Let the first slope be denoted as γ. i Let the slope of the reference RQ model be denoted as γ0, then:

[0147]

[0148] S707. Generate the first RQ model based on the first slope and the first intercept.

[0149] That is, the first RQ model is: Q = λ i lnR+γ i Wherein, λ i γ is the first slope.i This is the first intercept.

[0150] S708. Determine the quantization parameters corresponding to the video frame to be encoded based on the first RQ model and the target bit rate.

[0151] In some embodiments, the target bit rate can be substituted into the first RQ model Q = λ i lnR+γ i The quantization parameters corresponding to the target bit rate are calculated, and the calculated quantization parameters are determined as the quantization parameters corresponding to the video frame to be encoded.

[0152] S709. The LCEVC encoder is controlled to encode the video frame to be encoded using the quantization parameters corresponding to the video frame to be encoded, so as to obtain the encoded data of the video frame to be encoded.

[0153] Although the RQ models of different video frames differ, the content of video frames that are temporally close in a video frame sequence is similar. Therefore, the RQ models of temporally close video frames also have a certain degree of similarity. The above embodiment is based on the similarity of the RQ models of temporally close video frames. It uses the variance of each pixel value to quantify the similarity between adjacent frames, and then predicts the RQ model of another video frame based on the RQ model of one video frame and the variance of each pixel value. Therefore, the above example can avoid constructing an independent RQ model for each video frame, thereby reducing the amount of computation in the encoding process of the video frame sequence.

[0154] Since the quantization parameters corresponding to the video frame to be encoded are obtained based on the target bitrate and the first RQ model, the bitrate of the bitstream obtained by controlling the LCEVC encoder to encode the video frame to be encoded through the quantization parameters corresponding to the video frame to be encoded is the target bitrate or close to the target bitrate.

[0155] Some embodiments of this application provide another method for determining quantization parameters, see below. Figure 8 As shown, the method for determining the quantization parameters includes the following steps S801 to S806:

[0156] S801, Obtain the video to be encoded.

[0157] S802. Determine whether the video frame to be encoded is a refresh frame.

[0158] Specifically, when the video to be encoded is not a refreshed frame, the video to be encoded is encoded with reference to the already encoded video frame; when the video to be encoded is a refreshed frame, the video to be encoded is not encoded with reference to the already encoded video frame.

[0159] The implementation methods for obtaining and determining whether the video frame to be encoded is a refresh frame in steps S801 and S802 are the same as those in steps S51 and S52. To avoid redundancy, they will not be explained in detail here.

[0160] In step S802 above, if it is determined that the frame is a refresh frame, the following steps S904 to S806 are executed:

[0161] S803. The LCEVC encoder is controlled to encode the video frame to be encoded by the first quantization parameter and the second quantization parameter respectively, and the first bit rate corresponding to the first quantization parameter and the second bit rate corresponding to the second quantization parameter are obtained.

[0162] As mentioned above, the RQ model is a linear equation Q = λlnR + γ. Therefore, only the slope λ and intercept γ need to be determined to obtain an accurate RQ model. To obtain these two parameters, some embodiments of this application employ the following method: arbitrarily select two unequal quantization parameters (first quantization parameter and second quantization parameter), and use an LCEVC encoder to encode video frames (transform, quantization, entropy coding) to obtain the bitrates (first bitrate and second bitrate) of the bitstreams encoded based on these two quantization parameters. Then, construct a linear equation in two variables based on the first quantization parameter, the second quantization parameter, the first bitrate, and the second bitrate to solve for λ and γ in the linear equation Q = λlnR + γ.

[0163] S804. Obtain the second RQ model based on the first quantization parameter, the second quantization parameter, the first bit rate, and the second bit rate.

[0164] In some embodiments, the first quantization parameter and the first bit rate can be substituted into the linear equation Q = λlnR + γ, and the second quantization parameter and the second bit rate can be substituted into the linear equation Q = λlnR + γ to obtain a two-variable linear equation, and the two two-variable linear equations can be solved to obtain the values ​​of λ and γ.

[0165] S805. Determine the quantization parameters corresponding to the video frame to be encoded based on the second RQ model and the target bit rate.

[0166] That is, the target bitrate is substituted into the second RQ model to obtain the quantization parameters corresponding to the target bitrate, and the quantization parameters corresponding to the target bitrate are determined as the quantization parameters corresponding to the video frame to be encoded.

[0167] S806. Control the LCEVC encoder to encode the video frame to be encoded using the quantization parameters corresponding to the video frame to be encoded, so as to obtain the encoded data of the video frame to be encoded.

[0168] In the above embodiment, when the video frame to be encoded is a refresh frame, two unequal quantization parameters are selected for quantization, and then entropy coding is performed to obtain the bitrates corresponding to the two unequal quantization parameters. Then, based on the two unequal quantization parameters and the bitrates corresponding to the two unequal quantization parameters, the RQ model corresponding to the video frame to be encoded is accurately constructed. Therefore, the above embodiment can independently construct the RQ model corresponding to the video frame to be encoded, and then accurately set the quantization parameters of the video frame to be encoded based on the RQ model corresponding to the video frame to be encoded and the target bitrate.

[0169] Some embodiments of this application provide another method for determining quantization parameters, see below. Figure 9 As shown, the method for determining the quantization parameters includes the following steps S901 to S913:

[0170] S901. Obtain the video to be encoded.

[0171] S902. Determine whether the video frame to be encoded is a refresh frame.

[0172] Specifically, when the video to be encoded is not a refreshed frame, the video to be encoded is encoded with reference to the already encoded video frame; when the video to be encoded is a refreshed frame, the video to be encoded is not encoded with reference to the already encoded video frame.

[0173] The implementation methods for obtaining and determining whether the video frame to be encoded is a refresh frame in steps S901 and S902 are the same as those in steps S51 and S52. To avoid redundancy, they will not be explained in detail here.

[0174] In step S902 above, if it is determined that the frame is a refresh frame, the following steps S903 to S907 are executed:

[0175] S903. The LCEVC encoder is controlled to encode the video frame to be encoded by the first quantization parameter and the second quantization parameter respectively, and the first bit rate corresponding to the first quantization parameter and the second bit rate corresponding to the second quantization parameter are obtained.

[0176] The implementation method and principle of step S903 are the same as those of step S904 above. To avoid redundancy, they will not be described in detail here.

[0177] S904. Obtain the second slope based on the first quantization parameter, the second quantization parameter, the common logarithm of the first bit rate (common logarithm / Briggs logarithm), and the common logarithm of the second bit rate.

[0178] Specifically, the common logarithm in this application embodiment refers to the logarithm with base 10. For example, the common logarithm of the first code rate is the logarithm with base 10 and the first code rate as the true number. Let the first code rate be R1, and the common logarithm of the first code rate be L1, then L1 = log 10 R1 = lnR1.

[0179] In some embodiments, step S904 obtains the second slope based on the first quantization parameter, the second quantization parameter, the common logarithm of the first bit rate, and the common logarithm of the second bit rate, including the following steps 904a to 904c:

[0180] Step 904a: Calculate the difference between the second quantization parameter and the first quantization parameter to obtain the third calculated value.

[0181] Let the first quantization parameter be denoted as Q1, the second quantization parameter as Q2, and the third calculated value as a, then we have:

[0182] a = Q2 - Q1

[0183] Step 904b: Calculate the difference between the common logarithm of the first bit rate and the common logarithm of the second bit rate to obtain the fourth calculated value.

[0184] Let the first bitrate be denoted as R1, the second bitrate as R2, and the fourth calculated value as b, then we have:

[0185] b = lnR2 - lnR1

[0186] Step 904c: Calculate the ratio of the third calculated value to the fourth calculated value to obtain the second slope.

[0187] Let the second slope be denoted as λ. j Then we have:

[0188]

[0189] S905. Obtain the second intercept based on the second slope, the first quantization parameter, and the common logarithm of the first bit rate.

[0190] In some embodiments, step S905 (obtaining the second intercept based on the second slope, the first quantization parameter, and the common logarithm of the first code rate) includes the following steps 905a and 905b:

[0191] Step 905a: Calculate the product of the second slope and the common logarithm of the first code rate to obtain the fifth calculated value.

[0192] Let the fifth calculated value be denoted as c, then we have:

[0193] c = λ j *lnR1

[0194] Step 905b: Calculate the difference between the first quantization parameter and the fifth calculated value to obtain the second intercept.

[0195] Let the second intercept be γ j Then we have:

[0196] γ j =Q1-c=Q1-λ j *lnR1

[0197] S906. Generate the second RQ model based on the second slope and the second intercept.

[0198] That is, the second RQ model is:

[0199]

[0200] S907. Determine the quantization parameters corresponding to the video frame to be encoded based on the second RQ model and the target bit rate.

[0201] In step S902 above, if the video frame to be encoded is not a refresh frame, then proceed to the next steps S908 to S913.

[0202] S908. Calculate the variance of the pixel values ​​of each pixel in the video frame to be encoded to obtain the first dispersion parameter.

[0203] S909. Calculate the variance of the pixel values ​​of each pixel in the reference video frame to obtain the second dispersion parameter.

[0204] The reference video frame is the refresh frame with the smallest interval to the video frame to be encoded.

[0205] S910. Obtain the first slope based on the first discreteness parameter, the second discreteness parameter, and the slope of the reference RQ model.

[0206] S911. Obtain the first intercept based on the first discrete parameter, the second discrete parameter, and the intercept of the reference RQ model.

[0207] S912. Generate the first RQ model based on the first slope and the first intercept.

[0208] S913. Determine the quantization parameters corresponding to the video frame to be encoded based on the first RQ model and the target bit rate.

[0209] The implementation methods of steps S908 to S913 above are the same as Figure 7The implementation methods of steps S703 to S708 in the illustrated embodiment are the same, and will not be described in detail here to avoid redundancy.

[0210] Regardless of whether the quantization parameters corresponding to the video frame to be encoded are obtained through step S907 (determining the quantization parameters corresponding to the video frame to be encoded based on the second RQ model and the target bitrate) or step S913 (determining the quantization parameters corresponding to the video frame to be encoded based on the first RQ model and the target bitrate), the following step S914 is executed.

[0211] S914. The LCEVC encoder is controlled to encode the video frame to be encoded using the quantization parameters corresponding to the video frame to be encoded, so as to obtain the encoded data of the video frame to be encoded.

[0212] In the above embodiments, whether the video frame to be encoded is a refreshed frame or a non-refreshed frame, the RQ model of the video frame to be encoded can be accurately obtained. Then, based on the RQ model corresponding to the video frame to be encoded and the target bitrate, the quantization parameters of the video frame to be encoded can be accurately set. The LCEVC encoder is controlled to encode the video frame to be encoded through the quantization parameters corresponding to the video frame to be encoded, so as to obtain encoded data with a bitrate of the target bitrate.

[0213] When the LCEVC encoder is configured as LTM, the encoder of the basic coding layer of the LCEVC encoder is x264, the refresh period is set to 3, 5, and 10, and the target bitrate is set to 100, 300, and 500, respectively. Tables 1 and 2 below show the encoding results of the video sequences BasketballDrive_1920x1080 and Fourpeople_1280x720 at different target bitrates. The target bitrate and actual bitrate in the tables are in kbit / s.

[0214] Table 1

[0215]

[0216] Table 2

[0217]

[0218] As can be seen from Tables 1 and 2 above, the quantization parameters determined by the quantization parameter determination method provided in the embodiments of this application can make the actual bitrate the same as the target bitrate with relatively accurate results. Therefore, some embodiments of this application can accurately determine the quantization parameters corresponding to the video frame to be encoded based on the target bitrate.

[0219] Furthermore, as can be seen from Tables 1 and 2 above, the shorter the refresh cycle, the smaller the bitrate deviation, and the larger the target bitrate, the smaller the bitrate deviation. Therefore, in practical use, the refresh cycle can be set according to the requirements for bitrate deviation and the target bitrate, so that the actual bitrate deviation meets the requirements.

[0220] It should also be noted that the shorter the refresh cycle, the higher the accuracy of the RQ model prediction. However, each refresh cycle requires two encodings to obtain the corresponding RQ model, which introduces additional computational overhead. Therefore, in practical applications, to balance accuracy and computational overhead, some embodiments of this application propose a strategy of periodic refresh and partial update. On the one hand, periodic refresh ensures that errors do not accumulate too much, causing excessive deviations in subsequent encodings. On the other hand, partial update utilizes the similarity between frames that are close in the temporal domain to predict the parameters of the RQ model. The parameters of the RQ model are adaptively adjusted, improving the accuracy of the RQ model. The reason why partial update uses variance information as the basis for update is that entropy coding uses run-length encoding, which is sensitive to the probability distribution of characters. Therefore, when the variance is small, the encoding efficiency is often higher, resulting in a lower bitrate.

[0221] Based on the same inventive concept, as an implementation of the above method, some embodiments of this application also provide a quantization parameter determination device. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment, but it should be clear that the quantization parameter determination device in this embodiment can correspondingly implement all the contents of the aforementioned method embodiment. In some embodiments, the quantization parameter determination device includes: a memory configured to store a computer program; and a processor configured to, when the computer program is invoked, cause the device for determining the bit rate control parameter to implement the quantization parameter determination method described in any of the above embodiments.

[0222] In some embodiments, this application provides a computer-readable storage medium storing a computer program that, when executed by a computing device, causes the computing device to implement the quantization parameter determination method described in any of the above embodiments.

[0223] In some embodiments, this application provides a computer program product that, when run on a computer, enables the computer to implement the quantization parameter determination method described in any of the above embodiments.

[0224] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0225] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.

Claims

1. A method for determining quantization parameters, characterized in that, Applied to LCEVC encoders, including: Obtain the video to be encoded; Determine whether the video frame to be encoded is a refresh frame. A refresh frame is a video frame that is not referenced by an already encoded video frame during encoding. When the video to be encoded is not a refresh frame, the video to be encoded is encoded with reference to an already encoded video frame. When the video to be encoded is a refresh frame, the video to be encoded is not encoded with reference to an already encoded video frame. If the video frame to be encoded is not a refresh frame, then a first dispersion parameter and a second dispersion parameter are obtained. The first dispersion parameter and the second dispersion parameter are used to characterize the dispersion of the pixel values ​​of each pixel point in the video frame to be encoded and the reference video frame, respectively. The reference video frame is the refresh frame with the smallest interval to the video frame to be encoded. The first RQ model is obtained by updating the reference bitrate-quantization parameter RQ model based on the first and second discrete parameters; the reference bitrate-quantization parameter RQ model is the RQ model of the reference video frame; The quantization parameters corresponding to the video frame to be encoded are determined based on the first RQ model and the target bit rate.

2. The method according to claim 1, characterized in that, The process of obtaining the first dispersion parameter includes: Calculate the variance of the pixel values ​​of each pixel in the video frame to be encoded to obtain the first discreteness parameter.

3. The method according to claim 1, characterized in that, The step of updating the reference code rate-quantization parameter RQ model based on the first discrete parameter and the second discrete parameter to obtain the first RQ model includes: The slope of the reference code rate-quantization parameter RQ model is updated based on the first discrete parameter and the second discrete parameter to obtain the first slope; The intercept of the reference bitrate-quantization parameter RQ model is updated based on the first discrete parameter and the second discrete parameter to obtain the first intercept; The first RQ model is generated based on the first slope and the first intercept.

4. The method according to claim 3, characterized in that, The step of obtaining the first slope based on the first discreteness parameter, the second discreteness parameter, and the slope of the reference code rate-quantization parameter RQ model includes: Calculate the difference between the second discrete parameter and the first discrete parameter to obtain the first calculated value; Calculate the ratio of the first calculated value to the second discreteness parameter to obtain the second calculated value; The first slope is obtained by multiplying the second calculated value by the slope of the reference bitrate-quantization parameter RQ model.

5. The method according to claim 3, characterized in that, The step of obtaining the first intercept based on the first discrete parameter, the second discrete parameter, and the intercept of the reference code rate-quantization parameter RQ model includes: Calculate the difference between the second discrete parameter and the first discrete parameter to obtain the first calculated value; Calculate the ratio of the first calculated value to the second discreteness parameter to obtain the second calculated value; The first intercept is obtained by multiplying the second calculated value by the intercept of the reference bitrate-quantization parameter RQ model.

6. The method according to claim 1, characterized in that, The method further includes: When it is determined that the video frame to be encoded is a refresh frame, the LCEVC encoder is controlled to encode the video frame to be encoded by the first quantization parameter and the second quantization parameter respectively, and the first bitrate corresponding to the first quantization parameter and the second bitrate corresponding to the second quantization parameter are obtained. The second RQ model is obtained based on the first quantization parameter, the second quantization parameter, the first bit rate, and the second bit rate; The quantization parameters corresponding to the video frame to be encoded are determined based on the second RQ model and the target bitrate.

7. The method according to claim 6, characterized in that, The step of obtaining the second RQ model based on the first quantization parameter, the second quantization parameter, the first bitrate, and the second bitrate includes: The second slope is obtained based on the first quantization parameter, the second quantization parameter, the common logarithm of the first bit rate, and the common logarithm of the second bit rate. The second intercept is obtained based on the second slope, the first quantization parameter, and the common logarithm of the first bit rate; The second RQ model is generated based on the second slope and the second intercept.

8. The method according to claim 7, characterized in that, The step of obtaining the second slope based on the first quantization parameter, the second quantization parameter, the common logarithm of the first bit rate, and the common logarithm of the second bit rate includes: Calculate the difference between the second quantization parameter and the first quantization parameter to obtain the third calculated value; Calculate the difference between the common logarithm of the first bitrate and the common logarithm of the second bitrate to obtain the fourth calculated value; Calculate the ratio of the third calculated value to the fourth calculated value to obtain the second slope.

9. The method according to claim 7, characterized in that, The step of obtaining the second intercept based on the second slope, the first quantization parameter, and the common logarithm of the first code rate includes: Calculate the product of the second slope and the common logarithm of the first code rate to obtain the fifth calculated value; The difference between the first quantization parameter and the fifth calculated value is calculated to obtain the second intercept.

10. A device for determining quantitative parameters, characterized in that, include: Memory, configured to store computer programs; The processor is configured to, when a computer program is invoked, cause the quantization parameter determination device to implement the quantization parameter determination method according to any one of claims 1-9.