Smooth vertical motion via color palette manipulation

Abstract: Smooth vertical movement of a graphics image on a raster display (48) is performed via color palette manipulation at any speed. A color look-up table (42) has a color palette position for each color within the graphics image plus unassigned color palette positions that are assigned to pixels on the top of horizontal color edges of the graphics image. During movement of the graphics image the color values of the assigned color palette positions are updated each display cycle as a function of a desired rate of vertical movement of the graphics image.

Description: Background of the Invention The present invention relates to the electronic generation of graphics images on a raster display, and more particularly to smooth vertical motion of a graphics image on a video raster display via color palette manipulation to create the appearance of smooth motion at any motion speed, such as the scrolling of text graphics on a teleprompter system. The appearance of motion is limited spatially and temporally by various aspects of the hardware used for displaying video graphic information. Spatial resolution for vertical motion is dependent upon the number of scan lines, while temporal resolution is limited by the speed with which scan line data may be changed using the display hardware. There are many ways to increase the limits on these two dimensions: increase the number of scan lines, increase the speed at which the picture may be changed, alter the scan line positions, etc. One particular method for providing smooth vertical scrolling is described in EP-A-0,240,970 that uses weighting factors to combine intensities from a current pixel and a next pixel from consecutive lines in the direction of movement to create an apparent partial pixel movement based upon the desired speed of motion. This system uses a display memory having a capacity of at least twice that necessary for display on a video display, and several pointer registers. This approach is hardware intensive and uses several pointers that are updated each display cycle. What is desired in a smooth vertical motion at any speed of a graphics image on a raster display, which motion does not require drastically special hardware. Summary of the Invention According to a first aspect of the present invention there is provided a method of smooth vertical motion for a graphics image on a raster display, the image being represented by pixel data each having a colour value in the form of an address to a palette position in a colour look-up table, the method comprising the steps of: preprocessing the graphics image to assign unused palette positions of the colour look-up table to the pixels of the graphics image which are adjacent to a horizontal colour edge of the graphics image on the side of the direction of scrolling; and determining a new colour value for each of the thus assigned palette positions, before each display cycle of the raster display, by mixing as a function of a specified rate of vertical movement the colour values of pixels on adjacent opposite sides of the associated colour edge, so as to provide apparent partial pixel movement for each display cycle. According to a second aspect of the present invention there is provided an apparatus for performing smooth vertical motion for a graphics image on a raster display, the image being represented by pixel data each having a colour value in the form of an address to a palette position in a colour look-up table, the apparatus comprising: means for storing the graphics image in the form of pixels; means for accessing the storing means to select a current pixel and a pixel below the current pixel; a colour look-up table having M assigned palette positions, where M is a predetermined number of colours in the graphics image and each assigned palette position has a unique colour value from among the M colours, and having initially unassigned palette positions; means for preprocessing the graphics image as a function of the current pixel and the pixel below the current pixel to assign the initially unassigned palette positions to the pixels of the graphics image which are adjacent to a horizontal colour edge of the graphics image on the side of the direction of scrolling; means for determining a new colour value for each of the thus assigned palette positions, before each display cycle of the raster display, by mixing as a function of a specified rate of vertical movement the colour values of pixels on adjacent opposite sides of the associated colour edge, so as to provide apparent partial pixel movement for each display cycle; and means for displaying the graphics image from the storing means each display cycle. Accordingly the present invention provides smooth vertical motion for a graphics image on a video raster display using color palette manipulation. A raster display having a graphics image to be moved is converted into video data in the form of pixels, each pixel having a color value in the form of an address for a color look-up table. The pixels are pre-processed to find all horizontal edges and to reassign the color palette address for any pixel above the edges to previously unassigned addresses of the color look-up table. After pre-processing the graphic image is moved by mixing colors on opposite sides of the edges as a function of a selected speed of movement in units of scan lines per change period for the previously unassigned addresses. When displayed, the pixels above the edges are blended to provide apparent partial pixel movement from one scan line to the next for each display cycle. The movement algorithm iterates for as many change periods, or display cycles, as required for the desired movement of the graphics image. The objects, advantages and other novel features of the present invention are apparent from the following detailed description when read in conjunction with the appended claims and attached drawing. Brief Description of the Drawings Figs. 1a, 1b and 1c illustrate pre-processing of video data for an arbitrary graphic image to be moved vertically on a raster display according to the present invention. Figs. 2a, 2b, 2c, 2d and 2e illustrate moving of the pre-processed video data for the graphic image to produce motion according to the present invention. Fig. 3 is a block diagram of a hardware configuration for performing smooth vertical motion of a graphic image according to the present invention. Figs. 4A and 4B are flow charts of the pre-processing algorithm according to the present invention. Fig. 5 is a flow chart of the motion process algorithm according to the present invention. Description of the Preferred Embodiment Referring now to Fig. 1a a trapezoid of color X is shown on a background of color Y. If no motion is required, this image could be rendered as shown in Fig. 1b. A top pointer (TP) is set to N and the trapezoid is placed with the top on the thirteenth scan line (N+13). As shown, five scan lines of data and two palette positions are required to display the trapezoid. Palette positions are assigned as: P0 = color Y; and P1 = color X. Now to move the trapezoid upward on the display device at any speed, a pre-processing algorithm is first performed on the video data shown in Fig. 1b. The pre-processing algorithm examines all horizontal edges and reassigns the palette position of any pixel above an edge as follows: one new palette position for every unique combination of below edge color and replaced pixel color. Thus all pixels resting on a pixel edge of color P1 and replacing color P0 are assigned P2, and all pixels resting on a pixel edge of color P0 and replacing color P1 are assigned P3 as indicated in Fig. 1c. A choice is made for the speed of vertical motion, V, in units of scan lines per change period. V may have a fractional value limited by the output of a color look-up table (CLUT). For the following example the fractional part of V has a resolution of 0.25 scan lines per field where the change period is one field in duration. Figs. 2a-2e show movement progression with the period between each figure being one field. The four color palette positions, P0-P4, determined by the pre-processing algorithm, the top pointer, TP, and the top of screen (TOS) for each field are shown at the right of each figure. Changes in the values for these registers may be made during the vertical interval period. As shown by the formulas for palette positions P2 and P3, the colors for the pixels above the edges are gradually mixed together from the values at palette positions P0 and P1 from one field to the next according to the fractional portion of TOS until TP is incremented by one scan line and the appearance of the trapezoid is one scan line higher. This motion algorithm is repeated for as much vertical motion as is desired. A system to implement smooth vertical motion of a graphics image is shown in Fig. 3. This is a computer based system having a central processing unit 30 with a work space 32, such as a random access memory (RAM), tied to common address and data buses 34, 36. A display system includes a display address generator 38, a display buffer 40 and a color look-up table memory 42, all tied to the common address and data buses 34, 36. The display address generator 38 has a top pointer (TP) register 44 that is loaded by the CPU 30 at the start of each change period to indicate which pixel line appears at the top of a monitor screen. The display address generator 38 generates addresses for the display buffer 40 to select the pixels currently being processed. The color look-up number, or lock-up table address, for a selected pixel is used to access the color look-up table memory 42 to select an output color value for that pixel for display. The selected color value is input to a video digital-to-analog converter 46, the output of which drives a picture monitor 48. In operation the video data for the graphics image shown in Fig. 1a is stored by the CPU 30 in the display buffer 40 in the form of rows of pixels, each row corresponding to a scan line of the picture monitor 48 as shown in Fig. 1b. Once the video data is in the display buffer 40, the CPU 30 accesses a pre-prccessing algorithm, shown in Figs. 4A and B, or the pre-prccessing may be performed prior to storing the graphics image in the display buffer. A current pixel (CP) pointer is initiated to be the first pixel in the first row to be processed. The current pixel CP and the pixel directly below the current pixel (BCP) are accessed and the respective color look-up numbers (CLUN) are extracted. A test is performed to determine whether a horizontal edge exists by comparing the CLUNs for the CP and BCP. If the CLUNs are equivalent, then the next pixel in the same row becomes the current pixel, or the first pixel in the next row becomes the current pixel where the current pixel was the last pixel of a row. If the current pixel is the last pixel in the last row to be processed, then the pre-processing is concluded. If a horizontal edge is detected due to the inequality between the CLUNs for CP and BCP, then a filter array is created in the work space 32 by the CPU 30 and a filter index (NPP) is initialized. The maximum size of the color look-up table 42 is the number of colors, M, assigned to represent a color data set for the graphics image plus the number of possible edge combinations from those colors, M!/(M-2)!. The filter array is used to assign unused palette positions within the color look-up table 42 to the pixels above the horizontal edges. The first entry of the array is tested to determine whether the transition across the edge already has an entry in the array so that the CLUN for the CP does not have to be recomputed, but merely substituted for. If there is a new horizontal edge, or color transition, then there is no equality and the filter array is incremented to try to find a comparable transition within the array. If there are no comparable transitions, then a new filter array entry is created for the new transition if there are still available palette positions within the color look-up table 42. An unassigned palette position is then assigned to that transition in the filter array and to the current pixel, CP, in the display buffer. Referring again to Figs. 1b and 1c the filter array initially has no entries and there are two unassigned palette positions where M=2. A first filter array entry for NPP=0 is established such that SC(0)=P0, EC(0)=P1 and the palette position PP(0)=P2 where SC is the start color, EC is the end color and P2 is the next available unused color palette position in the CLUT 42. For each subsequent transition from color Y to color X the CLUN for CP equals P0 and for BCP equals P1 so that P2 is assigned to each CP that exists above the horizontal edge from Y to X. At the bottom of the trapezoid the transition is from X to Y, for which the filter array has no entry and the comparison indicates that this is a new color transition. There is still one unassigned palette position so that a second entry is created as SC(1)=P1, EC(1)=P0 and PP(1)=P3. Thus the pixels for the graphics image of the trapezoid have the CLUNs assigned as indicated. During each interval between display cycles, such as during the vertical interval of a television video display, new values for the CLUT 42 unassigned palette positions PP are computed. When motion is started or changed, a motion process algorithm (fig.5) is initiated by determining the incremental scan line movement per change period, V, as a function of the number of scan lines per frame, the change period and the roll time to move the frame completely off the raster display screen. The number of scan lines is a function of the type of video, such as NTSC with 525 scan lines per frame, PAL with 625 scan lines per frame, various HDTV schemes with 1050, 1125 or 1250 scan lines per frame, or any other non-television system having a specified number of scan lines per frame. The change period reflects how often the screen display may be updated, such as field or frame rates for television video or other arbitrary rates for other graphics applications. These two parameters are fixed as a function of the display hardware. The variable is the roll rate, or frame roll time, that determines the incremental scan line movement per change period, or display update. Also as part of the initialization process for the motion process algorithm TOS and TP are set to the top of the screen position within the data buffer 40, and a change period timer is reset. The TOS value is divided into its whole part, WP, and its fractional part, FP, and the first filter array entry is accessed. For each filter array entry the color values for the indicated palette positions are computed and stored in those palette positions within the CLUT 42. For example referring to Fig. 2b where FP=0.25 the color value for PP(0), or P2, is *PP(0) = FPxEC(0) + (1-FP)xSC(0) P2 = 0.25x(color X) + 0.75x(color Y) After all the color values for the array have been computed and stored in the CLUT 42, then the top pointer, TP, is updated by WP, and, if the motion process is not complete, the change period timer is checked to determine whether the change period is complete. When the change period is complete, the change period timer is reset and TOS is incremented by V, and then new values from the filter array are computed. The filter array values may be precomputed into tabular form during preprocessing or may be computed at any time during a change period, either for the current change period prior to the display cycle or for the next change period during the display cycle, with the filter array values being transferred to the CLUT 42 prior to the next display cycle. Thus the present invention provides smooth scrolling of a graphics image on a raster display using color palette manipulation by preprocessing the graphics image to assign unused palette positions to pixels at the top of a horizontal color edge, and then computing new color values for those palette positions for each display cycle as a function of the speed of motion.

Claims: A method of smooth vertical motion for a graphics image on a raster display (48), the image being represented by pixel data each having a colour value in the form of an address to a palette position in a colour look-up table (42), the method comprising the steps of: preprocessing the graphics image to assign unused palette positions of the colour look-up table (42) to the pixels (P2, P3) of the graphics image which are adjacent to a horizontal colour edge of the graphics image on the side of the direction of scrolling; and determining a new colour value for each of the thus assigned palette positions, before each display cycle of the raster display, by mixing as a function of a specified rate of vertical movement the colour values of pixels on adjacent opposite sides of the associated colour edge, so as to provide apparent partial pixel movement for each display cycle. An apparatus for performing smooth vertical motion for a graphics image on a raster display, the image being represented by pixel data each having a colour value in the form of an address to a palette position in a colour look-up table, the apparatus comprising: means for storing (40) the graphics image in the form of pixels; means for accessing (38) the storing means (40) to select a current pixel and a pixel below the current pixel; a colour look-up table (42) having M assigned palette positions, where M is a predetermined number of colours in the graphics image and each assigned palette position has a unique colour value from among the M colours, and having M!/(M-2)! initially unassigned palette positions; means for preprocessing (30) the graphics image as a function of the current pixel and the pixel below the current pixel to assign the initially unassigned palette positions to the pixels (P2, P3) of the graphics image which are adjacent to a horizontal colour edge of the graphics image on the side of the direction of scrolling; means for determining (30) a new colour value for each of the thus assigned palette positions, before each display cycle of the raster display, by mixing as a function of a specified rate of vertical movement the colour values of pixels on adjacent opposite sides of the associated colour edge, so as to provide apparent partial pixel movement for each display cycle; and means for displaying (48) the graphics image from the storing means each display cycle.

Inventors: KERMAN CHARLES W, KERMAN, CHARLES W.
Applicants: GRASS VALLEY GROUP, THE GRASS VALLEY GROUP, INC.
Application year: 1990
Main classification: G09G5
IPC codes: G09G5, G06T11, G06F3