US 12,348,729 B2
Determination of sample adaptive offset mode of coding tree block
Xiaobo Li, Shanghai (CN); and Tianxiao Ye, Shanghai (CN)
Assigned to Shanghai Bilibili Technology Co., Ltd., Shanghai (CN)
Filed by Shanghai Bilibili Technology Co., Ltd., Shanghai (CN)
Filed on Jun. 14, 2023, as Appl. No. 18/209,715.
Application 18/209,715 is a continuation of application No. PCT/CN2022/072844, filed on Jan. 20, 2022.
Claims priority of application No. 202110283711.4 (CN), filed on Mar. 17, 2021.
Prior Publication US 2023/0328253 A1, Oct. 12, 2023
Int. Cl. H04N 19/137 (2014.01); H04N 19/105 (2014.01); H04N 19/169 (2014.01); H04N 19/176 (2014.01)
CPC H04N 19/137 (2014.11) [H04N 19/105 (2014.11); H04N 19/176 (2014.11); H04N 19/1883 (2014.11)] 19 Claims
OG exemplary drawing
 
1. A method, comprising:
obtaining a motion vector of at least one prediction unit comprised in a first coding tree block currently to be processed, and obtaining a reference frame of a video frame corresponding to the first coding tree block;
obtaining a video resolution and a video frame rate of a video, and calculating a threshold based on the video resolution and the video frame rate;
in response to determining that the motion vector is not greater than the threshold according to a preset rule, determining, based on the motion vector, all second coding tree blocks to be referenced by the first coding tree block in the reference frame, wherein the motion vector comprises a value of an abscissa x and a value of an ordinate y, and determining that the motion vector is not greater than the threshold according to the preset rule comprises:
determining that a*|x| is not greater than the threshold; or
determining that a*|y| is not greater than the threshold; or
determining that a*√x2−y2 is not greater than the threshold,
wherein a is a preset constant;
sequentially calculating a first probability that a sample adaptive offset mode is enabled for all coding tree blocks in a preset direction of each of the second coding tree blocks, and
calculating a second probability that the sample adaptive offset mode is enabled for all coding tree blocks in the preset direction of the first coding tree block; and
in response to determining that sample adaptive offset modes of all the second coding tree blocks are trusted based on each first probability and the second probability, obtaining the sample adaptive offset modes of all the second coding tree blocks, and using obtained all types of sample adaptive offset modes as sample adaptive offset modes of the first coding tree block, wherein the sample adaptive offset modes of all the second coding tree blocks are trusted in response to determining that at least one first probability is greater than the second probability.