Method and apparatus for video coding
An apparatus for video coding includes processing circuitry that encodes prediction information of a current block in a video bitstream. The prediction information indicates a first set of intra prediction direction mode numbers for the current block. The processing circuitry determines whether a first intra prediction direction mode number of a neighboring block of the current block is in the first set of intra prediction direction mode numbers. In response to the first intra prediction direction mode number not being in the first set of intra prediction direction mode numbers, the processing circuitry determines a most probable mode for the current block based on a second intra prediction direction mode number in the first set of intra prediction direction mode numbers that is nearest to the first intra prediction direction mode number. The processing circuitry encodes the current block based on the most probable mode of the current block.
1. A method for video encoding in an encoder, comprising:
encoding prediction information of a current block in a video bitstream, the prediction information indicating a first set of intra prediction direction mode numbers for the current block;
determining whether a first intra prediction direction mode number of a neighboring block of the current block is in the first set of intra prediction direction mode numbers of the current block; and
in response to the first intra prediction direction mode number of the neighboring block not being in the first set of intra prediction direction mode numbers of the current block,
determining a most probable mode for the current block based on a second intra prediction direction mode number in the first set of intra prediction direction mode numbers of the current block that is nearest to the first intra prediction direction mode number of the neighboring block, and
encoding the current block based on the most probable mode of the current block.
2. The method of claim 1 , wherein the current block is a square block and the neighboring block of the current block is a non-square block.
3. The method of claim 2 , wherein a second set of intra prediction direction mode numbers of the non-square block includes a subset of the first set of intra prediction direction mode numbers of the square block and at least one additional intra prediction direction mode number that is different from the first set of intra prediction direction mode numbers of the square block.
4. The method of claim 3 , wherein the first intra prediction direction mode number of the non-square block corresponds to a first intra prediction direction that is opposite to a second intra prediction direction, wherein an intra prediction direction mode number corresponding to the second intra prediction direction is in the first set of intra prediction direction mode numbers of the square block and not in the second set of intra prediction direction mode numbers of the non-square block.
5. The method of claim 3 , wherein a number of the at least one additional intra prediction direction mode number is a fixed number that is independent of a shape of the non-square block, the number being from 1 to 7 when the first set of intra prediction direction mode numbers has 33 intra prediction direction mode numbers, the number being from 2 to 14 when the first set of intra prediction direction mode numbers has 65 intra prediction direction mode numbers, and the number being from 4 to 28 when the first set of intra prediction direction mode numbers has 127 intra prediction direction mode numbers.
6. The method of claim 3 , wherein a number of the at least one additional intra prediction direction mode number is determined based on at least one of a width of the non-square block, a height of the non-square block, a ratio of the width and the height of the non-square block, or an area of the non-square block.
7. The method of claim 3 , further comprising:
encoding a syntax element in the video bitstream, the syntax element indicating a number of the at least one additional intra prediction direction mode number, the syntax element being in at least one of a sequence parameter set, a picture parameter set, a slice header, a common syntax element for a region of a picture, or a common parameter for the region of the picture.
8. The method of claim 3 , wherein a number of the at least one additional intra prediction direction mode number is equal to a number M when an aspect ratio of the non-square block is equal to or less than 2.
9. The method of claim 8 , wherein the number M is equal to 3 when the first set of intra prediction direction mode numbers has 33 intra prediction direction mode numbers, and the number M is equal to 6 when the first set of intra prediction direction mode numbers has 65 intra prediction direction mode numbers.
10. The method of claim 3 , wherein a number of the at least one additional intra prediction direction mode number is equal to a number N when an aspect ratio of the non-square block is equal to or more than 4.
11. The method of claim 10 , wherein the number N is equal to 5 when the first set of intra prediction direction mode numbers has 33 intra prediction direction mode numbers, and the number N is equal to 10 when the first set of intra prediction direction mode numbers has 65 intra prediction direction mode numbers.
12. An apparatus, comprising:
processing circuitry configured to:
encode prediction information of a current block in a video bitstream, the prediction information indicating a first set of intra prediction direction mode numbers for the current block;
determine whether a first intra prediction direction mode number of a neighboring block of the current block is in the first set of intra prediction direction mode numbers of the current block; and
in response to the first intra prediction direction mode number of the neighboring block not being in the first set of intra prediction direction mode numbers of the current block,
determine a most probable mode for the current block based on a second intra prediction direction mode number in the first set of intra prediction direction mode numbers of the current block that is nearest to the first intra prediction direction mode number of the neighboring block, and
encode the current block based on the most probable mode of the current block.
13. The apparatus of claim 12 , wherein the current block is a square block and the neighboring block of the current block is a non-square block.
14. The apparatus of claim 13 , wherein a second set of intra prediction direction mode numbers of the non-square block includes a subset of the first set of intra prediction direction mode numbers of the square block and at least one additional intra prediction direction mode number that is different from the first set of intra prediction direction mode numbers of the square block.
15. The apparatus of claim 14 , wherein the first intra prediction direction mode number of the non-square block corresponds to a first intra prediction direction that is opposite to a second intra prediction direction, wherein an intra prediction direction mode number corresponding to the second intra prediction direction is in the first set of intra prediction direction mode numbers of the square block and not in the second set of intra prediction direction mode numbers of the non-square block.
16. The apparatus of claim 14 , wherein a number of the at least one additional intra prediction direction mode number is a fixed number that is independent of a shape of the non-square block, the number being from 1 to 7 when the first set of intra prediction direction mode numbers has 33 intra prediction direction mode numbers, the number being from 2 to 14 when the first set of intra prediction direction mode numbers has 65 intra prediction direction mode numbers, and the number being from 4 to 28 when the first set of intra prediction direction mode numbers has 127 intra prediction direction mode numbers.
17. The apparatus of claim 14 , wherein a number of the at least one additional intra prediction direction mode number is determined based on at least one of a width of the non-square block, a height of the non-square block, a ratio of the width and the height of the non-square block, or an area of the non-square block.
18. The apparatus of claim 14 , wherein the processing circuitry is further configured to:
encode a syntax element in the video bitstream, the syntax element indicating a number of the at least one additional intra prediction direction mode number, the syntax element being in at least one of a sequence parameter set, a picture parameter set, a slice header, a common syntax element for a region of a picture, or a common parameter for the region of the picture.
19. The apparatus of claim 14 , wherein a number of the at least one additional intra prediction direction mode number is equal to a number M when an aspect ratio of the non-square block is equal to or less than 2 and is equal to a number N when the aspect ratio of the non-square block is equal to or more than 4, the number M being equal to 3 and the number N being equal to 5 when the first set of intra prediction direction mode numbers has 33 intra prediction direction mode numbers, and the number M being equal to 6 and the number N being equal to 10 when the first set of intra prediction direction mode numbers has 65 intra prediction direction mode numbers.
20. A non-transitory computer-readable medium storing instructions which when executed by a computer for video decoding cause the computer to perform:
encoding prediction information of a current block in a video bitstream, the prediction information indicating a first set of intra prediction direction mode numbers for the current block;
determining whether a first intra prediction direction mode number of a neighboring block of the current block is in the first set of intra prediction direction mode numbers of the current block; and
in response to the first intra prediction direction mode number of the neighboring block not being in the first set of intra prediction direction mode numbers of the current block,
determining a most probable mode for the current block based on a second intra prediction direction mode number in the first set of intra prediction direction mode numbers of the current block that is nearest to the first intra prediction direction mode number of the neighboring block, and
encoding the current block based on the most probable mode of the current block.