The present invention relates to a frame synchronizer for converting a video signal synchronized with a synchronization signal input from an external signal source, into a video signal synchronized with another synchronization signal, and relates to technologies associated to the frame synchronizer.
Encoders that perform digital-processing on video signals are widely integrated into recording/reproducing apparatus capable of recording video signals onto a high-capacity recording medium such as an optical disk, or into communication devices capable of receiving broadcast signals and/or radio signals. In the NTSC (National Television System Committee) system, for example, three types of synchronization signals (i.e., a vertical synchronization signal, a horizontal synchronization signal and a color synchronization signal) are multiplexed into an analog video signal. To perform digital-processing on such an analog video signal, it is required that an encoder performs an A/D-conversion on an analog video signal, which is input in synchronization with the multiplexed synchronization signal, to generate a digital video signal, and converts the generated digital video signal into a video signal synchronizing with a reference clock signal (i.e., a reference synchronization signal inside the encoder) for performing digital-processing. This conversion processing that is synchronization processing is performed by a frame synchronizer. This kind of frame synchronizer has a buffer memory (not illustrated) which temporarily stores digital video signals, and has a memory control circuit (not illustrated) which controls writing and reading data for the buffer memory. A prior art of this kind of frame synchronizer is disclosed in Japanese Patent Application Publication No. 2001-309202.
The frame synchronization of the prior art, however, executes synchronization processing on a frame to frame basis, so that the buffer memory needs to have a memory storage capacity of at least two frames. In the course of developing a frame synchronizer capable of executing synchronization processing on a field to field basis in order to provide less storage capacity of the buffer memory, the present inventor discovered that, when the frame synchronizer of the prior art is used, a phenomenon (called “jaggy”) where edges of displayed images appears jagged occurs. This phenomenon will now be described. In the NTSC system, each frame of the video signal is comprised of a first field containing pixel data on odd number horizontal lines (hereinafter referred to as “top field”), and a second field containing pixel data on even number horizontal lines (hereinafter referred to as “bottom field”). Then, the top field and bottom field are alternately stored in the buffer memory of the frame synchronizer, in a specific order such as top field T1, bottom field B1, top field T2, bottom field B2, . . . . In the case when the buffer memory sequentially stores digital video signals in synchronization with the horizontal synchronization signal which are input from the external signal source, and the memory control circuit reads the video signals from the buffer memory in synchronization with the horizontal synchronization signal of the reference clock signal, the frequency of the external vertical synchronization signal and the frequency of the vertical synchronization signals inside the synchronizer can be shifted from each other. The frequency shift can keep for a predetermined time, thus causing a buffer overflow or underflow in the buffer memory.
In order to avoid the buffer overflow or underflow, the memory control circuit can skip one of the top field and bottom field to read the other field when the remaining capacity of the buffer memory becomes too small, that is, when judging that the occurrence probability of the buffer overflow is high. As
As shown
A possible method for reducing such a jaggy is of extracting a low spatial frequency component of the image edge portion by using a low pass filter or an interpolation filter. However, there is a problem with the possible method that the contour of the image edge portion becomes blurred, thereby causing image quality to be deteriorated.
In view of the foregoing, it is an object of the present invention to provide a frame synchronizer, synchronization method, image processing apparatus and frame synchronization program for suppressing the generation of the above mentioned jaggy. It is another object of the present invention to provide a frame synchronizer, synchronization method, image processing apparatus and frame synchronization program that are capable of providing less capacity required for a buffer memory and reducing power consumption, as well as suppressing the generation of the above mentioned jaggy.
According to a first aspect of the present invention, there is provided a frame synchronizer for converting an input video data stream supplied in synchronization with a first synchronization signal, into an output video data stream synchronized with a second synchronization signal. The frame synchronizer comprises a buffer memory for storing the input video data stream; and a memory control section for reading output video data from the buffer memory in synchronization with the second synchronization signal. Before a remaining capacity of the buffer memory reaches a predetermined lower limit, the memory control section reads one field of a first field and a second field in an area starting from a predetermined start line, and reads the other field in an area starting from a predetermined first start line, the first field containing pixel data on even number horizontal lines of each frame of the input video data stream, and the second field containing pixel data on odd number horizontal lines of each frame. When the remaining capacity reaches the predetermined lower limit, the memory control section reads only the other field in an area starting from a second start line that is shifted by one horizontal line from the predetermined first start line.
According to a second aspect of the present invention, there is provided an image processing apparatus comprising the frame synchronizer according; and an encoder for encoding an output video data stream converted by the frame synchronizer.
According to a third aspect of the present invention, there is provided a synchronization method for a frame synchronizer comprising a buffer memory for storing an input video data stream supplied in synchronization with a first synchronization signal to convert the input video data stream into an output video data stream synchronized with a second synchronization signal by reading video data from the buffer memory in synchronization with the second synchronization signal. The synchronization method comprises the steps of: (a) before a remaining capacity of the buffer memory reaches a predetermined lower limit, reading one field of a first field and a second field in an area starting from a predetermined start line, and reading the other field in an area starting from a predetermined first start line, the first field containing pixel data on even number horizontal lines of each frame of the input video data stream, and the second field containing pixel data on odd number horizontal lines of each frame; and (b) when the remaining capacity reaches the predetermined lower limit, reading only the other field in an area starting from a second start line that is shifted by one horizontal line from the predetermined first start line.
According to a fourth aspect of the present invention, there is provided a frame synchronization program for causing a microprocessor to execute synchronization processing to convert an input video data stream into an output video data stream synchronized with a second synchronization signal in a frame synchronizer having a buffer memory for storing the input video data stream supplied in synchronization with a first synchronization signal by reading video data from the buffer memory in synchronization with the second synchronization signal. The synchronization processing comprises the steps of: (a) before a remaining capacity of the buffer memory reaches a predetermined lower limit, reading one field of a first field and a second field in an area starting from a predetermined start line, and reading the other field in an area starting from a predetermined first start line, the first field containing pixel data on even number horizontal lines of each frame of the input video data stream, and the second field containing pixel data on odd number horizontal lines of each frame; and (b) when the remaining capacity reaches the predetermined lower limit, reading only the other field in an area starting from a second start line that is shifted by one horizontal line from the predetermined first start line.
Various embodiments of the present invention will now be described.
A synchronization signal SYNC_A and an analog video signal VIN synchronized with a synchronization signal SYNC_A are supplied to the frame synchronizer 10. In the present embodiment, the analog video signal VIN and the synchronization signal SYNC_A are separately supplied to the frame synchronizer 10. Alternatively, an NTSC signal in which the synchronization signal SYNC_A is superimposed on the analog video signal VIN can be supplied to the frame synchronizer 10. The analog processing unit 11 amplifies the analog video signal VIN, performs filtering on the amplified signal, and performs A/D-conversion on the filtered and amplified signal. The analog processing unit 11 further extracts a horizontal synchronization signal HSYNC_A from the synchronization signal SYNC_A and supplies the signal HSYNC_A to the controller 15. The digital processing unit 12 converts the digital video signal DV supplied from the analog processing unit 11 into a format data stream (input video data stream) FV. The format data stream includes pixel data and synchronization information (timing references) which are compliant with an output format such as ITU-R BT. 656 and includes a top field and a bottom field that are arranged alternately. As described above, the top field is a field comprised of pixel data on odd number horizontal lines of each frame, and the bottom field is a field comprised of pixel data on even number horizontal lines of each frame. In the present embodiment, it is assumed for convenience that multiplexed synchronization information is added to each top field and bottom field.
The controller 15 includes a write controller 16 that performs write control of the first buffer memory 13A with respect to a data stream FV; a read controller 17 that performs read control of the first buffer memory 13A with respect to a data stream DFV; and a read controller 18 that performs read control of the second buffer memory 13B with respect to a data stream DFV. The controller 15 can be constructed by an integrated circuit that includes a microprocessor, ROM (Read Only Memory), RAM (Random Access Memory), timer circuit, internal bus and input/output interfaces. The ROM stores various programs for causing the microprocessor to execute a part of or all of the synchronization control processing of the present embodiment. The write controller 16, read controller 17, and read controller 18 can be implemented by hardware or may be implemented by programs stored in the ROM.
The first buffer memory 13A is a two-port memory that has a storage capacity of at least one field. For the reasons described later, since the first buffer memory 13A need not have a storage capacity of four fields that is two frames unlike prior arts, the storage capacity required for the buffer memory 14 can be reduced. The write controller 16 supplies a write control signal WC to the first buffer memory 13A, and sequentially writes the data stream FV into a storage area specified by write addresses of the write control signal WV. The read controller 17 supplies a read control signal RC1 to the first buffer memory 13A, reads pixel data from a storage area specified by read addresses of the read control signal RC1, and supplies the read pixel data to the second buffer memory 13B.
The controller 15 constantly monitors the remaining capacity of the first buffer memory 13A based on a vertical synchronization signal VSYNC_B and a horizontal synchronization signal HSYNC_A that are supplied from the clock generator 21, and executes a field drop procedure or field insertion procedure as described later when the remaining capacity reaches a predetermined upper limit or lower limit, thereby to prevent a buffer overflow or underflow in the first buffer memory 13A.
All horizontal lines of the top field do not always contain image data. This is the same case as those of the bottom field. In the NTSC system, for example, the image data can be included in 244 active lines of 262 horizontal lines of the top field, and the image data can be included in 243 active lines of 263 horizontal lines of the bottom field. All of the active lines need not be used for image processing. It is typically preferable to use only a multiple of a power of 2 horizontal lines (hereinafter referred to as “selected active lines”) for image processing, which is suitable for digital processing. In the NTSC system, for example, 240 selected active lines which is 15 times 16 (=24) of 244 active lines of the top field, can be used for image processing.
The second buffer memory 13B is comprised of, for example, an FIFO memory which stores the top field or the bottom field of the data stream supplied from the first buffer memory 13A by 2 or 3 horizontal lines. The second buffer memory 13B outputs the data stream DFV2 during a period when an enable signal is supplied as the read control signal RC2, and stops to output the data stream DFV2 during a period when a disable signal is supplied as the read control signal RC2. The second buffer memory 13B can specify the selected active lines out of the active lines of the top field or the bottom field in accordance to the read control signal RC2, and can supply the data stream of the selected active lines to the encoder 20.
In
In
The encoder 20 is a block that encodes the format data stream DFV2 supplied from the frame synchronizer 10, and operates in synchronization with the horizontal synchronization signal HSYNC_B and the vertical synchronization signal VSYNC_B that are supplied from the clock generator 21. This encoder 20 can be a block that, for example, performs compression encoding in accordance with MPEG (Moving Picture Experts Group) standard, a known format conversion, image processing or modulation, no limitation thereto intended.
The analog processing unit 30 is a block that processes an analog audio signal AIN supplied in synchronization with the analog video signal VIN, and operates in synchronization with a clock signal (not illustrated) supplied from the clock generator 21. Specifically, the analog processing unit 30 amplifies the analog audio signal AIN, performs filtering on the amplified signal, performs A/D-conversion on the filtered signal, and outputs the converted signal DA.
Control operations of the frame synchronizer 10 having the above configuration will now be described.
The controller 15 judges whether the remaining capacity of the first buffer memory 13A reaches a predetermined lower limit based on the horizontal synchronization signal HSYNC_A and the reference clock signal (vertical synchronization signal) VSYNC_B (step S2). When the frequency of the horizontal synchronization signal HSYNC_A inputted from an external signal source is different from a reference clock frequency (i.e., frequency of the horizontal synchronization signal HSYNC_B) inside the synchronizer due to such a cause as jitter, and continues to be higher than the reference clock frequency for some period of time, the remaining capacity of the first buffer memory 13A becomes less than the lower limit that indicates a warning of the generation of a buffer overflow. At this time, the controller 15 judges that the remaining capacity reaches the lower limit. The read controller 17 then executes the field drop procedure in which either one of the top field and the bottom field is skipped, and only the other field is read from the first buffer memory 13A (step S4).
When it is judged that the top field is stored in the first buffer memory 13A (step S10), the read controller 17 moves the read address from the address that indicates a leading portion of an area corresponding to the top field to skip one field (step S11). As a result, the read controller 17 skips over the storage area corresponding to the top field in the first buffer memory 13A to generate read addresses that specify the storage area corresponding to the bottom field. Then the controller 15 inverts the bit of the status flag FG (step S12). As a result, the value of the status flag FG changes from “0” to “1”. The controller 15 then returns the procedure to the main routine (
After the above-described field drop procedure (steps S11, S12) is executed, the line selection procedure (step S6) is executed by the read controller 18.
In subsequent steps S38 to S41, the data stream of the selected active area BF2 shown in
On the other hand, when judging that the data stream is not data on the upper one line in step S38, the read controller 18 further judges whether or not the data stream is data on the lower two lines (i.e., data on 242nd or 243rd active line) (step S39). When judging that the data stream is data on the lower two lines, the read controller 18 stops output of the data stream by supplying a disable signal as the read control signal RC2 to the second buffer memory 13B (step S40). As a result, the data on the lower two lines is skipped.
When judging that the data stream is not data on the lower two lines in step S39, the read controller 18 enables output of the data stream by supplying an enable signal as the read control signal RC2 to the second buffer memory 13B (step S41).
With reference again to
When judging that the bottom field is stored in the first buffer memory 13A (step S20), the read controller 17 move the read address backward by one field, and generates read addresses that indicates the leading portion of an area corresponding to the bottom field (step S21). As a result, the read controller 17 repeatedly generates the read addresses that specify the storage area corresponding to the bottom field in the first buffer memory 13A. Then the controller 15 inverts the bit of the status flag FG (step S22). As a result, the value of the status flag FG changes from “0” to “1”. The value is set to the initial value “1” when the bit of the value “1” is inverted. The controller 15 then returns the procedure to the main routine (
After the above-described field insertion procedure (steps S21, S22) is executed, the line selection procedure (step S6) is executed by the read controller 18. As shown in
With reference again to
When judging that the data stream is not data of the top field in step S30, the read controller 18 further judges that the value of the status flag FG is “0” (step S33). Then, the data stream in the selected active area BF1 shown in
When judging that the data stream is not data on the upper two lines in step S34, the read controller 18 further judges whether or not this data stream is data on the lower one line (i.e., data on the 243rd active line) (step S35). When judging that the data stream is data on the lower one line, the read controller 18 stops output of the data stream by supplying a disable signal as the read control signal RC2 to the second buffer memory 13B (step S36). As a result, data on the lower one line is skipped.
When judging that the data stream is not data on the lower one line in step S35, the read controller 18 enables output of the data stream by supplying an enable signal as the read control signal RC2 to the second buffer memory 13B (step S37).
With reference then to
The above-described synchronization control enables the generation of jaggy to be reduced. This will be described with reference to
When the remaining capacity of the first buffer memory 13A reaches the lower limit immediately after the first buffer memory 13A stores the bottom field B1, the top field T2 is skipped by the field drop procedure (step S4). In the conventional frame synchronizer, when the top field T2 is skipped, as shown in
In the frame synchronizer 10 of the present embodiment, on the other hand, when the top field T2 is skipped, the selected active area BF2 of the bottom field as shown in
In
In the frame synchronizer 10 of the present embodiment, on the other hand, when the bottom field B2 is repeatedly read, the selected active area BF2 corresponding to the bottom field as shown in
As described above, according to the frame synchronizer 10 of the present embodiment, even if one field of the top field and the bottom field is skipped by the field drop procedure (step S4), when the other field is read from the buffer memory 13, the other field can be read from the start line that is shifted one horizontal line from the start line of a default (
Additionally, compared with the prior art in which the display images are shifted on a frame to frame basis by frame synchronization processing, the frame synchronizer of the present embodiment is capable of shifting display images on a field to field basis by the field drop procedure and field insertion procedure. Thus, the user recognizes the shift during only half of the display time of one frame (about 1/30 seconds in the NTSC system). Therefore, the synchronization processing of the present embodiment can suppress the deterioration of image quality, compared with the prior art.
Further, compared with the conventional frame synchronizer which requires a buffer memory having a storage capacity of at least two frames, the frame synchronizer 10 of the present embodiments needs only a buffer memory 4 that has a storage capacity of one field and two or three horizontal lines. Therefore, the frame synchronizer 10 enables the capacity of the buffer memory to be decreased, the reduction of the manufacturing cost and low power consumption.
A modification of the above embodiment will be described.
According to the modification, the field drop procedure (step S4), field insertion procedure (step S5) and line selection procedure (step S6) are executed when the scene change occurs, so that these procedures are executed almost together with the scene change. It is to be noted that the scene change frequently occurs. When the scene change does not occur, the number of times of these procedures can be decreased. Therefore, the deterioration of image quality can be suppressed at minimum.
The present application is based on Japanese Patent Application No. 2005-131114, which is hereby incorporated by reference.
Number | Date | Country | Kind |
---|---|---|---|
2005-13114 | Apr 2005 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2006/308920 | 4/21/2006 | WO | 00 | 11/30/2007 |