Abstract:
Systems and methods are disclosed for controlling a display device having a display scan line rate by storing incoming data in a buffer, the buffer having a usage level measure; comparing the usage level to the display scan line rate; and adjusting a width of a display scan line to avoid buffer overflow or underflow. The system avoids a costly external frame buffer and automatically handles uncertainties such as jitter in input and output clocks when the system operates in different environments.

Description:
COPYRIGHT RIGHTS  
         [0001]    A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.  
         BACKGROUND  
         [0002]    The present invention relates to display controllers for digital display devices such as liquid crystal displays, plasma displays and progressive-scan televisions.  
           [0003]    One commonly used type of display panel is a liquid crystal display (LCD) panel. An LCD display panel is a rectangular grid of rectangular or square dots. The grid includes transparent electrodes laid out in horizontal rows on one thin pane, and in vertical columns on the other. The liquid crystal formula trapped in between the panes reacts to an electrical field applied to each electrode in the rows and columns. This reaction rotates the polarization of light transmitted through the LCD display. Polarizing layers outside the panes cause the dots to appear light or dark as the polarization changes.  
           [0004]    The display is controlled by continuously feeding dot data to the display. The data is organized into individual pixels, rows of pixels, and full-page frames. A set of rows makes up a frame, which is one full page of the display. LCD data is continuously sent to the LCD panel to refresh the display frame. Since most LCD displays have no on-board frame buffer memory, the display data must be continuously refreshed. To get a stable, flicker-free image, the display data is sent to the panel at a frame refresh rate (referred to herein as the “frame rate”) which falls within a range normally specified by the LCD panel manufacturer. An LCD panel manufacturer may specify, for example, that best results are obtained, i.e., a stable, flicker-free image, when the display data is sent to the panel 60 to 70 times per second, or 60 Hz to 70 Hz.  
           [0005]    The LCD may be driven by different computers with different display resolutions. To insure the minimum level of interoperability between a digital flat panel (DFP) compliant monitor and host, both the monitor and host must support the video modes 640×400-60 Hz, 720×400-60 Hz, and 640×480-60 Hz. The DFP monitor must produce a viewable image with all of these video modes. The pixel clock for 640×400 and 720×400 shall be scaled down so the refresh rate is adjusted from 70 Hz to 60 Hz. The definition of a viewable image is all pixels are visible to the end user. Note that this does not mean that the monitor must support scaling or centering. It is considered acceptable for the image to be displayed in the upper left corner of the LCD. Monitors that have a native resolution of 640×480 are not required to fully display 720×400. If a DFP monitor is bundled with a DFP host or video card that does support scaling or centering, the monitor may rely on the host and is not required to provide this lower resolution support.  
           [0006]    To illustrate, a VGA 640×480 pixel screen output can be displayed in a reduced area on a 1024×768 SVGA flat panel display. This type of display method would leave 384 pixels blank at the right of the screen and 288 blank lines at the bottom of the page. To increase the usable screen area, both horizontal and vertical expansion, preferably by the correct scale factor, are required. The image expanding can be done by replication of pixels horizontally or vertically or both. Typically, vertical lines may be added by periodically replicating the pixels of the preceding line to provide the desired expansion factor. However, horizontal expansion of character data is not provided because the character clock is typically used to clock the display, this being a submultiple of the pixel clock rate. Thus, the aspect ratio of text screens may be distorted by the vertical expansion without a corresponding horizontal expansion.  
           [0007]    Another approach in flat panel technology replicates pixels vertically using the panel logic to simultaneously activate two row drivers at selected times. The column drivers are usually split into several chips and all of them must be driven simultaneously during one line scan, making it impossible to replicate pixels horizontally.  
           [0008]    U.S. Pat. No. 5,600,347 discloses a system for horizontal expansion of low resolution display modes onto high resolution displays at a variable scaling factor. Two different methods are provided for graphics and text modes to attain better screen image quality. In the first method, a first pixel data sequence to be expanded is first oversampled at a multiple of the frequency thereof to produce an intermediate oversampled data sequence. The oversampled data sequence is linearly decimated by a factor of less than unity to produce a replicated second data sequence longer than the first, which is then displayed. In the second method, the intermediate oversampled data sequence is filtered to provide an interpolated oversampled data sequence, which is then decimated instead of the intermediate oversampled data sequence, to further improve the screen image quality.  
           [0009]    U.S. Pat. No. 6,177,922 discloses a method and apparatus for producing video signal timing for a display device that has a display format different from the input video format. The system performs variable scale horizontal expansion of a first sequence of data elements to a second longer sequence of data elements for higher resolution display, in which the first data sequence is oversampled at a multiple of the frequency thereof, and then linearly decimated by a factor of less than unity to produce the second data sequence. The variable scale horizontal expansion is performed with a scaling factor (m/n). Horizontal expansion of a first sequence of data elements by a factor of two is performed, followed by horizontal compression by a factor of (m/2n). For example, a 640 pixel line may be expanded to 1024 pixels by first replicating every pixel to derive 1280 pixels, and then decimating the result by deleting (2n−m) pixels out of every 2n pixels. In operation with a typical computer graphics subsystem, the controller chip runs with its pixel clock rate divided by 2 and its output oversampled by a factor of 2. Then, selected pixel clock signals are deleted by the decimator logic. Although there are discontinuities in the pixel clock rate, the output pixels are compressed into the flat panel display because the data are first clocked into the display and then latched for a whole line period while the next line is assembled. Any screen compression ratio between 1 and 2 may thus be achieved by deleting the appropriate number of pixel clocks. Expansion by factors of more than 2 may also be achieved by increasing the oversampling ratio prior to decimation. When combined with vertical expansion methods, the system may be used to only perform expansion to any size of flat panel display from a lower resolution image.  
           [0010]    Conventional image scaling controllers require their output clock to the LCD panel interface to match their input clock at a fixed rate to keep the frame rate equal between the input to each controller and the output to the LCD panel interface.  
           [0011]    The &#39;922 patent needs to generate a clock signal (“target clock signal”) which is synchronized with a reference clock signal. The two clock signals generally have unequal frequencies. For the purpose of illustration, the target clock signal may need to have a frequency of X/Y times the frequency of the reference clock signal, wherein X and Y are integers. To solve the above difficulty, the device in the &#39;922 patent operates in conjunction with a rather complex method and apparatus for generating a target clock signal having a frequency of X/Y times the frequency of a reference clock signal, as discussed in a companion patent U.S. Pat. No. 6,157,376. The &#39;376 patent discloses a clock generator circuit which provides for short comparison cycles even if X and Y do not have a large common denominator when a target clock signal having a frequency of (X/Y) times the frequency of a reference clock signal is to be generated. The comparison cycle is shortened by using approximately X/L and Y/L as divisors, instead of X and Y. As X/L and/or Y/L may not equal integers, multiple divisors may be used in a weighted fashion such that the weighted averages equal X/L or Y/L as the case may be.  
         SUMMARY  
         [0012]    Systems and methods are disclosed for controlling a display device having a scan line (or display line) rate by storing incoming data in a buffer, the buffer having a usage level (for example fullness) measure; comparing the usage level to the scan line rate; and adjusting a period of a display line to avoid buffer overflow or underflow.  
           [0013]    Advantages of the invention may include one or more of the following. The controller adjusts the display&#39;s scan line rate automatically with a relatively small internal memory. The up/down scaling (interpolation/decimation) can be achieved without requiring a large external frame buffer. The system flexibly generates video output clock signals having a frequency different from a reference input clock frequency. The system allows a display panel output clock rate to operate at a rate that is not preset with respect to input clock rate or frame rate. The system does not need to generate the target clock signal having a frequency of exactly X/Y times the frequency of a reference clock signal. This is done by snooping an internal memory usage level level and scan line rate as a basis to adjust the line buffers usage and scan line period (video width) automatically. This is done line by line to avoid the internal buffer over/under flow. The system achieves the same frame rate without keeping the rate between input data rate and output data rate. The system also avoids costly external frame memory and can perform image interpolation and decimation using a small amount of internal memory (FIFO SRAM).  
           [0014]    The system operates off a simple phase locked loop that is economical to design since the PLL precision is not critical. The yield of resulting design is increased. The system also minimizes video input and video output clock jitters, which may vary due to temperature, process variation, or different input devices, for example. The system matches the output timing accordingly. The system avoids a costly external frame buffer and automatically handles uncertainties such as jitter in input and output clocks when the system operates in different environments. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0015]    [0015]FIG. 1A shows one embodiment of a display controller.  
         [0016]    [0016]FIG. 1B shows a second embodiment of a display controller.  
         [0017]    [0017]FIG. 1C shows various exemplary timing diagrams for the controller of FIG. 1B.  
         [0018]    [0018]FIG. 2 shows an exemplary diagram of a buffer management control circuit in FIG. 1.  
         [0019]    [0019]FIG. 3 shows an exemplary diagram illustrating the operation of an interpolation decimation engine in FIG. 1.  
         [0020]    [0020]FIG. 4 shows an exemplary diagram of a timing control circuit in FIG. 1.  
         [0021]    [0021]FIG. 5 shows an exemplary diagram of a post-processing circuit in FIG. 1.  
         [0022]    [0022]FIG. 6 shows data flow in the controller of FIG. 1.  
         [0023]    [0023]FIG. 7 shows an exemplary vertical and horizontal scaling operation in the controller of FIG. 1.  
         [0024]    [0024]FIG. 8 shows an exemplary configuration to perform either upscaling or downscaling using the above system.  
         [0025]    [0025]FIG. 9 shows an exemplary video deinterlacing application for the above system.  
     
    
     DESCRIPTION  
       [0026]    Referring now to the drawings in greater detail, there is illustrated therein structure diagrams for a display controller and logic flow diagrams for processes a computer system will utilize to render images on a display panel, as will be more readily understood from a study of the diagrams.  
         [0027]    [0027]FIG. 1A shows one example of a display controller  50  that controls various digital display devices such as liquid crystal displays, plasma displays and progressive-scan televisions, among others. In this embodiment, the display controller  50  is an LCD controller  50  that drives an LCD panel. The controller  50  has a buffer or memory  52  that receives incoming video data from an external source such as an analog to digital converter (ADC), a video decoder, a computer&#39;s graphics card, a digital video interface (DVI) source, or a suitable digital video player. In one embodiment, the buffer or memory  52  is a static random access memory (SRAM), which can be one or more single ported or double ported SRAMs with at least two outputs for which it could be read in parallel to process the image data and those date are feed into a matrix interpolation/decimation engine  54 . The interpolation or decimation engine  54  reads vertical pixels in parallel, so that the horizontal and vertical pixels operation can be done in one circuitry by one matrix 2D XY filtering operation. It has better performance over traditional horizontal, then Y direction scan line interpolation. The operation of the engine  54  is described in more detail below.  
         [0028]    The incoming video data is clocked by an input (iclk). The buffer or memory  52  sends output data to the matrix interpolation or decimation engine  54  when the engine  54  sends a request signal Req to the memory  52 . The buffer or memory  52  also receives a panel clock signal pclk. The panel clock can be generated from an internal phase locked loop (PLL). The system allows a display panel output clock rate to operate at a rate that is not preset with respect to input clock rate or frame rate. Rather, the input/output clock is automatically harmonized by snooping the internal memory  52 &#39;s usage level level and the output video scan line rate as a basis to adjust the line buffer usage and scan line period (video width). Unlike the prior art, the system does not need to generate the target clock signal having a frequency of exactly X/Y times the frequency of a reference clock signal. As a result, a simple PLL is used to generate the clock. The complexity of the method and apparatus for generating a target clock signal having a frequency of X/Y times the frequency of a reference clock signal disclosed in U.S. Pat. No. 6,157,376 is avoided.  
         [0029]    In any given mode, if the panel required 1024×768 at 60 Hz, the pclk signal is set to the Video Electronics Standards Association (VESA) standard at 65 Mhz and not a fixed clock rate with respect to the iclk input clock. The output panel horizontal total count is also fixed according to the VESA standard (1344). The output of the matrix interpolation or decimation engine  54  is provided to the LCD panel.  
         [0030]    The buffer or memory  52  is controlled by a buffer controller  56 . The buffer controller  56  also drives a panel timing controller  58 . The buffer controller  56  has a write pointer, a read pointer, full and empty flags which control the generation of horizontal sync stall signal (HSYNC_STALL) and a horizontal sync contraction signal (HSYNC_REDUCE) for internal timing generation. The write pointer has the clock running by input clock which could be ADC, DVI or Video input clock. The read pointer clock is the pclk generated by the internal PLL which does not require a predefined clock rate with respect to the input clock.  
         [0031]    The buffer controller  56  can assert HSYNC_STALL to lengthen the HSYNC pulse, or alternatively can assert HSYNC_REDUCE signal to contract the HSYNC pulse. The output of the timing controller  58  include panel clock signals such as HSYNC (horizontal sync), VSYNC (vertical sync), and DEN (data enable).  
         [0032]    The buffer controller  56  snoops the usage level of the buffer or memory  52 . If the buffer or memory  52  status is in a certain range between predefined thresholds such that the output and input would not generate a full condition or an empty condition, the panel output horizontal pixel count is kept at a default VESA value (1344).  
         [0033]    If the usage level of the memory or buffer  52  falls below this threshold by X clocks, the LCD panel display is retrieving video data so fast that it may cause the memory  52  to underflow. In this case, the buffer controller  56  then asserts HSYNC_STALL to request an HSYNC generator to slow down the HSYNC generation which in turn to increases the horizontal total pixel count from 1344 to 1344+X clocks before generating another HSYNC.  
         [0034]    If the usage level of the memory or buffer  52  is above the thresholds by Y clocks, the LCD panel display operates at too slow a pace that may cause the internal memory  52  to overflow. In this case, the buffer control circuitry asserts HSYNC_REDUCE to make the HSYNC generator to speed up the HSYNC generation which in turn to decrease the horizontal pixel count from 1344 to (1344−Y) clocks before generating another HSYNC. The maximum value of X is set to a predetermined number, for instance, ¼ of display horizontal total. Any number above the exemplary example of ¼ of htotal is set to be htotal.  
         [0035]    In one embodiment, Y conforms to a minimum value determined as follows:  
         [0036]    Htotal_nominal−Y&gt;Horizontal display size  
         [0037]    Default Horizontal total=Htotal_nominal  
         [0038]    By adjusting the panel display horizontal total and HSYNC generation, the internal frame memory  52  may not overflow or underflow. Moreover, pclk does not need to have pre-defined relationship with any input window mode or timing. In every HSYNC asserted, the interpolation/decimation engine  54  sends a request to the memory  52  (which in the example is a SRAM FIFO) to read the data to be interpolated or decimated. The rate is control by the buffer  52 &#39;s usage level level. Since the buffer or memory control is automated, the buffer or memory  52  does not experience overflow and underflow and can be treated as a frame memory even though the memory  52  is much smaller than the actual display frame size.  
         [0039]    [0039]FIG. 1B shows a second embodiment of an LCD controller  110 . The controller  110  receives input data from an input source device  112  and stores the data in a buffer or memory  114 . The output of the buffer or memory  114  is provided to an interpolation/decimation engine  116  to also minimize the rendering jagged edges on the LCD. The interpolation decimation engine  116  provides its output to a post processing circuit or circuit or block  118 , which enhances certain display characteristics, among others, the contrast, brightness, hue/saturation of the video to be rendered on the LCD. The output of the post processing circuit or block is presented to an LCD panel  120  for display. The buffer or memory  114  and the interpolation/decimation engine  116  are controlled by a buffer management control circuit or block  122 . The buffer management control circuit or block  122  also controls a timing control circuit or block  124 . In turn, the timing control circuit or block  124  clocks the interpolation/decimation engine  116  and the post processing circuit or block  118 .  
         [0040]    The input device  112  can be the output of an analog to digital converter (ADC) such that from a computer video display card, a digital video input (DVI) source, or a digitized NTSC/PAL decoder. The input device  112  can be any suitable digital device for generating a digital bitstream suitable for rendering such as a computer, a DVD player, a VCR, or a multimedia unit to receive program data from one or more service providers and to display the program data for viewing. Such service or content providers can include terrestrial broadcasters, cable operators, direct broadcast satellite (DBS) companies, companies providing content for download via the Internet, or any similar such content and/or service provider.  
         [0041]    The input data is provided to the buffer or memory  114 . The buffer or memory  114  compensates for the differences in speed of the incoming and the outgoing circuitry through which the data must pass. In one embodiment, the memory  114  is high speed static random access memory (SRAM). However, the memory can be any suitable memory, including DRAM, EEPROMs, flash, and ferro-electric elements, for example.  
         [0042]    In one embodiment, the memory  114  is configured as a ring buffer First In First Out (FIFO). The FIFO allows the matching of multiple asynchronous systems where incoming video operates at a significantly different clock frequency than outgoing video. The length of the FIFO is determined by the difference in clock rates and the amount of data to be buffered. The FIFO allows simultaneous access to the memory through two independent “write” and “read” pointers. Since the data is always contiguous, an address bus is not needed and data is read out in the same order in which it was received. Additionally, the FIFO provides a high limit pointer and a low limit pointer to clamp the horizontal line changes. The high limit pointer is used to limit the addition of clocks in the horizontal line, while the low limit pointer is used to limit the reduction of clocks in the horizontal line.  
         [0043]    Internally, two flags provide information on the status of the memory array. Flag logic prevents illogical writes and reads from occurring. The “empty” flag indicates that the read and write cycle counts are equal, and will be automatically asserted after a reset, which functions to reset the cycle counters and returns both read and write pointers to memory address zero. The empty flag, therefore, prevents reading while empty, a data underflow condition. As a result, if the memory array is empty, a read cycle is inhibited until at least one data entry has been written. On the other hand, a usage level such as a “full” flag indicates that the write and read counts are at a maximum distance apart, which implies that a full load of data has been written to the FIFO and has not yet been read out. The full flag, therefore, prevents writing while full, a data overflow condition. If the memory array is full, a write cycle is inhibited until at least one data entry has been read out. Once data that has been stored at a given address is read, it can then be overwritten.  
         [0044]    To illustrate, the system of FIG. 1B controls the LCD device  120  having a scan line rate. The buffer  114  receives video from the input source device  112  and stores the incoming data. The buffer  114  has a usage level measure, namely the high limit. The system of FIG. 1B compares the usage level, for example the buffer fullness measure to the scan line rate and adjusts a period of the scan line to avoid buffer overflow or underflow. The adjustment is done by adding or subtracting clocks to the output video clock pclk.  
         [0045]    The system can perform interpolation or decimation on an image. In one embodiment, this is done by considering image diagonal characteristics. The diagonal characteristic determination is done by reading multiple vertical pixels simultaneously. The system can perform two-dimensional image filtering operations on the multiple vertical pixels. Post-processing is then performed before video data is sent to the display device, including adjusting contrast, adjusting brightness, adjusting hue and saturation, reducing noise, performing gamma correction, or enhancing a video image.  
         [0046]    [0046]FIG. 1C shows an exemplary timing diagram illustrating the extension of a scan line period as well as the reduction of a scan line period based on the incoming video clock and the outgoing video clock. In FIG. 1C, an ActiveDataOutput signal is supplied by the video source device  112  and data is transmitted when this signal is asserted. The incoming data is stored in the buffer  114  with a usage level measure. A period  180  on the left of the diagram represents a default output rate with timing information such as Hsync output to the digital display device. A period  182  in the middle illustrates the timing when the buffer management control circuit or block  122  detects that the horizontal period needs to be reduced. In this case, a CycleReduced signal is asserted just before the ActiveDataOutput signal is deasserted to indicate that the period should be reduced by comparing the usage level to the outgoing scan line rate. The HSync period output is reduced to avoid buffer overflow. Correspondingly, a period  184  on the right illustrates the timing when the buffer management control circuit or block  122  detects that the horizontal period needs to be extended accordingly to avoid buffer underflow. In this case, a StallRequest signal is asserted, which eventually results in the assertion of a CycleExtended signal to indicate that the period should be increased.  
         [0047]    [0047]FIG. 2 shows an exemplary diagram of one embodiment of the buffer management control circuit or block  122  in FIG. 1. In FIG. 2, the write pointer and read pointer from the memory  52  (in one implementation, an SRAM configured as a FIFO buffer) are provided to an arithmetic logic unit (ALU)  202  whose output is provided to one input of an ALU  204 . The other input of the ALU  204  is connected to a low limit value from a programmable register which may be accessible from a host or system controller. The output of the ALU  204  is latched by a flip-flop  206 . The output of the flip-flop  206  is presented to one input of a multiplexer  208 . The other input to the multiplexer  208  is the high limit pointer. The output of the multiplexer  208  is provided to an ALU  210 , which adds the output of the multiplexer  208  to a Phtotal value received at the second input of the ALU  210 . The output of ALU  210  represents a Phtotal with clocks added.  
         [0048]    The write pointer and read pointer from the FIFO are also provided to an ALU  212  whose output is provided to one input of an ALU  214 . The other input of the ALU  214  is connected to the high limit value from a programmable register which may be accessible from the host or system controller. The output of the ALU  214  is latched by a flip-flop  216 . The output of the flip-flop  216  is presented to one input of a multiplexer  218 . The other input to the multiplexer  218  is the low limit pointer. The output of the multiplexer  218  is provided to an ALU  220 , which subtracts the output of the multiplexer  218  to a Phtotal value received at the second input of the ALU  220 . The output of ALU  220  represents a Phtotal with clocks deducted therefrom.  
         [0049]    The original Phtotal, the clock added Phtotal from the ALU  210 , and the clock deducted Phtotal from an ALU  220 , are received by a multiplexer  222  that selects one of the three values and presents the output to a latch  224 . The latched value is provided to an ALU  226 , which adds the latched value to a horizontal counter pointer to output a horizontal sync request signal that is provided to the timing control circuit or block  124 . Verilog code for one implementation of the buffer management control circuit or block  122  attached in the appendix.  
         [0050]    [0050]FIG. 3 shows an exemplary diagram illustrating the operation of the interpolation/decimation engine  116  in FIG. 1. The interpolation/decimation engine  116  processes image data two-dimensionally so that the diagonal image data is also considered to avoid jagged edges. Although conventional X-Y or Y-X interpolation engine can be used, the diagonal interpolation/decimation engine  116  is superior to engines that only consider X-Y or Y-X interpolation in image quality.  
         [0051]    Referring now to FIG. 3, an array of rows of pixels is shown. In the first row, the pixels include P00, P01, P02, P03, . . . P0k. Correspondingly, in the second row, the pixels include P10, P11, P12, P13, . . . P1k; in the third row, the pixels include P20, P21, P22, P23, . . . P2k; in the fourth row, the pixels include P30, P31, P32, P33, . . . P3k; and in the fifth row, the pixels include P40, P41, P42, P43, . . . P4k. The array of rows is process in two stages:  
         [0052]    Stage 1:  
         [0053]    At pipeline k=1, if the current interpolation point is closer to P11.  
         [0054]    p21′=(Coef01*P01+Coef11*P11+coef21*P21+coef31*P31)+SlopeK*(coef02*P02+coef20*P20+coef00*P00+coef22*P22)  
         [0055]    where the SlopeK is the bilinear distance between P11 and P21.  
         [0056]    Alternatively, if the current interpolation point is closer to P21:  
         [0057]    p21′=(Coef11*P11+coef21*P21+coef31*P31+coef41*P41)+(1−SlopeK)*(coef10*P10+coef32*P32+coef12*P12+coef30*P30)  
         [0058]    Stage 2:  
         [0059]    Poutput=coef20*P20′+coef21*P21′+coef22*P22′+coef23′*P23  
         [0060]    where the coefficient can be any programmable scaling, for example Cubic, Bicubic, Gaussian polyphase FIR, filter coefficients.  
         [0061]    The interpolation/decimation engine  116  reads multiple vertical pixels simultaneously thus allowing a variety of 2-dimensional image filtering operations that produce better image quality than a traditional X-direction, then followed by Y-direction image filtering operation.  
         [0062]    [0062]FIG. 4 shows an exemplary diagram of one embodiment of the timing control circuit or block  124  in FIG. 1. In FIG. 5, data from memory (in this case FIFO buffer)  300  is provided to a memory status snooping unit  302 , which determines FIFO buffer overflow and underflow conditions as well as updates buffer read/write pointers. The outputs of the memory status snooping unit  302  are provided to a buffer management block  260  that outputs a horizontal sync output signal. The block  260  receives inputs from comparators  254  and  266 . The comparator  254  receives a default HSync total from horizontal setting registers  250 . The comparator  254  also receives signals from a horizontal counter  252 . The counter  252  is reset when the horizontal sync signal is received.  
         [0063]    Correspondingly, a vertical counter  262  is incremented by each output horizontal sync signal. It is cleared by a vertical sync output signal. The output of the vertical counter  262  is provided to the comparator  266 . The comparator  266  also receives vertical setting information from vertical setting registers  264 .  
         [0064]    [0064]FIG. 5 shows an exemplary diagram of one embodiment of the post-processing circuit or block  118  in FIG. 1. Data from the interpolation/decimation engine is provided to an edge enhancement block  304  to enhance image edges. After edge enhancement, data is provided to a contrast, brightness, hue, saturation adjustment block  306 . Data is then provided to an on-screen display (OSD) block  308 . Next, the data is gamma corrected in gamma correction block  310 . The output of the gamma correction block  310  is provided to a multiplexer  320 .  
         [0065]    The multiplexer  320  receives data from either the interpolation/decimation engine or an external video source. If external video is selected, the video source is provided to a contrast, brightness, hue, saturation adjustment block  312 . Data is then provided to a picture overlay block  314 . Next, the data is gamma corrected in gamma correction block  316 . The output of the gamma correction block  316  is provided to the multiplexer  320 .  
         [0066]    [0066]FIG. 6 shows an exemplary data flow in the controller of FIG. 1. First, data is read from the SRAM FIFO and written into the matrix interpolation/decimation block. The matrix interpolation/decimation block then performs operation in FIG. 3. If the SRAM FIFO overflows or underflows, the interpolation block deactivates a data request signal input to the SRAM FIFO. The data then is provided to the post processing block. Typical post processing block operations may include contrast control, picture enhancement, brightness control, hue and saturation, noise reduction, Gamma correction, among others. Finally, the video data is output to the LCD panel interface.  
         [0067]    [0067]FIG. 7 shows an exemplary vertical and horizontal scaling operation in the controller of FIG. 1. First, incoming data is horizontally scaled ( 702 ). The horizontally scaled data is presented to the ring buffer FIFO ( 704 ). Next, a diagonal Y-scaling operation is performed ( 706 ). Finally, a second horizontal scaling operation is performed ( 708 ). The process of FIG. 7 enables the LCD controller to scale up as well as scale down incoming video to match a particular LCD panel&#39;s characteristics.  
         [0068]    [0068]FIG. 8 shows an exemplary configuration to perform either upscaling or downscaling using the above system. The example in FIG. 8 further illustrates an advantageous application of the above system where, to minimize memory requirement, the system decimates the video/graphic signal before it flow to the internal memory (SRAM or FIFO).  
         [0069]    In the configuration of FIG. 8, the above system is configured as follows: a horizontal decimation/decimation engine  402  provides data to memory (FIFO buffer)  406 . The data from the FIFO  406  is provided to a vertical and diagonal edge scaling block  408 . Finally, data is provided to a post processing block.  
         [0070]    In a decimation (down-scaling) application, the interpolation/decimation engine uses the horizontal decimation engine first (It may or may not use the same horizontal interpolation/decimation circuitry in the video application).  
         [0071]    When up-scaling (interpolation) an image, the first horizontal decimation/interpolation engine is used to upsize the image, which is subsequently stored in the internal memory (FIFO buffer or SRAM). The vertical/edge scaling engine  454  then reads the data to perform the diagonal and vertical scaling (interpolation) operations.  
         [0072]    [0072]FIG. 9 shows an exemplary video deinterlacing application for the above system. In this exemplary configuration, video data is provided to a noise filter  450 . In this case, the filter  450  is a low pass filter. The low-pass filtered data is stored in memory  452 . Next, vertical and diagonal/edge scaling is performed in block  454 . The output of the vertical and diagonal/edge scaling block  454  is provided to a second horizontal scaling block  456 , which in turn drives an LCD panel  460 .  
         [0073]    The second horizontal scaling block  456  is controlled by a timing control block  458 , which in turn is managed by an auto buffer management control block  457 . The vertical and diagonal/edge scaling block  454  also communicates with an adaptive motion detection block  455 , which receives data from external memory  470 . The external memory  470  can be any suitable high density memory such as synchronous DRAM (SDRAM), for example.  
         [0074]    In the video deinterlacing application, the interpolation/decimation engine performs vertical and diagonal scaling first. Next, the deinterlaced (After Motion adaptive and edge detection) video frame are processed by the horizontal scaling engine to meet the output requirement, because edge effect processing needs to be done prior to the horizontal interpolation engine.  
         [0075]    The system complies with VESA&#39;s scaling arbitration. Thus, since the controller states support of more than one resolution in EDID, the host computer shall assume the LCD monitor supports scaling or centering and the host computer defaults to monitor scaling. However, the host can still perform scaling at the user&#39;s option. The system lists the video modes that are supported with a quality image (centering or scaling) to the host computer.  
         [0076]    It is to be understood that various terms employed in the description herein are interchangeable. Accordingly, the above description of the invention is illustrative and not limiting. Further modifications will be apparent to one of ordinary skill in the art in light of this disclosure.  
         [0077]    The invention has been described in terms of specific examples which are illustrative only and are not to be construed as limiting. The invention may be implemented in digital electronic circuitry or in computer hardware, firmware, software, or in combinations of them.  
         [0078]    Apparatus of the invention may be implemented in a computer program product tangibly embodied in a machine-readable storage device for execution by a computer processor; and method steps of the invention may be performed by a computer processor executing a program to perform functions of the invention by operating on input data and generating output. Suitable processors include, by way of example, both general and special purpose microprocessors. Storage devices suitable for tangibly embodying computer program instructions include all forms of non-volatile memory including, but not limited to: semiconductor memory devices such as EPROM, EEPROM, and flash devices; magnetic disks (fixed, floppy, and removable); other magnetic media such as tape; optical media such as CD-ROM disks; and magneto-optic devices. Any of the foregoing may be supplemented by, or incorporated in, specially-designed application-specific integrated circuits (ASICs) or suitably programmed field programmable gate arrays (FPGAs).  
         [0079]    While the preferred forms of the invention have been shown in the drawings and described herein, the invention should not be construed as limited to the specific forms shown and described since variations of the preferred forms will be apparent to those skilled in the art. Thus the scope of the invention is defined by the following claims and their equivalents.