The entire disclosures of Japanese Patent Application No. 2007-83995 filed on Mar. 28, 2007 is expressly incorporated by reference herein.
1. Technical Field
The present invention relates to a video compositing device and a video output device which composite videos.
2. Related Art
In video output devices such as televisions, displays, and projectors, some well-known techniques for displaying a video overlapped on another video are employed, such as OSD (On Screen Display). For example, WO 2004/090860 discloses a video compositing circuit which composites videos.
The video compositing circuit according to WO 2004/090860 processes videos in unit of lines. In brief, there is a necessity to include line buffers inside the circuit.
Compared with this circuit, the present invention provides a technique for making composite videos using reduced memory.
According to an aspect of the invention, to achieve the above object, there is provided a video compositing device including: a first video input unit configured to input a first video; a second video input unit configured to input a second video; a parameter input unit configured to input a parameter indicating a relative positional relationship between the first video input by the first video input unit and the second video input by the second video input unit when the first and second videos are composited; a video compositing unit configured to composite the first and second videos, in units of pixels, in accordance with the parameter input by the parameter input unit, to generate a composite video; and an output unit configured to output a composite video generated by the video compositing unit.
According to this video compositing device, videos are composited in units of pixels.
In this case, the video compositing device may further include a filter processing unit configured to perform a filter processing on the second video, wherein the video compositing unit is configured to composite the first video and the second video which has been subjected to the filter processing by the filter processing unit.
According to this video compositing device, a filter processing is performed on a video before the video is composited.
In this case, the second video may be expressed in a data format which requires a smaller data volume than a data format of the first video, and the video compositing device may further includes: a conversion information storage unit configured to store conversion information for converting the data format of the second video into the data format of the first video; and a conversion unit configured to convert the data format of the second video into the same data format as the data format of the first video, based on the conversion information stored in the conversion information storage unit.
According to this video compositing device, the second video is expressed in a data format which requires a smaller data volume than that of the first video.
In still another mode, the video compositing device may further include a pixel storage unit configured to store data of at least five pixels of the video input by the second video input unit, including a processing target pixel as a processing target and adjacent pixels vertically and horizontally adjacent to the processing target pixel, wherein the filter processing unit is configured to perform the filter processing in two directions, horizontal and vertical to the processing target pixel, using the data stored in the storage unit.
According to this video compositing device, a filter processing is carried out on the second video in each of horizontal and vertical directions.
According to another aspect of the invention, there is provided a video output device, including: the video compositing device described above; a first video storage unit configured to store the first video; and a second video storage unit configured to store the second video, wherein the video compositing device is configured to composite the first video stored in the first video storage unit and the second video stored in the second video storage unit According to this video compositing device, videos are composited for each pixel.
According to this video output device, a video generated by compositing videos in units of pixels, is output.
The invention will be described with reference to the accompanying drawings, wherein like numbers refer to like units:
A memory controller 20 reads necessary data from the external storage device 10, and outputs the read data to other components. An IP (interlace/progressive) conversion processing unit 30 performs an interlace/progressive conversion process on the main or subsidiary video upon necessity. A video magnification/reduction processing unit 40 magnifies or reduces the main or subsidiary video. A video compositing processing unit 50 composites the main or subsidiary video with the OSD video, and generates a composite video. A trapezoidal correction unit 60 performs a trapezoidal correction process on the composite video, and generates an output video. An output unit 70 outputs the generated output video. A controller 80 controls respective components of the video output device 1. The controller 80 has a processor and a memory.
An OSD input controller 511 performs control for reading an OSD index video stored in the external storage device 10. The OSD input controller 511 is a bus master. The OSD input controller 511 outputs a read OSD index video to an index storage unit 512. The index storage unit 512 is a memory which stores the OSD index video. The index storage unit 512 has plural line buffers. The index storage unit 512 is provided to achieve a high processing speed. The index storage unit 512 can have an arbitrary capacity. The index storage unit 512 outputs, to an index/palette conversion unit 513, data of a pixel that is a processing target and pixels peripheral thereto, e.g., data of total five pixels constituted of a processing target pixel as a center and peripheral pixels each in the upper, lower, left, and right sides of the target pixel.
The index/palette conversion unit 513 converts the OSD index video into RGB data, based on the data stored in a palette storage device 510. The palette storage device 510 stores data for converting OSD indices into RGB data. Also, the palette storage device 510 stores data for converting OSD indices into transparency α. The data stored in the palette storage device 510 is updated by a palette setting controller 509. That is, the palette setting controller 509 performs setting of palettes under control of the controller 80 or, in other words, modifies the data in the palette storage device 510. The palette setting controller 509 is a bus slave. The index/palette conversion unit 513 outputs data of pixels, which have been converted into an RGB format, to a filter calculation unit 507.
The filter calculation unit 507 performs a filter calculation on pixel data obtained by index/palette conversion, using a filter coefficient stored in a filter coefficient storage unit 506. The filter coefficient storage unit 506 stores parameters such as filter coefficients used for filter calculations. Data stored in the filter coefficient storage unit 506 is set up by a filter coefficient controller 505. That is, the filter coefficient controller 505 performs setting of filter coefficients under control of the controller 80. The filter coefficient controller 505 is a bus slave.
The filter calculation unit 507 also monitors status of the video compositing unit 514 and controls input of an OSD video. The video compositing unit 514 outputs a busy signal to the filter calculation unit 507. When the busy signal indicates “True”, the filter calculation unit 507 does not output data of a pixel as a processing target to the video compositing unit 514. When the busy signal indicates “False”, the filter calculation unit 507 outputs pixel data subjected to a filter processing (described later), to the video compositing unit 514.
The video compositing unit 514 composites a main video, a subsidiary video, and an OSD video. The video compositing unit 514 composites videos in unit of pixels. The video compositing unit 514 also composites videos, based on parameters stored in a parameter storage unit 504. The parameter storage unit 504 stores parameters required for compositing videos. In this embodiment, the parameter storage unit 504 stores a main video width w1, main video height h1, OSD video width w2, OSD video height h2, OSD memory width m, OSD memory height n, composite video width w3, composite video height h3, horizontal position x1 of the main video, vertical position y1 of the main video, horizontal position x2 of the OSD video, vertical position y2 of the OSD video, and background color. Data stored in the parameter storage unit 504 is set up by a parameter controller 503. That is, the parameter controller 503 performs setting of parameters under control of the controller 80.
The video compositing unit 514 monitors status of a video output controller 515 and controls output of a composite video. The video compositing unit 514 outputs data of the composite video and an enable signal to the video output controller 515. The video output controller 515 monitors status of the trapezoidal correction processing unit 60 provided for use at a later stage of the system, and outputs the composite video upon necessity. In fact, busy control is carried out by the video compositing unit 514. The video output controller 515 can be provided in the format of a queue utilizing a ring buffer.
Operation of the video output device 1 will be outlined below. A main video or subsidiary video is supplied to the video compositing processing unit 50 after the IP conversion processing and magnification/reduction processing have been performed. An OSD video is supplied directly to the video compositing processing unit 50. The video compositing processing unit 50 composites the main or subsidiary video with the OSD video. A composite video is subjected to a trapezoidal correction processing and is then output. The following description will be directed to a video composite processing of the video compositing processing unit 50 and particularly to operation of the video compositing unit 514 as an internal module.
In the state FIX_REG, the video compositing unit 514 fixes parameters used for compositing videos. The parameters are set up by the controller 80. After the parameters are fixed, the video compositing unit 514 transits to a state INIT.
In the state INIT, the video compositing unit 514 performs an initialization processing. The video compositing unit 514 firstly sets the horizontal position pos_x of a pixel as a processing target and the vertical position pos_y of the pixel as a processing target to (pos_x, pos_y)=(0, 0). Further, the video compositing unit 514 performs busy control, based on initialized coordinates. Busy control is the same as will be described below. After carrying out the foregoing processes, the video compositing unit 514 transits to a state OVERLAP.
In the state OVERLAP, the video compositing unit 514 determines a value of a busy signal to be output to the main video input controller 501, based on the pixel (pos_x, pos_y). That is, if the pixel (pos_x, pos_y) includes a part of the main video, the video compositing unit 514 determines the value of the busy signal to be “False”. If the pixel (pos_x, pos_y) does not include a part of the main video, the video compositing processing unit 50 determines the value of the busy signal to be “True”. When the busy signal indicates True, the main video input controller 501 does not output data of the pixel (pos_x, pos_y) to the video compositing processing unit 50. When the busy signal indicates False, the main video input controller 501 outputs data of the pixel (pos_x, pos_y) of the main video to the video compositing processing unit 50.
Further, the video compositing unit 514 determines a value of a busy signal to be output to the filter calculation unit 507, based on the pixel (pos_x, pos_y). That is, if the pixel (pos_x, pos_y) includes a part of the OSD video, the video compositing unit 514 determines the value of the busy signal to be “False”. If the pixel (pos_x, pos_y) does not include a part of the ODS video, the video compositing unit 514 determines the value of the busy signal to be “True”. When the busy signal indicates True, the filter calculation unit 507 does not output data of the pixel (pos_x, pos_y) to the video compositing unit 514. When the busy signal indicates False, the filter calculation unit 507 outputs data of the pixel (pos_x, pos_y) of the OSD video to the video compositing unit 514.
Further, the video compositing-unit 514 determines “False” as a value of an enable signal to be output to the video output controller 515. When the enable signal indicates False, the video output controller 515 does not output data of the pixel (pos_x, pos_y) of the composite video. After completion of the processes described above, the video compositing unit 514 transits to a state POST_OVERLAP, and returns to the state WAIT after completely outputting all data.
In the state OVERLAP, the video compositing unit 514 outputs a composite video. An explanation of this process is given below.
In the state O1, the video compositing unit 514 composites the main video with the OSD video about the pixel (pos_x, pos_y) to generate the composite video.
In the state O2, the video compositing unit 514 sets an enable signal to be output to the video compositing unit 514 to “True”. When the enable signal indicates True, the video output controller 515 outputs data of the pixel (pos_x, pos_y) of the composite video. If the pixel (pos_x, pos_y) includes neither part of the main video nor part of the OSD video, the color of the pixel (pos_x, pos_y) is set to the background color.
In the state O3, the video compositing unit 514 updates the coordinate pos_x with pos_x=pos_x+1. If the coordinate pos_x satisfies pos_x≧m, i.e., when processing for one line is completed, the video compositing unit 514 transits to a state O4. If the coordinate pos_x satisfies pos_x<m, i.e., when processing for one line is still incomplete, the video compositing unit 514 transits to a state O5.
In the state O4, the video compositing unit 514 updates the coordinates pos_x and pos_y respectively with pos_x=0 and pos_y=pos_y+1, and then goes to the state O5.
In the state O5, the video compositing unit 514 determines a value of a busy signal to be output to the main video input controller 501, based on the pixel (pos_x, pos_y). That is, if the pixel (pos_x, pos_y) includes a part of the main video, the video compositing unit 514 determines the value of the busy signal to be “False”. If the pixel (pos_x, pos_y) includes no part of the main video, the video compositing unit 514 determines the value of the busy signal to be “True”. After determining the value of the busy signal, the video compositing unit 514 transits to a state O6.
In the state O6, the video compositing unit 514 determines the value of the busy signal to be output to the filter calculation unit 507, based on the pixel (pos_x, pos_y). That is, if the pixel (pos_x, pos_y) includes a part of the OSD video, the video compositing unit 514 determines the value of the busy signal to be “False”. If the pixel (pos_x, pos_y) includes no part of the main video, the video compositing unit 514 determines the value of the busy signal to be “True”. After determining the value of the busy signal, the video compositing unit 514 transits to the state O0, i.e., reverts to the OVERLAP state.
Description will now be made referring again to
As has been described above, a main video and an OSD video are composited. The above embodiment has been described referring to a case of compositing only a main video and an OSD video. However, compositing is carried out in the same manner even in another case of compositing three videos, e.g., a main video, a subsidiary video, and an OSD video. According to the above embodiment, videos are composited in units of pixels, and so, compositing can be achieved without a large volume of memory, such as line buffers. Although the video compositing processing unit 50 has an index storage unit 512, this unit 512 is a memory used for filtering processes but is not used for compositing videos. Since processing is executed in units of pixels, processing loads in later stages will be reduced. Further, the filtering processes are not effected on a composite video but are effected on the OSD video, i.e., a video before being subjected to compositing. Therefore, proper filtering processes can be executed in consistence with video characteristics. If a projector is used as a video output device as described above, a trapezoidal correction processing is required at a later stage. Since high-frequency videos are often used as OSD videos, an anti-alias processing is required. Even in this case, the above embodiment is capable of performing proper filtering processes in consistence with video characteristics, so that higher image quality can be achieved. In addition, each OSD video is stored in an index/palette format and therefore requires a less stored data volume. Furthermore, the video compositing processing unit 50 has horizontal and vertical filters which are capable of more flexibly changing the video quality compared with a configuration of having only a horizontal filter.
The invention is not limited to the embodiment described above, but may be variously modified in practical phases. In the following description, elements common to the above embodiment will be denoted by common reference symbols. Two or more of the modifications described below may be combined together.
The number of videos which is composited is not limited to three. Two videos or three or more videos may be composited. Videos to be composited need not always include an OSD video. An ordinary video may be composited instead. The data format of the OSD video is not limited to an index/palette format but may be an RGB format. Applicable color coordinate systems are not limited to an RGB color coordinate system. A different color coordinate system such as a YUV, CMYK, or L*a*b* color coordinate system may be utilized.
Parameters stored in the parameter storage unit 504 are not limited to those described in the above embodiment; other parameters may be used. The parameter storage unit 504 need not store all the parameters described in the above embodiment. The parameter storage unit 504 needs only to store at least a parameter which indicates a relative positional relationship between a main video and an OSD video.
The video compositing processing unit 50 may omit part or all of the filter coefficient controller 505, filter coefficient storage unit 506, filter calculation unit 507, palette setting controller 509, palette storage unit 510, and index/palette conversion unit 513. For example, if an OSD video of an index/palette format is not used but an OSD video of a RGB format is used, the OSD input controller 511 may output data of the OSD video directly to the video compositing unit 514. Alternatively, even in case of an OSD video of an index/palette format, the filter coefficient controller 505, filter coefficient storage unit 506, and filter calculation unit 507 may be omitted from the video compositing processing unit 50. In this case, the index/palette conversion unit 513 monitors status of the video compositing unit 514 and controls the input OSD video.
The video compositing processing unit 50 may omit the index storage unit 512. In this case, the video compositing processing unit 50 includes none of the filter coefficient controller 505, filter coefficient storage unit 506, and filter calculation unit 507. The OSD input controller 511 outputs, pixel by pixel, data of the OSD video to the index/palette conversion unit 513. The index/palette conversion unit 513 monitors status of the video compositing unit 514 and controls input of the OSD video.
The filter calculation unit 507 may perform only one of vertical and horizontal filter processing. Pixels to be subjected to filter processing are not limited to pixels adjacent to a pixel as a processing target. A predetermined number of pixels arranged in a predetermined direction (e.g., a vertical or horizontal direction) from a pixel as a processing target may be subjected to filter processing.
The above embodiment has been described referring to an example of performing a filter processing on only the OSD video. However, the filter processing may be performed on either the main or subsidiary video. Further, filter processing can be performed on not only videos before being composited but also a composite video.
In the palette storage unit 510, the LUT need not store the transparency α. Alternatively, the LUT may store any other parameter concerning display of pixels.
The configuration of the video output device 1 is not limited to that shown in
The above embodiment has been described referring to an example in which the video output device 1 is a projector. However, the video output device 1 is not limited to a projector. In place of a projector, the video output device 1 may be a brown tube display, liquid crystal display, plasma display, or any other dot display.
Number | Date | Country | Kind |
---|---|---|---|
2007-83995 | Mar 2007 | JP | national |