Context initialization based on slice header flag and slice type
Technique for initialization of encoders and decoders. In some cases, the decoder receives a slice and identifies if the slice is either a forward predicted B-slice or a backward predicted B-slice, and not both a forward and backward predicted B-slice, and based upon this identification initializes, using a P-slice technique, a context associated with the slice.
1 . An encoding apparatus comprising at least one processor comprising processor circuitry configured individually and/or collectively to:
encode, in a bitstream, a presence flag indicating that an initialization flag is not included in the bitstream;
for a slice of a picture, select initialization values for initializing an arithmetic coding;
based on the presence flag indicating that the initialization flag is not included in the bitstream, select a first set of initialization values in response to a slice type of the slice being a B slice type, and select a second set of initialization values in response to the slice type of the slice being a P slice type;
initialize the arithmetic coding using the selected initialization values; and
encode one or more syntax elements of the slice using the arithmetic coding.
2 . The encoding apparatus of claim 1 , wherein the presence flag is in a picture parameter set.
3 . The encoding apparatus of claim 1 , wherein the arithmetic coding is context-based adaptive binary arithmetic coding (CABAC).
4 . The encoding apparatus of claim 1 , wherein to initialize the arithmetic coding, the at least one processor is further configured individually and/or collectively to:
set context models using the selected initialization values.
5 . A video encoding method comprising:
encoding, in a bitstream, a presence flag indicating that an initialization flag is not included in the bitstream;
for a slice of a picture, selecting initialization values for initializing an arithmetic coding;
based on the presence flag indicating that the initialization flag is not included in the bitstream, selecting a first set of initialization values in response to a slice type of the slice being a B slice type, and selecting a second set of initialization values in response to the slice type of the slice being a P slice type;
initializing the arithmetic coding using the selected initialization values; and
encoding one or more syntax elements of the slice using the arithmetic coding.
6 . The video encoding method of claim 5 , wherein the presence flag is in a picture parameter set.
7 . The video encoding method of claim 5 , wherein the arithmetic coding is context-based adaptive binary arithmetic coding (CABAC).
8 . The video encoding method of claim 5 , wherein initializing the arithmetic coding further comprises:
setting context models using the selected initialization values.
9 . A decoding apparatus comprising at least one processor comprising processor circuitry configured individually and/or collectively to:
decode, from a bitstream, a presence flag indicating that an initialization flag is not included in the bitstream;
for a slice of a picture, select initialization values for initializing an arithmetic coding;
based on the presence flag indicating that the initialization flag is not included in the bitstream, select a first set of initialization values in response to a slice type of the slice being a B slice type, and select a second set of initialization values in response to the slice type of the slice being a P slice type;
initialize the arithmetic coding using the selected initialization values; and
decode one or more syntax elements of the slice using the arithmetic coding.
10 . The decoding apparatus of claim 9 , wherein the presence flag is in a picture parameter set.
11 . The decoding apparatus of claim 9 , wherein the arithmetic coding is context-based adaptive binary arithmetic coding (CABAC).
12 . The decoding apparatus of claim 9 , wherein to initialize the arithmetic coding, the at least one processor is further configured individually and/or collectively to:
set context models using the selected initialization values.
13 . A video decoding method comprising:
decoding, from a bitstream, a presence flag indicating that an initialization flag is not included in the bitstream;
for a slice of a picture, selecting initialization values for initializing an arithmetic coding;
based on the presence flag indicating that the initialization flag is not included in the bitstream, selecting a first set of initialization values in response to a slice type of the slice being a B slice type, and selecting a second set of initialization values in response to the slice type of the slice being a P slice type;
initializing the arithmetic coding using the selected initialization values; and
decoding one or more syntax elements of the slice using the arithmetic coding.
14 . The video decoding method of claim 13 , wherein the presence flag is in a picture parameter set.
15 . The video decoding method of claim 13 , wherein the arithmetic coding is context-based adaptive binary arithmetic coding (CABAC).
16 . The video decoding method of claim 13 , wherein initializing the arithmetic coding further comprises:
setting context models using the selected initialization values.