CN116896636A - Code rate control method and device for self-adaptive variable code rate - Google Patents

Code rate control method and device for self-adaptive variable code rate Download PDF

Info

Publication number
CN116896636A
CN116896636A CN202310871472.3A CN202310871472A CN116896636A CN 116896636 A CN116896636 A CN 116896636A CN 202310871472 A CN202310871472 A CN 202310871472A CN 116896636 A CN116896636 A CN 116896636A
Authority
CN
China
Prior art keywords
video frame
bitrate
motion
coding
video
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310871472.3A
Other languages
Chinese (zh)
Inventor
刘鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ASR Microelectronics Co Ltd
Original Assignee
ASR Microelectronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ASR Microelectronics Co Ltd filed Critical ASR Microelectronics Co Ltd
Priority to CN202310871472.3A priority Critical patent/CN116896636A/en
Publication of CN116896636A publication Critical patent/CN116896636A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/19Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding using optimisation based on Lagrange multipliers

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a code rate control method of a self-adaptive variable code rate. And identifying the motion and static characteristics of the image blocks in the video frame by adopting a motion detection method, and further calculating the motion intensity of the video frame. And comparing the motion intensity of the video frame with an upper limit threshold value and a lower limit threshold value of the motion intensity set by a user, and calculating the pre-allocation coding bit number of the video frame according to a comparison result and a maximum code rate, a minimum code rate, a trigger code rate and a code rate fallback smoothing step length set by the user. Correcting the pre-allocated coding bit number of the video frame according to the coding state information of the video sequence to obtain the target coding bit number of the video frame. And performing target bit control operation on the video frame according to the target coding bit number of the video frame to obtain Lagrange multiplier and quantization parameters of the video frame, wherein the Lagrange multiplier and the quantization parameters are used for the actual coding process of the video frame. The invention flexibly configures different variable code rate control effects through intuitive and easily understood code rate control parameters.

Description

Code rate control method and device for self-adaptive variable code rate
Technical Field
The invention relates to a video coding technology, in particular to a code rate control method which is suitable for video monitoring scenes and is adaptive to variable code rates.
Background
Video coding is a technique that characterizes video information by compressing redundant components in video images and using as little data as possible. Common video coding standards are HEVC (High Efficiency Video Coding, high efficiency video coding, also known as h.265), AVC (Advanced Video Coding, advanced video coding, also known as h.264), etc.
Video coding techniques use image blocks as the most basic coding units. For example, in HEVC, a basic Unit of video Coding is a CU (Coding Unit). A CU may be an image block of 64 pixels by 64 pixels, 32 pixels by 32 pixels, 16 pixels by 16 pixels, 8 pixels by 8 pixels size. An image block of 64 pixels by 64 pixels size is also called LCU (Largest Coding Unit, maximum coding unit).
In order to increase the video compression rate as much as possible, a common video coding algorithm often adopts a lossy compression algorithm, so that the coded and reconstructed video is different from the original video (distortion is generated). Both HEVC and AVC belong to lossy compression algorithms. The coding performance of a lossy compression algorithm is commonly measured by the coding bit Rate (Rate) and the coding-induced Distortion (loss). In the video coding process, the coding bit rate R and the coding distortion D are mutually restricted and contradicted, and reducing the coding bit rate R tends to increase the coding distortion D, and reducing the coding distortion D tends to increase the coding bit rate R. Rate distortion optimization (Rate Distortion Optimization, RDO) is to reduce the coding distortion D as much as possible at a certain coding bit rate R or to reduce the coding bit rate R as much as possible at a certain coding distortion D. Common video coding algorithms all use a rate distortion optimization method based on lagrangian multipliers (Lagrange multiplier) λ, which is to obtain the minimum coding rate distortion Cost (Rate Distortion Cost, RD Cost) J, j=d+λ×r.
In video coding, each coding mode has coding distortion D and coding bit rate R, and coding rate distortion cost J for each coding mode can be calculated. When video coding is performed, the coding mode with the minimum coding rate distortion cost J is selected for coding, so that the optimal coding performance can be obtained. The process of selecting an optimal coding Mode for each image block to be coded by the encoder through a rate distortion optimization method is called Mode selection (Mode Decision) of the image block to be coded.
In order to remove information redundancy in the spatial domain and the time domain, an input video frame is encoded by adopting an intra-frame encoding technology and an inter-frame encoding technology during video encoding. Only intra-frame coding techniques are used to encode I-frames. The hybrid encoding is P-frames and B-frames using intra-frame and inter-frame coding techniques. The type of encoded frame is determined by the group of pictures (GOP, group Of Pictures) parameters set by the user.
In video surveillance scenes, a manner of periodically encoding I frames and encoding the rest of the video frames as P frames is generally adopted. This is because the I frame has an effect of blocking error propagation, and the coding efficiency of the P frame is high. The B frame adopts the two-way reference technology, so that the delay of encoding and decoding is larger, and the B frame is generally not used for scenes needing real-time transmission and display such as video monitoring. Fig. 1 illustrates a typical group of pictures structure of a video surveillance scene, containing only I and P frames, and no B frames.
In real life, the channel bandwidth capacity used to transmit video is limited. If the coding bit rate of the video is too high, the video transmission congestion and even packet loss are caused if the channel bandwidth capacity is exceeded. If the coding bit rate of the video is too low, the channel bandwidth is not fully utilized, and higher video quality cannot be obtained. Therefore, it is necessary to control the output code rate of the video encoder to match the channel bandwidth capacity using a code rate control technique.
Rate Control (Rate Control) is to adjust the coding parameters of the video encoder to make the output code Rate of the video encoder equal to the preset target code Rate, and to reduce the coding distortion as much as possible so as to improve the video coding quality. In a common rate control algorithm, a rate control task is generally realized through two links of target bit allocation and target bit control.
The target bit allocation links are typically performed at three levels, GOP (group of pictures, i.e., a set of temporally consecutive video frames), video frame level, and block level, respectively. The target bit allocation at GOP level is to obtain the target number of coded bits of GOP based on the target coded bit rate of video. The target bit allocation of the video frame level is to obtain the target coding bit number of each video frame in the GOP according to the target coding bit number of the GOP. The target bit allocation of the image block level is to obtain the target coding bit number of each image block in the video frame according to the target coding bit number of the video frame and the bit allocation weight of each image block in the video frame.
The target bit control links are typically performed at the video frame level and at the image block level. At the video frame level, a lagrangian multiplier λ and a quantization parameter (quantization parameter) QP for the video frame level are calculated from the target number of encoding bits of the video frame. At the image block level, the Lagrangian multiplier lambda and the quantization parameter QP of the image block level of the image block are calculated according to the target coding bit number of a certain image block, the Lagrangian multiplier lambda and the quantization parameter QP of the video frame level of the video frame to which the image block belongs and the Lagrangian multiplier lambda and the quantization parameter QP of the image block level of the previous coded image block, and are used for the video coding process of the image block.
Both the lagrangian multiplier λ and the quantization parameter QP are divided into video frame level and picture block level. The lagrangian multiplier λ and the quantization parameter QP at the video frame level are used in the target bit allocation and target bit control link at the video frame level (i.e., rate control at the video frame level), and the lagrangian multiplier λ and the quantization parameter QP at the image block level are used in the target bit allocation and target bit control link at the image block level (i.e., rate control at the image block level). The lagrangian multipliers at the video frame level are sometimes referred to simply as video frame level lagrangian multipliers, and lagrangian multipliers for video frames. The lagrangian multipliers at the image block level are sometimes simply referred to as image block level lagrangian multipliers, and lagrangian multipliers for image blocks. The abbreviation for quantization parameter and so on.
In a video surveillance scenario, a user typically only pays attention to video frames where motion events occur, and typically does not pay attention to video frames where no motion events occur. In this case, if a video monitoring scene is encoded using a constant code rate, not only a large amount of encoding bits are wasted on video frames which are not focused by the user and have no motion event, but also since the encoding code rate is fixed, when the motion event focused by the user occurs, the encoding code rate cannot be timely improved, so that the encoding quality of the video frames focused by the user and including the motion event cannot be improved.
Therefore, it is necessary to develop a rate control method with variable rate, which can automatically detect whether a motion event occurs according to the content of a video frame, and adjust the target number of encoding bits of the video frame accordingly. When no motion event occurs inside the video frame, a smaller target number of encoding bits is allocated to the video frame, so that the encoding rate (i.e., the number of encoding bits) is at a lower level, thereby saving the bandwidth for video storage and transmission. When a motion event occurs in the video frame, more target coding bits can be allocated to the video frame according to the intensity of the motion, so that the coding rate is at a higher level, and the coding quality of the video is improved. In this way, not only is bandwidth saved, but also the coding quality of the video content of interest to the user is improved.
Currently, some technical solutions have been used to perform variable rate coding on video surveillance scenes.
One common approach is to set MaxBitrate, changePos, minStillPercent, maxQp and MinQp by the user and detect the motion stationary state of the current scene by the video encoder. MaxBitrate represents the maximum code rate in a motion scene. ChangePos is a percentage relative to MaxBitrate for controlling the rate threshold reference for starting to adjust the quantization parameters of the video frame. MinStillPercent represents the percentage of the minimum code rate in the stationary state relative to the code rate threshold reference, and MaxBitRate×ChangePos×MinStillPercent represents the minimum code rate in the stationary scene. MaxQp and MinQp represent the maximum quantization parameter and minimum quantization parameter, respectively, that can be used in the video frame encoding process. When the coding rate is greater than maxbittrate×changepos, the quantization parameter of the video frame is gradually adjusted to MaxQp. If the quantization parameter of the video frame reaches MaxQp, the video frame is fixed at MaxQp, and the limiting effect of maxbittate is lost, and the coding rate may exceed maxbittate. If the coding rate is smaller than maxbittrate×changepos, the quantization parameter of the video frame is gradually adjusted to MinQp. If the quantization parameter of the video frame reaches MinQp, the coding rate reaches the maximum value, and the image quality is the best.
The scheme can achieve the effect of variable code rate coding, adopts lower code rate coding when no motion event occurs, and adopts higher code rate coding when the motion event occurs. However, this approach has the disadvantage that the user configuration parameters are not intuitive and not flexible enough to use. In addition, in this scheme, there is a correlation between the configuration parameters MaxQp and MinQp and MaxBitrate, and if the configurations of MaxQp and MinQp are not suitable, it is very easy to happen that the actual coding rate exceeds the maximum coding rate (i.e., maxBitrate) in a motion scene, or the actual coding rate cannot reach the minimum coding rate (i.e., maxbitrate×changepos×minstillpercentage) in a still scene.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: how to flexibly configure different variable code rate control effects through intuitive and understandable code rate control parameters.
In order to solve the technical problems, the invention provides a code rate control method of a self-adaptive variable code rate, which comprises the following steps. Step S1: and identifying the motion and static characteristics of the image blocks in the video frame by adopting a motion detection method, and further calculating the motion intensity of the video frame. Step S2: the motion intensity of the video frame is combined with a motion intensity upper limit threshold MovStrength set by a user high Lower threshold MovStrength for exercise intensity low Comparing, and setting the maximum bit rate BitRate according to the comparison result max Minimum code rate BitRate min Bit rate of trigger bit trig The bit rate fallback smoothing step bitratatesp is used to calculate the pre-allocated number of coded bits for the video frame. Step S3: and if the motion intensity of the video frame is lower than the motion intensity lower limit threshold or higher than the motion intensity upper limit threshold, correcting the pre-allocated coding bit number of the video frame according to the coding state information of the video sequence to obtain the target coding bit number of the video frame. If the motion intensity of the video frame is between the lower motion intensity threshold and the upper motion intensity threshold, directly using the pre-allocated coding bit number of the video frame as the target of the video frameThe number of coded bits. Step S4: and performing target bit control operation on the video frame according to the target coding bit number of the video frame to obtain Lagrange multiplier and quantization parameters of the video frame, wherein the Lagrange multiplier and the quantization parameters are used for the actual coding process of the video frame.
Further, in the step S1, any one or more of the following motion detection methods are adopted to determine the motion and the still feature of the image block in the video frame, namely, a frame difference method, a background subtraction method, an optical flow method, a mixed gaussian model GMM method and a motion detection method based on machine learning.
In the step S1, the frame difference method is used to determine the motion and the still characteristic of the image block in the video frame, which specifically includes the following: firstly, dividing a video frame into a plurality of image blocks with the same size, and dividing the inside of each image block into a plurality of image sub-blocks with the same size, wherein each image sub-block comprises a plurality of pixel points with the same number. The image blocks in the video frame and the image blocks in the same position in the reference frame are subjected to frame difference, the brightness difference value of each pixel point in the image blocks in the video frame is calculated, and the brightness difference value is compared with a motion pixel judgment threshold value; if the brightness difference value of the pixel point is larger than the motion pixel judgment threshold value, the pixel point is marked as a motion pixel point; otherwise, the pixel is marked as a stationary pixel. If the number of the moving pixel points in the image sub-block is larger than the judging threshold value of the moving image sub-block, marking the image sub-block as the moving image sub-block; otherwise, this image sub-block is marked as a still image sub-block. If the number of the moving image sub-blocks in the image block is larger than the judging threshold value of the moving image block, marking the image block as the moving image block; otherwise, this image block is marked as a still image block.
Further, in the step S1, after determining the motion and the still characteristics of each image block in the video frame, the motion intensity MovStrength of the video frame is further calculated;wherein Block mov Representing the number of moving image blocks in a video frame, block total Representing images in video framesTotal number of blocks.
Further, in the step S2, a motion intensity lower threshold MovStrength low The physical meaning of (2) is: when the motion intensity of the video frame is more than or equal to the motion intensity lower limit threshold value, judging that a motion event occurs in the video frame; otherwise, judging that no motion event occurs in the video frame; when no motion event occurs in the video frame, the video coding rate needs to be kept to the minimum bit rate BitRate set by the user min . Motion intensity upper limit threshold MovStrength high The physical meaning of (2) is: when the motion intensity of the video frame > the motion intensity upper threshold, the video encoding rate needs to be maintained at the maximum rate BitRate set for the user max . Maximum code rate BitRate max The physical meaning of (2) is: the maximum coding bit rate that can be achieved when motion events occur in a video frame; minimum code rate BitRate min The physical meaning of (2) is: minimum coding bit rate required to be maintained when no motion events occur in the video frame; needs to meet BitRate min <BitRate max . Triggering code rate BitRate trig The physical meaning of (2) is: the minimum coding bit rate that needs to be achieved when a motion event occurs in a video frame; needs to meet BitRate min ≤BitRate trig ≤BitRate max . The physical meaning of the bit rate fallback smoothing step length bitratesetep is: when a motion event in a video frame disappears, the video coding rate of the next several video frames needs to gradually decrease from the coding rate when a motion event occurs to the minimum bit rate BitRate when no motion event occurs min The bitratesetep is the number of video frames that are used to smooth the video coding quality.
Further, in the step S2, the following is specifically included. (1) If MovStrength < MovStrength low And judging that no motion event occurs in the video frame, and keeping the target coding rate BitRate at BitRate min . (2) If MovStrength low ≤MovStrength≤MovStrength high Determining that a motion event occurs in a video frame, and determining that a target coding rate BitRate is from BitRate min Lifting to BitRate trig And BitRate max In between, it takes on specific valuesIs in direct proportion to the value of MovStrength. (3) If MovStrength > MovStrength high Determining that motion event occurs in video frame, and keeping target coding rate at BitRate max . (4) If there is a motion event in the previous video frame and the motion event in the current video frame disappears, the target coding rate BitRate of the current video frame and several consecutive video frames following the current video frame requires the coding rate BitRate from the previous video frame rec Gradually decrease to BitRate min This phase is called the transition phase after the disappearance of the motion event; the current video frame is the 1 st frame for smoothing video coding quality, and the target coding rate BitRate for the m-th frame for smoothing video coding quality is: (5) In a transition stage after the motion event disappears, if a motion event occurs again in a certain video frame, the transition stage is immediately stopped, and the target coding rate BitRate corresponding to the video frame is calculated according to (2) or (3) according to MovStrength corresponding to the video frame. After calculating the target coding rate BitRate according to the motion intensity of the video frame, further calculating the pre-allocated coding bit number FrameBits of the video frame pre The method comprises the steps of carrying out a first treatment on the surface of the The coding frame rate is represented by FrameRate, < >>
Further, in the step S2, movStrength low And MovStrength high The smaller the bit rate control, the more sensitive the bit rate control is to the perception of motion events; movStrength low And MovStrength high The larger the bit rate control, the less perceived the motion event.
Further, in the step S2, when BitRate min <BitRate trig <BitRate max When a motion event occurs, the video frame coding rate is determined from BitRate min Step to BitRate trig And then againAt BitRate based on motion intensity of video frames trig And BitRate max Linear adjustment is performed; when motion events disappear, the video frame coding rate is from BitRate rec Gradually decrease to BitRate min . When BitRate min =BitRate trig <BitRate max When a motion event occurs, the video frame coding rate is controlled to be BitRate according to the motion intensity of the video frame min And BitRate max Linear adjustment is performed; when motion events disappear, the video frame coding rate is from BitRate rec Gradually decrease to BitRate min . When BitRate min <BitRate trig =BitRate max When a motion event occurs, the video frame coding rate immediately follows BitRate min Step to BitRate max And remains at BitRate until the motion event disappears max Unchanged; when motion events disappear, the video frame coding rate is from BitRate max Gradually decrease to BitRate min
Further, in the step S3, when the motion intensity of the video frame is lower than the motion intensity lower limit threshold or when the motion intensity of the video frame is higher than the motion intensity upper limit threshold, an error between the actual encoding bit number of the video frame and the target encoding bit number calculated before encoding is compensated in a sliding window formed by a plurality of subsequent continuous video frames, so that the actual encoding code rate of the video sequence approaches to the target encoding code rate set by the user; in the sliding window, the number of frames of the continuous video frames contained therein is called the sliding window size, and N is used sw A representation; by Bits coded Representing the actual number of coded bits, N, of all video frames in a video sequence that have been coded at a current target coding rate coded Representing the number of frames of a video frame in the video sequence that has been encoded at the current target encoding rate, and the frame bits represents the target encoding bit number of the corrected video frame, the frame bits is calculated by the following formula:
the invention also provides a self-adaptive variable codeThe code rate control device of the rate comprises a video frame motion intensity calculation module, a video frame bit pre-allocation module, a video frame bit correction module and a video frame bit control module. The video frame motion intensity calculation module is used for identifying motion and static characteristics of image blocks in the video frame by adopting a motion detection method, so as to calculate the motion intensity of the video frame. The video frame bit pre-allocation module is used for pre-allocating the motion intensity of the video frame to a motion intensity upper limit threshold MovStrength set by a user high Lower threshold MovStrength for exercise intensity low Comparing, and setting the maximum bit rate BitRate according to the comparison result max Minimum code rate BitRate min Bit rate of trigger bit trig The bit rate fallback smoothing step bitratatesp is used to calculate the pre-allocated number of coded bits for the video frame. The video frame bit correction module is used for correcting the pre-allocated coding bit number of the video frame according to the coding state information of the video sequence when the motion intensity of the video frame is lower than a motion intensity lower limit threshold value or higher than a motion intensity upper limit threshold value, so as to obtain the target coding bit number of the video frame; and is further configured to directly use the pre-allocated number of encoding bits of the video frame as the target number of encoding bits of the video frame when the motion strength of the video frame is between the motion strength lower threshold and the motion strength upper threshold. The video frame bit control module is used for carrying out target bit control operation on the video frame according to the target coding bit number of the video frame to obtain Lagrangian multipliers and quantization parameters of the video frame, and the Lagrangian multipliers and quantization parameters are used for the actual coding process of the video frame.
The invention has the technical effects that: the proposed code rate control of the self-adaptive variable code rate is particularly suitable for video monitoring scenes; by setting MovStrength low And MovStrength high To adjust the sensitivity of the rate control to motion events; by setting BitRate trig To realize different code rate control effects; finally, the motion event in the video frame is automatically detected, the motion intensity is calculated, and the target coding bit number of the video frame is correspondingly adjusted.
Drawings
Fig. 1 is a schematic diagram of an exemplary image group structure of a video surveillance scene.
Fig. 2 is a flow chart of a code rate control method of adaptive variable code rate according to the present invention.
FIGS. 3-5 are bitrates trig Schematic diagram of three different code rate control processes generated by different values.
Fig. 6 is a schematic structural diagram of a rate control device with adaptive variable rate according to the present invention.
The reference numerals in the drawings illustrate: the video frame motion intensity calculating module 1, the video frame bit pre-distributing module 2, the video frame bit correcting module 3 and the video frame bit controlling module 4.
Detailed Description
Referring to fig. 2, the method for controlling the code rate of the adaptive variable code rate according to the present invention includes the following steps.
Step S1: and identifying the motion and static characteristics of the image blocks in the video frame by adopting a motion detection method, and further calculating the motion intensity of the video frame.
In this step, there are many methods for detecting the motion of the image block and determining the motion and still characteristics of the image block. Among the more commonly and widely used motion detection methods are a frame difference method (Frame Diff Method), a background subtraction method (Background Subtraction Method), an optical flow method (Optical Flow Method), a GMM gaussian mixture model method (Gaussian Mixture Model), a Machine Learning (Machine Learning) based motion detection method, and the like.
The present invention exemplarily gives a detailed description of determining motion and still characteristics of an image block by a frame difference method. Firstly, dividing a video frame into a plurality of image blocks with the same size, and dividing the inside of each image block into a plurality of image sub-blocks with the same size, wherein each image sub-block comprises a plurality of pixel points with the same number. The motion and still characteristics of each image block within the video frame are then determined, as follows. (1) And carrying out frame difference on the image blocks in the video frame and the image blocks in the same position in the reference frame, calculating the brightness difference value of each pixel point in the image blocks in the video frame, and comparing the brightness difference value with a motion pixel judgment threshold value. If the brightness difference value of the pixel point is larger than the motion pixel judgment threshold value, the pixel point is marked as a motion pixel point; otherwise, the pixel is marked as a stationary pixel. The reference frame refers to a reconstructed video frame of a previously encoded video frame, and can be used for motion estimation of image blocks in the video frame to be encoded by adopting an inter-frame prediction technology, so as to remove information redundancy in the time domain. (2) After the motion and static characteristics of each pixel point in the image block are marked, the expansion and corrosion operation based on the image sub-block is needed to highlight the motion characteristics of the image and eliminate the image noise points, so that the influence of missed judgment and misjudgment is reduced. Expansion (displacement) and Erosion (Erosion) of an image are two basic morphological operations that are mainly used to find the largest and smallest areas in an image. Wherein the expansion is similar to "field dilation", i.e. the expansion of the highlighted or white portion of the image, with a larger running result than the highlighted area of the original. Erosion is similar to "field predation", i.e., the highlighting or white portions of an image are thinned and reduced, with the running result being smaller than the highlighting of the original. The method is characterized in that the number of motion pixel points in each image sub-block inside the image block is counted. If the number of the moving pixel points in the image sub-block is larger than the judging threshold value of the moving image sub-block, marking the image sub-block as the moving image sub-block; otherwise, this image sub-block is marked as a still image sub-block. (3) After the motion and static characteristics of each image sub-block in the image block are marked, the number of the motion image sub-blocks in the image block is counted. If the number of the moving image sub-blocks in the image block is larger than the judging threshold value of the moving image block, marking the image block as the moving image block; otherwise, this image block is marked as a still image block. The specific values of the motion pixel decision threshold, the motion image sub-block decision threshold and the motion image block decision threshold come from experimental experience, and are related to the sensitivity of the frame difference method to motion, the total number of pixels contained in the image sub-block and the total number of pixels contained in the image block.
After the motion and static characteristics of each image block in the video frame are determined, the motion intensity of the video frame is further calculated. By MovStrength represents the motion intensity of video frames, block mov Representing the number of moving image blocks in a video frame, block total Representing the total number of image blocks in the video frame, the motion strength of the video frame is: it can be seen that the value of MovStrength is 0.ltoreq.MovStrength.ltoreq.100.
Step S2: the motion intensity of the video frame is combined with a motion intensity upper limit threshold MovStrength set by a user high Lower threshold MovStrength for exercise intensity low Comparing, and setting the maximum bit rate BitRate according to the comparison result max Minimum code rate BitRate min Bit rate of trigger bit trig The bit rate fallback smoothing step bitratatesp is used to calculate the pre-allocated number of coded bits for the video frame. The code rate is the code bit rate.
Motion intensity lower threshold MovStrength low The physical meaning of (2) is: when the motion intensity of the video frame is equal to or greater than a motion intensity lower limit threshold value, judging that a motion event occurs in the video frame; otherwise, judging that no motion event occurs in the video frame. When no motion event occurs in the video frame, the video coding rate needs to be kept to the minimum bit rate BitRate set by the user min 。MovStrength low The value range of (2) is equal to or more than 0 and equal to or less than MovStrength low <100。MovStrength low The smaller the value, the more sensitive the code rate control is to the perception of the motion event, and the smaller motion event can trigger the rising of the code rate of the video coding. MovStrength low The larger the value is, the less the perception of the motion event is controlled by the code rate, and the larger motion event can trigger the rising of the video coding code rate.
Motion intensity upper limit threshold MovStrength high The physical meaning of (2) is: when the motion intensity of the video frame is greater than the motion intensity upper threshold, the video encoding rate needs to be maintained at the maximum rate BitRate set for the user max Cannot exceed the user's settingAnd setting the maximum code rate. MovStrength high The value range of (2) is MovStrength low <MovStrength high ≤100。MovStrength high The smaller the value, the more sensitive the code rate control is to the perception of the motion event, and the smaller motion event can enable the video coding code rate to reach the maximum code rate set by a user. MovStrength high The larger the value is, the less the perception of the motion event is controlled by the code rate, and the larger motion event can enable the video coding code rate to reach the maximum code rate set by a user.
Maximum code rate BitRate max The physical meaning of (2) is: the maximum coding bit rate (in bps) that can be achieved when motion events occur in a video frame. Minimum code rate BitRate min The physical meaning of (2) is: the minimum coding bit rate (in bps) that needs to be maintained when no motion events occur in the video frame. The user needs to meet BitRate when setting min <BitRate max
Triggering code rate BitRate trig The physical meaning of (2) is: at least the minimum coding bit rate (in bps) that needs to be achieved when a motion event occurs in a video frame. The user needs to meet BitRate when setting min ≤BitRate trig ≤BitRate max . Thus, when a motion event occurs in a video frame, the video encoding bit rate is triggered to be controlled from BitRate min Jump to BitRate trig Or BitRate trig Above.
The physical meaning of the bit rate fallback smoothing step length bitratesetep is: when a motion event in a video frame disappears, the video coding rate of the next several video frames needs to be changed from the coding rate when a motion event occurs (greater than or equal to BitRate trig ) Gradually decreasing to the minimum bit rate BitRate at which no motion event occurs min So as to avoid the rapid reduction of the coding rate of the video frames and the sudden drop of the video coding quality. The bitratesetep is the number of video frames that are used to smooth the video coding quality.
The step S2 specifically includes the following.
(1) If MovStrength<MovStrength low It is determined that no motion event occurs in the video frame, and the target coding rate BitRate needs to be maintained at BitRate min The method comprises the following steps: bitrate=bitrate min
(2) If MovStrength low ≤MovStrength≤MovStrength high Determining that a motion event occurs in a video frame, and determining that a target coding rate BitRate is from BitRate min Lifting to BitRate trig And BitRate max The specific value of the method is in direct proportion to the value of MovStrength, and the method is calculated by the following formula:
(3) If MovStrength > MovStrength high Determining that a motion event occurs in a video frame, wherein a target coding rate needs to be kept at BitRate max The method comprises the following steps: bitrate=bitrate max
(4) If there is a motion event in the previous video frame (i.e., the previous video frame satisfies MovStrength. Gtoreq. MovStrength) low ) And the motion event disappears in the current video frame (i.e. the current video frame satisfies MovStrength < MovStrength) low ) The target coding rate BitRate of the current video frame and its subsequent consecutive video frames requires the coding rate BitRate from the previous video frame rec Gradually decrease to BitRate min To avoid causing video coding quality dips. This phase is simply referred to as the transition phase after the disappearance of the motion event. The number of video frames used to smooth the video coding quality is determined by the value of bitratesetep. The current video frame is the 1 st frame for smoothing video coding quality, and the target coding rate BitRate for the m-th frame for smoothing video coding quality is: Wherein m is more than or equal to 1 and less than or equal to BitRastep.
(5) In a transition stage after the motion event disappears, if a motion event occurs again in a certain video frame, the transition stage is immediately stopped, and the target coding rate BitRate corresponding to the video frame is calculated according to (2) or (3) according to MovStrength corresponding to the video frame.
After calculating the target coding rate BitRate according to the motion intensity of the video frame, further calculating the pre-allocated coding bit number FrameBits of the video frame pre . The encoded frame rate is represented by the FrameRate,
step S3: and if the motion intensity of the video frame is lower than the motion intensity lower limit threshold or higher than the motion intensity upper limit threshold, correcting the pre-allocated coding bit number of the video frame according to the coding state information of the video sequence to obtain the target coding bit number of the video frame. If the motion intensity of the video frame is between the motion intensity lower limit threshold value and the motion intensity upper limit threshold value, the pre-allocated coding bit number of the video frame is directly used as the target coding bit number of the video frame. In this step, only when the motion intensity of the video frame is lower than the lower limit threshold or higher than the upper limit threshold of the motion intensity, the correction work is performed; otherwise, the correction work is not performed.
When the motion intensity of the video frame is lower than the motion intensity lower threshold, the target encoding code rate BitRate needs to be maintained as the minimum code rate BitRate set by the user min . When the motion intensity of the video frame is higher than the motion intensity upper threshold, the target encoding rate BitRate needs to be maintained at the maximum rate BitRate set for the user max . In both cases, the target coding rate BitRate of the video sequence needs to be maintained at a constant value. However, in the video encoding process, when encoding a video frame is completed, there is often an error between the actual encoding bit number and the target encoding bit number calculated before encoding, and if compensation is not performed in the encoding process of the subsequent video frame, the target encoding rate of the video sequence is difficult to maintain at a constant value。
In this step, the error between the actual number of coded bits of the video frame and the target number of coded bits calculated before encoding is compensated in a sliding window consisting of a plurality of subsequent consecutive video frames, so that the actual coding rate of the video sequence approaches the target coding rate set by the user. In the sliding window, the number of frames of the continuous video frames contained therein is called the sliding window size, and N is used sw And (3) representing. By Bits coded Representing the actual number of coded bits, N, of all video frames in a video sequence that have been coded at a current target coding rate coded Representing the number of frames in the video sequence of video frames that have been encoded at the current target encoding rate. Bits coded And N coded The value of (2) is continuously updated along with the progress of the video sequence coding process, and the coding state of the video sequence is reflected. The frame bits is used to represent the target number of encoding bits of the corrected video frame, and can be calculated by the following formula:
step S4: and performing target bit control operation on the video frame according to the target coding bit number of the video frame to obtain Lagrange multiplier and quantization parameters of the video frame, wherein the Lagrange multiplier and the quantization parameters are used for the actual coding process of the video frame. In this step, the target bit control algorithm may have various choices, such as JCTVC-K0103 proposal, and the like, which will not be described herein.
In the step S2, movStrength low 、MovStrength high 、BitRate max 、BitRate min 、BitRate trig Bitratesetep belongs to a user-configured parameter. By modifying the parameters, the user can obtain different code rate control effects and flexibly adapt to various use scenes.
For example, if the user wishes that rate control is more sensitive to the perception of motion events, a smaller MovStrength may be set low And MovStrength high The small motion can trigger the rising of the video coding rate and reach the maximum rate faster. If the user wishes the rate control pairThe perception of the motion event is relatively insensitive, a larger MovStrength can be set low And MovStrength high The larger motion can trigger the rising of the video coding rate and reach the maximum rate more slowly.
As another example, the user adjusts BitRate trig To realize different code rate control effects. The BitRate is shown below trig Three different code rate control effects are generated by different values of the code rate control system.
User configured BitRate trig Is the first value of (a): bitRate min <BitRate trig <BitRate max . In this case, when a motion event occurs, the video frame coding rate will be from BitRate min Step to BitRate trig Then according to the motion intensity of the video frame, the video frame is processed in the BitRate trig And BitRate max Linear adjustment between. When motion events disappear, the video frame coding rate will be derived from BitRate rec Gradually decrease to BitRate min Avoiding the coding quality from suddenly dropping. This configuration mode is suitable for the case where the user's attention to the sport event is moderate, and the attention to the bandwidth saving is moderate. The rate control procedure of this configuration is shown in fig. 3.
User configured BitRate trig Is the second value of (2): bitRate min =BitRate trig <BitRate max . In this case, when a motion event occurs, the video frame encoding rate does not change stepwise, but depends on the motion intensity of the video frame, at BitRate min And BitRate max Linear adjustment between. When motion events disappear, the video frame coding rate will be derived from BitRate rec Gradually decrease to BitRate min Avoiding the coding quality from suddenly dropping. But due to BitRate min =BitRate trig The transition phase after the disappearance of the movement event is not obvious. This configuration mode is suitable for situations where the user's attention to motion events is low and the bandwidth saving is high. The rate control procedure of this configuration is shown in fig. 4.
User configured BitRate trig The third value of (2): bitRate min <BitRate trig =BitRate max . In this case, when a motion event occurs, the video frame coding rate is immediately determined from BitRate min Step to BitRate max And remains at BitRate until the motion event disappears max Is unchanged. When motion events disappear, the video frame coding rate will be derived from BitRate max Gradually decrease to BitRate min Avoiding the coding quality from suddenly dropping. This configuration mode is suitable for situations where the user's attention to motion events is high and the bandwidth saving is low. The rate control procedure of this configuration is shown in fig. 5.
As can be seen from fig. 3 to fig. 5, the user can implement different variable rate control effects by modifying the configuration parameters of the rate control method in the present invention, and flexibly adapt to different usage scenarios. The code rate configuration parameters are visual and easy to understand, and are convenient for users to understand and configure.
Referring to fig. 6, the rate control device of the adaptive variable rate according to the present invention includes a video frame motion intensity calculation module 1, a video frame bit pre-allocation module 2, a video frame bit correction module 3, and a video frame bit control module 4. The apparatus shown in fig. 6 corresponds to the method shown in fig. 2.
The video frame motion intensity calculation module 1 is used for identifying motion and static characteristics of image blocks in a video frame by adopting a motion detection method, so as to calculate the motion intensity of the video frame.
The video frame bit pre-allocation module 2 is used for pre-allocating the motion intensity of the video frame to a user-set motion intensity upper limit threshold MovStrength high Lower threshold MovStrength for exercise intensity low Comparing, and setting the maximum bit rate BitRate according to the comparison result max Minimum code rate BitRate min Bit rate of trigger bit trig The bit rate fallback smoothing step bitratatesp is used to calculate the pre-allocated number of coded bits for the video frame. The code rate is the code bit rate.
The video frame bit correction module 3 is configured to correct, according to coding state information of a video sequence, a pre-allocated coding bit number of a video frame to obtain a target coding bit number of the video frame when motion intensity of the video frame is lower than a motion intensity lower limit threshold or higher than a motion intensity upper limit threshold; and is further configured to directly use the pre-allocated number of encoding bits of the video frame as the target number of encoding bits of the video frame when the motion strength of the video frame is between the motion strength lower threshold and the motion strength upper threshold.
The video frame bit control module 4 is configured to perform a target bit control operation on a video frame according to a target encoding bit number of the video frame, to obtain a lagrangian multiplier and quantization parameters of the video frame, and to use the lagrangian multiplier and quantization parameters in an actual encoding process of the video frame.
The invention provides a code rate control method which is suitable for video monitoring scenes and is adaptive to variable code rates. The method provided by the invention can automatically detect the occurrence of the motion event and the motion intensity thereof according to the content of the video frame, and correspondingly adjust the target coding bit number of the video frame. When no motion event occurs in the video frame, a smaller target coding bit number is allocated to the video frame, so that the coding rate is at a lower level, and the bandwidth for video storage and transmission is saved. When a motion event occurs in the video frame, more target coding bits can be allocated to the video frame according to the intensity of the motion, so that the coding rate is at a higher level, and the coding quality of the video is improved. In this way, the purposes of saving bandwidth and improving the coding quality of the video content focused by the user are achieved. Compared with other variable code rate control methods, the method provided by the invention has the advantages that the code rate control parameters are visual and easy to understand, different variable code rate control effects can be flexibly configured, and the use scene is more various.
The above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Various modifications and variations of the present invention will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A code rate control method of self-adaptive variable code rate is characterized by comprising the following steps of;
step S1: identifying the motion and static characteristics of image blocks in the video frame by adopting a motion detection method, and further calculating the motion intensity of the video frame;
step S2: the motion intensity of the video frame is combined with a motion intensity upper limit threshold MovStrength set by a user high Lower threshold MovStrength for exercise intensity low Comparing, and setting the maximum bit rate BitRate according to the comparison result max Minimum code rate BitRate min Bit rate of trigger bit trig Calculating the pre-allocation coding bit number of the video frame by using the bit rate fallback smoothing step length bitrateStep;
step S3: if the motion intensity of the video frame is lower than the motion intensity lower limit threshold or higher than the motion intensity upper limit threshold, correcting the pre-allocated coding bit number of the video frame according to the coding state information of the video sequence to obtain the target coding bit number of the video frame;
If the motion intensity of the video frame is between the motion intensity lower limit threshold value and the motion intensity upper limit threshold value, directly using the pre-allocated coding bit number of the video frame as the target coding bit number of the video frame;
step S4: and performing target bit control operation on the video frame according to the target coding bit number of the video frame to obtain Lagrange multiplier and quantization parameters of the video frame, wherein the Lagrange multiplier and the quantization parameters are used for the actual coding process of the video frame.
2. The method according to claim 1, wherein in the step S1, any one or more of the following motion detection methods are adopted to determine motion, stationary characteristics of image blocks in the video frame, namely, a frame difference method, a background subtraction method, an optical flow method, a gaussian mixture model GMM method, and a motion detection method based on machine learning.
3. The method for controlling the adaptive variable code rate according to claim 2, wherein in the step S1, a frame difference method is adopted to determine the motion and the static characteristics of the image blocks in the video frame, and the method specifically comprises the following steps:
firstly, dividing a video frame into a plurality of image blocks with the same size, wherein each image block is internally divided into a plurality of image sub-blocks with the same size, and each image sub-block comprises a plurality of pixel points with the same number;
The image blocks in the video frame and the image blocks in the same position in the reference frame are subjected to frame difference, the brightness difference value of each pixel point in the image blocks in the video frame is calculated, and the brightness difference value is compared with a motion pixel judgment threshold value; if the brightness difference value of the pixel point is larger than the motion pixel judgment threshold value, the pixel point is marked as a motion pixel point; otherwise, the pixel point is marked as a static pixel point;
if the number of the moving pixel points in the image sub-block is larger than the judging threshold value of the moving image sub-block, marking the image sub-block as the moving image sub-block; otherwise, marking the image sub-block as a still image sub-block;
if the number of the moving image sub-blocks in the image block is larger than the judging threshold value of the moving image block, marking the image block as the moving image block; otherwise, this image block is marked as a still image block.
4. The method according to claim 1, wherein in the step S1, after determining the motion and the still characteristics of each image block in the video frame, the motion intensity of the video frame is calculated
Number, block total Representing the total number of image blocks in a video frame.
5. The method for controlling the adaptive variable code rate according to claim 1, wherein in the step S2, the motion strength lower threshold MovStrength is low The physical meaning of (2) is: when the motion intensity of the video frame is more than or equal to the motion intensity lower limit threshold value, judging that a motion event occurs in the video frame; otherwise, determining videoNo motion event occurs in the frame; when no motion event occurs in the video frame, the video coding rate needs to be kept to the minimum bit rate BitRate set by the user min
Motion intensity upper limit threshold MovStrength high The physical meaning of (2) is: when the motion intensity of the video frame > the motion intensity upper threshold, the video encoding rate needs to be maintained at the maximum rate BitRate set for the user max
Maximum code rate BitRate max The physical meaning of (2) is: the maximum coding bit rate that can be achieved when motion events occur in a video frame; minimum code rate BitRate min The physical meaning of (2) is: minimum coding bit rate required to be maintained when no motion events occur in the video frame; needs to meet BitRate min <BitRate max
Triggering code rate BitRate trig The physical meaning of (2) is: the minimum coding bit rate that needs to be achieved when a motion event occurs in a video frame; needs to meet BitRate min ≤BitRate trig ≤BitRate max
The physical meaning of the bit rate fallback smoothing step length bitratesetep is: when a motion event in a video frame disappears, the video coding rate of the next several video frames needs to gradually decrease from the coding rate when a motion event occurs to the minimum bit rate BitRate when no motion event occurs min The bitratesetep is the number of video frames that are used to smooth the video coding quality.
6. The method for controlling the adaptive variable code rate according to claim 5, wherein in step S2, the following is specifically included;
(1) If MovStrength < MovStrength low And judging that no motion event occurs in the video frame, and keeping the target coding rate BitRate at BitRate min
(2) If MovStrength low ≤MovStrength≤MovStrength high Determining that a motion event occurs in a video frame, and determining that a target coding rate BitRate is from BitRate min Lifting to BitRate trig And BitRate max The specific value of the value is in direct proportion to the value of MovStrength;
(3) If MovStrength > MovStrength high Determining that motion event occurs in video frame, and keeping target coding rate at BitRate max
(4) If there is a motion event in the previous video frame and the motion event in the current video frame disappears, the target coding rate BitRate of the current video frame and several consecutive video frames following the current video frame requires the coding rate BitRate from the previous video frame rec Gradually decrease to BitRate min This phase is called the transition phase after the disappearance of the motion event; the current video frame is the 1 st frame for smoothing video coding quality, and the target coding rate BitRate for the m-th frame for smoothing video coding quality is:
(5) In a transition stage after the motion event disappears, if a motion event occurs again in a certain video frame, immediately stopping the transition stage, and calculating a target coding rate BitRate corresponding to the video frame according to MovStrength corresponding to the video frame, wherein the MovStrength is calculated according to (2) or (3);
after calculating the target coding rate BitRate according to the motion intensity of the video frame, further calculating the pre-allocated coding bit number FrameBits of the video frame pre The method comprises the steps of carrying out a first treatment on the surface of the The encoded frame rate is represented by the FrameRate,
7. the method for adaptive variable rate control according to claim 5, wherein in step S2, movStrength low And MovStrength high The smaller the bit rate control, the more sensitive the bit rate control is to the perception of motion events; movStrength low And MovStrength high The larger the bit rate control, the less perceived the motion event.
8. The method for adaptive variable rate control according to claim 6, wherein in the step S2, when BitRate min <BitRate trig <BitRate max When a motion event occurs, the video frame coding rate is determined from BitRate min Step to BitRate trig Then according to the motion intensity of the video frame, the video frame is processed at the BitRate trig And BitRate max Linear adjustment is performed; when motion events disappear, the video frame coding rate is from BitRate rec Gradually decrease to BitRate min
When BitRate min =BitRate trig <BitRate max When a motion event occurs, the video frame coding rate is controlled to be BitRate according to the motion intensity of the video frame min And BitRate max Linear adjustment is performed; when motion events disappear, the video frame coding rate is from BitRate rec Gradually decrease to BitRate min
When BitRate min <BitRate trig =BitRate max When a motion event occurs, the video frame coding rate immediately follows BitRate min Step to BitRate max And remains at BitRate until the motion event disappears max Unchanged; when motion events disappear, the video frame coding rate is from BitRate max Gradually decrease to BitRate min
9. The method according to claim 1, wherein in the step S3, when the motion intensity of the video frame is lower than the motion intensity lower threshold or when the motion intensity of the video frame is higher than the motion intensity upper threshold, an error between the actual encoding bit number of the video frame and the target encoding bit number calculated before encoding is compensated in a sliding window formed by a plurality of subsequent continuous video frames so that the actual encoding bit rate of the video sequence approaches the target encoding bit rate set by the user; in the sliding window, the number of frames of the continuous video frames contained therein is called the sliding window size, and N is used sw A representation; by Bits coded Representation ofThe actual number of coded bits, N, of all video frames in a video sequence that have been coded at a current target coding rate coded Representing the number of frames of a video frame in the video sequence that has been encoded at the current target encoding rate, and the frame bits represents the target encoding bit number of the corrected video frame, the frame bits is calculated by the following formula:
10. the self-adaptive variable code rate control device is characterized by comprising a video frame motion intensity calculation module, a video frame bit pre-allocation module, a video frame bit correction module and a video frame bit control module;
the video frame motion intensity calculation module is used for identifying motion and static characteristics of image blocks in the video frame by adopting a motion detection method, so as to calculate the motion intensity of the video frame;
the video frame bit pre-allocation module is used for pre-allocating the motion intensity of the video frame to a motion intensity upper limit threshold MovStrength set by a user high Lower threshold MovStrength for exercise intensity low Comparing, and setting the maximum bit rate BitRate according to the comparison result max Minimum code rate BitRate min Bit rate of trigger bit trig Calculating the pre-allocation coding bit number of the video frame by using the bit rate fallback smoothing step length bitrateStep;
The video frame bit correction module is used for correcting the pre-allocated coding bit number of the video frame according to the coding state information of the video sequence when the motion intensity of the video frame is lower than a motion intensity lower limit threshold value or higher than a motion intensity upper limit threshold value, so as to obtain the target coding bit number of the video frame; the method is also used for directly using the pre-allocated coding bit number of the video frame as the target coding bit number of the video frame when the motion intensity of the video frame is between the motion intensity lower limit threshold value and the motion intensity upper limit threshold value;
the video frame bit control module is used for carrying out target bit control operation on the video frame according to the target coding bit number of the video frame to obtain Lagrangian multipliers and quantization parameters of the video frame, and the Lagrangian multipliers and quantization parameters are used for the actual coding process of the video frame.
CN202310871472.3A 2023-07-15 2023-07-15 Code rate control method and device for self-adaptive variable code rate Pending CN116896636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310871472.3A CN116896636A (en) 2023-07-15 2023-07-15 Code rate control method and device for self-adaptive variable code rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310871472.3A CN116896636A (en) 2023-07-15 2023-07-15 Code rate control method and device for self-adaptive variable code rate

Publications (1)

Publication Number Publication Date
CN116896636A true CN116896636A (en) 2023-10-17

Family

ID=88310436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310871472.3A Pending CN116896636A (en) 2023-07-15 2023-07-15 Code rate control method and device for self-adaptive variable code rate

Country Status (1)

Country Link
CN (1) CN116896636A (en)

Similar Documents

Publication Publication Date Title
JP5502746B2 (en) Reference selection for video interpolation or extrapolation
JP3748717B2 (en) Video encoding device
US9402034B2 (en) Adaptive auto exposure adjustment
US9426475B2 (en) Scene change detection using sum of variance and estimated picture encoding cost
KR100643454B1 (en) Method for video data transmission control
US8265165B2 (en) Method and apparatus for video decoding to improve picture quality based on picture quality estimation, in the presence of noise
CA2600750A1 (en) Content adaptive multimedia processing
EP2658167A1 (en) Transmission control method of video-stream based on dual time scale
JP2008507915A (en) Method and apparatus for encoder-assisted frame rate upconversion for video compression
JP2000102008A (en) Bit rate control method
CN101171844A (en) Context-adaptive bandwidth adjustment in video rate control
WO2005076632A2 (en) Encoder with adaptive rate control for h.264
JP2001169284A (en) Quantization step setting method in moving image encoder and moving image encoder using the method
JP4764136B2 (en) Moving picture coding apparatus and fade scene detection apparatus
CN110365983B (en) Macroblock-level code rate control method and device based on human eye vision system
US20240040127A1 (en) Video encoding method and apparatus and electronic device
CN111416978A (en) Video encoding and decoding method and system, and computer readable storage medium
CN116896636A (en) Code rate control method and device for self-adaptive variable code rate
KR100930344B1 (en) Initial Quantization Parameter Determination Method
EP3547684B1 (en) Method, device and system for encoding a sequence of frames in a video stream
JP2005303555A (en) Moving image encoding apparatus and its method
CN117014613A (en) Code rate control method and device for constant video quality
EP1921866A2 (en) Content classification for multimedia processing
CN117956167A (en) Code rate control method and device for video coding and computer readable storage medium
CN116437092A (en) Code rate control method and device for avoiding generation of oversized I frame

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination