Coding of intra-prediction modes
Coding a current block using an intra-prediction mode are disclosed. A method includes receiving a block of quantized transform coefficients, determining a context for coding the intra-prediction mode using the quantized transform coefficients, and coding the intra-prediction mode using the context. An apparatus, including a memory and a processor, for encoding and decoding a current block using an intra-prediction mode according is also disclosed. The processor is configured to execute instructions stored in the memory to decode, from an encoded bitstream, a block of quantized transform coefficients, determine a category for the intra-prediction mode using the quantized transform coefficients, and decode, from the encoded bitstream, the current block using the category.
1. A method for coding a current block using an intra-prediction mode, comprising:
receiving a block of quantized transform coefficients;
determining a context for coding the intra-prediction mode using the quantized transform coefficients, wherein the context is used to select a probability context model for entropy coding the intra-prediction mode, and wherein determining the context comprising:
determining the context for coding the intra-prediction mode based on a result of a comparison of a first number of non-zero coefficients in a first portion of a row of the block of quantized transform coefficients to a second number of non-zero coefficients in a second portion of a column of the block of quantized transform coefficients; and
coding the intra-prediction mode using the probability context model.
2. The method of claim 1 , wherein coding the intra-prediction mode using the context comprises:
decoding, from an encoded bitstream, the intra-prediction mode using the context.
3. The method of claim 1 , wherein coding the intra-prediction mode using the context comprises:
encoding, in an encoded bitstream, the intra-prediction mode using the context.
4. The method of claim 3 , further comprising:
determining an intra-prediction mode predictor using the quantized transform coefficients; and
encoding, in the encoded bitstream, whether the intra-prediction mode predictor and the intra-prediction mode are the same.
5. The method of claim 1 , wherein the row is a top-most row of the block of quantized transform coefficients, and the column is a left-most column of the block of quantized transform coefficients.
6. The method of claim 1 , wherein determining the context comprises:
determining a category for the intra-prediction mode using the quantized transform coefficients, the category having a value selected from a set comprising a first category value and a second category value.
7. The method of claim 6 , wherein determining the context further comprises:
determining a first context for coding the intra-prediction mode; and
determining the context using the first context and the category.
8. The method of claim 6 , wherein determining the category for the intra-prediction mode comprises:
determining a difference between the first number of non-zero coefficients in the row of the block of quantized transform coefficients and the second number of non-zero coefficients in the column of the block of quantized transform coefficients;
on condition that the difference is greater than a first threshold, setting the category to the first category value; and
on condition that the difference is less than a second threshold, setting the category to the second category value.
9. The method of claim 8 , wherein determining the category for the intra-prediction mode further comprises:
on condition that the difference is not greater than the first threshold and is not less than the second threshold, determining the category based on a comparison of a third number of non-zero coefficients in another row of the block of quantized transform coefficients to a fourth number of non-zero coefficient in another column of the block of quantized transform coefficients.
10. An apparatus for decoding a current block using an intra-prediction mode, comprising:
a memory; and
a processor configured to execute instructions stored in the memory to:
receive, in an encoded bitstream, a block of quantized transform coefficients for a residual block of the current block;
determine a context for decoding the intra-prediction mode using the quantized transform coefficients, wherein the context is used to select a probability context model for entropy coding the intra-prediction mode, and wherein to determine the context comprises to:
determine the context for decoding the intra-prediction mode based on a comparison of a first number of non-zero coefficients in at least some rows of the block of quantized transform coefficients to a second number of non-zero coefficient in at least some columns of the block of quantized transform coefficients; and
decode, from the encoded bitstream, the intra-prediction mode using the probability context model.
11. The apparatus of claim 10 , wherein the at least some rows include a row that is a top-most row of the block of quantized transform coefficients, and the at least some columns include a column that is a left-most column of the block of quantized transform coefficients.
12. The apparatus of claim 10 , wherein to determine the context comprises to:
determine a category for the intra-prediction mode using the quantized transform coefficients.
13. The apparatus of claim 12 , wherein to determine the category for the intra-prediction mode comprises to:
determine a difference between the first number of non-zero coefficients in the at least some rows of the block of quantized transform coefficients and the second number of non-zero coefficient in the at least some columns of the block of quantized transform coefficients; and
set the category to a category value based on the difference.
14. The apparatus of claim 13 , wherein to determine the context for the intra-prediction mode comprises to:
determine a first context for coding the intra-prediction mode; and
determine the context using the first context and the category.
15. An apparatus for decoding a current block using an intra-prediction mode, comprising:
a memory; and
a processor configured to execute instructions stored in the memory to:
decode, from an encoded bitstream, a block of quantized transform coefficients;
identify a direction of the intra-prediction mode based on a distribution of non-zero quantized transform coefficients in at least a part of the block of quantized transform coefficients, the direction being one of horizontal, vertical, or diagonal;
determine a first context for decoding the intra-prediction mode;
determine a second context using the direction and the first context; and
decode the intra-prediction mode using the second context.
16. The apparatus of claim 15 , wherein the instructions further comprise instructions to:
decode, from the encoded bitstream, whether an intra-prediction mode predictor is the same as the intra-prediction mode, wherein the intra-prediction mode predictor is a prediction of the intra-prediction mode and is determined by an encoder using the quantized transform coefficients.