IP Library › Granted Patent US 12,532,003
Granted Patent B2
US 12,532,003 · App. 18/342,669 · Granted Jan 20, 2026

Data processing in band offset mode of sample adaptive offset

Inventors: Xiaobo Li (Shanghai, CN); Tianxiao Ye (Shanghai, CN)
Assignee: SHANGHAI BILIBILI TECHNOLOGY CO., LTD.
H04N19/182H04N19/119H04N19/132H04N19/44H04N19/89H04N19/895H04N19/96
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,532,003
App. No.
18/342,669
Granted
Jan 20, 2026
Kind
B2
Abstract

A method is provided that includes: traversing all reconstructed pixels in a coding tree block, calculating a band value of each traversed reconstructed pixel, and calculating a residual value between each traversed reconstructed pixel and a corresponding original pixel; storing the calculated band value of each reconstructed pixel in a first array, and storing the calculated residual value between each reconstructed pixel and the corresponding original pixel in a second array; determining whether m consecutive band values in the first array belong to a same band; and in response to determining that the m consecutive band values in the first array belong to the same band, calculating, based on a residual value in the second array, a cumulative residual value of m reconstructed pixels corresponding to the m consecutive band values, and calculating a cumulative number of the m reconstructed pixels.

Claims (100)

1 . A method, comprising:

acquiring a target reconstructed image;

dividing the target reconstructed image into a plurality of non-overlapping coding tree blocks;

traversing all reconstructed pixels in each coding tree block to calculate a band value of each traversed reconstructed pixel and a residual value between each traversed reconstructed pixel and a corresponding original pixel;

storing the calculated band value of each reconstructed pixel in a first array and the calculated residual value between each reconstructed pixel and the corresponding original pixel in a second array;

in response to determining that m consecutive band values in the first array belong to a same band, wherein m is an integer greater than or equal to 2:

calculating, at a time based on the residual values in the second array of m reconstructed pixels corresponding to the m consecutive band values, a first cumulative residual value of the m reconstructed pixels; and

calculating a first cumulative number of the m reconstructed pixels;

in response to determining that the m consecutive band values in the first array do not belong to the same band:

in response to determining that n consecutive band values of the m consecutive band values belong to the same band, wherein n<m and n is an integer greater than or equal to 2:

calculating, at a time based on the residual values in the second array of n reconstructed pixels corresponding to the n consecutive band values, a second cumulative residual value of the n reconstructed pixels; and

calculating a second cumulative number of the n reconstructed pixels; adding the first cumulative residual value or the second cumulative residual value to a sum variable of said same band, and adding the first cumulative number or the second cumulative number to a count variable of said same band; and

performing a pixel compensation on the target reconstructed image based on the sum variable and the count variable.

2 . The method according to claim 1 , further comprising:

reading the m consecutive band values from the first array;

storing the read band values in a first variable with preset bits;

fetching one of the band values from the first variable;

copying the fetched band value m−1 times to obtain the copied band values;

storing the copied band values in a second variable with the preset bits;

in response to determining that the first variable is equal to the second variable, determining that the m consecutive band values in the first array belong to the same band; and

in response to determining that the first variable is not equal to the second variable, determining that the m consecutive band values in the first array do not belong to the same band.

3 . The method according to claim 2 , further comprising: when the first variable is not equal to the second variable,

acquiring, from each of the first variable and the second variable, values in a preset number of bits that correspond to the n consecutive band values; and

in response to determining that the values acquired from the first variable are equal to the values acquired from the second variable, determining that the n consecutive band values of the m consecutive band values belong to the same band.

4 . The method according to claim 3 ,

wherein m=8, n=4,

wherein each band value is represented by an 8-bit value,

wherein the first variable with the preset bits is a 64-bit first variable, and

wherein acquiring, from each of the first variable and the second variable, values in the preset number of bits that correspond to the n consecutive band values comprises:

acquiring, from each of the first variable and the second variable, values in 32 least significant bits or 32 most significant bits.

5 . The method according to claim 2 , wherein fetching one of the band values from the first variable comprises:

fetching a band value at a preset location from the first variable.

6 . A computer device, comprising:

a processor; and

a memory, wherein the memory stores computer executable instructions that, when executed by the processor, cause the processor to:

acquire a target reconstructed image

divide the target reconstructed image into a plurality of non-overlapping coding tree blocks;

traverse all reconstructed pixels in each coding tree block to calculate a band value of each traversed reconstructed pixel, and a residual value between each traversed reconstructed pixel and a corresponding original pixel;

store the calculated band value of each reconstructed pixel in a first array and the calculated residual value between each reconstructed pixel and the corresponding original pixel in a second array;

in response to determining that m consecutive band values in the first array belong to a same band, wherein m is an integer greater than or equal to 2:

calculate a first cumulative residual value of m reconstructed pixels corresponding to the m consecutive band values at a time based on the residual values in the second array of the m reconstructed pixels; and

calculate a first cumulative number of the m reconstructed pixels;

in response to determining that the m consecutive band values in the first array do not belong to the same band:

in response to determining that n consecutive band values of the m consecutive band values belong to the same band, wherein n<m and n is an integer greater than or equal to 2:

calculate a second cumulative residual value of n reconstructed pixels corresponding to the n consecutive band values at a time based on the residual values in the second array of the n reconstructed pixels; and

calculate a second cumulative number of the n reconstructed pixels;

adding the first cumulative residual value or the second cumulative residual value to a sum variable of said same band, and adding the first cumulative number or the second cumulative number to a count variable of said same band; and

performing a pixel compensation on the target reconstructed image based on the sum variable and the count variable.

7 . The computer device according to claim 6 , wherein the computer executable instructions, when executed by the processor, further cause the processor to:

read the m consecutive band values from the first array;

store the read band values in a first variable with preset bits;

fetch one of the band values from the first variable;

copy the fetched band value m−1 times to obtain the copied band values;

store the copied band values in a second variable with the preset bits;

in response to determining that the first variable is equal to the second variable, determine that the m consecutive band values in the first array belong to the same band; and

in response to determining that the first variable is not equal to the second variable, determine that the m consecutive band values in the first array do not belong to the same band.

8 . The computer device according to claim 7 , wherein the computer executable instructions, when executed by the processor, further cause the processor to: when the first variable is not equal to the second variable,

acquire, from each of the first variable and the second variable, values in a preset number of bits that correspond to the n consecutive band values; and

in response to determining that the values acquired from the first variable are equal to the values acquired from the second variable, determine that the n consecutive band values of the m consecutive band values belong to the same band.

9 . The computer device according to claim 8 ,

wherein m=8, n=4,

wherein each band value is represented by an 8-bit value,

wherein the first variable with the preset bits is a 64-bit first variable, and

wherein acquiring, from each of the first variable and the second variable, values in the preset number of bits that correspond to the n consecutive band values comprises:

acquiring, from each of the first variable and the second variable, values in 32 least significant bits or 32 most significant bits.

10 . The computer device according to claim 7 , wherein fetching one of the band values from the first variable comprises:

fetching a band value at a preset location from the first variable.

11 . A non-transitory computer-readable storage medium having computer instructions stored thereon that, when executed by a processor, cause the processor to:

acquire a target reconstructed image

divide the target reconstructed image into a plurality of non-overlapping coding tree blocks;

traverse all reconstructed pixels in each coding tree block to calculate a band value of each traversed reconstructed pixel, and a residual value between each traversed reconstructed pixel and a corresponding original pixel;

store the calculated band value of each reconstructed pixel in a first array and the calculated residual value between each reconstructed pixel and the corresponding original pixel in a second array;

in response to determining that m consecutive band values in the first array belong to a same band, wherein m is an integer greater than or equal to 2:

calculate a first cumulative residual value of m reconstructed pixels corresponding to the m consecutive band values at a time based on the residual values in the second array of the m reconstructed pixels; and

calculate a first cumulative number of the m reconstructed pixels;

in response to determining that the m consecutive band values in the first array do not belong to the same band:

in response to determining that n consecutive band values of the m consecutive band values belong to the same band, wherein n<m and n is an integer greater than or equal to 2:

calculate a second cumulative residual value of n reconstructed pixels corresponding to the n consecutive band values at a time based on the residual values in the second array of the n reconstructed pixels; and

calculate a second cumulative number of the n reconstructed pixels;

add the first cumulative residual value or the second cumulative residual value to a sum variable of said same band, and add the first cumulative number or the second cumulative number to a count variable of said same band; and

perform a pixel compensation on the target reconstructed image based on the sum variable and the count variable.

12 . The non-transitory computer-readable storage medium according to claim 11 , wherein the computer instructions, when executed by the processor, further cause the processor to:

read the m consecutive band values from the first array;

store the read band values in a first variable with preset bits:

fetch one of the band values from the first variable;

copy the fetched band value m−1 times to obtain the copied band values;

store the copied band values in a second variable with the preset bits;

in response to determining that the first variable is equal to the second variable, determine that the m consecutive band values in the first array belong to the same band; and

in response to determining that the first variable is not equal to the second variable, determine that the m consecutive band values in the first array do not belong to the same band.

13 . The non-transitory computer-readable storage medium according to claim 12 , wherein the computer instructions, when executed by the processor, further cause the processor to: when the first variable is not equal to the second variable,

acquire, from each of the first variable and the second variable, values in a preset number of bits that correspond to the n consecutive band values; and

in response to determining that the values acquired from the first variable is equal to the values acquired from the second variable, determine that the n consecutive band values of the m consecutive band values belong to the same band.

14 . The non-transitory computer-readable storage medium according to claim 13 ,

wherein m=8, n=4,

wherein each band value is represented by an 8-bit value,

wherein the first variable with the preset bits is a 64-bit first variable, and

wherein acquiring, from each of the first variable and the second variable, values in the preset number of bits that correspond to the n consecutive band values comprises:

acquiring, from each of the first variable and the second variable, values in 32 least significant bits or 32 most significant bits.

15 . The non-transitory computer-readable storage medium according to claim 12 , wherein fetching one of the band values from the first variable comprises:

fetching a band value at a preset location from the first variable.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 27, 2023
From: LI, XIAOBO; YE, TIANXIAO
To: SHANGHAI BILIBILI TECHNOLOGY CO., LTD.
Reel/Frame 064088/0612 →
Priority Claims (1)
CN 202110208657.7 · Feb 24, 2021 · national
Continuity (2)
Continuation PCTCN2022072880 · Jan 20, 2022
Related Publication 20230353746A1 · Nov 2, 2023
References Cited (35)
US 20120177107A1 · Fu · 2012 [cited by examiner]
US 20130114909A1 · Kim · 2013 [cited by examiner]
US 20140229433A1 · Nakajima · 2014 [cited by examiner]
US 20140254674A1 · Lee · 2014 [cited by examiner]
US 20140334536A1 · Sze · 2014 [cited by examiner]
US 20150092850A1 · Talebi Esfandarani · 2015 [cited by examiner]
US 20150237360A1 · Kim et al. · 2015 [cited by applicant]
US 20160119636A1 · Maani · 2016 [cited by examiner]
US 20160150251A1 · Kim · 2016 [cited by examiner]
US 20170006289A1 · Alshina et al. · 2017 [cited by applicant]
US 20200137401A1 · Kim · 2020 [cited by examiner]
US 20200404286A1 · Karczewicz · 2020 [cited by examiner]
US 20220007038A1 · Kim · 2022 [cited by examiner]
US 20220385913A1 · Francois · 2022 [cited by examiner]
US 20230051471A1 · Kim · 2023 [cited by examiner]
CN 103238318A · 2013 [cited by applicant]
CN 103518375A · 2014 [cited by applicant]
CN 105141948A · 2015 [cited by applicant]
CN 105635732A · 2016 [cited by applicant]
CN 105794206A · 2016 [cited by applicant]
CN 105993174A · 2016 [cited by applicant]
CN 108810543A · 2018 [cited by applicant]
CN 109963160A · 2019 [cited by applicant]
CN 110689590A · 2020 [cited by applicant]
CN 111567045A · 2020 [cited by applicant]
CN 112927311A · 2021 [cited by applicant]
WO 2020139005A1 · 2020 [cited by applicant]
Chinese Search Report, 202110208657.7, Apr. 27, 2022, 3 pages. [cited by applicant]
PCT Search Report, PCT /CN2022/072880, Apr. 19, 2022, 6 pages. [cited by applicant]
Zhang, Guanwen, et al., “CNN-Based Sample Adaptive Offset Optimization in HEVC for Streaming Video,” Proceedings of the 2019 IEEE International Conference on Real-time Computing and Robotics, Aug. 4-9, 2019, Russia, 4 p… [cited by applicant]
European Search Report of the counterpart EP application No. 22758721.9, official mailing date: Mar. 11, 2024, 11 pages. [cited by applicant]
Andrey Norkin et al: “Chapter 7: In-Loop Filters in HEVC” In: “High Efficiency Video Coding (HEVC)”, Aug. 23, 2014, Springer International Publishing, Cham, XP055614202, ISBN: 978-3-319-06894-7, pp. 171-208. [cited by applicant]
Zhou Jianbin et al: “A Dual-Clock VLSI Design of H.265 Sample Adaptive Offset Estimation for 8k Ultra-HD TV Encoding”, IEEE Transactions on Very Large Scale Integration (VlSI) Systems, IEEE Service Center, vol. 25, No. … [cited by applicant]
Gendy Sayed El et al: “Low Cost VLSI Architecture for Sample Adaptive Offset Encoder in HEVC” , 2016 IEEE Computer Society Annual Symposium on VLSI (ISVLSI), IEEE, XP032958180, Jul. 11, 2016, pp. 170-175. [cited by applicant]
Jiayi Zhu et al: “Fast SAO estimation algorithm and its VLSI architecture”, 2014 IEEE International Conference on Image Processing (ICIP), IEEE, XP032966796, Oct. 27, 2014, pp. 1278-1282. [cited by applicant]