Method and system for decimating an indexed set of data elements

Information

  • Patent Application
  • 20040034641
  • Publication Number
    20040034641
  • Date Filed
    August 13, 2002
    22 years ago
  • Date Published
    February 19, 2004
    20 years ago
Abstract
A method and system are disclosed for decimating an indexed set of data elements to generate a decimated set of data elements. The indexed set of data elements are grouped into groups of at least two data elements per group. The indexes of the data elements in each group are used to address a look-up-table (LUT) that is pre-programmed to perform the decimation operation. For each group of data elements presented to address the LUT, a decimated data value is output from the LUT. The decimated data value is a function of the data values of the corresponding data elements addressing the LUT.
Description


BACKGROUND OF THE INVENTION

[0001] Embodiments of the present invention relate generally to a method and system for performing data decimation, and more particularly for decimating along at least one dimension of an array of video pixels in a video processing system and/or graphics subsystem.


[0002] Decimation of a frame of pixels to scale the frame is a common function in a video processing system. In particular, decimation along the horizontal dimension of the frame is often performed.


[0003] Typically, the decimation function is performed in hardware using a digital filter to effectively collapse groups of two or more pixels, along the horizontal dimension of the frame of pixels, into a single pixel per group. The digital filter is often implemented using hardware elements such as multipliers, adders, and multiplexers.


[0004] For example, a 2-tap digital filter is commonly used to average pairs of pixels to accomplish 2-to-1 decimation. Such traditional hardware implementations may be inflexible and limit the types of decimation that may be performed and the types of video formats that may be used such as, for example, the YUVA digital video format.


[0005] It is desirable to have a more flexible, programmable architecture that may handle many types of decimation formats including integer decimation, non-integer decimation, simple averaging, complex digital filtering, etc.


[0006] Further limitations and disadvantages of conventional and traditional approaches will become apparent to one of skill in the art, through comparison of such systems with embodiments of the present invention as set forth in the remainder of the present application with reference to the drawings.



BRIEF SUMMARY OF THE INVENTION

[0007] Certain embodiments of the present invention provide a method and system for decimating an indexed set of data elements.


[0008] A method of the present invention provides for decimating an indexed set of data elements to generate a decimated set of data elements. The indexed set of data elements are arranged into groups of at least two data elements per group. The indexes of the data elements in each group are used to address a look-up-table (LUT) that is pre-programmed to perform the decimation operation. For each group of data elements presented to address the LUT, a decimated data value is output from the LUT. The decimated data value is a function of the data values of the corresponding data elements addressing the LUT.


[0009] A system of the present invention provides a memory module storing an indexed set of data elements and a programmable memory device storing a decimation look-up-table (LUT). At least one FIFO is used to pipeline at least two sets of index values from the memory module to address lines of the programmable memory device. A host processor generates the decimation LUT according to a decimation algorithm and downloads the decimation LUT to the programmable memory device. The programmable memory device outputs a set of decimation data values as the programmable memory device is addressed by the at least two sets of index values corresponding to said indexed set of data elements.


[0010] Certain embodiments of the present invention afford an approach for decimating along at least one dimension of an array of pixels in a video processing system by indexing into a pre-programmed decimation LUT.


[0011] These and other advantages and novel features of the present invention, as well as details of an illustrated embodiment thereof, will be more fully understood from the following description and drawings.







BRIEF DESCRIPTION OF THE DRAWINGS

[0012]
FIG. 1 is a schematic block diagram of a system for decimating an indexed set of data elements in accordance with an embodiment of the present invention.


[0013]
FIG. 2 is an exemplary illustration of generating a decimation LUT from an initial set of indexed data values in accordance with an embodiment of the present invention.


[0014]
FIG. 3 is an illustration of the YUVA video format that is used in accordance with an embodiment of the present invention.


[0015]
FIG. 4 is a flowchart of a method for performing decimation of an indexed set of data elements using the system of FIG. 1 in accordance with an embodiment of the present invention.







DETAILED DESCRIPTION OF THE INVENTION

[0016]
FIG. 1 is a schematic block diagram of a system 100 for decimating an indexed set of data elements in accordance with an embodiment of the present invention. The system 100 comprises a memory module 110, a FIFO 120, a programmable memory device 130, and a host processor 140.


[0017] In accordance with an embodiment of the present invention, the memory module 110 interfaces to the input of the FIFO 120. The output of the FIFO 120 interfaces to the address inputs of the programmable memory device 130. The host processor 140 interfaces to the programmable memory device 130 and the memory module 110.


[0018] The memory module 110 stores an indexed set of data elements such as a frame of video pixel data. The memory module 110 may store a single frame of video pixel data or multiple frames of video pixel data. Associated with each element of the indexed set of data elements is an index value and a data value stored in memory module 110.


[0019] Referring to FIG. 2, in an embodiment of the present invention, each element in the indexed set of data elements may take on one of 16 possible data values and each possible data value has a unique index value (0×0 to 0×F in hex).


[0020] In an embodiment of the present invention, the data values represent colors in a YUVA video format (see FIG. 3). Each data value comprises a 32-bit word and each 32-bit word comprises 4 components of 8 bits each. The first 8-bit component corresponds to the Y component and represents the luminance of the color. The second 8-bit component corresponds to the U component and represents the color difference (blue) of the color. The third 8-bit component corresponds to the V component and represents the color difference (red) of the color. The fourth 8-bit component corresponds to the A component and represents the alpha value of the color. In other embodiments of the present invention, other video formats such as, for example, RGB, YUV, or RGBA may be used.


[0021] In an embodiment of the present invention, under the control of host processor 140, the memory module 110 pipelines index values of the indexed set of data elements to FIFO 120 as grouped pairs of index values. Each index value comprises 4 bits (corresponding to one of the 16 possible data values or colors). Each pair of index values output from the FIFO 120 serve as an address to programmable memory device 130. For each address presented to programmable memory device 130, a decimated output value (32-bits) is output from programmable memory device 130 in the YUVA format. In an embodiment of the present invention, the programmable memory device comprises a SRAM. As all the pairs of index values are pipelined through the FIFO 120, a decimated set of data elements is formed.


[0022] Referring to FIG. 4, in step 210 of method 200, the indexed set of data elements are grouped based on a decimation factor (2:1, 3:2, 3:1, etc.). In step 220, the index values of the grouped data elements are pipelined through the FIFO 120 to address a decimation look-up-table (LUT) stored in programmable memory device 130. For each grouped pair of index values addressing the decimation LUT, the programmable memory device 130 outputs a decimation output value in step 230.


[0023] The decimated output values are a function of the decimation LUT stored in programmable memory device 130. In an embodiment of the present invention, the decimation LUT is generated from the 16 possible data values indexed by 0×0 to 0×F hex (CLUT 4 data) (see FIG. 2). A decimation algorithm 141 in host processor 140 is used to generate the decimation LUT.


[0024] Referring to FIG. 2, in an embodiment of the present invention, a decimation LUT 131 (CLUT 8) having 256 32-bit entries may be generated to allow, for example, 2-to-1 decimation of the indexed set of data elements. Any two data elements of the indexed set of data elements may be grouped together and collapsed into a single data element using the decimation LUT 131 and the index values 132 of the 16 possible data values.


[0025] For example, if a first data element has index value 0×3 and a second data element has index value 0×F, then a new address or index value 133 may be formed as 0×3F which is the combination of the two index values. The new index value 0×3F may serve as one of the 256 address locations in the decimation LUT. The 32-bit value stored in address 0×3F of the decimation LUT may be, for example, the simple average of the data values corresponding to index value 0×3 and index value 0×F. As a result, all 256 entries of the decimation LUT may be generated by averaging the data values from all of the possible combinations of the 16 original possible data values with index values 132 (0×0 to 0×F). As pairs of index values 133 of the indexed set of data elements are presented as addresses to programmable memory device 130, decimated output values are generated corresponding to the average of the data values of the pairs of index values.


[0026] The effective decimation factor depends on the way the elements of the indexed set of data elements are grouped. For example, in an embodiment of the present invention, if the data elements are simply grouped as pairs with each data element appearing in just one group, then 2-to-1 decimation is achieved. That is, every grouped pair is collapsed into a single output data element. For example, for four adjacent pixels in the indexed set of data elements (P1, P2, P3, and P4), then [P1, P2] may form a paired group and [P3, P4] may form a paired group. As a result, the decimation LUT outputs a decimation value for the group [P1, P2] and another decimation value for the group [P3, P4], thus collapsing four pixels into two pixels (i.e. 2-to-1 decimation).


[0027] Now, if data elements are grouped as pairs with any two adjacent groups sharing a data element, then 3-to-2 decimation is achieved. For example, for three adjacent pixels in the indexed set of data elements (P1, P2, and P3), then [P1, P2] may form a paired group and [P2, P3] may form a paired group. As a result, the decimation LUT outputs a decimation value for the group [P1, P2] and a decimation value for the group [P2, P3]. Therefore, for any three consecutive pixels in the indexed set of data elements, two decimated pixel values are output yielding 3-to-2 decimation.


[0028] In other embodiments of the present invention, other groupings may be achieved as well. For example, 3-to-1 decimation may be achieved if the indexed set of data elements are grouped into groups of three pixels each and the system architecture is designed to support three index values addressing the programmable memory device 130 (i.e. 4 address inputs per index value, etc.).


[0029] The decimation algorithm 141 may support many different groupings of data elements and decimation schemes. For example, in an embodiment of the present invention, the decimation algorithm 141 may be programmed to generate a decimation LUT that effectively performs low-pass filtering on groups of 3 data elements at a time to achieve 3-to-1 compression instead of just doing a simple averaging. Other complex functions may be applied as well in other embodiments.


[0030] Also, in an embodiment of the present invention, the decimation algorithm 141 may be programmed to process each component of the YUVA format separately. For example, if a simple averaging of pairs of pixels is performed to achieve 2-to-1 decimation, the averaging may be performed separately on each 8-bit component of the YUVA data elements such that no spill-over or overlap occurs between the various components.


[0031] Other embodiments of the present invention are not limited to the decimation of video pixel data. For example, an alternative embodiment of the present invention may be used to decimate an indexed set of data elements representing digital audio data.


[0032] The various elements of the system and method may be combined or separated according to various embodiments of the present invention. For example, the programmable memory device 130 may be separated into two programmable memory devices with each device being addressed by a single 4-bit index value pipelined from a single FIFO in accordance with an embodiment of the present invention (i.e. use two FIFO's).


[0033] Also, in accordance with an embodiment of the present invention, the programmable memory device 130 may not be programmed within system 100 by host processor 140. Instead, the programmable memory device may be an EEPROM that is programmed before installation into the system 100.


[0034] In an alternative embodiment of the present invention, the memory module 110 may only store index values of the indexed set of data values and not the data values themselves. The relationship between the index values and the data values may be established offline outside of the system 100 and, therefore, the actual data values of the frames of video pixel data may not need to be stored in the system 100.


[0035] In a further alternative embodiment of the present invention, decimation may take place in two dimensions (e.g. horizontal and vertical) by using two FIFO's. A first FIFO may be used to pipeline horizontal groups of index values to the programmable memory device 130 and a second FIFO may be used to pipeline vertical groups of index values to the programmable memory device 130.


[0036] In summary, certain embodiments of the present invention afford an approach for decimating frames of video pixels in a video processing system by indexing into a pre-programmed decimation LUT.


[0037] While the invention has been described with reference to certain embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from its scope. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.


Claims
  • 1. A method to decimate an indexed set of data elements, said method comprising: arranging said indexed set of data elements into groups of at least two data elements; addressing a pre-programmed look-up-table (LUT) using at least two index values corresponding to said at least two data elements in each of said groups; and outputting a decimated data value from said LUT in response to each of said groups to generate a decimated set of data elements.
  • 2. The method of claim 1 further comprising pre-programming said LUT to output said decimated data value when addressed by said at least two index values.
  • 3. The method of claim 1 wherein said indexed set of data elements is decimated by an integer factor to generate said decimated set of data elements.
  • 4. The method of claim 1 wherein said indexed set of data elements is decimated by a non-integer factor to generate said decimated set of data elements.
  • 5. The method of claim 1 wherein said decimated data value comprises a filtered data value corresponding to said LUT being pre-programmed to filter data values of said at least two data elements.
  • 6. The method of claim 1 wherein said decimated data value comprises an average data value corresponding to said LUT being pre-programmed to average data values of said at least two data elements.
  • 7. The method of claim 1 wherein said decimated data value comprises at least two components, and wherein each of said at least two components is a function of corresponding components of data values of said at least two data elements.
  • 8. The method of claim 1 wherein each data element of said at least two data elements comprises a data value in a YUVA format.
  • 9. The method of claim 1 wherein said decimated data value is in a YUVA format.
  • 10. The method of claim 1 wherein each index value of said at least two index values comprises 4 bits.
  • 11. The method of claim 1 wherein said decimated data value comprises 32 bits.
  • 12. The method of claim 1 wherein each data value of each of said at least two data elements comprises 32 bits.
  • 13. The method of claim 1 wherein said decimated data value changes when at least one of said at least two index values changes.
  • 14. The method of claim 1 wherein said indexed set of data elements is decimated along a horizontal dimension of said indexed set of data elements to generate said decimated set of data elements.
  • 15. The method of claim 1 wherein said indexed set of data elements is decimated along a vertical dimension of said indexed set of data elements to generate said decimated set of data elements.
  • 16. The method of claim 1 wherein said LUT comprises a programmable memory device.
  • 17. The method of claim 1 wherein said LUT stores at least 256 decimated data values.
  • 18. The method of claim 1 wherein said indexed set of data elements comprise video pixel data.
  • 19. A system to decimate an indexed set of data elements, said apparatus comprising: a memory module storing said indexed set of data elements; a programmable memory device storing a decimation lookup-table (LUT); at least one FIFO to pipeline at least two sets of index values from said memory module to address lines of said programmable memory device; and a host processor to download said decimation LUT to said programmable memory device.
  • 20. The system of claim 19 wherein said host processor includes a decimation algorithm used to generate said decimation LUT from a pre-defined set of indexed data values.
  • 21. The system of claim 19 wherein said indexed set of data elements comprises video pixel data and corresponding index values.
  • 22. The system of claim 19 wherein said at least two sets of index values correspond to groups of at least two data elements of said indexed set of data elements.
  • 23. The system of claim 19 wherein said programmable memory device outputs a decimated data value when addressed by at least two index values from said at least two sets of index values.
  • 24. The system of claim 19 wherein said indexed set of data elements is decimated by an integer factor to generate a decimated set of data elements.
  • 25. The system of claim 19 wherein said indexed set of data elements is decimated by a non-integer factor to generate a decimated set of data elements.
  • 26. The system of claim 19 wherein each index value of said at least two sets of index values comprises 4 bits.
  • 27. The system of claim 19 wherein said programmable memory device outputs a 32-bit decimation value in a YUVA format when addressed by at least two index values from said at least two sets of index values.
  • 28. The system of claim 19 wherein each data value corresponding to each data element of said indexed set of data elements comprises a 32-bit word in a YUVA format.
  • 29. The system of claim 19 wherein said programmable memory device outputs a 32-bit decimation value that is a function of the data values corresponding to at least two index values from said at least two sets of index values.
  • 30. The system of claim 19 wherein said indexed set of data elements is decimated along a horizontal dimension of said indexed set of data elements to generate a decimated set of data elements.
  • 31. The system of claim 19 wherein said indexed set of data elements is decimated along a vertical dimension of said indexed set of data elements to generate a decimated set of data elements.
  • 32. The system of claim 19 wherein said programmable memory device stores at least 256 32-bit decimation values.
  • 33. The system of claim 19 wherein output values of said programmable memory device comprise filtered data values corresponding to said decimation LUT being pre-programmed to filter data values corresponding to said at least two sets of index values.
  • 34. The system of claim 19 wherein output values of said programmable memory device comprise averaged data values corresponding to said decimation LUT being pre-programmed to average data values corresponding to said at least two sets of index values.