CN110572661B - Low-delay code rate control method for 4K/8K ultra-high-definition video coding - Google Patents

Low-delay code rate control method for 4K/8K ultra-high-definition video coding Download PDF

Info

Publication number
CN110572661B
CN110572661B CN201910936941.9A CN201910936941A CN110572661B CN 110572661 B CN110572661 B CN 110572661B CN 201910936941 A CN201910936941 A CN 201910936941A CN 110572661 B CN110572661 B CN 110572661B
Authority
CN
China
Prior art keywords
frame
buffer
calculating
coding
frames
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.)
Active
Application number
CN201910936941.9A
Other languages
Chinese (zh)
Other versions
CN110572661A (en
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.)
Hangzhou Arcvideo Technology Co ltd
Original Assignee
Hangzhou Arcvideo Technology 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 Hangzhou Arcvideo Technology Co ltd filed Critical Hangzhou Arcvideo Technology Co ltd
Priority to CN201910936941.9A priority Critical patent/CN110572661B/en
Publication of CN110572661A publication Critical patent/CN110572661A/en
Application granted granted Critical
Publication of CN110572661B publication Critical patent/CN110572661B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/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/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/177Methods 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 a group of pictures [GOP]
    • 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/184Methods 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 bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/436Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation using parallelised computational arrangements

Abstract

The invention discloses a low-delay code rate control method for 4K/8K ultra-high-definition video coding. The method specifically comprises the following steps: (1) setting the length of a GOP as an integer M, and setting the number of frames used for predicting a conventional buffer zone as K; (2) calculating the frame number N (i) used by the buffer prediction when the ith frame in the GOP is coded; (3) calculating the estimated bit number of the (i) th, … th and i + N (i) th frames by using an Rq model; (4) calculating the target buffer saturation f (i) of the i-th frame, determining whether f (i) is less than 0.5, if so, making q (i) w, or determining whether f (i) is greater than 0.8, if so, making q (i)/w, and re-executing step (3); otherwise, selecting the current q (i) as the optimal quantization step size of the current frame, and executing the step (5); (5) and obtaining the optimal quantization step size to encode the frame. The invention has the beneficial effects that: the frame number required by the buffer prediction is adaptively adjusted, so that the problem that the encoding delay is increased due to the fact that the buffer prediction waits for frames of other GOPs in GOP parallel encoding is solved.

Description

Low-delay code rate control method for 4K/8K ultra-high-definition video coding
Technical Field
The invention relates to the technical field of video coding, in particular to a low-delay code rate control method for 4K/8K ultra-high-definition video coding.
Background
With the rapid development of network communication and video processing technologies, technologies such as 4K, 8K, and HDR (High Dynamic Range) gradually become new demands of people for visual experience. The 4K/8K video has large data volume and higher requirement on the coding compression performance, the coding compression standards adopted for the 4K/8K video at home and abroad at present mainly include HEVC and AVS2, the compression efficiency of the HEVC and the AVS2 is higher, but the computational complexity is also larger, and the speed of an encoder is generally required to reach more than 50 frames per second for the 4K/8K real-time live broadcast. Therefore, how to improve the video output stability under certain network bandwidth and speed requirements is a key of the development of video coding technology.
The code rate control belongs to an important link of video coding, and calculates the bit number to be distributed to each frame image in the video and each area in the image by acquiring the characteristics of a video information source (such as the intensity of motion, the complexity of image texture and the like) and the available network bandwidth, and guides an encoder to code the video, so that the output code stream conforms to the transmission of a channel, and the quality of the output video is as good as possible. Because the complexity (bit number) of each frame of the video source is different, and the network bandwidth is constant, a buffer needs to be set in the code rate control, so that the coded code stream is sent to the network at a constant code rate (bit number in unit time).
On one hand, the real-time live broadcast of 4K/8K video has very high performance requirements, and usually GOP parallel coding is adopted, so that different GOPs (Group of Picture) are distributed to different nodes for coding, for example, for an encoder with 2 nodes, and when the GOP length is 50, 1 st GOP (1 st to 50 th frames) is placed at the 1 st node, 2 nd GOP (51 st to 100 th frames) is placed at the 2 nd node, 3 rd GOP (101 st to 150 th frames) is placed at the 1 st node, 4 th GOP (151 th to 200 th frames) is placed at the 2 nd node, and so on. On the other hand, the end-to-end delay in live broadcast is also very critical, the frame number required by buffer prediction is set as a fixed value in the existing method, and if the frame of the 1 st GOP waits for the frame input of the 3 rd GOP because the frame number required by buffer prediction needs to be met, the frame output delay of the 1 st GOP is greatly increased.
Disclosure of Invention
The invention provides a low-delay code rate control method for 4K/8K ultra-high-definition video coding, which can reduce coding delay and overcome the defects in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
a low-delay code rate control method for 4K/8K ultra-high-definition video coding specifically comprises the following steps:
(1) setting the length of a GOP as an integer M, and setting the number of frames used by conventional buffer prediction as K, wherein the K is e × M, and the value range of e is (0, 1);
(2) calculating the frame number N (i) used by the buffer prediction when the ith frame in the GOP is coded;
(3) calculating estimated bit numbers of i, i +1, i +2, …, i + N (i) th frames by using an Rq model, wherein the estimated bit numbers are respectively marked as R (i), R (i +1), R (i +2), … and R (i + N (i));
(4) calculating the target buffer saturation F (i) of the ith frame, judging whether F (i) is less than 0.5, if so, making q (i) w, and executing the step (3) again; otherwise, judging whether F (i) is larger than 0.8, if so, making q (i) equal to q (i)/w, and executing the step (3) again; otherwise, selecting the current q (i) as the optimal quantization step size of the current frame, and executing the step (5), wherein the value range of w is (1, 1.5);
(5) and obtaining the optimal quantization step size to encode the frame.
When 4K/8K ultra-high-definition video coding adopts GOP parallel coding, the frame number required by the buffer prediction is required to be met and the frame input of the subsequent 2 GOPs is waited, so that the coding delay is increased.
Preferably, in step (2), the size of n (i) affects the encoding delay and the accuracy of the buffer prediction, and in order to avoid the delay increased by waiting for the frame input of the subsequent 2 GOPs and to enable the current buffer to analyze more frames in the future to improve the buffer prediction accuracy, the calculation formula of the frame number n (i) used for the buffer prediction during encoding is as follows:
Figure BDA0002221828460000031
preferably, in step (3), the formula for calculating the estimated bit number of the k-th frame by using the Rq model is as follows:
Figure BDA0002221828460000032
wherein a, b and c are model parameters, D (k) is SATD of the k frame, and q (i) is the quantization step size of the i frame.
Preferably, in step (4), the target buffer saturation f (i) of the ith frame is calculated as follows:
Figure BDA0002221828460000033
f (i-1) is the actual buffer saturation of the i-1 th frame after being coded, C is the video target code rate, Fr is the coding frame rate, and R (t) is the estimated bit number of the t-th frame.
The invention has the beneficial effects that: the frame number required by the buffer prediction is adaptively adjusted, so that the problem that the encoding delay is increased due to the fact that the buffer prediction waits for frames of other GOPs in GOP parallel encoding is solved.
Detailed Description
The invention is further described with reference to specific embodiments.
A low-delay code rate control method for 4K/8K ultra-high-definition video coding specifically comprises the following steps:
(1) setting the length of a GOP as an integer M, and setting the number of frames used by conventional buffer prediction as K, wherein the K is e × M, and the value range of e is (0, 1);
(2) calculating the frame number N (i) used by the buffer prediction when the ith frame in the GOP is coded; the size of n (i) affects the coding delay and the accuracy of the buffer prediction, and in order to avoid the delay increased by waiting for the frame input of the subsequent 2 GOPs and to enable the current buffer to analyze more frames in the future to improve the buffer prediction accuracy, the calculation formula of the frame number n (i) used for the buffer prediction during coding is as follows:
Figure BDA0002221828460000041
(3) calculating estimated bit numbers of i, i +1, i +2, …, i + N (i) th frames by using an Rq model, wherein the estimated bit numbers are respectively marked as R (i), R (i +1), R (i +2), … and R (i + N (i)); the formula for calculating the estimated bit number of the k frame by using the Rq model is as follows:
Figure BDA0002221828460000042
wherein a, b and c are model parameters, respectively, D (k) is SATD (Sum of Absolute Transformed Difference) of the k-th frame, and q (i) is the quantization step size of the i-th frame;
(4) calculating the target buffer saturation F (i) of the ith frame, judging whether F (i) is less than 0.5, if so, making q (i) w, and executing the step (3) again; otherwise, judging whether F (i) is larger than 0.8, if so, making q (i) equal to q (i)/w, and executing the step (3) again; otherwise, selecting the current q (i) as the optimal quantization step size of the current frame, and executing the step (5), wherein the value range of w is (1, 1.5), and the optimal value of w is 1.01; the target buffer saturation f (i) for the ith frame is calculated as follows:
Figure BDA0002221828460000051
f (i-1) is the actual buffer saturation of the i-1 th frame after being coded, C is the video target code rate, Fr is the coding frame rate, and R (t) is the estimated bit number of the t-th frame;
from the above formula, it can be seen that: if the saturation degree of the buffer area is smaller, the code rate of each frame is too large, the value q (i) needs to be increased to reduce the code rate, if the saturation degree of the buffer area is larger, the code rate of each frame is too small, the value q (i) needs to be reduced to increase the code rate, and finally, an optimal value q (i) is obtained to control the saturation degree of the buffer area within a normal range;
(5) and obtaining the optimal quantization step size to encode the frame.
When 4K/8K ultra-high-definition video coding adopts GOP parallel coding, the frame number required by the buffer prediction is required to be met and the frame input of the subsequent 2 GOPs is waited, so that the coding delay is increased. The present invention is implemented by taking HEVC/AVS2 encoder as an example, but is not limited to HEVC/AVS2, and may also be applied to encoders such as H264, AVS3, etc.

Claims (2)

1. A low-delay code rate control method for 4K/8K ultra-high-definition video coding is characterized by comprising the following steps:
(1) setting the length of a GOP as an integer M, and setting the number of frames used by conventional buffer prediction as K, wherein the K is e × M, and the value range of e is (0, 1);
(2) calculating the frame number N (i) used by the buffer prediction when the ith frame in the GOP is coded; the size of n (i) affects the coding delay and the accuracy of the buffer prediction, and in order to avoid the delay increased by waiting for the frame input of the subsequent 2 GOPs and to enable the current buffer to analyze more frames in the future to improve the buffer prediction accuracy, the calculation formula of the frame number n (i) used for the buffer prediction during coding is as follows:
Figure FDA0003196033950000011
(3) calculating estimated bit numbers of i, i +1, i +2, …, i + N (i) th frames by using an Rq model, wherein the estimated bit numbers are respectively marked as R (i), R (i +1), R (i +2), … and R (i + N (i)); the formula for calculating the estimated bit number of the k frame by using the Rq model is as follows:
Figure FDA0003196033950000012
wherein a, b and c are model parameters, D (k) is SATD of the kth frame, and q (i) is a quantization step size of the ith frame;
(4) calculating the target buffer saturation F (i) of the ith frame, judging whether F (i) is less than 0.5, if so, making q (i) w, and executing the step (3) again; otherwise, judging whether F (i) is larger than 0.8, if so, making q (i) equal to q (i)/w, and executing the step (3) again; otherwise, selecting the current q (i) as the optimal quantization step size of the current frame, and executing the step (5), wherein the value range of w is (1, 1.5);
(5) and obtaining the optimal quantization step size to encode the frame.
2. The method for controlling low delay rate of coding super high definition video of 4K/8K according to claim 1, wherein in step (4), the target buffer saturation f (i) of the ith frame is calculated as follows:
Figure FDA0003196033950000021
f (i-1) is the actual buffer saturation of the i-1 th frame after being coded, C is the video target code rate, Fr is the coding frame rate, and R (t) is the estimated bit number of the t-th frame.
CN201910936941.9A 2019-09-29 2019-09-29 Low-delay code rate control method for 4K/8K ultra-high-definition video coding Active CN110572661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910936941.9A CN110572661B (en) 2019-09-29 2019-09-29 Low-delay code rate control method for 4K/8K ultra-high-definition video coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910936941.9A CN110572661B (en) 2019-09-29 2019-09-29 Low-delay code rate control method for 4K/8K ultra-high-definition video coding

Publications (2)

Publication Number Publication Date
CN110572661A CN110572661A (en) 2019-12-13
CN110572661B true CN110572661B (en) 2021-10-26

Family

ID=68783359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910936941.9A Active CN110572661B (en) 2019-09-29 2019-09-29 Low-delay code rate control method for 4K/8K ultra-high-definition video coding

Country Status (1)

Country Link
CN (1) CN110572661B (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1074148B1 (en) * 1998-03-20 2003-05-28 STMicroelectronics Asia Pacific Pte Ltd. Moving pictures encoding with constant overall bit rate
CN100574427C (en) * 2005-08-26 2009-12-23 华中科技大学 The control method of video code bit rate

Also Published As

Publication number Publication date
CN110572661A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
JP4390112B2 (en) Method and apparatus for controlling rate of video sequence and video encoding apparatus
CN101835042B (en) Wyner-Ziv video coding system controlled on the basis of non feedback speed rate and method
US20100195715A1 (en) Method and apparatus for adaptive frame prediction
CN103533359B (en) One is bit rate control method H.264
CN107197279A (en) The decision of quick macro block increment quantization parameter
JP2012178864A (en) Rate control for multi-layer video design
CN106993190B (en) Software-hardware synergism coding method and system
CN105681793A (en) Very-low delay and high-performance video coding intra-frame code rate control method based on video content complexity adaption
CN106937112A (en) Bit rate control method based on H.264 video compression standard
CN110351552B (en) Fast coding method in video coding
CN108989818B (en) Image coding parameter adjusting method and device
CN105187832B (en) Based on 2.5G wireless network mobile video bit rate control methods
CN108322740B (en) Encoding method with controllable encoding complexity
CN112218084B (en) High-efficiency video coding standard frame-level code rate control method facing surveillance video
CN102724507B (en) GPU (graphic processing unit) accelerating encoder rate control method
CN110572661B (en) Low-delay code rate control method for 4K/8K ultra-high-definition video coding
CN101605250A (en) Determine the method for initial quantization step in the Rate Control
CN110971900A (en) Code rate control method suitable for 4K and 8K ultrahigh-definition motion flat video
CN110677664B (en) Low-jitter code rate control method for 4K/8K ultra-high-definition video coding
CN110662045B (en) 8K-oriented AVS2 ultra-high definition video coding rate control method
US20070071092A1 (en) System and method for open loop spatial prediction in a video encoder
Sofke et al. Dynamic quality control for transform domain Wyner-Ziv video coding
CN112995667B (en) Enhanced R-Lambda code rate control method
CN113596483B (en) Parameter determination method and system for coding tree unit
CN103533348A (en) Multi-view rapid mode selecting method based on visual perception

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
GR01 Patent grant
GR01 Patent grant