Code rate control method and device for video coding

By obtaining the extreme values ​​and mean values ​​of the intra-texture information of the video frame, adaptively update the threshold array, and determining the quantization parameters of the encoding unit, solving the problem of poor code rate control in the prior art, and achieving better encoding quality and code rate control.

CN120021249APending Publication Date: 2025-05-20SHENZHEN MICROBT ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311546338.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

In the existing video encoding technology, the code rate control method is difficult to adapt to the changes in different video contents, resulting in poor fluctuations in encoding quality and code rate.

Method used

By obtaining the extreme values ​​and mean values ​​of the intra texture information of the frame before the current frame, the intra texture threshold array is adaptively updated, and then the quantization parameters (QP) of each encoding unit are determined to realize code rate control.

Benefits of technology

It improves encoding quality and controls code rate fluctuations, which are suitable for a variety of video content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120021249A_ABST
    Figure CN120021249A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a code rate control method and device for video coding. The method comprises the following steps: acquiring an extreme value and a mean value of intra-frame texture information of a previous frame of a current frame, wherein the current frame is not a first frame; determining an intra-frame texture threshold array of the current frame based on the extreme value; based on the mean value, determining an intermediate index of the intra-frame texture threshold array, the intermediate index being used for defining a normal range in the intra-frame texture threshold array; determining intra-frame texture information of a coding unit in the current frame; and determining a quantization parameter of the coding unit in the current frame based on the intra-frame texture information, the intra-frame texture threshold array and the intermediate index of the coding unit in the current frame. The intra-frame texture information of the coded image is utilized to carry out self-adaptive updating on the threshold value array, the coding quality is ensured, meanwhile, the code rate fluctuation is kept controllable, and various video contents can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of video coding technology, and in particular to a method and device for controlling bit rate of video coding. Background Technology

[0002] Video encoding refers to the method of converting the original video format file into another video format file through compression technology. Common codec standards in video streaming include H.261, H.263, H.264 of the ITU, M-JPEG of the Moving Picture Experts Group and MPEG series standards of the International Organization for Standardization Moving Picture Experts Group. In addition, RealVideo, WMV and QuickTime are widely used on the Internet, etc.

[0003] Rate Control is an important technical means of encoders. According to different application business scenarios, by controlling the quantization parameter (QP) encoded in each frame or even each coding unit (CU), the encoding rate can meet various specific restrictions, while the encoding performance, encoding efficiency and subjective quality are optimized as much as possible. SUMMARY OF THE INVENTION

[0004] The present disclosure provides a method and device for controlling the bit rate of video coding.

[0005] A video encoding bit rate control method, comprising:

[0006] Get the extreme value and mean value of the texture information in the frame before the current frame, where the current frame is not the first frame;

[0007] Based on the extreme value, determine the intra-frame texture threshold array of the current frame;

[0008] Based on the mean, determining the middle index of the intra-frame texture threshold array, wherein the middle index is used to define the normal range in the intra-frame texture threshold array;

[0009] Determine the intra-frame texture information of the CU in the current frame;

[0010] Determine the QP of the CU in the current frame based on the intra-frame texture information of the CU in the current frame, the intra-frame texture threshold array and the intermediate index.

[0011] In one embodiment, the extreme value includes a maximum value and a minimum value;

[0012] Determining the intra-frame texture threshold array of the current frame based on the extreme value includes:

[0013] Determine the minimum value as the array minimum value and the maximum value as the array maximum value;

[0014] Determine the difference between the array maximum value and the array minimum value;

[0015] Based on the difference, determine a predetermined number of array values between the array minimum value and the array maximum value;

[0016] Determine the predetermined number of array values, the array minimum value, and the array maximum value as array elements;

[0017] Determine the intra-frame texture threshold array based on the array elements.

[0018] In one embodiment, the determining the middle index of the intra-frame texture threshold array based on the mean includes:

[0019] Determine two adjacent array elements in the intra-frame texture threshold array whose value ranges contain the mean;

[0020] Determine the middle index based on the sequence number of at least one of the two adjacent array elements.

[0021] In one embodiment, the determining the QP of the CU in the current frame based on the intra-frame texture information of the CU in the current frame, the intra-frame texture threshold array, and the middle index includes:

[0022] Determine two adjacent array elements in the intra-frame texture threshold array whose value ranges contain the intra-frame texture information of the CU in the current frame;

[0023] Based on the comparison result between the intra-frame texture information of the CU in the current frame and the value of the array element pointed to by the middle index, and the sequence number of the smaller array element among the two adjacent array elements, determine the change value of the QP of the CU in the current frame;

[0024] Based on the change value of the QP of the CU in the current frame and the predetermined initial value of the QP of the CU in the current frame, determine the QP of the CU in the current frame.

[0025] In one embodiment, the determining the change value of the QP of the CU in the current frame based on the comparison result between the intra-frame texture information of the CU in the current frame and the value of the array element pointed to by the middle index, and the sequence number of the smaller array element among the two adjacent array elements includes:

[0026] When the intra-frame texture information of the CU in the current frame is equal to the value of the array element pointed to by the middle index, determine the change value as zero;

[0027] When the intra-frame texture information of the CU in the current frame is not equal to the value of the array element pointed to by the intermediate index, determine that the change value is Delta1, where Delta1 is equal to the difference between i1 and the intermediate index, and i1 is the sequence number of the smaller array element.

[0028] In one embodiment, it includes:

[0029] Obtain the intra-frame texture information of the CU in the first frame;

[0030] Based on the intra-frame texture information of the CU in the first frame, a predetermined initial array of intra-frame texture thresholds, and the initial intermediate index of the initial array of intra-frame texture thresholds, determine the QP of the CU in the first frame.

[0031] In one embodiment, the determining the QP of the CU in the first frame based on the intra-frame texture information of the CU in the first frame, a predetermined initial array of intra-frame texture thresholds, and the initial intermediate index of the initial array of intra-frame texture thresholds includes:

[0032] Determine two adjacent array elements in the initial array of intra-frame texture thresholds whose value ranges include the intra-frame texture information of the CU in the first frame;

[0033] Based on the comparison result between the intra-frame texture information of the CU in the first frame and the value of the array element pointed to by the initial intermediate index, and the sequence number of the smaller array element among the two adjacent array elements, determine the change value of the QP of the CU in the first frame;

[0034] Based on the change value of the QP of the CU in the first frame and the predetermined initial value of the QP of the CU in the first frame, determine the QP of the CU in the first frame.

[0035] In one embodiment, the determining the change value of the QP of the CU in the first frame based on the comparison result between the intra-frame texture information of the CU in the first frame and the value of the array element pointed to by the initial intermediate index, and the sequence number of the smaller array element among the two adjacent array elements includes:

[0036] When the intra-frame texture information of the CU in the first frame is equal to the value of the array element pointed to by the initial intermediate index, determine that the change value is zero;

[0037] When the intra-frame texture information of the CU in the first frame is not equal to the value of the array element pointed to by the intermediate index in the first frame, determine that the change value is Delta2, where Delta2 is equal to the difference between i2 and the initial intermediate index, and i2 is the sequence number of the smaller array element.

[0038] A bitrate control device for video coding, including:

[0039] An acquisition module, configured to acquire the extreme values and the mean value of the intra-frame texture information of the previous frame of the current frame, where the current frame is not the first frame;

[0040] A first determination module, configured to determine an intra-frame texture threshold array of the current frame based on the extreme values;

[0041] A second determination module, configured to determine a middle index of the intra-frame texture threshold array based on the mean value, where the middle index is used to define a normal range in the intra-frame texture threshold array;

[0042] A third determination module, configured to determine the intra-frame texture information of the CUs in the current frame;

[0043] A fourth determination module, configured to determine the QP of the CUs in the current frame based on the intra-frame texture information of the CUs in the current frame, the intra-frame texture threshold array, and the middle index;

[0044] In one embodiment, the acquisition module is configured to acquire the intra-frame texture information of the CUs in the first frame;

[0045] The fourth determination module is configured to determine the QP of the CUs in the first frame based on the intra-frame texture information of the coding units in the first frame, a predetermined initial intra-frame texture threshold array, and an initial middle index of the initial intra-frame texture threshold array;

[0046] It can be seen from the above technical solutions that in the embodiments of the present invention, the extreme values and the mean value of the intra-frame texture information of the previous frame of the current frame are acquired, where the current frame is not the first frame; an intra-frame texture threshold array of the current frame is determined based on the extreme values; a middle index of the intra-frame texture threshold array is determined based on the mean value, and the middle index is used to define a normal range in the intra-frame texture threshold array; the intra-frame texture information of the CUs in the current frame is determined; and the QP of the CUs in the current frame is determined based on the intra-frame texture information of the CUs in the current frame, the intra-frame texture threshold array, and the middle index. Therefore, the embodiments of the present invention do not uniformly adopt a fixed threshold array for all scenarios, but propose a technical solution for adaptively updating the threshold array by using the intra-frame texture information of the encoded images. While ensuring the improvement of the coding quality, the code rate fluctuation is still controllable, so as to meet various video contents. Moreover, the intra-frame texture threshold array is determined based on the extreme values of the intra-frame texture information of the previous frame, fully considering the continuity of the video content in the video frames, and improving the accuracy of the threshold array.

[0047] In addition, considering that the first frame lacks the intra-frame texture information of the previous frame, for the first frame, a predetermined initial intra-frame texture threshold array and a predetermined initial middle index in the initial intra-frame texture threshold array can be used to determine whether the CUs in the first frame belong to a flat area or a complex area. Description of the Drawings

[0048] The accompanying drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with the present disclosure, and are used together with the description to explain the principles of the present disclosure, and do not constitute an undue limitation on the present disclosure.

[0049] Figure 1 is a schematic flowchart of a bitrate control method for video coding according to an embodiment of the present invention.

[0050] Figure 2 is a schematic diagram of an intra-frame texture threshold array and an intermediate index according to an embodiment of the present invention.

[0051] Figure 3 is a schematic diagram of an initial intra-frame texture threshold array and an initial intermediate index according to an embodiment of the present invention.

[0052] Figure 4 is a schematic diagram of pixels of a video frame according to an embodiment of the present invention.

[0053] Figure 5 is a schematic diagram of pixels of a 64*64 CU according to an embodiment of the present invention.

[0054] Figure 6 is a schematic diagram of pixels of a 32*32 CU according to an embodiment of the present invention.

[0055] Figure 7 is a schematic structural diagram of a bitrate control device for video coding according to an embodiment of the present invention.

[0056] Figure 8 is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Embodiments

[0057] In order to enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0058] For the sake of simplicity and intuitiveness in description, the solutions of the present invention will be elaborated below by describing several representative embodiments. A large number of details in the embodiments are only used to help understand the solutions of the present invention. However, it is obvious that the implementation of the technical solutions of the present invention may not be limited to these details. In order to avoid unnecessarily obscuring the solutions of the present invention, some embodiments are not described in detail, but only the framework is given. Hereinafter, "including" means "including but not limited to", and "according to..." means "at least according to..., but not limited to only according to...". Due to the language habits of the Chinese language, when the number of a component is not specifically indicated hereinafter, it means that the component can be one or more, or can be understood as at least one.

[0059] First, some technical terms of the embodiments of the present invention will be described.

[0060] High Efficiency Video Coding (HEVC): Also known as H.265 and MPEG-H part 2, it is a video compression standard.

[0061] QP: A parameter used in the quantization process of video coding.

[0062] Rate control: For different application service scenarios, by controlling the QP in each frame and even each CU, the coding bitrate is made to meet various specific limit requirements, and at the same time, the coding performance, coding efficiency, and subjective quality are also optimized as much as possible.

[0063] Median Absolute Deviation (MAD): The deviation of the data median from the median, that is, first calculate the residuals (deviations) between the data and their median, and MAD is the median of the absolute values of these deviations. In the embodiments of the present invention, the calculation method of the MAD value of a CU includes: subtracting the mean of all pixels in the CU from each pixel in the CU, then accumulating the absolute values of the differences and then taking the mean.

[0064] Texture detection within a CU usually adopts the MAD detection scheme to determine the degree of pixel change within the current CU through the MAD value. Specifically, it includes: if the MAD value of the current CU is small, it indicates that the degree of pixel change in the current CU is small, and the current CU is determined to be a flat area; if the MAD value of the current CU is large, it indicates that the degree of pixel change in the current CU is large, and the current CU is determined to be a complex area. According to the characteristics of human eye perception, when the coding quality in a flat area is low and there is blurring or blocking effect, the human eye can easily detect it. On the contrary, if the coding quality of a complex area is low, the human eye perception is not very obvious. Therefore, the flat area or complex area in the image can be detected through the MAD value. Then, reduce the QP of the flat area to improve the image quality of the flat area (the coding codeword of image coding will increase accordingly), and increase the QP of the complex area to reduce the image quality of the complex area within the range where the human eye does not perceive it obviously (saving the coding codeword of image coding accordingly), so that while effectively taking into account the image quality, the bitrate fluctuation can be ensured to be in a small state.

[0065] At present, a fixed empirical threshold array is usually used to determine the size of the MAD value. For example, the empirical thresholds constitute a threshold array from small to large and an intermediate threshold. If the MAD value of the current CU is on the left side of the intermediate threshold, the current CU is considered to belong to the flat area, and the QP gradually decreases as the MAD value decreases in the left range; if the MAD value of the current CU is on the right side of the intermediate threshold, the current CU is considered to belong to the complex area, and the QP gradually increases as the MAD value increases in the right range.

[0066] The applicant found that the thresholds in the threshold array are usually fixed. However, video content is ever-changing. The MAD values ​​of some images are generally small, while the MAD values ​​of some images are generally large. Fixed thresholds cannot meet the needs of a variety of video content. The MAD detection scheme using a fixed threshold array is difficult to effectively balance image quality while ensuring that the bit rate fluctuation is kept small.

[0067] In the implementation mode of the present invention, considering that many video frames (for example, surveillance video sequences) have the characteristic of continuity, a technical solution is proposed for adaptively updating the threshold array using the intra-frame texture information of the encoded image. While ensuring quality improvement, the bit rate fluctuation is still controllable, and it is applicable to a variety of video contents. Specifically: after determining the intra-frame texture information (such as MAD value) for a CU of the current frame, the threshold array can be updated in combination with the intra-frame texture information of the previous encoded frame, and the texture complexity of the current CU in the current environment can be analyzed and judged using the updated threshold array. It can be seen that different threshold arrays can be generated with the change of image content, rather than uniformly using a fixed threshold array for all scenes, which can effectively take into account the image quality while ensuring that the bit rate fluctuation is in a small state. In addition, considering that the first frame lacks the intra-frame texture information of the previous frame, a predetermined intra-frame texture threshold initial array and a predetermined initial intermediate index in the intra-frame texture threshold initial array can be used for the first frame to determine whether the CU in the first frame belongs to a flat area or a complex area.

[0068] Figure 1 is an exemplary flow chart of a rate control method for video encoding according to an embodiment of the present invention.

[0069] If Figure 1 As shown, the method includes:

[0070] Step 101: Obtain the extreme value and mean value of the texture information in the previous frame of the current frame, where the current frame is not the first frame.

[0071] For example, the intra-frame texture information may be the MAD value or a variant based on the MAD value (such as multiplying the MAD value by a predetermined coefficient, dividing the MAD value by a predetermined coefficient, or other mathematical transformations, etc.). Preferably, the previous frame is the frame immediately preceding the current frame.

[0072] Step 102: Based on the extreme values, determine the intra-frame texture threshold array of the current frame.

[0073] In one embodiment, the extreme values include the maximum value and the minimum value; step 102 specifically includes: determining the minimum value as the minimum value of the array, and the maximum value as the maximum value of the array; determining the difference between the maximum value of the array and the minimum value of the array; based on the difference, determining a predetermined number of array values between the minimum value of the array and the maximum value of the array; determining the predetermined number of array values, the minimum value of the array, and the maximum value of the array as array elements; determining the intra-frame texture threshold array based on the array elements. Preferably, in the intra-frame texture threshold array, the sorting order of the array elements is: a non-decreasing sorting order. The non-decreasing sorting order includes: strictly monotonically increasing (i.e., the array element with the next serial number is strictly greater than the array element with the previous serial number) or non-strictly monotonically increasing (i.e., the array element with the next serial number is greater than or equal to the array element with the previous serial number).

[0074] Step 103: Based on the mean value, determine the middle index of the intra-frame texture threshold array, and the middle index is used to define the normal range in the intra-frame texture threshold array.

[0075] The middle index is used to define the normal range in the intra-frame texture threshold array. For example, the middle index points to the leftmost (smaller side) in the normal range. At this time, the normal range is jointly defined by the value pointed to by the middle index and the next value of this value. The area on the left side of the normal range is the flat area, and the area on the right side of the normal range is the complex area.

[0076] In one embodiment, step 103 specifically includes: determining two adjacent array elements in the intra-frame texture threshold array whose value ranges include the mean value; determining the middle index based on the serial number of at least one of the two adjacent array elements. Preferably, the serial number of the smaller array element among the two adjacent array elements is determined as the middle index.

[0077] Figure 2 It is a schematic diagram of the intra-frame texture threshold array and the middle index according to an embodiment of the present invention. The intra-frame texture threshold array is CU_RC_THRD[N]. Assuming the number of array elements is 16, the serial numbers of the array elements are 0 to 15, that is, the value range of N is 0 to 15.

[0078] Assume that based on the intra-frame texture information of the previous frame, it is known that the maximum MAD value (LastFrameSadMax) of the previous frame is 600, and its position in the intra-frame texture threshold array is 16 (corresponding to serial number 15); the minimum MAD value (LastFrameSadMin) of the previous frame is equal to 300, and its position in the intra-frame texture threshold array is 1 (corresponding to serial number 0), and the average MAD value (LastFrameSad) of the previous frame is 370.

[0079] The MAD value of each numerical element can be calculated based on the following formula.

[0080] First, calculate diff, where:

[0081] diff = LastFrameSadMax – LastFrameSadMin. Therefore, diff = 600 - 300 = 300.

[0082] Then, based on diff, calculate the value of each array element in the intra-frame texture threshold array. Where:

[0083] CU_RC_THRD[0] = CU_RC_THRD[1] = CU_RC_THRD[2] = CU_RC_THRD[3] = LastFrameSadMin = 300;

[0084] CU_RC_THRD[4] = CU_RC_THRD[5] = LastFrameSadMin + diff / 6 = 350;

[0085] CU_RC_THRD[6] = CU_RC_THRD[7] = LastFrameSadMin + diff / 3 = 400;

[0086] CU_RC_THRD[8] = CU_RC_THRD[9] = CU_RC_THRD

[10] = LastFrameSadMin + diff / 2 = 450;

[0087] CU_RC_THRD

[11] = CU_RC_THRD

[12] = LastFrameSadMin + diff / 3 * 2 = 500;

[0088] CU_RC_THRD

[13] = CU_RC_THRD

[14] = LastFrameSadMin + diff / 6 * 5 = 550;

[0089] CU_RC_THRD

[15] = LastFrameSadMax = 600.

[0090] Therefore, the intra-frame texture threshold array as shown in Figure 2 is determined. In Figure 2 , the array elements in the intra-frame texture threshold array are sorted in a non-strictly monotonically increasing manner.

[0091] LastFrameSad is 370, which is between CU_RC_THRD[5] and CU_RC_THRD[6]. Based on the sequence number of at least one of these two adjacent array elements, the middle index (CU_RC_THRD_IDX) is determined. Therefore, the sequence number of CU_RC_THRD[5] (i.e., 5) can be determined as the middle index CU_RC_THRD_IDX.

[0092] In Figure 2 : The value ranges of CU_RC_THRD[0] and CU_RC_THRD[5] are flat regions; the value ranges of CU_RC_THRD[5] and CU_RC_THRD[6] are normal regions; the value ranges of CU_RC_THRD[6] and CU_RC_THRD

[15] are complex regions.

[0093] Step 104: Determine the intra-frame texture information of the CU in the current frame.

[0094] Step 105: Based on the intra-frame texture information of the CU in the current frame, the intra-frame texture threshold array, and the middle index, determine the QP of the CU in the current frame.

[0095] In one embodiment, step 105 specifically includes: determining two adjacent array elements in the intra-frame texture threshold array whose value ranges include the intra-frame texture information of the CU in the current frame; based on the comparison result between the intra-frame texture information of the CU in the current frame and the value of the array element pointed to by the middle index, and the sequence number of the smaller array element among the two adjacent array elements, determine the change value of the QP of the CU in the current frame; based on the change value of the QP of the CU in the current frame and the predetermined initial value of the QP of the CU in the current frame, determine the QP of the CU in the current frame.

[0096] In one embodiment, based on the comparison result between the intra-frame texture information of the CU in the current frame and the value of the array element pointed to by the middle index, and the sequence number of the smaller array element among the two adjacent array elements, determining the change value of the QP of the CU in the current frame includes:

[0097] (1): When the intra-frame texture information of the CU in the current frame is equal to the value of the array element pointed to by the middle index, determine that the change value is zero;

[0098] (2): When the intra-frame texture information of the CU in the current frame is not equal to the value of the array element pointed to by the middle index, determine that the change value is Delta1, where Delta1 is equal to the difference between i1 and the middle index, and i1 is the serial number of the smaller array element.

[0099] Continuing with the intra-frame texture threshold array as Figure 2 shown, assume that the intra-frame texture information of the CU in the current frame is the MAD value:

[0100] Example (1): When the MAD value of the current CU is 470, it can be seen that 470 is between CU_RC_THRD

[10] (450) and CU_RC_THRD

[11] (500), so i1 is 10. Moreover, the MAD value of the current CU is not equal to the value of the array element 350 pointed to by the middle index (CU_RC_THRD_IDX = 5), so Delta1 = i1 - CU_RC_THRD_IDX = 10 - 5 = 5. Then, determine the sum of Delta1 and the initial QP value of the current CU as the QP of the current CU. Among them, the initial QP value of the current CU can be a preset value.

[0101] Example (2): When the MAD value of the current CU is 380, it can be seen that 380 is between CU_RC_THRD[5] (350) and CU_RC_THRD[6] (400), so i1 is 5. Moreover, the MAD value of the current CU is not equal to the value of the array element pointed to by the middle index (CU_RC_THRD_IDX), so Delta1 = i1 - CU_RC_THRD_IDX = 5 - 5 = 0. Then, determine the initial QP value of the current CU as the QP of the current CU. Among them, the initial QP value of the current CU can be a preset value.

[0102] Example (3): When the MAD value of the current CU is 350, it can be seen that 350 is between CU_RC_THRD[5] (350) and CU_RC_THRD[6] (400), so determine Delta1 to be zero. At this time, the initial QP value of the current CU can be determined as the QP of the current CU. Among them, the initial QP value of the current CU can be a preset value.

[0103] Example (4): When the MAD value of the current CU is 320, it can be seen that 320 is between CU_RC_THRD[3] (300) and CU_RC_THRD[4] (350). Therefore, i1 is 3. Moreover, the MAD value of the current CU is not equal to the value of the array element pointed to by the intermediate index (CU_RC_THRD_IDX), which is 350. Therefore, Delta1 = i1 - CU_RC_THRD_IDX = 3 - 5 = -2. Then, the sum of Delta1 and the initial QP value of the current CU is determined as the QP of the current CU. Among them, the initial QP value of the current CU can be a preset value.

[0104] In one embodiment, the method includes: obtaining the intra-frame texture information of the coding unit in the first frame; determining the QP of the CU in the first frame based on the intra-frame texture information of the CU in the first frame, a predetermined initial array of intra-frame texture thresholds, and the initial intermediate index of the initial array of intra-frame texture thresholds. Preferably, in the initial array of intra-frame texture thresholds, the array elements are sorted in a non-decreasing order. The non-decreasing order includes: strictly monotonically increasing (i.e., the array element with the next serial number is strictly greater than the array element with the previous serial number) or non-strictly monotonically increasing (i.e., the array element with the next serial number is greater than or equal to the array element with the previous serial number). The initial array of intra-frame texture thresholds and the initial intermediate index can both be determined in advance based on empirical values.

[0105] Therefore, considering that the first frame lacks the intra-frame texture information of the previous frame, for the first frame, a predetermined initial array of intra-frame texture thresholds and a predetermined initial intermediate index in the initial array of intra-frame texture thresholds can be used to determine whether the CU in the first frame belongs to a flat region or a complex region.

[0106] In one embodiment, determining the quantization parameter of the CU unit in the first frame based on the intra-frame texture information of the CU unit in the first frame, a predetermined initial array of intra-frame texture thresholds, and the initial intermediate index of the initial array of intra-frame texture thresholds includes: determining two adjacent array elements in the initial array of intra-frame texture thresholds whose value ranges include the intra-frame texture information of the CU in the first frame; determining the change value of the QP of the CU in the first frame based on the comparison result between the intra-frame texture information of the CU in the first frame and the value of the array element pointed to by the initial intermediate index and the serial number of the smaller array element among the two adjacent array elements; determining the QP of the CU in the first frame based on the change value of the QP of the CU in the first frame and the predetermined initial QP value of the CU in the first frame.

[0107] In one embodiment, determining the change value of the quantization parameter of the CU in the first frame based on the comparison result between the intra-frame texture information of the CU in the first frame and the value of the array element pointed to by the initial intermediate index and the serial number of the smaller array element among the two adjacent array elements includes:

[0108] (1): When the intra-frame texture information of the CU in the first frame is equal to the value of the array element pointed to by the initial intermediate index, determine that the change value is zero;

[0109] (2): When the intra-frame texture information of the CU in the first frame is not equal to the value of the array element pointed to by the first-frame intermediate index, determine that the change value is Delta2, where Delta2 is equal to the difference between i2 and the initial intermediate index, and i2 is the serial number of the smaller array element.

[0110] Figure 3 It is a schematic diagram of the initial array of intra-frame texture thresholds and the initial intermediate index according to an embodiment of the present invention. The initial array of intra-frame texture thresholds is CU_RC_THRD[N]. Assuming that the number of array elements is 16, the serial numbers of the array elements are 0 to 15, that is, the value range of N is 0 to 15. Among them: CU_RC_THRD[0]=0; CU_RC_THRD[1]=0; CU_RC_THRD[2]=0; CU_RC_THRD[3]=2; CU_RC_THRD[4]=3; CU_RC_THRD[5]=3; CU_RC_THRD[6]=6; CU_RC_THRD[7]=6; CU_RC_THRD[8]=9; CU_RC_THRD[9]=9; CU_RC_THRD

[10] =16; CU_RC_THRD

[11] =16; CU_RC_THRD

[12] =16; CU_RC_THRD

[13] =21; CU_RC_THRD

[14] =21; CU_RC_THRD

[15] =30.

[0111] Moreover, the predetermined initial intermediate index CU_RC_THRD_IDX points to CU_RC_THRD[6]. Therefore, the value of the initial intermediate index CU_RC_THRD_IDX is the serial number of CU_RC_THRD[6], that is, CU_RC_THRD_IDX is 6.

[0112] Assume that the intra-frame texture information of the CU in the first frame is the MAD value:

[0113] Example (1): When the MAD value of the current CU is 13, it can be seen that 13 is between CU_RC_THRD[9](9) and CU_RC_THRD

[10] (16), so i2 is 9. Moreover, the MAD value of the current CU is not equal to the value of the array element pointed to by the intermediate index (CU_RC_THRD_IDX), which is 6. Therefore, Delta2 = i2 - CU_RC_THRD_IDX = 9 - 6 = 3. Then, the sum result of Delta2 and the QP initial value of the current CU is determined as the QP of the current CU. Among them, the QP initial value of the current CU can be a preset value.

[0114] Example (2): When the MAD value of the current CU is 6, it can be seen that 6 is between CU_RC_THRD[6](6) and CU_RC_THRD[7](6), so i2 is 6. Moreover, the MAD value of the current CU is equal to the array element value 6 pointed to by the intermediate index (CU_RC_THRD_IDX), so Delta2 is determined to be zero. At this time, the initial QP value of the current CU can be determined as the QP of the current CU. Among them, the initial QP value of the current CU can be a preset value.

[0115] Example (3): When the MAD value of the current CU is 3, it can be seen that 3 is between CU_RC_THRD[4](3) and CU_RC_THRD[5](3), so i2 is 4. Moreover, the MAD value of the current CU is not equal to the array element value 6 pointed to by the intermediate index (CU_RC_THRD_IDX), so Delta2 = i2-CU_RC_THRD_IDX = 4-6 = -2. Then, the sum of Delta2 and the initial QP value of the current CU is determined as the QP of the current CU. Among them, the initial QP value of the current CU can be a preset value.

[0116] The following takes the HEVC coding standard as an example to exemplarily describe the implementation of the present invention.

[0117] Figure 4 is a pixel schematic diagram of a video frame according to an embodiment of the present invention. In Figure 4 In , following the HEVC specification, the video frame 10 includes several CUs 11 (which can be called LCUs) of size 64*64 and several CUs of size not 64*64. For example, the video frame includes a CU of size 8*8 that does not belong to the LCU (such as Figure 4 S1 in ) and CUs that do not belong to LCUs and are 16*16 in size (as shown in Figure 4 S2 in ).

[0118] Each 64*64 CU11 contains four 32*32 CUs. Moreover, each 32*32 CU contains four 8*8 CUs. Figure 5 is a pixel schematic diagram of a 64*64 CU according to an embodiment of the present invention. Figure 6 is a pixel schematic diagram of a 32*32 CU according to an embodiment of the present invention.

[0119] Assume that the current frame 10 is the first frame:

[0120] (1): First, the initial array of intra-frame texture threshold and the initial intermediate index of the initial array of intra-frame texture threshold can be determined based on empirical values. For example, the initial array of intra-frame texture threshold and the initial intermediate index are as follows Figure 3 as shown.

[0121] (2): Determine the QP of each CU in the current frame 10 (i.e., the first frame) according to the CU order from small to large in the current frame 10, and perform QP operations on the residuals obtained during the encoding process of each CU based on the QP of each CU. Specifically: First, determine the QP of each 8×8 CU in the current frame 10 (i.e., the first frame) based on the initial array of intra-frame texture thresholds and the initial intermediate index of the initial array of intra-frame texture thresholds, and perform QP operations on each 8×8 CU. Then, determine the QP of each 16×16 CU in the current frame 10 (i.e., the first frame) based on the initial array of intra-frame texture thresholds and the initial intermediate index of the initial array of intra-frame texture thresholds, and perform QP operations on each 16×16 CU. Next, determine the QP of each 32×32 CU in the current frame 10 (i.e., the first frame) based on the initial array of intra-frame texture thresholds and the initial intermediate index of the initial array of intra-frame texture thresholds, and perform QP operations on each 32×32 CU. Then, determine the QP of each 64×64 CU in the current frame 10 (i.e., the first frame) based on the initial array of intra-frame texture thresholds and the initial intermediate index of the initial array of intra-frame texture thresholds, and perform QP operations on each 64×64 CU.

[0122] Assume that the current frame 10 is the second frame:

[0123] (1): First, obtain the extreme values and the mean value of the intra-frame texture information of the first frame. Based on the extreme values of the intra-frame texture information of the first frame, determine the intra-frame texture threshold array of the current frame 10 (i.e., the second frame). Based on the mean value of the intra-frame texture information of the first frame, determine the intermediate index of the intra-frame texture threshold array of the current frame 10 (i.e., the second frame). For example, the intra-frame texture threshold array and the intermediate index of the current frame 10 (i.e., the second frame) are as Figure 2 shown.

[0124] (2): Determine the QP of each CU in the current frame 10 in ascending order of the CUs in the current frame 10, and perform QP operations on the residuals obtained during the encoding process of each CU based on the QP of each CU. Specifically: First, determine the QP of each 8×8 CU in the current frame 10 (i.e., the second frame) based on the intra-frame texture threshold array and the intermediate index, and perform QP operations on each 8×8 CU. Then, determine the QP of each 16×16 CU in the current frame 10 (i.e., the second frame) based on the intra-frame texture threshold array and the intermediate index, and perform QP operations on each 16×16 CU. Next, determine the QP of each 32×32 CU in the current frame 10 (i.e., the second frame) based on the intra-frame texture threshold array and the intermediate index, and perform QP operations on each 32×32 CU. Then, determine the QP of each 64×64 CU in the current frame 10 (i.e., the second frame) based on the initial intra-frame texture threshold array and the initial intermediate index of the initial intra-frame texture threshold array, and perform QP operations on each 64×64 CU.

[0125] Assume that the current frame 10 is the third frame:

[0126] (1): First, obtain the extreme values and the mean value of the intra-frame texture information of the second frame, determine the intra-frame texture threshold array of the current frame 10 (i.e., the third frame) based on the extreme values of the intra-frame texture information of the second frame, and determine the intermediate index of the intra-frame texture threshold array of the current frame 10 (i.e., the third frame) based on the mean value of the intra-frame texture information of the second frame. For example, the specific structure of the intra-frame texture threshold array and the intermediate index of the current frame 10 (i.e., the third frame) can refer to Figure 2 as shown, where the values of the array elements may change.

[0127] (2): Determine the QP of each CU in the current frame 10 (i.e., the third frame) in ascending order of the CUs in the current frame 10 (i.e., the third frame), and perform QP operations on the residuals obtained during the encoding process of each CU based on the QP of each CU. Specifically: First, determine the QP of each 8×8 CU in the current frame 10 (i.e., the third frame) based on the intra-frame texture threshold array and the intermediate index, and perform QP operations on each 8×8 CU. Then, determine the QP of each 16×16 CU in the current frame 10 (i.e., the third frame) based on the intra-frame texture threshold array and the intermediate index, and perform QP operations on each 16×16 CU. Next, determine the QP of each 32×32 CU in the current frame 10 (i.e., the third frame) based on the intra-frame texture threshold array and the intermediate index, and perform QP operations on each 32×32 CU. Then, determine the QP of each 64×64 CU in the current frame 10 (i.e., the third frame) based on the initial intra-frame texture threshold array and the initial intermediate index of the initial intra-frame texture threshold array, and perform QP operations on each 64×64 CU.

[0128] By analogy, QP operation on each frame can be implemented. The implementation of the present invention is particularly suitable for monitoring video sequences.

[0129] The above takes the HEVC coding standard as an example to exemplify the embodiments of the present invention. Those skilled in the art will appreciate that such description is only exemplary and is not intended to limit the protection scope of the embodiments of the present invention.

[0130] Based on the above description, the embodiment of the present invention also proposes a bit rate control device for video encoding. Figure 7 is an exemplary structural diagram of a video coding rate control device according to an embodiment of the present invention.

[0131] If Figure 7 As shown in FIG. 1 , the video coding bit rate control device 700 includes:

[0132] The acquisition module 701 is used to obtain the extreme value and mean value of the texture information in the frame before the current frame, wherein the current frame is not the first frame;

[0133] The first determination module 702 is used to determine the intra-frame texture threshold array of the current frame based on the extreme value;

[0134] The second determination module 703 is used to determine the middle index of the intra-frame texture threshold array based on the mean value, and the middle index is used to define the normal range in the intra-frame texture threshold array;

[0135] The third determination module 704 is used to determine the intra-frame texture information of the CU in the current frame;

[0136] The fourth determination module 705 is used to determine the QP of the CU in the current frame based on the intra-frame texture information of the CU in the current frame, the intra-frame texture threshold array and the intermediate index.

[0137] In one embodiment, the acquisition module 701 is used to obtain the intra-frame texture information of the CU in the first frame; the fourth determination module 705 is used to determine the QP of the CU in the first frame based on the intra-frame texture information of the CU in the first frame, the predetermined intra-frame texture threshold initial array and the initial intermediate index of the intra-frame texture threshold initial array.

[0138] ​​In addition, an embodiment of the present application further provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device can execute the steps of the above video coding bitrate control method. Embodiments of the present invention also respectively propose an electronic device. The electronic device includes: a processor; a memory; wherein the memory stores an application program executable by the processor, for causing the processor to execute the video coding bitrate control method of the above embodiment. Among them, the memory can specifically be implemented as various storage media such as electrically erasable programmable read-only memory (EEPROM), flash memory, programmable read-only memory (PROM), etc. The processor can be implemented as including one or more central processing units or one or more field-programmable gate arrays, wherein the field-programmable gate array integrates one or more central processing unit cores. Specifically, the central processing unit or central processing unit core can be implemented as a CPU, MCU, or digital signal processor.

[0139] Figure 8 FIG. is a structural diagram of an electronic device according to an embodiment of the present invention. The electronic device includes: a processor 801 and a memory 802. The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may further include an AI processor, and the AI processor is used to process computational operations related to machine learning. For example, the AI processor may be implemented as a neural network processor. The memory 802 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 802 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices.

[0140] In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, which is used to be executed by the processor 801 to implement the bitrate control method for video encoding provided in various embodiments of the present disclosure. In some embodiments, the electronic device 800 may further optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802, and the peripheral device interface 803 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 803 through a bus, signal lines, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 804, a touch display screen 805, a camera assembly 806, an audio circuit 807, a positioning assembly 808, and a power supply 809.

[0141] The peripheral device interface 803 can be used to connect at least one peripheral device related to input / output (I / O) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 may be implemented on a separate chip or circuit board, and this embodiment does not limit this.

[0142] The radio frequency circuit 804 is used to receive and transmit radio frequency (RF) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 804 converts an electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so on. The radio frequency circuit 804 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a wireless fidelity (Wi-Fi) network. In some embodiments, the radio frequency circuit 804 may further include a circuit related to near field communication (NFC), and the present disclosure does not limit this.

[0143] The display screen 805 is used to display a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 805 is a touch display screen, the display screen 805 also has the ability to collect touch signals on or above the surface of the display screen 805. The touch signals can be input as control signals to the processor 801 for processing. At this time, the display screen 805 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there can be one display screen 805, which is provided on the front panel of the electronic device 800; in other embodiments, there can be at least two display screens 805, which are respectively provided on different surfaces of the electronic device 800 or are in a folded design; in some embodiments, the display screen 805 can be a flexible display screen, which is provided on the curved surface or the folding surface of the electronic device 800. Even more, the display screen 805 can also be set to an irregular non-rectangular shape, that is, an irregular-shaped screen. The display screen 805 can be prepared using materials such as a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0144] The camera module 806 is used to collect images or videos. Optionally, the camera module 806 includes a front camera and a rear camera. Generally, the front camera is provided on the front panel of the terminal, and the rear camera is provided on the back of the terminal. In some embodiments, there are at least two rear cameras, which are respectively any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to implement functions such as the combination of the main camera and the depth-of-field camera to achieve the background blurring function, the combination of the main camera and the wide-angle camera to achieve panoramic shooting and virtual reality (VR) shooting functions, or other combined shooting functions. In some embodiments, the camera module 806 can also include a flash. The flash can be a single-color-temperature flash or a dual-color-temperature flash. A dual-color-temperature flash refers to the combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.

[0145] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 801 for processing, or input to the radio frequency circuit 804 to implement voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the electronic device 800. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for uses such as ranging. In some embodiments, the audio circuit 807 may further include a headphone jack.

[0146] The positioning component 808 is used to locate the current geographical location of the electronic device 800 to implement navigation or location-based services (LBS). The positioning component 808 may be a positioning component based on the Global Positioning System (GPS) of the United States, the Beidou system of China, the GLONASS system of Russia, or the Galileo system of the European Union.

[0147] The power supply 809 is used to supply power to each component in the electronic device 800. The power supply 809 may be alternating current, direct current, a disposable battery, or a rechargeable battery. When the power supply 809 includes a rechargeable battery, the rechargeable battery may support wired charging or wireless charging.

[0148] Those skilled in the art can understand that the above structure does not limit the electronic device 800, and it may include more or fewer components than shown in the figure, or combine some components, or adopt different component arrangements.

[0149] It should be noted that not all steps and modules in the above processes and structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted according to needs. The division of each module is only for the convenience of description in terms of functional division. In actual implementation, one module can be implemented by multiple modules, and the functions of multiple modules can also be implemented by the same module. These modules can be located in the same device or in different devices.

[0150] The hardware modules in each of the embodiments can be implemented mechanically or electronically. For example, a hardware module can include specially designed permanent circuits or logic devices (such as dedicated processors, such as FPGAs or ASICs) for performing specific operations. A hardware module can also include programmable logic devices or circuits (such as including general-purpose processors or other programmable processors) temporarily configured by software for performing specific operations. As for whether to specifically adopt a mechanical approach, or dedicated permanent circuits, or temporarily configured circuits (such as configured by software) to implement the hardware module, it can be determined based on cost and time considerations.

[0151] The present invention also provides a machine-readable storage medium storing instructions for causing a machine to execute the methods as described in this application. Specifically, a system or device equipped with a storage medium can be provided, on which software program code for implementing the functions of any one of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device is caused to read and execute the program code stored in the storage medium. In addition, some or all of the actual operations can also be completed by an operating system or the like operating on the computer based on the instructions of the program code. The program code read from the storage medium can also be written to the memory provided in an expansion board inserted into the computer or to the memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, the CPU or the like installed on the expansion board or the expansion unit is caused to execute some and all of the actual operations, thereby implementing the functions of any one of the above embodiments.

[0152] Embodiments of the storage medium for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code can be downloaded from a server computer or the cloud via a communication network.

[0153] The above are only the preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A video coding rate control method, characterized in that: include: Obtaining extreme values ​​and average values ​​of intra-frame texture information of a frame before a current frame, wherein the current frame is not the first frame; Based on the extreme value, determining an intra-frame texture threshold array of the current frame; Based on the mean value, determining an intermediate index of the intra-frame texture threshold array, wherein the intermediate index is used to define a normal range in the intra-frame texture threshold array; Determining intra-frame texture information of a coding unit in the current frame; A quantization parameter of the coding unit in the current frame is determined based on the intra-frame texture information of the coding unit in the current frame, the intra-frame texture threshold array, and the intermediate index.

2. The method according to claim 1, characterized in that The extreme values ​​include maximum values ​​and minimum values; The determining of the intra-frame texture threshold array of the current frame based on the extreme value comprises: Determine the minimum value as the array minimum value, and determine the maximum value as the array maximum value; Determine the difference between the maximum value of the array and the minimum value of the array; Based on the difference, determining a predetermined number of array values ​​between the array minimum value and the array maximum value; Determine the predetermined number of array values, the array minimum value, and the array maximum value as array elements; The intra-frame texture threshold array is determined based on the array elements.

3. The method according to claim 2, characterized in that Determining the intermediate index of the intra-frame texture threshold array based on the mean value includes: Determine two adjacent array elements in the intra-frame texture threshold array whose value intervals include the mean value; The intermediate index is determined based on a sequence number of at least one array element of the two adjacent array elements.

4. The method according to claim 3, characterized in that The determining, based on the intra-frame texture information of the coding unit in the current frame, the intra-frame texture threshold array, and the intermediate index, a quantization parameter of the coding unit in the current frame comprises: Determine two adjacent array elements in the intra-frame texture threshold array whose value range includes intra-frame texture information of the coding unit in the current frame; Determine a change value of a quantization parameter of the coding unit in the current frame based on a comparison result of intra-frame texture information of the coding unit in the current frame with the array element value pointed to by the intermediate index and a sequence number of a smaller array element of the two adjacent array elements; The quantization parameter of the coding unit in the current frame is determined based on the change value of the quantization parameter of the coding unit in the current frame and a predetermined initial value of the quantization parameter of the coding unit in the current frame.

5. The method according to claim 4, characterized in that The determining the change value of the quantization parameter of the coding unit in the current frame based on the comparison result of the intra-frame texture information of the coding unit in the current frame with the array element value pointed to by the intermediate index and the sequence number of the smaller array element of the two adjacent array elements comprises: When the intra-frame texture information of the coding unit in the current frame is equal to the array element value pointed to by the intermediate index, determining that the change value is zero; When the intra-frame texture information of the coding unit in the current frame is not equal to the array element value pointed to by the intermediate index, the change value is determined to be Delta1, where Delta1 is equal to the difference between i1 and the intermediate index, and i1 is the sequence number of the smaller array element.

6. The method according to any one of claims 1 to 5, characterized in that include: Obtaining intra-frame texture information of the coding unit in the first frame; A quantization parameter of the coding unit in the first frame is determined based on the intra-frame texture information of the coding unit in the first frame, a predetermined initial array of intra-frame texture thresholds, and an initial intermediate index of the initial array of intra-frame texture thresholds.

7. The method according to claim 6, characterized in that The determining of the quantization parameter of the coding unit in the first frame based on the intra-frame texture information of the coding unit in the first frame, a predetermined initial array of intra-frame texture thresholds, and an initial intermediate index of the initial array of intra-frame texture thresholds comprises: Determine two adjacent array elements in the initial array of intra-frame texture thresholds, whose value range includes the intra-frame texture information of the coding unit in the first frame; Determine a change value of a quantization parameter of the coding unit in the first frame based on a comparison result of the intra-frame texture information of the coding unit in the first frame with the array element value pointed to by the initial intermediate index and a sequence number of a smaller array element of the two adjacent array elements; The quantization parameter of the coding unit in the first frame is determined based on the change value of the quantization parameter of the coding unit in the first frame and a predetermined initial value of the quantization parameter of the coding unit in the first frame.

8. The method according to claim 7, characterized in that The step of determining the change value of the quantization parameter of the coding unit in the first frame based on the comparison result of the intra-frame texture information of the coding unit in the first frame with the array element value pointed to by the initial intermediate index and the sequence number of the smaller array element of the two adjacent array elements comprises: When the intra-frame texture information of the coding unit in the first frame is equal to the array element value pointed to by the initial intermediate index, determining that the change value is zero; When the intra-frame texture information of the coding unit in the first frame is not equal to the array element value pointed to by the intermediate index of the first frame, the change value is determined to be Delta2, where Delta2 is equal to the difference between i2 and the initial intermediate index, and i2 is the sequence number of the smaller array element.

9. A video coding bit rate control device, characterized in that: include: An acquisition module, used to acquire an extreme value and a mean value of the intra-frame texture information of a frame before a current frame, wherein the current frame is not a first frame; A first determination module, configured to determine an intra-frame texture threshold array of the current frame based on the extreme value; A second determination module is used to determine an intermediate index of the intra-frame texture threshold array based on the mean value, wherein the intermediate index is used to define a normal range in the intra-frame texture threshold array; A third determination module, used to determine intra-frame texture information of the coding unit in the current frame; The fourth determination module is used to determine the quantization parameter of the coding unit in the current frame based on the intra-frame texture information of the coding unit in the current frame, the intra-frame texture threshold array and the intermediate index.

10. The device according to claim 9, characterized in that The acquisition module is used to acquire the intra-frame texture information of the coding unit in the first frame; The fourth determination module is used to determine the quantization parameter of the coding unit in the first frame based on the intra-frame texture information of the coding unit in the first frame, a predetermined intra-frame texture threshold initial array and an initial intermediate index of the intra-frame texture threshold initial array.