This application relates to U.S. Ser. No. 12/692,835, filed Jan. 25, 2010, which is incorporated by reference in its entirety.
The present invention relates to a method and/or architecture for video codecs generally and, more particularly, to a memory access reordering for a transformation.
In video compression, samples or coefficients are transformed block by block inside a macroblock. Referring to
Referring to
When a transform block size is four data points (i.e., samples or coefficients) in a horizontal direction, sets of four contiguous data points are entered into the transform. When the transform block size is eight data points in the horizontal direction, sets of 8 contiguous data points are entered into the transform.
What is desired is a memory organization that may access eight or more contiguous data points in each clock cycle, regardless transform block size and transform type.
The present invention concerns an apparatus generally having a plurality of memories and a first circuit. The memories may be configured to store a plurality of first data points. The first data points generally form a two-dimensional block. The first data points may be arranged among the memories such that a load cycle from the memories accesses a rectangular region of the two-dimensional block. The load cycle generally comprises a plurality of read cycles, a different one of the read cycles corresponding to each one of the memories. The first circuit may be configured to (i) receive the first data points as read from the memories and (ii) generate a plurality of second data points by a video codec transformation of the first data points between a spatial domain and a frequency domain.
The objects, features and advantages of the present invention include providing a memory access reordering for a transformation that may (i) provide a hardware-only implementation, (ii) access multiple memories in parallel, (iii) access the memories in different orders based on transform sizes, (iv) access the memories in different orders based on transform type, (v) maintain a memory throughput independent of the access orders, (vi) transfer multiple data points in each read cycle, (vii) access 8 data points per clock cycle and/or (viii) access 16 data points per clock cycle.
These and other objects, features and advantages of the present invention will be apparent from the following detailed description and the appended claims and drawings in which:
Video is generally a sequence of pictures. Each picture may be divided into macroblocks. A macroblock is generally defined as 16H×16V region of two-dimensional samples. In video compression, luminance samples and chrominance samples of the macroblocks may be forward transformed block by block to convert from a spatial domain to a frequency domain. In decompression, transform coefficients may be inverse transformed block by block to reconstruct the samples.
A macroblock may be divided into one or more blocks generally referred to as partitions. Each of the partition may be further divided into one or more sub-partitions. A transform block may take on several sizes (e.g., 8H×8V, 8H×4V, 4H×8V, or 4H×4V). The block size may change per macroblock. Some video compression standards may allow different transform sizes inside a luminance macroblock on an 8H×8V basis. Typically, coefficients or samples are stored inside memory in hardware and accessed differently based on the different transform block sizes.
Some embodiments of the present invention use multiple (e.g., M) instances of memory and assign addresses to data points (e.g., luminance samples, chrominance samples or transform coefficients) so that multiple data points may be accessed on each load cycle. Each of the data points may be represented as several (e.g., 8) bits. The accesses are generally based on different transform block sizes and/or transform types. A load cycle is generally performed in each clock cycle. Some embodiments may use two instances of the memories and transfer several (e.g., N=4) data points per address such that eight data points may be read from the memories during a single clock cycle. Other embodiments may use four instances of the memories and transfer four data points per address such that sixteen data points may be read during a single clock cycle. Other numbers of memory instances and data points per read cycle may be implemented to meet the criteria of a particular application.
The data points generally form a two-dimensional block (e.g., a spatial block of video samples or a frequency block of transform coefficients) associated with a video field or video frame. The data points may be positioned among the memories such that each load cycle accesses a rectangular region of the two-dimensional block. Therefore, a sequence of one or more appropriate load commands may (i) cover different shaped and sized regions and (ii) accommodate different transform types (e.g., field transforms and frame transforms).
Referring to
The circuit 102 may implement a shared memory system. The circuit 102 is generally operational to buffer data used by the circuit 106. The circuit 102 may be logically configured as one or more memories (or buffers) allocated to a portion of the shared memory and associated control registers. The address signal ADDRESS may be used to access the memories. The data points read from the circuit 102 may be presented to the circuit 104 in the signal BUF.
The circuit 104 may implement a Direct Memory Access (DMA) unit. The circuit 104 is generally operational to load data from the circuit 102 to the circuit 106 in response to a load command received from the circuit 106 in the signal CMD. The circuit 104 may generate multiple address values in the signal ADDRESS to read the requested data from the memories within the circuit 102. The signal ADDRESS may form part of a read cycle that generally reads several (e.g., 4) data points from the circuit 102 as a single word. Each read cycle may be designed to read the data points in a single clock cycle. The multiple address values in the signal ADDRESS may be presented to the circuit 102 either in parallel or sequentially. The multiple data points may be received by the circuit 104 via the signal BUF from the circuit 102 either in parallel or sequentially. The data received by the circuit 104 in the signal BUF may be passed along to the circuit 106 in the signal DATA.
The circuit 106 may implement a processor circuit. The circuit 106 is generally operational to (i) initiate a load cycle be generating the signal CMD and (ii) perform a transform of an inverse transform on the data points received in the signal DATA. Each load cycle may be designed to request the data points from the circuit 102 in a single clock cycle. The transform operation may transform (convert) blocks of video samples (e.g., luminance samples and chrominance samples) received in the signal DATA from a spatial domain to a frequency domain. The inverse transform operation may transform (covert) blocks of transform coefficients received in the signal DATA from the frequency domain to the spatial domain.
Referring to
Referring to
Referring to
Referring to
Referring to
Returning to
Referring to
In the step 162, the circuit 106 may generate a command to load data points (e.g., video samples) from the circuit 102 to the circuit 106. The circuit 104 may respond to the load command in the step 164 by generating the signal ADDRESS to transfer data points from the circuit 102, through the circuit 104 to the circuit 106. In the step 166, the circuit 106 may determine if more data points should be read from the circuit 102. If more data points should be read (e.g., the YES branch of step 166), the circuit 106 may issue another command with a new address value in the step 162. Once all of the data points have been received by the circuit 106 (e.g., the NO branch of step 166), the circuit 106 may perform a forward transform on the data points in the step 168 to generate a block of transform coefficients.
Referring to
In the step 182, the circuit 106 may generate a command to load data points (e.g., transform coefficients) from the circuit 102 to the circuit 106. The circuit 104 may respond to the load command in the step 184 by generating the signal ADDRESS to transfer data points from the circuit 102, through the circuit 104 to the circuit 106. In the step 186, the circuit 106 may determine if more data points should be read from the circuit 102. If more data points should be read (e.g., the YES branch of step 186), the circuit 106 may issue another command with a new address value in the step 182. Once all of the data points have been received by the circuit 106 (e.g., the NO branch of step 186), the circuit 106 may perform an inverse transform on the data points in the step 188 to generate a block of recreated video samples.
Referring to
Referring to
Referring to
Access to the four 8H×8V blocks (
Block 2 and Block 3 may be accessed in a similar manner.
If the blocks size is 4 columns by 8 rows (
Blocks 3 to 7 may be accesses in a similar manner.
If the block size is 8 columns by 4 rows (
Blocks 3 to 7 may be accesses in a similar manner.
If the block size is 4 columns by 4 rows (
Blocks 5 to 15 may be accessed in a similar manner.
Referring to
To access eight data points from two memories M0 and M1 on every other line of the block 212 in each clock cycle, the following address assignments may be used:
Referring to
If the transform block sizes are 8H×8V (
Blocks 1 to 3 may be accessed in a similar manner.
If a block size is 4H×4V (
Blocks 1 to 15 may be accessed in a similar manner.
To access 16 samples in every other line inside a frame macroblock during each clock cycle for an 8H×8V block, the following address assignments may be used:
Address assignment in addition to the assignments shown in
Embodiments of the present invention may maintain memory access performance by a special arrangement data in multiple memories. In some embodiments, data points may be arranged among two memories such that eight data points may be accessed in each clock regardless transform block sizes. In other embodiments, four memories may be implemented such that 16 data points may be accessed in each clock cycle.
The functions performed by the diagrams of
The present invention may also be implemented by the preparation of ASICs (application specific integrated circuits), Platform ASICs, FPGAs (field programmable gate arrays), PLDs (programmable logic devices), CPLDs (complex programmable logic device), sea-of-gates, RFICs (radio frequency integrated circuits), ASSPs (application specific standard products) or by interconnecting an appropriate network of conventional component circuits, as is described herein, modifications of which will be readily apparent to those skilled in the art(s).
The present invention thus may also include a computer product which may be a storage medium or media and/or a transmission medium or media including instructions which may be used to program a machine to perform one or more processes or methods in accordance with the present invention. Execution of instructions contained in the computer product by the machine, along with operations of surrounding circuitry, may transform input data into one or more files on the storage medium and/or one or more output signals representative of a physical object or substance, such as an audio and/or visual depiction. The storage medium may include, but is not limited to, any type of disk including floppy disk, hard drive, magnetic disk, optical disk, CD-ROM, DVD and magneto-optical disks and circuits such as ROMs (read-only memories), RAMS (random access memories), EPROMs (electronically programmable ROMs), EEPROMs (electronically erasable ROMs), UVPROM (ultra-violet erasable ROMs), Flash memory, magnetic cards, optical cards, and/or any type of media suitable for storing electronic instructions.
The elements of the invention may form part or all of one or more devices, units, components, systems, machines and/or apparatuses. The devices may include, but are not limited to, servers, workstations, storage array controllers, storage systems, personal computers, laptop computers, notebook computers, palm computers, personal digital assistants, portable electronic devices, battery powered devices, set-top boxes, encoders, decoders, transcoders, compressors, decompressors, pre-processors, post-processors, transmitters, receivers, transceivers, cipher circuits, cellular telephones, digital cameras, positioning and/or navigation systems, medical equipment, heads-up displays, wireless devices, audio recording, storage and/or playback devices, video recording, storage and/or playback devices, game platforms, peripherals and/or multi-chip modules. Those skilled in the relevant art(s) would understand that the elements of the invention may be implemented in other types of devices to meet the criteria of a particular application. As used herein, the term “simultaneously” is meant to describe events that share some common time period but the term is not meant to be limited to events that begin at the same point in time, end at the same point in time, or have the same duration.
While the invention has been particularly shown and described with reference to the preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope of the invention.
Number | Name | Date | Kind |
---|---|---|---|
4591979 | Iwashita | May 1986 | A |
5107345 | Lee | Apr 1992 | A |
5408615 | Ishikawa | Apr 1995 | A |
6421385 | Uenoyama et al. | Jul 2002 | B1 |
6992673 | Oka et al. | Jan 2006 | B2 |
20040100472 | Linzer | May 2004 | A1 |
20050071542 | Weber | Mar 2005 | A1 |
20060103659 | Karandikar | May 2006 | A1 |
20080049035 | Kuroda | Feb 2008 | A1 |
20080068917 | Djordevic | Mar 2008 | A1 |
20080079743 | Watanabe | Apr 2008 | A1 |
Number | Date | Country | |
---|---|---|---|
Parent | 12692835 | Jan 2010 | US |
Child | 14575185 | US |