WO2014087541A1 - 図形描画装置 - Google Patents

図形描画装置 Download PDF

Info

Publication number
WO2014087541A1
WO2014087541A1 PCT/JP2012/081810 JP2012081810W WO2014087541A1 WO 2014087541 A1 WO2014087541 A1 WO 2014087541A1 JP 2012081810 W JP2012081810 W JP 2012081810W WO 2014087541 A1 WO2014087541 A1 WO 2014087541A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame buffer
pixel
buffer
value
pixels
Prior art date
Application number
PCT/JP2012/081810
Other languages
English (en)
French (fr)
Inventor
鳥居 晃
加藤 義幸
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2012/081810 priority Critical patent/WO2014087541A1/ja
Publication of WO2014087541A1 publication Critical patent/WO2014087541A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • G09G5/39Control of the bit-mapped memory
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/02Handling of images in compressed format, e.g. JPEG, MPEG
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image
    • G09G2340/0407Resolution change, inclusive of the use of different resolutions for different screen areas

Definitions

  • the present invention relates to a graphic drawing apparatus that speeds up a drawing process without degrading image quality.
  • a graphics drawing device that draws and displays graphics reserves a frame buffer area in memory, creates pixels by drawing the pixels that make up the graphics in this frame buffer, and displays the image in this frame buffer.
  • a method of displaying a screen by transferring to a device is common.
  • the present invention has been made to solve the above-described problems, and an object of the present invention is to provide a graphic drawing apparatus that executes drawing processing at high speed without reducing image quality in the process of drawing and displaying a graphic. To do.
  • a graphic drawing apparatus includes a pixel generation unit that generates pixels included in a graphic from input graphic data, a pixel drawing unit that draws pixels generated by the pixel generation unit, and a drawing result of the pixel drawing unit Frame buffer that holds the image of the image, a low-resolution frame buffer that holds the image of the rendering result of the pixel drawing unit in which a plurality of pixels of the frame buffer correspond to one pixel, and a valid flag that indicates valid data of the low-resolution frame buffer
  • the pixel generation unit provides a low resolution frame when all pixels corresponding to the low resolution frame buffer have the same drawing color to the pixel drawing unit.
  • the graphic drawing apparatus When all the pixels corresponding to the low resolution frame buffer have the same drawing color, the graphic drawing apparatus according to the present invention draws to the low resolution frame buffer and turns on the value of the corresponding effective flag buffer to turn on the low resolution frame. If all the pixels corresponding to the buffer do not have the same drawing color, the frame buffer is instructed to turn off the value of the corresponding valid flag buffer, and when the screen is displayed, the value of the valid flag buffer is The low-resolution frame buffer value is read if it is on, and the frame buffer value is read if it is off, and these read data are used as display data, so drawing processing can be executed at high speed without degrading image quality. Can do.
  • FIG. 1 It is a block diagram which shows the figure drawing apparatus by Embodiment 1 of this invention. It is explanatory drawing which shows the structure of the frame buffer in the graphic drawing apparatus of Embodiment 1 of this invention, a low-resolution frame buffer, and an effective flag buffer. It is explanatory drawing which shows an example of the graphic data in the graphic drawing apparatus of Embodiment 1 of this invention, and a display result. It is explanatory drawing which shows the state of each buffer when the drawing process in the figure drawing apparatus of Embodiment 1 of this invention is completed. It is explanatory drawing which shows the other example of a drawing / display in the figure drawing apparatus of Embodiment 1 of this invention.
  • FIG. 1 is a configuration diagram showing a figure drawing apparatus according to the present embodiment. 1 includes a pixel generation unit 11, a pixel drawing unit 12, a display control unit 13, a frame buffer 14, a low resolution frame buffer 15, and an effective flag buffer 16.
  • the pixel generation unit 11 is a functional unit that generates pixels included in a graphic from input graphic data based on an instruction from the CPU 20.
  • the pixel drawing unit 12 draws the pixel generated by the pixel generation unit 11 by performing an operation such as alpha blending, and is configured to perform the following processing when drawing the graphic.
  • the value of the valid flag buffer 16 corresponding to the drawing to the low resolution frame buffer 15 is drawn. Is turned on, and if not all the pixels corresponding to the low resolution frame buffer 15 have the same drawing color, the drawing is performed on the frame buffer 14 and the value of the corresponding valid flag buffer 16 is turned off.
  • the display control unit 13 generates display data using the values of the frame buffer 14 to the valid flag buffer 16 and outputs the display data to the display device 30.
  • the frame buffer 14 is a buffer that holds an image of one screen drawn by the pixel drawing unit 12, and the low resolution frame buffer 15 is a low resolution frame in which a plurality of pixels of the frame buffer 14 correspond to one pixel. It is a buffer.
  • the valid flag buffer 16 is a buffer for indicating valid data of the low-resolution frame buffer 15, and has the same resolution as the low-resolution frame buffer 15 and has a 1-bit value.
  • FIG. 2 is an explanatory diagram showing the configuration of these buffers.
  • the frame buffer 14 has a resolution of 32 ⁇ 32 pixels as an example.
  • the low resolution frame buffer 15 is assumed to have 8 ⁇ 32 pixels as an example, that is, the resolution of the frame buffer 14 is set to 1/4 in the horizontal direction.
  • the valid flag buffer 16 holds a 1-bit value at the same resolution as the low-resolution frame buffer 15.
  • the low-resolution frame buffer 15 and the valid flag buffer 16 are obtained by reducing the frame buffer 14 to a low resolution of 1 ⁇ 4 in the horizontal direction, four pixels (for example, indicated by 2a) in the horizontal direction on the frame buffer 14 are It corresponds to one pixel (for example, indicated by 2b) on the low resolution frame buffer 15 and one bit (for example, indicated by 2c) on the valid flag buffer 16.
  • the frame buffer 14 and the low resolution frame buffer 15 are initialized to the background color, and that all the valid flag buffer 16 is initialized to “1”.
  • FIG. 3A a case where the figure shown in FIG. 3A is drawn and the display result shown in FIG. 3B is obtained will be described as an example.
  • a figure with a single color and 100% opacity is drawn.
  • the CPU 20 inputs graphic data defining the graphic shown in FIG. 3A to the graphic drawing apparatus 10 and instructs drawing. Then, the graphic drawing apparatus 10 starts drawing processing in accordance with an instruction from the CPU 20. Next, processing of the graphic drawing apparatus 10 will be described with reference to FIG.
  • the graphic drawing apparatus 10 starts drawing processing
  • the pixel generation unit 11 first generates pixels included in the graphic, and outputs pixel data to the pixel drawing unit 12. Since the method of generating pixels from graphic data is already known, detailed description is omitted here. For example, the intersection with the graphic outline is obtained for each scan line, sorted, and included in the graphic. There is a method in which the XY coordinates of the pixels to be generated are sequentially generated.
  • the pixel generation unit 11 aligns the boundaries of every four pixels on the frame buffer 14 and all four pixels in the horizontal direction are valid (need to be drawn) and have the same drawing color. If the above condition is satisfied, drawing to the low resolution frame buffer 15 is instructed, and only one pixel data (XY coordinate and drawing color) is output to the pixel drawing unit 12. In the example of FIG. 3, a single color is filled and the drawing colors are all the same, so the above condition is satisfied when all four pixels are valid. If there are invalid (no need to draw) pixels among the four generated pixels or the drawing colors of the four pixels are different, the drawing to the frame buffer 14 is instructed and the data of valid pixels among the four pixels Are output to the pixel drawing unit 12 pixel by pixel. In the example of FIG. 3, since the single color is filled and the drawing colors are all the same, if there are invalid pixels among the four pixels, they are output to the pixel drawing unit 12 pixel by pixel.
  • the pixel rendering unit 12 When the pixel rendering unit 12 receives the pixel data from the pixel generation unit 11, the pixel rendering unit 12 performs rendering in either the frame buffer 14 or the low resolution frame buffer 15 and updates the valid flag buffer 16.
  • the pixel When drawing to the low resolution frame buffer 15 is instructed by the pixel generation unit 11, the pixel is drawn at a corresponding position in the low resolution frame buffer 15, and “1” is set to a corresponding bit in the valid flag buffer 16.
  • Write. (For example, 4a in each buffer)
  • the pixel generation unit 11 When the pixel generation unit 11 is instructed to draw the frame buffer 14, the pixel is drawn at a corresponding position in the frame buffer 14, and “0” is written in the corresponding bit in the valid flag buffer 16 (for example, 4b).
  • 3 and 4 is an example in which a figure with 100% transparency is drawn, the pixel drawing unit 12 does not perform alpha blending processing, and the pixel data input from the pixel generation unit 11 is directly used as a frame buffer. 14 or the low resolution frame buffer
  • FIG. 4 shows the contents of the frame buffer 14, the low-resolution frame buffer 15, and the valid flag buffer 16 when the graphic drawing process of FIG. 3A is completed.
  • the display control unit 13 reads out data from the frame buffer 14, the low resolution frame buffer 15, and the valid flag buffer 16 in accordance with the display timing of the display device 30 and outputs the data to the display device 30. Therefore, in order to prevent an image being drawn from being displayed on the screen, the frame buffer 14, the low resolution frame buffer 15, and the valid flag buffer 16 are each configured as a double buffer, and a buffer to be read from the CPU 20 is designated.
  • the display control unit 13 first reads the valid flag buffer 16. If the value of the read valid flag buffer 16 is “0”, the corresponding 4 pixels are read from the frame buffer 14 and output to the display device 30. If the value of the read valid flag buffer 16 is “1”, the corresponding one pixel is read from the low resolution frame buffer 15 and the same data for four pixels is output to the display device 30. The same processing is performed for all the pixels output to the display device 30 to obtain the display result shown in FIG.
  • FIG. 5A the drawing of the figure shown in FIG. 5A is performed after the drawing of the figure shown in FIG. 3 is completed, and the display result shown in FIG. 5B is obtained.
  • the CPU 20 inputs graphic data defining the graphic shown in FIG. 5A to the graphic drawing apparatus 10 and instructs drawing. Then, the graphic drawing apparatus 10 starts drawing processing in accordance with an instruction from the CPU 20.
  • the operation of the graphic drawing apparatus 10 will be described with reference to FIG.
  • the pixel generation unit 11 When the graphic drawing apparatus 10 starts the drawing process, first, the pixel generation unit 11 generates pixels included in the graphic and outputs pixel data to the pixel drawing unit 12. At this time, as in the example of FIG. 3, the pixel generation unit 11 makes all four pixels effective (requires drawing) for the four pixels in the horizontal direction in accordance with the boundary of every four pixels on the frame buffer 14. And if these conditions are satisfied, the drawing to the low-resolution frame buffer 15 is instructed and the pixel data (XY coordinates and drawing color) is given to the pixel drawing unit 12. ) Is output. In the example of FIG. 5, since the single color is filled and the drawing colors are all the same, the above condition is satisfied when all four pixels are valid.
  • the drawing to the frame buffer 14 is instructed and data of valid pixels among the four pixels is given.
  • the pixel drawing unit 12 pixel by pixel In the example of FIG. 5, a single color is filled, and the drawing colors are all the same. Therefore, when there are invalid pixels among the four pixels, the pixels are output to the pixel drawing unit 12 pixel by pixel.
  • the pixel rendering unit 12 When the pixel rendering unit 12 receives the pixel data from the pixel generation unit 11, the pixel rendering unit 12 performs rendering in either the frame buffer 14 or the low resolution frame buffer 15 and updates the valid flag buffer 16.
  • the valid flag buffer 16 is referred to select a pixel that has already been drawn.
  • the pixel drawing unit 12 first reads the value of the corresponding valid flag buffer 16.
  • the value of the valid flag buffer 16 is “1”
  • the pixel data is read from the corresponding low-resolution frame buffer 15.
  • Reading, alpha blending processing is performed to generate an intermediate color, and writing back to the low resolution frame buffer 15.
  • “1” is written in the corresponding bit of the valid flag buffer 16 (for example, indicated by 6a).
  • the read valid flag buffer when the value of the read valid flag buffer is “0”, the four pixels in the horizontal direction of the already drawn pixel data do not have the same drawing color, so the corresponding four pixels are read from the frame buffer 14 and alpha. A blend process is performed to generate an intermediate color, and a process of writing back to the frame buffer 14 is executed for four pixels. Further, “0” is written in the corresponding bit of the valid flag buffer 16 (for example, indicated by 6b).
  • the pixel drawing unit 12 first reads the value of the corresponding valid flag buffer 16. If the value of the valid flag buffer 16 is “0”, the corresponding pixel is read from the frame buffer 14, an alpha blend process is performed to generate an intermediate color, and the result is written back to the frame buffer 14. Further, “0” is written in the corresponding bit of the valid flag buffer 16 (for example, indicated by 6c). On the other hand, when the value of the read valid flag buffer is “1”, the pixel data is read from the corresponding low resolution frame buffer 15 because the pixel data that has already been drawn has the same drawing color in the four horizontal pixels.
  • an alpha blend process is performed to generate an intermediate color, and it is written back to the corresponding position in the frame buffer 14. Further, “0” is written to the corresponding bit of the valid flag buffer 16. Furthermore, when there is a pixel that is not drawn among the four pixels on the frame buffer 14 corresponding to the low resolution frame buffer 15, the read value of the low resolution frame buffer 15 is drawn in the frame buffer 14 for that pixel ( For example, 6d).
  • FIG. 6 shows the contents of the frame buffer 14, the low-resolution frame buffer 15, and the valid flag buffer 16 when the graphic drawing process of FIG. 5A is completed.
  • the processing in the display control unit 13 is the same as in the case of FIG. First, the valid flag buffer 16 is read. If the value of the read valid flag buffer 16 is “0”, the corresponding 4 pixels are read from the frame buffer 14 and output to the display device 30. If the value of the read valid flag buffer 16 is “1”, the corresponding one pixel is read from the low resolution frame buffer 15 and the same data for four pixels is output to the display device 30. By performing the same processing for all the pixels output to the display device 30, the display result shown in FIG. 5B is obtained.
  • the number of pixel drawing processes is reduced by drawing to the low resolution frame buffer 15. There is an effect that drawing of a figure can be executed at high speed. Further, when executing the alpha blending process, it is possible to draw a translucent figure by selecting pixel data that has already been drawn with reference to the valid flag buffer 16 and generating and drawing an intermediate color. be able to.
  • the pixel generation unit 11 obtains the ratio (occupation ratio) of the figure for each pixel, and a plurality of pixels corresponding to the low resolution frame buffer 15 have the same occupation when determining whether or not to draw in the low resolution frame buffer 15.
  • the pixel rendering unit 12 can perform the alpha blending process based on the occupancy rate, thereby applying the anti-aliasing process to make the jaggedness of the figure inconspicuous.
  • FIG. 7 shows an example of the frame buffer 14, the low resolution frame buffer 15, and the valid flag buffer 16 when the antialiasing process is performed at the time of drawing the graphic in FIG.
  • the operation when the display control unit 13 obtains a screen output as a display result based on the value of each buffer in this case is the same as the case of FIG. 4 and FIG. Omitted.
  • the resolution of the low resolution frame buffer 15 and the effective flag buffer 16 has been described as an example in which the resolution of the frame buffer 14 is set to 1/4 in the horizontal direction, but is not limited thereto. It can be configured with an arbitrary value such as 2 or 1/8. Further, not only the horizontal direction but also the vertical resolution such as 1/2 in the vertical direction and 1/2 in the horizontal direction may be configured with arbitrary values.
  • a plurality of low resolution frame buffers 15 having different resolutions such as a low resolution frame buffer 15A and effective flag buffer 16A having a resolution of 1/4, and a low resolution frame buffer 15B and effective flag buffer 16B having a resolution of 1/16. If there is a set of valid flag buffers 16 (these configurations are not shown), and all the 16 pixels corresponding to the low resolution frame buffer 15B have the same drawing color, the drawing is performed in the low resolution frame buffer 15B. Otherwise, if all the four pixels corresponding to the low resolution frame buffer 15A have the same drawing color, the drawing is performed in the low resolution frame buffer 15A. Otherwise, the drawing is performed in the normal frame buffer 14 in a hierarchical manner.
  • Low resolution frame buffer 15 and valid flag bar File 16 may be configured with. In this case, if the value of the valid flag buffer 16B is “1”, the display control unit 13 selects a pixel of the low resolution frame buffer 15B. If not, the value of the valid flag buffer 16A is “1”. If not, the pixel of the low resolution frame buffer 15A is selected, and if not, the pixel of the normal frame buffer 14 is selected and output.
  • the pixel generation unit that generates pixels included in the graphic from the input graphic data, and the pixel drawing that draws the pixels generated by the pixel generation unit
  • a frame buffer that holds a drawing result image of the pixel drawing unit, a low-resolution frame buffer that holds a drawing result image of the pixel drawing unit in which a plurality of pixels of the frame buffer correspond to one pixel, and a low resolution Equipped with a valid flag buffer indicating valid data of the frame buffer and a display control unit for performing screen display.
  • the pixel generation unit draws all pixels corresponding to the low resolution frame buffer to the same pixel drawing unit. If it becomes a color, it is drawn in the low resolution frame buffer and the corresponding effective flag buffer is drawn.
  • the display control unit instructs to draw to the frame buffer and turn off the corresponding valid flag buffer value. If the value of the valid flag buffer is on, the value of the low resolution frame buffer is read. If the value of the valid flag buffer is off, the value of the frame buffer is read, and the read data is output as display data.
  • the drawing process can be executed at high speed.
  • the pixel drawing unit when drawing a semi-transparent graphic, sets the value of the low resolution frame buffer to OFF if the value of the valid flag buffer is ON. For example, since the value of the frame buffer is read and the alpha blending process is performed, even when a semi-transparent figure is drawn, it can be executed at high speed without degrading the image quality.
  • any component of the embodiment can be modified or any component of the embodiment can be omitted within the scope of the invention.
  • the graphic drawing apparatus performs graphic drawing and display using the frame buffer, the low resolution frame buffer, and the valid flag buffer, and is suitable for an image processing apparatus realized by a computer. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

 低解像度フレームバッファ15に対応する全てのピクセルが同じ描画色となる場合には低解像度フレームバッファ15へ描画して対応する有効フラグバッファ16の値をオンとする。低解像度フレームバッファ15に対応する全てのピクセルが同じ描画色とならない場合にはフレームバッファ14へ描画して対応する有効フラグバッファ16の値をオフとする。表示制御部13は、有効フラグバッファ16の値がオンであれば低解像度フレームバッファ15の値、オフであればフレームバッファ14の値を読み出し、これら読み出したデータを表示データとして表示装置30に出力する。

Description

図形描画装置
 この発明は、画質を低下させずに描画処理の高速化を行う図形描画装置に関するものである。
 図形の描画および表示を行う図形描画装置においては、メモリ上にフレームバッファ領域を確保し、このフレームバッファに対して図形を構成するピクセルを描画してイメージを作成し、このフレームバッファのイメージを表示装置へ転送することにより画面表示を行う方法が一般的である。
 このような図形描画装置において、従来、描画処理を高速に行うために、画面の一部の領域を低解像度で描画することで処理するピクセルの数を減らし、画面の一部の画質を低下させる代わりに見かけ上の描画能力を向上させるようにしたものがあった(例えば、特許文献1参照)。
特開2000-149052号公報
 しかしながら、上記特許文献1に記載されたような従来装置では、描画処理の高速化は、画面の一部領域を低解像度で描画するため、該当領域の画質が劣化することとなる。このため、画面全体において画質の低下が許されない場合には適用できないという問題があった。
 この発明は上記のような問題点を解決するためになされたもので、図形の描画および表示の過程において、画質を低下させずに描画処理を高速に実行する図形描画装置を得ることを目的とする。
 この発明に係る図形描画装置は、入力された図形データから図形に含まれるピクセルを生成するピクセル生成部と、ピクセル生成部で生成されたピクセルを描画するピクセル描画部と、ピクセル描画部の描画結果のイメージを保持するフレームバッファと、フレームバッファの複数ピクセル分が一つのピクセルに対応したピクセル描画部の描画結果のイメージを保持する低解像度フレームバッファと、低解像度フレームバッファの有効データを示す有効フラグバッファと、画面表示を行うための表示制御部とを備え、ピクセル生成部は、ピクセル描画部に対して、低解像度フレームバッファに対応する全てのピクセルが同じ描画色となる場合には低解像度フレームバッファへ描画して対応する有効フラグバッファの値をオンとし、低解像度フレームバッファに対応する全てのピクセルが同じ描画色とならない場合にはフレームバッファへ描画して対応する有効フラグバッファの値をオフとするよう指示し、表示制御部は、有効フラグバッファの値がオンであれば低解像度フレームバッファの値、オフであればフレームバッファの値を読み出し、これら読み出したデータを表示データとして出力するようにしたものである。
 この発明に係る図形描画装置は、低解像度フレームバッファに対応する全てのピクセルが同じ描画色となる場合には低解像度フレームバッファへ描画して対応する有効フラグバッファの値をオンとし、低解像度フレームバッファに対応する全てのピクセルが同じ描画色とならない場合にはフレームバッファへ描画して対応する有効フラグバッファの値をオフとするよう指示し、画面表示を行う場合は、有効フラグバッファの値がオンであれば低解像度フレームバッファの値、オフであればフレームバッファの値を読み出し、これら読み出したデータを表示データとするようにしたので、画質を低下させずに描画処理を高速に実行することができる。
この発明の実施の形態1による図形描画装置を示す構成図である。 この発明の実施の形態1の図形描画装置におけるフレームバッファと低解像度フレームバッファと有効フラグバッファの構成を示す説明図である。 この発明の実施の形態1の図形描画装置における図形データと表示結果の一例を示す説明図である。 この発明の実施の形態1の図形描画装置における描画処理が完了した時点の各バッファの状態を示す説明図である。 この発明の実施の形態1の図形描画装置における他の描画・表示例を示す説明図である。 この発明の実施の形態1の図形描画装置における他の描画・表示例の各バッファの状態を示す説明図である。 この発明の実施の形態1の図形描画装置におけるアンチエイリアス処理に適用した場合の各バッファの状態と表示結果を示す説明図である。
 以下、この発明をより詳細に説明するために、この発明を実施するための形態について、添付の図面に従って説明する。
実施の形態1.
 図1は、本実施の形態による図形描画装置を示す構成図である。
 図1に示す図形描画装置10は、ピクセル生成部11、ピクセル描画部12、表示制御部13、フレームバッファ14、低解像度フレームバッファ15、有効フラグバッファ16を備えている。ピクセル生成部11は、CPU20からの指示に基づいて、入力された図形データから図形に含まれるピクセルを生成する機能部である。ピクセル描画部12は、ピクセル生成部11にて生成されたピクセルをアルファブレンド等の演算を施して描画するもので、この図形描画時に次のような処理を行うよう構成されている。すなわち、ピクセル生成部11からの指示に基づき、低解像度フレームバッファ15に対応する全てのピクセルが同じ描画色となる場合にはこの低解像度フレームバッファ15へ描画して対応する有効フラグバッファ16の値をオンとし、低解像度フレームバッファ15に対応する全てのピクセルが同じ描画色とならない場合にはフレームバッファ14へ描画して対応する有効フラグバッファ16の値をオフとする。表示制御部13は、フレームバッファ14~有効フラグバッファ16の値を用いて表示データを生成し、表示装置30に対して出力するものである。
 フレームバッファ14は、ピクセル描画部12で描画された一画面分のイメージを保持するバッファであり、低解像度フレームバッファ15は、フレームバッファ14の複数ピクセル分が一つのピクセルに対応した低解像度のフレームバッファである。また、有効フラグバッファ16は、低解像度フレームバッファ15の有効データを示すためのバッファであり、低解像度フレームバッファ15と同じ解像度を持ち、それぞれ1ビットの値を持つよう構成されている。
 図2は、これらバッファの構成を示す説明図である。
 図2において、フレームバッファ14は例として32×32ピクセルの解像度を持つものとする。また、低解像度フレームバッファ15は例として8×32ピクセルすなわちフレームバッファ14の解像度を横方向に1/4としたものとする。また、有効フラグバッファ16は、低解像度フレームバッファ15と同じ解像度で1ビットの値を保持するものである。
 低解像度フレームバッファ15と有効フラグバッファ16は、フレームバッファ14を横方向に1/4の低解像度にしたものであるため、フレームバッファ14上の横方向の4ピクセル(例えば2aで示す)が、低解像度フレームバッファ15上の1ピクセル(例えば2bで示す)および有効フラグバッファ16上の1ビット(例えば、2cで示す)に対応する。
 また、初期状態ではフレームバッファ14および低解像度フレームバッファ15は背景色に初期化されているものとし、有効フラグバッファ16は全ビットが“1”に初期化されているものとする。
 次に、実施の形態1の図形描画装置の動作について説明する。
 ここでは、図3(a)に示す図形の描画を行い、図3(b)に示す表示結果を得る場合を例として説明する。この例は、単色で不透明度が100%の図形を描画するものである。
 まず、CPU20は、図形描画装置10に対して図3(a)に示した図形を定義する図形データを入力し、描画を指示する。すると、図形描画装置10はCPU20からの指示に従い描画処理を開始する。
 次に、図4を参照して図形描画装置10の処理を説明する。図形描画装置10は描画処理を開始すると、まずピクセル生成部11が図形に含まれるピクセルを生成し、ピクセル描画部12へピクセルデータを出力する。図形データからピクセルを生成する方法については、既知であるため、ここでの詳細な説明は省略するが、例えばスキャンラインごとに図形の輪郭との交点を求め、ソートした上で図形の内部に含まれるピクセルのXY座標を順次生成するといった方法がある。
 この際に、ピクセル生成部11は、フレームバッファ14上の4ピクセルごとの境界に合わせて、横方向の4ピクセルについて、その4ピクセルが全て有効(描画する必要がある)でありかつ同じ描画色となるかを判定し、前記の条件が成立する場合には、低解像度フレームバッファ15への描画を指示してピクセル描画部12へピクセルデータ(XY座標および描画色)を1つだけ出力する。
 図3の例では単色の塗り潰しであり、描画色は全て同じとなるため、4ピクセル全てが有効な場合に前記の条件が成立する。
 生成した4ピクセルのうち無効(描画する必要がない)ピクセルが存在するかまたは4ピクセルの描画色が異なる場合には、フレームバッファ14への描画を指示して4ピクセルの内有効なピクセルのデータを1ピクセルずつピクセル描画部12へ出力する。図3の例では単色の塗り潰しであり、描画色は全て同じとなるため、4ピクセルのうち無効なピクセルが存在する場合には1ピクセルずつピクセル描画部12へ出力する。
 ピクセル描画部12は、ピクセル生成部11からピクセルデータを受け取るとフレームバッファ14または低解像度フレームバッファ15のいずれかへ描画を行い、有効フラグバッファ16を更新する。ピクセル生成部11から低解像度フレームバッファ15への描画を指示されている場合は、低解像度フレームバッファ15の対応する位置へそのピクセルを描画し、有効フラグバッファ16の対応するビットに“1”を書き込む。(例えば、それぞれのバッファ中、4aで示す)
 ピクセル生成部11からフレームバッファ14への描画を指示されている場合は、フレームバッファ14の対応する位置へそのピクセルを描画し、有効フラグバッファ16の対応するビットに“0”を書き込む(例えば、4bで示す)。
 なお、図3および図4の例では透明度100%の図形を描画する例であるため、ピクセル描画部12ではアルファブレンド処理は行わずに、ピクセル生成部11から入力されたピクセルデータをそのままフレームバッファ14または低解像度フレームバッファ15へ描画する。
 上記のピクセル生成部11およびピクセル描画部12における処理を、図形に含まれる全ピクセルについて実施し、完了した時点で図形描画処理10の描画処理が完了する。図4は、図3(a)の図形の描画処理が完了した時点でのフレームバッファ14、低解像度フレームバッファ15および有効フラグバッファ16の内容を示している。
 次に、図形描画装置10における表示装置30への画面出力の動作について説明する。
 表示制御部13は、表示装置30の表示タイミングに合わせてフレームバッファ14、低解像度フレームバッファ15および有効フラグバッファ16からデータを読み出し、表示装置30へ出力する。このため、描画途中のイメージが画面表示されないようにするために、フレームバッファ14、低解像度フレームバッファ15および有効フラグバッファ16はそれぞれダブルバッファ構成とし、CPU20から読み出すバッファが指定されるものとする。
 表示制御部13は、まず、有効フラグバッファ16を読み出す。読み出した有効フラグバッファ16の値が“0”であれば、フレームバッファ14から対応する4ピクセルを読み出し、表示装置30へ出力する。読み出した有効フラグバッファ16の値が“1”であれば、低解像度フレームバッファ15から対応する1ピクセルを読み出し、表示装置30へ同じデータを4ピクセル分出力する。表示装置30へ出力する全ピクセルについて同様の処理を行うことで図3(b)に示す表示結果を得る。
 次に、他の描画・表示例として、図3に示す図形の描画が完了した後で図5(a)に示す図形の描画を行い、図5(b)に示す表示結果を得る場合を例として説明する。この例は、単色で不透明度が50%の図形を描画するものである。
 CPU20は、図形描画装置10に対して図5(a)に示した図形を定義する図形データを入力し、描画を指示する。すると、図形描画装置10はCPU20からの指示に従い描画処理を開始する。以下、図6を参照して図形描画装置10の動作を説明する。
 図形描画装置10は描画処理を開始すると、まずピクセル生成部11が図形に含まれるピクセルを生成しピクセル描画部12へピクセルデータを出力する。この際に、ピクセル生成部11は、図3の例と同様に、フレームバッファ14上の4ピクセルごとの境界に合わせて、横方向の4ピクセルについて、その4ピクセルが全て有効(描画する必要がある)でありかつ同じ描画色となるかを判定し、これらの条件が成立する場合には、低解像度フレームバッファ15への描画を指示してピクセル描画部12へピクセルデータ(XY座標および描画色)を1つだけ出力する。図5の例では単色の塗り潰しであり、描画色は全て同じとなるため、4ピクセル全てが有効な場合に前記の条件が成立する。
 生成した4ピクセルのうち無効(描画する必要がない)ピクセルが存在するかまたは4ピクセルの描画色が異なる場合には、フレームバッファ14への描画を指示して4ピクセルの内有効なピクセルのデータを1ピクセルずつピクセル描画部12へ出力する。図5の例では単色の塗り潰しであり、描画色は全て同じとなるため、4ピクセルのうち無効なピクセルが存在する場合には1ピクセルずつピクセル描画部12へ出力する。
 ピクセル描画部12は、ピクセル生成部11からピクセルデータを受け取るとフレームバッファ14または低解像度フレームバッファ15のいずれかへ描画を行い、有効フラグバッファ16を更新する。
 図5の例では不透明度が100%ではないため、ピクセルを描画する際に、指定された不透明度の値に基づきアルファブレンド処理を行い、描画するピクセルと既に描画済みのピクセルとの間の中間色を生成して描画する必要がある。この際に、既に描画済みのピクセルを選択するために有効フラグバッファ16を参照する。以下にアルファブレンド処理を行う際のピクセル描画部12の動作を説明する。
 まず、ピクセル生成部11から低解像度フレームバッファ15への描画を指示されている場合について説明する。
 ピクセル描画部12は、まず対応する有効フラグバッファ16の値を読み出す。有効フラグバッファ16の値が“1”である場合には、書き込むピクセルデータおよび既に描画済みのピクセルデータ共に横方向4ピクセルが同じ描画色であるため、対応する低解像度フレームバッファ15からピクセルデータを読み出し、アルファブレンド処理を行って中間色を生成し、低解像度フレームバッファ15へ書き戻す。また、有効フラグバッファ16の対応するビットに“1”を書き込む(例えば、6aで示す)。
 一方、読み出した有効フラグバッファの値が“0”である場合には、既に描画済みのピクセルデータの横方向4ピクセルは同じ描画色ではないため、フレームバッファ14から対応する4ピクセルを読み出してアルファブレンド処理を行って中間色を生成し、フレームバッファ14へ書き戻す処理を4ピクセル分実行する。また、有効フラグバッファ16の対応するビットに“0”を書き込む(例えば6bで示す)。
 次に、ピクセル生成部11からフレームバッファ14への描画を指示されている場合について説明する。
 ピクセル描画部12は、まず対応する有効フラグバッファ16の値を読み出す。有効フラグバッファ16の値が“0”である場合には、フレームバッファ14から対応するピクセルを読み出し、アルファブレンド処理を行って中間色を生成し、フレームバッファ14へ書き戻す。また有効フラグバッファ16の対応するビットに“0”を書き込む(例えば6cで示す)。
 一方、読み出した有効フラグバッファの値が“1”である場合には、既に描画済みのピクセルデータ共に横方向4ピクセルが同じ描画色であるため、対応する低解像度フレームバッファ15からピクセルデータを読み出し、アルファブレンド処理を行って中間色を生成し、フレームバッファ14の対応する位置へ書き戻す。また、有効フラグバッファ16の対応するビットに“0”を書き込む。さらに、低解像度フレームバッファ15に対応するフレームバッファ14上の4ピクセルのうち、描画しないピクセルがある場合には、そのピクセルについては読み出した低解像度フレームバッファ15の値をフレームバッファ14へ描画する(例えば6dで示す)。
 上記のピクセル生成部11およびピクセル描画部12における処理を、図形に含まれる全ピクセルについて実施し、完了した時点で図形描画処理10の描画処理が完了する。図6は、図5(a)の図形の描画処理が完了した時点でのフレームバッファ14、低解像度フレームバッファ15および有効フラグバッファ16の内容を示している。
 表示制御部13における処理は、図4の場合と同様である。まず、有効フラグバッファ16を読み出す。読み出した有効フラグバッファ16の値が“0”であれば、フレームバッファ14から対応する4ピクセルを読み出し、表示装置30へ出力する。読み出した有効フラグバッファ16の値が“1”であれば、低解像度フレームバッファ15から対応する1ピクセルを読み出し、表示装置30へ同じデータを4ピクセル分出力する。表示装置30へ出力する全ピクセルについて同様の処理を行うことで、図5(b)に示す表示結果を得る。
 このように、実施の形態1では、低解像度フレームバッファ15に対応する複数のピクセルが全て同じ描画色となる場合には低解像度フレームバッファ15へ描画することでピクセルの描画処理回数を削減し、図形の描画を高速に実行することができるという効果がある。
 また、アルファブレンド処理を実行する場合には、有効フラグバッファ16を参照して既に描画済みのピクセルデータを選択し、中間色を生成して描画することで、半透明の図形の描画にも対応することができる。
 また、図形の単色塗り潰しの場合を例として説明したが、低解像度フレームバッファ15に対応する複数のピクセルが全て同じ描画色になるかを検出すれば良いため、例えばグラデーションのかかった図形を描画する場合などにも適用することができる。
 また、ピクセル生成部11においてピクセルごとに図形の占める割合(占有率)を求め、低解像度フレームバッファ15へ描画するか否かの判定に、低解像度フレームバッファ15に対応する複数のピクセルが同じ占有率であることを条件に加え、ピクセル描画部12において占有率に基づいてアルファブレンド処理を行うことにより、図形のギザギザを目立たなくするアンチエイリアス処理にも適用することができる。図3(a)の図形描画時にアンチエイリアス処理を行う場合のフレームバッファ14、低解像度フレームバッファ15および有効フラグバッファ16と、表示結果の例を図7に示す。なお、この場合のそれぞれのバッファの値に基づいて表示制御部13が表示結果となる画面出力を得る場合の動作は上述した図4や図6の場合と同様であるため、ここでの説明は省略する。
 また、低解像度フレームバッファ15および有効フラグバッファ16の解像度は、フレームバッファ14の解像度を横方向に1/4とした場合を例として説明したが、これに限定されるものではなく、例えば1/2や1/8など任意の値で構成することができる。また、横方向だけでなく、縦方向1/2かつ横方向1/2など縦方向の解像度を任意の値で構成しても良い。
 また、例えば解像度1/4の低解像度フレームバッファ15Aおよび有効フラグバッファ16Aと、解像度1/16の低解像度フレームバッファ15Bと有効フラグバッファ16Bのように、解像度の異なる複数の低解像度フレームバッファ15と有効フラグバッファ16の組を持ち(なお、これらの構成は図示省略している)、低解像度フレームバッファ15Bに対応する16ピクセルが全て同じ描画色であれば低解像度フレームバッファ15Bへ描画し、そうでない場合かつ低解像度フレームバッファ15Aに対応する4ピクセルが全て同じ描画色であれば低解像度フレームバッファ15Aへ描画し、そうでない場合には通常のフレームバッファ14へ描画するというように、階層的に低解像度フレームバッファ15および有効フラグバッファ16を持つ構成としても良い。
 この場合は、表示制御部13において、有効フラグバッファ16Bの値が“1”であれば低解像度フレームバッファ15Bのピクセルを選択し、そうでない場合かつ有効フラグバッファ16Aの値が“1”であれば低解像度フレームバッファ15Aのピクセルを選択し、そうでない場合には通常のフレームバッファ14のピクセルを選択して出力する。
 以上説明したように、実施の形態1の図形描画装置によれば、入力された図形データから図形に含まれるピクセルを生成するピクセル生成部と、ピクセル生成部で生成されたピクセルを描画するピクセル描画部と、ピクセル描画部の描画結果のイメージを保持するフレームバッファと、フレームバッファの複数ピクセル分が一つのピクセルに対応したピクセル描画部の描画結果のイメージを保持する低解像度フレームバッファと、低解像度フレームバッファの有効データを示す有効フラグバッファと、画面表示を行うための表示制御部とを備え、ピクセル生成部は、ピクセル描画部に対して、低解像度フレームバッファに対応する全てのピクセルが同じ描画色となる場合には低解像度フレームバッファへ描画して対応する有効フラグバッファの値をオンとし、低解像度フレームバッファに対応する全てのピクセルが同じ描画色とならない場合にはフレームバッファへ描画して対応する有効フラグバッファの値をオフとするよう指示し、表示制御部は、有効フラグバッファの値がオンであれば低解像度フレームバッファの値、オフであればフレームバッファの値を読み出し、これら読み出したデータを表示データとして出力するようにしたので、画質を低下させずに描画処理を高速に実行することができる。
 また、実施の形態1の図形描画装置によれば、ピクセル描画部は、半透明の図形を描画する際には、有効フラグバッファの値がオンであれば低解像度フレームバッファの値、オフであればフレームバッファの値を読み出してアルファブレンド処理を施すようにしたので、半透明の図形を描画する際も画質を低下させずに高速に実行することができる。
 なお、本願発明はその発明の範囲内において、実施の形態の任意の構成要素の変形、もしくは実施の形態の任意の構成要素の省略が可能である。
 以上のように、この発明に係る図形描画装置は、フレームバッファと低解像度フレームバッファと有効フラグバッファとを用いて図形描画と表示を行うものあり、コンピュータにより実現される画像処理装置に適している。
 10 図形描画装置、11 ピクセル生成部、12 ピクセル描画部、13 表示制御部、14 フレームバッファ、15 低解像度フレームバッファ、16 有効フラグバッファ、20 CPU、30 表示装置。

Claims (2)

  1.  入力された図形データから図形に含まれるピクセルを生成するピクセル生成部と、
     前記ピクセル生成部で生成されたピクセルを描画するピクセル描画部と、
     前記ピクセル描画部の描画結果のイメージを保持するフレームバッファと、
     前記フレームバッファの複数ピクセル分が一つのピクセルに対応した前記ピクセル描画部の描画結果のイメージを保持する低解像度フレームバッファと、
     前記低解像度フレームバッファの有効データを示す有効フラグバッファと、
     画面表示を行うための表示制御部とを備え、
     前記ピクセル生成部は、前記ピクセル描画部に対して、
     前記低解像度フレームバッファに対応する全てのピクセルが同じ描画色となる場合には当該低解像度フレームバッファへ描画して対応する前記有効フラグバッファの値をオンとし、前記低解像度フレームバッファに対応する全てのピクセルが同じ描画色とならない場合には前記フレームバッファへ描画して対応する前記有効フラグバッファの値をオフとするよう指示し、
     前記表示制御部は、前記有効フラグバッファの値がオンであれば前記低解像度フレームバッファの値、オフであれば前記フレームバッファの値を読み出し、これら読み出したデータを表示データとして出力することを特徴とする図形描画装置。
  2.  ピクセル描画部は、半透明の図形を描画する際には、有効フラグバッファの値がオンであれば低解像度フレームバッファの値、オフであればフレームバッファの値を読み出してアルファブレンド処理を施すことを特徴とする請求項1記載の図形描画装置。
PCT/JP2012/081810 2012-12-07 2012-12-07 図形描画装置 WO2014087541A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/081810 WO2014087541A1 (ja) 2012-12-07 2012-12-07 図形描画装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/081810 WO2014087541A1 (ja) 2012-12-07 2012-12-07 図形描画装置

Publications (1)

Publication Number Publication Date
WO2014087541A1 true WO2014087541A1 (ja) 2014-06-12

Family

ID=50882985

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/081810 WO2014087541A1 (ja) 2012-12-07 2012-12-07 図形描画装置

Country Status (1)

Country Link
WO (1) WO2014087541A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022201413A1 (ja) * 2021-03-25 2022-09-29 三菱電機株式会社 描画処理装置、描画処理システム、描画処理方法、および描画処理プログラム
WO2022201412A1 (ja) * 2021-03-25 2022-09-29 三菱電機株式会社 描画処理装置、描画処理システム、描画処理方法、および描画処理プログラム

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005346605A (ja) * 2004-06-07 2005-12-15 Matsushita Electric Ind Co Ltd アンチエイリアス描画方法およびこれを用いた描画装置

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005346605A (ja) * 2004-06-07 2005-12-15 Matsushita Electric Ind Co Ltd アンチエイリアス描画方法およびこれを用いた描画装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022201413A1 (ja) * 2021-03-25 2022-09-29 三菱電機株式会社 描画処理装置、描画処理システム、描画処理方法、および描画処理プログラム
WO2022201412A1 (ja) * 2021-03-25 2022-09-29 三菱電機株式会社 描画処理装置、描画処理システム、描画処理方法、および描画処理プログラム
JP7444276B2 (ja) 2021-03-25 2024-03-06 三菱電機株式会社 描画処理装置、描画処理システム、描画処理方法、および描画処理プログラム
JP7471512B2 (ja) 2021-03-25 2024-04-19 三菱電機株式会社 描画処理装置、描画処理システム、描画処理方法、および描画処理プログラム

Similar Documents

Publication Publication Date Title
JP2637920B2 (ja) コンピュータ・グラフィック・システム及びフレーム・バッファ使用方法
JP3548521B2 (ja) 半透明画像処理装置及び方法
US10748235B2 (en) Method and system for dim layer power optimization in display processing
JP4571437B2 (ja) 解像度が異なる複数のウィンドウを表示するためのシステム、方法およびプログラム
US7362339B2 (en) Image processing method and apparatus
US20130009965A1 (en) Animation display device
JP5823052B2 (ja) グラフィックス描画装置
US10789913B2 (en) Arbitrary block rendering and display frame reconstruction
WO2014087541A1 (ja) 図形描画装置
WO2010089805A1 (ja) グラフィカルユーザインタフェース装置及びグラフィカルユーザインタフェース実現方法
JP5159949B2 (ja) ベクトル図形描画装置
JP2006185195A (ja) グラフィカルユーザインタフェース装置および方法
JP2005346605A (ja) アンチエイリアス描画方法およびこれを用いた描画装置
JP5744197B2 (ja) ウィンドウ合成装置
JPH11272846A (ja) 図形表示装置
JP2018019212A (ja) 情報処理装置及び描画処理方法、コンピュータプログラム
JP2007183377A (ja) 表示制御装置
JP6036072B2 (ja) 画像処理装置
JP2006091280A (ja) 表示処理装置
JP5084132B2 (ja) 画像データ出力装置、及び、画像データ出力方法
JP2008107909A (ja) 描画装置及び描画方法
JP2005128689A (ja) 画像描画装置
JP2006227498A (ja) 画像処理装置
WO2009107168A1 (ja) 文字描画装置
JP2014035453A (ja) 画像処理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12889617

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12889617

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP