WO2010083711A1 - 数字图像缩放处理方法及集成系统 - Google Patents

数字图像缩放处理方法及集成系统 Download PDF

Info

Publication number
WO2010083711A1
WO2010083711A1 PCT/CN2009/075798 CN2009075798W WO2010083711A1 WO 2010083711 A1 WO2010083711 A1 WO 2010083711A1 CN 2009075798 W CN2009075798 W CN 2009075798W WO 2010083711 A1 WO2010083711 A1 WO 2010083711A1
Authority
WO
WIPO (PCT)
Prior art keywords
scaling
field
line
row
weighting coefficient
Prior art date
Application number
PCT/CN2009/075798
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 中兴通讯股份有限公司
Publication of WO2010083711A1 publication Critical patent/WO2010083711A1/zh

Links

Classifications

    • 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
    • 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
    • G09G5/391Resolution modifying circuits, e.g. variable screen formats
    • 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/10Mixing of images, i.e. displayed pixel being the result of an operation, e.g. adding, on the corresponding input pixels

Definitions

  • the present invention relates to digital image processing techniques, and more particularly to a digital image processing method and integration system. Background technique
  • the present invention has been made in view of the problems in the prior art that the image format conversion integrated circuit is complicated to implement, the scaling speed is not high, the reusability is poor, the integration is difficult, and the reliability is poor. Therefore, the main object of the present invention is to provide a digital image. Scaling processing method and integrated system for solving Describe the problem.
  • a digital image scaling processing integrated system includes: a CPU bus interface module, a line buffer module, a scaling control module, a scaling coefficient calculation generator, and a scaling module, wherein
  • a CPU bus interface module configured to generate and output a zoom control signal according to the received attribute information of the image to be displayed, and read the video data to be zoomed according to the received video data request, generate and output a line buffer read/write a control signal
  • a line buffer module configured to send a video data request, and buffer the video data under the control of the line buffer read/write control signal
  • the zoom control module is configured to acquire the video data saved by the line buffer module according to the zoom control signal, and Accumulating the field scaling initial step and the line scaling initial step obtained from the CPU bus interface module according to a preset rule, obtaining and outputting a field scaling step and a line scaling step
  • a scaling coefficient calculation generator for scaling according to the field The step size and the row scaling step respectively calculate and output the field scaling weighting coefficient and the row scaling weighting coefficient
  • the scaling module is configured to first perform field scaling on the video data output by the scaling control module according to the field scaling weighting coefficient and the row scaling weighting coefficient, and then Perform line scaling and output the scaled
  • a digital image scaling processing method is provided.
  • the digital image scaling processing method includes: obtaining a field scaling initial step size and a line scaling initial step size according to a field scaling ratio and a line scaling ratio of the image; and initializing the field step size and the line scaling initial according to a preset rule Step length is performed to obtain a field scaling step and a line scaling step; the field scaling weighting coefficient and the line scaling weighting coefficient are obtained according to the field scaling step and the line scaling step; the buffer to be scaled according to the field scaling weighting coefficient
  • the video data is field-scaled, and the field-scaled video data is line-scaled according to the line scaling weighting coefficient, and the scaled video data is output.
  • upward and downward integer or fractional scaling can be implemented on a single circuit by scaling the image by hardware based on a reusable design method, and, as in the embodiment of the present invention, Zoom is broken down into vertical and horizontal directions Independently, the two-dimensional calculation is divided into two one-dimensional operations in the vertical direction and the horizontal direction.
  • the problem that the image format conversion integrated circuit in the prior art is complicated to implement, the zoom speed is not high, the reusability is poor, the integration is difficult, and the reliability is poor, can be solved, and the complexity of the operation can be reduced, and the hardware can be realized.
  • FIG. 1 is a schematic structural diagram of a digital image scaling processing integrated system according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a CPU bus interface module according to an embodiment of the present invention
  • FIG. 3 is a structure of a zoom control module according to an embodiment of the present invention
  • Figure 4 is a schematic diagram of the cosine function mapping accumulation
  • FIG. 5 is a schematic structural diagram of a scaling coefficient calculation generator according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a scaling module according to an embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of a field scaling module according to an embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of a row scaling module according to an embodiment of the present invention
  • FIG. 9 is a digital image according to a preferred embodiment of the present invention. Schematic diagram of a zoom processing integrated system
  • FIG. 10 is an implementation of a digital image scaling processing integrated system in accordance with an embodiment of the present invention.
  • FIG. 11 is a flowchart of a digital image scaling processing method according to an embodiment of the present invention
  • FIG. 12 is a schematic diagram of an overall implementation process of a scaling algorithm according to an embodiment of the present invention
  • Figure 13 is a flow chart of down conversion in accordance with an embodiment of the present invention. detailed description
  • SoC system on chip
  • SoC design is a design for embedded system applications, both software and hardware.
  • the SoC is an integrated circuit device that performs the most tasks with the smallest size.
  • SoC design is based on the design of Intellectual Property Core (IP Core). Its core concept is to use reusable modules to shorten the development time of system-on-chip, mitigating design capabilities and integrated circuits. The contradiction created for IC) reduces the development cost of the product.
  • IP Core Intellectual Property Core
  • the embodiment of the present invention proposes a new digital image scaling processing method and integrated system based on SoC.
  • the integrated system is based on hardware implementation, and generates field scaling coefficients and row scaling coefficients respectively according to the scaling ratio, and according to the field scaling coefficients and
  • the line scaling factor is used for field scaling and line scaling of the video data to be scaled, respectively.
  • a digital image scaling processing integrated system is first provided.
  • 1 is a schematic structural diagram of a digital image scaling processing integrated system according to an embodiment of the present invention.
  • a digital image scaling processing integrated system according to an embodiment of the present invention mainly includes: a CPU bus interface module 1 and a line buffer module 3
  • the above entities are further described below.
  • the CPU bus interface module 1 is configured to generate information according to the attribute information of the received image to be displayed. And outputting a zoom control signal, and according to the received video data request, reading the video data to be zoomed, generating and outputting a read/write control signal;
  • the CPU bus interface module 1 is connected to the CPU through a CPU interface, and is configured to accept a configuration of a resolution size, an image scaling requirement (including a scaling ratio) of an image to be displayed, and the like, specifically, as shown in FIG.
  • the CPU bus interface module 1 may include: a bus slave interface unit 11 and a bus master interface unit 13.
  • the bus slave interface unit 11 may include: a configuration register group 111, a bus slave decoding subunit 113, and an interrupt control subunit 115.
  • Num ⁇ Num ⁇ ; where W is the unit length between two adjacent pixels.
  • the number of valid rows for the source field, ⁇ is the number of valid rows for the target field, .
  • the fractional part of the scaling can be converted to an integer, which can reduce the computational complexity.
  • the scaling is 4:3, which is about 1.333.
  • the integer part is recorded as 1 and the fractional part 341 (0.333*1024).
  • the bus slave interface decoding sub-unit 113 is configured to generate a read/write access request of the corresponding register according to an access request from the CPU from the device bus, and to perform related address information, data information, and control. Information is sent to the configuration register set;
  • the interrupt control sub-unit 115 is configured to receive a control signal output from the configuration register group 111, and when the interrupt is enabled, receives an interrupt instruction from the bus master interface unit 13, and transmits an interrupt request signal to the CPU.
  • the bus master interface unit 13 may include: a bus master interface control sub-unit 131, and an address calculation control sub-unit 133.
  • the bus main interface control sub-unit 131 is configured to receive a video data request, output a read/write control signal according to the control signal output by the configuration register group 111, and send the subsequent address output by the address calculation control sub-unit 133 to the main bus through the main bus.
  • the CPU; the address calculation control sub-unit 133 is configured to read the video data under the control of the read/write control signal, output the line buffer read/write control signal, the write address of the video data in the line buffer module 3, and the video data to be zoomed and displayed.
  • the CPU bus interface module 1 detects the video data request signal sent by the line buffer module 3, according to the control settings issued by the line buffer module 3, specifically includes the control enable, the control recovery work instruction, and the screen.
  • the size, the burst bus read module, the first address stored in the system memory, etc. start to read the video data under the control of the control enable and resume work indication signals, and according to the zoom requirement, the screen size and the burst
  • the bus read mode calculates whether the video data that needs to be read is read every time, and at the same time, the line buffer read/write control signal and the write address signal are generated.
  • a line buffer module 3 configured to send the video data request to the CPU bus interface module 1, and buffer the video data read by the CPU bus interface module 1 under the control of the read/write control signal; specifically, the line buffer module 3 according to the In the current state, the video data request is sent to the CPU bus interface module 1, requesting the CPU bus interface module 1 to output the read video data to the line buffer module 3, and the read/write control signal and the write address signal, and the scaling control module 5 generate Under the control of the row selection signal, the video data read by the CPU bus module is buffered by 8 line buffers. Save and complete the corresponding data format conversion.
  • the zoom control module 5 is configured to acquire the video data saved by the line buffer module 3 according to the above-mentioned zoom control signal, and accumulate the initial field step size and the line zoom initial step obtained from the CPU bus interface module 1 according to a preset rule. Obtaining and outputting the field zoom step and the line zoom step; specifically, as shown in FIG. 3, the zoom control module 5 may include: a field zoom control unit 51 and a line zoom control unit 53, wherein the field zoom control unit 51 The initial step size is scaled according to the input field, and is accumulated according to a preset rule to obtain a field zoom step.
  • the line zoom control unit 53 is configured to scale the initial step size according to the input line, perform accumulating according to a preset rule, and obtain a line zoom. Step size
  • the field scaling control unit 51 may further include an adder 511, a decider 513, a selector 515, and an output module 517.
  • the adder 511 is configured to accumulate the input field scaling initial step size according to a preset rule to obtain an accumulated field scaling step.
  • the determiner 513 is connected to the adder 511, and is configured to determine whether the accumulated field scaling step is greater than Or equal to the unit length between two adjacent pixels;
  • the selector 515 is connected to the decider 513, and is configured to select the accumulated field scaling step as the field scaling step when the decider 513 determines that the accumulated field scaling step is less than the unit length.
  • the decider 513 determines that the accumulated field scaling step is greater than or equal to the unit length, selects the difference between the accumulated field scaling step and the unit length as the field scaling step, and sets the field accumulation carry value to 1; the output module 517 and the selector 515 is connected for outputting the field scaling step selected by the selector 515 to the scaling coefficient calculation generator 7, and outputting the field scaling step as the field scaling initial step size to the adder 511.
  • the line scaling control unit 53 may further include: an adder 531, a decider 533, a selector 535, and an output module 537.
  • the adder 531 is configured to accumulate an initial step size of the input line according to a preset rule to obtain an accumulated line zoom step.
  • the determiner 533 is connected to the adder 531, and is configured to determine whether the step size of the accumulated line is greater than Or equal to the unit length between two adjacent pixels; the selector 535 is coupled to the decider 533 for determining the accumulated line at the decider 533 When the scaling step is less than the unit length, the cumulative row scaling step is selected as the row scaling step.
  • the decider 533 determines that the cumulative row scaling step is greater than or equal to the unit length, the difference between the cumulative row scaling step and the unit length is selected.
  • the row accumulating carry value is set to 1; the output module 537 is connected to the selector 535 for outputting the row scaling step selected by the selector 535 to the scaling coefficient calculation generator 7, and scaling the row The long is scaled as the initial step size of the line and is output to the adder 531.
  • the scaling of the entire image in different regions may be selected to be nonlinearly adjusted, and thus in the embodiment of the present invention.
  • the adder 531 of the line scaling control unit 53 accumulates the initial step size of the input line scaling, the step size can be adjusted according to the inverse cosine function map accumulation shown in FIG. 4.
  • COS_LEVEL is a nonlinear scaling frame. Value; HFZ is the up-converting scale factor. Therefore, the scaling ratio of the entire image in different regions can be adjusted non-linearly, the middle scaling ratio is small, and the scaling ratio on both sides is large, thereby improving the zoom display effect of the high-definition wide-screen image.
  • the scaling factor calculation generator 7 is configured to calculate and output the field scaling weighting coefficient and the row scaling weighting coefficient respectively according to the field scaling step and the row scaling step input by the scaling control module 5;
  • the scaling coefficient calculation generator 7 may include: a field weighting coefficient generator 71 and a row weighting coefficient generator 73.
  • the field weighting coefficient generator 71 is configured to obtain a field scaling weighting coefficient according to a preset algorithm according to a field scaling step input by the scaling control module 5; and a row weighting coefficient generator 73 for inputting according to the scaling control module 5
  • the line scaling step size is obtained according to a preset algorithm to obtain a line scaling weighting coefficient.
  • the field and line scaling weighting coefficients may be calculated by using different algorithms for the luminance and chrominance signals respectively. Specifically, for the luminance signal, six may be used. The algorithm of point interpolation is performed for the chrominance signal. Four-point linear interpolation can be used, which can ensure the video effect after scaling, and can also greatly reduce the hardware consumption resources.
  • the weighting coefficient h ( X ) is calculated for each pixel, and each time the weighting coefficient h ( X ) is calculated In the cubic calculation, the computational complexity is high.
  • the weighting coefficient search table is set in both the field weight coefficient generator and the row weight coefficient generator ( Look up table), the weighting coefficient lookup table is used to store the correspondence between the weighting coefficients (including the field scaling weighting coefficient and the row scaling weighting coefficient) and the independent variables (ie, the field scaling step size and the row scaling step size), and the field weighting coefficient occurs.
  • the controller 71 and the row weighting coefficient generator 73 may respectively acquire the field scaling weighting coefficients corresponding to the input field scaling step and the row scaling weighting coefficients corresponding to the input row scaling step.
  • the scaling step of the upper or lower half of the image may be saved in the weighting coefficient lookup table.
  • the correspondence between the scaling step size and the scaling weighting coefficient of the other half of the image can be obtained.
  • the weighting coefficient lookup table in the field weighting coefficient generator and the row weighting coefficient generation may be replaced according to the interpolation algorithm, thereby improving the reusability of the integrated system.
  • the scaling module 9 is configured to first perform field scaling on the video data output by the scaling control module 5 according to the field scaling weighting coefficient and the row scaling weighting coefficient, perform line scaling, and output the scaled video data.
  • the scaling module 9 may include: a field scaling module 91 and a row scaling module 93.
  • the field scaling module 91 is configured to: according to the field scaling weighting coefficient, the received view The frequency data is field-scaled, and the field-scaled video data is output to the line scaling module;
  • the line scaling module 93 is configured to perform line scaling on the video data sent by the field scaling module 91 according to the line scaling weighting coefficient, and output the Field, line-scaled video data.
  • the field scaling module 91 can be implemented by the structure shown in FIG. 7, wherein the first multiplier is used to calculate the pixel values of the i-2th row and the jth column. Multiplying the field scaling weighting coefficient Vcoef_i-2 of the i-2th row, and the second multiplier is used to compare the pixel value of the i-1th row, the jth column with the field scaling weighting coefficient Vcoef_i-1 of the i-1th row.
  • the multiplier, the first adder is used to add the results of the output of the first multiplier and the second multiplier; the third multiplier is used to compare the pixel values of the i th row and the j th column with the field scaling weighting coefficient Vcoef_i of the i th row.
  • the multiplier and the fourth multiplier are used to multiply the pixel value of the i+1th row, the jth column by the field scaling weighting coefficient Vcoef_i+1 of the i+1th row, and the second adder for the third multiplier and the fourth adder
  • the results of the multiplier output are added, the third adder is used to add the results of the output of the first adder and the second adder; the fifth multiplier is used to compare the pixel values of the i+2th row and the jth column with the i th +2 lines of field scaling weighting factor Vcoef_i+2 are multiplied, and the sixth multiplier is used to be the i+3th line, the jth
  • the D flip-flop DFF is used to access the result of the fifth adder output or the maximum pixel value, and output the result, the result is the field scaled i row, jth column pixel value, where i is an integer greater than or equal to 2, and j is an integer greater than or equal to zero.
  • the row scaling module 93 can be implemented by the structure shown in FIG. 8, wherein the first multiplier is used to multiply the pixel values of the j-2th column and the i-th row by the row scaling weighting coefficient HcoefJ-2 of the j-2th column. And a second multiplier for multiplying the pixel value of the j-1th column, the i-th row by the row scaling weighting coefficient HcoefJ-1 of the j-1th column, the first adder for using the first multiplier and the second multiplier The values obtained by the device are added, And a third multiplier for dividing the pixel value of the jth column, the i th row and the row scaling weighting coefficient of the jth column
  • fourth multiplier is used to multiply the pixel value of the j+1th column, the i-th row by the row scaling weighting coefficient Hcoef_j+1 of the j+1th column, and the second adder is used for the third multiplier and The value obtained by the fourth multiplication is added;
  • the fifth multiplier is used to multiply the pixel value of the i+th column, the i-th row, and the row scaling weighting coefficient HcoefJ+2 of the j+2th column, and the sixth multiplier is used for j+3 column, the pixel value of the i-th row is multiplied by the row scaling weighting coefficient HcoefJ+3 of the j+3th column, and the third adder is used to add the values obtained by the fifth multiplier and the sixth multiplier, fourth An adder is used to add the values obtained by the first adder and the second adder, and a fifth adder is used to add the values obtained by the third adder and the fourth adder; the multiplex switch is
  • the D flip-flop output line scales After the i-th row and the j-th column pixel value, i is an integer greater than or equal to 0, and j is an integer greater than or equal to 2.
  • Vcoef_i corresponds to the field scaling weighting coefficient of the i-th row
  • HcoefJ corresponds to the row scaling weighting coefficient of the j-th column.
  • the value is obtained by calculating the weighting coefficient lookup table of the address index by calculating the independent variable (i.e., the field scaling step size and the row scaling step size) of the weighting coefficient h ( x ) for each pixel.
  • the field scaling module the input image pixel values are multiplied by the field scale weighting coefficients of the corresponding rows, and then the corresponding products in the same column are added and then output through DFF.
  • the field-scaled image pixel values are multiplied by the corresponding row's row scaling weighting coefficients, and then added by the product, and finally the final scaled image pixel values are output via the D flip-flop.
  • the digital image scaling processing integrated system further includes: a synchronization signal generating module 10, configured to generate a field synchronization signal and a field effective count of the target image. a signal, wherein the field effective counting signal is used to control reset of the CPU bus interface module 1, the line buffer module 3, the scaling control module 5, the scaling coefficient calculation generator 7, and the scaling module 9, and the line sync signal is output together with the video data.
  • the attribute further includes: a polarity of the line synchronization signal.
  • FIG. 10 is a schematic diagram of an implementation manner of the above-mentioned digital image scaling processing integrated system according to an embodiment of the present invention.
  • the digital image scaling processing integrated system mainly includes: a CPU bus interface module, a line buffer module B, and a zoom.
  • the working principle of the system is: setting the resolution of the screen to be displayed on the television screen or other display through the CPU bus interface module A, and setting the image scaling requirement, the polarity of the line synchronization signal, etc.
  • the CPU bus interface module A is also responsible for issuing a screen switching interrupt to the CPU;
  • the line buffer module B sends a source video data request to the CPU bus interface module A according to its own state according to the set display image size and the scaling requirement.
  • the CPU bus interface module A detects the source video data request signal sent by the line buffer module B, according to the control settings issued by the CPU bus interface module A, including control enable, control recovery work indication, screen size, burst bus
  • the image is in the specified system memory (system memory) first address and other signals, under the control of the control enable and resume work indication signal, the data is read, and according to the scaling requirements, the screen size and the burst bus read mode.
  • the scaling control module C in the line buffer module B
  • the video data value of the desired format is taken out at the corresponding address, and at the same time, the scaling control module C accumulates according to the step size at each rising edge of the clock to generate a corresponding new step size;
  • the scaling coefficient calculation generator E is based on the accumulated step size
  • the weighting coefficient lookup table of the address index finds the corresponding field scale scaling weighting coefficient; the field scaling module F root
  • the vertical direction scaling transformation that is, field scaling, is performed, and then the vertically scaled video data is input to the line scaling module G, and the line scaling module G calculates the line scaling weight generated by the generator E according to the scaling factor.
  • the coefficients are scaled in the horizontal direction, that is, line scaled, and finally the line scaling module G outputs the scaled video data.
  • a digital image scaling processing method which can be implemented by the apparatus of Figs. 1 to 10 described above.
  • Step S101 According to a field scaling ratio of an image and Line scaling, obtaining the initial step size of the field scaling and the initial step size of the line scaling;
  • Step S103 accumulate the initial step size of the field scaling and the initial step size of the line scaling according to a preset rule, to obtain a field zoom step size and a line zoom step size;
  • Step S105 Acquire a field scaling weighting coefficient and a row scaling power weighting coefficient according to the field scaling step size and the row scaling step size;
  • the field scaling weighting coefficient corresponding to the field scaling step and the row scaling weighting coefficient corresponding to the row scaling step may be obtained by searching a pre-saved weighting coefficient lookup table.
  • Step S107 Perform field scaling on the buffered video data to be scaled according to the field scaling weighting coefficient, and perform line scaling on the field-scaled video data according to the line scaling weighting coefficient, and output the scaled video data.
  • the overall implementation process of the scaling algorithm in the above method is as shown in FIG. 12, firstly, according to the proportional relationship between the input image and the output image, the initial value of the row and field scaling step is determined, and then each clock rising edge Step increment, generate a new step, use the new step as the row, field zoom step, find the weighting coefficient lookup table according to the row and field zoom step, and get the adjacent six The line of the point, the field scales the weighting factor, and then according to the line, field The scaling weighting coefficients are used for field scaling and line scaling to output scaled data points.
  • Step size the specific process shown in Figure 13, mainly includes the following steps:
  • Step S301 The step size is continuously accumulated in each rising edge of the clock to obtain an accumulated step size.
  • Step S309 return the obtained accumulated step size as a new accumulated step size to step S301, and output an accumulated step size;
  • Step S311 Find a weighting coefficient lookup table, and obtain a weighting coefficient corresponding to the accumulated step size
  • Step S313 setting the source pixel read position to the sum of the integer part IOR of the proportional coefficient and the accumulated carry value
  • Step S315 Source pixel value output control
  • Step S317 Perform down-conversion data processing according to the weighting coefficient input in step S311 and the source pixel value output control input in step S315.
  • an integrated system for digital image scaling processing is implemented by using SoC technology, and integer calculation is used in the scaling process, and a scaling factor is searched by using a weighting coefficient lookup table, and the upward and upward directions can be simultaneously realized.
  • Lower integers or decimals are scaled at will, and can convert raw images in lower resolution format (such as 640x480) to output images in higher definition format (such as 1024x768).
  • the circuit structure is simple, low in cost, high in reliability, fast in zooming, and reusable. It can be widely used in video SoC systems to complete digital image scaling for various displays and HD widescreen TVs.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Studio Circuits (AREA)

Description

数字图像缩放处理方法及集成系统 技术领域
本发明涉及数字图像处理技术, 尤其涉及一种数字图像处理方法及集 成系统。 背景技术
随着电视、 计算机、 手机等多种视频多媒体领域应用产品的迅速发展, 对图像显示的要求越来越高, 由于不同的显示技术对图像的尺寸有不同的 要求, 因此, 需要对图像的尺寸进行灵活的变化。 目前, 如何有效地实现 图像在不同的分辨率之间灵活转变并保持较高的图像质量已成为一个迫切 需要解决的问题。
目前, 用于各类平板显示器的图像制式转化集成电路设计中的很多功 能是通过软件实现的, 其实现较复杂, 缩放速度不高, 并且, 可重用性差、 难以集成。 其中, 尤其是缩放系数和存储器读地址的实现特别复杂。
由于现有的图像制式转化集成电路设计过于复杂, 因此, 比较容易发 生故障, 其可靠性也较差, 成本也较高。 并且, 现有的单一电路不能同时 实现向上 (即从低清晰度图像转化到高清晰度图像)和向下缩放(即从高 清晰度图像转化到低清晰度图像) 功能, 同时, 对高清宽屏图像缩放显示 效果也不理想。 发明内容
考虑到现有技术中图像制式转化集成电路实现复杂、 缩放速度不高、 可重用性差, 难以集成及可靠性差等问题而提出本发明, 为此, 本发明的 主要目的在于提供了一种数字图像缩放处理方法及集成系统, 用以解决上 述问题。
根据本发明的一个方面, 提供了一种数字图像缩放处理集成系统。 根据本发明的数字图像缩放处理集成系统包括: CPU总线接口模块、 行緩存模块、 缩放控制模块、 缩放系数计算产生器以及缩放模块, 其中,
CPU总线接口模块, 用于根据接收到的待显示图像的属性信息, 生成并输 出缩放控制信号, 并根据接收到的视频数据请求, 读取待缩放显示的视频 数据, 生成并输出行緩存读写控制信号; 行緩存模块, 用于发送视频数据 请求, 并在行緩存读写控制信号的控制下, 緩存视频数据; 缩放控制模块, 用于根据缩放控制信号获取行緩存模块保存的视频数据, 并按照预设规则 对从 CPU 总线接口模块获取的场缩放初始步长和行缩放初始步长进行累 加, 获得并输出场缩放步长和行缩放步长; 缩放系数计算产生器, 用于根 据场缩放步长和行缩放步长分别计算并输出场缩放加权系数和行缩放加权 系数; 缩放模块, 用于根据场缩放加权系数和行缩放加权系数先对缩放控 制模块输出的视频数据进行场缩放, 再进行行缩放, 并输出缩放后的视频 数据。
根据本发明的另一方面, 提供了一种数字图像缩放处理方法。
根据本发明的数字图像缩放处理方法包括: 根据图像的场缩放比例和 行缩放比例, 获取场缩放初始步长和行缩放初始步长; 根据预设规则, 对 场缩放初始步长和行缩放初始步长进行累力口, 得到场缩放步长和行缩放步 长; 根据场缩放步长和行缩放步长获取场缩放加权系数和行缩放加权系数; 根据场缩放加权系数对緩存的待缩放的视频数据进行场缩放, 并根据行缩 放加权系数对场缩放后的视频数据进行行缩放, 输出缩放后的视频数据。
通过本发明的上述至少一个方案, 通过基于可重用的设计方法, 通过 硬件实现图像的缩放, 可以在单一电路上实现向上和向下整数或小数任意 比例缩放, 并且, 由于本发明实施例中将缩放分解为垂直方向和水平方向 独立进行, 将二维的计算分为垂直方向和水平方向两次一维运算。 可以解 决现有技术中图像制式转化集成电路实现复杂、 缩放速度不高、 可重用性 差, 难以集成及可靠性差等问题, 可以降低运算的复杂度, 筒化硬件实现。
本发明的其它特征和优点将在随后的说明书中阐述, 并且, 部分地从 说明书中变得显而易见, 或者通过实施本发明而了解。 本发明的目的和其 他优点可通过在所写的说明书、 权利要求书、 以及附图中所特别指出的结 构来实现和获得。 附图说明
附图用来提供对本发明的进一步理解, 并且构成说明书的一部分, 与 本发明的实施例一起用于解释本发明, 并不构成对本发明的限制。 在附图 中:
图 1为根据本发明实施例的数字图像缩放处理集成系统的结构示意图; 图 2为根据本发明实施例的 CPU总线接口模块的结构示意图; 图 3为根据本发明实施例的缩放控制模块的结构示意图;
图 4为余弦函数映射累加示意图;
图 5为根据本发明实施例的缩放系数计算产生器的结构示意图; 图 6为根据本发明实施例的缩放模块的结构示意图;
图 7为根据本发明实施例的场缩放模块的一种结构实现示意图; 图 8为根据本发明实施例的行缩放模块的一种结构实现示意图; 图 9为根据本发明优选实施例的数字图像缩放处理集成系统的结构示 意图;
图 10为根据本发明实施例的数字图像缩放处理集成系统的一种实现方 式;
图 11为根据本发明实施例的数字图像缩放处理方法的流程图; 图 12为根据本发明实施例的缩放算法的总体实现过程示意图; 图 13为根据本发明实施例的向下变换流程图。 具体实施方式
功能概述
在本发明实施例中, 基于系统芯片 ( System on Chip, 筒称为 SoC )设 计技术, 提出了一种数字图像缩放处理方法及集成系统。 SoC 是面向嵌入 式系统应用的设计, 其中既有软件系统也有硬件系统, SoC 为以最小的尺 寸完成最多的任务的集成电路器件。 SoC设计是基于知识产权核( Intellectual Property Core, 筒称为 IP Core ) 的设计, 其核心理念是利用可重用模块以 缩短系统级芯片的开发时间, 緩解设计能力与集成电路( Integrated Circuit, 筒称为 IC )制造的矛盾, 降低产品的开发成本。 其中, 高效集成度的 SoC 设计要求可重用性能 IP库的支持。 本发明实施例基于 SoC, 提出了一种新 的数字图像缩放处理方法及集成系统, 该集成系统基于硬件实现, 根据缩 放比例, 分别产生场缩放系数和行缩放系数, 并根据该场缩放系数和行缩 放系数, 分别对待缩放的视频数据进行场缩放和行缩放。
在不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组 合。
以下结合附图对本发明的优选实施例进行说明, 应当理解, 此处所描 述的优选实施例仅用于说明和解释本发明, 并不用于限定本发明。
根据本发明实施例, 首先提供了一种数字图像缩放处理集成系统。 图 1为根据本发明实施例的数字图像缩放处理集成系统的结构示意图, 如图 1 所示, 根据本发明实施例的数字图像缩放处理集成系统主要包括: CPU总线接口模块 1、 行緩存模块 3、 缩放控制模块 5、 缩放系数计算产生 器 7和缩放模块 9。 以下进一步描述上述各实体。
(一) CPU总线接口模块 1
CPU总线接口模块 1 , 用于根据接收到的待显示图像的属性信息, 生 成并输出缩放控制信号, 并根据接收到的视频数据请求, 读取待缩放显示 的视频数据, 生成并输出读写控制信号;
如图 1所示, CPU总线接口模块 1通过 CPU接口与 CPU连接, 用于 接受对将要显示的图像的分辨率大小、 图像缩放要求(包括缩放比例)等 的配置, 具体地, 如图 2所示, CPU总线接口模块 1可以包括: 总线从设 备接口单元 11和总线主设备接口单元 13。
其中, 总线从设备接口单元 11可以包括: 配置寄存器组 111、 总线从 接口译码子单元 113和中断控制子单元 115。
配置寄存器组 111 , 包括多个寄存器, 每个寄存器分别用于接收 CPU 对待显示图像的不同属性的设置, 并产生控制信号, 其中, 上述属性包括: 待缩放显示的视频数据的存储地址、 该视频数据输入的格式、 上下缩放选 择以及行、 场缩放比例的小数部分和整数部分等; 其中, 输入的场缩放比 例的小数部分为场缩放初始步长 vstepO,行缩放比例的小数部分为行缩放初 始步长 hstepO, 并通过以下公式确定: vstepO=^^ W
Numvl , hstep0=^≡ L x W
Num^ ; 其中, W为两相邻像素之间的单位长度, 。为 源场有效行数, ^ 为目标场有效行数, 。为源行有效点数, 为 目标行有效点数。
通过上述的计算公式, 可以将缩放比例的小数部分转换为整数, 从而 可以降低计算的复杂度, 比如, 要向下变换一幅图像, 其缩放比例为 4:3 , 即约为 1.333 , 在本发明实施例中, 整数部分记录为 1 , 小数部分 341 ( 0.333*1024 )。
总线从接口译码子单元 113 ,用于根据 CPU从设备总线上的访问请求, 产生相应的寄存器的读写访问请求, 并把相关的地址信息、 数据信息和控 制信息发送给配置寄存器组;
中断控制子单元 115 , 用于接收配置寄存器组 111输出的控制信号, 在 中断使能的情况下, 接收到来自总线主设备接口单元 13的中继指示时, 向 CPU发送中断请求信号。
总线主设备接口单元 13可以包括: 总线主接口控制子单元 131、 和地 址计算控制子单元 133。 其中, 总线主接口控制子单元 131 , 用于接收视频 数据请求, 根据配置寄存器组 111 输出的控制信号, 输出读写控制信号, 并将地址计算控制子单元 133输出的后续地址通过主总线发送给 CPU; 地 址计算控制子单元 133 , 用于在读写控制信号的控制下读取视频数据, 输出 行緩存读写控制信号、 视频数据在行緩存模块 3 的写地址, 以及待缩放显 示的视频数据的后续地址。
在具体实施过程中, CPU总线接口模块 1在侦查到行緩存模块 3发出 的视频数据请求信号时, 根据行緩存模块 3发出的控制设定, 具体包括控 制使能、 控制恢复工作指示、 屏的大小、 突发总线读取模块、 图像在系统 内存中存储的首地址等信号, 在控制使能及恢复工作指示信号的控制下开 始读取视频数据, 并根据缩放要求、 屏的大小及突发总线读取模式计算是 否读取完每次需要读取的视频数据, 同时, 产生行緩存的读写控制信号及 写地址信号。
(二)行緩存模块 3
行緩存模块 3 , 用于向 CPU总线接口模块 1发送上述视频数据请求, 并在读写控制信号的控制下, 緩存 CPU总线接口模块 1读取的视频数据; 具体地, 行緩存模块 3根据其当前状态, 向 CPU总线接口模块 1发送 上述视频数据请求, 请求 CPU总线接口模块 1向行緩存模块 3输出读取的 视频数据, 并在读写控制信号及写地址信号, 以及缩放控制模块 5产生的 行选择信号的控制下, 将 CPU总线模块读取的视频数据用 8个行緩存器緩 存, 并完成相应的数据格式变换。
(三 )缩放控制模块 5
缩放控制模块 5 ,用于根据上述缩放控制信号获取行緩存模块 3保存的 视频数据, 并按照预设规则对从 CPU总线接口模块 1获取的场缩放初始步 长和行缩放初始步长进行累加, 获得并输出场缩放步长和行缩放步长; 具体地, 如图 3所示, 缩放控制模块 5可以包括: 场缩放控制单元 51 和行缩放控制单元 53 , 其中, 场缩放控制单元 51 , 用于根据输入的场缩放 初始步长, 按照预设规则进行累加, 获取场缩放步长; 行缩放控制单元 53 , 用于根据输入的行缩放初始步长, 按照预设规则进行累加, 获取行缩放步 长;
具体地,场缩放控制单元 51可以进一步包括:加法器 511、判决器 513、 选择器 515和输出模块 517。 其中, 加法器 511 , 用于根据预设规则, 对输 入的场缩放初始步长进行累加, 得到累加场缩放步长; 判决器 513 与加法 器 511 连接, 用于判断累加场缩放步长是否大于或等于两相邻像素之间的 单位长度; 选择器 515与判决器 513连接, 用于在判决器 513确定累加场 缩放步长小于单位长度时, 选择累加场缩放步长作为场缩放步长, 在判决 器 513确定累加场缩放步长大于或等于上述单位长度时, 选择累加场缩放 步长与单位长度的差作为场缩放步长, 并将场累加进位值置 1 ; 输出模块 517与选择器 515连接,用于将选择器 515选择的场缩放步长输出给缩放系 数计算产生器 7,并将场缩放步长作为场缩放初始步长,输出给加法器 511。
同理, 行缩放控制单元 53可以进一步包括: 加法器 531、 判决器 533、 选择器 535和输出模块 537。 其中, 加法器 531 , 用于根据预设规则, 对输 入的行缩放初始步长进行累加, 得到累加行缩放步长; 判决器 533 与加法 器 531 连接, 用于判断累加行缩放步长是否大于或等于两相邻像素之间的 单位长度; 选择器 535与判决器 533连接, 用于在判决器 533确定累加行 缩放步长小于单位长度时, 选择累加行缩放步长作为行缩放步长, 在判决 器 533确定累加行缩放步长大于或等于上述单位长度时, 选择累加行缩放 步长与上述单位长度的差作为行缩放步长, 并将行累加进位值置 1 ; 输出模 块 537与选择器 535连接, 用于将选择器 535选择的行缩放步长输出给缩 放系数计算产生器 7, 并将行缩放步长作为行缩放初始步长, 输出给加法器 531。
在具体实施过程中, 在实现水平方向缩放时, 为了提高针对高清宽屏 ( 16: 9 ) 图像缩放显示的效果, 可以选择非线性调整整个图像在不同区域 的缩放比例, 因此在本发明实施例中, 行缩放控制单元 53的加法器 531在 对输入的行缩放初始步长进行累加时, 可以按照图 4所示的反余弦函数映 射累加来调整步长, 图 4中, COS_LEVEL为非线性缩放幅值; HFZ为向 上变换比例系数。 从而可以非线性调整整个图像在不同区域的缩放比例, 中间缩放比例小, 两边缩放比例大, 从而可以提高高清宽屏图像的缩放显 示效果。
(四)缩放系数计算产生器 7
缩放系数计算产生器 7,用于根据缩放控制模块 5输入的上述场缩放步 长和行缩放步长分别计算并输出场缩放加权系数和行缩放加权系数;
在具体实施过程中, 如图 5所示, 缩放系数计算产生器 7可以包括: 场加权系数发生器 71 和行加权系数发生器 73。 其中, 场加权系数发生器 71 , 用于根据缩放控制模块 5输入的场缩放步长, 按照预设算法, 获取场 缩放加权系数; 行加权系数发生器 73 , 用于根据缩放控制模块 5输入的行 缩放步长, 按照预设算法, 获取行缩放加权系数。
在具体实施过程中, 根据人眼对亮度和色度信号的敏感性特点, 可以 对亮度和色度信号分别采用不同的算法计算场、 行缩放加权系数, 具体地, 对于亮度信号, 可以采用六点三次插值的算法进行计算, 对于色度信号, 可以采用四点线性插值的方法, 从而可以保证缩放后视频效果, 同时也可 以大大降低硬件消耗资源。
并且, 由于计算器直接运用的三次插值公式求缩放后图像 f ( X, y ), 每个像素都要计算加权系数 h ( X ), 而且, 每次计算加权系数 h ( X )都要 用到三次方的计算, 计算的复杂度高, 因此, 为了减少系统的计算量, 增 加系统的可重用性, 本发明实施例在场加权系数发生器和行加权系数发生 器均设置了加权系数查找表(Look up table ), 该加权系数查找表用于保存 加权系数(包括场缩放加权系数和行缩放加权系数) 与自变量(即场缩放 步长和行缩放步长)的对应关系, 场加权系数发生器 71和行加权系数发生 器 73根据加权系数查找表, 可以分别获取与输入的场缩放步长对应的场缩 放加权系数, 以及与输入的行缩放步长对应的行缩放加权系数。
在具体实施过程中, 由于图像的上半部分和下半部分的缩放比例相同, 因此, 为了减少存储空间, 可以在加权系数查找表中只保存图像的上半部 分或下半部分的缩放步长与缩放加权系数的对应关系, 根据对称性, 可以 获得另外一半图像的缩放步长与缩放加权系数的对应关系。 通过查找加权 系数查找表, 可以输出 8位的行、 场缩放加权系数。
在具体实施过程中, 如果要使用其它的插值算法, 可以根据该插值算 法, 更换场加权系数发生器和行加权系数发生中的加权系数查找表, 从而 提高了该集成系统的重用性。
(五)缩放模块 9
缩放模块 9,用于根据场缩放加权系数和行缩放加权系数先对缩放控制 模块 5输出的视频数据进行场缩放, 再进行行缩放, 并输出缩放后的视频 数据。
具体地, 如图 6所示, 缩放模块 9可以包括: 场缩放模块 91和行缩放 模块 93。 其中, 场缩放模块 91 , 用于根据场缩放加权系数, 对接收到的视 频数据进行场缩放, 并将场缩放后的视频数据输出到行缩放模块; 行缩放 模块 93 , 用于根据行缩放加权系数,对场缩放模块 91发来的视频数据进行 行缩放, 并输出经场、 行缩放后的视频数据。
在具体实施过程中, 以六点三次插值算法为例, 场缩放模块 91可以由 图 7所示的结构实现, 其中, 第一乘法器用于将第 i-2行、 第 j列的像素值 与第 i-2行的场缩放加权系数 Vcoef_i-2相乘、 第二乘法器用于将第 i-1行, 第 j列的像素值与第 i-1行的场缩放加权系数 Vcoef_i-l相乘、 第一加法器 用于将第一乘法器和第二乘法器输出的结果相加; 第三乘法器用于将第 i 行, 第 j列的像素值与第 i行的场缩放加权系数 Vcoef_i相乘、 第四乘法器 用于将第 i+1行, 第 j列的像素值与第 i+1行的场缩放加权系数 Vcoef_i+l 相乘、 第二加法器用于将第三乘法器和第四乘法器输出的结果相加、 第三 加法器用于将第一加法器和第二加法器输出的结果相加; 第五乘法器用于 将第 i+2行,第 j列的像素值与第 i+2行的场缩放加权系数 Vcoef_i+2相乘、 第六乘法器用于将第 i+3行, 第 j列的像素值与第 i+3行的场缩放加权系数 Vcoef_i+3相乘、 第四加法器用于将第五乘法器和第六乘法器输出的结果相 加, 第五加法器用于将第三加法器和第四加法器输出的结果相加; 多路模 拟开关根据第五加法器的最高位判断输出第五加法器输出的结果或者最大 像素值, 若最高位为 1 , 则输出最大像素值, 若最高位为 0, 则输出第五加 法器输出的结果; D触发器(DFF )用于接入第五加法器输出的结果或者最 大像素值, 并输出结果, 该结果为场缩放后的第 i行、 第 j列像素值, 其中, i为大于等于 2的整数, j为大于等于 0的整数。
行缩放模块 93可以由图 8所示的结构实现, 其中, 第一乘法器用于将 第 j-2列、 第 i行的像素值与第 j-2列的行缩放加权系数 HcoefJ-2相乘、 第 二乘法器用于将第 j-1 列, 第 i行的像素值与第 j-1 列的行缩放加权系数 HcoefJ-1相乘、 第一加法器用于将第一乘法器和第二乘法器所得值相加, 以及第三乘法器用于将第 j列, 第 i行的像素值与第 j列的行缩放加权系数
HcoefJ相乘、 第四乘法器用于将第 j+1列, 第 i行的像素值与第 j+1列的 行缩放加权系数 Hcoef_j+l相乘、第二加法器用于将第三乘法器和第四乘法 所得值相加; 第五乘法器用于将第 j+2列, 第 i行的像素值与第 j+2列的行 缩放加权系数 HcoefJ+2相乘、 第六乘法器用于将第 j+3列, 第 i行的像素 值与第 j+3列的行缩放加权系数 HcoefJ+3相乘、第三加法器用于将第五乘 法器和第六乘法器所得值相加, 第四加法器用于将第一加法器和第二加法 器所得值相加, 第五加法器用于将第三加法器和第四法器所得值相加; 多 路选择开关根据第五加法器的最高位判断输出第五加法器输出的结果或者 最大像素值, 若最高位为 1 , 则输出最大像素值, 若最高位为 0, 则输出第 五加法器输出的结果; D 触发器用于接入第五加法器输入的结果或者最大 像素值, 该 D触发器输出行缩放后的第 i行、 第 j列像素值, i为大于等于 0的整数, j为大于等于 2的整数。
在图 7和图 8中, Vcoef_i对应于第 i行的场缩放加权系数, HcoefJ 对应于第 j列的行缩放加权系数。 其值是通过每个像素都要计算加权系数 h ( x )的自变量(即场缩放步长和行缩放步长)作为地址索引的加权系数查 找表查找得出。 对于场缩放模块, 是将输入的图像像素值与对应行的场缩 放加权系数相乘, 然后再将同一列中对应乘积相加, 再经 DFF输出。 对于 行缩放模块, 是将经场缩放后的图像像素值乘以对应列的行缩放加权系数, 再经乘积相加, 最后经 D触发器输出最终缩放后的图像像素值。
在具体实施过程中, 为了实现图像的实时缩放, 如图 9所示, 该数字 图像缩放处理集成系统还包括: 同步信号产生模块 10, 用于产生目标图像 的行场同步信号和行场有效计数信号, 其中, 行场有效计数信号用于控制 CPU总线接口模块 1、 行緩存模块 3、 缩放控制模块 5、 缩放系数计算产生 器 7和缩放模块 9的复位, 行场同步信号与视频数据一起输出, 用以实现 图像的实时缩放。 所述配置寄存器组接收的 CPU对待显示图像的不同属性 的设置中, 所述属性还包括: 行场同步信号极性。
图 10为本发明实施例提供的上述数字图像缩放处理集成系统的一种实 现方式, 如图 10所述, 该数字图像缩放处理集成系统主要包括: CPU总线 接口模块八、 行緩存模块 B、 缩放控制模块 C、 缩放系数计算产生器 E、 同 步信号产生模块0、 场缩放模块 F和行缩放模块0。
该系统的工作原理为:通过 CPU总线接口模块 A对在电视屏幕上或其 他显示器上将要显示的画面的分辨率大小设定, 以及对图像缩放要求, 行 场同步信号极性等进行设定, 同时该 CPU总线接口模块 A还负责向 CPU 发出画面切换中断; 行緩存模块 B根据设定的显示图像尺寸, 及缩放要求, 行緩存模块 B根据自身状态向 CPU总线接口模块 A发出源视频数据请求; CPU总线接口模块 A侦查到行緩存模块 B发送的源视频数据请求信号,根 据该 CPU总线接口模块 A发出的控制设定, 包括控制使能, 控制恢复工作 指示, 屏的大小, 突发总线读取模式, 图像在指定系统存储器 (system memory )首地址等信号, 在控制使能及恢复工作指示信号的控制下开始读 取数据, 并根据缩放要求, 屏的大小及突发总线读取模式计算是否读取完 成每次要读的视频数据, 同时产生行緩存的读写控制信号及写地址信号; 行緩存模块 B根据 CPU总线接口模块 A发出的读写控制信号和写地址,以 及缩放控制模块 C产生的行选择信号,将源视频数据用 8个行緩存器緩存, 同时要完成所需要的数据格式转换; 根据同步信号产生模块 D调制产生的 行场同步有效计数信号以及缩放控制模块 C产生的行緩存的读地址和行选 择信号, 缩放控制模块 C在行緩存模块 B相应地址取出所需格式的视频数 据值, 与此同时缩放控制模块 C根据在每个时钟上升沿步长不断累加, 产 生相应新的步长; 缩放系数计算产生器 E根据以该累加步长作为地址索引 的加权系数查找表查找得出所对应的行场缩放加权系数; 场缩放模块 F根 据上述场缩放加权系数, 首先进行垂直方向的缩放变换即场缩放, 然后再 把经垂直缩放的视频数据输入到行缩放模块 G, 行缩放模块 G按照缩放系 数计算产生器 E产生的行缩放加权系数进行水平方向的缩放变换, 即行缩 放, 最后由行缩放模块 G输出缩放后的视频数据。
根据本发明实施例, 还提供了一种数字图像缩放处理方法, 该方法可 以由上述图 1至图 10中的装置实现。
图 11为根据本发明实施例的数字图像缩放处理方法的流程图,如图 11 所示, 根据本发明实施例的数字图像缩放处理方法主要包括以下步骤: 步骤 S101 : 根据图像的场缩放比例和行缩放比例, 获取场缩放初始步 长和行缩放初始步长;
步骤 S103: 根据预设规则, 对场缩放初始步长和行缩放初始步长进行 累加, 得到场缩放步长和行缩放步长;
步骤 S105: 根据场缩放步长和行缩放步长获取场缩放加权系数和行缩 放力口权系数;
在具体实施过程中, 可以通过查找预先保存的加权系数查找表, 获取 与场缩放步长对应的场缩放加权系数, 以及与行缩放步长对应的行缩放加 权系数。
步骤 S107: 根据场缩放加权系数对緩存的待缩放的视频数据进行场缩 放, 并根据行缩放加权系数对场缩放后的视频数据进行行缩放, 输出缩放 后的视频数据。
在具体实施过程中,上述方法中缩放算法的总体实现过程如图 12所示, 首先根据输入图像与输出图像之前的比例关系, 确定行、 场缩放步长初始 值, 然后, 每个时钟上升沿步长不断累加(Increase step ), 产生新的步长, 以该新的步长用为行、 场缩放步长, 根据该行、 场缩放步长查找加权系数 查找表, 获取与相邻的六个点的行、 场缩放加权系数, 然后根据该行、 场 缩放加权系数进行场缩放和行缩放, 输出缩放后的数据点。
在向下变换时, 缩放比例存在整数部分 IOR和小数部分 VFZ, 需要根 据这两部分来进行缩放, 将该缩放比例的小数部分与相邻像素点之间的单 位长度的乘积作为行或场初始步长, 具体流程如图 13所示, 主要包括以下 步骤:
步骤 S301 : 在每个时钟上升沿步长不断累加, 得到累加步长; 步骤 S303: 判断累加步长是否大于或等于相邻像素点之间的单位长度 W, 如果是, 则执行步骤 S307, 否则执行步骤 S305;
步骤 S305: 累加步长=累加步长, 累加进位值为 0;
步骤 S307: 累加步长=累加步长 - W, 累加进位值为 1 ;
步骤 S309: 将获取的累加步长作为新的累加步长返回步骤 S301 , 并输 出累加步长;
步骤 S311 : 查找加权系数查找表, 获取与上述累加步长对应的加权系 数;
步骤 S313: 将源像素读取位置设置为比例系数的整数部分 IOR与累加 进位值之和;
步骤 S315: 源像素值输出控制;
步骤 S317: 根据步骤 S311输入的加权系数及步骤 S315输入的源像素 值输出控制进行向下变换数据处理。
如上所述, 借助本发明实施例提供的技术方案, 通过基于 SoC技术实 现数字图像缩放处理集成系统, 在缩放过程中采用整数计算和利用加权系 数查找表查找缩放系数, 而且可以同时实现向上和向下整数或小数任意比 例缩放, 且能将较低清晰度格式的原始图像(如 640x480 )转换为较高清晰 度格式的输出图像(如 1024x768 )。也能实现从较高清晰度的输入信号经转 换输出支持较低清晰度显示格式的屏; 同时, 整个缩放系统分解为垂直方 向和水平方向独立进行, 并且在具体实现时根据人眼睛对亮度和色度信号 的敏感性特点, 对亮度信号可以采用较复杂的六点双三次方非线性插值方 法, 而在色度方面可只采用四点的双线性插值, 减少了算法的复杂度, 同 时也保证了缩放后的图像的显示效果。 因此, 电路结构筒单、 成本低、 高 可靠、 缩放速度快, 可重用好, 可以广泛应用集成在视频 SoC系统中, 完 成针对各种显示器及高清宽屏电视的数字图像缩放。
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于 本领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精 神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明 的保护范围之内。

Claims

权利要求书
1、 一种数字图像缩放处理集成系统, 其特征在于, 包括:
CPU总线接口模块, 用于根据接收到的待显示图像的属性信息, 生成 并输出缩放控制信号, 并根据接收到的视频数据请求, 读取待缩放显示的 视频数据, 生成并输出行緩存读写控制信号;
行緩存模块, 用于向 CPU总线接口模块发送所述视频数据请求, 并在 所述行緩存读写控制信号的控制下, 緩存所述视频数据;
缩放控制模块, 用于根据所述缩放控制信号获取所述行緩存模块保存 的所述视频数据, 并按照预设规则对从所述 CPU总线接口模块获取的场缩 放初始步长和行缩放初始步长进行累加, 获得并输出场缩放步长和行缩放 步长;
缩放系数计算产生器, 用于根据所述场缩放步长和行缩放步长分别计 算并输出场缩放加权系数和行缩放加权系数;
缩放模块, 用于根据所述场缩放加权系数和所述行缩放加权系数先对 所述缩放控制模块输出的所述视频数据进行场缩放, 再进行行缩放, 并输 出缩放后的视频数据。
2、 根据权利要求 1所述的数字图像缩放处理集成系统, 其特征在于, 所述 CPU总线接口模块包括总线从设备接口单元和总线主设备接口单元, 其中,
所述总线从设备接口单元, 包括:
配置寄存器组, 包括多个寄存器, 每个寄存器分别用于接收 CPU对待 显示图像的不同属性的设置, 并产生控制信号, 其中, 所述属性包括: 所 述视频数据的存储地址、 所述视频数据输入的格式、 上下缩放选择、 以及 行、 场缩放比例的小数部分和整数部分, 其中, 输入的场缩放比例的小数 部分为所述场缩放初始步长 vstepO,行缩放行比例的小数部分为所述行缩放 初始步长 hstepO, 并通过以下公式确定:
vstepO=^^ W hstepO=^^ x W
Num , Num^ , 其中, W 为两相邻像素之间的单 位长度, 。为源场有效行数, ^ 为目标场有效行数, Nun ^为源行有 效点数, Nu 为目标行有效点数;
总线从接口译码子单元, 用于根据 CPU从设备总线上的访问请求, 产 生相应的寄存器的读写访问请求, 并把相关的地址信息、 数据信息和控制 信息发送给配置寄存器组;
中断控制子单元, 用于接收所述控制信号, 在中断使能的情况下, 接 收到来自总线主设备接口单元的中继指示时, 向所述 CPU发送中断请求信 号;
所述总线主设备接口单元, 包括:
总线主接口控制子单元, 用于接收所述视频数据请求, 根据所述配置 寄存器组输出的控制信号, 输出读写控制信号, 并将地址计算控制子单元 输出的后续地址通过主总线发送给 CPU;
地址计算控制子单元, 用于在所述读写控制信号的控制下读取所述视 频数据, 输出所述行緩存读写控制信号、 所述视频数据在所述行緩存模块 的写地址, 以及待缩放显示的视频数据的所述后续地址。
3、 根据权利要求 2所述的数字图像缩放处理集成系统, 其特征在于, 所述缩放控制模块包括场缩放控制单元和行缩放控制单元, 其中,
所述场缩放控制单元, 包括:
加法器, 用于根据所述预设规则, 对输入的场缩放初始步长进行累加, 得到累加场缩放步长;
判决器, 用于判断所述累加场缩放步长是否大于或等于两相邻像素之 间的单位长度; 选择器, 用于在所述判决器确定所述累加场缩放步长小于所述单位长 度时, 选择所述累加场缩放步长作为所述场缩放步长, 在所述判决器确定 所述累加场缩放步长大于或等于所述单位长度时, 选择所述累加场缩放步 长与所述单位长度的差作为所述场缩放步长, 并将场累加进位值置 1 ;
输出模块, 用于将所述场缩放步长输出给所述缩放系数计算产生器, 并将所述场缩放步长作为所述场缩放初始步长, 输出给所述加法器;
所述行缩放控制单元, 包括:
加法器, 用于根据所述预设规则, 对输入的行缩放初始步长进行累加, 得到累加行缩放步长;
判决器, 用于判断所述累加行缩放步长是否大于或等于两相邻像素之 间的单位长度;
选择器, 用于在所述判决器确定所述累加行缩放步长小于所述单位长 度时, 选择所述累加行缩放步长作为所述行缩放步长, 在所述判决器确定 所述累加行缩放步长大于或等于所述单位长度时, 选择所述累加行缩放步 长与所述单位长度的差作为所述行缩放步长, 并将行累加进位值置 1 ;
输出模块, 用于将所述行缩放步长输出给所述缩放系数计算产生器, 并将所述行缩放步长作为所述行缩放初始步长, 输出给所述加法器。
4、 根据权利要求 3所述的数字图像缩放处理集成系统, 其特征在于, 所述行缩放控制单元的所述加法器按照非线性函数的预设规则累加调整步 长。
5、 根据权利要求 3所述的数字图像缩放处理集成系统, 其特征在于, 所述缩放系数计算产生器包括:
场加权系数发生器, 用于根据所述缩放控制模块输入的场缩放步长, 按照预设算法, 获取所述场缩放加权系数;
行加权系数发生器, 用于根据所述缩放控制模块输入的行缩放步长, 按照预设算法, 获取所述行缩放加权系数。
6、 根据权利要求 5所述的数字图像缩放处理集成系统, 其特征在于, 对于亮度信号, 所述预设算法为六点三次插值; 对于色度信号, 所述预设 算法为四点线性插值。
7、 根据权利要求 6所述的数字图像缩放处理集成系统, 其特征在于, 所述场加权系数发生器包括加权系数查找表, 该加权系数查找表用于存储 场缩放步长与场缩放加权系数之间的对应关系; 所述场加权系数发生器根 据所述加权系数查找表, 获取与所述场缩放步长对应的场缩放加权系数; 所述行加权系数发生器包括加权系数查找表, 该加权系数查找表用于 存储行缩放步长与行缩放加权系数之间的对应关系; 所述行加权系数发生 器根据所述加权系数查找表, 获取与所述行缩放步长对应的行缩放加权系 数。
8、 根据权利要求 6或 7所述的数字图像缩放处理集成系统, 其特征在 于, 所述缩放模块包括:
场缩放模块, 用于根据所述场缩放加权系数、 所述场缩放比例的整数 部分及所述场累加进位值, 对接收到的所述视频数据进行场缩放, 并将场 缩放后的视频数据输出到行缩放模块;
行缩放模块, 用于根据所述行缩放加权系数、 所述行缩放比例的整数 部分及所述行累加进位值, 对接收到的所述视频数据进行行缩放, 并输出 行缩放后的所述视频数据。
9、 根据权利要求 2至 7中任一项所述的数字图像缩放处理集成系统, 其特征在于, 该系统还包括:
同步信号产生模块, 用于产生目标图像的行场同步信号和行场有效计 数信号, 所述行场有效计数信号用于控制所述 CPU总线接口模块、 所述行 緩存模块、 所述缩放控制模块、 所述缩放系数计算产生器和所述缩放模块 的复位, 所述行场同步信号与所述视频数据一起输出;
所述配置寄存器组接收的所述属性还包括: 行场同步信号极性。
10、 一种数字图像缩放处理方法, 其特征在于, 包括:
根据图像的场缩放比例和行缩放比例, 获取场缩放初始步长和行缩放 初始步长;
根据预设规则, 对所述场缩放初始步长和所述行缩放初始步长进行累 加, 得到场缩放步长和行缩放步长;
根据所述场缩放步长和所述行缩放步长获取场缩放加权系数和行缩放 加权系数;
根据所述场缩放加权系数对緩存的待缩放的视频数据进行场缩放, 并 根据所述行缩放加权系数对场缩放后的视频数据进行行缩放, 输出缩放后 的视频数据。
PCT/CN2009/075798 2009-01-23 2009-12-21 数字图像缩放处理方法及集成系统 WO2010083711A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910005701.3 2009-01-23
CN200910005701A CN101789234A (zh) 2009-01-23 2009-01-23 数字图像缩放处理方法及集成系统

Publications (1)

Publication Number Publication Date
WO2010083711A1 true WO2010083711A1 (zh) 2010-07-29

Family

ID=42355519

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/075798 WO2010083711A1 (zh) 2009-01-23 2009-12-21 数字图像缩放处理方法及集成系统

Country Status (2)

Country Link
CN (1) CN101789234A (zh)
WO (1) WO2010083711A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770342A (zh) * 2020-06-19 2020-10-13 艾索信息股份有限公司 一种视频无级缩放方法
CN114092336A (zh) * 2022-01-19 2022-02-25 深圳鲲云信息科技有限公司 基于双线性插值算法的图像缩放方法、装置、设备及介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102486721B (zh) * 2010-12-03 2016-02-03 上海华虹集成电路有限责任公司 一种线性插值优化电路
KR102214028B1 (ko) * 2014-09-22 2021-02-09 삼성전자주식회사 가변구조형 스케일러를 포함하는 애플리케이션 프로세서와 이를 포함하는 장치들
CN104869284B (zh) * 2015-05-14 2018-05-04 北京邮电大学 一种双线性插值放大算法的高效率fpga实现方法和装置
CN109101174A (zh) * 2018-06-26 2018-12-28 深圳市买买提信息科技有限公司 一种缩放处理方法、装置、终端及介质
CN111131740B (zh) * 2019-12-03 2021-03-05 中国航空工业集团公司洛阳电光设备研究所 一种实现任意比例缩放的vesa时序实时转换方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6710784B1 (en) * 1999-12-21 2004-03-23 Intel Corporation Method and apparatus for performing a vertical scale filter function in a graphics device using a single line buffer
CN2607623Y (zh) * 2003-03-07 2004-03-24 海信集团有限公司 显示器的数字图像缩放集成电路
CN1208826C (zh) * 2003-01-01 2005-06-29 海信集团有限公司 数字图像缩放集成电路的设计方法
CN201075280Y (zh) * 2007-08-03 2008-06-18 深圳艾科创新微电子有限公司 一种显示器数字图像实时缩放集成电路

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6710784B1 (en) * 1999-12-21 2004-03-23 Intel Corporation Method and apparatus for performing a vertical scale filter function in a graphics device using a single line buffer
CN1208826C (zh) * 2003-01-01 2005-06-29 海信集团有限公司 数字图像缩放集成电路的设计方法
CN2607623Y (zh) * 2003-03-07 2004-03-24 海信集团有限公司 显示器的数字图像缩放集成电路
CN201075280Y (zh) * 2007-08-03 2008-06-18 深圳艾科创新微电子有限公司 一种显示器数字图像实时缩放集成电路

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770342A (zh) * 2020-06-19 2020-10-13 艾索信息股份有限公司 一种视频无级缩放方法
CN111770342B (zh) * 2020-06-19 2023-09-05 艾索信息股份有限公司 一种视频无级缩放方法
CN114092336A (zh) * 2022-01-19 2022-02-25 深圳鲲云信息科技有限公司 基于双线性插值算法的图像缩放方法、装置、设备及介质

Also Published As

Publication number Publication date
CN101789234A (zh) 2010-07-28

Similar Documents

Publication Publication Date Title
WO2010083711A1 (zh) 数字图像缩放处理方法及集成系统
KR100303723B1 (ko) 이미지업스케일방법및장치
JP5178961B2 (ja) 画像合成装置
US20100165014A1 (en) Display system having resolution conversion
US8102399B2 (en) Method and device for processing image data stored in a frame buffer
CN201075280Y (zh) 一种显示器数字图像实时缩放集成电路
CN105427235A (zh) 一种图像浏览方法及系统
TWI246326B (en) Image processing circuit of digital TV
CN101867808A (zh) 存取图像数据的方法及其相关装置
JP2009098692A (ja) 画像のサイズ変更方法、サイズ変更器、画像処理装置および電子機器
JP3002352B2 (ja) 画像表示システム
KR102247741B1 (ko) 이미지 프로세서, 상기 이미지 프로세서의 동작 방법, 및 상기 이미지 프로세서를 포함하는 애플리케이션 프로세서
CN101640773A (zh) 子画面视频信号的缩放方法、装置及具有该装置的电视机
CN114339045B (zh) 图像处理系统和显示装置
CN104915923A (zh) 不同分辨率图像自适应缩放方法
JP2001128061A (ja) 映像サイズ変換処理方法および映像サイズ変換処理装置
KR100419271B1 (ko) 메모리 혼재 화상 처리용 lsi, 이것을 포함하는 화상처리 장치 및 이것을 이용하는 화상 액세스 방법
WO2023077638A1 (zh) 伽马曲线顶点获取方法、设备及可读存储介质
US20050162438A1 (en) System including address generator and address generator
JP4784954B2 (ja) データ転送機構
JPH10341415A (ja) 画像処理装置
JPH11288257A (ja) 圧縮表示方法及びその装置
KR100677200B1 (ko) 디지털티브이의 메모리 어드레스 발생장치
JP2000270207A (ja) 画像処理装置及びこれを用いたディスプレイ装置
CN102547177B (zh) 运用于显示器的画面放大控制装置

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: 09838678

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: 09838678

Country of ref document: EP

Kind code of ref document: A1