CN1965568A - Method and apparatus for vertically scaling pixel data - Google Patents
Method and apparatus for vertically scaling pixel data Download PDFInfo
- Publication number
- CN1965568A CN1965568A CNA2005800187271A CN200580018727A CN1965568A CN 1965568 A CN1965568 A CN 1965568A CN A2005800187271 A CNA2005800187271 A CN A2005800187271A CN 200580018727 A CN200580018727 A CN 200580018727A CN 1965568 A CN1965568 A CN 1965568A
- Authority
- CN
- China
- Prior art keywords
- pixels
- row
- color space
- component
- ycbcr
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/40—Picture signal circuits
- H04N1/40068—Modification of image resolution, i.e. determining the values of picture elements at new relative positions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4015—Image demosaicing, e.g. colour filter arrays [CFA] or Bayer patterns
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Color Image Communication Systems (AREA)
- Facsimile Image Signal Circuits (AREA)
- Liquid Crystal Display Device Control (AREA)
- Transforming Electric Information Into Light Information (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Description
相关申请案交叉参考Related Application Cross Reference
本申请案为同在申请中的第10/825,259号美国专利申请案的一部分接续式申请案,该美国专利申请案的代理档案号为NVDA/P000715,其由W.Young在2004年4月15日提出申请且名称为“用于优化图像处理操作的最低必须限度色空间转换器(MINIMALIST COLOR SPACE CONVERTERS FOR OPTIMIZING IMAGEPROCESSING OPERATIONS)”,并以引用方式并入本文中。This application is a continuation-in-part of co-pending U.S. Patent Application No. 10/825,259, Attorney Docket NVDA/P000715, filed April 15, 2004 by W. Young The application was filed on the 1st and is entitled "MINIMALIST COLOR SPACE CONVERTERS FOR OPTIMIZING IMAGE PROCESSING OPERATIONS" and is incorporated herein by reference.
技术领域technical field
本发明的实施例大体而言涉及一种用于垂直缩放像素数据的方法及设备。Embodiments of the invention generally relate to a method and apparatus for vertically scaling pixel data.
背景技术Background technique
垂直缩放器通常设计用于将输入行数改变成输出视频信号中的一不同的输出行数。垂直缩放器可按比例放大或按比例缩小。行通常是指一视频水平扫描行。垂直缩放过程可尤其因输入像素数据呈行格式而复杂化。垂直缩放通常需要在许多毗邻的像素数据行之间进行比较和计算。由于呈光栅化格式的输入像素数据的性质,必须存储先前及当前行直至下一行可用为止。这些行通常存储于一由一个或多个随机存取存储器(RAM)组成的行存储存储器中。每一RAM的尺寸取决于要存储的行数及每一行的长度。由于可能需要将对应于图像整个宽度的每一行存储于所述行存储存储器中来为垂直缩放作准备,因此所述行存储存储器的尺寸可变得相当大,从而使垂直缩放操作成为一代价高昂的过程。Vertical scalers are generally designed to change the number of input lines to a different number of output lines in the output video signal. The vertical scaler scales up or down proportionally. A line usually refers to a video horizontal scanning line. The vertical scaling process can be complicated especially because the input pixel data is in row format. Vertical scaling typically requires comparisons and calculations between many contiguous rows of pixel data. Due to the nature of input pixel data in rasterized format, previous and current rows must be stored until the next row is available. The rows are typically stored in a row store memory consisting of one or more random access memories (RAM). The size of each RAM depends on the number of rows to be stored and the length of each row. Since each line corresponding to the entire width of the image may need to be stored in the line store memory in preparation for vertical scaling, the size of the line store memory can become quite large, making vertical scaling an expensive operation. the process of.
因此,所属领域中需要一种用于垂直缩放像素数据的更具成本效益的方法及设备。Therefore, there is a need in the art for a more cost-effective method and apparatus for vertically scaling pixel data.
发明内容Contents of the invention
本发明各实施例的一目的是减少与垂直缩放像素数据相关的需要存储于一个行存储存储器中的像素数据量。It is an object of embodiments of the present invention to reduce the amount of pixel data that needs to be stored in a line store memory associated with vertically scaling pixel data.
本发明各实施例大体而言涉及一种图像处理设备,所述图像处理设备包括一红、绿及蓝(RGB)色空间-亮度色彩、蓝色差及红色差(YCbCr)色空间转换器模块,以将一行像素自所述RGB色空间转换至所述YCbCr色空间。所述一行像素具有一第一采样速率。所述图像处理设备进一步包括一耦接至所述RGB-YCbCr色空间转换器模块的色度抽取器模块。所述色度抽取器模块经配置以产生所述一行像素的一具有一低于所述第一采样速率的第二采样速率的中间表示形式。代表所述中间表示形式的数据量少于表示所述一行像素的数据量。所述图像处理设备进一步包括一耦接至所述色度抽取器模块的行存储存储器。所述行存储存储器经配置以存储所述中间表示形式。所述图像处理设备进一步包括一耦接至所述行存储存储器的垂直缩放器模块。所述垂直缩放器模块经配置以产生所述中间表示形式的一按比例缩放形式。Embodiments of the present invention generally relate to an image processing device comprising a red, green and blue (RGB) color space-luminance color, blue difference and red difference (YCbCr) color space converter module, to convert a row of pixels from the RGB color space to the YCbCr color space. The row of pixels has a first sampling rate. The image processing device further includes a chroma decimator module coupled to the RGB-YCbCr color space converter module. The chroma decimator module is configured to generate an intermediate representation of the row of pixels having a second sampling rate lower than the first sampling rate. The amount of data representing the intermediate representation is less than the amount of data representing the row of pixels. The image processing apparatus further includes a line storage memory coupled to the chrominance decimator module. The line store memory is configured to store the intermediate representation. The image processing apparatus further includes a vertical scaler module coupled to the line store memory. The vertical scaler module is configured to generate a scaled version of the intermediate representation.
在一实施例中,所述图像处理设备进一步包括一耦接至所述垂直缩放器模块的色度内插器模块。所述色度内插器模块经配置以将具有所述第二采样速率的所述中间表示形式的所述按比例缩放形式转换成所述一行像素的具有所述第一采样速率的一按比例缩放形式。In one embodiment, the image processing apparatus further includes a chroma interpolator module coupled to the vertical scaler module. The chroma interpolator module is configured to convert the scaled version of the intermediate representation at the second sampling rate into a scaled version of the row of pixels at the first sampling rate Scaled form.
在另一实施例中,所述图像处理设备进一步包括一耦接至所述色度内插器模块的YCbCr-RGB色空间转换器模块。所述YCbCr-RGB色空间转换器模块经配置以将所述一行像素的所述按比例缩放形式转换至RGB色空间。In another embodiment, the image processing device further includes a YCbCr-RGB color space converter module coupled to the chroma interpolator module. The YCbCr-RGB color space converter module is configured to convert the scaled version of the row of pixels to an RGB color space.
在再一实施例中,所述RGB-YCbCr色空间转换器模块通过下述方式来确定像素数据的一亮度色彩分量(Y):将所述像素数据的一红色(R)分量的四分之一加至所述像素数据的一绿色(G)分量的二分之一及所述像素数据的一蓝色(B)分量的四分之一。所述RGB-YCbCr色空间转换器模块进一步通过下述方式来确定所述像素数据的一绿色差分量(Cb):从蓝色(B)分量中减去所述像素数据的亮度色彩分量(Y)并将所得到的结果除以2。所述RGB-YCbCr色空间转换器模块进一步通过下述方式来确定所述像素数据的一红色差分量(Cr):从所述像素数据的红色(R)分量中减去所述像素数据的所述亮度色差(Y)并将所得到的结果除以2。In yet another embodiment, the RGB-YCbCr color space converter module determines a luminance color component (Y) of the pixel data in the following manner: a quarter of a red (R) component of the pixel data One is added to one half of a green (G) component of the pixel data and one quarter of a blue (B) component of the pixel data. The RGB-YCbCr color space converter module further determines a green difference component (Cb) of the pixel data by subtracting the luminance color component (Y ) and divide the resulting result by 2. The RGB-YCbCr color space converter module further determines a red difference component (Cr) of the pixel data by subtracting the red (Cr) component of the pixel data from the red (R) component of the pixel data The above-mentioned chromatic difference (Y) and divide the obtained result by 2.
在再一实施例中,所述YCbCr-RGB色空间转换器模块通过下述方式来确定所述像素数据的红色(R)分量:将所述亮度色彩分量(Y)加至所述像素数据的红色差分量(Cr)的两倍。所述YCbCr-RGB色空间转换器模块进一步通过下述方式来确定所述像素的绿色(G)分量:从所述像素数据的亮度色彩分量(Y)中减去所述像素数据的红色差分量(Cr)及蓝色差分量(Cb)。所述YCbCr-RGB色空间转换器模块进一步通过下述方式来确定所述像素数据的所述蓝色(B)分量:将所述像素数据的亮度色彩分量(Y)加至所述像素数据的所述蓝色差分量(Cb)的两倍。In yet another embodiment, the YCbCr-RGB color space converter module determines the red (R) component of the pixel data by adding the luminance color component (Y) to the pixel data Twice the amount of red difference (Cr). The YCbCr-RGB color space converter module further determines the green (G) component of the pixel by subtracting the red difference component of the pixel data from the brightness color component (Y) of the pixel data (Cr) and blue difference (Cb). The YCbCr-RGB color space converter module further determines the blue (B) component of the pixel data by adding the brightness color component (Y) of the pixel data to the Twice the amount of blue difference (Cb).
附图说明Description of drawings
为更详细地了解本发明的上述特征,可参照各实施例一某些实施例显示于附图中一来阅读对上文所概述的本发明的更详细说明。但是,应注意:附图所示仅是本发明的典型实施例,不应视为限定本发明的范围,因为本发明可容许其它等效的实施例。For a greater understanding of the above recited features of the invention, the more detailed description of the invention summarized above may be read by reference to various embodiments, some of which are illustrated in the accompanying drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this invention and are not to be considered limiting of its scope, for the invention may admit to other equally effective embodiments.
图1图解说明一根据本发明一实施例的计算机系统的一简化方块图。Figure 1 illustrates a simplified block diagram of a computer system according to an embodiment of the present invention.
图2为一根据本发明一实施例用于将像素数据自一RGB空间转换至一YCbCr空间的方法的一流程图。FIG. 2 is a flowchart of a method for converting pixel data from an RGB space to a YCbCr space according to an embodiment of the present invention.
图3A图解说明一根据本发明一实施例用于确定像素数据的亮度色彩分量(Y)的逻辑图。Figure 3A illustrates a logic diagram for determining the luma color component (Y) of pixel data according to one embodiment of the present invention.
图3B图解说明一根据本发明一实施例用于确定像素数据的蓝色差分量(Cb)的逻辑图。Figure 3B illustrates a logic diagram for determining the blue difference component (Cb) of pixel data according to one embodiment of the present invention.
图3C图解说明一根据本发明一实施例用于确定像素数据的红色差分量(Cr)的逻辑图。FIG. 3C illustrates a logic diagram for determining a red difference component (Cr) of pixel data according to an embodiment of the present invention.
图4图解说明一根据本发明一实施例用于垂直缩放像素数据的方法的一流程图。FIG. 4 illustrates a flowchart of a method for vertically scaling pixel data according to an embodiment of the invention.
图5图解说明一根据本发明一实施例用于将像素数据自YCbCr空间转换至RGB空间的方法的一流程图。5 illustrates a flowchart of a method for converting pixel data from YCbCr space to RGB space according to an embodiment of the present invention.
图6A图解说明一根据本发明一实施例用于确定像素数据的红色分量(R)的逻辑图。Figure 6A illustrates a logic diagram for determining the red component (R) of pixel data according to one embodiment of the present invention.
图6B图解说明一根据本发明一实施例用于确定像素数据的绿色分量(G)的逻辑图。Figure 6B illustrates a logic diagram for determining the green component (G) of pixel data according to one embodiment of the present invention.
图6C图解说明一根据本发明一实施例用于确定像素数据的蓝色分量(B)的逻辑图。Figure 6C illustrates a logic diagram for determining the blue component (B) of pixel data according to one embodiment of the invention.
具体实施方式Detailed ways
图1图解说明一根据本发明一实施例的计算机系统100的一简化方块图。计算机系统100包括通过一系统总线106进行通信的一中央处理器(CPU)102及一系统(主)存储器104。自一个或多个耦接至系统总线106的用户输入装置108(例如键盘、鼠标)接收用户输入。在一在耦接至总线106的图形处理单元(GPU)112控制下运行的基于像素的显示装置110(例如一传统的基于CRT、TV或LCD的监视器、投影机等等)上提供视频输出。其它组件,例如一个或多个存储装置128(例如一固定式或可移式磁盘驱动器、光盘(CD)驱动器、及/或DVD驱动器),也可耦接至系统总线106。在一实施例中,计算机系统100以一红、绿及蓝(RGB)色空间运行。虽然本文是参照以RGB色空间运行的计算机系统100来说明本发明各实施例,但本发明还涵盖以其它色空间(例如YCbCr)运行的计算机系统100。FIG. 1 illustrates a simplified block diagram of a
系统存储器104存储各种程序或应用程序,例如用于产生要由GPU 112处理的像素数据的操作系统程序。操作系统程序130的实例包括Microsoft Windows操作系统的图形装置接口(GDI)组件。系统存储器104可进一步存储一用于实现与GPU 112的通信的图形驱动程序。所述图形驱动程序可采用一个或多个用于与GPU 112进行通信的标准应用程序接口(API),例如Open GL及Microsoft DirectX。通过调用适当的API功能调用,所述操作系统程序能够指令所述图形驱动程序通过系统总线106将所述像素数据传送至GPU 112并调用GPU 112的各种再现功能。此种像素数据通常以二进制形式存储及表示。可使用传统DMA(直接存储器存取)或其它作业来实施数据传送作业。在一实施例中,系统存储器104可将像素数据存储于RGB色空间中。
计算机系统100进一步包括一与GPU 112进行通信的本地存储器或帧缓冲器114。帧缓冲器114存储要由一扫描输出控制逻辑读取并传输至显示装置110以供显示成一图像的像素数据。在一实施例中,帧缓冲器114将像素数据存储于RGB色空间中。虽然帧缓冲器114显示成与系统存储器104不同并分开,但在一些实施方式中,例如在一统一存储器架构(Unified Memory Architecture)中,帧缓冲器114及系统存储器104将共享相同的物理存储装置。
GPU 112包括各种用于接收及处理通过总线106接收的图形系统命令的组件。GPU 112包括一存储器管理单元120及一显示管线130。存储器管理单元120自帧缓冲器114或存储器104读取像素数据、按次序布置像素数据并将像素数据传输至显示管线130以供处理。
显示管线130通常用于处理图像。显示管线130可包含各种经配置以将像素数据转换成适于在显示装置上显示的像素数据的处理模块。在一其中计算机系统100在RGB色空间中运行的实施例中,显示管线130可包括一在红绿蓝(RGB)色空间中处理像素数据的模块142。在RGB色空间中运行的处理模块的实例包括亮度控制、对比度控制及γ校正。The display pipeline 130 is generally used for processing images. Display pipeline 130 may include various processing modules configured to convert pixel data into pixel data suitable for display on a display device. In an embodiment in which
在一实施例中,显示管线130进一步包括一经配置以将像素数据自RGB色空间转换至YCbCr空间的RGB-YCbCr色空间转换器模块144。在下面的段落中将参照图2-3提供对RGB-YCbCr色空间转换器模块144的运行的详细说明。In one embodiment, the display pipeline 130 further includes an RGB-YCbCr color
一旦已将像素数据转换至YCbCr色空间,便可在YCbCr色空间中对像素数据进行处理。因此,显示管线130可进一步包括一色度抽取器145、一垂直缩放器146及一色度内插器147。色度抽取器145经配置以降低像素数据的蓝色差分量(Cb)及红色差分量(Cr)的采样速率。色度抽取器145也可称作色度缩减采样器。色度抽取器145也可包括所属领域的技术人员通常所知的组件。例如,色度抽取器145可包括一经配置以减小像素数据的蓝色差分量(Cb)及红色差分量(Cr)的带宽的低通滤波器。垂直缩放器146经配置以垂直缩放存储于行存储存储器170中的像素数据。垂直缩放器146可为所属领域的技术人员通常所知的任何垂直缩放器。色度内插器147经配置以提高像素数据的蓝色差分量(Cb)及红色差分量(Cr)的采样速率。色度内插器147也可称作色度增加采样器。色度内插器147也可包括所属领域的技术人员通常所知的组件。例如,色度内插器147可包括一有限脉冲响应(FIR)滤波器。在下面段落中将参照图4更详尽地阐述色度抽取器145、垂直缩放器146及色度内插器147。Once the pixel data has been converted to the YCbCr color space, the pixel data can be processed in the YCbCr color space. Therefore, the display pipeline 130 may further include a
显示管线130可进一步包括一与垂直缩放器146进行通信的行存储存储器170。行存储存储器170存储配置成要由垂直缩放器146垂直缩放的像素数据。行存储存储器170可包括一个或多个随机存取存储器(RAM)。虽然行存储存储器170显示成与系统存储器104及帧缓冲器114不同并分开,但在一些实施方式中,行存储存储器170、系统存储器104及帧缓冲器114可共享相同的物理存储装置。Display pipeline 130 may further include a
根据本发明一实施例,显示管线130进一步包括一经配置以将像素数据自YCbCr空间转换至RGB空间的YCbCr-RGB色空间转换器模块148。通过此种方式,一旦完成在YCbCr空间中对像素数据的处理,便可将所述像素数据转换回至RGB空间。在一实施例中,一旦已垂直缩放所述像素数据,所述YCbCr-RGB色空间转换器模块148便将所述像素数据转换至所述RGB空间。在下面的段落中将参照图5-6提供对所述YCbCr-RGB色空间转换器模块148的运行的详细说明。According to an embodiment of the present invention, the display pipeline 130 further includes a YCbCr-RGB color
虽然上文已根据包括一个RGB-YCbCr色空间转换器模块144后随一个YCbCr-RGB色空间转换器模块148阐述了显示管线130,但本发明各实施例还可涵盖,在一运行于YCbCr色空间中的计算机系统中,具有一个YCbCr-RGB色空间转换器模块148后随一RGB-YCbCr色空间转换器模块144的显示管线130。本发明各实施例也可涵盖具有任意数量的RGB-YCbCr色空间转换器模块144及任意数量的YCbCr-RGB色空间转换器模块148的显示管线130。Although the display pipeline 130 has been described above in terms of including an RGB-YCbCr color
在一其中像素数据显示在一电视屏幕上的实施例中,显示管线130进一步包括一行业标准型RGB-YCbCr色空间转换器模块150,以将像素数据转换至YCbCr空间。所述行业标准型RGB-YCbCr色空间转换器模块150与一数字-模拟转换器(DAC)162一同运行来将像素数据显示在电视屏幕上。In an embodiment in which the pixel data is displayed on a television screen, the display pipeline 130 further includes an industry standard RGB-YCbCr color
在一其中将像素数据显示在一CRT上的实施例中,显示管线130进一步包括一数字-模拟转换器(DAC)161,以在显示于所述CRT上之前将像素数据从数字转换成模拟形式。In an embodiment in which the pixel data is displayed on a CRT, the display pipeline 130 further includes a digital-to-analog converter (DAC) 161 to convert the pixel data from digital to analog form prior to display on the CRT. .
应了解,计算机系统100为例示性的且也可具有各种变化形式及修改形式。计算机系统100可为台式计算机、服务器、膝上型计算机、掌上型计算机、图形输入板计算机、游戏控制台、机顶盒、个人数字用具、系留式因特网用具、便携式游戏系统、蜂窝/移动电话、基于计算机的仿真器、或类似装置。显示装置100可为任何基于像素的显示器,例如CRT或LCD监视器、投影机、打印机等等。在某些情形中,可支持多个显示装置(例如一由投影机或CRT监视器组成的阵列),其中每一装置显示所述图像数据的一部分。显示管线130及GPU 112可分别位于独立的芯片上。可使用一个或多个借助适当软件进行编程的可编程处理器、应用专用集成电路(ASIC)、其它集成电路技术、或其任一组合来构建GPU 112或其任一组件。根据本发明揭示内容,所属领域的技术人员将认识到,本发明可实施于各种各样的系统配置中。It should be understood that the
图2为一根据本发明一实施例用于将像素数据自一RGB空间转换至一YCbCr空间的方法200的一流程图。在步骤210处,使用下列方程式来确定像素数据的一亮度色彩分量(Y):FIG. 2 is a flowchart of a method 200 for converting pixel data from an RGB space to a YCbCr space according to an embodiment of the present invention. At step 210, a luminance color component (Y) of the pixel data is determined using the following equation:
Y=R/4+G/2+B/4,(1)Y=R/4+G/2+B/4, (1)
其中R为像素数据的红色分量,G为像素数据的绿色分量,且B为像素数据的蓝色分量。所述红色分量的色空间系数为四分之一或0.25-其为根据行业标准型色空间转换器的红色分量的色空间系数0.299的近似值。所述绿色分量的色空间系数为二分之一或0.5-其也为根据行业标准型色空间转换器的绿色分量的色空间系数0.587的近似值。所述蓝色分量的色空间系数为四分之一或0.25-其也为根据行业标准型色空间转换器的蓝色分量的色空间系数0.114的近似值。因此,所选的用于根据方程式(1)计算所述亮度色彩分量(Y)的色空间系数呈二进制形式。由于所述色空间系数呈二进制形式,因此可使用二进制算法来计算所述亮度色彩分量(Y)且避免使用乘法。通过此种方式,可按一种代价相对更低的方式来确定所述像素数据的亮度色彩分量(Y)。Where R is the red component of the pixel data, G is the green component of the pixel data, and B is the blue component of the pixel data. The color space factor of the red component is one quarter or 0.25 - which is an approximation of the color space factor of 0.299 for the red component according to industry standard color space converters. The color space factor of the green component is one-half or 0.5 - which is also an approximation of the color space factor of 0.587 for the green component according to industry standard color space converters. The color space factor of the blue component is one-quarter or 0.25 - which is also an approximation of the color space factor of 0.114 for the blue component according to industry standard color space converters. Therefore, the color space coefficients selected for calculating the luminance color component (Y) according to equation (1) are in binary form. Since the color space coefficients are in binary form, binary arithmetic can be used to calculate the luma color component (Y) and multiplication is avoided. In this way, the luminance color component (Y) of the pixel data can be determined in a relatively cheap way.
根据本发明一实施例,可根据图3A中所图解说明的一逻辑图310来确定所述像素数据的亮度分量(Y)。由此,通过下述方式来确定所述像素数据的亮度色彩分量(Y):将绿色分量左移一位(其相当于乘以2),将所得到的结果加至所述红色分量及所述蓝色分量,并将总和右移两位(其相当于除以4)。在一实施例中,可通过在将总和右移两位前实施一数字舍入运算来改良逻辑图310。此种数字舍入可使用传统技术来实施,例如在右移总和前将一等于2自乘到移位位数减1的幂数(即2(s-1),其中s为移位位数)的值添加至所述总和。从成本及计算资源观点来看,可自由地执行左移及右移运算。因此,可使用逻辑图310中所述的左移及右移运算以一种代价相对低的方式来确定所述像素数据的亮度色彩分量(Y)。According to an embodiment of the present invention, the luminance component (Y) of the pixel data may be determined according to a logic diagram 310 illustrated in FIG. 3A . Thus, the luminance color component (Y) of the pixel data is determined by shifting the green component to the left by one bit (which is equivalent to multiplying by 2), adding the result obtained to the red component and the the blue component and shift the sum to the right by two bits (which is equivalent to dividing by 4). In one embodiment, logic diagram 310 may be improved by performing a digital rounding operation before shifting the sum to the right by two bits. This rounding of numbers can be implemented using conventional techniques, such as multiplying one equal to 2 to the power of the number of shifts minus 1 before shifting the sum right (that is, 2( s-1 ), where s is the number of shifts ) is added to the sum. From a cost and computing resource point of view, left and right shift operations can be freely performed. Thus, the luma color component (Y) of the pixel data can be determined in a relatively inexpensive manner using the shift left and shift right operations described in logic diagram 310 .
在步骤220处,使用下列方程式来确定所述像素数据的一蓝色差分量(Cb):At step 220, a blue difference component (Cb) of the pixel data is determined using the following equation:
Cb=(B-Y)/2,(2)Cb=(B-Y)/2, (2)
其中B为所述像素数据的蓝色分量且Y为在步骤210处所确定的像素数据的亮度色彩分量(Y)。类似于方程式(1)中所使用的色彩系数,在方程式(2)中用于确定所述蓝色差分量(Cb)的色空间系数是在根据行业标准型色空间转换器确定所述蓝色差分量(Cb)时所用的色空间系数的一近似值。通过此种方式,可将用于根据方程式(2)确定所述蓝色差分量(Cb)的色空间系数表达成二进制形式。由于所述色空间系数呈二进制形式,因此可使用二进制算法来计算所述像素数据的蓝色差分量(Cb)且避免使用乘法。通过此种方式,可按一种代价相对低的方式来确定所述像素数据的蓝色差分量(Cb)。where B is the blue component of the pixel data and Y is the luminance color component (Y) of the pixel data determined at step 210 . Similar to the color coefficients used in Equation (1), the color space coefficients used in Equation (2) to determine the blue difference component (Cb) are obtained after determining the blue difference component according to an industry standard color space converter An approximation of the color space coefficients used in (Cb). In this way, the color space coefficients for determining the blue color difference component (Cb) according to equation (2) can be expressed in binary form. Since the color space coefficients are in binary form, binary arithmetic can be used to calculate the blue difference component (Cb) of the pixel data and avoid the use of multiplication. In this way, the blue difference component (Cb) of the pixel data can be determined in a relatively inexpensive manner.
根据本发明一实施例,可根据图3B中所图解说明的一逻辑图320来确定所述像素数据的蓝色差分量(Cb)。由此,可通过下述方式来确定所述像素数据的蓝色差分量(Cb):从所述像素数据的蓝色分量中减去在步骤210处所确定的像素数据的亮度色彩分量(Y)并将该和值右移一位(其相当于除以2)。在一实施例中,可在将所述和值右移一位前实施一数字舍入运算。如上所述,由于可自由地执行右移运算,因此可使用逻辑图320中所述的右移运算以一种代价相对低的方式来确定所述像素数据的蓝色差分量(Cb)。According to an embodiment of the present invention, the blue difference component (Cb) of the pixel data can be determined according to a logic diagram 320 illustrated in FIG. 3B . Thus, the blue color difference component (Cb) of the pixel data can be determined by subtracting the brightness color component (Y) of the pixel data determined at step 210 from the blue component of the pixel data and Shift the sum right by one bit (which is equivalent to dividing by 2). In one embodiment, a digital rounding operation may be performed before right shifting the sum by one bit. As described above, since the right shift operation can be freely performed, the blue difference component (Cb) of the pixel data can be determined using the right shift operation described in logic diagram 320 in a relatively inexpensive manner.
在步骤230处,使用下列方程式来确定所述像素数据的一红色差分量(Cr):At step 230, a red difference component (Cr) of the pixel data is determined using the following equation:
Cr=(R-Y)/2,(3)Cr=(R-Y)/2, (3)
其中R为所述像素数据的红色分量且Y为步骤210处所确定的像素数据的亮度色彩分量。如同在步骤210及220中一样,用于根据方程式(3)确定所述红色差分量(Cr)的色空间系数同样为行业标准色彩系数的一近似值,以便可将所述色空间系数表达成二进制形式。由于所述色彩系数呈二进制形式,因此可使用二进制算法来计算所述像素数据的红色差分量(Cr)且避免使用乘法。通过此种方式,可按一种代价相对更低的方式来确定所述像素数据的红色差分量(Cr)。Where R is the red component of the pixel data and Y is the luminance color component of the pixel data determined at step 210 . As in steps 210 and 220, the color space coefficients used to determine the red difference component (Cr) according to equation (3) are also an approximation of industry standard color coefficients so that the color space coefficients can be expressed as binary form. Since the color coefficients are in binary form, binary arithmetic can be used to calculate the red difference component (Cr) of the pixel data and avoid the use of multiplication. In this way, the red difference (Cr) of the pixel data can be determined in a relatively low-cost manner.
在本发明一实施例中,可根据图3C中所图解说明的一逻辑图330来确定所述像素数据的红色差分量(Cr)。参见图3C,通过下述方式来确定所述像素数据的红色差分量(Cr):从所述像素数据的红色分量中减去所述像素数据的亮度色彩分量(Y),并将所得到的结果右移一位(其相当于除以2)。在一实施例中,可在将所述结果右移一位前实施一数字舍入运算。如上所述,由于可自由地执行右移运算,因此可使用逻辑图330中所图解说明的右移运算以一种代价相对低的方式来确定所述像素数据的红色差分量(Cr)。In an embodiment of the present invention, the red difference (Cr) of the pixel data can be determined according to a logic diagram 330 illustrated in FIG. 3C . Referring to FIG. 3C, the red difference component (Cr) of the pixel data is determined by subtracting the luminance color component (Y) of the pixel data from the red component of the pixel data, and dividing the obtained The result is right shifted by one bit (which is equivalent to dividing by 2). In one embodiment, a digital rounding operation may be performed before right shifting the result by one bit. As described above, since the right shift operation is free to perform, the red difference component (Cr) of the pixel data can be determined in a relatively inexpensive manner using the right shift operation illustrated in logic diagram 330 .
图4为一根据本发明一实施例用于垂直缩放像素数据的方法400的一流程图。在步骤410处,色度抽取器145将所述像素数据的蓝色差分量(Cb)及红色差分量(Cr)的采样速率降至二分之一。在一实施例中,色度抽取器145将所述采样速率从一4∶4∶4采样速率降至一4∶2∶2采样速率。通过此种方式,将对存储所述像素数据的存储器要求降低三分之一,并进而降低对行存储存储器170的大小要求。虽然所述采样速率降低了二分之一,但本发明各实施例涵盖所述采样速率可降低任一因数。FIG. 4 is a flowchart of a method 400 for vertically scaling pixel data according to an embodiment of the present invention. At step 410, the
一旦已将所述像素数据的蓝色差分量(Cb)及红色差分量(Cr)的采样速率降低二分之一,便将所述像素数据存储于行存储存储器170中(步骤420)。在步骤430处,垂直缩放器146垂直缩放存储于行存储存储器170中的像素数据。可通过所属领域的技术人员已知的任何垂直缩放技术来垂直缩放所述像素数据。例如,可通过使用一有限脉冲响应(FIR)内插器在所存储的先前各行之间进行内插来产生一新的输出行。通过改变相对于输入行的内插位置,可形成一具有一不同于输入图像的行数的新图像。Once the blue differential (Cb) and red differential (Cr) components of the pixel data have been sampled by a factor of two, the pixel data is stored in line store memory 170 (step 420). At step 430 ,
一旦已垂直缩放了所述像素数据,色度内插器147便将所述像素数据的蓝色差分量(Cb)及红色差分量(Cr)的采样速率增大到2倍。在一实施例中,色度抽取器147将所述采样速率从一4∶2∶2采样速率提高至一4∶4∶4采样速率。通过此种方式,色度内插器147恢复所述像素数据的蓝色差分量(Cb)及红色差分量(Cr)的原始采样速率。在一实施例中,方法400是可编程的,因为只有在行存储存储器170的大小除以垂直缩放器146中的行数小于行长度的情况下方可调用方法400。Once the pixel data has been vertically scaled,
一旦已根据方法400垂直缩放了所述像素数据,便可将所述像素数据自所述YCbCr空间转换成所述RGB空间。为此,图5图解说明一根据本发明一实施例用于将像素数据自所述YCbCr空间转换成所述RGB空间的方法500的一流程图。在步骤510处,使用下列方程式来确定所述像素数据的一红色分量(R):Once the pixel data has been vertically scaled according to method 400, the pixel data may be converted from the YCbCr space to the RGB space. To this end, FIG. 5 illustrates a flowchart of a method 500 for converting pixel data from the YCbCr space to the RGB space according to an embodiment of the invention. At step 510, a red component (R) of the pixel data is determined using the following equation:
R=Y+2Cr,(4)R=Y+2Cr, (4)
其中Y为所述像素数据的亮度色彩分量且Cr为所述像素数据的红色差分量。如同在参照图2所述的各步骤中一样,用于根据方程式(4)确定所述红色分量(R)的色空间系数同样为所述行业标准色彩系数的一近似值,以便可将所述色空间系数表达成一二进制形式。由于所述色彩系数呈二进制形式,因此可使用二进制算法来计算所述像素数据的红色分量(R)且避免使用乘法。通过此种方式,可按一种代价相对更低的方法来确定所述像素数据的红色分量(R)。Where Y is the brightness color component of the pixel data and Cr is the red difference component of the pixel data. As in the steps described with reference to Figure 2, the color space coefficients used to determine the red component (R) according to equation (4) are also an approximation of the industry standard color coefficients so that the color The spatial coefficients are expressed in a binary form. Since the color coefficients are in binary form, binary arithmetic can be used to calculate the red component (R) of the pixel data and avoid the use of multiplication. In this way, the red component (R) of the pixel data can be determined in a relatively inexpensive way.
根据本发明一实施例,可根据图6A中所图解说明的一逻辑图610来确定所述像素数据的红色分量(R)。现在参见图6A,通过下述方式确定所述像素数据的红色分量(R):将所述像素数据的红色差分量(Cr)左移一位(其相当于乘以2),并将所得到的结果加至所述像素数据的亮度色彩分量(Y)。如上所述,由于可自由地执行左移位运算,因此可使用逻辑图610中所述的左移位运算以一种代价相对低的方式来确定所述像素数据的红色分量(R)。According to an embodiment of the present invention, the red component (R) of the pixel data may be determined according to a logic diagram 610 illustrated in FIG. 6A . Referring now to FIG. 6A, the red component (R) of the pixel data is determined by shifting the red difference component (Cr) of the pixel data to the left by one bit (which is equivalent to multiplying by 2), and multiplying the resulting The result of is added to the luma color component (Y) of the pixel data. As described above, the red component (R) of the pixel data can be determined using the left shift operation described in logic diagram 610 in a relatively inexpensive manner since the left shift operation is free to be performed.
在步骤520处,使用下列方程式来确定所述像素数据的一绿色分量(G):At step 520, a green component (G) of the pixel data is determined using the following equation:
G=Y-Cb-Cr,(5)G=Y-Cb-Cr, (5)
其中Y为所述像素数据的亮度色彩分量,Cb为所述像素数据的蓝色差分量且Cr为所述像素数据的红色差分量。如同在步骤510中一样,用于根据方程式(5)来确定所述绿色分量(G)的色空间系数同样为所述行业标准色彩系数的一近似值,以便可将所述色空间系数表达成一二进制形式。由于所述色彩系数呈一二进制形式,因此可使用二进制算法来计算所述像素数据的绿色分量(G)且避免使用乘法。通过此种方式,以一种代价相对低的方式来确定所述像素数据的绿色分量(G)。Where Y is the luminance color component of the pixel data, Cb is the blue difference component of the pixel data and Cr is the red difference component of the pixel data. As in step 510, the color space coefficients used to determine the green component (G) according to equation (5) are also an approximation of the industry standard color coefficients so that the color space coefficients can be expressed as a binary form. Since the color coefficients are in a binary form, binary arithmetic can be used to calculate the green component (G) of the pixel data and multiplication is avoided. In this way, the green component (G) of the pixel data is determined in a relatively inexpensive manner.
根据本发明一实施例,可根据图6B中所图解说明的一逻辑图620来确定所述像素数据的绿色分量(G)。现在参见图6B,通过下述方式来确定所述像素数据的绿色分量(G):从所述像素数据的亮度色彩分量Y中减去所述像素数据的蓝色差分量(Cb),并进一步从结果中减去所述红色差分量Cr。According to an embodiment of the present invention, the green component (G) of the pixel data may be determined according to a logic diagram 620 illustrated in FIG. 6B . Referring now to FIG. 6B, the green component (G) of the pixel data is determined by subtracting the blue difference component (Cb) of the pixel data from the luminance color component Y of the pixel data, and further from The red difference Cr is subtracted from the result.
在步骤530处,使用下列方程式来确定所述像素数据的一蓝色分量(B):At step 530, a blue component (B) of the pixel data is determined using the following equation:
B=Y+2Cb,(6)B=Y+2Cb, (6)
其中Y为所述像素数据的亮度色彩分量且Cb为所述像素数据的蓝色差分量。如同在步骤510及520中一样,用于根据方程式(6)确定所述蓝色分量(B)的色空间系数也呈一二进制形式。因此,可使用二进制算法来计算所述像素数据的蓝色分量(B)且避免使用乘法,从而能够以一种代价相对低的方法来确定所述像素数据的蓝色分量(B)。where Y is the luminance color component of the pixel data and Cb is the blue difference component of the pixel data. As in steps 510 and 520, the color space coefficients used to determine the blue component (B) according to equation (6) are also in a binary form. Thus, the blue component (B) of the pixel data can be calculated using a binary algorithm and avoiding the use of multiplication, thereby enabling a relatively inexpensive method of determining the blue component (B) of the pixel data.
根据本发明一实施例,可根据图6C中所图解说明的一逻辑图630来确定所述像素数据的蓝色分量(B)。现在参见图6C,通过下述方式来确定所述像素数据的蓝色分量(B):将所述像素数据的蓝色差分量Cr左移一位(其相当于乘以2)并将所得到的结果加至所述像素数据的亮度色彩分量Y。如上所述,由于可自由地执行左移运算,因此可使用逻辑图630中所述的左移运算以一种代价相对低的方式来确定所述像素数据的蓝色分量(B)。According to an embodiment of the present invention, the blue component (B) of the pixel data may be determined according to a logic diagram 630 illustrated in FIG. 6C. Referring now to FIG. 6C, the blue component (B) of the pixel data is determined by shifting the blue difference Cr of the pixel data by one bit to the left (which is equivalent to multiplying by 2) and multiplying the resulting The result is added to the luminance color component Y of the pixel data. As described above, the blue component (B) of the pixel data can be determined using the left shift operation described in logic diagram 630 in a relatively inexpensive manner since the left shift operation is free to perform.
虽然上文主要论述本发明的实施例,但也可构想出本发明的其它及进一步的实施例,此并不背离本发明的基本范围,且本发明的范围是由随附权利要求书来确定。Although the above mainly discusses embodiments of the invention, other and further embodiments of the invention are also conceivable without departing from the basic scope of the invention, which is to be determined by the appended claims .
Claims (24)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US83747404A | 2004-04-30 | 2004-04-30 | |
| US10/837,474 | 2004-04-30 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1965568A true CN1965568A (en) | 2007-05-16 |
| CN100521728C CN100521728C (en) | 2009-07-29 |
Family
ID=34967112
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2005800187271A Expired - Fee Related CN100521728C (en) | 2004-04-30 | 2005-04-25 | Method and apparatus for vertically scaling pixel data |
Country Status (5)
| Country | Link |
|---|---|
| EP (1) | EP1741282A1 (en) |
| JP (2) | JP2007535869A (en) |
| CN (1) | CN100521728C (en) |
| TW (1) | TWI413900B (en) |
| WO (1) | WO2005112425A1 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007251723A (en) * | 2006-03-17 | 2007-09-27 | Sanyo Electric Co Ltd | Projection type video display apparatus |
| US8107724B2 (en) | 2008-08-02 | 2012-01-31 | Vantrix Corporation | Method and system for predictive scaling of colour mapped images |
| US9350899B2 (en) * | 2012-09-14 | 2016-05-24 | Qualcomm Incorporated | Methods and device for efficient resampling and resizing of digital images |
Family Cites Families (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5613084A (en) * | 1994-10-04 | 1997-03-18 | Panasonic Technologies, Inc. | Interpolation filter selection circuit for sample rate conversion using phase quantization |
| JP3188135B2 (en) * | 1995-05-19 | 2001-07-16 | 三洋電機株式会社 | Video signal processing circuit |
| JPH10136316A (en) * | 1996-10-25 | 1998-05-22 | Fuji Film Micro Device Kk | Image data processing unit and image data processing method |
| JPH10191392A (en) * | 1996-10-29 | 1998-07-21 | Sony Corp | Image signal processing device |
| US5781241A (en) * | 1996-11-08 | 1998-07-14 | Chrontel, Inc. | Apparatus and method to convert computer graphics signals to television video signals with vertical and horizontal scaling requiring no frame buffers |
| CN1066898C (en) * | 1997-03-04 | 2001-06-06 | 华邦电子股份有限公司 | Method and device for realizing color space conversion by matrix operation |
| JPH10285611A (en) * | 1997-03-31 | 1998-10-23 | Sony Corp | Image data processor and method therefor |
| US6556311B1 (en) * | 1997-05-28 | 2003-04-29 | Hewlett-Packard Development Co., L.P. | Luminance-based color resolution enhancement |
| EP0969674A3 (en) * | 1998-07-03 | 2004-01-02 | Canon Kabushiki Kaisha | Image sensing device processing image signals in blocks |
| JP2000069502A (en) * | 1998-08-24 | 2000-03-03 | Sony Corp | Video signal processing circuit and imaging apparatus using the same |
| JP4006908B2 (en) * | 1999-11-26 | 2007-11-14 | セイコーエプソン株式会社 | Single plate solid-state image sensor color interpolation method and recording medium recording single-chip solid-state image sensor color interpolation processing program |
| JP2002141805A (en) * | 2000-03-30 | 2002-05-17 | Matsushita Electric Ind Co Ltd | Encoder and communication device |
| GB2369924A (en) * | 2000-12-07 | 2002-06-12 | Sony Uk Ltd | Selecting representative video images using image properties |
| WO2002049345A1 (en) * | 2000-12-11 | 2002-06-20 | Koninklijke Philips Electronics N.V. | Motion compensated de-interlacing in video signal processing |
| JP2003005723A (en) * | 2001-06-22 | 2003-01-08 | Hitachi Ltd | Liquid crystal display and electronic equipment |
| JP4267848B2 (en) * | 2001-09-25 | 2009-05-27 | 株式会社リコー | Image encoding device, image decoding device, image encoding method, and image decoding method |
| JP2003244714A (en) * | 2002-02-19 | 2003-08-29 | Mega Chips Corp | Image processing apparatus and digital still camera |
| JP2003304505A (en) * | 2002-04-11 | 2003-10-24 | Matsushita Electric Ind Co Ltd | Video signal output device and video signal output method |
| JP2003348446A (en) * | 2002-05-27 | 2003-12-05 | Matsushita Electric Ind Co Ltd | Video signal processing apparatus |
| JP4798747B2 (en) * | 2004-01-26 | 2011-10-19 | シャープ株式会社 | Character display device, character display method, and recording medium |
| US7050065B1 (en) * | 2004-04-15 | 2006-05-23 | Nvidia Corporation | Minimalist color space converters for optimizing image processing operations |
-
2005
- 2005-04-25 WO PCT/US2005/014175 patent/WO2005112425A1/en not_active Ceased
- 2005-04-25 CN CNB2005800187271A patent/CN100521728C/en not_active Expired - Fee Related
- 2005-04-25 JP JP2007510867A patent/JP2007535869A/en active Pending
- 2005-04-25 EP EP05740206A patent/EP1741282A1/en not_active Ceased
- 2005-04-27 TW TW94113514A patent/TWI413900B/en not_active IP Right Cessation
-
2009
- 2009-06-08 JP JP2009137589A patent/JP5106483B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP5106483B2 (en) | 2012-12-26 |
| JP2007535869A (en) | 2007-12-06 |
| JP2009282527A (en) | 2009-12-03 |
| EP1741282A1 (en) | 2007-01-10 |
| TWI413900B (en) | 2013-11-01 |
| CN100521728C (en) | 2009-07-29 |
| TW200538933A (en) | 2005-12-01 |
| WO2005112425A1 (en) | 2005-11-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7199837B2 (en) | System for improved ratiometric expansion and method thereof | |
| US20090225101A1 (en) | Apparatus, method, and product for downscaling an image | |
| US8164662B2 (en) | Image-processing device for color image data and method for the image processing of color image data | |
| US20080284793A1 (en) | Hue and saturation control module | |
| KR20040000151A (en) | Apparatus and Method For Converting Of Pixels From YUV TO RGB Format Using Color Look-Up Tables | |
| US7050065B1 (en) | Minimalist color space converters for optimizing image processing operations | |
| CN101977329B (en) | Image processing using linear light values and other image processing improvements | |
| CN1981294B (en) | Image processing using line values and other image processing improvements | |
| US6989837B2 (en) | System and method for processing memory with YCbCr 4:2:0 planar video data format | |
| US6587117B1 (en) | Apparatus and method for adaptive transformation of fractional pixel coordinates for calculating color values | |
| US6765578B2 (en) | Graphics resampling system and method for use thereof | |
| KR101816661B1 (en) | Ringing suppression in video scalers | |
| US6115507A (en) | Method and apparatus for upscaling video images in a graphics controller chip | |
| JP5106483B2 (en) | Method and apparatus for vertically scaling pixel data | |
| JPWO2017203941A1 (en) | IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM | |
| JP6403720B2 (en) | Image processing apparatus, image processing method, and computer program | |
| KR100463552B1 (en) | Cubic convolution interpolation apparatus and method | |
| US5768507A (en) | Method and apparatus for overcoming a slope overload condition while using differential pulse code modulation scheme | |
| JP7299398B1 (en) | Image processing device and image processing method | |
| JP2008116812A (en) | Display device, projector and display method | |
| JP2014072846A (en) | Image composition device and image composition method | |
| KR100463551B1 (en) | System for scaling digital image | |
| US9747658B2 (en) | Arbitration method for multi-request display pipeline | |
| JP2006211197A (en) | Image processing method | |
| JP2005311886A (en) | Video signal processing circuit and video display apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090729 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |