# US 10,484,696 B2 · Method and apparatus for color index prediction

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

- Number: US 10,484,696 B2
- Document ID: US10484696B2
- Status: Granted
- Kind: B2
- Application number: 15/038,599
- Filed: 2015-01-07
- Published: 2016-10-13
- Granted: 2019-11-19
- Earliest claimed: 2014-01-07
- Assignees: Mediatek Inc.
- Applicants: Mediatek Inc.
- Inventors: Yu-Chen Sun; Tzu-Der Chuang; Yi-Wen Chen; Yu-Wen Huang
- Web page: https://patentgrep.com/patent/US10484696B2

## CPC

- H04N 19/186: the unit being a colour or a chrominance component
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/182: the unit being a pixel
- 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/93: Run-length coding
- H04N 19/129: Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
- H04N 19/433: characterised by techniques for memory access
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method and apparatus for coding a block of video data using index or pixel value prediction including a copy-by-pattern-search mode are disclosed. According to the present invention, a current search pattern is determined based on one or more previous coded pixels. One or more predictors are derived according to the current search pattern for a current index or pixel value of a current pixel in the current block. Encoding or decoding is then applied to one or more following indices or pixel values of one or more following pixels including the current pixel using the predictors. In a simplest case, the one or more previous coded pixels correspond to a single previous coded pixel at the left side of the current pixel and the one or more following pixels contain only the current pixel.

## Claims

### Claim 1

A method of coding a current block of video data using palette coding for a video coding system, the method comprising:
receiving input data associated with the current block;
maintaining a pattern relation table (PRT), which includes one or more entries, by performing at least:
for a particular entry of the PRT, recording a search pattern and one or more corresponding predictors, wherein the search pattern is derived from value or values of K previous coded pixel or pixels, each of the one or more corresponding predictors corresponds to candidate value or values of N following pixel or pixels associated with the K previous coded pixel or pixels, and K and N are integers equal to or greater than one;
determining a current search pattern for a current pixel based on K pixel or pixels at K selected position or positions coded before the current pixel;
searching the PRT to identify one of the one or more entries which contains a search pattern identical to the current search pattern;
setting one of one or more predictors recorded in the PRT in association with the identified entry as a current predictor; and
applying encoding or decoding to N pixel or pixels, including the current pixel and after the K pixel or pixels at the K selected position or positions coded before the current pixel, according to the current predictor.

### Claim 2 (depends on 1)

The method of claim 1, wherein
K is set to one such that the K previous coded pixel or pixels for the particular entry of the PRT corresponds to a first pixel,
N is set to one such that the N following pixel or pixels for the particular entry of the PRT corresponds to a second pixel, and
the first pixel is at a left side of the second pixel.

### Claim 3 (depends on 1)

The method of claim 1, wherein, for the particular entry of the PRT,
the search pattern is derived from index value or index values of the K previous coded pixel or pixels, and
the index value or index values correspond to one or more individual color indices.

### Claim 4 (depends on 1)

The method of claim 1, wherein, for the particular entry of the PRT,
the search pattern is derived from index value or index values of the K previous coded pixel or pixels, and
the index value or index values correspond to one or more joint color indices.

### Claim 5 (depends on 1)

The method of claim 1, further comprising repetitively applying the current predictor to pixels following the N pixel or pixels for a number of times according to a run length value.

### Claim 6 (depends on 1)

The method of claim 1, wherein the PRT stores, for the particular entry of the PRT, index values or pixel values used as the one or more predictors.

### Claim 7 (depends on 1)

The method of claim 1, further comprising updating the PRT according to the current search pattern and value or values of the N pixel or pixels that include the current pixel and follow the K pixel or pixels.

### Claim 8 (depends on 7)

The method of claim 7, wherein when K is set to one and N is set to one, the PRT is updated according to a decoded index or pixel value on a left side of the current pixel and a current index or pixel value for the current index.

### Claim 9 (depends on 7)

The method of claim 7, wherein the updating the PRT is not performed when the N pixel or pixels, including the current pixel and following the K pixel or pixels, correspond to a search pattern included in the one or more entries of the PRT.

### Claim 10 (depends on 7)

The method of claim 7, wherein the updating the PRT is not performed when the N pixel or pixels, including the current pixel and following the K pixel or pixels, correspond to one existing prediction pattern of another prediction mode.

### Claim 11 (depends on 7)

The method of claim 7, wherein the updating the PRT is not performed when the N pixel or pixels, including the current pixel and following the K pixel or pixels, correspond to a predictor recorded in the PRT.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
removing a selected entry of the PRT when an associated search pattern of the selected entry corresponds to a longest latest-used-time search pattern or a least used search pattern.

### Claim 13 (depends on 1)

The method of claim 1, further comprising, when the PRT stores more than one predictor in association with the identified search pattern, identifying the one of the predictors according to a selection indication.

### Claim 14 (depends on 1)

The method of claim 1, wherein the PRT contains a replacement index that is used in place of an escape index.

### Claim 15 (depends on 1)

The method of claim 1, wherein the PRT is reused by multiple blocks corresponding to coding units (CUs), prediction units (PUs) or transform units (TUs) within a coding tree unit (CTU), a tile, or a slice.

### Claim 16 (depends on 1)

The method of claim 1, wherein
a scanning pattern traverses through all pixels of the current block in multiple directions, and
multiple PRTs associated with the multiple directions are used for the encoding or decoding of the N pixel or pixels that include the current pixel and follow the K pixel or pixels.

### Claim 17 (depends on 1)

The method of claim 1, further comprising, when the current predictor includes a particular index or pixel value that is larger than a threshold value, replacing the particular index or pixel value by a predefined index or pixel value, or a derived index or pixel value.

### Claim 18 (depends on 1)

The method of claim 1, further comprising, when the current predictor includes a particular index or pixel value that is redundant according to a previous pixel or an above pixel, replacing the particular index or pixel value by a predefined index or pixel value, or a derived index or pixel value.

### Claim 19 (depends on 1)

The method of claim 1, further comprising removing, in a parsing stage, redundant index values according to a previous pixel, above pixel, or derived palette predictor.

### Claim 20 (depends on 1)

The method of claim 1, wherein the encoding or decoding further comprises a copy-above mode and a copy-left mode.

### Claim 21

An apparatus for coding a current block of video data using palette coding for a video coding system, the apparatus comprising one or more electronic circuits configured to:
receive input data associated with the current block:
maintain a pattern relation table (PRT), which includes one or more entries, by performing at least:
for each entry of the PRT, recording a search pattern and one or more corresponding predictors, wherein the search pattern is derived from value or values of K previous coded pixel or pixels, each of the one or more corresponding predictors corresponds to candidate pixel value or values of N following pixel or pixels associated with the K previous coded pixel or pixels, and K and N are integers equal to or greater than one;
determine a current search pattern for a current pixel based on K pixel or pixels at K selected position or positions coded before the current pixel;
search the PRT to identify one of the one or more entries which contains a search pattern identical to the current search pattern;
set one of one or more predictors recorded in the PRT in association with the identified entry as a current predictor; and
apply encoding or decoding to N pixel or pixels, including the current pixel and following the K pixel or pixels at the K selected position or positions coded before the current pixel, according to the current predictor.
