# US 2020/0267392 A1 · Integrated image reshaping and video coding

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

- Number: US 2020/0267392 A1
- Document ID: US20200267392A1
- Status: Published application
- Kind: A1
- Application number: 16/619,074
- Filed: 2018-06-29
- Published: 2020-08-20
- Earliest claimed: 2017-06-29
- Assignees: Dolby Laboratories Licensing Corporation
- Applicants: Dolby Laboratories Licensing Corporation
- Inventors: Taoran LU; Fangjun PU; Peng YIN; Tao CHEN; Walter J. HUSAK
- Web page: https://patentgrep.com/patent/US20200267392A1

## CPC

- H04N 19/107: between spatial and temporal predictive coding, e.g. picture refresh
- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- H04N 19/124: Quantisation
- H04N 19/136: Incoming video signal characteristics or properties
- H04N 19/174: the region being a slice, e.g. a line of blocks or a group of blocks
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/182: the unit being a pixel
- H04N 19/45: {performing compensation of the inverse transform mismatch, e.g. Inverse Discrete Cosine Transform [IDCT] mismatch}
- H04N 19/463: by compressing encoding parameters before transmission
- H04N 19/503: involving temporal prediction (adaptive coding with adaptive selection between spatial and temporal predictive coding H04N19/107; adaptive coding with adaptive selection among a plurality of temporal predictive coding modes H04N19/109)
- H04N 19/82: involving filtering within a prediction loop
- H04N 19/98: Adaptive-dynamic-range coding [ADRC]
- H04N 19/34: Scalability techniques involving progressive bit-plane based encoding of the enhancement layer, e.g. fine granular scalability [FGS]
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Given a sequence of images in a first codeword representation, methods, processes, and systems are presented for integrating reshaping into a next generation video codec for encoding and decoding the images, wherein reshaping allows part of the images to be coded in a second codeword representation which allows more efficient compression than using the first codeword representation. A variety of architectures are discussed, including: an out-of-loop reshaping architecture, an in-loop-for intra pictures only reshaping architecture, an in-loop architecture for prediction residuals, and a hybrid in-loop reshaping architecture. Syntax methods for signaling reshaping parameters, and image-encoding methods optimized with respect to reshaping are also presented.

## Claims

### Claim 1

A method for coding of images with a processor, the method comprising:
accessing with a processor an input image in a first codeword representation;
generating a forward reshaping function mapping pixels of the input image to a second codeword representation, wherein the second codeword representation allows for a more efficient compression than the first codeword representation;
generating an inverse reshaping function based on the forward reshaping function, wherein the inverse reshaping function maps pixels from the second coding representation to the first coding representation;
for an input pixel region in the input image;
computing a predicted region based in pixel data in a reference frame buffer or previously coded spatial neighbors;
generating a reshaped residual region based on the input pixel region, the predicted region, and the forward reshaping function;
generating a quantized residual region based on the reshaped residual region;
generating a dequantized residual region based on the coded residual region;
generating a reconstructed pixel region based on the dequantized residual region, the predicted region, the forward reshaping function, and the inverse reshaping function; and
generating a reference pixel region to be stored on the reference frame buffer based on the reconstructed pixel region.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
generating a reshaper signaling bitstream which characterizes the forward reshaping function and/or the inverse reshaping function; and
multiplexing the reshaper bitstream with a coded bitstream generated based on the input image to generate an output bitstream.

### Claim 3 (depends on 1)

The method of claim 1, wherein generating the quantized residual region comprises:
applying a forward coding transform to the reshaped residual region to generate transformed data; and
applying a forward coding quantizer to the transformed data to generate quantized data.

### Claim 4 (depends on 3)

The method of claim 3, wherein generating the dequantized residual region comprises:
applying an inverse coding quantizer to the quantized data to generate inverse-quantized data; and
applying an inverse coding transform to the inverse-quantized data to generate the dequantized residual region.

### Claim 5 (depends on 1)

The method of claim 1, wherein generating the reference pixel region to be stored on the reference frame buffer comprises applying a loop filter to the reconstructed pixel region.

### Claim 6 (depends on 1)

The method of claim 1, wherein generating the reshaped residual region comprises computing:
Res_r(i)=Fwd(Orig_sample(i))−Fwd(Pred_sample(i)),
where Inv( ) denotes the inverse reshaping function, Fwd( ) denotes the forward reshaping function, Res_r(i) denotes a pixel of the reshaped residual region, Orig_sample(i) denotes a pixel of the input image region, and Pred_sample(i) denotes a pixel of the predicted region.

### Claim 7 (depends on 6)

The method of claim 6, wherein generating the reconstructed pixel region comprises computing:
Reco_sample(i)=Inv(Res_d(i)+Fwd(Pred_sample(i))),
where Recon_sample(i) denotes a pixel of the reconstructed pixel region and Res_d(i) denotes a pixel of the dequantized residual region representing a close approximation of the Res_r(i) pixel.

### Claim 8 (depends on 6)

The method of claim 6, wherein generating the reshaped residual region comprises computing:
Res_r(i)=a(Pred_sample(i))*(Orig_sample(i)−Pred_sample(i)),
where a(Pred_sample(i)) denotes a scaling factor based on the value of Pred_sample(i).

### Claim 9 (depends on 8)

The method of claim 8, wherein generating the reconstructed pixel region comprises computing
Reco_sample(i)=Pred_sample(i)+(1/a(Pred_sample(i)))*Res_d(i).

### Claim 10

A method for decoding with a processor a coded bitstream to generate an output image in a first codeword representation, the method comprising:
receiving a coded image partially coded in a second codeword representation, wherein the second codeword representation allows for a more efficient compression than the first codeword representation;
receiving reshaping information for the coded image;
generating based on the reshaping information a forward reshaping function mapping pixels from the first codeword representation to the second codeword representation;
generating based on the reshaping information an inverse reshaping function, wherein the inverse reshaping function maps pixels from the second codeword representation to the first codeword representation;
for a region of the coded image;
generating a decoded reshaped residual region;
generating a predicted region based on pixels in a reference pixel buffer or previously decoded spatial neighbors;
generating a reconstructed pixel region based on the decoded reshaped residual region, the predicted region, the forward reshaping function, and the inverse reshaping function; and
generating an output pixel region for the output image based on the reconstructed pixel region; and
storing the output pixel region in the reference pixel buffer.

### Claim 11 (depends on 10)

The method of claim 10, wherein generating the reconstructed pixel region comprises computing:
Reco_sample(i)=Inv(Res_d(i)+Fwd(Pred_sample(i))),
where Reco_sample (i) denotes a pixel of the reconstructed pixel region, Res_d(i) denotes a pixel of the decoded reshaped residual region, Inv( ) denotes the inverse reshaping function, Fwd( ) denotes the forward reshaping function, and Pred_sample(i) denotes a pixel of the predicted region.

### Claim 12 (depends on 10)

The method of claim 10 wherein instead of generating a forward and an inverse reshaping function, the method comprises:
generating a reshaping scaling function based on the reshaping information;
and for the region of the coded image;
generating the reconstructed pixel region based on the decoded reshaped residual region, the predicted region, and the reshaping scaling function.

### Claim 13 (depends on 12)

The method of claim 12, wherein generating the reconstructed pixel region comprises computing:
Reco_sample(i)=Pred_sample(i)+(1/a(Pred_sample(i)))*Res_d(i),
where Reco_sample (i) denotes a pixel of reconstruction pixel region, Res_d(i) denotes a pixel of the decoded reshaped residual region, a( ) denotes the reshaping scaling function, and Pred_sample(i) denotes a pixel of the predicted region.

### Claim 14

A method for coding images with a processor, the method comprising:
accessing with a processor an input image in a first codeword representation;
selecting a reshaping architecture from two or more candidate coding architectures for compressing the input image in a second codeword representation, wherein the second codeword representation allows for a more efficient compression than the first codeword representation, wherein the two or more candidate coding architectures comprise an out-of-loop reshaping architecture, an in-loop-for intra pictures only reshaping architecture, and an in-loop architecture for prediction residuals; and
compressing the input image according to the selected reshaping architecture.

### Claim 15 (depends on 14)

The method of claim 14, wherein compressing the input image according to the out-of-loop reshaping architecture comprises:
generating a forward reshaping function mapping pixels of the input image to the second codeword representation,
generating an inverse reshaping function based on the forward reshaping function, wherein the inverse reshaping function maps pixels from the second codeword representation to the first codeword representation;
generating a reshaped input image based on the input image and the forward reshaping function; and
compressing the reshaped input image to generate an output bitstream.

### Claim 16 (depends on 14)

The method of claim 14, wherein compressing the input image according to the in-loop Intra-only reshaping architecture comprises:
generating a forward reshaping function mapping pixels of the input image to the second codeword representation,
generating an inverse reshaping function based on the forward reshaping function, wherein the inverse reshaping function maps pixels from the second codeword representation to the first codeword representation;
for an input pixel region in the input image to be coded in intra mode;
generating a reshaped region based on the input pixel region and the forward reshaping function;
computing a predicted region based on pixel data in previously coded spatial neighbors;
generating a coded residual region based on a residual between the reshaped input pixel region and the predicted region;
generating a decoded residual region based on the coded region;
generating a reconstructed pixel region based on the decoded residual region, the predicted region, and the inverse reshaping function; and
generating a reference pixel region to be stored on the reference frame buffer based on the reconstructed pixel region.

### Claim 17 (depends on 1, 14)

The method of claim 14, wherein compressing the input image according to the in-loop architecture for prediction residuals comprises executing a method according to claim 1.

### Claim 18 (depends on 14)

The method of claim 14, wherein the two or more candidate coding architectures comprise a hybrid in-loop architecture, wherein intra slices in the input image are encoded according to the in-loop-for intra only reshaping architecture and inter slices in the input image are encoded according to the in-loop architecture for prediction residuals.

### Claim 19

A method for decoding with a processor a coded bitstream to generate an output image in a first codeword representation, the method comprising:
receiving a coded bitstream comprising one or more coded images, wherein at least part of a coded image is in a second codeword representation, wherein the second codeword representation allows for a more efficient compression than the first codeword representation;
determining a reshaping decoder architecture based on metadata in the coded bitstream, wherein the reshaping decoder architecture comprises one of an out-of-loop reshaping architecture, an in-loop-for intra pictures only reshaping architecture, or an in-loop architecture for prediction residuals;
receiving reshaping information for a coded image in the coded bitstream; and
decompressing the coded image according to the reshaping decoder architecture to generate the output image.

### Claim 20 (depends on 19)

The method of claim 19, wherein decompressing the coded image according to the out-of-loop reshaping architecture comprises:
generating based on the reshaping information an inverse reshaping function, wherein the inverse reshaping function maps pixels from the second codeword representation to the first codeword representation;
decompressing the coded image to generate a decoded reshaped image; and
applying the inverse reshaping function to the decoded reshaped image to generate the output image.

### Claim 21 (depends on 19)

The method of claim 19, wherein decompressing the coded image according to the in-loop intra-only reshaping architecture comprises:
generating based on the reshaping information an inverse reshaping function, wherein the inverse reshaping function maps pixels from the second codeword representation to the first codeword representation;
for a region of an intra coded image;
generating a decoded region using intra prediction;
generating an inverse reshaped region based on the inverse reshaping function and the decoded region;
generating an output pixel region for the output image based on the inverse reshaped region; and
storing the output pixel region in a reference pixel buffer.

### Claim at position 22

22-30. (canceled)
