Palette mode video encoding with hierarchical palette table generation

By using a layered color palette generation method, and leveraging recursive partitioning and hierarchical structures, the problem of high computational complexity in screen content encoding is solved, resulting in a more efficient encoding process.

CN116615753BActive Publication Date: 2026-11-27ATI TECHNOLOGIES ULC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202180064140.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-09-23
Filing Date
2021-09-23
Publication Date
2026-11-27
Estimated Expiration
2041-09-23

AI Technical Summary

Technical Problem

Existing video coding standards suffer from high computational complexity and high hardware resource consumption when processing screen content, especially desktop screen content, making it difficult to effectively generate color palette tables and affecting coding efficiency.

Method used

A hierarchical palette table generation method is adopted, which generates the palette table layer by layer through recursive partitioning and hierarchical structure, reducing the amount of computation and improving efficiency.

Benefits of technology

It reduces the computational complexity of generating the color palette table, improves coding efficiency, reduces hardware resource consumption, and maintains the accuracy of color reproduction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116615753B_ABST
    Figure CN116615753B_ABST
Patent Text Reader

Abstract

An encoder [102] encodes an image portion [122] by recursively partitioning the portion into a hierarchical partitioning hierarchy. A top level has a single block representing the entire portion, and each lower level has four smaller blocks representing corresponding larger blocks at the higher level. A palette table [124] is generated for each bottom level block based on the pixels of the associated block. For each successive higher level, the encoder generates a palette table for each current level block by selecting a palette color based on palette colors from the four palette tables of the associated four blocks at the next lowest level. A color index map [126] is then generated based on a final palette table selected from the palette tables generated for the partitioning hierarchy. A representation of the portion is then encoded using the final palette table and the color index map to generate a corresponding segment of an encoded bitstream [108].
Need to check novelty before this filing date? Find Prior Art

Description

Background Technology

[0001] Some 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. This screen content can be transmitted separately or as a hybrid of screen content and camera-captured video content. However, unlike camera-captured video content, screen content, especially “desktop” screen content, typically contains rich text and other computer-generated graphics with sharp edges and relatively low noise. Furthermore, screen content often displays a smaller number of distinct colors within localized areas of the image.

[0002] Several video coding standards have been extended to leverage the relatively smaller number of colors and relatively higher contrast typically exhibited by screen content compared to camera-captured video, to provide more efficient screen content coding. For example, the ITU-T High Efficiency Video Coding (HEVC) standard provides a Screen Content Coding (SCC) extension that implements a palette pattern involving palette color selection followed by the generation of a color index map based on those selections. In this process, for each portion of the image containing the screen content being encoded (i.e., for each coding unit), the encoder identifies some of the highest number of representative colors found in that portion (e.g., the top eight colors) and generates a palette table that indexes (i.e., maps indices to) each of the identified representative colors. The encoder then replaces each pixel in that portion of the image with the corresponding index value of the palette color in the palette table that best matches that pixel's color, generating a corresponding color index map for the portion of the image being encoded. Then, the palette table and color index map, along with information relating to pixels in the image portion that differ excessively from any identified palette color (these pixels are called "escaping" pixels), are encoded to generate corresponding segments of the encoded bitstream, which are then transmitted to the target device. The target device then decodes the bitstream to obtain the palette table and color index map of the decoded block and, based on these values ​​and any associated decoding residuals, reconstructs the original block, lossily or losslessly. The Open Media Video 1 Consortium (AV1) coding standard provides a similar implementation of the palette pattern.

[0003] The conventional process for generating a palette table for a given portion of an image to be encoded requires generating a single histogram of the colors of all pixels in the entire image portion, and then selecting representative colors for the palette table from that histogram. While providing a compact bitstream, this palette table generation process can be computationally intensive, and therefore requires considerable hardware resources in terms of silicon area, throughput, and power consumption. For illustration, the HEVC-SCC standard mentioned above provides coding unit sizes of up to 128×128 pixels. This means that for each such coding unit in the image to be encoded, an encoder implementing a conventional palette table generation process would need to process 16,384 pixels to generate a corresponding histogram for each 128×128 coding unit, where, depending on the image resolution, there are hundreds or even thousands of coding units in any given image. The process becomes further complicated when the encoding system is configured to support multiple encoding partitions simultaneously, such as the ability to support any or all of the typical 8×8, 16×16, 32×32, 64×64 and 128×128 encoding unit partitions based on the HEVC standard and other similar encoding standards for encoding screen content video. Attached Figure Description

[0004] This disclosure is better understood by referring to the accompanying drawings, and many of its features and advantages will be apparent to those skilled in the art. The same reference numerals are used in different drawings to denote similar or identical items.

[0005] Figure 1 This is a block diagram of a source device with a palette-mode encoder according to some implementation schemes, which uses layered palette table generation to perform palette-mode encoding on video containing screen content.

[0006] Figure 2 This illustrates the use of [some implementation schemes] by [them]. Figure 1 The flowchart shows the process of palette pattern encoding, which is implemented by a palette pattern encoder to generate a layered palette table.

[0007] Figure 3 This is a diagram illustrating an exemplary recursive hierarchical partitioning of coding units into multiple groups of pixel blocks at different levels of a hierarchical structure, according to some embodiments.

[0008] Figure 4-1 and Figure 4-2 This illustrates the use according to some implementation schemes. Figure 3 The exemplary recursive partitioning of the encoding unit Figure 2 A block diagram illustrating an exemplary implementation of the method. Detailed Implementation

[0009] Typical methods for generating palette tables for coding units (CUs) in palette pattern coding based on histogram analysis or other clustering of each pixel represented in a CU are often computationally forbidden, especially for large CU partitions or encoders supporting multiple concurrent CU partitions. To reduce computational complexity while maintaining sufficient color reproduction accuracy, the system and method described herein utilize a hierarchical palette table generation process to efficiently generate palette tables for each of one or more selected partition sizes of a selected CU to be encoded in a palette pattern. In this approach, the selected CUs are recursively partitioned at different levels of a partition hierarchy. At the top level, a selected K×K pixel CU is represented by a single K×K pixel block. Each subsequent level below the top level has four smaller pixel blocks representing the corresponding larger pixel block at the next higher level. At the bottom level of the partition hierarchy, the encoder generates a palette table for each block at the bottom level. Each of these palette tables includes a set of palette colors representing the pixel colors present in the corresponding block, and is selected in at least one embodiment via histogram analysis of the pixel colors present in the block, via k-means, or via any of a variety of other clustering methods. Subsequently, for each successive higher level in the partitioned hierarchy, the encoder generates a palette table for each block at the current level by selecting palette colors from four palette tables associated with four blocks at the next lower level corresponding to the block at the current level. This can also be performed via histogram collection of the palette colors from the four palette tables or other clustering. Then, at the top level, a single palette table is generated based on the four palette tables at the next highest level, which the encoder uses 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 corresponding segments of the encoded bitstream.

[0010] To illustrate using an exemplary 32×32 coding unit partition (i.e., K=32) and a minimum block size of 8×8 pixels, the CU is designated as the top block at the top level, and for the next highest level, the top block is partitioned into four second-level blocks, each 16×16 pixels, and then each of these blocks is partitioned into four third-level blocks, each 8×8 pixels. Starting from the lowest or bottom level (the third level in this example), the encoder generates an initial palette table for each block at that level using histogram analysis, k-means analysis, or other statistical analysis, thus generating four palette tables for the bottom level. For ease of reference, this document describes an exemplary specific implementation utilizing histogram collection (also identified as histogram analysis), but it should be understood that, unless otherwise specified, references to histogram collection / analysis should include references to any of the various clustering methods or other statistical methods, such as k-means analysis. 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 component blocks at the bottom level. These component blocks collectively constitute a block at the second lowest level. The encoder determines an intermediate palette table for the block at the second lowest level through statistical analysis of this set of candidate colors. This process is repeated for each of the three other blocks at the second lowest level, resulting in four intermediate palette tables for the second lowest level. Then, at the top level, the encoder identifies a set of candidate colors from the palette colors represented in the four palette tables of the four component blocks at the second lowest level. These component blocks collectively constitute a single block at the top level. The encoder determines a palette table for this block (which represents the entire CU) through statistical analysis of this set of candidate colors. The encoder then estimates the rate distortion cost for encoding the CU using the corresponding palette table at each partition hierarchy level. Then, the palette table requiring the lowest rate-distortion cost is designated as the "final" palette table of the CU. The encoder then uses the final palette table to generate a color index map of the selected K×K coding unit and encodes the color index map, the final palette table, and any quantization residuals of any escaped pixels to generate the corresponding portion of the encoded bitstream. This encoded bitstream can then be stored for later access or transmitted to the target device. The decoder at the target device decodes the bitstream to recover the encoded palette table, color index map, and quantization residuals of the coding unit and uses the recovered palette table, color index map, and residuals to recover the original CU or its lossy representation.

[0011] This hierarchical and recursive partitioning process for determining the palette table for each pixel block at a level from the palette table generated for the component blocks at the next lower level enables efficient palette table generation by reducing the number of colors considered via integrating the palette color selection process at lower levels into the palette color selection process at higher levels. For illustration, the conventional process for generating a palette table for a 64×64 CU would require the encoder to sort and count each of the 4,096 pixels in the CU to obtain, for example, a palette table of eight representative colors. However, according to the hierarchical palette color selection process described herein, only small subgroups of pixels are sorted and counted on a relatively small block basis at the lowest level, and then the corresponding blocks at the next highest level are considered, resulting in fewer overall operations required to generate the final palette table for a CU of a given size. This makes the process of generating the palette table for the CU more efficient, while also allowing for the generation of separate palette tables of individual partition sizes usable for the CU at each level of the partitioned hierarchy.

[0012] Figure 1 A source device 100 with an encoding system 102 according to some embodiments is illustrated, which employs a palette pattern encoding process utilizing a hierarchically and recursively generated palette table. The source device 100 may include any of a variety of devices configured to encode a video stream containing screen content, including servers, personal computers, tablets, cellular phones, or other computing-enabled mobile devices that support generating screen content for transmission to or storage on a display device in various applications. Such services include, for example, remote desktop services, wireless display services, screen sharing / collaboration services, cloud gaming services, etc. The source device 100 includes a video source 104 and an encoding system 102, as well as [details omitted for brevity]. Figure 1 Various other components omitted include 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. Video source 104 operates to generate or otherwise provide a video stream consisting of a series of images 106 (often referred to as “pictures” or “frames”) for encoding by encoding system 102 into a corresponding bitstream 108. This bitstream is provided for transmission to a target device via a network interface (not shown) or otherwise provided for output, such as for storage at a local or networked storage device (not shown) for subsequent access. Video source 104 may include, for example: a graphics processing unit (GPU) that operates to render some or all of the content included in each image 106; a decoder that decodes previously encoded video data representing screen content or other image content; etc.

[0013] In at least one embodiment, some or all of the images 106 included in the stream from video source 104 are composed of computer-generated screen content that typically exhibits more contrast and fewer colors in local areas compared to video images captured by a camera. Therefore, encoding system 102 is configured to provide palette-based encoding (or “palette-pattern” encoding) of those images 106, which are identified individually or as part of the corresponding stream as containing screen content. For this purpose, encoding system 102 includes a hierarchical palette table generator 110 (hereinafter referred to as “palette table generator 110” for brevity), 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 components 110, 112, 114, 116, and 118 may be implemented at source device 100 as one or more processors that execute software instructions stored in system memory or another non-transitory computer-readable storage medium and are configured to manipulate one or more processors to perform the processes described herein. In other embodiments, some or all of components 110, 112, 114, 116, and 118 may be implemented as hard-coded 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 components 110, 112, 114, 116, and 118 may be implemented as a combination of one or more processors that execute software and hard-coded or programmable logic.

[0014] Figure 2 A method 200 is shown for operating a coding system 102 for palette pattern encoding of an image containing screen content using a hierarchical and recursive palette table generation process, according to some embodiments. For ease of illustration, reference is made to the following description of method 200. Figure 3 Exemplary hierarchical partitioning of the depicted CU and Figure 4-1 and Figure 4-2 An exemplary implementation of the described method 200.

[0015] Method 200 begins at block 202, where encoding system 102 receives image 106 from video source 104 as part of image stream 106. For example, in some implementations, each image 106 is buffered in a frame buffer (not shown) of source device 100 when generated by video source 104 or otherwise obtained. For the following purposes, it can be assumed that the received image 106 contains sufficient screen content to benefit from palette mode encoding. To illustrate, in some implementations, palette mode is employed on a per-CU basis, and encoding system 102 calculates the rate-distortion cost of encoding the current CU using palette mode compared to the rate-distortion cost of other predicted modes, and if the current CU represents the lowest rate-distortion cost of the encoding option, then palette mode encoding is utilized for the current CU. Otherwise, if no palette mode is indicated for image 106, image 106 is encoded using a suitable conventional encoding technique (such as the encoding technique published by HEVC).

[0016] Furthermore, at box 202, the encoding system 102 logically partitions the J×K pixel array represented by image 106 into two-dimensional coding units (CUs) 122 (such as... Figure 1 Array 120 of CU 122-1 and 122-2) Figure 1 In some implementations, such as in the ITU-T Rec.H.264 standard, all CUs are the same size (CUs are often alternatively referred to as "macroblocks"). In other implementations, such as in the ITU-T Rec.H.265 HEVC standard, an image may be partitioned into multiple coding tree units (CTUs), where each CTU is further partitioned into multiple CUs of different sizes. For ease of illustration, the CUs 122 of the array 120 of image 106 are depicted as having the same size, but in other implementations, array 120 may consist of CUs 122 of different sizes, such as in the aforementioned CTU configuration.

[0017] At box 204, encoding system 102 selects CU 122 of the image 106 to be encoded (e.g., Figure 1(CU 122-1). Consistent with various standards (such as the HEVC standard), image 106 is first partitioned into multiple slices, and then each slice is partitioned into multiple CTUs, and each CTU is partitioned into multiple CUs. Slice-CTU-CU selection can then be performed in a defined order. When CU 122 is selected, at box 206, palette table generator 110 utilizes a recursive and hierarchical palette table generation process, where CU 122 recursively partitions into successive smaller pixel blocks in a top-down manner at each partition level of the partition hierarchy until the minimum block size is reached at the lowest partition level. Then, using a bottom-up approach, palette table generator 110 performs histogram collection or other clustering on the pixels of each block at the lowest partition level to determine a set of candidate colors to be included as palette colors in the corresponding palette table for each lowest-level block. For the second lowest partition level, the palette colors from the palette tables of each of the multiple lowest-level blocks represented by the second lowest-level block are used as candidate colors for the second lowest-level block, and thus the palette table generator 110 performs histogram collection or other clustering on these candidate colors to identify colors to be included in the palette table of the block in the second lowest level. This process is performed for each block in the second lowest level. The process of using the palette colors from each palette table generated for each constituent block at the next lower level as candidate colors for selecting the palette table of the corresponding block at the next higher level is repeated until the top level of the partition hierarchy (which is generally represented by CU 122), at which point the palette table generator 110 generates a palette table for the top level by histogram collection or other clustering of the palette colors from the palette tables generated at the next highest level of the partition hierarchy. In other words, the palette table generator 110 generates intermediate palette tables for larger partitions of the CU 122 by recursively and hierarchically integrating the palette tables of smaller partitions. This avoids the computationally intensive traditional process of exhaustively sorting and processing all pixels of the CU 122 as a block to generate a palette table. In the case of generating candidate palette tables for each partition level (e.g., 8×8 pixels, 16×16 pixels, 32×32 pixels, 64×64 pixels, 128×128 pixels, etc.), the palette table generator 110 or other components of the encoding system 102 then use the corresponding candidate palette tables to calculate the rate distortion cost for encoding the CU 122, where this calculation is performed for each candidate palette table. The encoding system 102 then selects the candidate palette table representing the lowest rate distortion cost for encoding the CU 122 as the "final" palette table 124. References are as follows. Figure 2 The extended process flow 207 describes in more detail an exemplary implementation of the layered palette table generation and selection process employed by the encoding system 102 at box 206.

[0018] With the final palette table 124 determined for CU 122 using this hierarchical and recursive palette table generation and selection method, at box 208, the color index map generator 112 performs prediction based on a comparison of each original pixel in the original pixels of CU 122 with the palette colors represented in palette table 124 to generate a color index map 126 representing the pixels of CU 122 and indexed into the final palette table 124. The color index map 126 can be generated from the final palette table 124 using any of a variety of standards or proprietary techniques. For illustration, as understood in the art, a palette table (such as the final palette table 124) comprises multiple entries, each entry having an associated index value and a corresponding palette color selected from candidate colors identified in a histogram collection or other clustering of color values ​​of the corresponding pixel block. Each palette color consists, for example, of three color components (RGB or YCbCr). Therefore, to generate the color index map 126, for each pixel of CU 122, the color index map generator searches for the corresponding palette color with the least distortion in the final palette table 124 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 illustration, it can be assumed that the pixel at (1,1) (i.e., row 1, column 1) of CU 122-1 has a color closest to the palette color (R150, B50, G75), which is found, for example, at index 1 in the final palette table 124. In this case, the color index map generator 112 will place the index value "1" at the (1,1) entry of the color index map 126 to indicate that the color of pixel (1,1) is closest to the palette color found at index 1 in the final palette table 124.

[0019] Furthermore, in some lossless encoding implementations, predictive identification is performed by the color index map generator 112: one or more pixels that are not sufficiently similar to the palette colors and therefore require a separate index in the final palette table 124; and corresponding identification entries in the color index map 126 to represent such pixels, which are often referred to as "escape pixels," and their corresponding indices are therefore called "escape indices." In lossy encoding implementations, instead, escape pixels are either encoded as a palette color or explicitly signaled after quantization, typically depending on which method provides a better rate distortion tradeoff.

[0020] Simultaneously with the color index map generation process in box 208, at box 210, residual generator 114 compares the original pixel color with its selected palette color to generate residuals representing the difference. These residuals are then quantized by DCT quantizer 116 to generate quantized DCT coefficients. At box 212, entropy encoder 118 encodes the palette table 124, color index map 126, and quantized DCT coefficients of the selected CU 122 into the corresponding segment of bitstream 108.

[0021] For each CU 122 of the image 106 to be encoded in palette mode, the process of selecting the next CU 122 from the image 106 to be encoded is repeated, as shown in boxes 204-212. After all such CUs have been encoded, another iteration of method 200 is repeated starting from box 202, wherein the reception of the next image 106 in the video stream is encoded for transmission or storage.

[0022] For the subsequent decoding of the encoded bitstream 108, any of the various standard or proprietary palette mode decoding processes consistent with the encoding method of bitstream 108 can be employed, such as the process provided by HEVC-SCC. For each segment of the bitstream 108 representing the encoded CU, such a process typically requires a palette mode decoder to decode the segment to recover 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 a lossy or lossless representation of the residual, and the recovered palette table 124 and color index map, together with the residual, are used to recover the pixel array represented by the original CU 122 or its lossy representation.

[0023] As described above, the process in box 206 provides the generation of a final palette table 124 using a hierarchical and recursive process, which is effectively integrated into intermediate palette tables generated at lower levels of the partitioned hierarchy, to create intermediate palette tables at higher levels of the partitioned hierarchy, and to select the final palette table 124 representing the lowest rate distortion cost from these candidate palette tables for encoding CU 122. (See reference...) Figure 3 The exemplary hierarchical partitions shown in the figure and Figure 4-1 and Figure 4-2 The exemplary execution of the process is shown in the figure, and the extended process flow 207 illustrates an exemplary specific implementation of the process.

[0024] The process in box 206 begins at box 220, where the CU 122 selected at box 204 is recursively partitioned into a partition hierarchy consisting of a lowest level (or bottom level), a highest level (or top level), and, if the depth of the partition hierarchy is greater than two levels, one or more intermediate levels between the lowest and highest levels. The top level represents the entire pixel array of CU 122 as a single top-level block. For each successive lower level of the partition hierarchy, the layered palette table generator 110 partitions each block at the next higher level into an associated set of four (4) blocks until a minimum block size of P×P pixels is reached at the lowest level, where P represents an integer greater than 1 and, in many specific implementations, the minimum CU size supported by the adopted encoding standard. For example, since HEVC provides a minimum CU of 8×8 pixels in CTU, the minimum block size P will be set to 8. Therefore, the number of levels N in the partition hierarchy of K×K pixel CU 122 is set based on the following relationship in Equation 1:

[0025] K = P * 2 N-1

[0026] Therefore, if the minimum block size is 8×8 pixels (P=8) and CU122 is 16×16 pixels (K=16), there are only two partitioning levels (N=2): the top level and the bottom level. For the case where the minimum block size is 8×8 pixels (P=8) and CU122 is 128×128 pixels, there will be five partitioning levels (N=5): the top level, the bottom level, and three intermediate levels.

[0027] To illustrate, Figure 3An example of this recursive partitioning is shown below. In the exemplary partitioning hierarchy 300 shown, 64×64 pixel CUs are recursively partitioned until a minimum block size of 8×8 pixels is reached. Thus, the exemplary partitioning hierarchy 300 has four partitioning layers (64 = 8 * 2^(4-1) → N = 4). The entire 64×64 pixel array of CUs is considered as a single block (BLK64) at the top level (level 1) of the partitioning hierarchy. At the first intermediate level (level 2), the 64×64 pixels of the CUs are partitioned into a corresponding set of four 32×32 blocks (BLK[32,0] to BLK[32,3]). At the second intermediate level (level 3), each of the 32×32 blocks at the first intermediate level is partitioned into a corresponding set of four 16×16 blocks, resulting in blocks BLK[16,0] to BLK[16,15] at the second intermediate level. As shown in the figure, block BLK[32,0] at the first intermediate level (level 2) is partitioned into a corresponding set of blocks BLK[16,0], BLK[16,1], BLK[16,2], and BLK[16,3]. Similarly, block BLK[32,1] at the first intermediate level (level 2) is partitioned into blocks BLK[16,4], BLK[16,5], BLK[16,6], and BLK[16,7], etc. At the bottom level (level 4) of the partition hierarchy 300, each 16×16 block at the second intermediate block is partitioned into a corresponding set of four 8×8 blocks, thus generating blocks BLK[8,0] to BLK[8,63]. As shown in the figure, BLK[16,0] at the second intermediate level is partitioned into a set of blocks BLK[8,0] to BLK[8,3]. BLK[16,1] is also partitioned into a group of blocks BLK[8,4] to BLK[8,7], etc.

[0028] Return to Figure 2In a partitioned CU 122, where the CU is recursively partitioned into pixel blocks of decreasing size from the top to the bottom of the partitioned hierarchy, such that each block at a non-bottom level is represented by four smaller blocks at the next lower level, at box 222, the palette table generator 110 sets the currently being processed level as the bottom level of the partitioned hierarchy and generates a separate palette table for each block at the lowest level of the partitioned hierarchy. In at least one embodiment, the palette generation process for each block at the lowest level includes performing histogram collection on the pixels in each block based on pixel color merging to generate a corresponding histogram of the pixel colors present in the pixels of the block, and then selecting a subset of X of the presented pixel colors as the palette colors of the corresponding palette table based on the size of the corresponding cell (i.e., the number of pixel colors falling within each cell). The value X is optional or otherwise programmable and is typically selected based on various parameters, including minimum block size, coding efficiency, coding bit rate, etc. For example, palette tables are typically limited to sixteen or fewer palette colors, with 8 or 16 (i.e., X=8 or X=16) being common configurations. Therefore, in Figure 3 In the exemplary partition hierarchy 300, the palette table generator 110 performs sorting and other operations for histogram analysis on each of the sixty-four 8×8 pixel blocks at the bottom level (level 4) to generate 64 separate histograms and generate 64 separate palette tables from these 64 separate histograms, each palette table including, for example, up to 16 indexed palette colors.

[0029] Subsequently, at box 224, the palette table generator 110 moves up one level (i.e., the current level being processed is set as the next higher level). At box 226, the palette table generator 110 selects the block at the current level being processed based on a specified selection order (e.g., horizontal scan or vertical scan). At box 228, the palette table generator 110 generates a palette table for the selected block at the current level based on the palette colors of the palette tables generated for a group of blocks at the previous (or lower) level corresponding to the selected block at the current level. In at least one implementation, a palette table is generated for the selected block at the current level by combining the palette colors of lower-level blocks into a set of candidate palette colors, then performing histogram collection of that set of candidate palette colors to identify X histogram cells with the most frequently occurring palette colors, and generating a palette table for the selected block at the current level based on the identified X histogram cells to include X palette colors, from the palette tables of the corresponding set of lower-level blocks. For the first iteration of block 228 (for the lowest intermediate level), this requires using the palette colors implemented in the palette tables used for the four lowest-level blocks generated in block 222. For subsequent iterations (for higher intermediate levels or the top level), this requires using the palette colors implemented in the palette tables used for the four next lower-level blocks generated in the previous iteration of block 228. Therefore, it should be understood that instead of performing histogram collection on all pixels of the CU represented by the selected block at the current level, histogram collection is performed only on the palette colors of the palette tables of lower-level blocks, which in turn integrates the palette colors of the palette tables of lower-level blocks at higher levels of the partitioned hierarchy. Thus, compared to conventional full-pixel histogram analysis methods, this recursive method requires significantly fewer operations to generate histograms and therefore palette tables for J×J blocks of pixels.

[0030] If a palette table has been generated for the selected blocks at the current level, at box 230, the palette table generator 110 determines whether a separate palette table has been generated for each block at the current level. If not, another iteration of the block selection and per-block palette table generation process in boxes 226, 228, and 230 is performed for the next block of the CU at the current partition level. Otherwise, if all blocks at the current partition level have palette tables generated for them, at box 232, the palette table generator 110 determines whether any higher partition levels remain; that is, whether the current level is the top level of the partition hierarchy. If not, the palette table generator 110 returns to box 224 and sets the current level being processed as the next higher level in the partition hierarchy, and then performs another iteration of the block selection and per-block palette table generation process in boxes 226-332 for the current level being processed.

[0031] Otherwise, if the palette table generator 110 has elevated the partition hierarchy of the CU 122 being encoded to the top level, then at 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 candidate palette table. The candidate palette tables requiring the lowest rate-distortion cost to encode the CU 122 are designated as the final palette table 124 for the CU 122, and then the color index map generator 112 uses the final palette table 124 to generate the corresponding color index map 126 for the CU 122, as described above with reference to block 208.

[0032] Now go to Figure 4-1 and Figure 4-2 , Figure 2 Exemplary specific implementations of method 200 use, as follows Figure 3 The exemplary partitioning hierarchy 300 for a 64×64 CU is shown. In this example, each palette table contains up to 16 palette colors (i.e., X = 16). For a 64×64 pixel CU, the lowest partitioning level (level 4) generates a set of four 8×8 blocks for each 16×16 block of the next highest level (level 3). Statistical analysis is performed on each 8×8 block to generate a corresponding histogram of candidate pixel colors, and this histogram is used to identify up to 16 of the most frequently occurring pixel colors in the 8×8 block as the palette colors to be indexed in the palette table for that block. For illustration, Figure 4-1 Histograms 401-0, 401-1, 401-2, and 401-3, respectively, are drawn from blocks BLK[8,0], BLK[8,1], BLK[8,2], and BLK[8,3]. Palette table generator 110 generates palette tables 402-0, 402-1, 402-2, and 401-3, each with up to 16 palette colors, selected based on histograms 401-0, 401-1, 401-2, and 401-3. This same process is performed for each of the other fifteen groups of four 8×8 blocks, resulting in a total of 64 palette tables generated from the 64 8×8 blocks (BLK[8,0] to BLK

[863] ) at the bottom level (level 5) of the partition hierarchy 300.

[0033] Then, at the lowest intermediate level (level 3) of the partition hierarchy 300, the palette table generator 110 generates a partition table for each of the sixteen 16×16 blocks (BLK[16,0] to BLK[16,15]) by integrating four partition tables generated for the four 8×8 blocks at the bottom level corresponding to the second-level blocks. For illustration, in Figure 4-1In this process, the indexed palette colors of each palette table in palette tables 402-0 to 402-3 are combined into a group 403 of up to 64 candidate colors (i.e., up to 16 palette colors per bottom-level palette table * 4 bottom-level palette tables). Palette table generator 110 analyzes this group 403 to generate a histogram 404 (or other clustering) representing the frequency of occurrence of candidate colors in group 403, and then uses up to 16 pixel colors represented in histogram 404 to generate an intermediate palette table 405-0 for the 16×16 block BLK[16,0] at the second level (level 3), which represents the four 8×8 blocks BLK[8,0] to BLK[8,3] at the bottom level. The same process is performed for the other 15 16×16 blocks (BLK

[161] to BLK

[1615] ) at the lowest intermediate level. This yields four intermediate color grading blocks: 405-0, 405-1, 405-2, and 405-3.

[0034] Moving up to the highest intermediate level (level 2) in the partition hierarchy 300, the palette table generator 110 generates a partition table for each of the four 32×32 blocks (BLK[32,0] to BLK[32,3]) by integrating four partition tables generated for the four 16×16 blocks corresponding to the lowest intermediate level (level 3) of the third-level block. For illustration, in Figure 4-1 In this process, the indexed palette colors of each palette table in palette tables 405-0 to 405-3 are combined into a group 406 of up to 64 candidate colors. Palette table generator 110 analyzes this group 406 to generate a histogram 407 (or other clustering) representing the frequency of occurrence of candidate colors in group 406, and then uses up to 16 pixel colors represented in histogram 407 to generate an intermediate palette table 408-0 for the 32×32 block BLK[16,0], which represents the four 8×8 blocks BLK[8,0] to BLK[8,3] at the bottom level. The same process is performed for the other three 32×32 blocks (BLK[32,1] to BLK[32,3]) at the top intermediate level. [Go to...] Figure 4-2 This results in four intermediate color grading panels: 408-0, 408-1, 408-2, and 408-3.

[0035] At this point, the palette table generator 110 has progressed to the highest or top level (level 1) of the partition hierarchy 300 of the CU 122. Therefore, the palette table generator 110 generates a top palette table 412 for the top partition hierarchy by combining palette colors from palette tables 408-0 to 408-3 into a set 409 of up to 64 candidate colors, integrating them into four partition tables 408-0 to 408-3 generated from four 32×32 blocks at the highest intermediate level (level 2). The palette table generator 110 analyzes this set 409 to generate a histogram 410 (or other clustering) representing the frequency of occurrence of candidate colors in the set 409, and then uses up to 16 pixel colors represented in the histogram 410 to generate the top palette table 412.

[0036] As illustrated in the example above, the process of generating the top palette table 412 involves collecting 64 histogram instances over 64 pixel groups, followed by three iterations of collecting histograms of up to 64 candidate palette colors from lower-level palette tables. It should be understood that this has lower computational complexity than the conventional approach of using a single histogram set over a whole group of 4,096 pixels represented in the 64×64 pixel CU of the example above. Furthermore, this hierarchical approach facilitates the selective use of partitions of different sizes to encode the CU more efficiently based on rate distortion analysis of encoding the CU using each palette table at different partition levels. Therefore, 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 for encoding CU 122. Therefore, for each of these candidate palette tables, the coding system 102 can use the candidate palette table to calculate the corresponding rate distortion cost for encoding CU 122, and select the intra-coding pipeline partition size based on which candidate palette table provides the lowest rate distortion cost.

[0037] To illustrate, for an 8×8 intra-frame coding pipeline used to encode CUs, hierarchical partitioning gradually evolves to a single level, where the palette table generated for the 8×8 blocks at this level (e.g., palette table 402-0 for BLK[8,0]) can be used to generate a color index map 411 representing the CU. Similarly, for a 16×16 intra-frame coding pipeline used to encode CUs, the palette table generated for the 16×16 partition level (e.g., palette table 405-0 for BLK[16,0]) can be used to generate a color index map 412 representing the CU. Likewise, for a 32×32 intra-frame coding pipeline used to encode CUs, the palette table generated for the 32×32 partition 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. Figure 4-1 and Figure 4-2 In the example, palette table 412 has the lowest rate distortion cost, and therefore palette table 412 is used as the final palette table 124 for encoding CUs in a 64×64 frame intra-coding pipeline to generate color index map 126.

[0038] As disclosed herein, in some embodiments, a method for encoding an image containing screen content at a source device includes: recursively partitioning a selected portion of the image into a partition hierarchy consisting of multiple levels, wherein the top level of the partition hierarchy has a single block representing an entire group of pixels of the portion, and each level below the top level has four smaller pixel blocks representing a corresponding larger pixel block at the next higher level; at the bottom level of the partition hierarchy, generating a color palette table for each block at the bottom level, the color palette table including pixel colors representing those present in the corresponding block. A set of palette colors; for each successive higher level in the partition hierarchy, generating a palette table for the block at the current level based on palette colors from four palette tables associated with four blocks at the next lower level corresponding to each 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 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 a corresponding segment of an encoded bitstream for output by the source device.

[0039] In one aspect, generating a palette table for each block at the bottom level includes: generating a first histogram representing the frequency of occurrence of merged pixel colors of pixels in the block; and indexing up to a specified number of palette colors in the palette table based on the first histogram. In another aspect, generating a palette for blocks at higher levels in the partitioned hierarchy includes: grouping the palette colors of each palette table of the four lower-level blocks associated with the block at the higher level into a group of candidate pixel colors; generating a second histogram representing the frequency of occurrence of merged candidate pixel colors; and indexing up to the specified number of palette colors in the palette table based on the second histogram. In yet another aspect, generating a palette for blocks at higher levels in the partitioned hierarchy includes: grouping the palette colors of each palette table of the four lower-level blocks associated with the block at the higher level into a group of candidate pixel colors; generating a cluster representing the frequency of occurrence of merged candidate pixel colors; and indexing up to a specified number of palette colors in the palette table based on the cluster.

[0040] In one aspect, the block at the bottom level 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 partition hierarchy is represented by the expression K = P*2^(N-1). In another aspect, selecting the final palette table includes: for each candidate palette table, determining the corresponding rate-distortion cost for encoding the portion of the image using that candidate palette table; and selecting the candidate palette table with the lowest corresponding rate-distortion cost as the final palette table. In yet another aspect, the portion of the image is a coding unit of a coding tree unit.

[0041] In some embodiments, an apparatus for encoding an image containing screen content includes: a palette-pattern encoder configured to: for a selected portion of the image, recursively partition the portion into a partition hierarchy consisting of multiple levels, wherein the top level of the partition hierarchy has a single block representing an entire group of pixels of the portion, and each level below the top level has four smaller pixel blocks representing a corresponding larger pixel block at the next higher level; at the bottom level of the partition hierarchy, generating a palette table for each block of the bottom level, the palette table including representations of the portion... A set of palette colors corresponding to the pixel colors present in the block; for each successive higher level in the partition hierarchy, generating a palette table for the block at the current level based on the palette colors from four palette tables associated with four blocks at the next lower level corresponding to each block at the current level; selecting a final palette table from the palette tables generated from the plurality of levels of the partition 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 a corresponding segment of an encoded bitstream.

[0042] In one aspect, the palette pattern encoder is configured to generate a palette table for each block at the bottom level by the following steps: generating a first histogram representing the frequency of occurrence of merged pixel colors of the pixels in the block; and indexing up to a specified number of palette colors in the palette table based on the first histogram. In another aspect, the palette pattern encoder is configured to generate a palette table for blocks at higher levels in the partitioned hierarchy by the following steps: grouping the palette colors of each palette table of the four lower-level blocks associated with the block at the higher level into a candidate pixel color; generating a second histogram representing the frequency of occurrence of merged candidate pixel colors; and indexing up to the specified number of palette colors in the palette table based on the second histogram.

[0043] In one aspect, the palette pattern 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 the four lower-level blocks associated with the block at the higher level into candidate pixel colors; generating a cluster representing the frequency of occurrence of the merged candidate pixel colors; and indexing up to a specified number of palette colors in the palette table based on the cluster. In another aspect, the palette pattern encoder selects the final palette table by: for each candidate palette table, determining a corresponding rate distortion cost for encoding that portion of the image using that candidate palette table; and selecting the candidate palette table with the lowest corresponding rate distortion cost as the final palette table. In yet another aspect, the palette pattern encoder includes at least one processor and a memory for storing a set of instructions executable by the at least one controller.

[0044] In some implementations, a method for encoding an image containing screen content at a source device includes: generating a palette table for each of a plurality of partitions in a partition hierarchy of a selected portion of the image by recursively using palette colors selected from a palette table of smaller partitions of the portion of the image as candidate colors for larger partitions of the portion of the image; generating a color index map for the portion of the image based on the palette table selected from the palette table generated for the portion of the image; and encoding a representation of the portion of the image using the selected palette table and the color index map to generate corresponding segments of an encoded bitstream for output by the source device. In another aspect, generating a palette table for the smallest partition of the portion of the image includes: generating a first histogram representing the frequency of occurrence of merged pixel colors of the pixels in the smallest partition; and indexing the palette table by selecting up to a specified number of palette colors based on the first histogram. In another aspect, generating a palette table for the partitions of this part other than the smallest partition includes: grouping the palette colors of each palette table of the associated next smaller partition into a group of candidate pixel colors; generating a second histogram representing the frequency of occurrence of the merged candidate pixel colors; and indexing up to the specified number of palette colors in the palette table based on the second histogram.

[0045] In one aspect, the selected palette table is selected by the following steps: for each candidate palette table, determining the corresponding rate-distortion cost for encoding that portion of the image using that candidate palette table; and selecting the candidate palette table with the lowest corresponding rate-distortion cost as the selected palette table. In another aspect, that portion of the image is a coding unit of a coding tree unit.

[0046] In some embodiments, an apparatus for encoding an image containing screen content includes: a palette-pattern encoder configured to: generate a palette table for each of a plurality of partitions in a partition hierarchy of a selected portion of the image by recursively using palette colors selected from a palette table for a set of smaller partitions of the image as candidate colors for larger partitions of the image; generate a color index map for the portion of the image based on the palette table selected from the palette table generated for the portion of the image; and encode a representation of the portion of the image using the selected palette table and the color index map to generate corresponding segments of an encoded bitstream for output by the apparatus.

[0047] In one aspect, the palette pattern encoder is configured to generate a palette table for the smallest partition of the portion of the image by the following steps: generating a first histogram representing the frequency of occurrence of merged pixel colors of the pixels in the smallest partition; and indexing up to a specified number of palette colors in the palette table based on the first histogram. In another aspect, the palette pattern encoder is configured to generate a palette table for partitions of the portion other than the smallest partition by the following steps: grouping the palette colors of each palette table of the associated next smaller partition into a group of candidate pixel colors; generating a second histogram representing the frequency of occurrence of merged candidate pixel colors; and indexing up to the specified number of palette colors in the palette table based on the second histogram.

[0048] In one aspect, the palette pattern encoder is configured to select a selected palette table by the following steps: for each candidate palette table, determining a corresponding rate distortion cost for encoding that portion of the image using that candidate palette table; and selecting the candidate palette table with the lowest corresponding rate distortion cost as the selected palette table. In another aspect, the palette pattern encoder includes at least one processor and a memory for storing a set of instructions executable by the at least one controller.

[0049] In some implementations, the above systems and technologies are implemented using one or more integrated circuit (IC) devices (also known as integrated circuit packages or microchips), such as those referenced above. Figure 1 and Figure 4-2The described coding system 102. Electronic design automation (EDA) and computer-aided design (CAD) software tools can be used in the design and manufacture of these IC devices. These design tools are typically represented as one or more software programs. One or more software programs include code executable by a computer system to manipulate the computer system to operate on code representing circuitry of one or more IC devices to perform at least a portion of a process for designing or adapting a manufacturing system to manufacture the circuitry. The code may include instructions, data, or a combination of instructions and data. Software instructions representing 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 the design or manufacture of the IC device may be stored in and accessed from the same or different computer-readable storage media.

[0050] Computer-readable storage media may include any non-transitory storage medium or a combination of non-transitory storage media that can be accessed 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., optical discs (CDs), digital versatile optical discs (DVDs), Blu-ray discs), magnetic media (e.g., floppy disks, magnetic tapes, or magnetic hard disks), volatile memory (e.g., random access memory (RAM) or cache), non-volatile memory (e.g., read-only memory (ROM) or flash memory), or microelectromechanical systems (MEMS) based storage media. Computer-readable storage media may be embedded in a computing system (e.g., system RAM or ROM), fixedly attached to a computing system (e.g., a magnetic hard disk), removably attached to a computing system (e.g., an optical disc or a flash memory based on a universal serial bus (USB)), or coupled to a computer system via a wired or wireless network (e.g., a network accessible storage device (NAS)).

[0051] In some implementations, certain aspects of the above-described techniques are implemented by one or more processors of a processing system executing the software. The software includes one or more sets of executable instructions stored or otherwise tangibly embodied on a non-transitory computer-readable storage medium. The software may include instructions and certain data that, when executed by one or more processors, manipulate one or more processors to perform one or more aspects of the above-described techniques. The non-transitory computer-readable storage medium may include, for example, disk or optical disc storage devices, solid-state storage devices such as flash memory, cache memory, random access memory (RAM), or one or more other non-volatile memory devices. The executable instructions stored on the non-transitory computer-readable storage medium may be source code, assembly language code, object code, or another instruction format interpreted or otherwise executed by one or more processors.

[0052] It should be noted that not all activities or elements described above in the general description are essential. A particular activity or part of the apparatus may not be essential, and one or more additional activities may be performed, or elements may be included in addition to those described. Furthermore, the order in which the activities are listed is not necessarily the order in which they are performed. Additionally, these concepts have been described with reference to specific embodiments. However, those skilled in the art will understand that various modifications and changes may be made without departing from the scope of this disclosure as set forth in the following claims. Therefore, the specification and drawings are to be considered illustrative rather than restrictive, and all such modifications are intended to be included within the scope of this disclosure.

[0053] The benefits, other advantages, and solutions to problems have been described above with respect to specific embodiments. However, the benefits, advantages, solutions to problems, and any features that may lead to or make any benefit, advantage, or solution appear or become more significant should not be construed as key, essential, or fundamental features of any or all claims. Furthermore, the specific embodiments disclosed above are merely illustrative, as the disclosed subject matter can be modified and practiced in different but equivalent ways that will be apparent to those skilled in the art who benefit from the teachings herein. No limitation is intended on the details of the constructions or designs shown herein, except as described in the following claims. Therefore, it will be apparent that the specific embodiments disclosed above can be altered or modified, and all such changes are considered to be within the scope of the disclosed subject matter. Therefore, the protection sought herein is set forth in the following claims.

Claims

1. A method for encoding an image containing screen content at a source device, the method comprising: For a selected portion of the image, the portion is recursively partitioned into a partition hierarchy consisting of multiple levels, wherein the top level of the partition hierarchy has a single block representing all pixel groups of the portion, and each level below the top level has four smaller pixel blocks representing the corresponding larger pixel block at the next higher level. At the bottom level of the partition hierarchy, a palette table is generated for each block at the bottom level. The palette table includes a set of palette colors representing the pixel colors present in the corresponding block. For each successive higher level in the partition hierarchy, a palette table is generated for the block at the current level by selecting a palette color for the palette table based on the palette colors from four palette tables associated with four blocks at the next lower level corresponding to each block at the current level. Select the final color palette table from the color palette tables generated for the multiple levels of the partition hierarchy; A color index map is generated for the portion of the image based on the final color palette table; as well as The representation of the portion of the image is encoded using the final color palette table and the color index map to generate corresponding segments of the encoded bitstream for output by the source device.

2. The method of claim 1, wherein generating a palette table for each block at the bottom level comprises: Generate a first histogram representing the frequency of occurrence of the merged pixel colors of the pixels in the block; as well as Based on the first histogram, select up to a specified number of palette colors in the palette table for indexing.

3. The method of claim 2, wherein generating a palette for blocks at higher levels in the partition hierarchy comprises: Group the palette colors of each palette table of the four lower-level blocks associated with the higher-level block into a set of candidate pixel colors; Generate a second histogram representing the frequency of occurrence of colors in the candidate pixels to be merged; as well as Based on the second histogram, up to the specified number of palette colors are selected and indexed in the palette table.

4. The method according to any one of the preceding claims, wherein generating a palette for blocks at higher levels in the partition hierarchy comprises: Group the palette colors of each palette table of the four lower-level blocks associated with the higher-level block into a set of candidate pixel colors; Generate clusters representing the frequency of occurrence of colors in candidate pixels to be merged; and Based on the clustering, select up to a specified number of palette colors in the palette table for indexing.

5. The method according to any one of claims 1-3, wherein: The block at the bottom level has a block size of P×P pixels; The portion of the image has a size of K×K pixels; as well as The number of levels N in the partition hierarchy is given by the expression K = P. 2^(N-1) represents this.

6. The method according to any one of claims 1-3, wherein selecting the final palette table comprises: For each candidate palette table, determine the corresponding rate distortion cost for encoding the portion of the image using the candidate palette table; as well as The candidate palette table with the lowest corresponding distortion cost is selected as the final palette table.

7. The method according to any one of claims 1-3, wherein the portion of the image is a coding unit of a coding tree unit.

8. An apparatus for encoding an image containing screen content, the apparatus comprising: A palette-mode encoder, wherein the palette-mode encoder is configured to: For a selected portion of the image, the portion is recursively partitioned into a partition hierarchy consisting of multiple levels, wherein the top level of the partition hierarchy has a single block representing all pixel groups of the portion, and each level below the top level has four smaller pixel blocks representing the corresponding larger pixel block at the next higher level. At the bottom level of the partition hierarchy, a palette table is generated for each block at the bottom level. The palette table includes a set of palette colors representing the pixel colors present in the corresponding block. For each successive higher level in the partition hierarchy, a palette table is generated for the block at the current level by selecting a palette color for the palette table based on the palette colors from four palette tables associated with four blocks at the next lower level corresponding to each block at the current level. Select the final color palette table from the color palette tables generated for the multiple levels of the partition hierarchy; A color index map is generated for the portion of the image based on the final color palette table; as well as The representation of the portion of the image is encoded using the final color palette table and the color index map to generate corresponding segments of the encoded bitstream.

9. The apparatus of claim 8, wherein the palette pattern encoder is configured to generate a palette table for each block of the bottom hierarchy by means of the following steps: Generate a first histogram representing the frequency of occurrence of the merged pixel colors of the pixels in the block; and Based on the first histogram, select up to a specified number of palette colors in the palette table for indexing.

10. The apparatus of claim 9, wherein the palette pattern encoder is configured to generate a palette table for blocks at higher levels in the partition hierarchy by the following steps: Group the palette colors of each palette table of the four lower-level blocks associated with the higher-level block into a set of candidate pixel colors; Generate a second histogram representing the frequency of occurrence of colors in the candidate pixels to be merged; as well as Based on the second histogram, up to the specified number of palette colors are selected and indexed in the palette table.

11. The device according to any one of claims 8-10, wherein the palette pattern encoder is configured to generate a palette table for blocks at higher levels in the partition hierarchy by the following steps: Group the palette colors of each palette table of the four lower-level blocks associated with the higher-level block into a set of candidate pixel colors; Generate clusters representing the frequency of occurrence of colors in candidate pixels to be merged; and Based on the clustering, select up to a specified number of palette colors in the palette table for indexing.

12. The device according to any one of claims 8-10, wherein the palette pattern encoder selects the final palette table by means of the following steps: For each candidate palette table, determine the corresponding rate distortion cost for encoding the portion of the image using the candidate palette table; and The candidate palette table with the lowest corresponding distortion cost is selected as the final palette table.

13. The device according to any one of claims 8-10, wherein the palette pattern encoder includes at least one processor and a memory for storing a set of instructions executable by the at least one controller.

14. A method for encoding an image containing screen content at a source device, the method comprising: A palette table is generated for each of the multiple partitions of the portion of the image, which includes a hierarchical partitioning structure, by recursively using palette colors selected for a set of smaller partitions of a selected portion of the image as candidate colors for the larger partitions of the portion of the image. A color index map is generated for the portion of the image based on a color palette table selected from the color palette table generated for the portion of the image; as well as The representation of the portion of the image is encoded using the selected palette table and the color index map to generate corresponding segments of the encoded bitstream for output by the source device.

15. The method of claim 14, wherein generating a palette table for the minimum partitions of said portion of the image comprises: Generate a first histogram representing the frequency of occurrence of the merged pixel colors of the pixels in the smallest partition; as well as Based on the first histogram, select up to a specified number of palette colors in the palette table for indexing.

16. The method of claim 15, wherein generating a palette table for the partitions of the portion other than the minimum partition comprises: Group the palette colors of each palette table in the associated next smaller partition into a set of candidate pixel colors; Generate a second histogram representing the frequency of occurrence of colors in the candidate pixels to be merged; as well as Based on the second histogram, up to the specified number of palette colors are selected and indexed in the palette table.

17. The method according to any one of claims 14-16, wherein the selected palette table is selected by the following steps: For each candidate palette table, determine the corresponding rate distortion cost for encoding the portion of the image using the candidate palette table; and The candidate palette table with the lowest corresponding distortion cost is selected as the selected palette table.

18. The method according to any one of claims 14-16, wherein the portion of the image is a coding unit of a coding tree unit.

19. An apparatus for encoding an image containing screen content, the apparatus comprising: Palette pattern encoder, the palette pattern encoder being configured to: A palette table is generated for each of the multiple partitions of the portion of the image, which includes a hierarchical partitioning structure, by recursively using palette colors selected for a set of smaller partitions of a selected portion of the image as candidate colors for the larger partitions of the portion of the image. A color index map is generated for the portion of the image based on a color palette table selected from the color palette table generated for the portion of the image; as well as The representation of the portion of the image is encoded using the selected color palette table and the color index map to generate corresponding segments of the encoded bitstream for output by the device.

20. The apparatus of claim 19, wherein the palette pattern encoder is configured to generate a palette table for the minimum partitions of the portion of the image by means of the following steps: Generate a first histogram representing the frequency of occurrence of the merged pixel colors of the pixels in the smallest partition; and Based on the first histogram, select up to a specified number of palette colors in the palette table for indexing.

21. The device of claim 20, wherein the palette pattern encoder is configured to generate a palette table for the portion other than the minimum partition by the following steps: Group the palette colors of each palette table in the associated next smaller partition into a set of candidate pixel colors; Generate a second histogram representing the frequency of occurrence of colors in the candidate pixels to be merged; as well as Based on the second histogram, up to the specified number of palette colors are selected and indexed in the palette table.

22. The device according to any one of claims 19-21, wherein the palette pattern encoder is configured to select a selected palette table by means of the following steps: For each candidate palette table, determine the corresponding rate distortion cost for encoding the portion of the image using the candidate palette table; and The candidate palette table with the lowest corresponding distortion cost is selected as the selected palette table.

23. The device according to any one of claims 19-21, wherein the palette pattern encoder includes at least one processor and a memory for storing a set of instructions executable by the at least one controller.

Citation Information

Patent Citations

  • Methods for palette coding of image and video data

    US10390028B2

  • Scaled image generating apparatus and method, image feature calculating apparatus and method, computer programs therefor, and image data structure

    US20030026476A1