The present invention relates to method and apparatus for 3D comb filtering, and more particularly, to data reading and writing during 3D comb filtering.
A composite video signal is the sum of a luminance (brightness) signal and a chrominance (color) signal. These signals may be referred to as luma and chroma signals, respectively. The frequency ranges of the luma and chroma signals may be designed to overlap. The luma signal may extend from DC to 4.2 MHz and the chroma signal may be centered at 3.58 MHz with a bandwidth of 1.8 MHz. In video processing, the luma and chroma signal components may be added together in order to generate a composite video signal. The luma and chroma video elements may be integrated and broadcasted as a single composite video stream. Once the composite signal is received, the luma and chroma signal components must be separated in order for the video signal to be processed and displayed.
A typical color TV decoder receives a composite TV signal as input. A comb filter may be utilized for separating the chroma and luma video signal components. For example, a television may be adapted to receive a composite video input and utilize an integrated comb filter to separate the chroma and luma video signal components. However, before the television may display the received video signal, the chroma and luma video components may have to be separated.
In conventional video processing, there may be several ways to separate the luma and chroma video components. These may include combing horizontally, combing vertically, and combing temporally. Each of these combing methods may have certain disadvantages. For example, in horizontal combing a notch filter at 3.58 MHz may be used to separate the chroma from the luma. This, however, may result in a loss of luma information around the notch frequency.
In vertical combing, a given line of video may be added and/or subtracted from the video line above and below the given line, yielding a luma and chroma signal. This may work because the chroma signal alternates by 180 degrees from one line to the next and two adjacent lines may contain almost identical information. Although better than horizontal combing, artifacts may be produced when adjacent lines are, for example, different from one another.
In temporal combing two frames of video may be compared. In temporal combing an assumption may be made that the video information between adjacent frames has not changed. Also, the chroma phase on any given line may be 180 degrees out of phase with the corresponding line on an adjacent frame. Given these two assumptions, the difference between adjacent frames may yield a luma and chroma signal, free from the artifacts of a horizontal coming system and a vertical coming system. However, performing temporal combing where the information between adjacent frames has changed may become challenging.
Currently, 3D comb filter is the best comb filter, which could separate luma and chroma signal in space and in time. PCTV is a relatively new application in PC industry. Broadly speaking, PCTV makes it possible to watch TV on PC system. A TV card is necessary for PCTV application, which includes a video decoder. There are two conflicting requirements in the PCTV application. PCTV requires a low cost total solution while maintaining high video quality on analog TV input or composite video input. Similar to a typical TV video decoder, 3D comb filter is used in a PCTV video decoder to provide good video quality. However, 3D comb filter requires a large amount of storage space, and, many efforts have been made to solve this problem.
The known relevant solutions that implement the storage space required by 3D comb filtering are 1) external SDRAM, 2) SDRAM die packaged in a multi-die package; and 3) embedded SDRAM on the same silicon. But, all of these solutions are too expensive to be widely applied in PCTV applications. Therefore, method and apparatus that could implement the large amount of storage space without increasing the cost are still needed.
One of the objects of the present invention is providing a technology for providing large memory for 3D comb filtering with reduced or even no additional cost. A further object of one embodiment of the present invention is providing a technology for using system memory for 3D comb filtering. A further object of one embodiment of the present invention is providing a technology for adaptively controlling the operation of 3D comb filter.
In accordance with one aspect of the present invention, an apparatus for using system memory for 3D comb filter in video decoding is provided, comprising a reading/writing control device for controlling the reading/writing in a logic address, and an address mapping device for mapping the logic address to a physical address of a system memory, and actually reading/writing in the physical address.
The reading/writing control device comprises at least one state machine (SM). Further, the reading/writing control device includes reading SM (RSM) and writing SM (WSM). The reading/writing control device further includes a counter for recording the number of reading/writing request. The reading/writing control device further includes a data converting device for converting the data from input format to storage format and from storage format to output format.
The address mapping device comprises an address mapping table, in which a plurality of logic addresses and corresponding physical addresses are recorded. Further, the address mapping device also comprises a request path module and a data transfer path module.
In accordance with another aspect of the present invention, a method of using a system memory for 3D comb filtering in video decoding is provided, comprising: reading/writing in a logic address; and mapping the logic address to a physical address in a system memory, and actually reading/writing data in the physical address.
In accordance with still another aspect of the present invention, a TV card PCTV application is provided, comprising a video decoder with 3D comb filter, an on-chip memory, an on-chip memory controller, and an interface, wherein the video decoder further comprises a reading/writing control device for controlling the reading/writing of data in a logic address; and an address mapping device for mapping the logic address to a physical address in a system memory, and actually reading/writing data in the physical address.
In accordance with still another aspect of the present invention, an operation control apparatus for controlling the operation of TV card above is provided, comprising: a first detection device for detecting the operation status of the video decoder, a second detection device for detecting the status of the on-chip memory, and control device for enabling or disabling the 3D comb filter depending on the results of the first and second detection devices.
In accordance with still another aspect of the present invention, a method for controlling the operation of the TV card above is provided, comprising detecting the operation status of the video decoder, detecting the status of the on-chip memory and enabling or disabling the 3D comb filter depending on the results of the above detecting.
In accordance with still another aspect of the present invention, a system for PCTV application comprising a video decoder with 3D comb filter, an on-chip memory, an on-chip memory controller, and an interface is provided. The system further comprises operation control apparatus, wherein the video decoder comprises: reading/writing control device for controlling data reading/writing in a logic address; address mapping device for mapping the logic address to a physical address in a system memory, and actually reading/writing data in the physical address. The operation control apparatus includes: a first detection device for detecting the operation status of the video decoder; a second detection device for detecting the status of the on-chip memory; and a control device for enabling or disabling the 3D comb filter depending on the results of the first and second detection device.
In accordance with still another aspect of the present invention, providing a manufacture article with computer-readable medium, in which a computer-readable code for using the system memory for 3D comb filtering in a video decoder is stored, comprising: a computer-readable code for controlling the data reading/writing in a logic address; and computer-readable code for mapping the logic address to a physical address in a system memory and actually reading/writing data in the physical address.
The computer-readable code for controlling the data reading/writing in a logic address includes a computer-readable code for controlling the status switch of the RSM to read data, and a computer-readable code for controlling the status switch of the WSM to write data.
Computer-readable code for mapping the logic address to a physical address in a system memory further includes a computer-readable code for converting the logic address to a physical address based on an address mapping table. A computer-readable code for mapping the logic address to a physical address in a system memory further includes a computer-readable code for exchanging data with an external equipment according to the physical address resulted from such converting.
In accordance with still another aspect of the present invention, providing a manufacture article with a computer-readable medium, in which a computer-readable code for controlling the operation of the antecedent TV card is stored, comprising a computer-readable code for detecting the operation status of the video decoder, a computer-readable code for detecting the status of the on-chip memory, and a computer-readable code for enabling or disabling the 3D comb filter depending on the output of above detecting.
With the present invention, system memory could be used for 3D comb filtering. For example, in PCTV application, as the system memory is much larger the on-chip memory, the effect of the 3D comb filtering is much better than that of the prior art. And thus, the additional cost in hardware is greatly reduced compared to the prior art, or even no additional cost needed. And further, the 3D comb filter could be adaptively controlled on/off, depending on the status of the 3D comb filter and on-chip memory.
These and other features of the present invention will be described in more detail in the following detail description, in conjunction with the figures of the accompanying drawings, the present invention is illustrated by way of example and not by way of limitation in the figures, and in which,
The present invention will now be described in detail with reference to a few embodiments thereof as illustrated in the accompanying drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that the present invention may be practiced without some or all of these specific details. In other instance, well-known process steps and/or structures have not been described in detail in order not to unnecessarily obscure the present invention.
The apparatus 100 comprises a reading/writing control device 110 and an address mapping device 120. The reading/writing control device 110 controls data reading and/or writing in a logic address. The address mapping device 120 maps the logic address to a physical address in a system memory, and actually reads and/or writes in the physical address. As is known in the art, the data described above include image data and/or motion detection flags. In the present invention, the data is associated with at least two frame images, i.e. including, but not limited to, two frames, three frames or more.
In one embodiment, the reading/writing control device 110 employs a SM (not shown) to control data reading and writing. The SM switches among its idle, request, waiting, and processing status. During Reading, the SM switches among the idle, the request, the waiting status; while during Writing, the SM switches among the idle, the request, and the processing status.
As shown in
With reference to
With reference to
When the value of the counter increases beyond the first predetermined threshold, the WSM 116 will switch from the idle status to the request status, as indicated by Arrow A, during which a writing request is sent to the address mapping device 120. With reference to
In one embodiment, it will be appreciated by one skilled in the art, the physical address corresponding to the logic address in the address mapping table 124 is applied by a driver program (not shown) to the operation system. “Driver program” and “operation system” are both the generic terms in the art, the meaning of which are well known to those skilled in the art. Further, applying the physical address to the operation system is also well-known.
In one embodiment, when a writing request is accepted, the value of the counter 112 decreases by 1. While the value of the counter 112 equals to 1, the WSM 116 will switch to the processing status, as indicated by Arrow B, and wait for the accomplishment of data storing. When the storing is done, i.e., the writing process is accomplished, the WSM 116 will switch to the idle status, as indicated by Arrow C.
With reference to
If the value of the counter 112 is bigger than a second predetermined threshold, the status of the RSM 114 will switch from the idle status to the request status, as indicated by Arrow A′, during which a reading request is sent to the address mapping device 120, requesting to read the first frame of image data, and the RSM will switch to the waiting status, as indicated by Arrow B′, and the amount of the reading request decreases by 1.
As with what is described above, the address mapping device 120 gets the physical address corresponding to the logic address according to the address mapping table 124 via the request path module 122, and exchanges data with an external equipment via the data transfer module 126 so as to read the desired data.
When the reading request decreases to 4, the RSM will switch to the request status, as indicated by Arrow B″. Then, a reading request will be sent, requesting the second frame of the image data. And again, the RSM switches to the waiting status. While the reading request decreases to zero, i.e., no more data is required, the SM will switch to the idle status, as indicated by Arrow C′.
Likewise, the read data is converted to an output format by the data converting device 118.
In the case of interlaced scanning, each frame of images has two fields. Consider the case wherein the data consist of two portions: the motion detection flags of current point and two frames of the image data prior to the current frame, which may be utilized as the reference data for the 3D comb filter. As such, two frames of image data is required to be read and stored. Of course, the more frames are used, the better the image quality will be. However, at least two frames are required to perform 3D comb filtering.
With reference to
With reference to
With reference to
As mentioned earlier, the address mapping device 120 obtains the physical address in a system memory, then reads data from the system memory or writes data in the system memory via the PCIe bus and/or the chipset. Any suitable means may be employed to implement the process. In one embodiment, the logic address is the address in the on-chip memory.
Alternatively, in another embodiment, the logic address is only a symbol address, not the address in any said memory. In this manner, the data to be written or read is stored in one or more buffer different from the on-chip memory. It can be understood by one skilled in the art that any suitable means may be employed to implement such an embodiment.
With reference to
The second detection device 220 is used to detect whether the data in the on-chip memory 420 is properly stored and read. When an exception occurs with the status of on-chip memory 420, the control device 230 will disable the 3D comb filter 412 and the reading/writing control device 110 simultaneously. The exception of the status of on-chip memory 420 may refer to the improperly storing/reading of data resulted from the bandwidth of PCIe. Disable the 3D comb filter 412 and release the occupied PCIe bandwidth. After a while, restore enabling the 3D comb filter 412. In this manner, the unpredictable problems occurred in the PCIe bus can be solved, thereby avoid improperly enabling the 3D comb filtering due to the PCIe bandwidth issue, ensuring that the best quality video output is provided to the users.
The present invention further provides a system, which incorporates the TV card and the operation control apparatus described above, the configuration of which has been recited hereinbefore in detail, and is briefly recited herein for succinct purpose.
The present invention further provides a manufacture article with a computer-readable medium, in which a computer-readable code for using the system memory for 3D comb filtering in the video decoder is stored, comprising: a computer-readable code for controlling the data reading/writing in a logic address; and a computer-readable code for mapping the logic address to a physical address in a system memory and actually reading/writing data in the physical address.
In one embodiment, the computer-readable code for controlling the data reading/writing in a logic address comprises a computer-readable code for controlling the status switch of the at least one SM
In another embodiment, the computer-readable code for controlling the data reading/writing in a logic address comprises a computer-readable code for controlling the status switch of RSM to read data and a computer-readable code for controlling the status switch of WSM to write data.
The computer-readable code for controlling the RSM controls said RSM switching among its idle status, request status, and waiting status, the computer-readable code for controlling the WSM controls said WSM switching among its idle status, request status, and processing status.
The computer-readable code for controlling the status switch of the at least one SM further includes a counting variable for recording the amount of reading or writing requests, and switching the status of the SM depending on said counting variable.
The computer-readable code for controlling the status switch of the at least one SM further includes a computer-readable code for performing data conversion, converting the data from an input format to a storage format and from a storage format to an output format.
The computer-readable code for mapping the logic address to a physical address in a system memory further includes a computer-readable code for converting the logic address to the physical address according to an address mapping table. The address mapping table is the same as described hereinbefore.
The computer-readable code for mapping the logic address to a physical address in a system memory further includes a computer-readable code for exchanging data with an external equipment according to the physical address resulted from the converting.
The computer-readable code for controlling the status switch of the at least one SM further includes a computer-readable code for storing the data of at least two frame of images alternately.
In a further embodiment of the present invention, a manufacture article with a computer-readable medium is provided, in which a computer-readable code for controlling the operation of the antecedent TV card is stored, comprising a computer-readable code for detecting the operation status of the video decoder, a computer-readable code for detecting the status of the on-chip memory and a computer-readable code for enabling or disabling the 3D comb filter depending on the detection result.
The computer-readable code for detecting the operation status of the video decoder includes a computer-readable code for detecting whether the video signals inputted in the video decoder meet the conditions for enabling the 3D comb filter. For example, during switching channels or no program on current channel, the operation status of the video decoder does not meet the condition for enabling the 3D comb filter.
The computer-readable code for detecting the status of the on-chip memory includes a computer-readable code for detecting whether the data in the on-chip memory is properly stored and read.
The computer-readable code for enabling or disabling the 3D comb filter disables the reading/writing control device while disables the 3D comb filter.
While the present invention has been described in terms of several preferred embodiments, there are alterations, permutations, and equivalents, which fall within the scope of this invention. It should be noted that there are many alternative ways of implementing the methods and apparatus of the present invention. Therefore, it is intended that the following appended claims be interpreted as including all such alterations, permutations, and equivalents as fall within the true spirit and scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
200910054505.5 | Jul 2009 | CN | national |