The present disclosure generally relates to image processing.
The use of video information, which may contain corresponding audio information, is already a tremendously widespread source of information and is more widespread every day. Not only is more video information used and conveyed, but the information is more complex, with more information contained in video transmissions. In addition, there is a strong desire for better video resolution in images. Along with the increases in content and resolution are completing desires for faster processing of the video information (or at least not slower processing) and for reduced cost to process the information.
To help provide video content with better resolution and/or faster processing speeds, video information may be compressed. Various video compression techniques exist, such as H.264/MPEG-4 AVC, VC-1, MPEG-2, etc. These compression techniques may reduce the amount of data analyzed by receivers, which may help the receivers process video information faster and provide better resolution in images. Some compression techniques, for example, H.264 and VC-1, use block motion compensation (BMC). Using BMC, frames are partitioned in blocks of pixels (e.g., macroblocks of 16×16 pixels in MPEG). In some forms of motion compensation, each block is predicted from a block of equal size in a reference frame; in other forms, the encoder may dynamically select the size of the blocks. The blocks are shifted to the position of the predicted block. This shift is represented by a motion vector that is encoded into the bit-stream.
The subject matter disclosed herein provides methods and apparatus, including computer program products, for providing a context manager.
In one aspect, there is provided a system including a video decoder and a context manager. The context manager is coupled to the video decoder. The context manager may manage context information for decoding video data (e.g., macroblocks). The context manager may prefetch context information representative of a first macroblock before a second macroblock is decoded by the video decoder. The first macroblock may be adjacent to the second macroblock. The prefetched context information enables the video decoder to decode the second macroblock.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive. Further features and/or variations may be provided in addition to those set forth herein. For example, the implementations described herein may be directed to various combinations and subcombinations of the disclosed features and/or combinations and subcombinations of several further features disclosed below in the detailed description.
The subject matter described herein describes techniques for managing video context information, which includes information for use in deriving future image information from past image information. For example, a context manager hardware block may be implemented to interact with a video decoder to provide information to the decoder for processing video information. The context manager prefetches macroblock information for the previously decoded macroblocks adjacent to (e.g., to the left of, directly above, above and to the left, and above and to the right) a macroblock to be decoded. The context manager may also prefetch context information from previously decoded macroblocks that occupy (e.g., correspond to) the same or similar spatial position as the current macroblock but in a different frame (co-located context). The context manager provides the prefetched data to the video decoder for use by the video decoder to decode the current pixel macroblock. The context manager may organize the macroblock data and write these data to memory. The context manager may be implemented in other ways as well.
In other implementations, the subject matter described herein may provide one or more of the following capabilities. Video decompression and/or decoding (e.g., using H.264 or VC-1, AVS, MPEG-4, XVID, and DIVX) may be accelerated. Block motion compensation processing speed may be increased. Firmware may be allowed to write a number of settings to a centralized location, which may, in some implementations, reduce the number of interactions it must make with individual hardware blocks. The capability may be provided to enhance the performance of a digital video decoder through higher speed bit-rate.
Referring to
Referring also to
For example, in the VC-1 compression technique, the context manager 10 processes bitplane data. The reverse entropy block 16 decodes the bitplane data and utilizes the macro memory 34 of the context manager 10 for temporary storage. The reverse entropy block 16 requests the context manager 10 to write the bitplane data to the memory 14. The bitplane data in the memory 14 is used by the firmware processor 12 to determine settings during the decode process, but may not be pre-fetched by the context manager 10.
The context manager 10 includes a handshaking protocol to allow it to communicate with the various stages of the video decoder 120 (e.g., blocks (also referred to as stages) 16, 18, 20 and 22 of
One or more of the decoder blocks 16, 18, 20, 22 may make a read request at the same time and the sub-block arbiter 30 may perform traffic control functionality and decide which decoder block 16, 18, 20, 22 gets the next piece of data. The sub-block arbiter 30 also performs a traffic control functionality for the writing of data from the reverse entropy block 16, the inverse transform block 18, and the motion compensation block 20. The sub-block arbiter 30 decides which of the decoder blocks 16, 18, 20, 22 gets access to the macro memory 34. The sub-block arbiter 30 is connected to the return read data block 32 and the next arbiter block 38.
The return data block 32 is a buffer that retains information from the sub-block arbiter 30 regarding where the context data is going and transfers the context data. The return data block 32 stores the context data and transfers this data out the return valid/read data output 28. The return data block 32 may monitor the data coming from the macro memory 34. The return data block 32 is also electrically connected to the memory request FSM 40, to the next arbiter 38, and to the processor interface 46. The return read data block 32 may send the context data to the memory request FSM 40 and to the processor interface 46 and may receive context data from the next arbiter 38.
Context data is stored in a 328×64 macro memory 34 within the context manager 10. The macro memory 34 is a memory device that stores the context data going back and forth between the decoder blocks 16, 18, 20, 22 and the memory 14, and the processor 12. The internal buffer, macro memory 34 is capable of holding context data, e.g., for up to 20 macroblocks. The buffer is divided into three sections: collocation, top, and current. The size of the internal division within the buffer space will change depending on the operation of the overall decoder.
The output 28 provides an indication as to which decoder block 16, 18, 20, 22 the context data belong.
Next arbiter 38 is configured to regulate what inputs are sent to the macro memory 34. The processor 12 may also write data to the macro 34. There is often at least one piece of context data per macroblock that the processor 12 provides to the decoder blocks 16, 18, 20, 22 through the context manager 10. The memory request FSM 40 may load/write the context data out to the macro 34. Thus, the processor 12, the decoder blocks 16, 18, 20, 22, and the FSM 40 are sources of information for the macro 34. The next arbiter 38 selects a source and transmits/relays information from that source to the macro controller 36.
The macro controller 36 organizes the data bits of the information from the selected source for the macro 34. The macro controller 36 performs as an interface to the macro 34.
From the decoder blocks 16, 18, 20, 22 point of view there are two stages of arbitration. The first is a sub-block arbitration at the sub-block arbiter 30, which decides which one of the four process blocks attains access to the macro 34. The second arbitration stage is the next arbiter 38, which regulates the data traffic between the processor 12, the memory 14, and one of the four process blocks 16, 18, 20, 22 from the sub-block arbiter 30.
The memory request FSM 40 is electrically connected to the return read data block 32, the memory interface 42, registers 44, and to the next arbiter block 38 and includes a machine for reading from memory and a machine for writing to memory. While not shown in
The context manager 10 monitors requests from the video decoder 120 to determine which blocks 16, 18, 20, 22 have processed and which macroblock, relative to other macroblocks in an image have been processed. The context manager 10 uses this information to determine which macroblock to pre-fetch. The context manager 10 pre-fetches context information for the macroblocks above and to the left of, immediately, directly above, above and to the right of, immediately and to the left of the macroblock to be obtained. Context data available without prefetching by the context manager 10 (e.g., the macroblock decoded immediately prior to the current macroblock) may not be prefetched by the context manager 10. The context manager 10 provides an indication to the processor 12 through the register interface 13, of the pre-fetching data status. The processor 12 starts the decoder blocks 16, 18, 20, 22 after the context manager 10 has pre-fetched the data for the top right pixel macroblock.
The context manager 10 tracks the firmware's position in the video picture and pre-fetches context data that had been previously written to memory before decoder hardware blocks 16, 18, 20, 22 desire that context data. Context data may come either from the current picture or from previously decoded video frames.
The processor 12 starts up the context manager 10 operating on the top rows of the pixel macroblock so there is no context data to pre-fetch, and the buffers are not full in an initialized state. The context manager 10 pre-fetches the top row of context data, e.g., until all the buffers of the context manager 10 are full, or until the macro memory 34 is full, or until the process has caught up the current macroblock. At time zero, the processor 12 will start the context manager 10 through the register interface 13, the registers 44, and the processor interface 46. The processor 12 will initialize/commence the decoder blocks 16, 18, 20, 22. The decoder blocks 16, 18, 20, 22 will begin writing and requesting data. The context manager 10 will write the context data from each pixel macroblock to memory 14. The context manager 10 sends the data to memory 14 through the memory request FSM block 40. The context manager 10 maintains and records information through the sub-block arbiter 30 about the request profiles of the decoder blocks 16, 18, 20, 22. The context manager 10 utilizes counter functionality that tracks the progress of the firmware processor 12 and each of the individual sub-blocks 16, 18, 20, 22 to help ensure the integrity of the data. At the end of each pixel macroblock, the decoder blocks 16, 18, 20, 22 provide indicia that they are done for this pixel macroblock. The context manager 10 writes the context data for the completed macroblocks to the memory 14. The decode process proceeds pixel macroblock after pixel macroblock from left to right, top to bottom. The context manager 10 pre-fetches the context data to be used in the second row. In bidirecitonal frames, the context manager, when needed, will prefetch the co-located motion vectors that had been computed in a previously decoded frame. The context manager 10 will provide this information to either the motion compensation block 20 or the processor block 12, depending on where the motion vectors are being calculated. As these blocks progress through the picture, the context manager 10 will progress through the co-located frame and continue to prefetch data. This process is controlled by the memory request FSM 40 and is done between fetches for top-row macroblock context data. The context manager 10 pre-fetches context data for other macroblocks in advance of the decoder beginning decoding of each macroblock.
Moreover, although the above describes particular image processing protocols as examples (e.g., H.264 and VC1). Embodiments may be used in connection any other type of image processing protocols and standards. Although the above describes a video decoder, a video encoder may also be implemented using aspects similar to those described above. Furthermore, any implementations described herein might be associated with, for example, an Application Specific integrated Circuit (ASIC) device, a processor, a video encoder, video decoder, video codec, software, hardware, and/or firmware. In addition, features implementing functions may also be physically located at various positions, including being distributed such that portions of functions are implemented at different physical locations. Furthermore, to simplify the explanation of the features of the subject matter described herein ,
The systems and methods disclosed herein may be implemented as a computer program product, i.e., a computer program tangibly embodied in an information carrier, e.g., in a machine readable storage device or in a propagated signal, for execution by, or to control the operation of, data processing apparatus, e.g., a programmable processor, a computer, or multiple computers. A computer program can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-along program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
The foregoing description is intended to illustrate but not to limit the scope of the invention, which is defined by the scope of the appended claims. Other embodiments are within the scope of the following claims.
This application claims the benefit under 35 U.S.C. Section 119(e) of the following: U.S. Provisional Patent Application No. 60/841,806, entitled “NEIGHBORING CONTEXT MANAGEMENT,” Attorney Docket No. 33609-033, filed Aug. 31, 2006, which is incorporated by reference herein.
Number | Date | Country | |
---|---|---|---|
60841806 | Aug 2006 | US |