# US 2022/0046276 A1 · Adaptive switching of color spaces, color sampling rates and/or bit depths

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

- Number: US 2022/0046276 A1
- Document ID: US20220046276A1
- Status: Published application
- Kind: A1
- Application number: 17/507,519
- Filed: 2021-10-21
- Published: 2022-02-10
- Earliest claimed: 2016-04-13
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Bin Li; Jizheng Xu; Feng Wu
- Web page: https://patentgrep.com/patent/US20220046276A1

## CPC

- H04N 19/59: involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- H04N 19/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/157: Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/186: the unit being a colour or a chrominance component
- H04N 19/587: involving temporal sub-sampling or interpolation, e.g. decimation or subsequent interpolation of pictures in a video sequence
- H04N 19/82: involving filtering within a prediction loop
- H04N 19/88: involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks
- H04N 19/172: the region being a picture, frame or field
- H04N 19/61: in combination with predictive coding
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Innovations in adaptive encoding and decoding for units of a video sequence can improve coding efficiency. For example, some of the innovations relate to encoding/decoding that includes adaptive switching of color spaces between units within a video sequence. Other innovations relate encoding/decoding that includes adaptive switching of color sampling rates between units within a video sequence. Still other innovations relate encoding/decoding that includes adaptive switching of bit depths between units within a video sequence.

## Claims

### Claim at position 1

-34. (canceled)

### Claim 35

One or more non-transitory computer-readable media having stored thereon computer-executable instructions for causing one or more processors, when programmed thereby, to perform operations comprising:
encoding video in a sequence, including switching color spaces, color sampling rates and/or bit depths spatially and/or temporally between at least some units of the video within the sequence during the encoding, the color spaces including an RGB-type color space and a YCoCg color space, wherein the encoding further includes:
for a given unit of the units of the video, determining a prediction mode of the given unit;
determining whether or not a condition is satisfied, the condition depending on one or more of the prediction mode of the given unit and whether the given unit has residual values;
based at least in part on the condition being satisfied, setting a flag value for the given unit, the flag value indicating a selection between the RGB-type color space and the YCoCg color space for the given unit; and
entropy coding the flag value using context-adaptive binary arithmetic coding; and
outputting encoded data in a bitstream, the encoded data including one or more signals indicating how the color spaces, the color sampling rates and/or the bit depths switch between the at least some units of the video within the sequence, wherein the one or more signals include the flag value for the given unit as part of a syntax structure for the given unit when the prediction mode of the given unit is intra or when the prediction mode of the given unit is inter and the given unit has residual values.

### Claim 36 (depends on 35)

The one or more computer-readable media of claim 35, wherein the encoding further includes selecting between:
for lossy coding, using color space conversion operations to switch between the RGB-type color space and the YCoCg color space; and
for lossless coding, using invertible color space conversion operations to switch between the RGB-type color space and the YCoCg color space.

### Claim 37 (depends on 35)

The one or more computer-readable media of claim 35, wherein the units of the video are coding units of a given picture of the sequence.

### Claim 38 (depends on 35)

The one or more computer-readable media of claim 35, wherein different color components of the given unit have different bit depths.

### Claim 39 (depends on 35)

The one or more computer-readable media of claim 35, wherein the switching includes performing color space conversion operations between the RGB-type color space and the YCoCg color space for the given unit.

### Claim 40 (depends on 39)

The one or more computer-readable media of claim 39, wherein the switching further includes performing right shift operations on at least some results of the color space conversion operations.

### Claim 41 (depends on 39)

The one or more computer-readable media of claim 39, wherein the encoding further includes:
performing prediction operations for the given unit.

### Claim 42 (depends on 35)

The one or more computer-readable media of claim 35, wherein the one or more signals also include the flag value as part of the syntax structure for the given unit when the prediction mode of the given unit is intra block copy prediction and the given unit has residual values.

### Claim 43

In a computer system that implements a video decoder, a method comprising:
receiving encoded data in a bitstream, the encoded data including one or more signals indicating how color spaces, color sampling rates and/or bit depths switch between at least some units of video within a sequence, the color spaces including an RGB-type color space and a YCoCg color space, wherein the one or more signals include a flag value for a given unit of the units of the video as part of a syntax structure for the given unit when a prediction mode of the given unit is intra or when the prediction mode of the given unit is inter and the given unit has residual values, the flag value having been entropy coded using context-adaptive binary arithmetic coding, and wherein the flag value indicates a selection between the RGB-type color space and the YCoCg color space for the given unit; and
decoding the encoded data, including switching the color spaces, the color sampling rates and/or the bit depths spatially and/or temporally between the at least some units of the video within the sequence during the decoding, wherein the decoding further includes:
for the given unit, determining the prediction mode of the given unit;
determining whether or not a condition is satisfied, the condition depending on one or more of the prediction mode of the given unit and whether the given unit has residual values; and
based at least in part on the condition being satisfied, parsing and entropy decoding the flag value.

### Claim 44 (depends on 43)

The method of claim 43, wherein the units of the video are coding units of a given picture of the sequence.

### Claim 45 (depends on 43)

The method of claim 43, wherein different color components of the given unit have different bit depths.

### Claim 46 (depends on 43)

The method of claim 43, wherein the switching includes performing color space conversion operations between the YCoCg color space and the RGB-type color space for the given unit.

### Claim 47 (depends on 46)

The method of claim 46, wherein the switching further includes performing left shift operations on at least some results of the color space conversion operations.

### Claim 48 (depends on 43)

The method of claim 43, wherein the one or more signals also include the flag value as part of the syntax structure for the given unit when the prediction mode of the given unit is intra block copy prediction and the given unit has residual values.

### Claim 49

One or more non-transitory computer-readable media having stored thereon encoded data in a bitstream, the encoded data including one or more signals indicating how color spaces, color sampling rates and/or bit depths switch between at least some units of video within a sequence, the color spaces including an RGB-type color space and a YCoCg color space, wherein the one or more signals include a flag value for a given unit of the units of the video as part of a syntax structure for the given unit when a prediction mode of the given unit is intra or when the prediction mode of the given unit is inter and the given unit has residual values, the flag value having been entropy coded using context-adaptive binary arithmetic coding, and wherein the flag value indicates a selection between the RGB-type color space and the YCoCg color space for the given unit, the encoded data being organized to facilitate decoding by operations that include switching the color spaces, the color sampling rates and/or the bit depths spatially and/or temporally between the at least some units of the video within the sequence during the decoding, and wherein the operations further include:
for the given unit, determining the prediction mode of the given unit;
determining whether or not a condition is satisfied, the condition depending on one or more of the prediction mode of the given unit and whether the given unit has residual values; and
based at least in part on the condition being satisfied, parsing and entropy decoding the flag value.

### Claim 50 (depends on 49)

The one or more computer-readable media of claim 49, wherein the units of the video are coding units of a given picture of the sequence.

### Claim 51 (depends on 49)

The one or more computer-readable media of claim 49, wherein different color components of the given unit have different bit depths.

### Claim 52 (depends on 49)

The one or more computer-readable media of claim 49, wherein the switching includes performing color space conversion operations between the YCoCg color space and the RGB-type color space for the given unit.

### Claim 53 (depends on 52)

The one or more computer-readable media of claim 52, wherein the switching further includes performing left shift operations on at least some results of the color space conversion operations.

### Claim 54 (depends on 49)

The one or more computer-readable media of claim 49, wherein the one or more signals also include the flag value as part of the syntax structure for the given unit when the prediction mode of the given unit is intra block copy prediction and the given unit has residual values.
