Video decoder with adaptive outputs

In one aspect, there is provided a video decoder including a first write port to write uncompressed video data to a first buffer in a first format adapted based on a format required by the video decoder. The video decoder also includes a second write port to write uncompressed video data to a second buffer in a second format adapted to provide the uncompressed video data for subsequent processing external to the video decoder.

FIELD

The present disclosure generally relates to image processing.

BACKGROUND

Processing of video data often includes receiving a stream of video data and rendering for presentation on a display device. The video data includes video frames and/or video fields. Typically, video frames are generated for presentation on composite display devices, such as cathode ray tube (CRT) monitors, high definition (HD) televisions, and/or liquid crystal display (LCD) panels, while video fields are typically presented on interlaced devices such as traditional television sets. A video coder may compress the video data before storage or transmission.

To display or further process the video data, the video data (also referred to as image data, image data bit stream, digital video, or video data stream) may be processed by a variety of devices including a video decoder. The video decoder may process (e.g., decompress) video data compressed in accordance with a standard, such as H.264, MPEG-2, MPEG4, VC-1, and the like. For example, the MPEG-2 standard prescribes an architecture for an MPEG-2 video decoder including aspects such as a variable length decoding section, an inverse quantization section, an inverse discrete cosine transform section, a motion compensator section, and memory. Likewise, the Blue Ray disc format prescribes H.264 for video compression of high definition (HD) video stored on the Blue Ray disc, and prescribes H.264 for the decompression of any video played back from that disc. When the video decoder includes coding mechanisms (e.g., a compression section to compress uncompressed video data), the video decoder is referred to as a video coder-decoder (or codec).

The implementation of any video decoder architecture is complex and thus costly. Moreover, the complex processing requires additional memory to process the video data and requires additional bandwidth to handle the complex processing. The additional memory may require substantial die area on a chip, which increases the cost of implementing the video decoder and its associated memory on an integrated circuit. Therefore, there continues to be a need to process video data in an efficient manner.

SUMMARY

The subject matter disclosed herein provides methods and apparatus, including computer program products, for providing a video decoder.

In one aspect, there is provided a video decoder including a first write port to write video data to a first buffer in a first format adapted based on an input format required by the video decoder. The video decoder also includes a second write port to write uncompressed video data to a second buffer in a second format adapted to provide the uncompressed video data for subsequent processing external to the video decoder.

Variations may include one or more of the following features. The first write port may include a first address calculation module for determining memory address information and control information based on whether the video data is in a frame mode or a field mode and based on the first format. The first write port may also include a first data packing module for writing the video data to the first buffer at one or more locations determined by the address calculation module. The second write port may include a second address calculation module for determining memory address information and control information based on whether the video data stream is in a frame mode or a field mode and based on the second format. The second write port may also include a second data packing module for writing the video data to the second buffer at one or more locations determined by the address calculation module. The first write port may use the field mode when the video data is interlaced and use the frame mode when the video data is not interlaced. The determination of whether to write in the frame mode or the field mode may be made on a macroblock basis. The first write port may also control the first write port to write the first format in a block of 16 by 16 when the video data input to the video decoder corresponds to H.264. The video decoder may also include a memory including one or more buffers for storing a first output of the first write port and for storing a second output of the second write port. The first write port may also write video data to the first buffer in the first format adapted based on the input required by a motion compensator section of the video decoder. The first write port may dynamically adapt writing of video data to the first buffer. The video decoder may also include an application programming interface for receiving a first call enabling configuration of the first write port to write to the first buffer and for receiving a second call enabling configuration of the second write port to write uncompressed video data to the second buffer.

The subject matter described herein may be implemented to realize the advantages of reducing memory bandwidth and providing more efficient use of memory when decoding video with a video decoder.

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.

DETAILED DESCRIPTION

FIG. 1depicts a system100including a video decoder120, a memory140, a splitter160, and follow-on processing modules, such as an advanced video processor180, a graphics processor182, and one or more other processing blocks184.

The video decoder120receives video data as an input video bit stream105. The input video bit steam may be in any format including any compressed video data format, such as MPEG-1, MPEG-2, MPEG-4, H.264, and VC-1. The video decoder120processes the input video bit stream105using a variety of sections (also referred to as modules) including a reverse entropy decoder122a, an inverse image transform (e.g., a discrete cosine transform (DCT))122b, a motion compensator122h, a de-blocker122e, a DB writer122f, and a DBW writer122g.

The reverse entropy decoder122a(also referred to as entropy decoding) is a technique used to decode large amounts of data by examining the frequency of patterns within the data. In particular, a reverse entropy decoder may be used to decompress data by replacing symbols represented by codes (where the length of each codeword is proportional to the negative logarithm of the probability) with symbols represented by equal-length codes. Examples of reverse entropy encoders and decoders include CABAC (Context-based Adaptive Binary Arithmetic Coding) and Huffman coding.

The inverse transform122bperforms an inverse transform (e.g., a DCT) of the compressed video to decompress the video data. The inverse transform is often performed in blocks of pixels that are 8 pixels by 8 pixels (8×8). The 8×8 block represents a portion of an image (e.g., a frame or fields) of video data. Once the video data has been processed by the inverse transform, additional decoding, such as inverse quantization and motion prediction, is performed to further decompress and recover the original, uncompressed video data. AlthoughFIG. 1depicts inverse transform122b, other coding and/or compression mechanisms may be used.

Once inverse transform122bdecompresses the video data, motion compensator section122hgenerates the fully decoded video images. Motion compensator122huses predictive coding to predict future frames from previous frames. For example, if an image sequence includes moving objects, then their motion within an image scene (or sequence) can be measured, and this information may be used to predict the content of other frames in the sequence.

In some implementations, a context manager122cis used in video decoder120to provide context information when decoding macroblocks. In particular, a frame of a video image may be divided into an array of macroblocks. In the case of H.264, video decoder120may process the video data as a 16×16 block of picture samples or pixels. For example, inverse transform, motion compensation, de-blocking, and the like may process the video data in blocks of 16×16 pixels. In this example, information about the current macroblock being processed and any neighboring macroblocks may be used as context information to enable processing by the video decoder120.

De-blocker122eprocesses decompressed video images to smooth edges between adjacent blocks. For example, an image having a size of 1920 pixels by 1080 pixels may be divided into blocks of 8×8, 8×16, and 16×16. However, when used, de-blocking may improve image quality by smoothing the edges between blocks.

DB writer122fwrites to one or more buffers, such as picture buffers144ain memory140. The DB writer122fis a write port for writing to picture buffer144ain a format adapted to the requirements of video decoder120, video input bit stream105, and, in some cases, the requirements of picture buffer144a. In particular, video decoder120may write to picture buffers144ato enable motion compensator122has well as other processing sections. Moreover, DB writer122fmay be implemented to write, under the control of a central processing unit (CPU) and firmware122d, in a variety formats (e.g., a tile format and/or a linear format) to provide video data in a format required by video decoder120and its internal processing sections (or modules). For example, the fields of interlaced video data may be stored in buffer144ain a linear format (i.e., a horizontal line of pixels of a video image is stored in contiguous, increasing memory locations in picture buffer144a) to provide a deinterlacer of video decoder120with video data in a format adapted for deinterlacing and field predication. Alternatively, video data may be stored in picture buffer144aas tiles (also referred to as blocks). The tiles may be defined by the type of video being processed by the video decoder120(e.g., high definition motion compensation usually requires an 8×8 block of pixels).

In some implementations, DB writer122fdynamically adapts the format of the output written to picture buffer144a. For example, DB writer122fmay adapt the format based on picture level changes, so that if the so-called “pictures” in the video data change every 30 milliseconds, the output of DB writer122fmay also adapt to such changes. One example of such picture level changes is H.264 Macroblock-Adaptive Frame/Field (MBAFF) coding. When a MBAFF mode is used in a compressed bit stream, field encoding or frame encoding may change from macroblock to macroblock. Moreover, the DB writer122may write in an interlaced format or a progressive format based on the encoding used on any given macroblock. Furthermore, when MBAFF is used, the video data may change from an actual frame of actual picture information to one or more fill frames.

TABLE 1 below provides example output formats of DB writer122fand when they would be used. The formats listed in Table 1 (e.g., tiled, interleaved fields, etc.) may change (i.e., adapt) on a macroblock basis, and information indicating the format of each macroblock can be stored and then used whenever each macroblock is processed (e.g., read from the picture buffer144a).

DBW writer122gis a write port that writes in a variety formats (e.g., a tile format and/or a linear format) to provide video data in the format required for display and/or follow-on processing, both of which are external to the video decoder120. For example, the video output of DBW122gmay be written, under the control of firmware122d, to picture buffer144bin a linear format (e.g., a horizontal line of pixels of a field of a video image is stored in contiguous, increasing memory locations in picture buffer144b). The contiguous, increasing memory locations in picture buffer144bare output to splitter160and an advanced video processor180for further processing before presentation at a monitor, HD television, or the like. In addition, video data may be stored in picture buffer144bas tiles for a graphics processing unit182(e.g., 3-D graphics engine or graphics accelerator) for further processing and/or display. The output of DBW122gmay be written to buffer144bin a digital display format, such as YUV, YCbCr, and the like. The output format of the DBW writer122gis adapted to requirements external to the video decoder120, such as the requirements of a follow-on graphics-processing unit or the requirements for a display. TABLE 2 below provides example formats and when they would be used.

The memory140may be implemented as any form of memory including RAM (random access memory), DRAM (dynamic RAM), SRAM (Static RAM), and any other mechanism of electronic data storage. AlthoughFIG. 1depicts memory140as separate from video decoder120, in some implementations, memory140may be included within the same package or die as video decoder120.

FIG. 2depicts an example implementation of video decoder120. The system200is similar in many respects toFIG. 1, but further depicts a high definition (HD) data source205, such as an HD-DVD or a Blue Ray disc. These HD data sources205provide compressed video data compliant with H.264. The HD data source205provides compressed video data that is stored at buffer244. The buffer244then provides the H.264 video data to video decoder120as input video bit stream105. Under the control of an embedded CPU122kand firmware122d, video decoder120provides decompressed video data in a digital format (e.g., YUV or YcbCr) to picture buffer144b, which subsequently provides the decompressed video data to a downstream device250, such as a display, a graphics engine, or the like.

The system CPU220and a register file270configure video decoder120and DBW writer122gto provide an output adapted to the H.264 video input. The register file270may also include information to configure DB writer122fto provide an output adapted to the H.264 video input as well as the sections of video decoder120.

In some implementations, video decoder120includes an application programming interface (API), which can be called by an external device, such as a DVD player, media player (e.g., Windows Media Player), HD data source205, and the like. For example, a device, such as a Windows Media Player or Blue Ray DVD player, may read a specific type of media (e.g., H.264 formatted video data), and a component, such as an interface, at the device may then call the API of video decoder120to provide information to enable the configuration of DW writer122fand buffer144aas well as the configuration of DBW writer122gand picture buffer144b. Based on information provided by the device, the call would enable adaptation of the format of the output provided to buffers144aand144b.

FIG. 3depicts an implementation of the write ports of DB writer122fand the DBW writer122g. The DB writer122fmay include address calculation logic405for determining the memory address locations in which to write video data. The DB writer122fmay also include a data packing module410for preparing the data for writing to memory140. For example, if a frame of a video image were interlaced, each horizontal line (e.g., a field) of pixels would be stored in contiguous memory address locations in picture buffer144a. In this example, address calculation logic405may receive an initial base address and data format. Moreover, address calculation logic405may also receive an indication that the mode is field as well as X, Y coordinate pixel information. Given the aforementioned, address calculation logic405calculates the memory address for each pixel of the field (i.e., memory address for each pixel of the horizontal line of pixels) and provides control signals for writing to memory140. Meanwhile, data packing module410receives a video data (e.g., a horizontal line of pixels) and organizes the video data for writing at the calculated address of memory144a.

In the case of a frame of a video image in a tile format (e.g., in 16×16 blocks), each block in the frame of pixels would be stored in contiguous memory address locations in picture buffer144a. The address calculation logic405would receive an initial base address and data format, image size, image resolution, an indication that the mode is frame since the video data is non-interlaced (e.g., progressive) video data, and X, Y coordinate pixel information. Next, address calculation logic405calculates the memory address for the video data associated with each pixel of the block (e.g., a 16×16 block) and provides control signals to enable writing to memory140. Meanwhile, data packing module410receives a block and organizes the block for writing in contiguous memory addresses. For example, video data associated with the top left most pixel of a 16×16 block may be written to memory140first, and the video data associated with the remaining 15 pixels in the top row may be subsequently written to memory140before writing video data for other pixels in the next row of the block, although other writing schemes may be used instead. Outputs of module405and410are the memory address, memory data, and various control signals necessary to perform the write cycles to memory buffers144a. Outputs of module415and420are the memory address, memory data, and various control signals necessary to perform the write cycles to memory buffers144b.

The frame/field mode inputs to address calculation logic405and data packing410are provided by a configuration register, which can be written to by a processor using firmware. The frame/field mode inputs to address calculation logic415and data packing420are provided by another configuration register, which can be written to by a processor using firmware. The pixel stream inputs of data packing modules410and420is provided by a de-blocker module, which produces the de-blocked block of pixels to be used by a motion predictor (e.g., as reference frames) or to be used by video post-processing modules. The x,y coordinates, pixel type inputs of address calculation logic405and415are provided by a de-blocker module. The x,y coordinates, pixel type information represents display screen locations of the associated pixel stream data as well as the type of pixel data. The type of pixel data may indicate that certain pixels are supposed to be written to certain memory buffers and only by DB writer122f. The data format input of data packing410is provided by a configuration register, which can be written to by a processor using firmware. The data format input of data packing420is provided by another configuration register, which can be written to by a processor using firmware.

FIG. 4depicts a process for video decoding using two write ports, one write port adapted to write in a format dictated by the video decoder, and another write port adapted to write in another format dictated by another device, such as a display or follow-on processor. At410, video decoder120receives compressed video data, such as input video data stream105.

At420, video decoder120processes input video data stream105, so that the video data is decompressed. For example, video decoder120may include an inverse DCT section to process the compressed video data to yield decompressed video data.

At430, video decoder may write using DB writer122fthe uncompressed video data to picture buffer144a. The video data written to picture buffer144amay be formatted based on the requirements of the video decoder120. In some implementations, DB writer122fmay write to picture buffer144ain a format adapted for an input of one of the sections of video decoder120. For example, DB writer122fmay write to picture buffer144avideo data formatted as reference frame images for use by motion compensator122h.

At440, video decoder120may write using DBW writer122gvideo data to picture buffer144b. The video data written to picture buffer144bis formatted based on the requirements of components external to video decoder120. For example, video data written by DBW writer122gto picture buffer144bmay be formatted in 16×16 blocks for a 3-D graphic engine or may be written in another digital format for presentation. In some implementations, video decoder120may more efficiently process video data by using two write ports (e.g., DB writer122fand DBW writer122g), each adapted to write to buffers144aand144busing a specified format—thus minimizing waste of memory resources at buffers144aand144bwhen compared to approaches using a single write port.

In some implementations, the subject matter described herein may use two write ports to decouple internal memory buffers of a video decoder from output memory buffers of a video decoder, so that, for example, a video player application may dictate, on a frame-by-frame basis, the format of the decoded video data output.

Although the above describes de-interlacing as part of the video decoder, de-interlacing may also be implemented as part of Advanced Video Processor180.

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, and/or video codec. In addition, to simplify the explanation of the features of the subject matter described herein,FIGS. 1 and 2depict simplified video decoders including only some of the sections, which may be included in a video decoder. Although the above describes the use of two write ports within the context of a video decoder, a device other than a video decoder may implement the two write ports described herein.

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.