US 11,792,407 B2
Method and device for coding video using optimal video frame structure, and storage medium
Le Shi, Beijing (CN); and Wenpeng Ding, Beijing (CN)
Assigned to Beijing Baidu Netcom Science and Technology Co., Ltd., Beijing (CN)
Filed by Beijing Baidu Netcom Science and Technology Co., Ltd., Beijing (CN)
Filed on Jun. 21, 2021, as Appl. No. 17/353,329.
Claims priority of application No. 202011192362.7 (CN), filed on Oct. 30, 2020.
Prior Publication US 2021/0377543 A1, Dec. 2, 2021
Int. Cl. H04N 19/14 (2014.01); H04N 19/105 (2014.01); H04N 19/159 (2014.01); H04N 19/172 (2014.01)
CPC H04N 19/14 (2014.11) [H04N 19/105 (2014.11); H04N 19/159 (2014.11); H04N 19/172 (2014.11)] 14 Claims
OG exemplary drawing
 
1. A method for coding a video, the method comprising:
determining an initial video frame structure based on a preset threshold for a B-frame number;
in response to determining that the initial video frame structure meets a preset condition, shortening the initial video frame structure to obtain a candidate video frame structure set, wherein shortening the initial video frame structure to obtain the candidate video frame structure set comprises:
determining at least one value of a shortened B-frame number based on at least one preset shortening ratio and the preset threshold for the B-frame number;
determining at least one video frame structure based on the at least one value of the shortened B-frame number; and
determining, based on the at least one video frame structure, the candidate video frame structure set, wherein determining the candidate video frame structure set comprises: replacing a non-reference B frame located at a middle of a sequence of non-reference B frames in a video frame structure of the at least one video frame structure with a Bref frame, to obtain a candidate video frame structure, the Bref frame being a B-frame used as a reference frame;
determining a target video frame structure from the candidate video frame structure set; and
performing video coding on video frames in a to-be-coded video frame sequence according to the target video frame structure.