Patent ID: 12190847

DETAILED DESCRIPTION OF IMPLEMENTATIONS

In the following description, numerous specific details are set forth to provide a thorough understanding of the methods and mechanisms presented herein. However, one having ordinary skill in the art should recognize that the various implementations may be practiced without these specific details. In some instances, well-known structures, components, signals, computer program instructions, and techniques have not been shown in detail to avoid obscuring the approaches described herein. It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements.

Various systems, apparatuses, and methods for reducing three dimensional (3D) lookup table (LUT) interpolation error while minimizing on-chip storage are disclosed herein. A display controller receives source pixel data encoded in a first gamut. In one implementation, the display controller uses a 3D LUT to convert the source pixel data from the first gamut to a second gamut associated with a target display. However, due to the finite nature of the storage capacity of the memory structures containing the 3D LUT, interpolation error is introduced when converting from the first gamut to the second gamut. The interpolation error can be reduced by increasing the number of mapping points (i.e., vertices) stored in the 3D LUT, but this comes at a cost of increased on-chip storage.

In various implementations, one of the objectives of the techniques described herein is to reduce interpolation error without significantly increasing the on-chip storage requirements of the 3D LUT. Accordingly, in one implementation, rather than significantly increasing the number of vertices and the size of the LUT, the display controller stores mappings for centroids of the sub-cubes of the 3D representation of the gamut translation space. As used herein, the term “centroid” is defined as the geometric center of a sub-cube or other geometric shape (e.g., tetrahedron or otherwise). For example, the centroid of a cube is the point within the cube that is equidistant from each face of the cube.

In one implementation, when an input pixel is received by the display controller, the display controller identifies which sub-cube contains the input pixel. The mapping of the centroid of the sub-cube is retrieved along with mappings of the corresponding vertices of the sub-cube. The display controller uses the centroid mapping and vertex mappings to convert the input pixel from the first gamut to the second gamut. By using the centroid rather than only vertices of the sub-cube, the interpolation error is reduced when converting the input pixel from the first gamut to the second gamut. In one implementation, the display controller performs tetrahedral interpolation to convert the input pixel from the first gamut to the second gamut using the vertices and centroid of the sub-cube which contains the input pixel. In other implementations, the display controller performs other types of interpolation, including, but not limited to prism interpolation, trilinear interpolation, tricubic interpolation, radial interpolation, or any combination thereof.

In one implementation, rather than adding entries to the lookup table for centroid mappings of all sub-cubes of the 3D-representation of the gamut translation space, the display controller stores centroid mappings for only those sub-cubes which have an interpolation error greater than a threshold. In this way, for pixel locations within sub-cubes that have an interpolation error less than or equal to the threshold, traditional interpolation will be used to convert these pixel locations to the second gamut. Traditional interpolation uses four vertices of the sub-cube to interpolate to a second gamut representation for an interior point that falls within the tetrahedra defined by those four vertices. For pixel locations within sub-cubes that have an interpolation error greater than the threshold, interpolation using the centroid and three vertices of the sub-cube is performed. The smaller size of the tetrahedra bounded by the centroid and three vertices of the sub-cube results in a reduced gamut-conversion error as compared to performing traditional interpolation using four vertices of the sub-cube. This helps to mitigate the gamut-conversion error that is introduced when converting from the first gamut to the second gamut for pixels within sub-cubes that have more than a threshold amount of interpolation error.

Referring now toFIG.1, a block diagram of one implementation of a computing system100is shown. In one implementation, computing system100includes at least processors105A-N, input/output (I/O) interfaces120, bus125, memory controller(s)130, network interface135, memory device(s)140, display controller150, and display155. In other implementations, computing system100includes other components and/or computing system100is arranged differently. Processors105A-N are representative of any number of processors which are included in system100.

In one implementation, processor105A is a general purpose processor, such as a central processing unit (CPU). In one implementation, processor105N is a data parallel processor with a highly parallel architecture. Data parallel processors include graphics processing units (GPUs), digital signal processors (DSPs), field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), and so forth. In some implementations, processors105A-N include multiple data parallel processors. In one implementation, processor105N is a GPU which provides a plurality of pixels to display controller150to be driven to display155. In this implementation, processor105N can convert pixels of a source frame from a first gamut to a second gamut associated with display155. Alternatively, in another implementation, display controller150converts pixels of the source frame from the first gamut to the second gamut associated with display155and may include color assignment, scaling, alpha blending, and/or other functions. In this implementation, display controller150includes three-dimensional (3D) lookup table (LUT)152and any combination of hardware (e.g., control logic, processing elements) and/or software for converting pixels of the source frame from the first gamut to the second gamut. While 3D LUT152is shown as being located within display controller150, it should be understood that in other implementations, 3D LUT152can be located elsewhere in system100.

In one implementation, 3D LUT152includes the components illustrated in the expanded box shown below display controller150. In other implementations, 3D LUT152includes other components in other suitable arrangements. In one implementation, the logic for converting input pixels from a first gamut to a second gamut includes address decoder165, memory device(s)180storing pixel component values in the second gamut, and interpolation unit190. Address decoder165receives the pixel components160of an input pixel in the first gamut. In one implementation, pixel components160are N-bit red, green, and blue values for the input pixel, where N is a positive integer. Address decoder165conveys pixel components170to the appropriate memory device(s)180. In one implementation, pixel components170are the M most significant bits (MSBs) of pixel components160, where M is a positive integer. Pixel components170are used to identify the sub-cube or other geometric shape which bounds the input pixel in a 3D representation of the first gamut space. A lookup of memory device(s)180is performed using pixel components170to retrieve values of pixel components in a second gamut for vertices and one or more interior points185of this sub-cube or other geometric shape.

The retrieved pixel component values (in the second gamut) of vertices and interior point(s)185are conveyed to interpolation unit190. Also, address decoder165conveys pixel components175to interpolation unit190. In one implementation, pixel components175are the (N−M) least significant bits (LSBs) of pixel components160. Interpolation unit190performs interpolation using vertices and interior point(s)185and pixel components175to generate the pixel components195which represent the input pixel in the second gamut. Additional details on the gamut conversion process will be provided throughout the remainder of this disclosure.

Memory controller(s)130are representative of any number and type of memory controllers accessible by processors105A-N and I/O devices (not shown) coupled to I/O interfaces120. Memory controller(s)130are coupled to any number and type of memory devices(s)140. Memory device(s)140are representative of any number and type of memory devices. For example, the type of memory in memory device(s)140includes Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), NAND Flash memory, NOR flash memory, Ferroelectric Random Access Memory (FeRAM), or others.

I/O interfaces120are representative of any number and type of I/O interfaces (e.g., peripheral component interconnect (PCI) bus, PCI-Extended (PCI-X), PCIE (PCI Express) bus, gigabit Ethernet (GBE) bus, universal serial bus (USB)). Various types of peripheral devices (not shown) are coupled to I/O interfaces120. 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 so forth. Network interface135is used to receive and send network messages across a network.

In various implementations, computing system100is a computer, laptop, mobile device, game console, server, streaming device, wearable device, or any of various other types of computing systems or devices. It is noted that the number of components of computing system100varies from implementation to implementation. For example, in other implementations, there are more or fewer of each component than the number shown inFIG.1. It is also noted that in other implementations, computing system100includes other components not shown inFIG.1. Additionally, in other implementations, computing system100is structured in other ways than shown inFIG.1.

Turning now toFIG.2, a block diagram of one implementation of a system200for encoding a video bitstream which is sent over a network is shown. System200includes server205, network210, client215, and display250. In other implementations, system200can include multiple clients connected to server205via network210, with the multiple clients receiving the same bitstream or different bitstreams generated by server205. System200can also include more than one server205for generating multiple bitstreams for multiple clients. In one implementation, server205receives video or image frames in a first gamut and then encoder230converts the frames into a second gamut as part of the encoding process, where the second gamut is associated with display250. The encoded bitstream is then conveyed to client215via network210. Decoder240on client215decodes the encoded bitstream and generates video frames or images to drive to display250.

Network210is representative of any type of network or combination of networks, including wireless connection, direct local area network (LAN), metropolitan area network (MAN), wide area network (WAN), an Intranet, the Internet, a cable network, a packet-switched network, a fiber-optic network, a router, storage area network, or other type of network. Examples of LANs include Ethernet networks, Fiber Distributed Data Interface (FDDI) networks, and token ring networks. In various implementations, network210further includes remote direct memory access (RDMA) hardware and/or software, transmission control protocol/internet protocol (TCP/IP) hardware and/or software, router, repeaters, switches, grids, and/or other components.

Server205includes any combination of software and/or hardware for rendering video/image frames and/or encoding the frames into a bitstream. In one implementation, server205converts input video/image frames from a first gamut into a second gamut which is associated with display250. Server205includes one or more processors which execute any number of software applications. Server205also includes network communication capabilities, one or more input/output devices, and/or other components. The processor(s) of server205include any number and type (e.g., graphics processing units (GPUs), CPUs, DSPs, FPGAs, ASICs) of processors. The processor(s) are coupled to one or more memory devices storing program instructions executable by the processor(s). Similarly, client215includes any combination of software and/or hardware for decoding a bitstream and driving frames to display250. In one implementation, client215includes one or more software applications executing on one or more processors of one or more computing devices. Client215can be a computing device, game console, mobile device, streaming media player, or other type of device.

Referring now toFIG.3, a block diagram of another implementation of a computing system300is shown. In one implementation, system300includes GPU305, system memory325, and local memory330. System300also includes other components which are not shown to avoid obscuring the figure. GPU305includes at least command processor335, dispatch unit350, compute units355A-N, memory controller320, global data share370, level one (L1) cache365, and level two (L2) cache360. In other implementations, GPU305includes other components, omits one or more of the illustrated components, has multiple instances of a component even if only one instance is shown inFIG.3, and/or is organized in other suitable manners.

In various implementations, computing system300executes any of various types of software applications. In one implementation, as part of executing a given software application, a host CPU (not shown) of computing system300launches kernels to be performed on GPU305. Command processor335receives kernels from the host CPU and issues kernels to dispatch unit350for dispatch to compute units355A-N. Threads within kernels executing on compute units355A-N read and write data to global data share370, L1 cache365, and L2 cache360within GPU305. Although not shown inFIG.3, in one implementation, compute units355A-N also include one or more caches and/or local memories within each compute unit355A-N.

Referring now toFIG.4, a diagram of one implementation of a portion400of a lattice that represents a 3-D LUT is shown. In the interest of clarity, a single cube405from the lattice is shown in the portion400. The cube405is defined by a set of vertices410(only one indicated by a reference numeral in the interest of clarity) in the lattice. It is noted that cube405can also be referred to herein as a “sub-cube”. Each vertex410is addressed or identified by pixel component values in a first gamut. For the purposes of the discussion associated withFIG.4, the lattice is represented in the red-green-blue (RGB) color space. However, in other implementations, a lattice can be represented in other color spaces (e.g., YCbCr, XYZ, Lab). As shown inFIG.4, the three axes of the lattice correspond to the Red, Green, and Blue color components. For other color spaces, each axis of the lattice is associated with a corresponding component specific to the given color space. Each vertex410of cube405is identified based on the color component values. In one implementation, the color component values (R, G, B) of the vertices of the lattice are equal to a value indicated by a number (m) of MSBs of the complete color component values.

In a 3D LUT associated with the lattice shown inFIG.4, each of the vertices410of cube405is associated with mapped color component values in a second gamut. The color component values associated with the vertices410can therefore be used to map input colors in the first gamut to output colors in the second gamut by interpolating from the color component values associated with the vertices410to locations indicated by the input color in the first gamut. In some implementations, tetrahedral interpolation is used to determine an output color by interpolating from four of the vertices410to the location of the input color. For example, values of the color components in the second gamut associated with four of the vertices410can be interpolated to a location415in the cube405of the lattice that represents the 3-D LUT. The location415of an input pixel is indicated by the color components (R′+r′, G′+g′, B′+b′) of the input color of the first gamut. In a conventional 3-D LUT, the color component values (r′, g′, b′) of the input pixel with location415are equal to the remaining least significant bits (LSBs) of the input pixel's color component values in the first gamut. In one implementation, a tetrahedron of cube405is selected to perform tetrahedral interpolation based on the location415indicated by the color component values of the input pixel. For example, in one implementation six tetrahedra are formed by the eight vertices410of cube405. The tetrahedron which contains pixel location415will be chosen, and the vertices of this particular tetrahedron will be used for performing the subsequent tetrahedral interpolation. The color component values of the input pixel in the second gamut are then determined by interpolating from these four vertices of the selected tetrahedron to the location415. In one implementation, in order to reduce the interpolation error with the above approach, tetrahedral interpolation is performed using a tetrahedron formed by three vertices of cube405and the centroid (not shown) of cube405. When the centroid of cube405is taken into consideration, cube405can be partitioned into twelve tetrahedra using the centroid and the eight vertices410. This is compared to the six tetrahedra that are formed using only the eight vertices410. The smaller size of the tetrahedra allow for a reduced interpolation error since the distance from interior points to the vertices of the selected tetrahedron is reduced. More details on techniques for performing tetrahedral interpolation using the centroid of a cube will be provided throughout the remainder of this disclosure.

Referring now toFIG.5, a diagram of a sub-cube505with a centroid510A is shown. In one implementation, an address decoder of a conventional 3D LUT uses a subset of the most significant bits (MSBs) of the pixel component value (e.g., red, green, or blue) of an input pixel to identify the corresponding vertex in the 3D LUT. Consequently, the number of samples along each of the three dimensions of the 3D LUT is constrained to (2m+1), where m is the number of MSBs used by the address decoder to identify the vertices in the 3D LUT. For example, if m=4 for all three dimensions of the 3D LUT, the total number of vertices in the 3D LUT is 17×17×17 or 4913. Increasing the number of samples and the number of MSBs used by the address decoder to m=5 increases the number of vertices in the 3D LUT to 35,937.

In one implementation, instead of incrementing the value of m and causing the number of vertices per linear dimension to nearly double, a centroid (e.g. centroid510A of sub-cube505) can be added to each sub-cube of the 3D LUT. As previously noted, the change from having 17×17×17 vertices in the 3D pixel component space to 33×33×33 vertices increases the number of vertices from 4913 to 35,937. On the other hand, a 17×17×17 3DLUT with entries for 4913 distinct vertices has 16×16×16=4096 sub-cubes. Adding centroids to each sub-cube results in 4913+4096=9009 vertices, which is less than double the original number of vertices In comparison, increasing the vertex density from 17×17×17 to 33×33×33 increases the total number of vertices in the 3D LUT by more than 7 times. Accordingly, adding centroids to each sub-cube can reduce interpolation error while resulting in a smaller increase to the size of the 3D LUT.

Sub-cube505shows how the additional centroid510A is used when performing tetrahedral interpolation. Tetrahedral interpolation involves the look up of the 4 vertices of a tetrahedron for interpolation. For sub-cubes without a centroid, each sub-cube is divided into 6 tetrahedra and 4 vertices of one of the 6 tetrahedra are used for interpolation. When a sub-cube has a centroid, such as sub-cube505with centroid510A, each sub-cube may be divided into 12 tetrahedra and 4 vertices of one of the 12 tetrahedra are used for interpolation. The centroid510A provides a more accurate interpolation point for interpolation than using four vertices of the sub-cube because the smaller size of the tetrahedra results in a shorter distance from interior points to the vertices. This shorter distance reduces any interpolation error that is generated. Accordingly, using the centroid510A along with vertices510B-D when performing interpolation results in a smaller interpolation error as compared to using four vertices of the sub-cube505.

Turning now toFIG.6, a diagram of one implementation of performing tetrahedral interpolation is shown. In one implementation, a processing unit receives a source input pixel605to be converted from a source gamut to a target gamut of a display. It is assumed for the purposes of this discussion that the source input pixel605is located within tetrahedron600in a corresponding sub-cube within the 3D representation of the source gamut. Twelve tetrahedra are formed within the corresponding sub-cube based on the eight vertices of the sub-cube and the centroid604. It is also assumed for the purposes of this discussion that tetrahedron600is formed using three vertices601-603and the centroid604of the corresponding sub-cube.

To convert the source input pixel605from the source gamut to the target gamut, the processing unit retrieves mappings for three vertices601,602, and603and the mapping for centroid604from one or more 3D LUTs. The mappings store pixel component values for at least the target gamut. The vertices601-603and centroid604can also be referred to as the points A, B, C, D, respectively, and the associated pixel component values in the target gamut can be referred to as OA, OB, OC, OD, respectively. Also, the source input pixel605can also be referred to as point I.

The interpolated output value for a source pixel that maps to the input point605(also referred to as the input point I) is given by:
OI=(VA*OA+VB*OB+VC*OC+VD*OD)/V

where V is the volume of the tetrahedron600and Vi(i=A, B, C, D) is the volume for a sub-tetrahedron A, B, C, D, respectively. For example, VDis the volume for a sub-tetrahedron D bounded by the points IABC. The volumes VDand V share the same bottom surface ABC, and so the above equation can be rewritten as:
OI=OA*hA/HA+OB*hB/HB+OC*hC/HC+OD*hD/HD

where Hi(i=A, B, C, D) is the height of the tetrahedron600from the vertex i and B, C, D) is the height of the sub-tetrahedron (A, B, C, D) from input point605. For example, the height610is equivalent to HDand the height615is equivalent to hD. Output weights are defined as:
wi=(hi*Δ)/Hi

where Δ is the length of a side of the cube. The output value OIcan then be written as:
OI=(wA*OA+wB*OB+wC*OC+wD*OD)/Δ

It should be understood that the above is merely one example of a technique for performing tetrahedral interpolation using three vertices and a centroid of a sub-cube to calculate the pixel component values for a source pixel in the target gamut. In other implementations, other interpolation techniques using three vertices and a centroid of a sub-cube can be employed. By using the centroid of the sub-cube rather than a fourth vertex of the sub-cube when performing tetrahedral interpolation, the interpolation error is reduced when calculating the pixel component values in the target gamut.

Referring now toFIG.7, one implementation of a method700for reducing three dimensional (3D) lookup table interpolation error while minimizing on-chip storage is shown. For purposes of discussion, the steps in this implementation and those ofFIG.8-10are shown in sequential order. However, it is noted that in various implementations of the described methods, one or more of the elements described are performed concurrently, in a different order than shown, or are omitted entirely. Other additional elements are also performed as desired. Any of the various systems or apparatuses described herein are configured to implement method700.

A display controller receives a source pixel from a source image, where the source image is represented in a first gamut (block705). Next, the display controller accesses one or more lookup tables to find vertices of a sub-cube which bounds pixel components of the source pixel in a three dimensional (3D) representation of the first gamut (block710). It is assumed for the purposes of this discussion that the lookup table(s) store a plurality of entries, where each entry includes a mapping from the first gamut to a second gamut, where the second gamut is associated with a display on which the source image will be displayed. In another implementation, the display controller finds the vertices of another type of geometric shape (e.g., tetrahedron, rectangular prism) in block710that bounds the pixel components of the source pixel.

Then, the display controller determines whether an interior point of the sub-cube is stored in the lookup table(s) (conditional block715). In one implementation, the interior point is a centroid of the sub-cube. In other implementations, the interior point is not located at the centroid of the sub-cube. For example, in another implementation, the sub-cube includes multiple interior points stored in the lookup table(s). In this implementation, the display controller selects the interior point which is closest to the source pixel. In a further implementation, the interior point is located on a boundary surface of the sub-cube (or other geometric shape). Accordingly, an interior point can be defined as any point within the geometric shape (e.g., sub-cube) or on a boundary surface of the geometric shape that is not a vertex of the geometric shape.

If an interior point of the sub-cube is stored in the lookup table(s) (conditional block715, “yes” leg), then the display controller retrieves mappings of the interior point and three corresponding vertices of the sub-cube from the lookup table(s) (block720). Alternatively, if multiple interior points are stored in the lookup table(s), the display controller could retrieve mappings of two or more interior points and some number of vertices of the sub-cube in block720. Next, the display controller performs tetrahedral interpolation with the mappings of the interior point and three corresponding vertices of the sub-cube to convert the source pixel to a target pixel in a second gamut, where the second gamut is different from the first gamut (block725). Then, the display controller provides the target pixel to a display (block740). Alternatively, the display controller can write the target pixel to a memory device in block740, or the display controller can convey the target pixel to another functional unit for additional processing in block740.

If the sub-cube does not have a interior point stored in the lookup table(s) (conditional block715, “no” leg), then the display controller retrieves mappings of four corresponding vertices of the sub-cube from the lookup table(s) (block730). Next, the display controller performs tetrahedral interpolation with the mappings of the four corresponding vertices of the sub-cube to convert the source pixel to a target pixel in the second gamut (block735). Then, the display controller provides the target pixel to a display (block740). After block740, method700ends. It is noted that method700can be performed for each source pixel of the source image.

Turning now toFIG.8, one implementation of a method800for storing mappings of centroids in a 3D LUT for sub-cubes with greater than a threshold amount of interpolation error is shown. A processing unit determines a mapping from a first gamut to a second gamut (block805). The processing unit can determine the mapping in response to receiving a source image or video frame to encode in preparation for display. For example, a source image or video frame is encoded according to the first gamut, and a display is capable of displaying the source image or video frame according to the second gamut. Next, the processing unit calculates a plurality of points for each pixel component dimension and maps these points from the first gamut to a second gamut (block810). For example, in one implementation, the processing unit calculates 17 points for each pixel component dimension and maps these points from the first gamut to the second gamut. For the RGB color space, the dimensions refer to red, green, and blue. In other implementations, the processing unit calculates other numbers of points for each pixel component dimension.

Then, the processing unit treats the plurality of points that were calculated as vertices in a 3D space (block815). Next, the processing unit partitions the 3D space based on locations of the vertices (block820). Then, the processing unit calculates the interpolation error for each sub-cube of a plurality of sub-cubes that are bounded by the plurality of vertices of the 3D space, where the interpolation error is an error in mapping between the first gamut to the second gamut for points within the sub-cube when interpolating from the vertices (block825). For example, in one implementation, the processing unit calculates the interpolation error at N separate points within the sub-cube when mapping from the first gamut to the second gamut using interpolation from the vertices, where N is a positive integer. The processing unit can then calculate the sum of the interpolation error for the N separate points, calculate the maximum of the interpolation error for the N separate points, or otherwise. Based on the technique utilized, the processing unit can generate a measure or score of the interpolation error for each sub-cube.

Next, the processing unit determines which sub-cubes have greater than a threshold amount of interpolation error (block830). For example, in one implementation, the processing unit compares the sum of the interpolation error for the N points within each sub-cube to a threshold. In other implementations, the processing unit uses other techniques to determine if the interpolation error of a sub-cube is greater than the threshold. Then, the processing unit calculates mappings from the first gamut to the second gamut for centroids of these identified sub-cubes (block835). Next, the processing unit stores the centroid mappings in a LUT for use in converting pixel component values from the first gamut to the second gamut (block840). For example, the centroid mappings can be utilized when performing tetrahedral interpolation to convert pixel component values from the first gamut to the second gamut. After block840, method800ends.

Referring now toFIG.9, one implementation of a method900for calculating centroid mappings for a particular number of sub-cubes is shown. A processing unit partitions a 3D representation of a gamut mapping space into a plurality of sub-cubes (block905). Next, the processing unit determines the N sub-cubes with the highest amount of interpolation error, where N is a positive integer (block910). In one implementation, the value of N is determined by the number of remaining available entries in one or more lookup tables after mappings for all of the vertices of the gamut mapping space have been stored. For example, in one implementation, if the lookup tables have a total capacity of 4928 entries, and the number of vertices in the gamut mapping space is equal to 4913, then N would be equal to 15 (i.e., 4928−4913). After block910, the processing unit calculates centroid mappings for the N sub-cubes with the highest amount of interpolation error (block915). Next, the processing stores the centroid mappings in one or more lookup tables (block920). After block920, method900ends.

Turning now toFIG.10, one implementation of a method1000for utilizing optimized inter-gamut-space mapping LUT(s) is shown. A processing unit generates inter-gamut-space mappings for N×N×N vertices, where N is a positive integer greater than one (block1005). Also, the processing unit generates inter-gamut-space mappings for (N−1)3centroids of (N−1)3sub-cubes formed by the N×N×N vertices (block1010). In other implementations, the processing unit generates inter-gamut-space mappings for only a subset of the (N−1)3centroids of the (N−1)3sub-cubes. The processing unit stores entries for the inter-gamut-space mappings of the N×N×N vertices and the (N−1)3centroids in one or more lookup tables (LUTs) for converting pixel component values from a first gamut to a second gamut (block1015). In another implementation, the processing unit generates pixel component values for centroids of one or more tetrahedrons within each (N−1)3sub-cube of the N×N×N vertices in block1010and then stores the entries for the centroids of tetrahedrons in the 3D LUT in block1015. After block1015, method1000ends.

Referring now toFIG.11, one implementation of a method1100for using variable resolution of sub-cubes depending on corresponding interpolation error is shown. A processing unit measures the interpolation error for a plurality of sub-cubes of a 3D representation of a pixel component space (block1105). Alternatively, in another implementation, the processing unit receives previously calculated measurements of the interpolation error for the plurality of sub-cubes in block1105. It is noted that the number of sub-cubes in the 3D representation of the pixel component space can vary according to the implementation. Also, in another implementation, the processing unit measures the interpolation error for other geometric shapes besides sub-cubes in block1105.

Then, for each sub-cube, the processing unit determines if the measured interpolation error of the sub-cube is greater than a first threshold (conditional block1110). If the measured interpolation error of the sub-cube is greater than the first threshold (conditional block1110, “yes” leg), then the processing unit uses a higher resolution setting for the number of mapping points in a 3D lookup table for the sub-cube (block1115). For example, in one implementation, the higher resolution setting is a highest possible resolution setting, with the highest possible resolution setting being 8×8×8 in one particular implementation. In other implementations, the higher resolution setting can be any of various other values. In one implementation, the processing unit divides a sub-cube into eight or more level 2 sub-cubes in block1115. In another implementation, the processing unit divides a tetrahedron into four or more tetrahedral in block1115. In other implementations, the processing unit increases the resolution by other amounts and/or for other types of geometric shapes in block1115.

If the measured interpolation error of the sub-cube is less than or equal to the first threshold (conditional block1110, “no” leg), then the processing unit determines if the measured interpolation error of the sub-cube is greater than a second threshold (conditional block1120). If the measured interpolation error of the sub-cube is greater than the second first threshold (conditional block1120, “yes” leg), then the processing unit uses a medium resolution setting for the number of mapping points in a 3D lookup table for the sub-cube (block1125). For example, in one implementation, the medium resolution setting is 5×5×5. In other implementations, the medium resolution setting can be any of various other values. It is assumed for the purposes of this discussion that the medium resolution setting is less than the higher resolution setting. If the measured interpolation error of the sub-cube is less than or equal to the second threshold (conditional block1120, “no” leg), then the processing unit uses a lower resolution setting for the number of mapping points in a 3D lookup table for the sub-cube (block1130). For example, in one implementation, the lower resolution setting is 2×2×2. In other implementations, the lower resolution setting can be any of various other values. It is assumed for the purposes of this discussion that the lower resolution setting is less than the medium resolution setting. After blocks1115,1125, and1130, if there are any other sub-cubes for which a resolution setting needs to be calculated (conditional block1135, “yes” leg), then method1100returns to conditional block1110. Otherwise, if resolution settings have already been determined for all of the sub-cubes (conditional block1135, “no” leg), then method1100ends.

It should be understood that in other implementations, the processing unit can compare the interpolation error to more than two different thresholds. In these implementations, the processing unit can have more than three different resolution settings. Also, in some implementations, rather than comparing the interpolation error of a sub-cube to one or more thresholds, the processing unit uses a formula to convert interpolation error into a resolution setting for the sub-cube. In other words, the processing unit sets a resolution of a number of mapping points in a 3D lookup table for the sub-cube which is proportional to the interpolation error of the sub-cube. Accordingly, the higher the interpolation error is for a given sub-cube, the higher the resolution will be for the given sub-cube.

In various implementations, 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 or special purpose processor are contemplated. In various implementations, such program instructions are represented by a high level programming language. In other implementations, the program instructions are compiled from a high level programming language to a binary, intermediate, or other form. Alternatively, program instructions are written that describe the behavior or design of hardware. 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 mediums. The storage medium is accessible by a computing system during use to provide the program instructions to the computing system for program execution. Generally speaking, such a computing system includes at least one or more memories and one or more processors configured to execute program instructions.

It should be emphasized that the above-described implementations are only non-limiting examples of implementations. Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.