Method for Sub-Block based Palette Coding

20170318302 · 2017-11-02

    Inventors

    Cpc classification

    International classification

    Abstract

    A method of palette coding to apply the palette coding to sub-blocks of a coding unit and to allow each sub-block to use an individual palette table is disclosed. If the current coding block is not partitioned, the palette coding is applied to the current coding block using a first palette. If the current coding block is partitioned into multiple sub-blocks, the palette coding is applied to each sub-block using an individual second palette. Each sub-block may correspond to one prediction unit (PU). In another embodiment of the present invention, a method is disclosed that skips update of palette predictor such as last coded palette table, last coded palette size and palette predictor size associated with the current coding block if the current palette size is smaller than or equal to palette update size.

    Claims

    1. A method of palette coding, the method comprising: receiving input data associated with a current coding block; determining whether to partition the current coding block for palette coding; if the current coding block is not partitioned, applying the palette coding to the current coding block using a first palette; and if the current coding block is partitioned into multiple sub-blocks, applying the palette coding to each sub-block using an individual second palette.

    2. The method of claim 1, wherein each sub-block corresponds to one prediction unit (PU).

    3. The method of claim 1, wherein when block size of the current coding block corresponds to 2N×2N, block size of each sub-block corresponds to 2N×M or M×2N, wherein M and N are positive integers and M is smaller than or equal to N.

    4. The method of claim 3, wherein a set of codewords corresponding to {1, 01, 00} or an equivalent set of codewords is used for binarization of partition mode selection among 2N×2N, 2N×M and M×2N.

    5. The method of claim 1, wherein when block size of the current coding block corresponds to 2N×2N and block size of each sub-block corresponds to 2N×N, N×2N or N×N, wherein N is a positive integer.

    6. The method of claim 5, wherein a set of codewords corresponding to {1, 01, 001, 000} or an equivalent set of codewords is used for binarization of partition mode selection among 2N×2N, 2N×N, N×2N and N×N.

    7. The method of claim 5, wherein N×N partition mode is only allowed for the current coding block being a SCU (smallest coding unit).

    8. The method of claim 7, wherein, for the current coding block larger than the SCU, a set of codewords corresponding to {1, 01, 00} or an equivalent set of codewords is used for binarization of partition mode selection among 2N×2N, 2N×N and N×2N.

    9. The method of claim 5, wherein N×N partition mode is only allowed for the current coding block being a SCU (smallest coding unit) and the SCU is larger than 8×8.

    10. The method of claim 9, wherein, for the current coding block larger than the SCU or the current coding block being the SCU and the SCU corresponds to 8×8, a set of codewords corresponding to {1, 01, 00} or an equivalent set of codewords is used for binarization of partition mode selection among 2N×2N, 2N×N and N×2N.

    11. The method of claim 1, wherein when block size of the current coding block corresponds to 2N×2N, block size of each sub-block corresponds to 2N×N, N×2N or N×N if the current coding block is a SCU (smallest coding unit), and block size of each sub-block corresponds to 2N×N, N×2N, M×2N or 2N×M if the current coding block is larger than the SCU, wherein M and N are positive integers and M is smaller than or equal to N.

    12.15. (canceled)

    16. The method of claim 1, wherein multiple sub-blocks are allowed only if a number of major colors in the first palette is smaller than a selected number from one to a maximum palette size for the current coding block.

    17.-20. (canceled)

    21. The method of claim 1, wherein a syntax flag is signaled in sequence parameter set (SPS) to indicate whether non-square palette coding partition is allowed, whether asymmetric palette coding partitions is allowed, whether more than two partitions are allowed, or a number of partitions that the current coding block is split into.

    22. A method of palette coding, the method comprising: receiving input data associated with a current coding block; determining a current palette size for the current coding block; if the current palette size is smaller than or equal to palette update size, skipping update of palette predictor associated with the current coding block; and if the current palette size is greater than the palette update size, updating the palette predictor associated with the current coding block.

    23. The method of claim 22, wherein value of the palette update size is signaled in sequence parameter set (SPS) or picture parameter set (PPS).

    24. The method of claim 22, wherein updating of the palette predictor further comprising updating of last coded palette table, last coded palette size, and palette predictor size.

    25. The method of claim 22, wherein the palette predictor is updated according to a coded palette of a previous coding block in an upper coding tree unit (CTU).

    26. The method of claim 25, wherein the previous coding block is a first coding block in the upper CTU, a last coding block in the upper CTU, or a predefined coding block in the upper CTU.

    27. A method of palette coding, the method comprising: receiving input data associated with a current coding block; and if the current coding block corresponds to a beginning coding block of a current slice, coding a current palette of the current coding block using a default palette predictor with default palette entry values.

    28. The method of claim 27, wherein, if the current coding block corresponds to a beginning coding block of a current slice, a default last used palette size and a default palette predictor size are used.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0043] FIG. 1 illustrates an example of major color derivation by using color classification based on histogram of colors in a block.

    [0044] FIG. 2A illustrates an example according to an embodiment, where the last coded palette is the first CU palette in the starting CTU of the upper CTU row.

    [0045] FIG. 2B illustrates an example according to an embodiment, where the last coded palette is the last CU palette in the starting CTU of the upper CTU row.

    [0046] FIG. 2C illustrates an example according to this embodiment, where the last coded palette is any CU palette in a specified position of the starting CTU of the upper CTU row.

    [0047] FIG. 3 illustrates an exemplary flowchart for a system using sub-block based palette coding according to an embodiment of the present invention.

    DETAILED DESCRIPTION

    [0048] In the present invention, various techniques to improve the performance of palette coding are disclosed. In particular, a sub-block based palette coding is disclosed, which allows palette coding applied to sub-blocks of a current block and allows each sub-block uses its own palette table. For example, instead of applying palette coding to each coding unit as required by the conventional approach, the present invention allows palette coding to be applied to each prediction unit (PU). As known for HEVC, each CU can be partitioned into one or more PUs for the prediction process. According to another embodiment of the present invention, the use of quantization matrices for palette coded blocks can be skipped, especially when residuals are not transformed into frequency domain. In yet another embodiment, a set of CU syntax for signaling the palette prediction mode together with other prediction modes such as Inter, Intra and IntraBC is disclosed.

    [0049] Palette Coding for Prediction Units

    [0050] In this embodiment, the palette coding technique is applied to sub-coding-units, such as prediction units as specified in HEVC and its extensions. According to HEVC, each CU can be split into one or more sub-blocks, named PUs. Accordingly, when the CU is predicted or compressed by the palette coding method, the CU will be partitioned into one or more sub-blocks (e.g. PUs) and each sub-block will have a palette (or a set of major colors). On the other hand, according to the conventional approach, palette coding is restricted to CUs and each CU has only one palette (or a set of major colors).

    [0051] For example, a CU may be split into two sub-blocks (e.g. PUs) and when palette coding is selected as the prediction mode for the CU according to an embodiment of the present invention, exemplary binarization of the partition mode syntax (i.e., part mode) is shown in Table 3 and Table 4.

    TABLE-US-00003 TABLE 3 part_mode PartMode Bin string 0 PART_2Nx2N 1 1 PART_2NxM 01 2 PART_Mx2N 00

    TABLE-US-00004 TABLE 4 part_mode PartMode Bin string 0 PART_2Nx2N 1 1 PART_Mx2N 01 2 PART_2NxM 00

    [0052] In Table 3 and Table 4, M and N are positive integers. In one example, M is equal to N. In another example, M is a power-of-2 integer, but less than or equal to N. Also, in Table 3 and Table 4, the set of codewords {1, 01, 00} is used as an example. However, a person skilled in the art may design an equivalent set of codewords that will result in the same coding efficiency. For example, the “0” and “1” in the set of codewords can be switched to result in an equivalent set of codewords {0, 10, 11}. Therefore, the present invention is not limited to the specific exemplary set of codewords, which is also applicable to other examples in this disclosure.

    [0053] In another embodiment, palette coding can be applied to N×N partitions, such as in N×N Intra prediction. Each N×N partition has its own palette and there are four palettes per CU that need to be searched and signaled. Together with 2N×M and M×2N partition modes, exemplary binarization of part mode is shown in Table 5 and Table 6 when palette coding is used for the CU. For illustration purpose, M is equal to N in Table 5 and Table 6.

    TABLE-US-00005 TABLE 5 part_mode PartMode Bin string 0 PART_2Nx2N 1 1 PART_2NxN 01 2 PART_Nx2N 001 3 PART_NxN 000

    TABLE-US-00006 TABLE 6 part_mode PartMode Bin string 0 PART_2Nx2N 1 1 PART_Nx2N 01 2 PART_2NxN 001 3 PART_NxN 000

    [0054] In yet another embodiment, the N×N partition for palette coding is only allowed when the CU is a SCU (smallest CU). Exemplary binarization of part mode when palette coding is used for the CU is shown in Table 7 and Table 8.

    TABLE-US-00007 TABLE 7 Bin string log2CbSize > log2CbSize = = part_mode PartMode MinCbLog2SizeY MinCbLog2SizeY 0 PART_2Nx2N 1 1 1 PART_2NxN 01 01 2 PART_Nx2N 00 001 3 PART_NxN 000

    TABLE-US-00008 TABLE 8 Bin string log2CbSize > log2CbSize == part_mode PartMode MinCbLog2SizeY MinCbLog2SizeY 0 PART_2N×2N 1 1 1 PART_N×2N 01 01 2 PART_2N×N 00 001 3 PART_N×N 000

    [0055] In yet another embodiment, N×N partition is only allowed when the palette coding CU size is greater than 8×8. That is equivalent to the smallest N being greater than 4. Exemplary binarization of part mode when palette coding is used for the CU is shown in Table 9 and Table 10.

    TABLE-US-00009 TABLE 9 Bin string log2CbSize > MinCbLog2SizeY log2CbSize == || log2CbSize == MinCbLog2SizeY MinCbLog2SizeY && part_mode PartMode && log2CbSize == 3 log2CbSize >3 0 PART_2N×2N 1 1 1 PART_2N×N 01 01 2 PART_N×2N 00 001 3 PART_N×N 000

    TABLE-US-00010 TABLE 10 Bin string log2CbSize > MinCbLog2SizeY log2CbSize == ||log2CbSize == MinCbLog2SizeY MinCbLog2SizeY && part_mode PartMode && log2CbSize == 3 log2CbSize >3 0 PART_2N×2N 1 1 1 PART_N×2N 01 01 2 PART_2N×N 00 001 3 PART_N×N 000

    [0056] In yet another embodiment, N×N partition mode is allowed while 2N×N and N×2N partition modes are not allowed for palette coding mode. Exemplary binarization of part mode when palette coding is used for the CU is shown in Table 11.

    TABLE-US-00011 TABLE 11 Bin string log2CbSize > log2CbSize == part_mode PartMode MinCbLog2SizeY MinCbLog2SizeY 0 PART_2N×2N — 1 1 PART_N×N — 0

    [0057] In yet another embodiment, palette coding is allowed for 2N×2N, 2N×N, N×2N, 2N×M and M×2N partitions simultaneously. In one example, M is equal to (N/2). In another example, M is a power-of-2 integer less than N. Exemplary binarization of part mode when palette_mode_flag equal to 1 is shown in Table 12 and Table 13. In this case, a 2N×2N palette coded (major-color coded) CU is evenly split into (2N/M) partitions, either in the vertical direction (i.e. 2N×M mode) or in the horizontal direction (i.e. M×2N mode). Each 2N×M or M×2N partition uses its own palette. Therefore, there are 2N/M palettes per CU that need to be signaled. In one example, when M is equal to N/2 and either 2N×(N/2) partition mode or (N/2)×2N partition mode is selected, the 2N×2N IntraBC CU is evenly split into four 2N×(N/2) or (N/2)×2N partitions, respectively. Each 2N×(N/2) or (N/2)×2N partition is compressed by palette coding method with its own palette.

    TABLE-US-00012 TABLE 12 Bin string log2CbSize > log2CbSize == part_mode PartMode MinCbLog2SizeY MinCbLog2SizeY 0 PART_2N×2N 1 1 1 PART_2N×N 011 01 2 PART_N×2N 001 001 3 PART_N×N 000 4 PART_2N×M 010 5 PART_M×2N 000

    TABLE-US-00013 TABLE 13 Bin string log2CbSize > log2CbSize == part_mode PartMode MinCbLog2SizeY MinCbLog2SizeY 0 PART_2N×2N 1 1 1 PART_N×2N 011 01 2 PART_2N×N 001 001 3 PART_N×N 000 4 PART_M×2N 010 5 PART_2N×M 000

    [0058] In yet another embodiment, palette coding is also allowed for asymmetric partitions. For example, partition modes PART_2N×nU, PART_2N×nD, PART_nL×2N and PART_nR×2N similar to the AMP (Asymmetric Motion Partition) modes in HEVC Inter prediction are allowed for a 2N×2N palette (or major-color) coded CU. The definitions of PART_2N×nU, PART_2N×nD, PART_nL×2N and PART_nR×2N can be the same as the definitions of those partition modes for HEVC Inter prediction when AMP is enabled. The 2N×nU partition refers to vertical partition with narrower upper partition. Similarly, 2N×nD refers to vertical partition with narrower lower partition; nL×2N refers to horizontal partition with narrower left partition; and nR×2N refers to horizontal partition with narrower right partition. In another example, nU, nD, nL and nR can be any power-of-2 integer less than N. Exemplary binarization of part_mode when palette coding is used for the CU is shown in Table 14 and Table 15. In this case, each 2N×nU, 2N×nD, nL×2N or nR×2N partition is palette coded using its own palette, and there are two palettes per CU that need to be signaled.

    TABLE-US-00014 TABLE 14 Bin string log2CbSize > log2CbSize == part_mode PartMode MinCbLog2SizeY MinCbLog2SizeY 0 PART_2N×2N 1 1 1 PART_2N×N 011 01 2 PART_N×2N 001 001 3 PART_N×N 000 4 PART_2N×nU 0100 5 PART_2N×nD 0101 6 PART_nL×2N 0000 7 PART_nR×2N 0001

    TABLE-US-00015 TABLE 15 Bin string log2CbSize > log2CbSize == part_mode PartMode MinCbLog2SizeY MinCbLog2SizeY 0 PART_2N×2N 1 1 1 PART_N×2N 011 01 2 PART_2N×N 001 001 3 PART_N×N 000 4 PART_nL×2N 0100 5 PART_nR×2N 0101 6 PART_2N×nU 0000 7 PART_2N×nD 0001

    [0059] In the above embodiments as illustrated in Tables 3-15, the palette of each PU (or sub-block of CU) may be predicted from the palettes of previous PUs within one CU or in a neighboring CU in coding order. The palette of each PU may also be predicted from left neighboring blocks or above neighboring blocks.

    [0060] In the above embodiments, the number of major color for the palette coded PUs can be smaller than L, where L is in the range from 1 to maximum palette size. L can be signaled at high level syntax or pre-defined.

    [0061] In another embodiment, when the current CU is split into N+1 sub-blocks and N is an integer larger than or equal to 2, at most N sub-blocks can share the same palette table (or a set of major colors). Each of the rest sub-blocks may have individual palette table (or a set of major colors).

    [0062] In yet another embodiment, for a current CU split into multiple sub-blocks, at least one sub-block of the current CU is predicted or compressed by the palette coding method, while the rest of the sub-blocks are predicted or compressed by Inter prediction, Intra prediction, or Intra block copy (IntraBC). Each sub-block coded using the palette coding method has individual palette table.

    [0063] Process of Applying Scaling List (Quantization Matrices) to Palette Coded Blocks

    [0064] In another embodiment of the present invention, the use of quantization matrices (or scaling lists) is skipped for palette coded blocks if the residuals of the palette coded blocks are not transformed into frequency domain.

    [0065] Palette Coding Signaling in CU Syntax

    [0066] In another embodiment of the present invention, signaling prediction mode including Inter, Intra, Intra block copy (IntraBC) and palette coding in CU syntax is disclosed. As shown in Table 16, the change of CU syntax made to the CU syntax based on HEVC is minor. However the parsing process and the semantics to some syntax elements (e.g. pred_mode_flag) also need to be changed. In Table 16, the statement “if(slice_type !=I)” is moved from the original location as indicated by Note (16-2) to the new location as indicated by Note (16-1). In the exemplary CU syntax incorporating an embodiment of the present invention as shown in Table 16, both palette coding and IntraBC coding are considered as a coding mode for an Intra slice (i.e., I-slice). However, the present invention is not limited to the specific syntax nor specific semantics.

    TABLE-US-00016 TABLE 16 coding_unit( x0, y0, log2CbSize ) { Note if( transquant_bypass_enabled_flag )   cu_transquant_bypass_flag if( slice_type != I ) (16-1)   cu_skip_flag[ x0 ][ y0 ] nCbS = ( 1 << log2CbSize ) if( cu_skip_flag[ x0 ][ y0 ] )   prediction_unit( x0, y0, nCbS, nCbS ) else {   custom-character (16-2)     pred_mode_flag   if( CuPredMode[ x0 ][ y0 ] != MODE_INTRA ||     log2CbSize == MinCbLog2SizeY )     part_mode }   ......

    [0067] In one embodiment, when both intra_block_copy_enable_flag is equal to 1 (i.e. Intra block copy is enabled) and palette coding is enabled, and when the slice_type is not Intra (i.e. slice_type !=I), the binarization of Inter, Intra, Intra_block_copy and palette coding modes can be 10, 11, 01 and 00 respectively. Other mapping between the modes and codewords may also be used. When the slice_type is Intra, the binarization of Intra, Intra_block_copy and palette coding modes can be 1, 01 and 00 respectively. Other mapping between the modes and codewords may also be used. If only one of the Intra block copy and palette coding modes is enabled, codewords 1 and 0 can be used to specify the use of Intra mode or Intra block copy/palette coding mode for an Intra slice. For non-Intra slice, 1, 01 and 00 can be used to specify the use of Inter, Intra and Intra block copy/palette coding mode respectively. Other mapping between the modes and codewords may also be used.

    [0068] In another embodiment, when Intra_block_copy_enabled_flag is equal to 1 (i.e. intra block copy is enabled) and palette coding is enabled, and when the slice_type is not Intra (i.e. slice_type !=I), the binarization of Inter, Intra, Intra_block_copy and palette_coding modes can be 1, 01, 001 and 000 respectively. In other words, the first bit (or bin) is used to specify whether the prediction mode is Inter, or one of the Intra picture prediction modes, i.e. Intra, Intra block copy or palette coding. Other mapping between the set of codewords (i.e., 1, 01, 001 and 000) and the set of modes (Inter, Intra, Intra block copy and palette coding) can also be used. Furthermore, other variable-length codewords other than {1, 01, 001 and 000} can also be used.

    [0069] The methods disclosed above can be combined. For example, palette coding is applied to the PUs of a CU and the palette coding signaling in CU syntax as shown in Table 16 is also applied.

    [0070] Palette Coding High Level Syntax

    [0071] In one embodiment of the present invention, high level syntax flags are used to enable and disable sub-coding-block based palette coding in the sequence level, picture level, slice level or a combination thereof.

    [0072] For example, a SPS (sequence parameter set) flag (e.g. “non_square_palette_enabled_flag) can be used to specify whether non-square palette coding partitions may be applied to this sequence. Exemplary syntax and semantics are shown in Table 17.

    TABLE-US-00017 TABLE 17 seq_parameter_set_rbsp( ) { Note  ......  sps_extension1_flag  if( sps_extension1_flag ) {   transform_skip_rotation_enabled_flag   transform_skip_context_enabled_flag   intra_block_copy_enabled_flag   palette_coding_enabled_flag (17-1)   if( palette_coding_enabled_flag) (17-2)    non_square_palette_enabled_flag (17-3)   residual_dpcm_intra_enabled_flag   residual_dpcm_inter_enabled_flag   extended_precision_processing_flag   intra_smoothing_disabled_flag   sps_extension2_flag  }  ...... }

    [0073] non_square_palette_enabled_flag equal to 1 specifies that non-square partitions may be used in palette coding tree blocks. non_square_palette_enabled_flag equal to 0 specifies that non-square partitions cannot be used in palette coding tree blocks. In Table 17, palette_coding_enabled_flag in included as indicated by Note (17-1). If palette_coding_enabled_flag is 1 as indicated by Note (17-2), non_square_palette_enabled_flag is included as indicated by Note (17-3).

    [0074] In another embodiment, a SPS (sequence parameter set) flag (e.g. asymmetric_palette_enabled_flag) is signaled to specify whether asymmetric palette coding partitions may be applied to this sequence. Exemplary syntax and semantics are shown in Table 18.

    TABLE-US-00018 TABLE 18 seq_parameter_set_rbsp( ) { Note  ......  sps_extension1_flag  if( sps_extension1_flag ) {   transform_skip_rotation_enabled_flag   transform_skip_context_enabled_flag   intra_block_copy_enabled_flag   palette_coding_enabled_flag (18-1)   if(palette_coding_enabled_flag) { (18-2)    non_square_palette_enabled_flag (18-3)    if(non_square_palette_enabled_flag) (18-4)     asymmetric_palette_enabled_flag (18-5)   }   residual_dpcm_intra_enabled_flag   residual_dpcm_inter_enabled_flag   extended_precision_processing_flag   intra_smoothing_disabled_flag   sps_extension2_flag  }  ...... }

    [0075] asymmetric_palette_enabled_flag equal to 1 specifies that asymmetric partitions (such as partition mode equal to PART_2N×nU, PART_2N×nD, PART_nL×2N, or PART_nR×2N) may be used in palette coding tree blocks. asymmetric_palette_enabled_flag equal to 0 specifies that asymmetric partitions cannot be used in palette coding tree blocks. In Table 18, palette_coding_enabled_flag is included as shown in Note (18-1). If palette_coding_enabled_flag is 1 as shown in Note (18-2), non_square_palette_enabled_flag is included as shown in Note (18-3). If non square_palette_enabled_flag is 1 as shown in Note (18-4), asymmetric_palette_enabled_flag is included as shown in Note (18-5).

    [0076] In yet another embodiment, a SPS (sequence parameter set) flag (e.g. multi_part_palette_enabled_flag) is signaled to specify whether more than two partitions may be applied to one palette coded CU in this sequence. Exemplary syntax and semantics are shown in Table 19 and Table 20.

    TABLE-US-00019 TABLE 19 seq_parameter_set_rbsp( ) { Note  ......  sps_extension1_flag  if( sps_extension1_flag ) {   transform_skip_rotation_enabled_flag   transform_skip_context_enabled_flag   intra_block_copy_enabled_flag   palette_coding_enabled_flag (18-1)   if(palette_coding_enabled_flag) { (18-2)    non_square_palette_enabled_flag (18-3)    if(non_square_palette_enabled_flag) (18-4)     multi_part_palette_enabled_flag (19-1)   }   residual_dpcm_intra_enabled_flag   residual_dpcm_inter_enabled_flag   extended_precision_processing_flag   intra_smoothing_disabled_flag   sps_extension2_flag  }  ...... }

    TABLE-US-00020 TABLE 20 seq_parameter_set_rbsp( ) { Note  ......  sps_extension1_flag  if( sps_extension1_flag ) {   transform_skip_rotation_enabled_flag   transform_skip_context_enabled_flag   intra_block_copy_enabled_flag   palette_coding_enabled_flag (18-1)   if(palette_coding_enabled_flag) { (18-2)    multi_part_palette_enabled_flag (20-1)   residual_dpcm_intra_enabled_flag   residual_dpcm_inter_enabled_flag   extended_precision_processing_flag   intra_smoothing_disabled_flag   sps_extension2_flag  }  ...... }

    [0077] multi_part_palette_enabled_flag equal to 1 specifies that more than two partitions (i.e. 2N×M and M×2N, or 2N×(N/2) and (N/2)×2N) may be used in one palette coding tree block. multi_part_palette_enabled_flag equal to 0 specifies that no more than two partitions cannot be used in one palette coding tree block. Table 19 is similar to Table 18 except that the statement in Note (18-5) is replaced by the statement in Note (19-1). In other words, if non_square_palette_enabled_flag is 1, multi_part_palette_enabled_flag is included as shown in Note (19-1). Table 20 is substantially the same as Table 19 except that statement in Notes (18-3) and (18-4) are removed. In other words, multi_part_palette_enabled_flag is included as indicated in Note (20-1) if palette_coding_enabled_flag is equal to 1.

    [0078] In another embodiment, a SPS (sequence parameter set) flag (e.g. log 2_num_part_ibc_minus2) is signaled to specify the number of partitions that the current palette coding unit is split into. Exemplary syntax and semantics are shown in Table 21.

    TABLE-US-00021 TABLE 21 seq_parameter_set_rbsp( ) { Note  ......  sps_extension1_flag  if( sps_extension1_flag ) {   transform_skip_rotation_enabled_flag   transform_skip_context_enabled_flag   intra_block_copy_enabled_flag   palette_coding_enabled_flag (18-1)   if(palette_coding_enabled_flag) { (18-2)    non_square_palette_enabled_flag (18-3)    if(non_square_palette_enabled_flag) (18-4)     multi_part_palette_enabled_flag (19-1)     if(multi_part_palette_enabled_flag) (21-1)      log2_num_part_palette_minus2 (21-2)   }   residual_dpcm_intra_enabled_flag   residual_dpcm_inter_enabled_flag   extended_precision_processing_flag   intra_smoothing_disabled_flag   sps_extension2_flag  }  ...... }

    [0079] log 2_num_part_palette_minus2 plus 2 specifies the value of the number of partitions in the palette coding unit as follows:


    NumPartitionPalette=2.sup.(log 2.sup._.sup.num.sup._.sup.part.sup._.sup.ibc+2).

    [0080] Table 21 is substantially the same as Table 19 except that additional statements as indicated by Note (21-1) and (21-2) are included. According to the additional statements, log 2_num_part_palette_minus2 is included as indicated by Note (21-2) if multi_part_palette enabled_flag is equal to 1 as indicated by Note (21-1).

    [0081] In another embodiment, the palette CU is evenly split into NumPartitionPalette partitions either in vertical or in horizontal direction.

    [0082] Palette Predictor Update

    [0083] Another aspect of the present invention addresses palette predictor update. According to one embodiment, when current palette_size is smaller than or equal to palette update size (e.g. PLT_UPDATE_SIZE), the update of palette predictor associated with the current coding block such as last coded palette table, last coded palette size, and palette predictor size can be skipped to simplify the update process. Table 22 illustrates exemplary palette coding syntax according to this embodiment. The value PLT_UPDATE_SIZE can be signaled in PPS (picture parameter set) or SPS (sequence parameter set). In one embodiment, the value of PLT_UPDATE_SIZE is 1, however, the present invention is not limited thereto.

    TABLE-US-00022 TABLE 22 palette_coding( x0, y0, nCbS ) { Note  ...  if (palette_size > PLT_UPDATE_SIZE) { (22-1)  previousPalette Size = palette_size  current_size = palette_size  for( i = 0; i < palette_size; i++ )   for ( cIdx = 0; cIdx < 3; cIdx++ )    tempPaletteEntries[ cIdx ][ i ] = palette_entries[    cIdx ][i ]  for( i = 0; i < previousPaletteStuffingSize && current_size <     max_palette_predictor_size; i++ )   if( previous_palette_entry_flag[ i ] = = 0 ) {    for ( cIdx = 0; cIdx < 3; cIdx++ )      tempPaletteEntries[ cIdx ][ current_size ] =        previousPaletteEntries[ cIdx ][ i ]    current_size++   }  previousPaletteStuffingSize = current_size  previousPaletteEntries = tempPaletteEntries  } }

    [0084] In another embodiment, when updating the palette predictor, the last palette table is redefined. For each starting CU of a CTU row, the last coded palette is, for example, the palette of the starting CU of the upper CTU row. FIG. 2A illustrates an example according to this embodiment, where the last coded palette is the first CU palette (210) in the starting CTU (i.e., CTU 00) of the upper CTU row. In FIG. 2A, the dot-filled square is the starting CU of the current CTU row, while the cross line-filled square is the starting CU of the upper CTU row.

    [0085] FIG. 2B illustrates another example according to this embodiment, where the last coded palette is the palette of the last CU (also referred to as the last CU palette (220)) in the starting CTU (i.e., CTU 00) of the upper CTU row. In FIG. 2B, the dot-filled square is the starting CU of the current CTU row, while the cross line-filled square is the last CU in the starting CTU of the upper CTU row.

    [0086] FIG. 2C illustrates yet another example according to this embodiment, where the last coded palette is the palette of any CU in a specified position of the starting CTU (i.e., CTU 00) of the upper CTU row. The position can be predefined or signal in PPS or SPS. In FIG. 2C, the dot-filled square is the starting CU of the current CTU row, while the cross line-filled square is the CU in the specified position of the starting CTU of the upper CTU row.

    [0087] In the above example, the last coded palette will be inserted in the palette predictor, and the palette predictor will be updated accordingly.

    [0088] In yet another embodiment, at the start of each slice, a default palette predictor can be used, which consists of default palette entry values. Furthermore, a default last used palette size and a default palette predictor size can be used.

    [0089] FIG. 3 illustrates an exemplary flowchart of sub-block based palette coding according to an embodiment of the present invention. The system receives input data associated with a current coding block as shown in step 310. The input data, at an encoder side, may correspond to pixel values or indices of the current block. The input data, at a decoder side, may correspond to coded data of the current block. The input data may be retrieved from memory (e.g., computer memory, buffer (RAM or DRAM) or other media) or from a processor. Whether to partition the current coding block for palette coding is determined in step 320. If the current coding block is not partitioned (i.e., the “no” path from step 320), the palette coding is applied to the current coding block using a first palette as shown in step 330. If the current coding block is partitioned into multiple sub-blocks (i.e., the “yes” path from step 320), the palette coding is applied to each sub-block using an individual second palette as shown in step 340.

    [0090] The flowchart shown is intended to illustrate an example of color index coding according to the present invention. A person skilled in the art may modify each step, re-arranges the steps, split a step, or combine steps to practice the present invention without departing from the spirit of the present invention. In the disclosure, specific syntax and semantics have been used to illustrate examples to implement embodiments of the present invention. A skilled person may practice the present invention by substituting the syntax and semantics with equivalent syntax and semantics without departing from the spirit of the present invention.

    [0091] The above description is presented to enable a person of ordinary skill in the art to practice the present invention as provided in the context of a particular application and its requirement. Various modifications to the described embodiments will be apparent to those with skill in the art, and the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not intended to be limited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed. In the above detailed description, various specific details are illustrated in order to provide a thorough understanding of the present invention. Nevertheless, it will be understood by those skilled in the art that the present invention may be practiced.

    [0092] Embodiment of the present invention as described above may be implemented in various hardware, software codes, or a combination of both. For example, an embodiment of the present invention can be one or more circuit circuits integrated into a video compression chip or program code integrated into video compression software to perform the processing described herein. An embodiment of the present invention may also be program code to be executed on a Digital Signal Processor (DSP) to perform the processing described herein. The invention may also involve a number of functions to be performed by a computer processor, a digital signal processor, a microprocessor, or field programmable gate array (FPGA). These processors can be configured to perform particular tasks according to the invention, by executing machine-readable software code or firmware code that defines the particular methods embodied by the invention. The software code or firmware code may be developed in different programming languages and different formats or styles. The software code may also be compiled for different target platforms. However, different code formats, styles and languages of software codes and other means of configuring code to perform the tasks in accordance with the invention will not depart from the spirit and scope of the invention.

    [0093] The invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.