Synchronizing and image positioning methods for a video display
Field of the Invention
The invention relates to a method of adjusting the position and/or size of an image displayed on a screen of a video display device, and to a method of synchronizing a video display device with a video signal.
Background of the Invention
In most modern personal computers (such as IBM PC compatible) a VGA (Video Graphics Array) display adapter has replaced the former EGA, CGA, MDA and HGC adapters. All these display adapters typically control a video display terminal with one or two deflection frequencies. In addition, all of the dis- play adapters support both character and graphics display modes. Display adapters for higher-resolution displays are almost exclusively graphics based, sup¬ porting primarily MS-Windows, OS/2 Presentation Manager or X-Windows user interfaces or CAD software. It is characteristic of all these systems that the display device is controlled by means of syn¬ chronizing signals. Vertical deflection signals align the image vertically on the screen of the display device so as to utilize the entire screen as efficiently as possible. Correspondingly, a hori¬ zontal deflection signal aligns the image in the horizontal direction. The timings of the deflection signals depend on the employed display device and display adapter. For example, a cathode-ray tube (CRT) display device requires a predetermined time to
retrace the electron beam to the start of the scanning of the next line or field. The retrace time is controlled by horizontal and vertical blanking signals which indicate the position of the active image area on the screen. The resolution of the dis¬ play device is determined by the applied technology and the technical solution, being typically e.g. 640x480, 800x600, 1024x768 and 1280x1024. The blanking period or passive display period (e.g. the retrace time of the beam) can be subdivided into a front porch and a back porch and a synchronizing pulse.
Display devices typically have horizontal de¬ flection frequencies and display refreshing fre- quencies which are determined by the frequencies of the horizontal and vertical synchronizing signals. To achieve an advantageous technical structure for the display device, a usual inexpensive solution is to use a display device with one deflection frequency. This means that the display device is capable of syn¬ chronization with video signals only within a relatively narrow frequency band of the horizontal deflection signal. The display device is not usually very sensitive to the vertical deflection, but it is synchronized fairly well with very different vertical deflection frequencies. Especially in CAD applications, which require very high resolution, both the vertical and horizontal deflection signals of the display adapter have to be very accurately defined, and they must not deviate from the values specified for the display device. In this way, a very high image quality is achieved at the expense of low price and versatility.
The most recent display devices are usually so- called multi-frequency display devices, and so they
are able to synchronize and operate within a very wide range of horizontal deflection frequencies as well within a wide range of vertical deflection frequencies. These display devices offer various adjusting possibilities for the user. When the dis¬ play device is synchronized with the video signals of the display adapter, the image is usually positioned aside, and so the user has to align the image by using the above-mentioned adjustments. The display devices may comprise preselected and preset timing modes, which the display identifies automatically and adjusts the position of the image in accordance with the manufacturer's adjustments.
The position of the image on the screen is usually determined by programming the position of a synchronizing pulse (HSYNC or VSYNC) in relation to the active display period. The position of the image can also be changed by varying the length of the synchronizing pulses. The size of the image can be adjusted by software by varying the duration of the passive display period or by changing the polarity of the synchronizing pulses (polarity adjustment is used e.g. in a VGA environment). This technique is used mainly to adjust the size of the image in the vertical direction, whereas it is hardly ever used for image adjustment in the horizontal direction, because the horizontal deflection frequency would also be affected, and this would also greatly affect the vertical deflection frequency, which should be kept as high as possible and which one is not ready to sacrifice. In addition, the most common display device applications are based on one horizontal de¬ flection frequency, and therefore it is desirable to maintain compatibility to these applications, too. A change in the horizontal deflection frequency also
easily affects the position of the image.
The vertical deflection control is formed of the horizontal deflection signal, and it is usually very easy to program as multiples of the horizontal deflection pulses (correspondingly also the active display period and the front (VFP) and back (VBP) porch). The horizontal deflection signal, instead, is formed of the multiples of a character clock, and these are considerably more difficult to change by software on account of the technical restrictions imposed by the used technical applications. A charac¬ ter clock signal is formed of the multiples of the video dot frequency, and both of these are dependent on the hardware of the equipment and it has not been possible to program them. In graphics based applica¬ tions, one character clock period commonly comprises 8 or 16, in text modes also 7, 9 and 18, video dot clock periods. The position or size of the image can thus be adjusted by software only by steps of at least eight pixels, and so the adjustment appears as rough jumps on the screen, and a smooth and accurate adjustment cannot be achieved.
Computer application programs are drafted to comply with specific resolutions used as standards, which determines the available active image area on the screen very accurately. The programmatically selectable parameters affecting the adjustment of the image are also generally preselected and bound to the technical application. For example, video dot fre- quencies are often generated by the oscillator or crystal circuits of the display adapter, which gener¬ ate only one video frequency per one circuit, and so the display adapter supports only few display standards and resolutions. The most recent circuits based on frequency synthesis (phase-locked loops) are
able to generate several frequencies, and so one and the same display adapter is able to support several different resolutions and different horizontal and vertical deflection frequencies for different display devices. When the display mode is to be changed, the display adapter selects the video frequency proper for the new display mode and the other parameters required by the selected display mode. The final ad¬ justment of the position and size of the image on the screen is then performed by utilizing the adjustments of the display device.
Disclosure of the Invention
An object of the invention is to provide a more versatile and more accurate adjustment of the posi¬ tion and size of an image on the screen of a display device than what has been possible previously.
Another object of the invention is to simplify the synchronization of a video display device with a video signal.
The first object is achieved by means of a method according to the invention for adjusting the position and/or size of an image displayed on a video display device, which method comprises the steps of claim 1.
The basic idea of the invention is that, instead of adjusting the position and size of the image on the screen by utilizing the adjustments of the display device itself, the properties of the video signal itself are adjusted by the software of the microcomputer by varying the video dot frequency of the video source, such as a display adapter, while simultaneously varying the conventional programmable video control parameters in accordance with various algorithms in such a way that the best possible image
is obtained with the display device used in each par¬ ticular case. Increase or decrease in the video dot frequency, while the line frequency is maintained substantially constant, causes a corresponding decrease or increase in the width of an individual image element, i.e. pixel, on the screen and thus in the size of the entire image. As all video signal timing components are multiples of the video dot clock cycle, it is essential that when the video dot clock cycle is changed, at least the parameters determining the number of the video dot clock cycles in the horizontal deflection period should be changed simultaneously so that the horizontal deflection fre¬ quency is maintained substantially unchanged. As the video dot frequency can be changed by very small steps, the accuracy which can be achieved in the adjustment of the position and size of the image is only a fraction of the size of an individual pixel, while previously the accuracy has been several pixels. The adjustment of the position and size of the image can be performed "smoothly" and accurately as desired by the user without any compromises. The video dot frequency can be selected by software from a great number of predetermined frequencies or by means of a fully programmable synthesis video dot frequency generator. Accordingly, the only essential modification required e.g. in the present-day display adapters is a video dot frequency generator of a new type or, at best, only a new mode of operation of the previous generator is required, so the invention can be realized very advantageously.
The present invention, however, also offers new possibilities to realize the display device at a low¬ er cost, because the adjustments of the position and size of the image can be omitted from the display
device and performed by software, and the user can control the adjustment e.g. from the keyboard of the computer or by means of a mouse. Moreover, the inven¬ tion provides the best possible quality of the image even with less expensive (lower quality) display devices, as deviations can be corrected easily and accurately. Similarly, displacements in the position and size of the image due to ageing of the components can be compensated for by the user easily and accurately, which increases the service life of the display device and facilitates maintenance. Furthermore, many other properties are achieved, such as dynamic stepless zooming.
Further, as the video dot frequency can be altered by sufficiently small steps, a video fre¬ quency with which the horizontal deflection of the display device under examination is synchronized can be found by varying the video frequency. Thereafter the vertical deflection can be synchronized and the adjustments of the position and size of the image can be carried out in accordance with the invention. The invention provides compatibility with nearly all dis¬ play devices irrespective of their horizontal and vertical deflection frequencies and resolutions. On the other hand, the display devices may be less expensive single-frequency displays and still have better display properties than the conventional multi-frequency displays.
The invention is also concerned with a method of synchronizing a video display device with a video signal when at least the vertical and horizontal de¬ flection frequencies and resolution are known amongst the electrical properties of the video display device. The method is characterized in that display adapter control parameters are calculated from said
known properties of the video display device, the control parameters being utilized to adjust the video dot frequency of a video signal to be applied to the video display device and the numbers of the video clock cycles contained in the horizontal deflection period, the blanking period, the display period, the front porch period and/or the back porch period to such values that the display device is synchronized.
As the small-step adjustment of the video fre- quency enables a suitable video signal to be generated for any display device, the required video dot frequency and other parameters can be calculated easily when the deflection frequencies and resolution of the display device are known. In this way, the user is able to make a desired display device synchronize with a video signal by inputting the electrical specifications of his display device to the calculation program. Alternatively, the elec¬ trical specifications may be obtained e.g. from a program disk supplied with the display device. De¬ fault values for the position and size of the image can be obtained from the same disk e.g. by giving the length of the front and back porch and the display period and the position of the synchronizing pulses, so that the display is immediately ready for oper¬ ation. In this way, the invention makes it con¬ siderably easier to set up a new display device. As the specifications of the display devices can be given as frequency and time units and resolutions, the memory space occupied by them is only a fraction of that required for storing the parameter tables used previously for display adapters.
Brief Description of the Drawings
In the following the invention will be described in greater detail by means of embodiments with reference to the attached drawings, in which Figure 1 is a block diagram of a computer display system in which the method according to the invention can be applied;
Figures 2 and 3 show a timing diagram illus¬ trating the horizontal and vertical synchronizing signals of a video signal; and
Figures 4 and 5 illustrate the screen of a video display device and how the image is positioned on the screen by the synchronizing signals.
Preferred Embodiments of the Invention
The invention may be employed for adjusting any display device controlled by a video signal. Such a video display may be a cathode-ray tube display, liquid crystal display, plasma display, electro- luminance display, etc. Even though the primary range of applications of the invention is within the com¬ puter display systems, the invention can also be applied to image adjustment in digital television sets, for instance. Figure 1 shows a computer system with a display system in which the invention can be applied. The computer system comprises a central unit (CPU) 7, to which a keyboard 3, a mouse 8 and a display system with a display device 2 can be connected. The display system comprises a video display adapter 1, which is connected through a bus interface 6 to the central unit (CPU) or the like 7 of the computer. The display adapter or graphics controller 1 incorporates a raster display memory 5 having a storage location for each pixel of a displayed image. The display adapter
generates a video signal VIDEO (which may comprise several different physical signals), which is applied through a video interface 9 to control the display device 2. The display adapter 1 further comprises an adjustable video frequency generator 4 the output frequency fnc K °^ wnic^ ^s controlled by a frequency control signal FCONTR. The generator 4 may be e.g. the frequency synthesizer circuit SC11410 or SC11411 of Sierra Semiconductor Corporation, or the frequency synthesizer circuit ICS1594 of Integrated Circuit Systems Inc. In practice, in all the above-mentioned circuits, the control signal FCONTR of Figure 1 is a serial interface through which the display adapter 1 can write control data into the control registers of the synthesizer circuit 4. By means of the control data of the registers practically any frequency can be selected as the output frequency Fnc K*
Figure 2 is a timing diagram, which illustrates deflection or synchronizing signals controlling the horizontal deflection or scanning of the video signal. A horizontal line or horizontal deflection period HPER means a period during which one hori¬ zontal line is scanned from the left to the right across the screen and back to the start of the next horizontal line. The HPER comprises an active display period HACTIVE' w ich determines the active image area on the screen and during which the image data read from the raster memory 5 is displayed; and a blanking period HBLANK, which comprises at least a front porch HFP, a synchronizing pulse HSYNC and a back porch HBP. For example, the returning or retrace of the electron beam of the cathode-ray tube to the start of the next line takes place during the blank- ing period HBLANK. All the above-mentioned periods
consist of the multiples of a character clock period CCLK, the number of which is determined in each specific case by control parameters M^ (integers) in the following way: HSYNC = M2 * CCLK HFP = M3 * CCLK HBP = M4 * CCLK
HACTIVE = M5 * CC K HBLANK = HFP + HSYNC +HBP HPER = HBLANK + HACTIVE = M6 * CCLK M6 = M2 + M3 + M4 +M5
The character clock cycle, in turn, comprises the multiples of a video dot clock cycle DCLK = l/fDCLK, whereby CCLK = Ml * DCLK. The character clock CCLK may also be equal to the video clock DCLK. In most cases, Ml = 8 so that one character on the display contains eight pixels in the horizontal direction. With the most common resolutions, the values of the control parameters will thereby be: 640x480 (M5 = 80) 800x600 (M5 = 100) 1024x768 (M5 = 128) 1280x1024 (M5 = 160)
The image adjustment parameters may also be selected in some other way. One special case is over- scanning which adds a coloured peripheral area around the active image area. This area can be incorporated in the HFP/HBP area or the HACTIVE area' depending on the case. Figure 3 shows a corresponding timing diagram for the control or synchronizing signals of the vertical deflection. A field or vertical deflection period VPER comprises a display period VACTIVE and a blanking period VBLANK which contains at least a front porch VFP, a vertical synchronizing pulse VSYNC
and a back porch VBP. All the above-mentioned control periods of the vertical deflection are formed of the multiples of the horizontal deflection period HPER, the number of the multiples being determined in each particular case by programmable control parameters ^ (integers).
Figure 3 illustrates how the video image is positioned on the screen of the video display device 2 by the above-mentioned control signals. The durations of the active display periods HA rIVE and VACTIVE ~n rela"fci°n "to those of the periods HPER and VPER determine the width and height, that is, the size of the displayed image. The positions of the synchronizing pulses HSYNC and VSYNC in relation to the respective active display periods H ACTIVE anc^ VACTIVE determine the position of the image in the horizontal and vertical direction. Conventionally, only a coarse adjustment of the position and size of the image has been possible by varying the control parameters M^ with the accuracy of the character clock CCLK (eight pixels).
According to the invention the above-described control signals of the horizontal and vertical deflection and thus the position and size of the image on the screen can be affected more accurately and more smoothly by adjusting the video dot fre¬ quency fncLK _?e
nerated by the generator 4 shown in Figure 1. This can be effected by software by alter¬ ing the control data in the control registers of the generator 4. In order that a desired accuracy and smoothness would be achieved by the image adjustment of the invention, the video dot frequency of the generator has to be variable by sufficiently small steps. In principle, an improvement over the prior art is already achieved when the adjustment
resolution of the video frequency
is Δ f
DCLK < 1/
(M1 * DCLK
) = f
DCLK
/M1'
that is'
he adjusting accuracy produced on the screen is greater than the adjusting accuracy of Ml pixels. However, the adjustment begins to be really agreeable and accurate only when fπcLK
can ~°
e sel
ec-ted freely and the accuracy of the adjustment on the screen is one pixel or higher. When the adjusting accuracy is a fraction of a pixel, an individual pixel displayed on the screen can be extended or narrowed very accurate¬ ly by means of the invention.
The length of the cycle of the video dot clock DCLK changes with the video dot frequency foCLK* A change in the cycle of the video dot clock DCLK auto- matically changes the duration of the character clock CCLK and thereby the duration of the horizontal de¬ flection period HPER, which may result in that the synchronization is lost. Therefore, according to the invention, the horizontal deflection frequency is maintained substantially constant within the fre¬ quency tolerance allowed by the display device; if required, the value of the control parameter M6 and thus the number of the DCLK clock cycles in the horizontal deflection period HPER may be altered by software in such a direction that the duration of HPER remains substantially constant. In the preferred embodiment of the invention, the value of the parameter M6 is changed to the nearest smaller value (M6 = M6 - 1) if the frequency fncLK ^s to ^e ^e~ creased and the dimensions of the image on the screen increase, and correspondingly to the nearest greater value (M6 = M6 + 1) (the dimensions of the image on the screen decrease as the video dot frequency in¬ creases), when the following condition is fulfilled I H - TI > TC LK / 2, where TH is the desired
duration of the period HPER of the display device 2, T is the programmed duration of the period HPER of the display adapter 1 and TCCLK is the character clock cycle.
Adjustment of the position and size of the image
According to the invention, the size of the image on the screen is adjusted by varying the video dot frequency ncLK while maintaining the horizontal deflection frequency substantially constant by means of the parameters M^. Figures 4 and 5 illustrate the adjustment of the size of the image by the video fre¬ quency. Assume that, in Figure 4, a video dot fre¬ quency is increased while maintaining HPER and HSYNC substantially constant by means of the parameters M^ is fncLKl* τ^e DCLK clock cycle thereby decreases with increasing video dot frequency, as a result of which the duration of the display period HACTjVE also decreases (the duration of HBLANK increases) and an individual pixel narrows, thus causing the image area on the screen to be narrowed in the horizontal direction, as shown in Figure 5. Correspondingly, the image area on the screen can be widened by decreasing the video dot frequency. In the vertical direction the adjustment of the image is carried out separate¬ ly, which will be described later on.
According to the invention, the position of the image on the screen is adjusted by programming the position of the horizontal synchronizing pulse HSYNC in relation to the display period H ACTIVE ^y the parameters M^. The position of the image can also be adjusted accurately (smoothly) by software by varying the video dot frequency while aiming at keeping the position of the pulse HSYNC constant in relation to either edge of the active display period HACTIVE ^y
means of the parameters M^. Thus a change in the video dot frequency causes a change in the size of the active display period H ACTIVE' as a resul't 'of which the "unfixed" edge of the image area is "dis- placed" on the screen in the horizontal direction with respect to the synchronizing pulse. The number of the clock cycles DCLK contained in the front porch HFP or the back porch HBP can be altered by means of the parameters Mi in such a direction that the com- bined duration of the display period H Tjy and the front or back porch period remains substantially constant with varying video dot frequency.
As the horizontal deflection period HPER is maintained substantially constant in the invention, a change in the video dot frequency does not, in prin¬ ciple, affect the vertical deflection. If the vertical deflection is not adjusted, an increase in the video dot frequency, for example, causes the image on the screen to be flattened at the sides, as shown in Figure 5, and the ratio between the width and height of an individual pixel is not correct. This dot aspect ratio is typically 1:1. Therefore, in the invention, the number of horizontal lines blanked during one VPER period, i.e. the height of the image, is also altered by means of the parameters N^_ when the video dot frequency is changed in such a direction that the ratio between the width and height of the pixels remains substantially constant. The height of the image on the screen may also be adjust- ed e.g. by varying the polarity or length of the pulse VSYNC.
The computer system comprises a control soft¬ ware effecting the adjustments according to the in¬ vention. On the basis of instructions given by the user and by utilizing predetermined algorithms, the
control software determines control data determining the required video dot frequency for the generator 4 and the respective M^ and N^ parameters for the display adapter. The user controls the adjustment e.g. by the keyboard 3, the mouse driver 8 or some other peripheral device.
Storage of the positional and synchronizing data of the image When using the method of adjustment according to the invention, it is possible to determine the position and size of the image on the screen so that it matches with the display device used by utilizing the physical (electrical) properties of the display device instead of the integer parameters of the dis¬ play adapter circuit. It thereby suffices that the following initial data are known for each resolution to be used: the horizontal deflection frequency, the vertical deflection frequency, the position of the image in the horizontal direction (HSYNC, HFP, HBP) and the position of the image in the vertical direction (VSYNC, VFP, VBP). The final integer parameters N^ and M^ required by the display adapter 1 and the control data of the generator 4 can be calculated mathematically for each mode of the dis¬ play device and the display adapter whenever the mode is changed. This method of storing image adjustment information e.g. enables more user-friendly proper¬ ties to be achieved more easily and requires less memory capacity for storing the control information. In addition, the same initial data are directly applicable to all display adapters irrespective of their structure, as it is the calculation software that determines the control parameters for each particular display adapter. The image of a new
display device can be adjusted to the manufacturer's set values simply by inputting the specifications of the display device into the calculation software. The specifications may be loaded into the calculation software e.g. from a program disk supplied with the display device.
Automatic search for the deflection frequencies of the display device If the above-mentioned electrical properties of the display device are not known, the search for the deflection frequencies can be effected by selecting a suitable resolution and by maintaining HACTIVE and HPER constant and by varying the video dot frequency from a starting frequency to a first frequency at which the synchronization of the horizontal de¬ flection of the display device is observed. When the display device is synchronized, the user can signal the program about the synchronization by means of the keyboard (or this may be performed by the display device when it detects the synchronization). There¬ after the video dot frequency is further increased to a second frequency at which the synchronization of the horizontal deflection is again lost. The user or the display device gives another signal indicating the loss of the synchronization. From these two signals, the program can determine the synchronizing range and the synchronizing center of the horizontal deflection, such as the mean value of the first and second frequencies, which is selected as a video dot frequency. After the synchronization of the hori¬ zontal deflection, the vertical deflection is syn¬ chronized by maintaining the horizontal deflection frequency and the video frequency substantially constant and by varying the length of the vertical
deflection period of a video signal applied to the display device by means of the parameters N^ until it is observed that the vertical deflection is synchron¬ ized. Thereafter the synchronizing range and center of the vertical deflection can be searched similarly as above and then adjust the size and position of the image on the screen as described above.
Dynamic zooming of the image The invention also enables the achievement of a dynamic zooming effect of the image on the screen. Referring to Figure 6, a partial image area 62 is selected from a normal-size image area 61 to be dis¬ played with normal resolution on the screen, the partial image area being smaller than the normal image area 61 and corresponding to an mxn memory area having an origin (M^, N^) in an MxN-size raster memory 5. The zoom effect of the partial image area 62 is achieved by allowing the video dot frequency to decrease. The origin of the active image area to be zoomed can be moved by programming the (M , N2) co¬ ordinate as the initial address of the image area along a line (MQ, NQ) -> (M^, N-^) when the zooming is in progress. The resolution of the image area 62 de- creases correspondingly with decreasing video dot frequency. The physical size of the entire image area (area 61) on the screen during the zooming of the image area 62 remains sufficiently accurately un¬ changed when the control parameter M5 of the display period HAf--TjVE as well as the parameter M6 of the horizontal period HPER and the position of the pulse HSYNC pulse are altered in accordance with a suitable algorithm depending on the requirements in each particular case. The invention has been described above with
reference to certain synchronizing and timing signals HS, HBLANK, VS, VBLANK of the horizontal and vertical deflection and their periods, such as HFP, HSYNC, HBP, HACTIVE, VFP, VSYNC, VBP, VACTIVE, which can be found in one form or another in every video signal. The format of the video signal and, in practice, the number of discrete signal components to be trans¬ ferred may, however, vary to a very great extent. For instance, the horizontal and vertical deflection signals can be transferred separately or in combina¬ tion, the video signal may a composite video signal (television), or an RGB video signal, an analogous or TTL level signal, etc. The invention is intended for use in connection with all such various video signal formats.
The drawings and the description related to them are only intended to illustrate the present invention. In its details, the invention can be modified within the scope of the attached claims.