# US 12,192,454 B2 · Sample adaptive offset control

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,192,454 B2
- Document ID: US12192454B2
- Status: Granted
- Kind: B2
- Application number: 17/741,259
- Filed: 2022-05-10
- Published: 2022-08-25
- Granted: 2025-01-07
- Earliest claimed: 2013-06-19
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Alexandros Tourapis
- Web page: https://patentgrep.com/patent/US12192454B2

## CPC

- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- H04N 19/136: Incoming video signal characteristics or properties
- H04N 19/186: the unit being a colour or a chrominance component
- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- H04N 19/463: by compressing encoding parameters before transmission
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N 19/82: involving filtering within a prediction loop
- H04N 19/86: involving reduction of coding artifacts, e.g. of blockiness
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Offset values, such as Sample Adaptive Offset (SAO) values in video coding standards such as the High Efficiency Video Coding standard (HEVC), may be improved by performing calculations and operations that improve the preciseness of these values without materially affecting the signal overhead needed to transmit the more precise values. Such calculations and operations may include applying a quantization factor to a video sample and at least some of its neighbors, comparing the quantized values, and classifying the video sample as a minimum, maximum, or one of various types of edges based on the comparison. Other sample range, offset mode, and/or offset precision parameters may be calculated and transmitted with metadata to improve the precision of offset values.

## Claims

### Claim 1

A method for decoding video, comprising:
decoding an encoded video stream to produce reconstructed pixel data in a first color space and an indication of a second color space for sample-adaptive offset (SAO) filtering;
when the second color space differs from the first color space,
converting the reconstructed pixel data from the first color space to the second color space,
SAO filtering the reconstructed pixel data in the second color space, and
converting the SAO filtered reconstructed pixel data from the second color space to the first color space;
when the second color space does not differ from the first color space,
SAO filtering the reconstructed pixels in the first color space.

### Claim 2 (depends on 1)

The method of claim 1, further comprising, when the SAO filtered reconstructed pixel data in the first color space serves as a prediction reference, predicting a portion of pixel data in the encoded video stream from the SAO filtered reconstructed pixel data in the first color space.

### Claim 3 (depends on 1)

The method of claim 1, wherein the SAO filtering includes:
classifying pixel data; and
applying an offset to the pixel data based on the classification.

### Claim 4 (depends on 1)

The method of claim 1, wherein the second color space includes luma and chroma components, and the method further comprises:
downscaling the chroma components, wherein the SAO filtering includes SAO filtering the downscaled chroma components; and
upscaling the SAO filtered reconstructed pixel data from in the second color space, wherein the converting the SAO filtered reconstructed pixel data to the first color space includes converting the upscaled and SAO filtered reconstructed pixel data.

### Claim 5 (depends on 1)

The method of claim 1, wherein the indication of the second color space is contained in a syntax element in a picture parameter set (PPS) layer of the encoded video stream.

### Claim 6 (depends on 1)

The method of claim 1, wherein:
the second color space includes luma and chroma components; and
the SAO filtering the reconstructed pixel data includes applying a first type of SAO filtering to a luma component and applying a second type of SAO filtering, different from the first type of SAO filtering, to a chroma component.

### Claim 7

A non-transitory computer readable medium containing instructions, that when executed by a processor, cause the processor to:
decode an encoded video stream to produce reconstructed pixel data in a first color space and an indication of a second color space for sample-adaptive offset (SAO) filtering;
when the second color space differs from the first color space,
convert the reconstructed pixel data from the first color space to the second color space,
SAO filter the reconstructed pixel data in the second color space, and
convert the SAO filtered reconstructed pixel data from the second color space to the first color space;
when the second color space does not differ from the first color space,
SAO filter the reconstructed pixels in the first color space.

### Claim 8 (depends on 7)

The medium of claim 7, wherein, when the SAO filtered reconstructed pixel data in the first color space serves as a prediction reference, the instructions further cause the processing device to:
predict a portion of pixel data in the encoded video stream from the SAO filtered reconstructed pixel data in the first color space.

### Claim 9 (depends on 7)

The medium of claim 7, wherein the SAO filtering includes:
classifying pixel data; and
applying an offset to the pixel data based on the classification.

### Claim 10 (depends on 7)

The medium of claim 7, wherein the second color space includes luma and chroma components, and the instructions further cause the processing device to:
downscaling the chroma components, wherein the SAO filtering includes SAO filtering the downscaled chroma components; and
upscaling the SAO filtered reconstructed pixel data from in the second color space, wherein the converting the SAO filtered reconstructed pixel data to the first color space includes converting the upscaled and SAO filtered reconstructed pixel data.

### Claim 11 (depends on 7)

The medium of claim 7, wherein the indication of the second color space is contained in a syntax element in a picture parameter set (PPS) layer of the encoded video stream.

### Claim 12 (depends on 7)

The medium of claim 7, wherein:
the second color space includes luma and chroma components; and
the SAO filtering the reconstructed pixel data includes applying a first type of SAO filtering to a luma component and applying a second type of SAO filtering, different from the first type of SAO filtering, to a chroma component.

### Claim 13

A system comprising:
a video decoder including a sample adaptive offset (SAO) filter;
a processing device; and
a memory including instructions, that when executed by the processor device, cause the processing device to:
process an encoded video stream to produce reconstructed pixel data in a first color space and an indication of a second color space for sample-adaptive offset (SAO) filtering;
when the second color space differs from the first color space,
convert the reconstructed pixel data from the first color space to the second color space,
SAO filter the reconstructed pixel data in the second color space, and
convert the SAO filtered reconstructed pixel data from the second color space to the first color space;
when the second color space does not differ from the first color space,
SAO filter the reconstructed pixels in the first color space.

### Claim 14 (depends on 13)

The system of claim 13, wherein, when the SAO filtered reconstructed pixel data in the first color space serves as a prediction reference, the instructions further cause the processing device to:
predict a portion of pixel data in the encoded video stream from the SAO filtered reconstructed pixel data in the first color space.

### Claim 15 (depends on 13)

The system of claim 13, wherein the SAO filtering includes:
classifying pixel data; and
applying an offset to the pixel data based on the classification.

### Claim 16 (depends on 13)

The system of claim 13, wherein the second color space includes luma and chroma components, and the instructions further cause the processing device to:
downscale the chroma components, wherein the SAO filtering includes SAO filtering the downscaled chroma components; and
upscale the SAO filtered reconstructed pixel data from in the second color space, wherein the converting the SAO filtered reconstructed pixel data to the first color space includes converting the upscaled and SAO filtered reconstructed pixel data.

### Claim 17 (depends on 13)

The system of claim 13, wherein the indication of the second color space is contained in a syntax element in a picture parameter set (PPS) layer of the encoded video stream.

### Claim 18 (depends on 13)

The system of claim 13, wherein:
the second color space includes luma and chroma components; and
the SAO filtering the reconstructed pixel data includes applying a first type of SAO filtering to a luma component and applying a second type of SAO filtering, different from the first type of SAO filtering, to a chroma component.

### Claim 19

A method for decoding video, comprising:
decoding an encoded video stream to produce reconstructed pixel data in a first color space and an indication of a second color space for sample-adaptive offset_(SAO) filtering;
when the second color space differs from the first color space,
converting the reconstructed pixel data from the first color space to the second color space, and
SAO filtering the reconstructed pixel data in the second color space;
when the second color space does not differ from the first color space,
SAO filtering the reconstructed pixels in the first color space.

### Claim 20 (depends on 19)

The method of claim 19, further comprising, when the SAO filtered reconstructed pixel data in the first color space serves as a prediction reference, predicting a portion of pixel data in the encoded video stream from the SAO filtered reconstructed pixel data in the first color space.

### Claim 21 (depends on 19)

The method of claim 19, wherein:
the second color space includes luma and chroma components; and
the SAO filtering the reconstructed pixel data includes applying a first type of SAO filtering to a luma component and applying a second type of SAO filtering, different from the first type of SAO filtering, to a chroma component.
