Parallel histogram computation with application to palette table derivation.

A multi-pass histogram technique for palette table derivation in video coding standards addresses the exponential storage issue by selectively evaluating and incrementally adding bits, thereby optimizing memory usage and enhancing encoding efficiency.

JP7561936B2Active Publication Date: 2024-10-04ATI TECHNOLOGIES ULC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023132810
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-09-30
Filing Date
2023-08-17
Publication Date
2024-10-04
Estimated Expiration
2040-09-30

AI Technical Summary

Technical Problem

The exponential increase in storage requirements for histogram calculations in palette table derivation for video compression, particularly in high-bit depth video formats like 8-bit, 10-bit, and 12-bit, poses a challenge in existing video coding standards such as HEVC and AV1.

Method used

A multi-pass histogram approach is employed, where a first pass histogram is calculated for most significant bits (MSBs) of pixel components, followed by selecting top bins and incrementally adding additional bits in subsequent passes to derive a palette table, reducing memory requirements.

Benefits of technology

This method significantly reduces memory usage by optimizing the number of bins required for histogram calculations, making it more efficient for video encoding and decoding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007561936000001
    Figure 0007561936000001
  • Figure 0007561936000002
    Figure 0007561936000002
  • Figure 0007561936000003
    Figure 0007561936000003
Patent Text Reader

Abstract

To provide a method for calculating a multi-path histogram for palette table derivation, a system, and a device.SOLUTION: In a method for generating a plurality of histogram paths for palette table derivation, an encoder calculates a first histogram for a first part of a most significant bit (MSB) of a pixel component value of a block of an image or a video frame, selects the number of given bins having the largest number of pixels from the first histogram, evaluates one or more additional bits from the pixel component value, increases the particle size of the selected bins having the largest pixel number, calculates a second histogram for connection of the MSB of the first original part from the bins and the one or more additional bits, selects the bin having the largest number of pixels from the second histogram, derives the pallet table on the basis of the selected bin having the largest number of pixels, and encodes a block using a pallet table.SELECTED DRAWING: Figure 13
Need to check novelty before this filing date? Find Prior Art

Description

[Background technology]

[0001] Palette coding is used in some video compression standards (e.g., high efficiency video coding (HEVC) standard, Alliance for Open Media video 1 (AV1) coding standard) to increase the compressibility of video data. Palette coding involves calculating and classifying a histogram to determine candidate palette levels. The size of the memory required for histogram calculation to derive a palette table grows exponentially with pixel bit depth. As used herein, the term "palette table" is defined as a data structure that stores a number of entries, each of which stores an index that maps to a pixel component value. For 8-bit, 10-bit, and 12-bit videos, the required number of histogram bins is 256, 1024, and 4096 for conventional palette coding techniques. Summary of the Invention

[0002] Advantages of the methods and mechanisms described herein may be better understood by referring to the following description in conjunction with the accompanying drawings. [Brief description of the drawings]

[0003] [Figure 1] FIG. 1 is a block diagram of one embodiment of a computing system. [Diagram 2] FIG. 2 is a diagram of an image and corresponding pixel distribution. [Diagram 3] FIG. 2 is a computer-generated image of screen content and corresponding pixel distribution. [Figure 4] FIG. 2 is a block diagram of one embodiment of an encoder coupled to a memory. [Diagram 5] FIG. 2 illustrates a sample histogram for a given block according to one embodiment. [Figure 6]FIG. 13 illustrates a decimated sample histogram for a given block after a first pass, according to one embodiment. [Figure 7] FIG. 13 illustrates the selection of top decimated candidate bins according to one embodiment. [Figure 8] FIG. 13 illustrates a second path histogram according to one embodiment. [Figure 9] FIG. 2 illustrates one embodiment of a bit of a pixel component. [Figure 10] FIG. 13 is a block diagram of one embodiment of a process for generating a dual-pass histogram for palette table derivation. [Figure 11] FIG. 2 is a generalized flow diagram illustrating one embodiment of a method for generating a multi-pass histogram for palette table derivation. [Figure 12] FIG. 2 is a generalized flow diagram illustrating one embodiment of a method for generating multiple histogram passes as part of palette table derivation. [Figure 13] FIG. 1 is a generalized flow diagram illustrating one embodiment of a method for generating multiple histogram passes for palette table derivation. [Figure 14] FIG. 2 is a generalized flow diagram illustrating one embodiment of a method for computing multi-pass histograms for palette table derivation. [Figure 15] FIG. 2 is a generalized flow diagram illustrating one embodiment of a method for encoding a video / image block using a palette table. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0004] In the following description, numerous details are set forth to provide a thorough understanding of the methods and mechanisms presented herein. However, those skilled in the art should appreciate that various embodiments may be practiced without these specific details. In some instances, well-known structures, components, signals, computer program instructions, and techniques are not shown in detail to avoid obscuring the approaches described herein. For simplicity and clarity of illustration, elements shown in the figures are not necessarily drawn to scale. For example, the dimensions of some elements may be exaggerated relative to other elements.

[0005] Various systems, devices, and methods are disclosed herein for implementing hierarchical techniques for palette table derivation. In one embodiment, an encoder calculates a first pass histogram of a first portion of the most significant bits (MSBs) of pixel component values ​​(i.e., color values) of a video frame. The encoder then selects a given number of bins from the first pass histogram that have the most pixels. The term "bin" as used herein is defined as an interval that specifies one or more values. The bins are typically specified as contiguous, non-overlapping intervals of variables. In this case, the variables are pixel component values, and each bin specifies a range of values ​​where the size of the range is determined by the number of pixel component value bits that fall off the first portion of the MSB.

[0006] After selecting a given number of most populated bins from the first pass histogram, the encoder increases the granularity of these selected most populated bins by evaluating one or more additional bits from the pixel component values. A second pass histogram is then calculated for a concatenation of the original first portion of the MSBs of the pixel component values ​​and the one or more additional bits, and the most populated bins are selected from the second pass histogram. A palette table is derived based on these most populated bins from the second pass histogram, and the video frame is encoded using the palette table. By using a multi-pass histogram approach, memory requirements are reduced compared to conventional palette table derivation techniques.

[0007] In one embodiment, pixel bits are divided into several groups for hierarchical operation, starting with the "m" most significant bits (MBS) and expanding by adding "n1" bits, "n2" bits, etc. to the remaining bits. A first histogram is calculated for the "m" MSBs, and top bins from this first histogram are selected. These top bins are expanded to include "n1" bits, and then a second histogram is calculated for these expanded bins. Top bins are selected from the second histogram, and these bins are expanded to include "N2" bits. In one embodiment, this process continues until all of the pixel component value bits have been evaluated. For the purposes of this description, "m", "n1", and "n2" are assumed to be positive integers. The values ​​of "m", "n1", and "n2", the number of top bins selected, and the number of passes performed are flexible and may vary depending on the embodiment. These values ​​are adjusted based on a tradeoff between simple hardware implementation and performance.

[0008] Referring to FIG. 1, a block diagram of one embodiment of a computing system 100 is shown. In one embodiment, the computing system 100 includes at least an encoder 105, a processor(s) 110, an input / output (I / O) interface 120, a bus 125, and a memory device(s) 130. In other embodiments, the computing system 100 may include other components and / or may be configured differently. In one embodiment, the encoder 105 includes logic to implement a video codec. The video codec encodes an uncompressed video stream and / or decodes a compressed video stream. In one embodiment, the video codec operates according to one or more video compression standards. It should be noted that the terms "encoder" and "video codec" as used herein may refer to a video / image decoder, a video / image encoder, or a video codec. The encoder 105 represents any suitable combination of hardware and / or software. Although the encoder 105 is shown as a separate unit from the processor(s) 110, it should be understood that part or all of the encoder 105 may be executed or implemented on the processor(s) 110.

[0009] Processor(s) 110 represent any number and type of processing units (e.g., central processing unit (CPU), graphic processing unit (GPU), digital signal processor (DSP), field programmable gate array (FPGA), application specific integrated circuit (ASIC)). In one embodiment, some of the processing related to encoder 105 is performed by processor(s) 110. Memory device(s) 130 represent any number and type of memory devices. For example, the type of memory in memory device(s) 130 may include dynamic random access memory (DRAM), static random access memory (SRAM), NAND flash memory, NOR flash memory, ferroelectric random access memory (FeRAM), etc. Memory device(s) 130 are accessible by encoder 105 and processor(s) 110. I / O interface 120 represents any number and type of I / O interface (e.g., Peripheral Component Interconnect (PCI) bus, PCI-Extended (PCI-X), PCI Express (PCIE) bus, Gigabit Ethernet (GBE) bus, Universal Serial Bus (USB)). Various types of peripheral devices may be coupled to I / O interface 120. Such peripheral devices include, but are not limited to, displays, keyboards, mice, printers, scanners, joysticks or other types of game controllers, media recording devices, external storage devices, network interface cards, and the like.

[0010] In various embodiments, computing system 100 may be a computer, a laptop, a mobile device, a game console, a server, a streaming device, a wearable device, or any of various other types of computing systems or devices. It should be noted that the number of components of computing system 100 may vary from embodiment to embodiment. For example, in other embodiments, there may be more or fewer components than those shown in FIG. 1. It should also be noted that in other embodiments, computing system 100 may include other components not shown in FIG. 1. Furthermore, in other embodiments, computing system 100 may be configured in a manner other than that shown in FIG. 1.

[0011] Referring to Figure 2, a diagram of an image 205 and a corresponding pixel distribution 210 is shown. The image 205 shown in Figure 2 is a well-known Lena image that is widely used as a test image in image processing. The pixel distribution 210 for this 64x64 Lena image 205 is shown at the bottom of Figure 2. The pixel distribution 210 shows how the pixels in the image 205 are distributed across different pixel values. Having a continuous color tone as shown in the pixel distribution 210 is typical for natural images or video frames captured by a camera.

[0012] Referring to Figure 3, a diagram of a computer-generated screen content image 305 and corresponding pixel distribution 310 is shown. Image 305 is an example of a computer-generated screenshot, and pixel distribution 310 shows how there is a narrow distribution of pixels across a relatively small number of pixel component values. As the pixel distribution shows, image 305 contains a limited number of different colors. This is a common type of distribution in computer-generated screenshots and computer-generated images, and palette coding is an efficient way to encode these images to achieve high compression ratios. Other types of images besides computer-generated screenshots may also benefit from palette coding.

[0013] 4, a block diagram of one embodiment of an encoder 405 coupled to a memory 430 is shown. In one embodiment, the encoder 405 includes a control logic 410 having a binning controller 415, a selection unit 420, and a palette table generation unit 425. In another embodiment, the encoder 405 is implemented by a processor executing program instructions, in which the binning controller 415, the selection unit 420, and the palette table generation unit 425 are implemented by program instructions rather than control logic. In another embodiment, the binning controller 415, the selection unit 420, and the palette table generation unit 425 are implemented using a combination of hardware and software.

[0014] The encoder 405 is coupled to a memory 430, which may represent any number and type of memory device. In one embodiment, the memory 430 stores a video frame to be encoded by the encoder 405. A video block 435 represents one block of the video frame. The technique used to encode the video block 435 may be used for other blocks of the video frame and other video frames in a video sequence. Alternatively, the video block 435 may be a single block of an image. In one embodiment, the video block 435 is stored in the memory 430 as a number of pixel component values. As part of the encoding process, the binning controller 415 generates a first pass histogram 440A from the pixel component values ​​of the video block 435. In one embodiment, the binning controller 415 generates a separate first pass histogram 440A for each individual pixel component (e.g., red, green, blue). The first step performed by the binning controller 415 to generate the first pass histogram 440A is to divide the entire range of pixel component values ​​into a series of intervals. This first step is also referred to as "binning" the range of values, and each interval is called a "bin." Bins are typically specified as contiguous, non-overlapping intervals of the range of values. The binning controller 415 then counts how many pixel component values ​​from the video block 435 fall within each interval. For example, in one embodiment, the binning controller 415 extracts the pixel component values ​​of the video block 435, and then the binning controller 415 assigns each pixel component value to a corresponding bin. In one embodiment, each bin is implemented using a counter that is incremented each time a pixel is assigned to the respective bin.

[0015] In one embodiment, each bin of the first path 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 embodiment. For example, in one embodiment, each bin of the first path histogram 440A represents a range corresponding to six MSBs of a total of eight bits per pixel component value. By generating the bins of the first path histogram 440A using fewer than the total number of bits, the storage requirements for storing the first path histogram 440A in the memory 430 are reduced. For example, when generating the first path histogram 440A using six MSBs of the eight bits, only 64 bits are generated compared to 256 bins when all eight bits are used. In this example, each pixel component value is assigned to its respective bin by the binning controller 415 based on the six MSBs of the value. In other embodiments, significant storage savings can be achieved for higher bit depth video (e.g., 12 bits per sample, 16 bits per sample) and / or if more pixel component value bits are excluded from the bin classification.

[0016] After the first path histogram 440A is generated and stored in the memory 430, the bins of the first path histogram 440A are sorted by the selection unit 420. For example, the bins are sorted from highest to lowest based on how many pixel values ​​are contained in each bin. The selection unit 420 then selects a given number of bins that have the maximum pixel values. For example, in one embodiment, the selection unit 420 selects the eight bins that have the maximum pixel values. In another embodiment, the selection unit 420 selects another number of bins that have the most pixels (i.e., the highest number of pixel values) among all the bins in the first path histogram 440A. The number of bits evaluated is then increased for these selected bins, and the second path histogram 440B is generated for the increased bins. For example, if the top eight bins are selected by the selection unit 420 and these bins are increased by two bits, the second path histogram 440B will have a total of 32 bins. These bins are then sorted according to how many pixel values ​​each bin contains. The top bins are then selected according to the number of pixel values. The number of top bins selected varies depending on the embodiment.

[0017] In one embodiment, the top bins selected from the second pass histogram 440B are used by the palette table generation unit 425 to derive the palette table 450 that is used to encode the video block 435 to generate the encoded block 455. Alternatively, one or more additional passes may be performed to generate more histograms by increasing the number of bits evaluated for the pixel component values. In some cases, the encoder 405 may decide not to use palette mode encoding for the video block 435 when the distribution of pixel values ​​is spread across many bins, as typically found in natural (i.e., non-computer generated) video frames. In one embodiment, the decision not to use palette mode encoding is made after the first pass histogram 440A is generated. Analysis of the first pass histogram 440A may determine whether palette mode encoding is suitable for the video block 435. If palette mode encoding is not used, any of a variety of other types of conventional encoding techniques may be used to encode the video block 435.

[0018] It should be noted that the above process can be performed for the entire video frame or a portion thereof. Also, the palette table generated for the entire video frame may be used to encode subsequent video frames in the video stream. It should be noted that in another embodiment, the video block 435 may be a block of images. It should be understood that the partitioning of the control logic 410 into the binning controller 415, the selection unit 420, and the palette table generation unit 425 illustrates only one embodiment. In another embodiment, a single control unit may perform the functions of the binning controller 415, the selection unit 420, and the palette table generation unit 425. In other embodiments, other methods of partitioning the control logic 410 into separate units may be deployed.

[0019] In one embodiment, the encoded block 455 includes an encoded version of the palette table 450 and a color index map having index values ​​that map pixels of the video block 435 to the palette table 450. The palette table 450 represents any number of palette tables for encoding pixel components of the video block 435. For example, in one embodiment, the palette table 450 includes a first table for a red component, a second table for a green component, and a third table for a blue component. In another embodiment, the palette table 450 is a single table that represents a combination of different pixel components. The generated color index map may be encoded using any suitable encoding technique. For example, the individual index values ​​are encoded using a run-length encoding technique in one embodiment. Other methods of encoding the individual index values ​​are possible and are contemplated.

[0020] Referring to FIG. 5, one embodiment of a sample histogram 500 for a given block is shown. The histogram 500 is an example of a histogram having 64 different bins corresponding to 64 possible pixel levels. As used herein, the term "histogram" is defined as the frequency of occurrence of each pixel component value for a given block of an image / frame. It should be noted that a block may be more generally referred to as a "coding unit," and the size of the coding unit varies depending on the embodiment. In one embodiment, the coding unit is an 8×8 block of pixels. In another embodiment, the coding unit is the entire image / frame. In other embodiments, the coding unit may be other sizes and / or arrangements of pixels. An exemplary distribution of the histogram 500 is shown for purposes of illustration. The Y-axis measures the number of pixels in a given block that have a corresponding pixel level. For purposes of this illustration, assume that a given block has a plurality of pixels, with each pixel having a numerical value for each of one or more channels (e.g., red, green, blue).

[0021] To generate histogram 500, storage for 64 separate bins is required. For other histograms having other numbers of bits per pixel component, other numbers of bins are required to generate histograms for each possible pixel level. For example, for a 10-bit pixel component, 1024 storage bins are required. For a 12-bit pixel component, 4096 storage bins are required. As the number of bits per pixel component level increases, the storage requirements grow exponentially.

[0022] Referring to Figure 6, a diagram of one embodiment of a decimated sample histogram 600 for a given block after a first pass is shown. The description of Figure 6 continues the description of histogram 500 of Figure 5. Histogram 600 contains the same distribution of pixels across pixel component levels as shown in histogram 500, except that each bin encompasses multiple pixel component levels. Thus, histogram 600 has a reduced number of bins by evaluating only a subset of the bits for each pixel.

[0023] As shown in histogram 600, each rectangle is a mid-bin that is a collection of four bins. In this example, histogram 600 evaluates the four most significant bits (MSBs) of the pixel component values. Using only the four MSBs corresponds to a total of 16 bins. This helps reduce the storage requirements of 64 bins (for histogram 500 of FIG. 5) to 16 bins for histogram 600. In other embodiments, the first pass histogram can evaluate other numbers of MSBs.

[0024] Referring to FIG. 7, a diagram of one embodiment of the selection of top decimated candidate bins from a sample histogram is shown. The description of FIG. 7 continues the description of histogram 600 of FIG. 6. As shown in histogram 600, after generating candidate bins based on a subset of pixel MSBs, the top four candidate bins with the most pixels are selected. These four selected decimated candidate bins 705A-705D are shown as vertical rectangles in histogram 700. It should be understood that the selection of the top four decimated candidate bins 705A-705D is merely illustrative of one embodiment. In other embodiments, another number of top decimated candidate bins (e.g., 2, 8) may be selected from the decimated histogram.

[0025] Referring to FIG. 8, a diagram of one embodiment of a second pass histogram 800 is shown. The description of FIG. 8 continues the description of histogram 700 of FIG. 7. After selecting the top four candidate bins 705A-705D as shown in histogram 700, the histogram 800 is refined by adding two additional bits to the pixel component bits being evaluated. This increases the number of bins from four to sixteen. In one embodiment, for an eight-bit image or video frame, the multi-pass histogram process stops at this point and the palette table is derived from the top eight of these sixteen bins. For images with more than eight bits per pixel component, the process continues in another pass by selecting the top candidate bins and then augmenting these bins by an additional two bits. The number of candidate bins selected may vary depending on the embodiment.

[0026] Referring to FIG. 9, a diagram of one embodiment of a bit of pixel component 900 is shown. Pixel component 900 represents any number of bits that store any of the different color values ​​for a particular color space of a source image or video frame. For example, in one embodiment, three separate instances of pixel component 900 are used to encode the red, green, and blue of each pixel of an image in a red, green, and blue (RGB) color space. Alternatively, in another embodiment, three separate instances of pixel component 900 encode the luminance and chrominance values ​​for each pixel in a (YUV) color space. In other embodiments, pixel component 900 can store each pixel component of a pixel in other types of color spaces. More generally, pixel component 900 may be referred to as an index into a color space.

[0027] In one embodiment, a first pass histogram is calculated for a block of an image / frame using one bit from the "m" group of pixel components 900 while excluding other least significant bits (LSBs) of the pixel components 900. As shown, "m" is equal to six, but it should be understood that this is merely indicative of one embodiment. The top "p1" candidate bins are selected from the candidate bins for the first pass histogram with values ​​of "p1" that vary depending on the embodiment. A second pass histogram is then calculated for these "p1" candidate bins by augmenting the "p1" candidate bins to include two bits from the "n1" group in the histogram calculation. As shown, "n1" is equal to two, but it should be understood that this is merely indicative of one embodiment. The top "p2" candidate bins are selected from the second pass histogram with values ​​of "p2" that vary depending on the embodiment. Additional passes may be performed for three bits from the "n2" group and four bits from the "n3" group. In one embodiment, after all bits of pixel component 900 have been evaluated, the palette table is derived using the most significant bins from the final set of bins.

[0028] Referring to FIG. 10, a block diagram of one embodiment of a process 1000 for generating a dual pass histogram for palette table derivation is shown. The first step of the process 1000 is to reduce the number of bits evaluated in generating the first histogram. This increases the number of pixel component values ​​included in each bin. For example, if two bits are excluded, then four potential pixel component values ​​are included in each bin. This is the example shown at the top of the process 1000. In the first scan, the histogram has only 64 bins (B0-B63) corresponding to the six MSBs. Then, the top 16 bins (T0-T15) are selected from bins B0-B63. The top 16 bins are the bins with the maximum pixel component values ​​from the block being processed.

[0029] After the top 16 bins, shown as T0-T15 in FIG. 10, are selected, each bin is increased to 4 bins by evaluating two more LSBs from the pixel component values ​​for the second scan. These bins are shown as B'(0,0), B'(0,1), B'(0,2) and B'(0,3) for T0. For T1, the bins are B'(1,0), B'(1,1), B'(1,2) and B'(1,3) for the second scan. The other bins in the second scan follow the same pattern as the other top bins T2-T15 in the first scan. As a result of the second scan, the top 16 bins are increased to 64 bins. These 64 bins are sorted and then the top 8 bins (T'0-T'7) are selected. It should be noted that the particular number of top bins selected from the second scan merely represents one embodiment. Similarly, other values ​​used for process 1000 are merely representative of one particular embodiment. Other embodiments may use other values.

[0030] Referring to FIG. 11, one embodiment of a method 1100 for generating a multi-pass histogram for palette table derivation is shown. For purposes of illustration, the steps in this embodiment and in FIGS. 12-15 are shown in sequence. However, it should be noted that in various embodiments of the described method, one or more of the described elements may be performed simultaneously, in a different order than shown, or omitted entirely. Other additional elements may also be performed as desired. Any of the various systems or devices described herein may be configured to perform the method 1100. It should be noted that the method 1100 is intended to correspond to the process 1000 (of FIG. 10).

[0031] The method 1100 begins with an encoder using the top six MSBs of each pixel component value (block 1105). The encoder then collects a histogram with 64 bins for the top six MSBs of the pixel component values ​​(block 1110). The encoder then sorts the 64 bins in descending order and selects the top 16 bins from these 64 bins (block 1115). The encoder then augments the top 16 bins to 64 bins by combining the six MSBs with the two LSBs, and the encoder then collects a histogram with these 64 bins (block 1120). The encoder sorts the 64 bins in descending order and selects the top eight bins from the 64 bins (block 1125). After block 1125, the method 1100 ends. These selected eight bins are then used by the encoder for palette table derivation when encoding the corresponding block.

[0032] Referring to FIG. 12, one embodiment of a method 1200 for generating multiple histogram passes as part of a palette table derivation is shown. An encoder receives an N-bit pixel component value for a given pixel component of a block of an image (block 1205). Note that a block may be more generally referred to as a "coding unit" and an image may be a video frame. The size of the coding unit (e.g., an 8×8 block) may vary depending on the embodiment. In another embodiment, the coding unit is an entire image or video frame. In other embodiments, the coding unit is any of various other portions of an image, and the coding unit may correspond to multiple images (e.g., video frames of a video sequence). For the purposes of this description, it is assumed that "N" is a positive integer. The value of N may vary depending on the embodiment. For example, 8-bit, 10-bit, and 12-bit pixel components are commonly used values ​​in various embodiments. Other numbers of bits per pixel component are possible. In one embodiment, the given pixel component is either red, green, or blue in the RGB color space. In another embodiment, a given pixel component represents a luminance or chrominance value for a YUV or YCbCr color space. Other types of pixel components may be used in other embodiments.

[0033] The encoder then groups the pixel component values ​​into a first plurality of bins based on a first portion of the N pixel component value bits (block 1210). The first plurality of bins collectively represent a histogram of pixel values ​​for the block. Each bin includes those pixel component values ​​that match the bits of the first portion assigned to the bin. For example, in one embodiment, N is 8, the first portion is 6 bits, and the first bin is assigned bits "111111", the second bin is assigned bits "111110", etc. Pixel component values ​​of "11111111", "11111110", "11111101", "11111100" are assigned to the first bin, pixel component values ​​of "11111011", "11111010", "11111001", "11111000" are assigned to the second bin, etc. In other embodiments, N is another number and / or the first portion includes a different number of bits.

[0034] The encoder then selects a first set of bins with the highest number of pixels from the first plurality of bins (block 1215). For example, in one embodiment, the encoder selects the 8 bins with the highest number of pixels in block 1215. In another embodiment, the encoder selects the 16 bins with the highest number of pixels in block 1215. In other embodiments, the encoder selects some other number of bins with the highest number of pixels.

[0035] The encoder then groups pixel component values ​​from the first set of bins into a second plurality of bins based on a second portion (greater than the first portion) of the pixel component value bits (block 1220). In other words, in block 1220, the encoder augments the first set of bins into a second plurality of bins by increasing the number of bits used to classify the pixel component values ​​into bins. However, because the second plurality of bins are all contained within the first set of bins, the increase in the number of bits is applied only to those pixel component values ​​grouped into the first set of bins. In one embodiment, the second portion is two bits larger than the first portion. In other embodiments, the second portion is another number of bits larger than the first portion.

[0036] The encoder then selects a second set of bins with the largest number of pixels among the second plurality of bins (block 1225). The number of bins in the second set varies depending on the embodiment. The encoder then derives a palette table from the pixel component values ​​assigned to the second set of bins (block 1230). The encoder then encodes the given pixel component of the pixels of the block based on the palette table (block 1235). After block 1235, the method 1200 ends. By using the method 1200, a smaller number of bins are calculated than would otherwise be calculated if conventional techniques were used, reducing the storage requirements of generating a histogram for palette table encoding. It should be noted that the method 1200 may be performed for each pixel component of the block. Subsequent blocks of the image may be encoded in a similar manner, and the palette table may be reused for other blocks.

[0037] Referring to FIG. 13, one embodiment of a method 1300 for generating multiple histogram passes for palette table derivation is shown. The encoder generates a first histogram for a first group of bins, where each bin corresponds to multiple potential pixel values ​​(block 1305). Note that the number of potential pixel values ​​per bin depends on the number of bits that were not evaluated for the first histogram. For example, if a video frame has 12 bits per pixel and only the 6 MSBs are evaluated in the first histogram, then 6 LSBs are left, meaning that there are 64 potential pixel values ​​per bin. In other embodiments, there are other numbers of potential pixel values ​​per bin after the first histogram.

[0038] The encoder then selects a first given number of bins from the first group of bins that have the most pixels (block 1310). The first given number may vary depending on the embodiment. The encoder then determines whether another histogram is to be generated (conditional block 1315). For example, in one embodiment, if there are many bits in the pixel component values ​​that have not been evaluated, the encoder may decide to generate another histogram.

[0039] If the encoder determines that another histogram needs to be generated (conditional block 1315: "yes"), the encoder increases the number of bits of pixel values ​​evaluated from the (N-1)th group of bins to generate the Nth group of bins (block 1320). The Nth group may refer to the second group, third group, fourth group, etc., depending on how many histograms have already been generated. Otherwise, if the encoder determines that another histogram does not need to be generated (conditional block 1315: "no"), the encoder derives a palette table for encoding a given block of the video frame based on the number of bins selected (block 1335).

[0040] After block 1320, the encoder generates another (i.e., Nth) histogram for the Nth group of bins (block 1325). The encoder then selects a given number of bins from the Nth group of bins that have the highest number of pixels (block 1330). The given number may vary depending on the embodiment and / or the particular hierarchical level of the histogram to be generated. After block 1330, method 1300 returns to conditional block 1315.

[0041] Referring to FIG. 14, another embodiment of a method 1400 for computing a multi-pass histogram for palette table derivation is shown. The encoder computes a histogram of the six most significant bits (MSBs) of pixel component values ​​(block 1405). Note that the histogram includes multiple bins, with each bin including a calculation of the number of pixels that have pixel component values ​​with the same six MSBs corresponding to the bin. The encoder then determines whether there are any remaining bits in the pixel component values ​​(conditional block 1410). For example, if after block 1405 the pixel component value has 8 bits, there are two more bits after the six MSBs, so conditional block 1410 evaluates to "yes."

[0042] If there are remaining bits in the pixel component value (conditional block 1410: "yes"), the encoder selects the top 16 bins of the plurality of bins from the histogram (block 1415). In other embodiments, the encoder selects some other number of bins with the most pixels. Otherwise, if there are no remaining bits in the pixel component value (conditional block 1410: "no"), the encoder selects the top 8 bins of the plurality of bins from the histogram (block 1420). These 8 bins correspond to the most prominent colors in the block. After block 1420, the top 8 bins are used for palette table derivation (block 1430) and the method 1400 ends. After block 1415, the encoder calculates the histogram by adding 2 more bits (block 1425). After block 1425, the method 1400 returns to conditional block 1410. It should be noted that the number of bits and the number of bins specified in the method 1400 are indicative of one particular embodiment. In other embodiments, these numbers may vary.

[0043] Referring to FIG. 15, one embodiment of a method 1500 for encoding a video / image block using a palette table is shown. The encoder uses a multi-level hierarchical histogram generation process to identify a given number of pixel component values ​​that occur most frequently within the block (block 1505). Various examples of using a multi-level hierarchical histogram generation process to identify a given number of pixel component values ​​that occur most frequently within the block (i.e., the most prominent colors) are described in methods 1100, 1200, 1300, and 1400 (of FIGS. 11-14). Any of these methods or other similar methods may be used to implement block 1505. The given number may be any suitable integer value (e.g., 8, 16, 32) whose value varies depending on the embodiment.

[0044] The encoder then selects a palette table based on a given number of the most frequently occurring pixel component values ​​(block 1510). In one embodiment, the palette table includes the seven most frequently occurring pixel component values, allowing an index into the table to be coded with three bits, with an eighth index used for escape pixels that do not map to any value in the palette table. In other embodiments, the palette table has other numbers of entries for other numbers of the most frequently occurring pixel component values. In one embodiment, each pixel component (e.g., luminance, chrominance) has its own palette table. In another embodiment, a single palette table is generated to represent the combination of the individual pixel components. In a further embodiment, a palette table is selected for a single pixel component (e.g., red) and then shared and / or modified for use with other pixel components (e.g., blue, green). Alternatives to the above are possible and contemplated.

[0045] A color index map is then generated (block 1515) using index values ​​that map the pixels of the block to entries in the palette table. For example, each pixel in the block is converted to an index into the palette table, and the color index map includes an index for each pixel in the block. If a pixel has a value that is not included in the palette table, the pixel may be coded as an escape pixel, and the pixel's actual value may be included in the color index map or another structure. The palette table and color index map are then coded as a representation of the block (block 1520). Any of a variety of coding techniques may be used to code the palette table and to code the color index map. The coded palette table and color index map are then stored and / or communicated to a receiver (block 1525). After block 1525, method 1500 ends. It should be appreciated that method 1500 may be used to code entire images or video frames, not just blocks of images / frames.

[0046] For embodiments involving transmitting the encoded palette table and color index map to a receiver, the receiver includes a decoder that reverses the above steps to regenerate the blocks from the encoded palette table and color index map. The regenerated blocks may then be sent to a display. In one embodiment, this process may be repeated for blocks of each video frame of a video sequence. Alternatively, the encoded palette table may be transmitted for the entire first video frame, after which several subsequent video frames may reuse this palette table. For subsequent video frames, only the color index map of the video frame is transmitted to the receiver. In further embodiments, the encoded palette table generated for a block of a frame is reused for other blocks of the frame and / or blocks of other frames. In some cases, the palette table of a given block is derived from a palette table corresponding to another block. For example, in one embodiment, a delta palette table (i.e., a difference palette table) is applied to the palette table of an adjacent block to generate the palette table for the given block. Other methods of deriving a new palette table from a previously used palette table are possible and contemplated.

[0047] In various embodiments, program instructions of a software application are used to implement the methods and / or mechanisms described herein. For example, program instructions executable by a general purpose processor or a special purpose processor are contemplated. In various embodiments, such program instructions are expressed in a high level programming language. In other embodiments, the program instructions are compiled from the high level programming language into a binary, intermediate or other format. Alternatively, the program instructions are written to describe the operation or design of hardware. Such program instructions are expressed in a high level programming language such as C. Alternatively, a hardware design language (HDL) such as Verilog is used. In various embodiments, the program instructions are stored in any of a variety of non-transitory computer readable storage media. The storage media are accessible by the computing system during use 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.

[0048] It should be emphasized that the above-described embodiments are merely non-limiting examples of embodiments. Many variations and modifications will become apparent to those skilled in the art once the above disclosure is fully understood. It is intended that the following claims be interpreted to include all such variations and modifications.

Claims

1. 1. An encoder circuit, comprising: an interface configured to be coupled to a memory; A circuit, The circuit comprises: determining a first distribution of pixel component values ​​based on the first number of bits for each pixel component value; determining a second distribution of the pixel component values ​​based on a second number of bits in each pixel component value in response to determining that all bits of the pixel component values ​​have not been evaluated; generating a palette table in response to determining that all bits of the pixel component value have been evaluated; [0023] Encoder circuit.

2. the circuitry being configured to generate a color index map that maps a selected number of pixel component values ​​to entries in the palette table. The encoder circuit of claim 1.

3. the plurality of pixels being pixels of a block of a frame; The encoder circuit of claim 1.

4. the circuitry being configured to iteratively determine the distribution of pixel component values ​​until all bits of the pixel component values ​​have been evaluated. The encoder circuit of claim 1.

5. the circuitry being configured to select the number of pixel component values ​​based on a count of pixel component values ​​in a plurality of pixels. The encoder circuit of claim 1.

6. the circuitry is configured to determine a first histogram based on the first distribution. The encoder circuit of claim 1.

7. the circuitry is configured to determine a second histogram based on the second distribution. The encoder circuit of claim 6.

8. 1. A method comprising: the encoder determining a first distribution of pixel component values ​​based on a first number of bits for each pixel component value; determining a second distribution of pixel component values ​​based on a second number of bits in each pixel component value in response to the encoder determining that all bits of the pixel component values ​​have not been evaluated; and generating a palette table in response to the encoder determining that all bits of the pixel component value have been evaluated. method.

9. the encoder generating a color index map that maps a selected number of pixel component values ​​to entries in the palette table.

9. The method of claim 8.

10. the plurality of pixels being pixels of a block of a frame; 9. The method of claim 8.

11. dividing the first distribution of pixel component values ​​into a plurality of bins; 9. The method of claim 8.

12. the encoder selecting the number of pixel component values ​​based on a count of pixel component values ​​in a plurality of pixels.

9. The method of claim 8.

13. the encoder calculating a first histogram based on a first number of bits of the pixel component values; 13. The method of claim 12.

14. the encoder calculating a second histogram based on a second number of bits of the pixel component values.

14. The method of claim 13.

15. 1. A system comprising: a memory configured to store pixel data; An encoder, The encoder comprises: determining a first distribution of pixel component values ​​based on the first number of bits for each pixel component value; determining a second distribution of the pixel component values ​​based on a second number of bits in each pixel component value in response to determining that all bits of the pixel component values ​​have not been evaluated; generating a palette table in response to determining that all bits of the pixel component value have been evaluated; [0023] system.

16. the encoder is configured to encode the pixel component values ​​using the palette table.

16. The system of claim 15.

17. the plurality of pixels being pixels of a block of a frame; 16. The system of claim 15.

18. the encoder is configured to iteratively determine the distribution of pixel component values ​​until all bits of the pixel component values ​​have been evaluated.

16. The system of claim 15.

19. the encoder configured to select the number of pixel component values ​​based on a count of pixel component values ​​in a plurality of pixels.

16. The system of claim 15.

20. the encoder is configured to calculate a first histogram based on a first number of bits of the pixel component values ​​that is less than a total number of bits of the pixel component values.

20. The system of claim 19.

Citation Information

Patent Citations

  • Image compression device and image restoration device

    JP2005354643A

  • Palette-based video coding

    JP2017513321A

  • Improved palette encoding for screen content encoding

    JP2017535169A