# US 2012/0250767 A1 · Method and apparatus for bi-directional prediction within p-slices

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

- Number: US 2012/0250767 A1
- Document ID: US20120250767A1
- Status: Published application
- Kind: A1
- Application number: 13/516,269
- Filed: 2009-12-15
- Published: 2012-10-04
- Earliest claimed: 2009-12-15
- Inventors: Ferran Valldosera; Hua Yang; Gad Berger
- Web page: https://patentgrep.com/patent/US20120250767A1

## CPC

- H04N 19/577: Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
- H04N 19/109: among a plurality of temporal predictive coding modes
- H04N 19/139: Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/31: in the temporal domain
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N 19/52: by predictive encoding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Method and apparatuses are provided to enable bi-directional prediction (or bi-prediction) within P slices. A bi-predicted P slice is introduced herein as a new slice type in addition to existing I, P and B slices. A benefit of the new bi-predicted P slice is that it enables a video encoder to support temporal scalability without the need to use B pictures. Bi-predicted P slices enable the definition of a hierarchical GOP structure, which is a common method to allow temporal scalability in a video encoder. Another advantage of bi-predicted P slices is that it can improve coding efficiency over uni-directional P slices for some particular video content frames.

## Claims

### Claim 1

A method for encoding a video bitstream, the method comprising the steps of:
determining that a bi-predicted P-slice will be used for encoding;
determining a prediction mode for the selected bi-predicted P-slice; and
encoding the bi-predicted P-slice with the determined prediction mode.

### Claim 2 (depends on 1)

The method according to claim 1, wherein said determining a prediction mode further comprises:
calculating motion vector predictors for macroblocks neighboring a macroblock selected from the bi-predicted P-slice.

### Claim 3 (depends on 2)

The method according to claim 2, wherein said determining a prediction mode further comprises:
calculating motion vectors from the calculated motion vector predictors;
determining prediction blocks from the calculated motion vectors; and
calculating a cost measure for determined prediction blocks, said encoding being based on the lowest cost measure determined for the selected bi-predicted P slice.

### Claim 4 (depends on 3)

The method according to claim 3, wherein said calculating a cost measure comprises calculating the cost measure for determined forward and backward prediction blocks

### Claim 5 (depends on 1)

The method according to claim 1, wherein said determining that a bi-predicted P-slice will be used for encoding comprises:
determining a frame type; and
determining the frame types of all frames within a GOP structure from the determined frame type prior to encoding.

### Claim 6 (depends on 1)

The method according to claim 1, wherein said determining that a bi-predicted P-slice will be used for encoding enables implementing hierarchical GOP structures and thereby provides temporal scalability of a video bitstream to be encoded.

### Claim 7

A video encoder comprising:
a reference picture selector in signal communication with a reference pictures store a motion compensation module and a motion estimation module, said reference picture selector configured to receive a frame type designation as an input and wherein the reference picture selector and said reference pictures store enable the use and selection of bi-prediction in P-slices.

### Claim 8 (depends on 7)

The video encoder according to claim 7, further comprising a processor and a memory in communication with the processor, said processor configured to determine a prediction mode based on a determination as to the lowest cost measure to select forward or prediction mode for each macroblock within a selected bi-predicted P slice.

### Claim 9 (depends on 8)

The video encoder according to claim 8, wherein said processor is further configured to determine a frame type for all frames within a GOP, said determined frame type operating as the input of the reference picture selector.

### Claim 10 (depends on 8)

The video encoder according to claim 8, wherein said determination as to the lowest cost measure comprises calculating the cost based on a Rate-Distortion measure.

### Claim 11 (depends on 8)

The video encoder according to claim 8 wherein said processor determines the prediction mode by calculating motion vector predictors for macroblocks neighboring a macroblock selected from the bi-predicted P-slice.

### Claim 12 (depends on 8)

The video encoder according to claim 8, wherein said processor encodes the bi-predicted P-slice with the determined prediction mode.

### Claim 13

A video encoder comprising:
means for determining that a bi-predicted P-slice will be used for encoding;
means for determining a prediction mode for the selected bi-predicted P-slice;
means for encoding the bi-predicted P-slice with the determined prediction mode.

### Claim 14 (depends on 13)

The video encoder of claim 13, further comprising:
means for calculating motion vector predictors for macroblocks neighboring a macroblock selected from the bi-predicted P-slice.

### Claim 15 (depends on 14)

The video encoder of claim 14, further comprising:
means for calculating motion vectors from the calculated motion vector predictors;
means for determining prediction blocks from the calculated motion vectors; and
means for calculating a cost measure for determined prediction blocks, said encoding being based on the lowest cost measure determined for the selected bi-predicted P-slice.

### Claim 16 (depends on 14)

The video encoder of claim 14, wherein said means for calculating a cost measure comprises means for calculating the cost measure for determined forward and backward prediction blocks

### Claim 17 (depends on 13)

The video encoder of claim 13, further comprising:
means for determining a frame type; and
means for determining the frame types of all frames within a GOP structure from the determined frame type prior to encoding.
