To provide a method for palette coding of image and video data to avoid issues associated with zero-size palette.SOLUTION: A method includes the steps of: receiving input data associated with a current coding unit (CU); determining current palette size of a current palette table of the current CU, or both predicted palette size and new palette size associated with the current palette table, the predicted palette size indicating a first number of entries of the current palette table that are predicted by a palette predictor and the new palette size indicating a second number of entries of the current palette table that are not predicted by the palette predictor; and signaling a CU-level escape pixel presence flag conditionally according to the palette size, the CU-level escape pixel presence flag indicating whether there is any sample in the current CU coded as an escape pixel.SELECTED DRAWING: Figure 2
展开▼