Palette mode video coding using hierarchical palette table generation.
Patent Information
- Application Number
- JP2023517654
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-09-23
- Filing Date
- 2021-09-23
- Publication Date
- 2024-10-07
- Estimated Expiration
- 2041-09-23
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Background Art
[0001] Certain video applications involve the transmission of "screen content" (i.e., computer-generated image content), such as remote desktop sharing, virtual desktop infrastructure for cloud computing, and cloud gaming applications. Such screen content is transmitted either by itself or as hybrid content representing a combination of the screen content and video content captured by a camera. However, unlike video content captured by a camera, screen content, particularly "desktop" screen content, typically has rich text and other computer-generated graphics that present sharp edges with relatively little noise. Furthermore, screen content generally exhibits a smaller number of different colors within a local region of the image.
[0002] Several video encoding standards have been extended to leverage the relatively small number of colors and relatively high contrast typically displayed by screen content compared to video captured by a camera, in order to provide more efficient encoding of screen content. For example, the ITU-T High-Efficiency Video Coding (HEVC) standard provides a Screen Content Coding (SCC) extension that implements a palette mode involving palette color selection and subsequent generation of a color index map based on that palette color selection. In this process, for each portion of an image containing the screen content being encoded (i.e., for each coding unit), the encoder identifies several top-numbered representative colors (e.g., the top eight colors) found in that portion and generates a palette table that indexes each of the identified representative colors (i.e., maps an index to it). The encoder then generates a corresponding color index map for the portion of the image being encoded by replacing each pixel in the portion of the image with the corresponding index value of the palette color from the palette table that most closely matches the color of that pixel. Next, the palette table and color index map are encoded along with information about pixels from parts of the image that are excessively different from any of the identified palette colors (these pixels are called "escape" pixels), generating a corresponding segment of the encoded bitstream, which is then sent to the destination device. The destination device then decodes the bitstream to obtain the palette table and color index map for the decoded block, and from these values and any associated decoded residuals, irreversibly or reversibly reconstructs the original block. The Alliance for Open Media Video 1 (AV1) coding standard provides a similar palette mode embodiment.
[0003] The conventional process for generating a palette table for a given portion of an image to be encoded involves generating a single histogram of all the pixel colors for the entire portion of the image, and then selecting representative colors for the palette table from this histogram. While providing a compact bitstream, this palette table generation process is computationally intensive and therefore requires considerable hardware resources in terms of silicon area, throughput, and power consumption. For illustrative purposes, the HEVC-SCC standard described above provides coding unit sizes of up to 128 x 128 pixels each, meaning that for each such coding unit of the image to be encoded, an encoder implementing the conventional palette table generation process would need to process 16,384 pixels to generate a corresponding histogram for each 128 x 128 coding unit, and that histogram could be hundreds or thousands in any given image depending on the image resolution. This process becomes even more complex when the encoding system is configured to support multiple coding units simultaneously, such as being able to support the encoding of screen content video based on any or all of the typical 8x8, 16x16, 32x32, 64x64, and 128x128 coding unit divisions of the HEVC standard and other similar encoding standards.
[0004] This disclosure will be better understood by referring to the accompanying drawings, and many of its features and advantages will become apparent to those skilled in the art. The use of the same reference numerals in different drawings indicates similar or identical items. [Brief explanation of the drawing]
[0005] [Figure 1] This is a block diagram of a source device having a palette mode encoder that utilizes hierarchical palette table generation for palette mode encoding of video containing screen content, according to several embodiments. [Figure 2]This flowchart illustrates a palette-mode coding process using hierarchical palette table generation implemented by the palette-mode encoder in Figure 1, according to several embodiments. [Figure 3] This figure illustrates an exemplary recursive hierarchy of coding units into sets of pixel blocks at different levels of the hierarchy, according to several embodiments. [Figure 4-1] This is a block diagram illustrating an exemplary embodiment of the method of Figure 2, which uses an exemplary recursive division of the coding unit of Figure 3, according to several embodiments. [Figure 4-2] This is a block diagram illustrating an exemplary embodiment of the method of Figure 2, which uses an exemplary recursive division of the coding unit of Figure 3, according to several embodiments. [Modes for carrying out the invention]
[0006] Typical methods for generating palette tables for coding units (CUs) in palette-mode coding based on histogram analysis or other clustering of all pixels represented by CUs are often computationally intensive, especially for encoders that support larger CU divisions or multiple simultaneous CU divisions. To reduce computational complexity while maintaining sufficient color reproduction accuracy, the systems and methods described herein utilize a hierarchical palette table generation process to efficiently generate palette tables for each of one or more selected division sizes for selected CUs encoded in palette mode. In this method, selected CUs are recursively divided at different levels of the division hierarchy. At the highest level, a selected CU of K×K pixels is represented by a single block of K×K pixels. Each successive level below the highest level has four smaller pixel blocks representing the corresponding larger pixel block at the next higher level. At the lowest level of the division hierarchy, the encoder generates a palette table for each block at the lowest level. Each of these palette tables contains a set of palette colors representing the pixel colors present in the corresponding block, and in at least one embodiment, is selected via histogram analysis of the pixel colors present in the block, via k-means, or via any of various other clustering methods. Then, for each successively higher level in the partition hierarchy, the encoder generates a palette table for each block at the current level by selecting palette colors for the palette table based on the palette colors from four palette tables associated with the four blocks at the next lower level corresponding to the block at the current level. This can be done via histogram collection of the palette colors from the four palette tables or other clustering. Next, at the top level, a single palette table is generated at this level from the four palette tables at the next highest level, and the encoder uses this to generate a color index map for the selected CU.The encoder then uses the final palette table and color index map to encode the representation of the CU to generate the corresponding segments of the encoded bitstream.
[0007] To illustrate using an exemplary 32x32 coding unit division (i.e., K=32) and a minimum block size of 8x8 pixels, then CU is designated as the top block at the highest level, and for the next highest level, the top block becomes four second-level blocks, each of which is 16x16 pixels, and then each of these blocks is divided into four third-level blocks, each of which is 8x8 pixels. Starting from the lowest or lowest level (the third level in this example), the encoder generates an initial palette table for each block at this level using histogram analysis, k-means analysis, or other statistical analysis, resulting in four palette tables for the lowest level. For ease of reference, exemplary embodiments utilizing histogram collection (also identified as histogram analysis) are described herein, but references to histogram collection / analysis will be understood to include references to any of the various clustering methods or other statistical methods such as k-means analysis unless otherwise stated. At the second lowest partition hierarchy level, the encoder identifies a set of candidate colors from the palette colors represented in the four palette tables of the four constituent blocks at the lowest level that together form a block at the second lowest level. Through statistical analysis of this set of candidate colors, the encoder determines an intermediate palette table for the block at the second lowest level. This process is repeated for each of the three other blocks at the second lowest level, resulting in four intermediate palette tables generated for the second lowest level. Next, at the highest level, the encoder identifies a set of candidate colors from the palette colors represented in the four palette tables of the four constituent blocks at the second lowest level that together form a single block at the highest level. Through statistical analysis of this set of candidate colors, the encoder determines a palette table for this block (representing the entire CU). The encoder then estimates the rate distortion cost for encoding the CU using the corresponding palette table at that level for each partition hierarchy level.Next, the palette table requiring the lowest rate distortion cost is designated as the "final" palette table for the CU. The encoder then uses the final palette table to generate a color index map for the selected K×K coding unit, encodes the color index map, the final palette table, and any quantized residuals for any escape pixels present to generate the corresponding portion of the encoded bitstream. The encoded bitstream is then stored for later access or sent to a destination device. The decoder at the destination device decodes the bitstream to recover the encoded palette table, color index map, and quantized residuals for the coding unit, and uses the recovered palette table, color index map, and residuals to recover the original CU or its irreversible representation.
[0008] This hierarchical and recursive partitioning process for determining a palette table for a block of pixels at each level from a palette table generated for a constituent block at a lower level provides efficient palette table generation through a reduction in the number of colors considered by integrating the lower-level palette color selection process into the higher-level palette color selection process. For illustrative purposes, a conventional process for generating a palette table for a 64x64 CU would require the encoder to sort and count each of the 4,096 pixels in the CU in order to reach, for example, a palette table of eight representative colors. However, under the hierarchical palette color selection process described herein, only small subsets of pixels are sorted and counted for relatively small blocks at the lowest level, and then only small subsets of representative colors for each block at one level are considered for the corresponding block at the next highest level, resulting in less overall operation to reach a final palette table for a given size CU, and therefore a more efficient process for generating a palette table for a CU, while also allowing the generation of separate palette tables at each level of the partitioning hierarchy that can be used for individual partition sizes of CUs.
[0009] Figure 1 shows a source device 100 having an encoding system 102 that employs a palette mode encoding process utilizing a hierarchically and recursively generated palette table, according to several embodiments. The source device 100 may include any of various devices configured to encode a video stream containing screen content, and may include servers, personal computers, tablet computers, mobile phones, or other compute-enabled mobile devices that support any of various applications that generate screen content for transmission to or storage in a display device. Such services include, for example, remote desktop services, wireless display services, screen sharing / collaboration services, and cloud gaming services. The source device 100 includes a video source 104 and the encoding system 102, as well as various other components omitted from Figure 1 for ease of explanation, including one or more wireless or wired network interfaces, input / output (I / O) devices and their controllers, one or more processors, memory and other storage components, etc. The video source 104 operates to generate or otherwise provide a video stream consisting of a series of images 106 (also commonly called “pictures” or “frames”) for encoding into a corresponding bitstream 108 by the encoding system 102, the bitstream being provided for transmission to a destination device via a network interface (not shown), or otherwise provided for output, such as for storage in a local or networked storage device (not shown) for subsequent access. The video source 104 may include, for example, a graphics processing unit (GPU) that operates to render some or all of the content contained in each image 106, a decoder that decodes previously encoded video data representing screen content or other image content, and so on.
[0010] In at least one embodiment, some or all of the images 106 contained in the stream from the video source 104 consist of partially or entirely computer-generated screen content, which typically exhibits sharper contrast and fewer colors in local areas compared to video images captured by a camera. Therefore, the encoding system 102 is configured to provide palette-based encoding (or “palette-mode” encoding) of these images 106 identified individually or as part of the corresponding stream as containing screen content. For this purpose, the encoding system 102 includes a hierarchical palette table generator 110 (hereinafter, for brevity, “palette table generator 110”), a color index map generator 112, a residual generator 114, a discrete cosine transform (DCT) quantizer 116, and an entropy encoder 118. Some or all of the components 110, 112, 114, 116, and 118 may be implemented in source device 100 as one or more processors that execute software instructions configured to operate one or more processors to perform the processes described herein, and which are stored in system memory or another non-temporary computer-readable storage medium. In other embodiments, some or all of the components 110, 112, 114, 116, and 118 may be implemented as hardcoded logic (e.g., application-specific integrated circuits or ASICs), programmable logic (e.g., programmable logic arrays), or a combination thereof. Furthermore, in some embodiments, some or all of the components 110, 112, 114, 116, and 118 may be implemented as a combination of one or more processors that execute software and hardcoded logic or programmable logic.
[0011] Figure 2 illustrates a method 200 of operation of an encoding system 102 for palette mode encoding of images containing screen content using a hierarchical and recursive palette table generation process, according to several embodiments. For ease of explanation, the exemplary hierarchy of the CU shown in Figure 3 and exemplary embodiments of the method 200 shown in Figures 4-1 and 4-2 will be referenced when describing the method 200 below.
[0012] Method 200 begins in block 202, in which the encoding system 102 receives image 106 from video source 104 as part of a stream of image 106. For example, in some embodiments, each image 106 is buffered into a frame buffer (not shown) of source device 100, if it is generated by video source 104 or otherwise acquired. Hereinafter, we assume that the received image 106 contains enough screen content to benefit from palette mode encoding. For illustrative purposes, in some embodiments, palette mode is utilized for each CU, and the encoding system 102 calculates the rate distortion cost of encoding the current CU using palette mode compared to the rate distortion costs of other predictive modes, and utilizes palette mode encoding for the current CU if the current CU represents the lowest rate distortion cost of the encoding options. If, instead, palette mode is not indicated for image 106, image 106 is encoded using appropriate conventional encoding techniques, such as those published by HEVC.
[0013] Furthermore, in block 202, the encoding system 102 logically divides the J×K array of pixels represented by image 106 into an array 120 (Figure 1) of two-dimensional coding units (CUs) 122, such as CUs 122-1 and 122-2 in Figure 1. In certain embodiments, such as those found in the ITU-T Rec.H.264 standard, all CUs are the same size (CUs are usually called "macroblocks" instead). In other embodiments, such as those found in the ITU-T Rec.H.265 HEVC standard, the image can be divided into multiple coding tree units (CTUs), each CTU being further divided into multiple CUs of different sizes. For the sake of clarity, the CUs 122 of array 120 for image 106 are shown as being of the same size, but in other embodiments, array 120 may consist of CUs 122 of different sizes, as in the CTU configuration described above.
[0014] In block 204, the encoding system 102 selects a CU122 (e.g., CU122-1 in Figure 1) of the image 106 to be encoded. According to various standards such as the HEVC standard, the image 106 may first be divided into multiple slices, then each slice into multiple CTUs, then each CTU into multiple CUs, and then the slice-CTU-CU selection may proceed in a defined order. Once a CU122 is selected, in block 206, the palette table generator 110 utilizes a recursive and hierarchical palette table generation process in which the CU122 is recursively divided in a top-down manner into successive pixel blocks of progressively smaller size at each divisional level of the divisional hierarchy until the minimum block size is reached at the lowest divisional level. Then, using a bottom-up method, the palette table generator 110 performs histogram collection or other clustering on the pixels of each block at the lowest divisional level to determine a set of candidate colors to include as palette colors in the corresponding palette table for each lowest level block. At the second lowest level of the partitioning hierarchy, the palette colors from each palette table of the multiple lowest-level blocks represented by the second lowest level block act as candidate colors for the second lowest level block. Therefore, the palette table generator 110 performs histogram collection or other clustering on these candidate colors to identify colors to include in the palette table for the block at the second lowest level. This process is performed for each block at the second lowest level. The process of using the palette colors from each palette table generated for each constituent block at the next lowest level as candidate colors for selection into the palette table of the corresponding block at the next higher level is repeated up to the top level of the partitioning hierarchy (representing the entire CU122), at which point the palette table generator 110 generates a palette table for the top level through histogram collection or other clustering of the palette colors of the palette tables generated at the second highest level of the partitioning hierarchy.In other words, the palette table generator 110 generates an intermediate palette table for larger divisions of CU122 by recursively and hierarchically integrating palette tables for smaller divisions. This avoids the computationally intensive conventional process of thoroughly sorting and processing all pixels of CU122 as a single block to generate a palette table. Using the candidate palette tables generated for each division level (e.g., 8x8 pixels, 16x16 pixels, 32x32 pixels, 64x64 pixels, 128x128 pixels, etc.), the palette table generator 110 or other components of the encoding system 102 then calculate the rate distortion cost for encoding CU122 using the corresponding candidate palette table, and this calculation is performed for each candidate palette table. The encoding system 102 then selects a candidate palette table that represents the lowest rate distortion cost for encoding CU122 as the "final" palette table 124. An exemplary embodiment of the hierarchical palette table generation and selection process employed by the encoding system 102 in block 206 is described in more detail below with reference to the enlarged process flow 207 in Figure 2.
[0015] Using the final palette table 124 for CU122 determined using this hierarchical and recursive palette table generation and selection method, in block 208, the color index map generator 112 performs predictions based on a comparison of each of the original pixels of CU122 with the palette colors represented in the palette table 124 to generate a color index map 126 that represents the pixels of CU122 and is indexed in the final palette table 124. Any of various standard or proprietary techniques can be used to generate the color index map 126 from the final palette table 124. For illustrative purposes, as understood in the art, a palette table such as the final palette table 124 includes multiple entries, each entry having an associated index value and a corresponding palette color selected from candidate colors identified in histogram collection or other clustering of color values for the corresponding pixel block. Each palette color consists of, for example, three color components (RGB or YCbCr). Therefore, to generate the color index map 126, for each pixel of CU122, the color index map generator searches the final palette table 124 for the corresponding palette color with the least distortion and replaces the pixel color with the index number associated with the selected palette number in the corresponding position entry of the color index map 126. For illustrative purposes, suppose the pixel at (1,1) (i.e., row 1, column 1) of CU122-1 has a color that is closest to the palette color (R150, B50, G75) found at index 1 in the final palette table 124, for example. In this case, the color index map generator 112 would place the index value "1" in the (1,1) entry of the color index map 126 to indicate that the color of pixel (1,1) is most similar to the palette color found at index 1 in the final palette table 124.
[0016] Furthermore, in some embodiments of reversible coding, the predictions made by the color index map generator 112 identify one or more pixels that are not sufficiently similar to the palette colors, and therefore require the addition of separate indices in the final palette table 124 and corresponding identification entries in the color index map 126 to represent such pixels, which are typically called “escape pixels,” and therefore their corresponding indices are called “escape” indices. In embodiments of irreversible coding, escape pixels are often coded instead as one of the palette colors, or explicitly signaled after quantization, depending on which method gives a better rate distortion trade-off.
[0017] Simultaneously with the color index map generation process in block 208, in block 210, the residual generator 114 compares the original pixel colors with their selected palette colors to generate residuals representing the differences. These residuals are then quantized by the DCT quantizer 116 to generate quantized DCT coefficients. In block 212, the entropy encoder 118 encodes the palette table 124, color index map 126, and quantized DCT coefficients for the selected CU 122 into corresponding segments of the bitstream 108.
[0018] The process of selecting the next CU122 from the image 106 to be encoded, represented by blocks 204-212, is repeated for each CU122 of the image 106 to be encoded in palette mode. After all such CUs have been encoded, another iteration of method 200 is repeated, starting with block 202, to receive the next image 106 in the video stream, which is then encoded for transmission or storage.
[0019] With regard to the subsequent decoding of the encoded bitstream 108, any of the various standard or proprietary palette-mode decoding processes that match how the bitstream 108 was encoded may be employed, such as the process provided by HEVC-SCC. Such a process typically involves a palette-mode decoder decoding each segment of the bitstream 108 representing the encoded CU to reconstruct the palette table 124, the color index map 126, and the quantized DCT coefficients representing the CU. The quantized DCT coefficients are dequantized to obtain an irreversible or reversible representation of the residuals, and the reconstructed palette table 124 and color index map are used together with the residuals to reconstruct the array of pixels represented by the original CU 122, or its irreversible representation.
[0020] As described above, the process in block 206 provides the generation of a final palette table 124 using a hierarchical and recursive process that efficiently integrates intermediate palette tables generated for lower levels of the partition hierarchy to generate intermediate palette tables for higher levels of the partition hierarchy, and from these candidate palette tables, provides the selection of a final palette table 124 that represents the lowest rate distortion cost to be used when encoding CU122. The expanded process flow 207 illustrates exemplary embodiments of this process with reference to exemplary hierarchical partitions shown in Figure 3, as well as exemplary executions of this process as shown in Figures 4-1 and 4-2.
[0021] The process in block 206 begins in block 220, and the CU122 selected in block 204 is recursively divided into a partitioning hierarchy consisting of a lowest level (or lowest level), a highest level (or highest level), and, if the depth of the partitioning hierarchy exceeds two levels, one or more intermediate levels between the lowest and highest levels. The highest level represents the entire pixel array of CU122 as a single highest-level block. For each successively lower level of the partitioning hierarchy, the hierarchical palette table generator 110 divides each block at the next higher level into a related set of four blocks until the minimum block size of P×P pixels is reached at the lowest level, where P represents an integer greater than 1 and, in many embodiments, is the minimum CU size supported by the encoding standard employed. For example, the minimum block size would be set to 8, so that HEVC provides a minimum CU of 8×8 pixels within the CTU. Thus, the number N of levels in the partitioning hierarchy for a K×K pixel CU122 is set based on the relationship of the following equation: K = P * 2 (N-1) Therefore, if the minimum block size is 8x8 pixels (P=8) and CU122 is 16x16 pixels (K=16), there will be only two division levels (N=2), namely the highest level and the lowest level. If the minimum block size is 8x8 pixels (P=8) and CU122 is 128x128 pixels, there will be five division levels (N=5), namely the highest level, the lowest level, and three intermediate levels between them.
[0022] For illustrative purposes, an example of this recursive partitioning is shown in Figure 3. In the illustrated exemplary partitioning hierarchy 300, a 64x64 pixel CU is recursively partitioned until a minimum block size of 8x8 pixels is reached. Therefore, the exemplary partitioning hierarchy 300 has four partitioning layers (64=8). *2^(4-1) → N=4). The entire 64x64 pixel array of CU is considered a single block (BLK64) at the top level (level 1) of the partitioning hierarchy. At the first intermediate level (level 2), the 64x64 pixels of CU are partitioned into four corresponding sets of 32x32 blocks, BLK[32,0]~BLK[32,3]. At the second intermediate level (level 3), each of the 32x32 blocks in the first intermediate level is partitioned into four corresponding sets of 16x16 blocks, resulting in blocks BLK[16,0]~BLK[16,15] at the second intermediate level. As illustrated, block BLK[32,0] at the first intermediate level (level 2) is partitioned into the corresponding sets of blocks BLK[16,0], BLK[16,1], BLK[16,2], and BLK[16,3]. Similarly, block BLK[32,1] in the first intermediate level (level 2) is divided into blocks BLK[16,4], BLK[16,5], BLK[16,6], BLK[16,7], etc. At the lowest level of the division hierarchy 300 (level 4), each 16x16 block in the second intermediate block is divided into four corresponding sets of 8x8 blocks, resulting in blocks BLK[8,0] to BLK[8,63]. As illustrated, BLK[16,0] in the second intermediate level is divided into the set of blocks BLK[8,0] to BLK[8,3]. Similarly, BLK[16,1] is divided into the set of blocks BLK[8,4] to BLK[8,7], and so on.
[0023] Returning to FIG. 2, in block 222, in a state where CU122 is recursively partitioned into pixel blocks whose size decreases from the top level to the bottom level of the partition hierarchy such that each block at a non-lowest level is represented by four smaller blocks at the next lower level, the palette table generator 110 sets the current level being processed to the bottom level of the partition hierarchy and generates an individual palette table for each block at the lowest level of the partition hierarchy. In at least one embodiment, the palette generation process for each block at the lowest level includes performing a histogram collection for the pixels within each block based on pixel color binning to generate a corresponding histogram of the pixel colors present within the block's pixels, and then selecting X subsets of the pixel colors present based on the size of the corresponding bin (i.e., the number of pixel colors that fit within each bin) as the palette colors of the corresponding palette table. The value X is selectable or otherwise programmable and is generally selected based on various parameters including, for example, the minimum block size, coding efficiency, coding bit rate, etc. For example, the palette table is often limited to 16 or fewer palette colors, and 8 or 16 (i.e., X = 8 or X = 16) are frequent configurations. Thus, in the exemplary partition hierarchy 300 of FIG. 3, the palette table generator 110 separately performs sorting and other operations utilized for histogram analysis for each of the 64 8×8 pixel blocks at the lowest level (level 4) to generate 64 separate histograms, and generates 64 separate palette tables from these 64 separate histograms, where each palette table includes, for example, up to 16 indexed palette colors.
[0024] Subsequently, in block 224, the palette table generator 110 moves up one level (i.e., the current level being processed is set to the next higher level). In block 226, the palette table generator 110 selects the blocks of the current level being processed based on a specified selection order (e.g., horizontal or vertical scan). In block 228, the palette table generator 110 generates a palette table for the selected blocks at the current level from the palette colors of the palette tables generated for the set of blocks at the previous (or lower) level that correspond to the selected blocks at the current level. In at least one embodiment, the palette table for the selected blocks at the current level is generated from the palette tables of the corresponding set of blocks at the lower level by combining the palette colors of the blocks at the lower level into a set of candidate palette colors, then performing histogram collection of this set of candidate palette colors to identify X histogram bins that have the most frequently occurring palette colors, and generating a palette table for the selected blocks at the current level to contain X palette colors based on the identified X histogram bins. In the first iteration of block 228 (for the lowest intermediate level), this involves using the palette colors implemented in the palette table for the four lowest-level blocks generated in block 222. In subsequent iterations (for higher intermediate or top-level levels), this involves using the palette colors implemented in the palette table for the four next lowest-level blocks generated in the previous iteration of block 228. Thus, instead of performing histogram collection for all pixels of the CU represented by the selected block at the current level, histogram collection is instead performed only for the palette colors of the palette tables of lower-level blocks, and it will be understood that the palette tables of lower-level blocks integrate the palette colors of the palette tables of even lower-level blocks at higher levels of the partition hierarchy.Therefore, compared with the conventional full-pixel histogram analysis method, the operations required to generate the histogram for the J×J block of pixels, and thus the palette table, using this recursive method are significantly fewer.
[0025] When the palette table for the selected block at the current level is generated, at block 230, the palette table generator 110 determines whether individual palette tables for each block at the current level have been generated. If not, another iteration of the block selection and per-block palette table generation process for blocks 226, 228, 230 is executed for the next block of the CU at the current partition level. Otherwise, if all blocks at the current partition level have the palette tables generated for them, at block 232, the palette table generator 110 determines whether a higher partition level remains, i.e., whether the current level is the top level of the partition hierarchy. If not the top level of the hierarchy, the palette table generator 110 returns to block 224, sets the current level being processed to the next higher level within the partition hierarchy, and then sets up another iteration of the block selection and per-block palette table generation process for blocks 226 to 332 for the current level being processed.
[0026] Instead, if the palette table generator 110 is ascending the partition hierarchy for the CU122 being encoded and is at the top level of the hierarchy, in block 234, the encoding system 102 designates the palette tables generated at each level of the partition hierarchy as candidate palette tables, and then calculates the rate distortion cost for encoding the CU for each of the candidate palette tables. The candidate palette table that requires the lowest rate distortion cost to encode the CU122 is designated as the final palette table 124 for the CU122, and the final palette table 124 is then used by the color index map generator 112 to generate the corresponding color index map 126 for the CU122, as described above with reference to block 208.
[0027] Next, referring to Figures 4-1 and 4-2, an exemplary embodiment of Method 200 of Figure 2 is shown, using an exemplary partition hierarchy 300 for 64×64 CUs as shown in Figure 3. In this example, each palette table contains up to 16 palette colors (i.e., X=16). For a 64×64 pixel CU, the lowest partition level (level 4) generates a set of four 8×8 blocks for each 16×16 block of the next highest level (level 3). Each 8×8 block is statistically analyzed to generate a corresponding histogram of candidate pixel colors, and the histogram is used to identify up to 16 of the most frequently occurring pixel colors within the 8×8 block as palette colors indexed in the palette table for that block. For illustrative purposes, Figure 4-1 shows histograms 401-0, 401-1, 401-2, and 401-3 collected for blocks BLK[8,0], BLK[8,1], BLK[8,2], and BLK[8,3], respectively. The palette table generator 110 generates palette tables 402-0, 402-1, 402-2, and 401-3, each containing up to 16 palette colors selected based on histograms 401-0, 401-1, 401-2, and 401-3, respectively. This same process is performed for each of the other 15 sets of the four 8x8 blocks, resulting in a total of 64 palette tables being generated from 64 8x8 blocks (BLK[8,0]~BLK[8,63]) at the lowest level (level 5) of the partition hierarchy 300.
[0028] Next, at the lowest intermediate level (level 3) of the classification hierarchy 300, the palette table generator 110 generates a classification table for each of the 16 16x16 blocks (BLK[16,0]~BLK[16,15]) by integrating the four classification tables generated for the four 8x8 blocks at the lowest level corresponding to the blocks of the second level. For illustrative purposes, in Figure 4-1, the indexed palette colors of each of the palette tables 402-0~402-3 are combined into a set of up to 64 candidate colors 403 (i.e., up to 16 palette colors per lowest-level palette table × 4 lowest-level palette tables). The palette table generator 110 analyzes this set 403 to generate a histogram 404 (or other clustering) representing the frequency of occurrence of candidate colors within the set 403, and then uses up to 16 of the most frequently expressed pixel colors in the histogram 404 to generate an intermediate palette table 405-0 for the 16x16 block BLK[16,0] at the second level (level 3), which represents the four 8x8 blocks BLK[8,0]~BLK[8,3] at the lowest intermediate level. This process is similarly performed for the other 15 16x16 blocks (BLK[16,1]~BLK[16,15]) at the lowest intermediate level. The result is four intermediate level palette blocks 405-0, 405-1, 405-2, and 405-3.
[0029] Upon moving to the highest intermediate level (Level 2) within the classification hierarchy 300, the palette table generator 110 generates a classification table for each of the four 32x32 blocks (BLK[32,0]~BLK[32,3]) through the integration of the four classification tables generated for the four 16x16 blocks at the lowest intermediate level (Level 3) corresponding to the blocks at the third level. For illustrative purposes, in Figure 4-1, the indexed palette colors of each of the palette tables 405-0~405-3 are combined into a set of up to 64 candidate colors 406. The palette table generator 110 analyzes this set 406 to generate a histogram 407 (or other clustering) representing the frequency of occurrence of candidate colors within the set 406, and then uses up to 16 of the most frequently expressed pixel colors in the histogram 407 to generate an intermediate palette table 408-0 for the 32x32 block BLK[16,0] representing the four 8x8 blocks BLK[8,0]~BLK[8,3] at the lowest level. This process is similarly performed for the other three 32x32 blocks (BLK[32,1]~BLK[32,3]) at the highest intermediate level. Referring to Figure 4-2, the results are the four intermediate level palette blocks 408-0, 408-1, 408-2, and 408-3.
[0030] At this point, the palette table generator 110 has progressed to the highest level or top-level (level 1) of the partition hierarchy 300 for CU122. Therefore, the palette table generator 110 generates the top-level palette table 412 for the top-level partition hierarchy by integrating the four partition tables 408-0 to 408-3, which were generated for four 32x32 blocks at the highest intermediate level (level 2), by combining the palette colors of palette tables 408-0 to 408-3 into a set 409 of up to 64 candidate colors. The palette table generator 110 analyzes this set 409 to generate a histogram 410 (or other clustering) representing the frequency of occurrence of the candidate colors in the set 409, and then generates the top-level palette table 412 using up to 16 of the most frequently expressed pixel colors in the histogram 410.
[0031] As the example described above illustrates, the process of generating the top-level palette table 412 involves 64 instances of histogram collection for a 64-pixel set, followed by three iterations of histogram collection for up to 64 candidate palette colors from lower-level palette tables. This is found to be less computationally complex than the conventional method of a single histogram collection for the entire set of 4,096 pixels represented by the 64x64 pixel CU in the example above. Furthermore, this hierarchical method facilitates the selective use of different-sized partitions to encode CUs more efficiently, based on rate distortion analysis of encoding CUs using different palette tables at different partition levels. Thus, each of palette tables 402-0, 402-1, 402-2, 402-3, 405-0, 408-0, and 412 represents a candidate palette table that can be used as the final palette table 124 used to encode CU 122. Therefore, for each of these candidate palette tables, the coding system 102 can calculate the respective rate distortion cost for coding CU122 using the candidate palette table and select the intra coding pipeline segment size based on which candidate palette table provides the lowest rate distortion cost.
[0032] For illustrative purposes, in the case of an 8x8 intra-coding pipeline for encoding a CU, the hierarchical divisions are expanded to a single level, and at this level, the palette tables generated for the 8x8 blocks (e.g., palette table 402-0 generated for BLK[8,0]) can be used to generate a color index map 411 representing the CU. Similarly, in the case of a 16x16 intra-coding pipeline for encoding a CU, the palette tables generated for the 16x16 division level (e.g., palette table 405-0 for BLK[16,0]) can be used to generate a color index map 412 representing the CU. Similarly, in the case of a 32x32 intra-coding pipeline for encoding a CU, the palette tables generated for the 32x32 division level (e.g., palette table 408-0 for BLK[32,0]) can be used to generate a color index map 413 representing the CU, and so on. In the examples of Figures 4-1 and 4-2, the palette table 412 has the lowest rate distortion cost, and therefore, the palette table 412 is adopted as the final palette table 124 for encoding CUs in the 64x64 intra coding pipeline to generate the color index map 126.
[0033] As disclosed herein, in some embodiments, a method for encoding an image containing screen content on a source device includes: recursively dividing a selected portion of an image into a partitioning hierarchy comprising multiple levels, wherein the top level of the partitioning hierarchy has a single block representing the entire set of pixels of the portion, and each level below the top level has four smaller blocks of pixels representing the corresponding larger block of pixels at the next higher level; generating a palette table for each block at the lowest level of the partitioning hierarchy, wherein the palette table includes a set of palette colors representing the pixel colors present in the corresponding block; generating a palette table for each block at the current level for each successively higher level in the partitioning hierarchy by selecting palette colors for the palette table based on palette colors from four palette tables associated with the four blocks at the next lower level corresponding to the block at the current level; selecting a final palette table from the palette tables generated for multiple levels of the partitioning hierarchy; generating a color index map for the portion of the image based on the final palette table; and encoding a representation of the portion of the image using the final palette table and the color index map to generate the corresponding segment of an encoded bitstream for output by the source device.
[0034] In one embodiment, generating a palette table for each block at the lowest level includes generating a first histogram representing the frequency of occurrence of binned pixel colors for the block's pixels, and selecting a specified maximum number of palette colors to index in the palette table based on the first histogram. In another embodiment, generating a palette for a block at a higher level in the partition hierarchy includes grouping the palette colors of each palette table of four lower-level blocks associated with the higher-level block into a set of candidate pixel colors, generating a second histogram representing the frequency of occurrence of binned candidate pixel colors, and selecting a specified maximum number of palette colors to index in the palette table based on the second histogram. In yet another embodiment, generating a palette table for a block at a higher level in the partition hierarchy includes grouping the palette colors of each palette table of four lower-level blocks associated with the higher-level block into a set of candidate pixel colors, generating a clustering representing the frequency of occurrence of binned candidate pixel colors, and selecting a specified maximum number of palette colors to index in the palette table based on the clustering.
[0035] In one embodiment, the lowest level block has a block size of P × P pixels, the portion of the image has a size of K × K pixels, and the number of levels N in the division hierarchy is given by the formula K = P * It is expressed as 2^(N-1). In another embodiment, selecting the final palette table includes, for each candidate palette table, determining the corresponding rate-distortion cost for encoding a portion of the image using the candidate palette table, and selecting the candidate palette table having the lowest corresponding rate-distortion cost as the final palette table. In yet another embodiment, the portion of the image is a coding unit of a coding tree unit.
[0036] In some embodiments, a device for encoding an image containing screen content, the device includes a palette-mode encoder, the palette-mode encoder recursively divides a selected portion of an image into a partitioning hierarchy consisting of multiple levels, the top level of the partitioning hierarchy having a single block representing the entire set of pixels of the portion, each level below the top level having four smaller blocks of pixels representing the corresponding larger block of pixels at the next higher level, and at the lowest level of the partitioning hierarchy generating a palette table for each block at the lowest level, the palette table including a set of palette colors representing the pixel colors present in the corresponding block The system is configured to: generate a palette table for each block at the current level for each successively higher level within the partition hierarchy by selecting palette colors for the palette table based on the palette colors from four palette tables associated with the four blocks at the next lower level corresponding to the block at the current level; select a final palette table from the palette tables generated for multiple levels of the partition hierarchy; generate a color index map for the parts of the image based on the final palette table; and encode the representation of the parts of the image using the final palette table and color index map to generate the corresponding segments of the encoded bitstream.
[0037] In one embodiment, the palette mode encoder is configured to generate a palette table for each block at the lowest level by generating a first histogram representing the frequency of occurrence of binned pixel colors for the pixels of a block, and selecting a specified maximum number of palette colors to index in the palette table based on the first histogram. In another embodiment, the palette mode encoder is configured to generate a palette table for blocks at higher levels in the partition hierarchy by grouping the palette colors of each palette table of four lower-level blocks associated with a block at a higher level into a set of candidate pixel colors, generating a second histogram representing the frequency of occurrence of binned candidate pixel colors, and selecting a specified maximum number of palette colors to index in the palette table based on the second histogram.
[0038] In one embodiment, the palette-mode encoder is configured to generate a palette table for a block at a higher level in a partition hierarchy by: grouping the palette colors of each palette table of four lower-level blocks associated with a block at a higher level into a set of candidate pixel colors; generating a clustering representing the frequency of occurrence of the binned candidate pixel colors; and, based on the clustering, selecting a specified maximum number of palette colors to index in the palette table. In another embodiment, the palette-mode encoder selects a final palette table by, for each candidate palette table, determining the corresponding rate-distortion cost for encoding a portion of an image using the candidate palette table; and selecting the candidate palette table having the lowest corresponding rate-distortion cost as the final palette table. In yet another embodiment, the palette-mode encoder includes at least one processor and memory for storing a set of instructions executable by the at least one processor.
[0039] In some embodiments, a method for encoding an image containing screen content at a source device includes: generating a palette table for each of a plurality of divisions of a division hierarchy for selected portions of an image by recursively using selected palette colors for a palette table for a set of smaller divisions of the image portion as candidate colors for larger divisions of the image portion; generating a color index map for the image portion based on a palette table selected from the palette tables generated for the image portion; and encoding a representation of the image portion using the selected palette table and color index map to generate a corresponding segment of an encoded bitstream for output by the source device. In another embodiment, generating a palette table for the smallest division of an image portion includes generating a first histogram representing the frequency of occurrence of binned pixel colors for the pixels of the smallest division; and selecting a specified maximum number of palette colors to index in the palette table based on the first histogram. In yet another embodiment, generating a palette table for divisions other than the smallest division includes: grouping the palette colors of each palette table for the next smallest division into a set of candidate pixel colors; generating a second histogram representing the frequency of occurrence of the binned candidate pixel colors; and selecting a specified maximum number of palette colors to index in the palette table based on the second histogram.
[0040] In one embodiment, the selected palette table is selected by determining, for each candidate palette table, the corresponding rate distortion cost for encoding a portion of the image using the candidate palette table, and selecting the candidate palette table having the lowest corresponding rate distortion cost as the selected palette table. In another embodiment, the portion of the image is a coding unit of a coding tree unit.
[0041] In some embodiments, a device for encoding an image containing screen content, the device comprising a palette-mode encoder, the palette-mode encoder is configured to generate a palette table for each of a plurality of divisions of a division hierarchy for selected portions of an image by recursively using selected palette colors for a palette table for a set of smaller divisions of the image portions as candidate colors for larger divisions of the image portions; generate a color index map for the image portions based on a palette table selected from the palette tables generated for the image portions; and encode a representation of the image portions using the selected palette table and color index map to generate corresponding segments of an encoded bitstream for output by the device.
[0042] In one embodiment, the palette mode encoder is configured to generate a palette table for the smallest portion of an image by generating a first histogram representing the frequency of occurrence of binned pixel colors for the pixels of the smallest portion, and selecting a specified maximum number of palette colors to index in the palette table based on the first histogram. In another embodiment, the palette mode encoder is configured to generate a palette table for portions other than the smallest portion by grouping the palette colors of each palette table of the next smallest portion of the related area into a set of candidate pixel colors, generating a second histogram representing the frequency of occurrence of binned candidate pixel colors, and selecting a specified maximum number of palette colors to index in the palette table based on the second histogram.
[0043] In one embodiment, the palette-mode encoder is configured to select a palette table by determining, for each candidate palette table, the corresponding rate-distortion cost for encoding a portion of an image using the candidate palette table, and selecting the candidate palette table having the lowest corresponding rate-distortion cost as the selected palette table. In another embodiment, the palette-mode encoder includes at least one processor and memory for storing a set of instructions executable by the at least one processor.
[0044] In some embodiments, the systems and technologies described above are implemented using one or more integrated circuit (IC) devices (also referred to as integrated circuit packages or microchips), such as the coding system 102 described with reference to Figures 1 to 4-2. Electronic design automation (EDA) and computer-aided design (CAD) software tools can be used to design and manufacture these IC devices. These design tools are typically represented as one or more software programs. One or more software programs include computer-executable code for operating a computer system to operate with code representing the circuit of one or more IC devices in order to perform at least part of the process of designing or adapting a manufacturing system for manufacturing the circuit. This code may include instructions, data, or combinations of instructions and data. Software instructions representing the design or manufacturing tools are typically stored in a computer-readable storage medium accessible to the computing system. Similarly, code representing one or more stages of designing or manufacturing an IC device is stored in and accessed from the same or different computer-readable storage medium.
[0045] Computer-readable storage media include any non-temporary storage media or combination of non-temporary storage media that are accessible by a computer system during use to provide instructions and / or data to the computer system. Such storage media may include, but are not limited to, optical media (e.g., compact discs (CDs), digital versatile discs (DVDs), Blu-ray® discs), magnetic media (e.g., floppy disks, magnetic tapes, magnetic hard drives), volatile memory (e.g., random access memory (RAM) or cache), non-volatile memory (e.g., read-only memory (ROM) or flash memory), or microelectromechanical system (MEMS) based storage media. Computer-readable storage media (e.g., system RAM or ROM) may be built into the computing system, computer-readable storage media (e.g., magnetic hard drives) may be permanently mounted to the computing system, computer-readable storage media (e.g., optical disks or Universal Serial Bus (USB) based flash memory) may be detachably mounted to the computing system, and computer-readable storage media (e.g., network-accessible storage (NAS)) may be connected to the computer system via a wired or wireless network.
[0046] In some embodiments, certain aspects of the technology described above are implemented by one or more processors of a processing system that executes the software. The software includes one or more sets of executable instructions, which are stored in a non-temporary computer-readable storage medium or otherwise clearly embodied. The software may also include instructions and specific data, which, when executed by one or more processors, operate the one or more processors to execute one or more aspects of the technology described above. Non-temporary computer-readable storage mediums may include, for example, magnetic or optical disk storage devices, solid-state storage devices such as flash memory, caches, random-access memory (RAM), or other non-volatile memory devices (one or more). Executable instructions stored in a non-temporary computer-readable storage medium can be implemented as source code, assembly language code, object code, or other instruction forms that can be interpreted or otherwise executed by one or more processors.
[0047] In addition to the foregoing, it should be noted that not all activities or elements described in the summary are required, and certain activities or parts of devices may not be required, and one or more additional activities may be performed, and one or more additional elements may be included. Furthermore, the order in which the activities are listed does not necessarily indicate the order in which they are performed. Also, the concepts have been described with reference to specific embodiments. However, those skilled in the art will understand that various modifications and variations can be made without departing from the scope of the invention as described in the claims. Therefore, the specification and drawings should be considered illustrative rather than restrictive, and all of these variations are intended to fall within the scope of the invention.
[0048] Benefits, other advantages, and solutions to problems have been described above with respect to specific embodiments. However, benefits, advantages, solutions to problems, and features that may give rise to or manifest any benefits, advantages, or solutions are not to be construed as essential, necessary, or indispensable features to any or all of the claims. Furthermore, the disclosed invention can be modified and implemented in different but similar ways, in ways that are obvious to those skilled in the art who are interested in the teachings of this specification; therefore, the specific embodiments described above are merely illustrative. There are no limitations to the details of the configuration or design shown herein beyond those described in the appended claims. Accordingly, the specific embodiments described above may be modified or altered, and it is clear that all such modifications are within the scope of the disclosed invention. Accordingly, the protection sought herein is described in the appended claims.
Claims
1. 1. A method for encoding an image including a screen content at a source device, comprising: for a selected portion of the image, recursively partitioning the selected portion of the image into a partitioning hierarchy consisting of a plurality of levels, the top level of the partitioning hierarchy having a single block representing an entire set of pixels of the selected portion of the image, and each level below the top level having four smaller blocks of pixels representing a corresponding larger block of pixels at the next higher level; generating, at a lowest level of the partition hierarchy, a palette table for each block at the lowest level, the palette table including a set of palette colors representing pixel colors present in a corresponding block; generating, for each successively higher level of the partition hierarchy, a palette table for each block at a current level by selecting a palette color for said palette table based on palette colors from four palette tables associated with four blocks at a next lower level that correspond to the block at the current level; selecting a final palette table from the palette tables generated for the plurality of levels of the partition hierarchy; generating a color index map for a selected portion of the image based on the final palette table; encoding a representation of the selected portion of the image using the final palette table and the color index map to generate a corresponding segment of an encoded bitstream for output by the source device. method.
2. generating a palette table for each block at the lowest level, generating a first histogram representing a frequency of occurrence of the binned pixel colors for the pixels of the block; selecting, based on the first histogram, up to a specified number of palette colors for indexing into the palette table.
2. The method of claim 1.
3. generating a palette of blocks for a higher level of the partitioning hierarchy, grouping palette colors of each of the palette tables of four lower level blocks associated with said higher level block into a set of candidate pixel colors; generating a second histogram representing the frequency of occurrence of the binned candidate pixel colors; selecting, based on the second histogram, up to the specified number of palette colors for indexing into the palette table. The method of claim 2.
4. generating a palette table for a block at a higher level of the partition hierarchy, grouping palette colors of each of the palette tables of four lower level blocks associated with said higher level block into a set of candidate pixel colors; generating a clustering representing a frequency of occurrence of the binned candidate pixel colors; selecting, based on the clustering, up to a specified number of palette colors for indexing into the palette table. The method according to any one of claims 1 to 3.
5. the lowest level block has a block size of P×P pixels; the selected portion of the image has a size of K×K pixels; The number of levels N of the partition hierarchy is expressed by the formula K=P*2^(N-1), The method according to any one of claims 1 to 4.
6. selecting the final pallet table comprises: determining, for each candidate palette table, a corresponding rate-distortion cost for encoding the selected portion of the image using the candidate palette table; selecting the candidate palette table with the lowest corresponding rate-distortion cost as the final palette table. The method according to any one of claims 1 to 5.
7. The method of claim 1, wherein the selected portion of the image is a coding unit of a coding tree unit. The method according to any one of claims 1 to 6.
8. 1. A device for encoding an image including a screen content, comprising: Equipped with a palette mode encoder, The palette mode encoder includes: for a selected portion of the image, recursively partitioning the selected portion of the image into a partitioning hierarchy consisting of a plurality of levels, the top level of the partitioning hierarchy having a single block representing an entire set of pixels of the selected portion of the image, and each level below the top level having four smaller blocks of pixels representing a corresponding larger block of pixels at the next higher level; generating, at a lowest level of the partition hierarchy, a palette table for each block at the lowest level, the palette table including a set of palette colors representing pixel colors present in a corresponding block; generating, for each successively higher level of the partition hierarchy, a palette table for each block at a current level by selecting a palette color for said palette table based on palette colors from four palette tables associated with four blocks at a next lower level that correspond to the block at the current level; selecting a final palette table from the palette tables generated for the plurality of levels of the partition hierarchy; generating a color index map for a selected portion of the image based on the final palette table; encoding a representation of a selected portion of the image using the final palette table and the color index map to generate a corresponding segment of an encoded bitstream; 4. The method of claim 3, device.
9. The palette mode encoder includes: generating a first histogram representing a frequency of occurrence of the binned pixel colors for the pixels of the block; selecting, based on the first histogram, up to a specified number of palette colors for indexing into the palette table; and generating a palette table for each block at the lowest level by The device of claim 8.
10. The palette mode encoder includes: grouping palette colors of each of the palette tables of four lower level blocks associated with said higher level block into a set of candidate pixel colors; generating a second histogram representing the frequency of occurrence of the binned candidate pixel colors; selecting, based on the second histogram, up to the specified number of palette colors for indexing into the palette table; generating a palette table for a block at a higher level of the partition hierarchy by The device of claim 9.
11. The palette mode encoder includes: grouping palette colors of each of the palette tables of four lower level blocks associated with said higher level block into a set of candidate pixel colors; generating a clustering representing a frequency of occurrence of the binned candidate pixel colors; selecting, based on said clustering, up to a specified number of palette colors for indexing into said palette table; generating a palette table for a block at a higher level of the partition hierarchy by A device according to any one of claims 8 to 10.
12. The palette mode encoder includes: determining, for each candidate palette table, a corresponding rate-distortion cost for encoding the selected portion of the image using the candidate palette table; selecting the candidate palette table with the lowest corresponding rate-distortion cost as the final palette table; and selecting the final pallet table by A device according to any one of claims 8 to 11.
13. The palette mode encoder comprising: at least one processor; and a memory for storing a set of instructions executable by the at least one processor. A device according to any one of claims 8 to 12.
14. 1. A method for encoding an image including a screen content at a source device, comprising: generating a palette table for each of a plurality of partitions of a partition hierarchy for the selected portion of the image by recursively using palette colors selected for a set of smaller partitions of the selected portion of the image as candidate colors for larger partitions of the selected portion of the image, the partition hierarchy including a plurality of levels, a highest level of the plurality of levels having at least one block representing an entire set of pixels of the selected portion of the image, and each level below the highest level having two or more smaller blocks of pixels representing a corresponding larger block of pixels at the next higher level; generating a color index map for the selected portion of the image based on a palette table selected from the plurality of palette tables generated for the selected portion of the image; encoding a representation of the selected portion of the image using the selected palette table and the color index map to generate a corresponding segment of an encoded bitstream output by the source device. method.
15. generating a palette table for a minimum partition of the selected portion of the image, generating a first histogram representing a frequency of occurrence of the binned pixel colors for the smallest partition of pixels; selecting, based on the first histogram, up to a specified number of palettes for indexing into the palette table.
15. The method of claim 14.
16. Generating a palette table for a partition of the selected portion other than the smallest partition includes: grouping the palette colors of each palette table of the associated next smaller partition into a set of candidate pixel colors; generating a second histogram representing the frequency of occurrence of the binned candidate pixel colors; selecting, based on the second histogram, up to the specified number of palette colors for indexing into the palette table.
16. The method of claim 15.
17. The selected pallet table is determining, for each candidate palette table, a corresponding rate-distortion cost for encoding the selected portion of the image using the candidate palette table; selecting the candidate palette table with the lowest corresponding rate-distortion cost as the selected palette table; Selected by, The method of any one of claims 14 to 16.
18. The method of claim 17, wherein the selected portion of the image is a coding unit of a coding tree unit. The method of any one of claims 14 to 17.
19. 1. A device for encoding an image including a screen content, comprising: Equipped with a palette mode encoder, The palette mode encoder includes: generating a palette table for each of a plurality of partitions of a partition hierarchy for the selected portion of the image by recursively using palette colors selected for a set of smaller partitions of the selected portion of the image as candidate colors for larger partitions of the selected portion of the image, the partition hierarchy including a plurality of levels, a highest level of the plurality of levels having at least one block representing an entire set of pixels of the selected portion of the image, and each level below the highest level having two or more smaller blocks of pixels representing a corresponding larger block of pixels at the next higher level; generating a color index map for the selected portion of the image based on a palette table selected from the plurality of palette tables generated for the selected portion of the image; encoding a representation of a selected portion of the image using the selected palette table and the color index map to generate a corresponding segment of an encoded bitstream output by the device; 4. The method of claim 3, device.
20. The palette mode encoder includes: generating a first histogram representing a frequency of occurrence of the binned pixel colors for the smallest partition of pixels; selecting, based on the first histogram, up to a specified number of palette colors for indexing into the palette table; and generating a palette table of a minimum partition of the selected portion of the image by 20. The device of claim 19.
21. The palette mode encoder includes: grouping the palette colors of each palette table of the associated next smaller partition into a set of candidate pixel colors; generating a second histogram representing the frequency of occurrence of the binned candidate pixel colors; selecting, based on the second histogram, up to the specified number of palettes for indexing into the palette table; and generating a palette table for a partition of the selected portion other than the smallest partition by 21. The device of claim 20.
22. The palette mode encoder includes: determining, for each candidate palette table, a corresponding rate-distortion cost for encoding the selected portion of the image using the candidate palette table; selecting the candidate palette table with the lowest corresponding rate-distortion cost as the selected palette table; and selecting the selected palette table by A device according to any one of claims 19 to 21.
23. The palette mode encoder comprising: at least one processor; and a memory for storing a set of instructions executable by the at least one processor. A device according to any one of claims 19 to 22.
