YUV-to-RGB conversion without multiplies using look-up tables and pre-clipping
First Claim
1. A color-space converter comprising:
- a video input for receiving video-input pixels in a YUV format, each video-input pixel having a Y component indicating brightness of the video-input pixel but not indicating a color of the video-input pixel, and a U component and a V component together indicating the color of the video-input pixel but not the brightness of the video-input pixel;
a pixel output for outputting the video-input pixels as output pixels converted to a RGB format, each output pixel having R, G, and B components indicating brightness of red, green, and blue colors of each output pixel;
a Y,V look-up table, receiving the Y component and receiving the V component but not receiving the U component of the video-input pixel, for storing a plurality of first entries for all combinations of possible values of the Y and V components, a selected first entry being selected by the Y and V components of the video-input pixel;
the selected first entry including a red field containing the R component that is an exact conversion of the Y and V components, the selected first entry also containing a first partial G component;
a Y,U look-up table, receiving the Y component and receiving the U component but not receiving the V component of the video-input pixel, for storing a plurality of second entries for all combinations of possible values of the Y and U components, a selected second entry being selected by the Y and U components of the video-input pixel;
the selected second entry including a blue field containing the B component that is an exact conversion of the Y and U components, the selected second entry also containing a second partial G component; and
an adder, receiving the first partial green component from the Y,V look-up table and receiving the second partial green component from the Y,U look-up table, the adder outputting a sum of the first and second partial green components as the G component of the output pixel,whereby partial green components are stored in two look-up tables and summed to generate the G component.
5 Assignments
0 Petitions
Accused Products
Abstract
A video-input stream to a personal computer (PC) is converted from YUV format to RGB format. Two look-up tables are used. One look-up table has the Y and V components as address inputs, while the other look-up table has Y and U components as address inputs. The address inputs select one data word in the table for the Y,V or Y,U pair. Each data word contains an exact conversion to either the red component R or the blue component B since the result of the functions R=Y+1.371*V is stored in one table while the result of the function B=Y+1.732*U is stored in the other table. Each table also contains a partial green component in each data word. The Y,U table contains the result of the partial-green function (Y/2-0.698*V) in each data word, while the other table contains the result of the partial-green function (Y/2-0.336*U). An adder adds the two partial-green results from the two tables to produce the green component G. Clipping of color components to a defined range is included in the tables because the data words stored are the clipped results. Since each table has only two of the YUV components as inputs rather than all three, the size of the table is greatly reduced, even though the results are exact and not approximated. Only one add and no multiplies are required, reducing processor loading.
-
Citations
20 Claims
-
1. A color-space converter comprising:
-
a video input for receiving video-input pixels in a YUV format, each video-input pixel having a Y component indicating brightness of the video-input pixel but not indicating a color of the video-input pixel, and a U component and a V component together indicating the color of the video-input pixel but not the brightness of the video-input pixel; a pixel output for outputting the video-input pixels as output pixels converted to a RGB format, each output pixel having R, G, and B components indicating brightness of red, green, and blue colors of each output pixel; a Y,V look-up table, receiving the Y component and receiving the V component but not receiving the U component of the video-input pixel, for storing a plurality of first entries for all combinations of possible values of the Y and V components, a selected first entry being selected by the Y and V components of the video-input pixel; the selected first entry including a red field containing the R component that is an exact conversion of the Y and V components, the selected first entry also containing a first partial G component; a Y,U look-up table, receiving the Y component and receiving the U component but not receiving the V component of the video-input pixel, for storing a plurality of second entries for all combinations of possible values of the Y and U components, a selected second entry being selected by the Y and U components of the video-input pixel; the selected second entry including a blue field containing the B component that is an exact conversion of the Y and U components, the selected second entry also containing a second partial G component; and an adder, receiving the first partial green component from the Y,V look-up table and receiving the second partial green component from the Y,U look-up table, the adder outputting a sum of the first and second partial green components as the G component of the output pixel, whereby partial green components are stored in two look-up tables and summed to generate the G component. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A YUV-to-RGB converter comprising:
-
a first table of conversion entries selected by a Y component and by a V component of an input pixel, the first table outputting an R component indicating a red color of an output RGB pixel and a first partial-green component; a second table of conversion entries selected by the Y component and by a U component of the input pixel, the second table outputting a B component indicating a blue color of the output RGB pixel and a second partial-green component; an adder, receiving the first and second partial-green components, for outputting a sum of the first and second partial-green components as a G component indicating a green color of the output RGB pixel; and frame-buffer means, receiving the R component from the first table, the B component from the second table, and the G component from the adder, for storing output RGB pixels for display that are converted from the Y, U, and V components of input pixels, whereby the Y, U, and V components of the input pixels are converted to the output RGB pixels by the first and second tables and the adder. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18)
-
-
19. A computer-implemented method for converting YUV pixels to RGB pixels, the computer-implemented method comprising the steps of:
-
receiving an input stream of input pixels in a YUV format, each input pixel having Y, U, and V components; forming a first address by concatenating the Y component and the V component; applying the first address to a first table, the first address selecting a selected first entry in the first table; writing a portion of the selected first entry as an R component for a converted pixel the converted pixel having a same brightness and color as the input pixel; sending a remaining portion of the selected first entry to an adder as a first partial-green component; forming a second address by concatenating the Y component and the U component; applying the second address to a second table, the second address selecting a selected second entry in the second table; writing a portion of the selected second entry as a B component for a converted pixel the converted pixel having a same brightness and color as the input pixel; sending a remaining portion of the selected second entry to the adder as a second partial-green component; adding the first partial-green component to the second partial-green component and outputting a sum as a G component for the converted pixel; and storing the converted pixel to a display buffer for display by a RGB display, each converted pixel having the R, G, and B components indicating brightness of red, green, and blue colors of each converted pixel; wherein each input pixel is in a YUV format having the Y component indicating brightness of the input pixel but not indicating a color of the input pixel, and the U and V components indicating the color of the input pixel but not the brightness of the input pixel, whereby YUV input pixels are converted to the converted pixels in RGB format. - View Dependent Claims (20)
-
Specification