Methods and apparatus of video coding using palette mode
An electronic apparatus performs a method of decoding video data. The method includes: receiving, from the bitstream, a plurality of syntax elements associated with a coding unit, the plurality of syntax elements indicating the coding tree type of the coding unit, and whether the local dual tree mode is enabled for the coding unit; and in accordance with the determination that the coding tree type of the coding unit is a single tree, and the local dual tree mode is enabled for the coding unit: disabling the palette mode for the coding unit when the coding unit has the size equal to or less than a predefined threshold. The disabling palette mode for the coding unit may include: disabling the palette mode for both the luma component and chroma component of the coding unit, or disabling the palette mode for only the chroma component of the coding unit.
1 . A method of decoding video data, comprising:
determining, from a bitstream, a plurality of variables associated with a coding unit, wherein the plurality of variables indicate a coding tree type of the coding unit, and whether a local dual tree mode is enabled for the coding unit; and
in accordance with a determination that the coding tree type of the coding unit is a single tree, and the local dual tree mode is enabled for the coding unit:
disabling palette mode for the coding unit when the coding unit has a size equal to or less than a first predefined threshold, wherein the first predefined threshold is a predefined value; and
disabling the palette mode for a chroma component of the coding unit when the coding unit has a size greater than a second predefined threshold, wherein the second predefined threshold is determined based on a chroma format of the coding unit and the first predefined threshold.
2 . The method according to claim 1 , wherein the disabling palette mode for the coding unit comprises:
disabling the palette mode for both luma component and chroma component of the coding unit.
3 . The method according to claim 1 , wherein the disabling the palette mode for the chroma component of the coding unit comprises:
determining from at least one of the plurality of variables whether a video component of the coding unit is the chroma component or a luma component; and
in accordance with a determination that the video component of the coding unit is the chroma component:
disabling the palette mode for the chroma component of the coding unit.
4 . The method according to claim 1 , wherein the disabling the palette mode for the chroma component of the coding unit comprises:
determining from at least one of the plurality of variables whether a video component of the coding unit is the chroma component or a luma component; and
at least in accordance with a determination that the video component of the coding unit is the luma component:
receiving, from the bitstream, a palette mode enable flag associated with luma component of the coding unit; and
decoding the coding unit in accordance with the palette mode enable flag.
5 . The method according to claim 4 , further comprising:
deriving, from the bitstream, a local dual tree flag; and
updating a palette prediction for the luma component of the coding unit in response to the local dual tree flag being 1.
6 . The method according to claim 1 , wherein the first predefined threshold is 16.
7 . An electronic apparatus comprising:
one or more processing units;
a memory coupled to the one or more processing units; and
a plurality of programs stored in the memory that, when executed by the one or more processing units, cause the electronic apparatus to perform a method of decoding video data comprising:
determining, from a bitstream, a plurality of variables associated with a coding unit, wherein the plurality of variables indicate a coding tree type of the coding unit, and whether a local dual tree mode is enabled for the coding unit; and
in accordance with a determination that the coding tree type of the coding unit is a single tree, and the local dual tree mode is enabled for the coding unit:
disabling palette mode for the coding unit when the coding unit has a size equal to or less than a first predefined threshold, wherein the first predefined threshold is a predefined value; and
disabling the palette mode for a chroma component of the coding unit when the coding unit has a size greater than a second predefined threshold, wherein the second predefined threshold is determined based on a chroma format of the coding unit and the first predefined threshold; or
cause the electronic apparatus to perform a method of encoding video data comprising:
determining a coding tree type of a coding unit, and whether a local dual tree mode is enabled for the coding unit;
signaling a plurality of syntax elements associated with the coding unit, wherein the plurality of syntax elements are used to derive a plurality of variables which indicate a coding tree type of the coding unit, and whether the local dual tree mode is enabled for the coding unit; and
in accordance with a determination that the coding tree type of the coding unit is a single tree, and the local dual tree mode is enabled for the coding unit:
disabling palette mode for the coding unit when the coding unit has a size equal to or less than a first predefined threshold, wherein the first predefined threshold is a predefined value; and
disabling the palette mode for a chroma component of the coding unit when the coding unit has a size greater than a second predefined threshold, wherein the second predefined threshold is determined based on a chroma format of the coding unit and the first predefined threshold.
8 . A non-transitory computer readable storage medium storing a bitstream to be decoded by a method of decoding video data of claim 1 .
9 . The method according to claim 1 , wherein a chroma format of the video data is 4:2:2.
10 . The method according to claim 1 , wherein a chroma format of the video data is 4:4:4.
11 . A method of encoding video data, comprising:
determining a coding tree type of a coding unit, and whether a local dual tree mode is enabled for the coding unit;
signaling a plurality of syntax elements associated with the coding unit, wherein the plurality of syntax elements are used to derive a plurality of variables which indicate a coding tree type of the coding unit, and whether the local dual tree mode is enabled for the coding unit; and
in accordance with a determination that the coding tree type of the coding unit is a single tree, and the local dual tree mode is enabled for the coding unit:
disabling palette mode for the coding unit when the coding unit has a size equal to or less than a first predefined threshold, wherein the first predefined threshold is a predefined value; and
disabling the palette mode for a chroma component of the coding unit when the coding unit has a size greater than a second predefined threshold, wherein the second predefined threshold is determined based on a color format of the coding unit and the first predefined threshold.
12 . The method according to claim 11 , wherein the disabling palette mode for the coding unit comprises:
disabling the palette mode for both luma component and chroma component of the coding unit.
13 . The method according to claim 11 , wherein the disabling the palette mode for the chroma component of the coding unit comprises:
determining whether a video component of the coding unit is the chroma component or a luma component; and
in accordance with a determination that the video component of the coding unit is the chroma component:
disabling the palette mode for the chroma component of the coding unit.
14 . The method according to claim 11 , wherein the disabling the palette mode for the chroma component of the coding unit comprises:
determining whether a video component of the coding unit is the chroma component or a luma component; and
at least in accordance with a determination that the video component of the coding unit is the luma component:
signaling a palette mode enable flag associated with the luma component of the coding unit;
wherein the coding unit is decoded in accordance with the palette mode enable flag.
15 . The method according to claim 14 , further comprising:
signaling syntax elements for deriving a local dual tree flag; and
wherein a palette prediction for the luma component of the coding unit is updated in response to the local dual tree flag derived as 1 according to the syntax elements.
16 . The method according to claim 11 , wherein the first predefined threshold is 16.
17 . The method according to claim 11 , wherein a chroma format of the video data is 4:2:2.
18 . The method according to claim 11 , wherein a chroma format of the video data is 4:4:4.
19 . The non-transitory computer readable storage medium according to claim 8 , wherein a chroma format of the video data is 4:2:2.
20 . The non-transitory computer readable storage medium according to claim 8 , wherein a chroma format of the video data is 4:4:4.