IP Library › Granted Patent US 12,309,365
Granted Patent B2
US 12,309,365 · App. 18/212,326 · Granted May 20, 2025

Sample adaptive offset

Inventors: Xiaobo Li (Shanghai, CN); Tianxiao Ye (Shanghai, CN)
Assignee: Shanghai Bilibili Technology Co., Ltd.
H04N19/117H04N19/132H04N19/182H04N19/82
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,309,365
App. No.
18/212,326
Granted
May 20, 2025
Kind
B2
Abstract

A method and an apparatus for sample adaptive offset, a device, and a medium are provided. An implementation is: obtaining a band value and a residual of each pixel in a target image; selecting a plurality of adjacent target pixels from the target image; and performing band information calculation operation for the plurality of adjacent target pixels, the band information calculation operation including: obtaining a maximum band value and a minimum band value of the plurality of target pixels; determining a plurality of preset band values based on the maximum band value and the minimum band value; and calculating band information for each of the plurality of preset band values based on the band values and the residuals of the plurality of target pixels.

Claims (66)

1. A method, comprising:

obtaining a band value and a residual of each pixel in a target image;

selecting a plurality of adjacent target pixels from the target image; and

performing band information calculation operation for the plurality of adjacent target pixels, the band information calculation operation comprising:

obtaining a maximum band value and a minimum band value of the plurality of target pixels;

determining a plurality of preset band values based on the maximum band value and the minimum band value, the plurality of preset band values comprising the maximum band value and the minimum band value of the plurality of target pixels and one or more band values between the maximum band value and the minimum band value; and

calculating band information for each of the plurality of preset band values based on the band values and the residuals of the plurality of target pixels, comprising:

determining a band mask of the plurality of target pixels that corresponds to the preset band value, the band mask being capable of representing a position of a target pixel of the plurality of target pixels whose band value is the preset band value; and

performing a calculation on the preset band value and the plurality of target pixels based on the plurality of target pixels and the band mask corresponding to the preset band value to obtain the band information for the preset band value of the plurality of target pixels.

2. The method according to claim 1 , wherein selecting the plurality of adjacent target pixels from the target image comprises:

dividing the pixels of the target image into a plurality of pixel groups, each pixel group comprising a plurality of adjacent target pixels.

3. The method according to claim 2 , wherein the band information calculation operation is performed for the plurality of target pixels included in each pixel group.

4. The method according to claim 3 , further comprising:

determining band information of the target image based on the respective plurality of band information of the plurality of pixel groups; and

encoding the band information of the target image for sending to a decoder.

5. The method according to claim 1 ,

wherein obtaining the maximum band value and the minimum band value of the plurality of target pixels comprises:

equally dividing the plurality of target pixels into a first part and a second part;

performing a maximum value obtaining operation between each target pixel in the first part and corresponding target pixel in the second part to obtain a plurality of first pixel values;

performing a minimum value obtaining operation between each target pixel in the first part and corresponding target pixel in the second part to obtain a plurality of second pixel values;

determining the maximum band value of the plurality of target pixels based at least on the plurality of first pixel values; and

determining the minimum band value of the plurality of target pixels based at least on the plurality of second pixel values.

6. The method according to claim 1 , wherein a plurality of mask pixels included in the band mask are in a one-to-one correspondence with the plurality of adjacent target pixels, a value of a mask pixel of the band mask that corresponds to the target pixel of the plurality of target pixels whose band value is the preset band value is a set value, and a value of a mask pixel corresponding to the target pixel of the plurality of target pixels whose band value is not the preset band value is zero.

7. The method according to claim 1 , wherein the plurality of target pixels are distributed in a matrix,

wherein determining the band mask of the plurality of target pixels that corresponds to the preset band value comprises:

constructing a band matrix having the same size as the matrix of the plurality of target pixels, values of elements in the band matrix being equal to the preset band value; and

determining the band mask based on a result of comparison between the band values of the plurality of target pixels and corresponding elements in the band matrix.

8. The method according to claim 1 , wherein the band information comprises an accumulated residual sum and the number of pixels.

9. The method according to claim 8 , wherein calculating the band information for each of the plurality of preset band values based on the band values and the residuals of the plurality of target pixels comprises:

performing a calculation on the preset band value and the plurality of target pixels based on the residuals of the plurality of target pixels and the corresponding band mask to obtain the accumulated residual sum for the preset band value.

10. The method according to claim 9 , wherein performing the calculation on the preset band value and the plurality of target pixels to obtain the accumulated residual sum for the preset band value comprises:

constructing a residual matrix;

multiplying the residual of each of the plurality of target pixels by a pixel value of a mask pixel in the corresponding band mask corresponding to the position of the target pixel; and

storing the calculated result in the residual matrix.

11. The method according to claim 10 , wherein storing the calculated result in the residual matrix comprises:

summing a product for one of every two adjacent target pixels of the plurality of target pixels that is obtained by the multiplication and a product for the other one of the every two adjacent target pixels that is obtained by the multiplication, to obtain a plurality of sums; and

storing at least the obtained plurality of sums in the residual matrix.

12. The method according to claim 10 , wherein the pixels of the target image are divided into a plurality of pixel groups, each pixel group comprises the plurality of adjacent target pixels, and the method further comprises:

accumulating the accumulated residual sum for the same preset band value in the plurality of pixel groups to obtain the band information of the target image.

13. The method according to claim 8 , wherein calculating the band information for each of the plurality of preset band values based on the band values and the residuals of the plurality of target pixels comprises:

calculating the number of pixels for the preset band value based on the corresponding band mask.

14. The method according to claim 13 , wherein the pixels of the target image are divided into a plurality of pixel groups, each pixel group comprises the plurality of adjacent target pixels, and the method further comprises:

accumulating the number of pixels for the same preset band value in the plurality of pixel groups to obtain the band information of the target image.

15. The method according to claim 14 , wherein the number of pixels for the same preset band value in the plurality of pixel groups is accumulated by accumulating pixel values of mask pixels of the band mask for the same preset band value in the plurality of pixel groups.

16. An electronic device, comprising:

at least one processor; and

a memory communicatively connected to the at least one processor, wherein the memory stores a computer program that, when executed by the at least one processor, causes the at least one processor to:

obtain a band value and a residual of each pixel in a target image;

select a plurality of adjacent target pixels from the target image; and

perform band information calculation operation for the plurality of adjacent target pixels, the band information calculation operation comprising:

obtaining a maximum band value and a minimum band value of the plurality of target pixels;

determining a plurality of preset band values based on the maximum band value and the minimum band value, the plurality of preset band values comprising the maximum band value and the minimum band value of the plurality of target pixels and one or more band values between the maximum band value and the minimum band value; and

calculating band information for each of the plurality of preset band values based on the band values and the residuals of the plurality of target pixels, comprising:

determining a band mask of the plurality of target pixels that corresponds to the preset band value, the band mask being capable of representing a position of a target pixel of the plurality of target pixels whose band value is the preset band value, and

performing a calculation on the preset band value and the plurality of target pixels based on the plurality of target pixels and the band mask corresponding to the preset band value to obtain the band information for the preset band value of the plurality of target pixels.

17. The electronic device according to claim 16 , wherein selecting the plurality of adjacent target pixels from the target image comprises:

dividing the pixels of the target image into a plurality of pixel groups, each pixel group comprising a plurality of adjacent target pixels.

18. A non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to:

obtain a band value and a residual of each pixel in a target image;

select a plurality of adjacent target pixels from the target image; and

perform band information calculation operation for the plurality of adjacent target pixels, the band information calculation operation comprising:

obtaining a maximum band value and a minimum band value of the plurality of target pixels;

determining a plurality of preset band values based on the maximum band value and the minimum band value, the plurality of preset band values comprising the maximum band value and the minimum band value of the plurality of target pixels and one or more band values between the maximum band value and the minimum band value; and

calculating band information for each of the plurality of preset band values based on the band values and the residuals of the plurality of target pixels, comprising:

determining a band mask of the plurality of target pixels that corresponds to the preset band value, the band mask being capable of representing a position of a target pixel of the plurality of target pixels whose band value is the preset band value; and

performing a calculation on the preset band value and the plurality of target pixels based on the plurality of target pixels and the band mask corresponding to the preset band value to obtain the band information for the preset band value of the plurality of target pixels.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 21, 2023
From: LI, XIAOBO; YE, TIANXIAO
To: SHANGHAI BILIBILI TECHNOLOGY CO., LTD.
Reel/Frame 064012/0103 →
Priority Claims (1)
CN 202110286137.8 · Mar 17, 2021 · national
Continuity (2)
Continuation PCTCN2022077201 · Feb 22, 2022
Related Publication 20230336733A1 · Oct 19, 2023
References Cited (28)
US 10417766B2 · Lim · 2019 [cited by examiner]
US 11412218B2 · Moon · 2022 [cited by examiner]
US 20110096834A1 · Cheon · 2011 [cited by examiner]
US 20130136173A1 · Matsunobu · 2013 [cited by examiner]
US 20130188741A1 · Minoo · 2013 [cited by examiner]
US 20130287101A1 · Bordes · 2013 [cited by examiner]
US 20140119433A1 · Park · 2014 [cited by examiner]
US 20150215617A1 · Leontaris · 2015 [cited by examiner]
US 20150229972A1 · Park · 2015 [cited by examiner]
US 20160182186A1 · Adler et al. · 2016 [cited by applicant]
US 20170099492A1 · Byun · 2017 [cited by examiner]
US 20220020181A1 · Lee · 2022 [cited by examiner]
US 20230353746A1 · Li · 2023 [cited by examiner]
CN 103688543A · 2014 [cited by applicant]
CN 105141948A · 2015 [cited by applicant]
CN 106131554A · 2016 [cited by applicant]
CN 108206952A · 2018 [cited by applicant]
CN 111713097A · 2020 [cited by applicant]
CN 113068036A · 2021 [cited by applicant]
EP 4246972A1 · 2023 [cited by applicant]
WO 2016196138A1 · 2016 [cited by applicant]
International Search Report with a mailing date of May 12, 2022, in International application No. PCT/CN2022/077201, filed on Feb. 22, 2022. [cited by applicant]
The extended European search report for Application No. 22770269.3, dated May 16, 2024, European Patent Office, Germany (9 pages). [cited by applicant]
Chih-Ming Fu et al: “Sample adaptive offset for HEVC,” Multimedia Signal Processing (MMSP), 2011 IEEE 13TH International Workshop on, IEEE, Oct. 17, 2011 (Oct. 17, 2011), pp. 1-5, XP03202754 7, DOI: 10.1109/MMSP.2011.60… [cited by applicant]
Adireddy Ramakrishna: “SAO Filtering inside CTU Loop for High Efficiency Video Coding :”, Proceedings of the 10th International Conference on Signal Processing and Multimedia Applications and 10th International Conferen… [cited by applicant]
Communication pursuant to Article 94(3) EPC for European Application No. 22 770 269.3, dated Feb. 25, 2025, European Patent Office, Germany (10 pages). [cited by applicant]
McCann (ZETCAST / Samsung) K et al: “Video coding technology proposal by Samsung (and BBC)”, 1. JCT-VC Meeting; Apr. 15-Apr. 23, 2023 Dresden; No. JCTV-A124 Apr. 16, 2010 (Apr. 16, 2010), XP030233044, Retrieved from the… [cited by applicant]
C-Ming Fu et al: “TE10 subtest 3: Quadtree-based adaptive offset”, 3, JCT-VC Meeting: Oct. 7, 2010-Oct. 15, 2010; XP030225797, Retrieved from the Internet: URL:http://phenix.int-evry.fr/jct/doc_end_user/documents/3_Guan… [cited by applicant]