System and method for generating a palette table
By using a parallel histogram calculation method, the bits of the pixel component values are divided into two groups, and the histograms of the most significant bit and the least significant bit are calculated separately. A combined histogram is generated to derive the palette table, which solves the problem of excessive storage requirements in palette decoding and achieves efficient memory utilization.
Patent Information
- Application Number
- CN202080063432.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-09-30
- Filing Date
- 2020-09-30
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2040-09-30
AI Technical Summary
Existing palette decoding technology requires storage that increases exponentially with pixel depth when calculating histograms, resulting in excessive memory requirements.
A parallel histogram calculation method is adopted, which divides the bits of the pixel component values into two groups, calculates the histograms of the most significant bit and the least significant bit respectively, selects the top bars in parallel, and generates a combined histogram to derive the color palette table.
It reduces memory requirements, improves memory utilization efficiency, and reduces the storage pressure on the computing system for high-bit depth video.
Smart Images

Figure CN114365493B_ABST
Abstract
Description
Background Technology
[0001] Description of related technologies
[0002] Palette decoding is used in several video compression standards (e.g., the High Efficiency Video Decoding (HEVC) standard and the Alliance for Open Media Video 1 (AV1) decoding standard) to improve the compressibility of video data. Palette decoding involves calculating and sorting histograms to determine candidate palette levels. The storage size required for histogram calculations used for palette table derivation grows exponentially with pixel bit depth. As used herein, the term "palette table" is defined as a data structure that stores multiple entries, where each entry stores an index mapped to a pixel component value. For 8-bit, 10-bit, and 12-bit video, the number of histogram bars required by conventional palette decoding techniques are 256, 1024, and 4096, respectively. Attached Figure Description
[0003] The advantages of the methods and mechanisms described herein can be better understood by referring to the following description in conjunction with the accompanying drawings, in which:
[0004] Figure 1 It is a block diagram of one implementation method of a computing system.
[0005] Figure 2 It is a graph of the image and the corresponding pixel distribution.
[0006] Figure 3 It is a computer-generated image of the screen content and its corresponding pixel distribution.
[0007] Figure 4 This is a block diagram of one implementation of an encoder coupled to memory.
[0008] Figure 5 This shows a sample histogram of a given block based on one implementation.
[0009] Figure 6 This shows a sample histogram extracted from a given pixel block according to one implementation.
[0010] Figure 7 A diagram showing the selection of candidate bars extracted from the top according to one implementation method.
[0011] Figure 8 It is a diagram of one implementation of the bitwise representation of pixel components.
[0012] Figure 9 This is a flowchart illustrating an implementation of a method for performing palette table pattern encoding in a memory-efficient manner.
[0013] Figure 10This is a flowchart outlining an implementation of a method for calculating multiple histograms used to generate a palette table.
[0014] Figure 11 This is a flowchart outlining an implementation of a method for parallel generation of histograms as part of palette table derivation.
[0015] Figure 12 This is a flowchart illustrating an implementation of a method for encoding video / image blocks using a palette table. Detailed Implementation
[0016] Numerous specific details are set forth in the following description to provide a thorough understanding of the methods and mechanisms presented herein. However, those skilled in the art should recognize that various implementations can be practiced without these specific details. In some cases, well-known structures, components, signals, computer program instructions, and techniques have not been shown in detail to avoid obscuring the methods described herein. It should be understood that, for the sake of simplicity and clarity, the elements shown in the figures are not necessarily drawn to scale. For example, the dimensions of some elements may be enlarged relative to other elements.
[0017] This paper discloses various systems, apparatuses, and methods for performing parallel histogram calculations applied to palette table derivation. In one implementation, an encoder calculates a first histogram of a first portion of the pixel component value (i.e., color value) bits of an image or video frame block. The encoder then selects a first number of highest pixel count bars from the first histogram. Furthermore, the encoder calculates a second histogram of a second portion of the pixel component value bits of the block, and selects a second number of highest pixel count bars from the second histogram. In one implementation, the second histogram is calculated in parallel with the first histogram. A third histogram is calculated from a concatenation of bits allocated to the first number of bars and bits allocated to the second number of bars, and highest pixel count bars are selected from the third histogram. A palette table is derived based on these highest pixel count bars selected from the third histogram, and the block is encoded using the palette table. By using a parallel multi-histogram method, memory requirements are reduced compared to conventional palette table derivation techniques.
[0018] In one implementation, the bits of a given pixel component are divided into two groups for parallel operation. The first group consists of “m” most significant bits (MSBs), and the second group consists of “n” least significant bits (LSBs), where “m” and “n” are positive integers. A first histogram is computed for the “m” MSBs, and then the top bars are selected from the first histogram. A second histogram is computed for the “n” LSBs, and then the top bars are selected from the second histogram. A third histogram is computed for the concatenation of the bits assigned to the top bars from the first histogram and the bits assigned to the top bars from the second histogram. For example, if “101” is assigned to the top bar from the first histogram and “001” is assigned to the top bar from the second histogram, then the third histogram will include the bar “101001”. In this example, it is assumed that the given pixel component has a pixel bit depth of six bits. In other implementations, other pixel bit depths may be used. The third histogram includes all permutations of the top bars from the first histogram and the top bars from the second histogram. The top bars from the third histogram are then selected and used for the palette table derivation. It should be noted that the values of "m" and "n", the number of top bars selected, and the number of histograms calculated are flexible and can vary depending on the implementation. These values are adjusted based on a trade-off between a simple hardware implementation and performance.
[0019] Now for reference Figure 1 This diagram illustrates a block diagram of one implementation of a computing system 100. In one implementation, the computing system 100 includes at least an encoder 105, a processor 110, an input / output (I / O) interface 120, a bus 125, and a memory device 130. In other implementations, the computing system 100 may include other components, and / or the computing system 100 may be arranged differently. In one implementation, the encoder 105 includes logic and / or processing elements for implementing a video codec. The video codec encodes an uncompressed video stream and / or decodes a compressed video stream. In one implementation, the video codec operates according to one or more video compression standards. It should be noted that, as used herein, the terms “encoder” and “video codec” may refer to a video / image decoder, a video / image encoder, or a video codec. Encoder 105 represents any suitable hardware and / or software combination. Although encoder 105 is shown as a separate unit from processor 110, it should be understood that part or all of encoder 105 may be executed or implemented on processor 110.
[0020] Processor 110 represents any number and type of processing unit (e.g., Central Processing Unit (CPU), Graphics Processing Unit (GPU), Digital Signal Processor (DSP), Field Programmable Gate Array (FPGA), Application-Specific Integrated Circuit (ASIC)). In one implementation, some of the processing associated with encoder 105 is performed by processor 110. Memory device 130 represents any number and type of memory device. For example, the type of memory in memory device 130 may include Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), NAND Flash Memory, NOR Flash Memory, Ferroelectric Random Access Memory (FeRAM), or other memory. Memory device 130 can be accessed by encoder 105 and processor 110. I / O interface 120 represents any number and type of I / O interface (e.g., Peripheral Component Interconnect (PCI) bus, PCI Expansion (PCI-X), PCIe (PCI High Speed) bus, Gigabit Ethernet (GBE) bus, Universal Serial Bus (USB)). Various types of peripheral devices can be coupled to I / O interface 120. Such peripheral devices include (but are not limited to) monitors, keyboards, mice, printers, scanners, joysticks or other types of game controllers, media recording devices, external storage devices, network interface cards, etc.
[0021] In various implementations, computing system 100 is a computer, laptop computer, mobile device, game console, server, graphics card, system-on-a-chip, integrated circuit, streaming media device, wearable device, any part of these devices or systems, or any other type of computing system or device or part thereof. It should be noted that the number of components in computing system 100 varies depending on the implementation. For example, in other implementations, each component may have more or fewer components. Figure 1 The quantities shown are as indicated. It should also be noted that in other implementations, the computing system 100 includes... Figure 1 Other components not shown. Additionally, in other implementations, the computing system 100 is coupled with... Figure 1 The different ways of structuring are shown.
[0022] Turn now Figure 2 The diagram shows image 205 and the corresponding pixel distribution 210. Figure 2 The image 205 shown is the well-known Lena image, which is widely used as a test image in image processing. Figure 2 The bottom shows the pixel distribution 210 of this 64x64 Lena image 205. Pixel distribution 210 shows how the pixels in image 205 are distributed across different pixel values. Continuous tones, as shown in pixel distribution 210, are common in natural images or video frames captured by a camera.
[0023] Now for reference Figure 3 The diagram illustrates a computer-generated screen content image 305 and its corresponding pixel distribution 310. Image 305 is an example of a computer-generated screenshot, and pixel distribution 310 shows how a narrow pixel distribution exists at a relatively small number of pixel levels (i.e., pixel component values). As shown in the pixel distribution, image 305 includes a limited number of different colors. This is a common distribution type for computer-generated screen content, and for these types of computer-generated images, palette decoding is an efficient way to encode these images to achieve a high compression ratio. Other types of images besides computer-generated screenshots can also benefit from palette decoding.
[0024] Turn now Figure 4 This diagram illustrates a block diagram of one implementation of an encoder 405 coupled to a memory 430. In one implementation, the encoder 405 includes control logic 410 having a group controller 415, a selection unit 420, and a palette table generation unit 425. In another implementation, the encoder 405 is implemented by a processor that executes program instructions, and in this implementation, the group controller 415, the selection unit 420, and the palette table generation unit 425 are implemented by program instructions rather than by control logic. In other implementations, the group controller 415, the selection unit 420, and the palette table generation unit 425 are implemented using a combination of hardware and software.
[0025] Encoder 405 is coupled to memory 430, which represents any number and type of memory device. In one implementation, memory 430 stores video frames to be encoded by encoder 405. Video block 435 represents one of the blocks of this video frame. The techniques used to encode video block 435 can be used for other blocks of video frames and other video frames in a video sequence. Alternatively, video block 435 can be a single block of an image. In one implementation, video block 435 is stored in memory 430 as multiple pixel component values. As part of the encoding process, block controller 415 creates a first group histogram 440A from a first subset of the pixel component values of video block 435. In one implementation, the first subset is some MSBs of the pixel component values. In one implementation, block controller 415 creates a separate first group histogram 440A for each individual pixel component (e.g., red, green, blue). To create the first group histogram 440A, block controller 415 defines multiple bars corresponding to all the different possible bit values of the first subset. Next, the group controller 415 calculates how many pixel component values from video block 435 fall into each stripe. For example, in one implementation, the group controller 415 retrieves the pixel component values of video block 435, and then assigns each pixel component value to its corresponding stripe. In one implementation, a counter is used for each stripe, and the counter increments each time a pixel is assigned to the corresponding stripe.
[0026] In one implementation, each bar of the first group histogram 440A represents a range of pixel component values corresponding to a given number of MSBs. The given number of MSBs may vary depending on the implementation. For example, in one implementation, each bar of the first group histogram 440A represents a range corresponding to four MSBs out of a total of eight bits per pixel component value. By using fewer bits to generate the bars of the first group histogram 440A, the storage requirement for storing the first group histogram 440A in memory 430 is reduced. For example, if four MSBs out of eight bits are used to generate the first group histogram 440A, only 16 bars are created compared to the 256 bars created using all eight bits. In this example, each pixel component value is assigned to its corresponding bar by the group controller 415 based on four MSBs of the value.
[0027] After generating the first group histogram 440A and storing it in memory 430, the selection unit 420 sorts the bars of the first group histogram 440A. For example, the bars are sorted from highest to lowest based on how many pixel values fall into each bar. Then, the selection unit 420 selects a given number of bars with the most pixel values. For example, in one implementation, the selection unit 420 selects the eight bars with the most pixel values. In other implementations, the selection unit 420 selects another number of bars with the highest pixel count (i.e., the highest number of pixel values) from all the bars in the first group histogram 440A. A second bit-group histogram 440B is generated in parallel with the computation of the first group histogram 440A for a second subset of the pixel component value bits. For example, in one implementation, the second bit-group histogram 440B is computed using four LSBs. Similar to the first group histogram 440A, the bars of the second bit-group histogram 440B are sorted based on how many pixel values fall into each bar. Then, the top bars are selected based on the pixel value count. The number of top bars selected varies depending on the implementation. In one implementation, the selection unit 420 selects the top eight bars from the second bit group histogram 440B.
[0028] In one implementation, the top bars selected from the first bit group histogram 440A are combined with the top bars selected from the second bit group histogram 440B to generate a combined bit group histogram 440C. For example, in one implementation, the MSBs assigned to the top bars from the first bit group histogram 440A are concatenated with the LSBs assigned to the top bars from the second bit group histogram 440B to form bars in the combined bit group histogram 440C. The number of pixels falling into each bar is calculated, and then the top bars are selected based on the pixel count. The palette table generation unit 425 uses these top bars to derive a palette table 450, which is used to encode video blocks 435 to create encoded blocks 455. In some cases, if the distribution of pixel values is distributed across a large number of bars, as is typically found in natural (i.e., non-computer-generated) video frames, the encoder 405 will decide not to encode video blocks 435 using the palette mode. Depending on the implementation, a decision to not use palette mode coding can be made after generating the first bit group histogram 440A, the second bit group histogram 440B, or the combined bit group histogram 440C. Analysis of one or more of these histograms 440A-C can determine whether palette mode coding is suitable for video block 435. Without using palette mode coding, video block 435 can be encoded using any of a variety of other conventional coding techniques.
[0029] It should be noted that the above process can be performed on the entire video frame or a portion thereof. Furthermore, the palette table generated for the entire video frame can be used to encode subsequent video frames in the video stream. It should also be noted that video block 435 can be an image block in another implementation. It should be understood that dividing control logic 410 into group controller 415, selection unit 420, and palette table generation unit 425 indicates only one implementation. In another implementation, a single control unit can perform the functions of group controller 415, selection unit 420, and palette table generation unit 425. In other implementations, other methods of dividing control logic 410 into separate units can be deployed.
[0030] In one implementation, the encoded block 455 includes an encoded version of a palette table 450 and a color index map having index values that map the pixels of the video block 435 to the palette table 450. The palette table 450 represents any number of palette tables used to encode the pixel components of the video block 435. For example, in one implementation, the palette table 450 includes a first table for the red component, a second table for the green component, and a third table for the blue component. In another implementation, the palette table 450 is a single table representing combinations of different pixel components. The generated color index map can be encoded using any suitable encoding technique. For example, in one implementation, run-length encoding is used to encode the individual index values. Other methods for encoding the individual index values are possible and are considered.
[0031] Now for reference Figure 5 This illustrates one implementation of a sample histogram 500 for a given block. Histogram 500 is an example of a histogram with 64 distinct bars corresponding to 64 possible pixel levels. As used herein, the term "histogram" is defined as the frequency of occurrence of each pixel component value of a given block of an image / frame. It should be noted that a block may be more generally referred to as a "decoding unit," where the size of the decoding unit varies depending on the implementation. In one implementation, the decoding unit is an 8x8 pixel block. In another implementation, the decoding unit is the entire image / frame. In still other implementations, the decoding unit can be other sizes and / or arrangements of pixels. The example distribution of histogram 500 is shown for illustrative purposes only. The Y-axis measures the number of pixels in a given block that have a corresponding pixel level. For the purposes of this discussion, it is assumed that a given block has multiple pixels and each pixel has a value for each of one or more channels (e.g., red, green, blue).
[0032] To generate histogram 500, 64 individual bars need to be stored. For other histograms with different bit depths for each pixel component, an additional number of bars will be needed when generating the histogram for each possible pixel level. For example, for a 10-bit pixel component, 1024 bars will be needed. For a 12-bit pixel component, 4096 bars will be needed. The storage requirement increases exponentially with the number of bits per pixel component level (i.e., pixel bit depth). However, using the technique proposed in this paper, the storage requirement for generating histograms for high bit depth video is significantly reduced.
[0033] Turn now Figure 6 The diagram shows one implementation of a sample histogram 600 extracted from a given pixel block. Figure 6 The discussion comes from Figure 5 Continuing the discussion of histogram 500, histogram 600 includes the same pixel distribution at the pixel component level as shown in histogram 500, except that each bar now contains multiple pixel component levels. Therefore, histogram 600 has a reduced number of bars by evaluating only a subset of the bits for each pixel.
[0034] As shown in histogram 600, each rectangle is a middle bar, which is a set of four bars. In this example, histogram 600 evaluates the four most significant bits (MSB) of the pixel component values. Using only the four MSBs corresponds to a total of 16 bars. This helps to optimize the 64 bars (used for...) Figure 5 The storage requirement for histogram 500 is reduced to 16 bars for histogram 600. In other implementations, the first histogram can evaluate other numbers of MSBs. In one implementation, when the first histogram 600 is generated for the MSBs, a second histogram (not shown) is generated for the LSBs.
[0035] Now for reference Figure 7 The diagram illustrates one implementation of selecting candidate bars from the top of a sample histogram. Figure 7 The discussion comes from Figure 6Continuing the discussion of histogram 600. After creating candidate bars based on the subset of pixel MSBs shown in histogram 600, the top four candidate bars with the highest pixel counts are selected. These four selected extracted candidate bars 705A-D are shown as vertical rectangles in histogram 700. It should be understood that selecting the top four extracted candidate bars 705A-D only indicates one implementation. In other implementations, another number (e.g., 2, 8) of top extracted candidate bars can be selected from the extracted histogram. In one implementation, the top four extracted candidate bars 705A-D are selected for the first histogram while the top four extracted candidate bars 705A-D are selected for the second histogram. Next, these top bars from the two histograms are combined to form a third histogram. Then, the top bars from the third histogram are selected and used to derive the palette table.
[0036] Turn now Figure 8 The diagram illustrates one implementation of the bits of pixel component 800. Pixel component 800 represents any number of bits used to store one of the different color values in a specific color space of a source image or video frame. For example, in one implementation, three separate instances of pixel component 800 are used to encode the red, green, and blue color values of each pixel in the red, green, and blue (RGB) color space. Alternatively, in another implementation, three separate instances of pixel component 800 store the luminance and chrominance values of each pixel in the YUV color space. In other implementations, pixel component 800 may encode each pixel component value of the pixel in other types of color spaces. More generally, pixel component 800 may be referred to as an index of the color space.
[0037] In one implementation, a first histogram of pixel blocks in an image / frame is calculated using Group 1 bits of pixel component 800 while excluding Group 2 bits of pixel component 800. As shown, Group 1 bits consist of six bits, but it should be understood that this only indicates one implementation. Top candidate bars are selected from the first histogram, with the number of selected top candidate bars varying depending on the implementation. In parallel with the calculation of the first histogram, a second histogram of pixel blocks is calculated using Group 2 bits of pixel component 800 while excluding Group 1 bits of pixel component 800. As shown, Group 2 bits consist of six bits, but it should be understood that this only indicates one implementation. Similar to the first histogram... Figure 1 Similarly, top candidate bars are selected from the second histogram, where the number of top candidate bars selected varies depending on the implementation.
[0038] Next, a third histogram is calculated using all bits of the pixel component 800, but only for the top candidate bars selected during the first and second histograms. Each bar selected from the first histogram is combined with bars from the second histogram to create bars for the third histogram. The top bars from the third histogram are selected and used to derive the color palette table. This color palette table is then used to encode image / video blocks.
[0039] Now for reference Figure 9 This illustrates one implementation of a method 900 for performing palette table pattern encoding in a memory-efficient manner. For discussion purposes, the steps in this implementation are shown in sequential order. Figures 10 to 12 The steps are as follows. However, it should be noted that in various implementations of the described method, one or more of the described elements may be performed simultaneously, in a different order than shown, or completely omitted. Additional elements may also be performed as needed. Any of the various systems or devices described herein is configured to implement method 900.
[0040] The encoder computes multiple histograms (box 905) for a given subset of pixel components of a pixel block in an image or video frame. Figure 10 Method 1000 and Figure 11 An example of how to implement box 905 is described in method 1100. Other techniques for implementing box 905 may also be used. Next, the encoder identifies a given number of most frequent pixel component values for a given pixel component of the block's pixels based on multiple histograms (box 910). Then, the encoder derives a palette table from the given number of most frequent pixel component values (box 915). Next, the encoder encodes the given pixel components of the block's pixels based on the palette table (box 920). After box 920, method 900 ends. It should be noted that method 900 can be repeated for each individual pixel component (e.g., luminance, chrominance) of the block's pixels. Method 900 can also be repeated for other blocks of the image / frame and subsequent video frames of the video sequence.
[0041] Turn now Figure 10This illustrates one implementation of a method 1000 for calculating multiple histograms for generating a palette table. The encoder calculates a first histogram (box 1005) for the first subset of a given set of pixel components of a block. In one implementation, the given pixel components are red, green, or blue pixel components, and the block is represented in the RGB color space. In another implementation, the given pixel components are luma or chroma pixel components, and the block is represented in the YCbCr color space. In other implementations, the given pixel component is a combination of two or more pixel components. For example, in one implementation, the given pixel component is a 24-bit value, with 8 bits used for the red component, 8 bits for the green component, and 8 bits for the blue component. In other implementations, the given pixel component may store other types of values representing pixels of a block.
[0042] The encoder computes a second histogram for a second subset of the given pixel components of the pixels in the block, where the first subset does not overlap with the second subset (box 1010). For example, in one implementation, if each pixel is represented by a 12-bit value, the first subset is the 6 most significant bits (MSB) of the 12-bit value, and the second subset is the 6 least significant bits (LSB) of the 12-bit value. In other implementations, the first and second subsets may correspond to other bits of the pixel component value. In one implementation, boxes 1005 and 1010 are executed in parallel.
[0043] Next, the encoder selects a first group of bars with the highest pixel count from the first histogram (box 1015). The encoder then selects a second group of bars with the highest pixel count from the second histogram (box 1020). The encoder then calculates a third histogram for the third group of bars, where each bar in the third group corresponds to a concatenation of bits assigned to the first bar from the first group and bits assigned to the second bar from the second group (box 1025). The third group of bars includes all possible combinations of the first and second groups of bars. For example, if the first group of bars includes eight bars and the second group of bars includes eight bars, the third group of bars will include 64 bars. In other words, each bar from the first group of bars is concatenated with each bar from the second group of bars to generate the third group of bars. Next, the encoder selects a fourth group of bars with the highest pixel count from the third group of bars in the third histogram (box 1030). The number of bars included in the fourth group of bars can vary depending on the implementation. The encoder then derives the palette table from the pixel component values assigned to the fourth group of bars (box 1035). Next, the encoder encodes the given pixel components of the block's pixels based on the palette table (box 1040). Method 1000 ends after box 1040. It should be noted that method 1000 can be repeated for each pixel block of an image or video frame.
[0044] Turn now Figure 11 This illustrates one implementation of a method 1100 for parallel generation of histograms as part of a palette table derivation. The encoder divides pixel component value bits into MSB and LSB groups (box 1105) of image or video frame blocks. It should be noted that a block can be more generally referred to as a "decoding unit." The size of a decoding unit (e.g., an 8x8 block) can vary depending on the implementation. In another implementation, the decoding unit is the entire image or video frame. In other implementations, the decoding unit is any of various other parts of the image, or the decoding unit may correspond to multiple images (e.g., video frames of a video sequence).
[0045] Next, in parallel, the encoder computes a histogram of the MSB group (box 1110) and also computes a histogram of the LSB group (box 1115). Each bar includes those pixel component values that match the bit portion assigned to the bar. For example, in one implementation, the bit width of the pixel component values is eight bits, and the MSB portion is four bits, and the first bar is assigned bits "1111", the second bar is assigned bits "1110", and so on. In this implementation, the pixel component values "11111111", "11111110", "11111101", "11111100", "11111011", "11111010", "11111001", "11111000", "11110111", "11110110", "11110101", "11110100", "11110011", "11110010", "11110001", and "11110000" are assigned to the first vertical bar. Furthermore, the pixel component values "11101111", "11101110", "11101101", "11101100", "11101011", "11101010", "11101001", "11101000", "11100111", "11100110", "11100101", "11100100", "11100011", "11100010", "11100001", and "11100000" are assigned to the second bar. This pattern continues for the other bars of the MSB group histogram. The pixel component values of the LSB group can be assigned to the bars of the LSB group histogram in a similar manner.
[0046] The encoder then selects the top 8 bars from the MSB group histogram (box 1120) and the top 8 bars from the LSB group histogram (box 1125). In other implementations, the encoder may select additional numbers of top (i.e., highest pixel count) bars from both the MSB and LSB group histograms. As used herein, the term "bar" is defined as a set of pixels from the decoding unit that have pixel component values that match a particular positional assignment. For both the MSB and LSB group histograms, each particular positional assignment for a given bar includes a number of bits less than the bit width of the pixel component value.
[0047] Following boxes 1120 and 1125, the encoder combines the 8 MSB bars with the 8 LSB bars to form a combined histogram of 64 bars (box 1130). Next, the encoder selects the top 8 bars from the combined histogram (box 1135). In other implementations, the encoder selects a different number of top bars from the combined histogram. Then, the encoder derives the palette table from the top 8 bars (box 1140). After box 1140, method 1100 ends.
[0048] Turn now Figure 12 This illustrates one implementation of a method 1200 for encoding video / image blocks using a palette table. The encoder uses a parallel and / or hierarchical histogram generation process to identify a given number of the most frequently occurring pixel component values in the block (box 1205). Figures 10 to 11 Methods 1000 and 1100 describe different examples of using parallel and / or hierarchical histogram generation processes to identify a given number of the most frequently occurring pixel component values (i.e., the most prominent colors) in a block. Any of these methods or other similar methods can be used to implement box 1205. The given number can be any suitable integer value (e.g., 8, 16, 32), where the value varies depending on the implementation.
[0049] The encoder then selects a palette table (box 1210) based on a given number of most frequent pixel component values. In one implementation, the palette table includes seven most frequent pixel component values, allowing the indices in the table to be encoded with three bits, where an eighth index is used for escaped pixels that do not map to any value in the palette table. In other implementations, the palette table has a different number of entries for other numbers of most frequent pixel component values. In one implementation, each pixel component (e.g., luminance, chrominance) has its own palette table. In another implementation, a single palette table is created as a combined representation of different pixel components. In other implementations, a palette table is selected for a single pixel component (e.g., red), and then said palette table is shared and / or modified for use with other pixel components (e.g., blue, green). Alternatives to the above are possible and considered.
[0050] Then, a color index map is created using the index values that map the pixels of the block to entries in the palette table (box 1215). For example, in one implementation, each pixel in the block is converted to an index in the palette table, where the color index map includes the index of each pixel in the block. If a pixel has a value not included in the palette table, the pixel can be encoded as an escaped pixel, and the actual value of the pixel can be included in the color index map or a separate structure. Next, the palette table and color index map are encoded into a representation of the block (box 1220). The palette table and color index map can be encoded using any of a variety of encoding techniques. The encoded palette table and color index map are then stored and / or transmitted to a receiver (box 1225). Method 1200 ends after box 1225. It should be understood that method 1200 can also be used to encode entire images or video frames, not just blocks of images / frames.
[0051] In implementations involving sending an encoded palette table and color index map to a receiver, the receiver includes a decoder that reverses the steps described above to recreate blocks from the encoded palette table and color index map. The recreated blocks can then be driven to a display. In one implementation, this process can be repeated for blocks of each video frame in a video sequence. Alternatively, an encoded palette table can be sent for the entire first video frame, and then this palette table can be reused for a number of subsequent video frames. For subsequent video frames, only the color index map of the video frame is sent to the receiver. In other implementations, the encoded palette table generated for blocks of a frame is reused for other blocks of the frame and / or blocks of other frames. In some cases, the palette table for a given block is derived from the palette table corresponding to another block. For example, in one implementation, an incremental palette table (i.e., a difference palette table) is applied to the palette tables of adjacent blocks to generate the palette table for a given block. Other ways of deriving a new palette table from a previously used palette table are possible and are considered.
[0052] In various implementations, the methods and / or mechanisms described herein are implemented using program instructions from a software application. For example, program instructions executable by a general-purpose processor or a special-purpose processor are envisioned. In various implementations, such program instructions are represented by a high-level programming language. In other implementations, the program instructions are compiled from the high-level programming language into binary, intermediate, or other forms. Alternatively, program instructions describing the behavior or design of the hardware are written. Such program instructions are represented by a high-level programming language such as C. Alternatively, a hardware design language (HDL) such as Verilog is used. In various implementations, the program instructions are stored on any of a variety of non-transitory computer-readable storage media. During use, the computing system can access the storage media to provide the program instructions to the computing system for program execution. Generally, such a computing system includes at least one or more memories and one or more processors configured to execute the program instructions.
[0053] It should be emphasized that the above implementations are merely non-limiting examples. Many variations and modifications will be apparent to those skilled in the art once the above disclosure is fully understood. The appended claims are intended to cover all such variations and modifications.
Claims
1. A system for generating a palette table, comprising: An encoder containing circuitry, configured as follows: A palette table is generated in part based on multiple computed histograms of different non-overlapping subsets of pixels for a given pixel component of a block of video data, wherein the multiple computed histograms correspond to the different non-overlapping subsets respectively. Selected bars from the first histogram of the plurality of histograms are concatenated with selected bars from the second histogram of the plurality of histograms to form a combined histogram; and Multiple bars are selected from the combined histogram to generate the palette table, and The decoder, which includes circuitry, is configured as follows: Receive the palette table and the video data from the encoder; and The video data is decoded based at least in part on the color palette table.
2. The system of claim 1, wherein the palette table comprises a plurality of entries, wherein one or more entries store indices mapped to pixel component values.
3. The system as described in claim 1, wherein, The encoder is configured to generate the color palette table based on the video data.
4. The system as claimed in claim 1, wherein, The palette table includes multiple entries, one or more of which store indices mapped to pixel component values; and At least one index is used for escaped pixels in the video data, which are not mapped to any value in the palette table.
5. The system as described in claim 3, wherein, In order to generate the color palette table, the encoder is configured to identify the most frequent values of the pixel components of the blocks of the video data.
6. The system of claim 1, wherein, The encoder is configured to compute multiple histograms of different position subsets of the pixels of the block.
7. The system of claim 6, wherein, In order to compute the plurality of histograms, the encoder is configured to: Calculate a first histogram of the first subset of the given pixel components of the pixels of the block; and Calculate a second histogram of a second subset of the given pixel components of the pixels in the block, wherein the first subset does not overlap with the second subset.
8. The system of claim 3, wherein, The encoder is configured as follows: The most frequent values of a given pixel component of the selected pixel block are based on the calculated histogram; and The color palette table is derived from the number of the most frequently occurring values.
9. A method for generating a palette table, comprising: A palette table is generated by the encoder circuitry based at least in part on multiple computed histograms of different non-overlapping bit subsets of pixels for a given pixel component of a video data block, wherein the multiple computed histograms correspond to the different non-overlapping bit subsets respectively. The encoder concatenates selected bars from the first histogram of the plurality of histograms with selected bars from the second histogram of the plurality of histograms to form a combined histogram. The encoder selects multiple bars from the combined histogram to generate the palette table. The decoder circuitry receives the palette table and the video data from the encoder. and The video data is decoded by the decoder based at least in part on the palette table.
10. The method of claim 9, wherein the palette table comprises a plurality of entries, wherein one or more entries store indices mapped to pixel component values.
11. The method of claim 9, further comprising storing indexes of pixel component values mapped to one or more of the plurality of entries in the palette table, wherein at least one index is used for escaped pixels of the video data not mapped to any value in the palette table.
12. The method of claim 9, wherein generating the palette table includes selecting the most frequent values of the pixel components of the blocks of the video data.
13. The method of claim 9, further comprising calculating by the encoder a plurality of histograms of different position subsets of a given pixel component of the pixel of the block.
14. The method of claim 13, wherein, To calculate the plurality of histograms, the method includes: Calculate a first histogram of the first subset of the given pixel components of the pixels of the block; and Calculate a second histogram of a second subset of the given pixel components of the pixels in the block, wherein the first subset does not overlap with the second subset.
15. The method of claim 11, further comprising: The most frequent values of a given pixel component of the pixel in the block are identified based on the calculated histogram. and The color palette table is derived from the number of the most frequently occurring values.
16. A system for generating a palette table, comprising: The encoder, which includes circuitry, is configured as follows: A palette table is derived based on multiple computed histograms of different non-overlapping subsets of a given pixel component of a video data block stored in memory, wherein the multiple computed histograms correspond to the different non-overlapping subsets, respectively; wherein, in order to derive the palette table, the encoder is configured to: Selected bars from the first histogram of the plurality of histograms are concatenated with selected bars from the second histogram of the plurality of histograms to form a combined histogram; and Multiple bars are selected from the combined histogram to generate the palette table, and The palette table is stored in the memory; and The receiver, including the circuitry, is configured as follows: Access the memory to read the palette table; and Video data is decoded in part based on the aforementioned color palette table.
17. The system of claim 16, wherein, To derive the palette table, the encoder is further configured to: The pixel component values are divided into a first group including the most significant bits and a second group including the least significant bits. and The plurality of histograms are calculated in part based on the first group and the second group.
18. The system of claim 17, wherein, The plurality of histograms includes a first histogram corresponding to the first subset of the pixel component values and a second histogram corresponding to the second subset of the pixel component values.
19. The system of claim 18, wherein the first subset corresponds to the most significant bit of the pixel component value, and the second subset corresponds to the least significant bit of the pixel component value.
Citation Information
Patent Citations
Advanced screen content coding with improved palette table and index map coding methods
CN106415607A