Image processing system

Abstract: Image data are defined by color vectors each composed of vector factors. Each vector factor specifies the brightness and color difference of a dot. The image data are transmitted with a normal timing when the vector factors correspond to dots of the image one for one, and are transmitted with another timing in another case to scroll the image horizontally.

Description: The present invention relates to an image processing system, and more particularly to a game computer system processing a variety of images such as a natural picture together with an animation picture. In a conventional game computer system, image data are defined by color for each dot. The colors of the image data are managed by a color pallet formed in a memory, the color pallet storing many pallet codes (PLT) corresponding to color data. In the conventional game computer system, image data are compressed (encoded) to be transmitted, and then the compressed data are extended (decoded) to be displayed. Each piece of image data is composed of the pallet code (PLT) and the number (CRL) thereof, which is called a pallet length. The compression method is called a "run-length" method. When a single color mode is employed for each screen, image data may be fixed in length (bits); however, when plural color modes are used for one screen, the lengths of the image data are different depending on the color mode. Fig. 1 shows the formats of image data according to the conventional game computer system, which employs 16, 32, 64 and 128 color modes. The pallet codes are defined by data of 4, 5, 6, and 7 bits for the 16, 32, 64 and 128 color modes, respectively. The length "L" of the pallet code in a color mode "m" is given by the following equation. L = log 2 m For example, the length "L" of the pallet code in the 128 color mode becomes "7" as follows: L = log 2 128 = log 2 2 7 = 7 The data needs to have a width corresponding to a bus line to be transmitted thereon, because the widths of buses vary depending on the system. When the image data are transmitted on a 8 bit bus, the data for the 16 color mode may be transmitted in entirely, as shown in Fig. 1; however, when the length of the image data to be transmitted is not a multiple of 8 bits, the data need to be divided, as shown in Fig. 2. For example, image data for the 32 color mode are compressed to 9 bits, the data are divided as 8 and 1 to be transmitted, and as a result, the left over one bit is transmitted with the following data. In the conventional game computer system, when the screen is divided into plural areas of different colors, the color mode of the greatest number is selected, because each picture is displayed using only one color mode. For example, when an animation picture with 16 colors and a natural picture with 16M colors are synthesized on the screen, the synthesized picture is displayed in the 16M color mode. Such a processing method is not effective for using the memory. Accordingly, it is an object of the present invention to provide an image processing system in which image data may be scrolled in a horizontal direction even if each color vector factor does not correspond to one dot in a screen. It is another object of the present invention to provide an image processing system in which image data may be transmitted effectively. It is still another object of the present invention to provide an image processing system in which image data may be displayed in plural different color modes on a screen effectively. GB-A-2210239 discloses a video memory access controller. GB-A-2137857 discloses an image processing system with memory and display. According to the present invention, there is provided an image processing system, in which image data are defined by color vectors in a predetermined color mode, each of the color vectors being composed of plural vector factors each specifying the brightness and color difference of a dot, the system comprising: a memory for storing image data to be displayed; means for displaying the image data supplied from the memory; and characterised by: transmitting means for transmitting the image data stored in the memory to the display means; and means for controlling the transmitting means so that the image data are transmitted with a proper timing dependent on the color mode; wherein the image data are transmitted with a normal timing when the vector factors correspond to dots of the image one for one, and are transmitted with another timing in an other case to scroll the image horizontally. In the drawings: Fig. 1 is a diagram showing the arrangements of color data according to a conventional game computer system. Fig. 2 is a diagram showing the operation for transmitting image data according to the conventional game computer system. Fig. 3 is a diagram showing the operation for transmitting image data according to the conventional game computer system. Fig. 4 is a diagram showing the operation for scanning a screen. Fig. 5 is a diagram showing a relation between a screen and color vectors thereon. Fig. 6 is a diagram showing a relation between real and virtual screens. Fig. 7 is a diagram showing the operation for scrolling the real screen on the virtual screen. Fig. 8 is a diagram showing a relation between dots on the real screen and a color pallet Fig. 9 is a block diagram showing a computer system according to the invention. Fig. 10 is a block diagram showing an image extension unit, shown in Fig. 9, according to the invention. Fig. 11 is a diagram showing an operation for transmitting image data. Figs. 12A to 12E are diagrams showing the configurations of transfer control, start address, transfer start, transfer block number and raster monitoring registers, respectively. Fig. 13 is a diagram showing a relation between vector factors and dots on the real screen according to the invention. Fig. 14 is a diagram showing a relation between dots on the real screen and a color pallet according to the invention. Fig. 15 is a block diagram showing the operation for transmitting image data according to the invention. Fig. 16 is a diagram showing a relation between compressed image data and displayed dot image on the screen according to the invention. Fig. 17 is a picture to be displayed by the image processing system according to the invention: Fig. 18 is a diagram showing the format for run-length image data. Fig. 19 is a diagram showing the screen divided into plural areas according to the invention. Fig. 20 is a diagram showing the configuration of image data to be transmitted according to the invention. Fig. 21 is a timing chart for transmission of image data when the real screen is not scrolled, according to the invention. Fig. 22 is a timing chart for transmission of image data when the real screen is scrolled one dot to left, according to the invention. Fig. 23 is a timing chart for transmission of image data when the real screen is scrolled one dot to right, according to the invention. Fig. 24 is a timing chart for transmission of image data to a video encoder unit when the real screen is not scrolled, according to the invention. Fig. 25 is a timing chart for transmission of image data to the video encoder unit when the real screen is scrolled one dot to left, according to the invention. Fig. 26 is a timing chart for transmission of image data to the video encoder unit when the real screen is scrolled one dot to right, according to the invention. Fig. 27 is a diagram showing the operation for transmission between the image extension unit and video encoder unit according to the invention. Fig. 28 is a table showing color vectors to be read and displayed in each scroll mode according to the invention. Fig. 29 is a diagram showing the arrangement for YYUV color data in a memory according to the invention. Fig. 4 shows a video screen used in a game computer system. In this screen, horizontal and vertical scrolls are performed in H and V blank periods, respectively. The H and V blank periods are called horizontal and vertical fly-back periods, respectively, because a scanning line returns back in these periods. Image data are processed in the fly-back periods, and the data are displayed on a video screen (CRT) in accordance with predetermined display timings. The image data are defined by color data for each dot, the color data being specified by a RGB or YUV system. The color data are specified for each raster, such as (C0, C1, C2, - - -, Cn-1) shown in Fig. 5; the data unit is called a color vector. The color vector is composed of color-vector factors C0, C1, C2, - - -, Cn-1. In this case, the color-vector factors correspond to dots of image data one for one. Image data to be displayed are read from a virtual screen, which is derived from a video RAM (VRAM), in a H-blank period for the previous image data, so that the image data are displayed in the next H-blank period. The virtual screen is formed to be larger than the real screen (CRT), so that a part of the virtual screen is displayed on the real screen. In the virtual screen, an area to be displayed is specified by coordinates BXR and BYR, as shown in Fig. 6. The coordinates BXR and BYR are specified in dot and raster by BGX and BGY registers, respectively. When the BGX register is set at "BXR-X", the real screen is scrolled "X" dots to the right, as shown in Fig. 7. When the image data are read from the virtual screen in the previous raster-transmission period, the BGX register becomes effective from the next raster. If color-vector factors do not correspond to dots in the real screen one for one, some problems occur. For a conventional game computer that mainly treats animation images, it is sufficient to use a small number of color such as 4, 16 or 256 colors to display image. In general, color data are specified for each dot by color information stored in a color pallet, as shown in Fig. 8. When the game computer also treats a natural picture, many colors more than those for the animation image are required. If the colors of the natural picture are specified by the color pallet system, the color pallet is required to have a very large capacity. On the other hand, if color data corresponding to each dot are used to display a natural picture, a large capacity of memory is required as well. Fig. 9 shows a computer system, which includes a game-software recording medium 100 such as a CD-ROM, a CPU 102 of the 32-bit type, a control unit 104 for mainly controlling transmission of image and sound data and interfacing most devices to each other, an image data extension unit 106, an image data output unit, a sound data output unit 110, a video encoder unit 112, a VDP unit 114 and a TV display 116. Control unit 104, image data extension unit 106, video encoder unit 112 and VDP unit 114 are mounted on a common IC chip. CPU 102, control unit 104, image data extension unit 106 and VDP unit 114 are provided with their own memories M-RAM, K-RAM, R-RAM and V-RAM, respectively. Image data registered in the CD-ROM are read by the control unit, so that the image data are buffered in the K-RAM, and the image data are compressed to be transmitted to the image data extension unit. The compressed data are decoded by the image data extension unit, and are supplied to the video encoder unit. The video encoder unit processes image data supplied from the controller chip and the other devices to display the image data on the TV monitor. Fig. 10 shows image data extension unit 106. The function of the image data extension unit is now explained. In this figure, a data bus buffer 200 stores image data supplied from the control unit and the like. The image data are divided into plural blocks to be transmitted. External memory "R-RAM A" and "R-RAM B" 202 and 204 store decoded data. Each of the memories has a capacity for 16 rasters (64K bits). These memories are used alternatively to increase the process speed of image data. The image data extension unit treats IDCT and run-length images. The IDCT image represents a moving-natural-picture which is produced by IDCT decoding. The run-length image represents a moving-animation-picture which is compressed in accordance with run-length data. In each of the IDCT and run-length image, compressed image occupies "256 dots × 240 rasters" for each field. For the IDCT image, 1677 display colors are used. The run-length image are displayed in four run-length color modes of the pallet system, 16, 32, 64 and 128 color modes. The image data extension unit also includes data bus terminals KR0 to KR7 for receiving data transmitted from the control unit, and data request terminal -REQR for supplying a data request signal to the control unit. In response to the request signal, compressed image data are supplied from the control unit. That is, "-REQR = 0" and "-REQR = 1" represent data request and data stop, respectively. The image data extension unit needs to decode the compressed image data of 16 rasters within a 16 raster period. For that reason, 16 raster data begin to be transmitted to the image data extension unit in a 16 raster period prior to its display time so that its transmission processing is finished before the previous image is finished being displayed. The image data extension unit has no information on where the screen is scanned to, and therefore, image data are transmitted in accordance with a signal from the control unit. Image data stored in the image data extension unit are displayed in synchronization with a HSYNC signal supplied from a time 16 rasters after the image data are supplied from the control unit. Fig. 11 shows the operation of a display timing of image data on a video screen. With this, when a third data of 16 rasters are displayed on the video screen (real screen), a fourth data of 16 rasters are transmitted from the control unit to the image data extension unit, and the transmission is finished before the third data are finished to be displayed on the video screen completely. The process is repeated so that image data for one screen are displayed on the video screen; this is called "normal reproduction". The image data extension unit has an FIFO (First In - First Out) memory for storing image data supplied from the control unit. The FIFO supplies a disable signal (-REQR = 1) to the control unit to stop transmitting data temporarily when the FIFO is filled up with data. Figs. 12A to 12E show the configurations of registers built in the control unit. These registers are a transfer control register shown in Fig. 12A, a start address register shown in Fig. 12B for the image data extension unit, and a block number register shown in Fig. 12D. The transfer control register stores data for specifying enabling and disabling of data transmission. When a disable signal is supplied from the transfer control register to the image data extension unit while some data are transmitted from the image data extension unit, the data transmission is stopped. The start address register stores data for specifying an initial address of the K-RAM, which stores data for the image data extension unit. It begins with the initial address to transmit data stored in the K-RAM through the control unit. When block data are treated, an access address of the data is increased automatically. The transfer start register stores data for instructing the start of transmitting data for each raster. When the instruction signal is supplied to the control unit, image data are transmitted from the control unit to the image data extension unit. The transfer block number register stores data for specifying the number of blocks to be transmitted to the image data extension unit, each block being composed of 16 rasters. If the contents of any registers are not changed, the same image is again displayed on the same frame. Basically, the registers become effective instantly after their setting; however, when the register is set while a data block is transmitted to the image data extension unit, the register becomes effective after the transmission. The control unit transmits image data to the image data extension unit, only when the K-BUS has been arbitrated, the image data extension unit has been ready to be accessed and the request signal (-REQR = 0) has been supplied from the image data extension unit. On the other hand, data transmission by the control unit to the image data extension unit is disabled when at least one of the following conditions is met: (1) The image data extension unit has not processed any data yet. (2) The image data extension unit has the FIFO in the full state. (3) While HSYNC are counted by 16 times since the first data of 16 lines are received by the image data extension unit, the data have been read entirely. Therefore, when a first bit of data to be transmitted is disabled, no data is transmitted. This computer system employs 16, 32, 64, 128 and 16M color modes, and a YUV system for displaying colors. According to the YUV system, colors are defined by a brightness (Y) and color differences (U, V). In the 16, 32, 64 and 128 color modes, the color pallet is used to specify the color; however, in the 16M color mode, color data corresponding to the color to be displayed are specified directly in order to use the memory effectively. If 4 bit color data are used to specify 16 colors, the colors are fixed. According to the color pallet, color data for 512 colors may be selected from 65536 colors so that desired 16 colors may be selected flexibly. For each screen, the color pallet is specified using 4 bit data, and an offset value of the color pallet is specified. In general, 24 bit data are necessary for each dot to display image, and therefore, 2 24 bit data are necessary in the 16M color mode, as shown by the following equation. 16M = 16 × 1K × 1K = 2 4 × 10 10 × 10 10 = 2 24 In the YUV system, each of Y, U and V is defined by 8 bit data. Because, the virtual screen formed in the K-RAM has an area of 1024 × 1024 dots, 24M bits memory is necessary in the 16M color mode. Because the 16M color mode is generally employed only for natural pictures taken by a video camera, an image scanner and the like, the virtual screen is not necessarily required. That is, it is sufficient to use the memory capacity of 1.5M bits in the 16M color mode, the memory capacity corresponding to the real screen, which is about one sixteenth that for the virtual screen. In the 16M color mode, in order that 16 bit color data are used for each dot on the average, the color vectors are indicated as follows: (Y0 Y1 U0 V0, Y2 Y3 U1 V1, - - - -, Yn-2 Yn-1 Um Vm), where m = (n - 1) / 2. The color vector in the 16M color mode is shown in Fig. 13. In this case, the next two dots have the same UV values, that is, only the brightness values Ys are different from each other. Because the next two dots in natural pictures are not very different from each other in color, the above mentioned color vector may be used. The two dots are indicated by color data of 32 bits, and as a result, each screen may be displayed by using 1M bit data. In the 16M color mode, each color-vector factor manages 2 dots. When the screen is scrolled by odd dots horizontally, timing for reading color data becomes important, because dot data not to be displayed are transmitted from the memory. In the computer system, as shown in Fig. 14, the color pallet stores pallet codes corresponding to the color data. The video screen is composed of 61440 (256 × 240) dots. In the 16 color mode, each color data are defined by 4 bits, and therefore, 30K bytes data (61440 × 4 = 245760 bits = 30720 bytes) are necessary to display one picture. If such a large amount of data are processed directly, it takes very long time to transmit them. For that reason, image data are compressed (encoded) to be transmitted, and then the compressed data are extended (decoded) to be displayed, as shown in Fig. 15. Each image data are composed of a pallet code (PLT) and the number (CRL) of the code, as shown in Fig. 16. The number (CRL) is called a pallet length or run-length, and the compression method is called a run-length method. In the computer system, compressed data supplied from the control unit are extended by the image data extension unit to be reproduced, and then the data are stored in the RRAM. After that, the data are read from the RRAM for each color vector in accordance with a DCK cycle, and then the data are transmitted to the video encoder unit. According to the invention, timings for reading and transmitting data are controlled well to realize a horizontal scroll. When color-vector factors are read from the RRAM with "read-timing", the color-vector factors are separated into brightness "Y" and color differences "U" and "V", and therefore, the image data are displayed on the screen without scroll. The read-timing is shifted in order to realize a horizontal scroll. The amount of the shift varies depending on whether the picture is scrolled by odd or even dots. When the image data is scrolled by even dots, the color-vector factors are read at a timing for horizontal scroll, and the color-vector factors are transmitted at the same timing. All image data to be displayed do not always correspond to color vectors to be read. For example, image is scrolled by two dots to the left (horizontal scroll +2), and a color vector (Y2 Y3 U1 V1, - - - - - Yn-2 Yn-1 Um Vm, Z) is read, where m = (n-1) / 2. Which data is read first is specified by a SCX register, which stores a value corresponding to BXR (count value) shown in Fig. 6. Image data out of the real screen varies to be displayed depending on the scroll mode. In an endless scroll mode ("Chazutsu mode"), the outside data are displayed to be "Y0 Y1 U0 V0", and in a non-endless scroll mode ("non-Chazutsu mode), the outside data are displayed as transparent. In the endless scroll mode, color-vector factors scrolled out from one end of the real screen are again displayed from the other end. When a picture is scrolled by odd dots at a timing shifted by one dot from a timing that is used for a non-scroll mode, the first color-vector factor is not read in the display period (HDISP). For example, when a picture is scrolled by 3 dots to the left (horizontal scroll +3), the vector (Y2 Y3 U1 V1, Y4 Y5 U2 V2, - - - -, Yn-2 Yn-1 Um Vm, Z) is transmitted, where m = (n-1) / 2. This vector is the same as that in the case of the two dot scroll; however, the reading timing is shifted so that "Y2 U1 V1" factors are not read in the display period, and as a result, the picture is scrolled by three dots. Fig. 17 shows an example picture, which is displayed by the colors as shown in the figure, where the colors in parenthesis indicate colors for a monochrome mode. On a line "a-a", the color of the picture varies in the order of blue (65), red (20), white (15), red (40), grey (20), green (20) and grey (60), where the figures in the parenthesis indicate the numbers of dot corresponding to run-length for compressed data. In the monochrome mode, the color of the picture varies in the order of white (65), black (20), white (15) and black (140). The more the number of the color is increased, the more the run-length is shortened. Compressed data can be formed to meet the following three conditions, as shown in Fig. 18: (1) Compressed data are formed to have a length which is integral multiple of the width of the data bus (fixed length). (2) Run-length is shortened in accordance with increment of a pallet code (PLT). (3) If a run-length (CRL) is so large that the data can not be contained in the fixed length, the run-length is not transmitted with its data code and is contained in the following record itsself. This processing is called an "expansion mode". With this, the screen is divided into a plurality of horizontal blankings (nH) each composed of n-rasters, as shown in Fig. 19, so that a picture is displayed on the screen in plural color modes for each "nH" (n rasters). The above mentioned processing is realized in accordance with the following steps, so that a color mode to be used and a color code are determined for each "nH" and dot, respectively: (1) Detecting all color modes used in a picture to be displayed. (2) Detecting a color mode of the largest number, and using the color mode for the block. (3) Rewriting color data in the horizontal blankings in accordance with the color mode. Such data are transmitted to another device as shown in Fig. 20, that is, the data has a marker code at the top and color data following the code. This system uses VSYNC (V-blank) and HSYNC (H-blank) interrupt signals and a DCK signal to control display of image. When the HSYNC signal is supplied from the video encoder unit to the other devices, an interrupt operation is carried out, and compressed image data are transmitted for 16 rasters from the control unit to the image data extension unit. The image data extension unit reproduces the image data to be stored in the RRAM. In response to the DCK signal, an interrupt operation is carried out for each dot. Next, the operation of horizontal non-scroll (0) and one dot scrolls to the left (+1) and right (-1) is now explained in conjunction with Figs. 21 to 26. Figs. 21 to 23 and 24 to 26 show timings for reading and transmitting data, respectively. How many dots by which the screen is scrolled depends on the first colo-vector factor to be read, and whether odd or even scroll is performed depends on the timing for transmitting the image data. In Figs. 24 to 26, "RT0 to RT7" and "RTCODE 1 to RTCODE 0" represent the types of data bus and types of image data on the data bus, respectively. In response to a read-timing signal, first data (Y0 Y1 U0 V0) are read to be separated from each other, as shown in Fig. 21, and the separated data are transmitted to the video encoder unit so that non-horizontal scroll is performed. When the first dot is displayed, the next data (Y2 Y3 U1 V1) are buffered, and the processing is repeated to display the image entirely. The first data (Y0 Y1 U0 V0) are read from a time two clocks prior to the read-timing, as shown in Fig. 22. At this time, data (Y0 U0 V0) are buffered; however, the data are not displayed by an INVALID signal because the data are not in a display period. Therefore, the image data are displayed from data (Y0 U0 V0), that is, the image is shifted one dot to the left. In this case, when the last dot becomes invalid, the data (Y0 U0 V0) and invalid signal are transmitted to the video encoder unit in the endless and non-endless scroll modes, respectively. As a result, the last dot is displayed as being transparent in the non-endless scroll mode. The first data (Y0 Y1 U0 V0) are read at a time two clocks after the read-timing, as shown in Fig. 23, so that the first dot is not displayed and the data (Y0 U0 V0) are displayed from the second dot timing. As a result, the screen is scrolled by one dot to the right in the non-endless scroll mode. In the endless scroll mode, when the last color-vector factor (Yn-2 Yn-1 Um Vm) is read with the same timing as the case of the one-dot-left scroll, shown in Fig. 22, data (Yn-1 Um Vm) are displayed at the first dot on the screen. When the YYUV type of data are transmitted to the video encoder unit, the data are decoded into YUV data by the unit. When the YUV data are not in the display period, the data are not displayed so that the horizontal scroll is performed. Fig. 27 shows a relation between the image data extension unit and video encoder unit. Fig. 28 shows color vectors to be read and displayed in each scroll mode. In this table, "m," INVALID," DELAY TIMING," +" and "-" represent (n-1)/2, no-display (transparent), delay time of the first vector factor from the read-timing, reading earlier and later, respectively. Fig. 29 shows the arrangement for YYUV color data in the memory. As described before, according to the invention, timings for reading and transmitting data are controlled to perform a horizontal scroll. As a result, even if color-vector factors do not correspond to dots in the screen one for one, a horizontal scroll may be realized smoothly.

Claims: An image processing system, in which image data are defined by color vectors in a predetermined color mode, each of the color vectors being composed of plural vector factors each specifying the brightness and color difference of a dot, the system comprising: a memory (100) for storing image data to be displayed; means (116) for displaying the image data supplied from the memory; and characterised by: transmitting means (106) for transmitting the image data stored in the memory to the display means; and means (106) for controlling the transmitting means so that the image data are transmitted with a proper timing dependent on the color mode; wherein the image data are transmitted with a normal timing when the vector factors correspond to dots of the image one for one, and are transmitted with another timing in an other case to scroll the image horizontally.

Inventors: TATEYAMA SEIJI, TATEYAMA, SEIJI, Tateyama, Seiji, c/o Hudson Soft Co. Ltd.
Applicants: HUDSON SOFT CO LTD, HUDSON SOFT CO., LTD.
Application year: 1993
Main classification: G06F17
IPC codes: G09G5, G06T13, G06F19