efficient interpolation

By using nonlinear interpolation units and a predetermined set of weights in a graphics processing system, the calculation process of cubic interpolation is simplified, solving the implementation problem of traditional interpolation methods on resource-limited devices and achieving efficient and smooth interpolation results.

CN113205455BActive Publication Date: 2025-12-09IMAGINATION TECH LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110468441.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2014-08-27
Filing Date
2015-08-26
Publication Date
2025-12-09
Estimated Expiration
2035-08-26

AI Technical Summary

Technical Problem

In existing graphics processing systems, cubic interpolation methods are computationally complex and resource-intensive, making them difficult to implement effectively on devices with limited processing capabilities, such as smartphones and tablets. Furthermore, traditional interpolation methods suffer from discontinuous derivatives at data point boundaries, resulting in unsmooth interpolation.

Method used

A nonlinear interpolation unit is used, which utilizes a predetermined set of weights and multiple data points to approximate the cubic interpolation result through a simplified weighted summation operation. Combined with a linear interpolation unit, the calculation process is simplified and the hardware requirements are reduced.

Benefits of technology

Achieving smooth interpolation similar to cubic interpolation on devices with limited processing resources reduces computational complexity and resource consumption while maintaining high interpolation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113205455B_ABST
    Figure CN113205455B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a nonlinear interpolation unit. The interpolation logic described herein provides a good approximation of bicubic interpolation without performing all of the computations normally required for bicubic interpolation, which is generally smoother than bilinear interpolation. This allows the approximation of the smooth bicubic interpolation to be performed on devices with limited processing resources, such as mobile devices. At each position in a set of predetermined interpolation positions within an array of data points, a set of predetermined weights represents a bicubic interpolation that can be applied to the data points. For a plurality of predetermined interpolation positions surrounding a sample position, the corresponding set of predetermined weights and the data points are used to determine a plurality of surrounding interpolated values that represent the results of performing bicubic interpolation at the surrounding predetermined interpolation positions. Then, a linear interpolation is performed on the surrounding interpolated values to determine an interpolated value at the sample position.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with the Chinese application number 201510530856.4, the application date 26 August 2015, the priority of GB1415144.3, the priority date 27 August 2014, and the invention name "Efficient interpolation". BACKGROUND

[0002] There are many situations in which it can be useful to perform interpolation on an array of data points to determine an interpolated value at a sample location within the array. In general, the array of data points can be an n-dimensional array, where n > 1. For example, in a graphics processing system, a two-dimensional (2D) array of texels can be stored to describe a texture, and when the texture is to be applied at a pixel location of an image, the pixel location can not correspond exactly to the location of a texel in the texture, so it is desirable to obtain an interpolated value of the texture at the pixel location (i.e. at a sample location). As another example, a 2D array of pixels can represent an image, and if the image is to be scaled, the new pixel locations can not correspond exactly to the locations of the original pixels in the image, so it is desirable to obtain an interpolated value at the new pixel locations (i.e. at sample locations).

[0003] Figure 1 An example of a portion of a 2D array 100 of data points 102 is shown. Figure 1 A 4x4 set of data points 102 of the array 100 is shown, and as an example, two parameters (U and V) describe a sample location 106 within a region 104 for which interpolation can be performed.

[0004] Interpolation can be performed in many different ways. Piecewise linear interpolation is an example of a 1D interpolation method that is easy to implement. An example of linear interpolation is shown in Figure 2a In Figure 2a an interpolated value at a sample location between two data points A and B can be determined. A straight line 202 between the data points A and B shows the interpolated value at a sample location between the data points A and B. The sample location is given by a parameter u, where 0 < u < 1, so that the interpolated value I u is given by a weighted sum: I u = (1 - u)A + uB.

[0005] Bilinear interpolation is an example of a 2D interpolation method that extends the concept of linear interpolation to two dimensions. An example of bilinear interpolation is shown in Figure 2b In Figure 2bIn the center, an interpolated value at a sample location 208 within the square of four surrounding data points 2041, 2042, 2043, and 2044 can be determined. The sample location 208 is given by two parameters (U and V). When faced with multi-dimensional interpolation, one approach is to reduce the dimensionality of the problem, for example by performing a separate ID interpolation on each row, and then performing ID interpolation on those results. For example, the parameter U can be used to perform a linear interpolation between data points 2041 and 2042 to determine an intermediate interpolated value 2061. Similarly, the parameter U can be used to perform a linear interpolation between data points 2043 and 2044 to determine an intermediate interpolated value 2062. The parameter V can then be used to perform a linear interpolation between intermediate interpolated values 2061 and 2062 to determine the interpolated value 208 at the sample location given by (U, V). The trilinear interpolation described in this bilinear interpolation method can be performed in the same manner as the linear interpolation described above with reference to FIG. 2B. An example of reducing the dimensionality of a multi-dimensional filtering problem is described in the 1988 SIGGRAPH paper by Mitchell and Netravali, "Reconstruction Filters in Computer Graphics," which explains that image reconstruction occurs in two dimensions and involves a convolution of a 2D lattice of samples with a filter k(x, y). Separable filters are considered, where the convolution of a sample with the dot product k(x)k(y) is considered. The Mitchell and Netravali paper describes that separable filters are more computationally efficient than non-separable filters because the filtering operations can be performed in vertically and horizontally separated channels. Figure 2a The trilinear interpolation described in this bilinear interpolation method can be performed in the same manner as the linear interpolation described above with reference to FIG. 2B. An example of reducing the dimensionality of a multi-dimensional filtering problem is described in the 1988 SIGGRAPH paper by Mitchell and Netravali, "Reconstruction Filters in Computer Graphics," which explains that image reconstruction occurs in two dimensions and involves a convolution of a 2D lattice of samples with a filter k(x, y). Separable filters are considered, where the convolution of a sample with the dot product k(x)k(y) is considered. The Mitchell and Netravali paper describes that separable filters are more computationally efficient than non-separable filters because the filtering operations can be performed in vertically and horizontally separated channels.

[0006] Bilinear interpolation can be implemented in hardware in a simple manner, for example using some multiply and add (MAD) logic. In addition, bilinear interpolation is a fast process that does not consume a lot of power. Thus, bilinear interpolation can generally be a suitable choice of interpolation to implement in computer systems with particularly limited processing power, such as mobile devices such as smartphones, tablet computers, and laptop computers.

[0007] However, linear and bilinear interpolation may not provide smooth interpolations. Specifically, while linear and bilinear interpolation methods will provide continuous interpolations, the first derivative (and higher derivatives) of the interpolation values ​​are often discontinuous at the data point boundaries. Higher-order polynomial interpolation, such as quadratic, cubic, quartic, and other polynomial interpolation methods and their multidimensional variants, provides smoother interpolations than their corresponding linear and bilinear interpolation methods. Cubic interpolation is of particular interest because it is the simplest polynomial capable of interpolating through control points (i.e., across control points) and where the first derivative of the interpolation value is continuous at the data point boundaries. Cubic interpolation methods (including multidimensional cubic interpolation methods such as bicubic interpolation) match the interpolation value to its first derivative at the data point boundaries. However, cubic interpolation methods are more complex to implement than linear interpolation methods (including their corresponding multidimensional linear interpolation methods such as bilinear interpolation). Some of the reasons for this are that cubic interpolation uses more than twice the number of data points per dimension of the array compared to linear interpolation (and therefore bicubic interpolation requires four times more data points than bilinear interpolation), and cubic interpolation involves computing a cubic polynomial for each sampling location within the array. Therefore, as an example, bicubic interpolation can be chosen over bilinear interpolation when computational speed is not an issue. Those skilled in the art will recognize that many types of control-point-based cubic curves exist, including Bezier, Hermite, and B-splines, and although each can be mapped to each other by taking a linear combination of control / sampling points (e.g., see Foley, van Dam, et al., "Computer Graphics Principles and Practice," 2nd edition, pp. 510-511) and are generally equivalent, one of particular interest is the Catmull-Rom spline. This spline has the useful property that if the sampling location lies precisely on the data point (e.g., if U = 0 or U = 1), the interpolation value equals the value of the data point. Furthermore, as described below, when neighboring curves share three sample points, the curve is also C1 continuous, that is, the first derivative of the curve is continuous.

[0008] An example of 1D cubic interpolation is in Figure 3a As shown in, Figure 3a In this context, four data points (A to D) are used to determine the interpolation value (I) at the sampling location between the two center data points B and C. u Line 302 shows the interpolation, and it can be seen that line 302 passes through data point B&C, and the gradient of line 302 (i.e., the first derivative of line 302) intersects with the adjacent piecewise line segment 302 at the curve boundary. AB and 302 CDContinuous. The sampling location is given by the parameter u for the region, where 0 ≤ u ≤ 1. As described above, the interpolation I can be found from a cubic polynomial with the parameter u and four data points (A to D) as input. u .

[0009] Bicubic interpolation is an example of a 2D interpolation method that extends the concept of cubic interpolation to two dimensions. Examples of bicubic interpolation are found in... Figure 3b As shown in, Figure 3b In the middle, data point 304 can be used. 11 Up to 304 44 The value is used to determine the value at data point 304. 22 304 23 304 32 and 304 33 The interpolated value at sampling position 308 within a 2x2 square. Sampling position 308 is given by two parameters (U and V). In this example, parameter U is used for each of the four rows of data points (e.g., for data point 304 in row x). x1 Up to 304 x4 Perform three interpolations individually to determine their respective intermediate interpolation values ​​306. x In this way, the dimensionality of the interpolation calculation has been reduced. Then, it is possible to use parameter V to perform cubic interpolation over four intermediate interpolation values ​​3061 to 3064 to determine the interpolation value 308 at the sampling position given by (U,V). This can be achieved with reference to the above. Figure 3a The cubic interpolation described herein is performed in the same manner as the five cubic interpolations described in this bicubic interpolation method. Summary of the Invention

[0010] This summary is provided to introduce, in a simplified form, the selection of concepts that will be further described below in the detailed embodiments. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter.

[0011] According to a first aspect of this disclosure, a nonlinear interpolation unit is provided, configured to determine, for a plurality of predetermined interpolation locations around a sampling location within a data point array, a plurality of peripheral interpolations representing the result of performing nonlinear interpolation at the predetermined peripheral interpolation locations.

[0012] According to a second aspect of this disclosure, an interpolation apparatus is provided, including a nonlinear interpolation unit according to a first aspect of this disclosure; and a linear interpolation unit configured to perform linear interpolation on the plurality of surrounding interpolations to determine an interpolation value at the sampling location.

[0013] According to a third aspect of the disclosure, there is provided an interpolation method implemented by an interpolation device, comprising: determining, by at least one logic module, for a plurality of predetermined interpolation locations around a sample location within an array of data points, a plurality of surrounding interpolations representing results of performing a non-linear interpolation at the surrounding predetermined interpolation locations, using a corresponding set of predetermined weights and a plurality of the data points.

[0014] According to a fourth aspect of the disclosure, there is provided a non-transitory computer readable storage medium having stored thereon a computer readable description of a non-linear interpolation unit, the computer readable description, when processed, configures a system for generating the non-linear interpolation unit, wherein the non-linear interpolation unit is configured to determine, for a plurality of predetermined interpolation locations around a sample location within an array of data points, a plurality of surrounding interpolations representing results of performing a non-linear interpolation at the surrounding predetermined interpolation locations, using a corresponding set of predetermined weights and a plurality of the data points.

[0015] As will be apparent to those skilled in the art, the above features can be combined where appropriate, and with any of the aspects of the examples described herein. BRIEF DESCRIPTION OF DRAWINGS

[0016] Examples will now be described in detail with reference to the accompanying drawings, in which:

[0017] Figure 1 A 4x4 set of data points of an array and a sample location within the array are shown;

[0018] Figure 2a An example of linear interpolation is shown;

[0019] Figure 2b An example of bilinear interpolation is shown;

[0020] Figure 3a An example of cubic interpolation is shown;

[0021] Figure 3b An example of bicubic interpolation is shown;

[0022] Figure 4a A set of predetermined interpolation locations for a cubic interpolation method according to examples described herein is shown;

[0023] Figure 4b A set of predetermined interpolation locations for a bicubic interpolation method according to examples described herein is shown;

[0024] Figure 5 A schematic diagram of interpolation logic is shown;

[0025] Figure 6is a flowchart of a method of determining interpolated values at sample locations within an array of data points;

[0026] Figure 7 is a schematic diagram of a bicubic interpolation unit;

[0027] Figure 8 is a schematic diagram of a row computation unit;

[0028] Figure 9 is a schematic diagram of a column computation unit; and

[0029] Figure 10 is a schematic diagram of a computer system in which interpolation logic is implemented.

[0030] The accompanying drawings illustrate various embodiments. One skilled in the art will recognize that the boundaries between elements in the drawings are representative of one example of boundaries. In some examples, one element can be designed as multiple elements or multiple elements can be designed as one element. Where appropriate, common reference numerals have been used throughout the drawings and the specification to refer to like elements. DETAILED DESCRIPTION

[0031] Embodiments will now be described by way of example only.

[0032] In examples herein, interpolation logic is described which provides interpolated values which are very similar to the interpolated values provided by full cubic (or bicubic) interpolation, but which is less complex to implement, for example using fewer processing resources and / or running faster. This allows interpolation providing similar results to cubic (or bicubic) interpolation to be performed on computer systems with even limited processing resources, such as mobile devices, for example smartphones, tablet computers or laptop computers, which would normally not be able to perform full cubic (bicubic) interpolation. The technique can be used for interpolation functions other than cubic interpolation functions, for example for non-polynomial interpolation, for example Mitchell-Netravali interpolation or arbitrary smooth interpolation.

[0033] In particular, for a set of predetermined interpolation positions within the array of data points, a set of predetermined weights represents a cubic interpolation that can be applied to a plurality of the data points within the array. That is, a set of weights is predetermined that can be used, for example, to perform a weighted sum of some of the data points to determine an interpolated value at a particular interpolation position in the array. When an interpolated value at a sample position is desired, interpolated values at a plurality of predetermined interpolation positions surrounding the sample position can be determined, and those surrounding interpolated values can then be passed to a linear interpolation unit. Linear interpolation of the surrounding interpolated values provides an interpolated value at the sample position that is approximately equal to the interpolated value that would be provided by a full cubic interpolation. The principle of determining surrounding interpolated values at predetermined interpolation positions surrounding the sample position and then performing linear interpolation on the surrounding interpolated values can be implemented in different ways in different examples, some of which are described below. If the sample position at which an interpolated value is desired falls on one of the predetermined interpolation positions, in some examples the predetermined weight for that interpolation position can be used to determine the interpolated value; however, in other examples, four interpolated values are still passed to the linear interpolation unit for determining the interpolated value at the sample position, as it can be less costly to pass four interpolated values to the linear interpolation unit than to handle this case as a special case.

[0034] An example of an approximation to a 1D cubic interpolation is shown in Figure 4a where four data points (A to D) are used to determine an interpolated value at a sample position given by the parameter u, between two central data points B and C. Line 402 shows the result of a full cubic interpolation of the four data points. In this example, the cubic interpolation is a Catmull-Rom spline, but in other examples other cubic interpolation methods can be used, such as Bezier curves or uniform B-splines. It can be seen (for the Catmull-Rom spline) that line 402 passes through data points C & B and the gradient (i.e. the first derivative) of line 402 is continuous with adjacent segment line 402 AB and 402 CD at the curve boundaries. A set of interpolation positions (4030 to 4038) is shown in Figure 4aThe interpolation positions 403 divide the area between data points B and C into eight segments. In other examples, there can be a different number of interpolation positions dividing the area between adjacent data points of the array into N segments, where N > 2. At each of the interpolation positions 403, a predetermined set of weights is stored which can be applied to the data points A, B, C and D for performing a weighted sum for determining an interpolated value representing the result of performing a cubic interpolation at the interpolation position. For a Catmull-Rom spline, it can be readily seen that for interpolation position 4030, the weights for data points A, C and D will be zero and the weight for data point B will be one, so that if the sampling position falls exactly on data point B, the value of data point B is returned (but it should be noted that this can not apply for other interpolation (cubic or other) functions). Similarly, it can be readily seen that for interpolation position 4038, the weights for data points A, B and D will be zero and the weight for data point C will be one, so that if the sampling position falls exactly on data point C, the value of data point C is returned. The weights for the other predetermined interpolation positions (4031 to 4037) are more significant and will depend on the particular interpolation represented (e.g. Catmull-Rom interpolation or some other interpolation such as uniform B-spline). Examples of the weights for the other predetermined interpolation positions (4031 to 4037) are given in the example described below with respect to Catmull-Rom spline, but as will be apparent to those skilled in the art, different weights can be used for other interpolation schemes (e.g. uniform B-spline).

[0035] The sampling position given by the parameter u is shown in Figure 4a which is different from any of the predetermined interpolation positions 403. In this case, the interpolated values at two of the predetermined interpolation positions 4033 and 4034 surrounding the sampling position are determined. The surrounding interpolation positions 4033 and 4034 are the two of the predetermined interpolation positions 403 that are closest to the sampling position. The surrounding interpolated values at interpolation positions 4033 and 4034 are passed to a linear interpolation unit which then performs a linear interpolation using the surrounding interpolated values (e.g. using the linear interpolation principle illustrated in Figure 2a to determine the interpolated value at the sampling position u.

[0036] Predefined weights are used to determine the interpolation value at a predetermined interpolation position 403 by performing a weighted summation of data points A, B, C, and D. This does not involve any cubic polynomial calculations and allows for a very simple way to determine the interpolation value at the predetermined interpolation positions, such as involving only MAD (multiplication and addition) operations that are very simple and fast to implement in hardware. Increasing the number of predetermined interpolation positions will increase the accuracy of the final interpolation, but will require storing a larger number of weights and a larger number of bits defining the sampling positions to identify which predetermined interpolation positions are closest to the sampling position. Figure 4a As shown, using nine predetermined interpolation locations 403 (i.e., the region between data points B and C is thus divided into eight segments) appears to provide a good trade-off between the accuracy of the interpolation and the amount of data stored for predetermined weights and the number of bits used to define the sampling locations of the parameter u. However, in other examples, different numbers of predetermined interpolation locations can be used. As the number of subdivisions in piecewise linear interpolation increases, the error of piecewise linear interpolation decreases rapidly.

[0037] Figure 4a A 1D example is shown, where interpolation is performed on a 1D array of data points, and there are two surrounding interpolation positions (4033 and 4034). More generally, the principle can be extended to examples where interpolation is performed on an n-dimensional array of data points (where n ≥ 1), and in that case, the surrounding interpolation positions are the two closest sampling positions among the predetermined interpolation positions. n A predetermined interpolation position.

[0038] For example, Figure 4b This example illustrates where interpolation is performed on a 2D array of data points. In this example, the interpolation is to be determined at data point 404. 11 To 404 44 The interpolated value at sampling position 408 within a 4x4 square. In other examples, data points with different arrangements (i.e., non-4x4) can be used to determine the interpolated value at the sampling position. Sampling position 408 is given by two parameters (U and V), which are constrained to data point 404. 22 404 23 404 32 and 404 33 The location within sampling position 408 in the central region between. In this example, four predetermined interpolation positions 404 are determined around sampling position 408. 11 404 12 404 21 and 404 22 Interpolation values ​​at each of the four rows of data points. To achieve this, interpolation is performed separately for each of the four rows of data points (e.g., for data point 404 in row x). x1 To 404x4 (in accordance with the above references) Figure 4a The described similar method is used to determine (given by parameter U and in) Figure 4b The interpolation values ​​are determined at two predetermined interpolation positions among predetermined interpolation positions on either side of the row component of the sampling position (indicated by reference numeral 4061) in the first row. In this way, for each row, a first intermediate interpolation value 410 and a second intermediate interpolation value 412 are determined. Figure 4b In the example shown, the first intermediate interpolation value 410 is to the left of the U component at sampling position 406, and the second intermediate interpolation value 412 is to the right of the U component at sampling position 406. The first and second intermediate interpolation values ​​for a row are the two predetermined interpolation values ​​that are closest to sampling position 406 among the predetermined interpolation values ​​for that row.

[0039] Then, the first intermediate interpolation from the four rows (4101, 4102, 4103, and 4104) is used, and the above reference is applied. Figure 4a A similar method as described is used to determine (given by parameter V and in) Figure 4b The predetermined interpolation position 414 on either side of the column component of the sampling position (indicated by reference numeral 4161). 11 and 414 21 Two surrounding interpolation values ​​are used at the specified positions. Similarly, a second intermediate interpolation value from the four rows (4121, 4122, 4123, and 4124) is used, and the above reference is applied. Figure 4a A similar method as described is used to determine (given by parameter V and in) Figure 4b The predetermined interpolation position 414 on either side of the column component of the sampling position (as indicated by reference numeral 4162). 12 and 414 22 The two surrounding interpolated values ​​at that point. Therefore, compared with the above reference... Figure 4a The described 1D method for generating interpolation pairs at adjacent predetermined positions is executed six times to determine the interpolation positions 414 around. 11 414 12 414 21 and 414 22 The four surrounding interpolated values ​​at the location.

[0040] Interpolation position 414 11 414 12 414 21 and 414 22 The surrounding interpolation value at the specified location is passed to a bilinear interpolation unit, which then uses the surrounding interpolation value (e.g., using the value at the specified location) to perform interpolation. Figure 2bbilinear interpolation unit 506 to perform bilinear interpolation on the surrounding interpolated values to determine the interpolated value at the sample location. In this way, the dual cubic interpolation is approximated by six weighted sums (which are easily implemented in MAD logic in hardware given the predetermined weights) and bilinear interpolation (which is also easily implemented in MAD logic in hardware). It should be noted that bilinear interpolation units are likely to be included in graphics processing units (GPUs) for other purposes, so the bilinear interpolation unit does not typically need to be added separately for implementing the dual cubic interpolation according to examples described herein. Thus, the hardware cost of implementing the dual cubic interpolation according to examples described herein is low. Additionally, it should be noted that bilinear interpolation is performed at arbitrary locations more than the determination of surrounding interpolated values, using predetermined weights to determine the surrounding interpolated values at predetermined surrounding interpolated locations 414 11 , 414 12 , 414 21 and 414 22 .

[0041] Figure 5 An example of interpolation logic 502 configured to determine an interpolated value at a sample location within an array of 2D data points according to examples described herein is shown. The interpolation logic 502 comprises a dual cubic interpolation unit 504 and a bilinear interpolation unit 506. In preferred examples, the dual cubic interpolation unit 504 and the bilinear interpolation unit 506 are implemented in dedicated hardware, as described in more detail below, but in other examples these units 504 and 506 can be implemented in general purpose hardware configured by software running on a processing unit, such as a central processing unit (CPU) or a graphics processing unit (GPU). The dual cubic interpolation unit 504 is arranged to receive an array of data points and parameters (U and V) defining a sample location within the array at which an interpolated value is to be determined. The dual cubic interpolation unit 504 is configured to determine a plurality of interpolated values at specific predetermined interpolated locations surrounding the sample location using predetermined weights and the data points, and to provide those surrounding interpolated values to the bilinear interpolation unit 506. The dual cubic interpolation unit 504 also sends the bilinear U and V parameters to the bilinear interpolation unit 506 to describe the location of the sample location within the surrounding interpolated values. The bilinear interpolation unit 506 is configured to perform bilinear interpolation on the surrounding interpolated values using the bilinear U and V parameters to determine the interpolated value at the sample location. It is common for a computing system to include a bilinear interpolation unit for purposes other than approximating cubic interpolation according to the methods described herein. The methods described herein use the bilinear interpolation unit for approximating cubic interpolation, so the additional hardware required to go from a computing system that is capable of performing bilinear interpolation to also being capable of approximating dual cubic interpolation is very small compared to implementing a separate full dual cubic interpolation unit.

[0042] With reference toFigure 6 The method of determining an interpolated value at a sample position in a 2D array (e.g. at position 408) is described in more detail with reference to the flowchart shown in Figure 4b

[0043] At step S602, the array data points 404 and the parameters U and V are received at the interpolation logic 502. With reference to Figure 4b , the U and V parameters describe the position of the sample position 408 within the region between the four data points 404 22 , 404 23 , 404 32 and 404 33 The interpolation logic 502 operates to determine an interpolated value for the sample position 408, as described below.

[0044] Figure 7 A more detailed view of the bicubic interpolation unit 504 is shown. The bicubic interpolation unit 504 comprises a row calculation unit 702 (which can be referred to as an "A calculation unit"), two column calculation units 7041 and 7042 (which can be referred to as "B calculation units"), a U remapping unit 706, a V remapping unit 708 and a row number unit 710. The U remapping unit 706 is arranged to receive the U parameter and to provide a remapped version of the U parameter to the row calculation unit 702, as described in more detail below. The row calculation unit 702 is also arranged to receive a row of four data points (A, B, C and D). The row calculation unit 702 is arranged to provide two intermediate interpolated values 410 and 412 to the respective column calculation units 7041 and 7042. The V remapping unit 708 is arranged to receive the V parameter and to provide a remapped version of the V parameter to the two of the column calculation units 704, as described in more detail below. The row number unit 710 is arranged to provide an indication of the current row number to the two of the column calculation units 704, as described in more detail below. The column calculation units output surrounding interpolated values 414 11 , 414 12 , 414 21 and 414 22 from the bicubic calculation unit 504, which can be provided to the bilinear calculation unit 506.

[0045] At step S604, for each row of data points (A to D), e.g. for the data points 404 Figure 4b , 404 11 , 404 12 , 404 13 and 404 14 ​The row calculation unit 702 determines a first intermediate interpolation 410 and a second intermediate interpolation 412 around the row component of the sampling position given by the remapping U parameters provided from the U remapping unit 706.

[0046] Figure 8 A more detailed view of the line calculation unit 702 is shown. The line calculation unit 702 includes a splitting unit 802, a first multiplexer 804, a P-mixing unit 806, a Q-mixing unit 808, and a second multiplexer 810.

[0047] The U-remapping unit 706 provides multiple bits to the splitting unit 802 based on the bits of the U-parameters. For example, the U-parameters describing the row component of the sampling position may include k bits, {u0, u1…u...} k-1}, where, as an example, k can be eleven. The number of bits used for the U parameter determines the resolution that can limit the sampling location. The U-remapping unit 706 receives the k-bit U parameter and splits the U parameter into the first m bits used in the row calculation unit 702 and the remaining (km) bits provided from the U-remapping unit 706 to indicate the bilinear U parameter. The bilinear interpolation unit 506 uses the bilinear U parameter to perform bilinear interpolation on the four surrounding interpolations output from the bicubic interpolation unit 504. As an example, m can be three, and the remaining three bits of the U parameter identify which octet of the entire region between the two data points B and C the sampling location is located in. Figure 4a In the example shown, the row component of the sampling position is between positions 4033 and 4034, therefore the first three bits of the sampling position will be 011. The U-remapping unit 706 determines four control signals for the operation of the row calculation unit 702: “Rev”, “PSelect”, “QSelect”, and “PQSwap”, and these four control signals are passed to the splitting unit 802. The splitting unit 802 passes the “Rev” signal to the multiplexer 804, the “PSelect” signal to the P-mixing unit 806, the “QSelect” signal to the Q-mixing unit 808, and the “PQSwap” signal to the multiplexer 810. As described in more detail below, most of the interpolation functions are symmetric so that when the control signals ABCD are swapped to DCBA, the resulting curve is reflected near u = 0.5. Additionally, it should be noted that for any given sampling position u, the surrounding predetermined sampling positions in one dimension will be an even number and an odd number of adjacent sampling positions. Therefore, even-numbered sampling positions and odd-numbered sampling positions can be divided into two different sets and treated separately in, for example, P-mixing unit 806 and Q-mixing unit 808.

[0048] In the example where m = 3, the Rev, QSelect, and PQSwap signals each have one bit and PSelect has two bits. In this example, the U remap unit 706 sets the "Rev" signal to equal the first bit of the U parameter, u0. The U remap unit 706 sets the "PQSwap" signal to equal the third bit of the U parameter, u2. If the first m bits of the U parameter are 000 or 111 (i.e., if the row component of the sample location is in the first or last of the eight segments of the region between data points B and C), then the U remap unit 706 sets PSelect to 00 and QSelect to 0; if the first m bits of the U parameter are 001 or 110 (i.e., if the row component of the sample location is in the second or seventh of the eight segments of the region between data points B and C), then the U remap unit 706 sets PSelect to 10 and QSelect to 0; if the first m bits of the U parameter are 010 or 101 (i.e., if the row component of the sample location is in the third or sixth of the eight segments of the region between data points B and C), then the U remap unit 706 sets PSelect to 10 and QSelect to 1; and if the first m bits of the U parameter are 011 or 100 (i.e., if the row component of the sample location is in the fourth or fifth of the eight segments of the region between data points B and C), then the U remap unit 706 sets PSelect to 11 and QSelect to 1.

[0049] The Rev signal (which equals the first bit of the U parameter) identifies whether the row component of the sample location is within the first half (when u0 = 0) or the second half (when u0 = 1) of the region between the two data points B and C. For example, the interpolation represented by line 402 in Figure 4a is a symmetric function. Thus, if the sample location is in the second half of the region between B and C (i.e., if the sample location is closer to data point C than to data point B), then the inputs A, B, C, and D can be reversed by the multiplexer 804. If the inputs are to be swapped, then inputs A and D are swapped and inputs B and C are swapped. From the multiplexer output of A', B', C', and D' as shown in Figure 8 the data points that can be reversed. This reduces the number of different locations at which an interpolation value can need to be determined, thereby simplifying the hardware of the P blending unit 806 and the Q blending unit 808.

[0050] Both P-mixing unit 806 and Q-mixing unit 808 receive all four data points (A', B', C', and D') from the data points output from multiplexer 804 and perform a weighted summation of the data points to determine, for example, the intermediate interpolation value on either side of the line component at the sampling position (e.g., 4061). Figure 4b (4101 and 4121 shown). P-mixing unit 806 is configured to determine the interpolation value at an even-numbered position of interpolation position 403. For example, P-mixing unit 806 is configured to determine the interpolation value at one of the interpolation positions 4030, 4032, or 4034 based on the PSelect signal received from splitting unit 802. In the example described above, the first three bits of the U parameter are 011, so PSelect = 11 and P-mixing unit 806 determines the interpolation value at interpolation position 4121, which is the halfway point between data points B and C (corresponding to...). Figure 4a The position shown is 4034. If PSelect = 10 (which occurs when the first m bits of the U parameter are 001 or 010), then the closest even-numbered interpolation position will be position 4032, which is 1 / 4 of the distance from data point B to data point C. If PSelect = 00 (which occurs when the first m bits of the U parameter are 000), then the closest even-numbered interpolation position will be position 4030, which takes the value of data point B.

[0051] Similarly, Q-mixing unit 808 is configured to determine the interpolation value at odd-numbered positions of interpolation position 403. For example, Q-mixing unit 808 is configured to determine the interpolation value at one of interpolation positions 4031 and 4033 based on the QSelect signal received from splitting unit 802. In the example described above, the first three bits of the U parameter are 011, therefore QSelect = 1, and Q-mixing unit 808 determines the interpolation value at interpolation position 4101, which is 3 / 8 of the path from data point B to C (corresponding to...). Figure 4a The position shown is 4033. If QSelect = 0 (which occurs when the first m bits of the U parameter are 000 or 001), the closest interpolation position among the odd interpolation positions will be position 4031, which is 1 / 8 of the distance from data point B to data point C.

[0052] To perform a total cubic interpolation between points B and C, numerous cubic operations would be required. However, in the example described herein, only the interpolation value at predetermined interpolation positions is determined. For example, the interpolation value at each interpolation position 403 can be determined by performing a weighted sum according to the following formula:

[0053] w A (u)A′+w B (u)B′+w C (u)C′+w D (u)D′ (1)

[0054] where A', B', C' and D' are the four data points of the row and w A , w B , w C and W D are their corresponding weights, which are functions of the parameter u, where the values of the weights are predetermined for values of the parameter u corresponding to the nine interpolation positions 4030 to 4038 shown in Fig. 4.

[0055] Table 1 below shows the values of the weights that can be applied to accurately represent the Catmull-Rom interpolation at the nine interpolation positions 4030 to 4038 shown in Fig. 4. Figure 4a

[0056] U w A ]]> w B ]]> w C ]]> w D ]]> 0 0 1 0 0 1 / 8 -49 / 1024 987 / 1024 93 / 1024 -7 / 1024 2 / 8 -9 / 128 111 / 128 29 / 128 -3 / 128 3 / 8 -7 / 1024 745 / 1024 399 / 1024 -45 / 1024 4 / 8 -1 / 16 9 / 16 9 / 16 -1 / 16 5 / 8 -45 / 1024 399 / 1024 745 / 1024 -7 / 1024 6 / 8 -3 / 128 29 / 128 111 / 128 -9 / 128 7 / 8 -7 / 1024 93 / 1024 987 / 1024 -49 / 1024 8 / 8 0 0 1 0

[0057] Table 1 - Weights for representing Catmull-Rom interpolation

[0058] Although the weights given in Table 1 can be used for the P blending unit 806 and the Q blending unit 808, in the preferred embodiment the weights are set so that they are not perfect representations of the Catmull-Rom interpolation, in order to simplify the hardware of the P blending unit 806 and the Q blending unit 808. Performing a multiplication by a predetermined constant is generally cheaper than an arbitrary multiplication operation, and with careful analysis of the constant, the multiplier unit can combine the constant and provide a cheaper unit than a general multiplier unit (in terms of the amount of hardware required to implement the multiplier unit and in terms of the speed at which the multiplication operation is performed). For example, the weights are adjusted slightly from those given in Table 1 so that the weighted sum given by equation 1 is easier to implement in hardware (for example using multiply and add (MAD) logic). For example, Table 2 shows simplified weights that can be used instead of those given in Table 1. The difference between the weights shown in Table 1 and Table 2 is small and is unlikely to result in any perceptual distortion of the final interpolated value, but will significantly simplify the hardware used to perform the weighted sum, allowing the interpolation to be performed faster and with less power consumption.

[0059] U w A ]]> w B ]]> w C ]]> w D ]]> 0 0 1 0 0 1 / 8 -12 / 256 247 / 256 23 / 256 -2 / 256 2 / 8 -2 / 32 28 / 32 7 / 32 -1 / 32 3 / 8 -18 / 256 186 / 256 100 / 256 -12 / 256 4 / 8 -2 / 32 18 / 32 18 / 32 -2 / 32 5 / 8 -12 / 256 100 / 256 186 / 256 -18 / 256 6 / 8 -1 / 32 7 / 32 28 / 32 -2 / 32 7 / 8 -2 / 256 23 / 256 247 / 256 -12 / 256 8 / 8 0 0 1 0

[0060] Table 2 - Simplified weights for representing Catmull-Rom interpolation

[0061] ​It can be seen that the even evaluation positions now all use the same denominator (32, which can be implemented as a binary shift by five binary digits), as is done for the odd positions (256, which can be implemented as a binary shift by eight binary digits), which benefits from a reduction in hardware cost. In addition, it can be seen that for each of the predetermined interpolation positions, the predetermined weights w A , w B , w C and sum to one, so that the result of the weighted sum is properly normalized. It can also be seen that the predetermined weights are symmetric, so that w A (u)≡w D (1-u) and w B (u)≡w C (1-u). This symmetry allows the multiplexer 804 to be used to swap the order of the data points as described above, where appropriate, to thereby reduce the amount of hardware included in the P blending unit 806 and the Q blending unit 808.

[0062] The output of the P blending unit 806 and the Q blending unit 808 for the current row is the mid-interpolant 410 and 412 between any one side of the row component at the sample position, e.g. the mid-interpolant between the interpolant positions 4101 and 4121 on either side of the position 4061 for the first row, shown in Figure 4b . The multiplexer 810 optionally reverses the order of the mid-values 410 and 412 according to the PQSwap signal (which is equal to the third bit of the U parameter, u2). In this way, the mid-interpolant 410 is to the left of the row component at the sample position 406, and the mid-interpolant 412 is to the right of the row component at the sample position 406.

[0063] In examples in which the initial data array values are unsigned k-bit values, it will be recognized that negative weights will require that a sign bit be included in any intermediate calculations. Also, because individual weights can be greater than 1.0, one or more additional bits can be needed to handle the dynamic range. As an optimization to the above-described method, the P blending unit 806 and the Q blending unit 808 can add an offset to the weighted sum in order to ensure that the first intermediate interpolated value 410 and the second intermediate interpolated value 412 are not negative, yet fit within an increased number of bits that are included to allow for an increased dynamic range. The offset can be removed in the column calculation units 704i and 7042before the surrounding interpolated value 414 is output from the bicubic interpolation unit 504. The addition of the offset means that the intermediate interpolated values 410 and 412 can be represented in an unsigned format (rather than a signed format), which reduces the number of bits used to represent each of the intermediate interpolated values 410 and 412 by one bit. Reducing the number of bits used to represent the intermediate interpolated values 410 and 412 means reducing the amount of data that is passed between the row calculation unit 702 and the column calculation units 704i and 7042. Since the initial data values can be multi-channel, e.g., image data having several color channels, the elimination of the sign bit and the MAD unit on multiple channels can be a significant cost savings.

[0064] An example of the computation performed by the P blending unit 806 for an assumed 8-bit input can be summarized with the following pseudo code:

[0065]

[0066]

[0067] B times 28 or 18 can be implemented as B*16 + [B*8 + B*4] or [B*2]. Implementing the multiplication in this way is inexpensive in hardware because multiplying by a power of 2 can be implemented as a trivial binary shift in hardware, so that the computation uses at most three additions and some trivial constant shifts. Similar factorization can be used for this computation and for other computations, e.g., C times 7 or 18 can be implemented as C*8 + [-C] or [C*8 + C*2].

[0068] It should be noted that, in some examples, rather than computing the intermediate values (e.g., BTemp, CTemp, and DTemp) and then adding them together in a separate step to find the result as implied by the above code, the intermediate values can not be explicitly computed, but rather the result can be found directly by adding the appropriate values. For example, for u = 2 / 8, referring to Table 2 given above, the result can be found as:

[0069] result = (B * 16 + B * 8 + B * 2 + C * 8 - C - 2 * A - D + Offset + RoundingValue) » 5, such that the values of BTemp, CTemp, and DTemp are not explicitly determined.

[0070] An example of the calculations performed by the Q-mixing unit 808 can be summarized with the following pseudo-code:

[0071]

[0072]

[0073] As described above, factoring can be used to calculate A, B, C, and D, for example A multiplied by 12 or 18 can be implemented as A * 16 + [-4 * A] or [A * 2]. Similarly as described above, in some examples the values of ATemp, BTemp, CTemp, and DTemp can not be explicitly determined, but instead the value of the result can be determined directly by adding the appropriate values.

[0074] The first intermediate interpolated value 410 is provided to the first column calculation unit 7041 and the second intermediate interpolated value 412 is provided to the second column calculation unit 7042. A row of data is processed by the row calculation unit 702 on each of a plurality of clock cycles, such that the column calculation units 704 each receive an intermediate interpolated value (410 or 412) on each of the clock cycles.

[0075] At step S6061, the first column calculation unit 7041 multiplies the first intermediate interpolated value 410 received from the row calculation unit 702 on each clock cycle by a weight according to the current row number and accumulates the result. Similarly, at step S6062, the second column calculation unit 7042 multiplies the second intermediate interpolated value 412 received from the row calculation unit 702 on each clock cycle by a weight according to the current row number and accumulates the result. After four clock cycles, the column calculation units 704 have each received four intermediate interpolated values and have each determined two interpolated values (414) on either side of the column component (416) of the sample position (408) indicated by the V parameter.

[0076] Figure 9 A more detailed view of one of the column calculation units 704 is shown. The two column calculation units 704 operate in a corresponding manner as described with reference to Figure 9 Figure 9 ​As shown, the column calculation unit 704 includes a splitting unit 902, a P-weight lookup table (LUT) 904, a Q-weight LUT 906, a P-mixed multiplication and addition (MAD) unit 908, a Q-mixed MAD unit 910, a P accumulator 912, a Q accumulator 914, two truncation and clamping units 916 and 918, and a multiplexer 920.

[0077] V-remapping unit 708 provides multiple bits to splitting unit 902 based on the bits of the V parameter. For example, the V parameter describing the column component of the sampling position may include k bits, {v0, v1…v...} k-1}, where, as an example, k can be eleven. The number of bits used for the V parameter determines the resolution that can limit the sampling position. The V remapping unit 708 receives the k bits of the V parameter and splits the V parameter into the first m bits used in the column calculation unit 704 and the remaining (km) bits provided from the V remapping unit 708 to indicate the bilinear V parameter. The bilinear interpolation unit 506 uses the bilinear V parameter to perform bilinear interpolation on the four surrounding interpolations output from the bicubic interpolation unit 504. As an example, m can be three, and the three bits of the V parameter identify which octet of the entire region between the two data points in the middle two rows of four data points the sampling position is located in. In a similar manner to the V remapping unit 706 described above, the V remapping unit 708 determines four control signals that control the operation of the column calculation unit 702: “Rev”, “PSelect”, “QSelect”, and “PQSwap”, and these four control signals are passed to the splitting unit 902. Therefore, in the example where m=3, the ReV, QSelect, and PQSwap signals each have one bit, and the PSelect signal has two bits. Splitting unit 902 passes the PSelect and Rev signals to P-mix MAD unit 908, the QSelect and Rev signals to Q-mix MAD unit 910, and the PQSwap signal to multiplexer 920.

[0078] At each clock cycle, the column calculation unit 704 receives intermediate interpolated values ​​(410 or 412) and passes them to both the P-mix MAD unit 908 and the Q-mix MAD unit 910. The row calculation unit 708 provides an indication of the current row corresponding to the intermediate interpolated values ​​received in the current clock cycle. The indication of the current row is passed to the P-weight LUT 904, the Q-weight LUT 906, the P-mix MAD unit 908, and the Q-mix MAD unit 910.

[0079] The P weight LUT 904 determines the weights to be applied by the P blend MAD unit 908 to the intermediate interpolated values on the current cycle according to the PSelect and Rev signals and according to the current row number. The weights are determined in the same manner as for the rows of data points (e.g., using Catmull-Rom interpolation according to the weights shown in Table 2 above), with the intermediate interpolated values on the first row (4101 or 4121) corresponding to data point A; the intermediate interpolated values on the second row (4102 or 4122) corresponding to data point B; the intermediate interpolated values on the third row (4103 or 4123) corresponding to data point C; and the intermediate interpolated values on the fourth row (4104 or 4124) corresponding to data point D.

[0080] An example of how the weights are determined by the P weight LUT 904 is shown using the following pseudocode:

[0081]

[0082] Similarly, the Q weight LUT 906 determines the weights to be applied by the Q blend MAD unit 910 to the intermediate interpolated values on the current cycle according to the QSelect and Rev signals and according to the current row number. An example of how the weights are determined by the Q weight LUT 906 is shown using the following pseudocode:

[0083]

[0084]

[0085] The P blend MAD unit 908 receives the intermediate interpolated value for the current row (410 or 412), the weight from the P weight LUT 904, the value currently stored in the P accumulator 912, and an indication of the current row number from the row number unit 708. The P blend MAD unit 908 multiplies the intermediate interpolated value for the current row (410 or 412) by the weight from the P weight LUT 904 and adds that weighted value to the current value in the P accumulator 912. The result is written back to the P accumulator 912. If the current row is the first row in the set of rows on which interpolation is being performed, the P accumulator 912 does not store a related result from a previous row, so the current value of the P accumulator 912 is not added to the result of multiplying the intermediate interpolated value for the current row (410 or 412) by the weight from the P weight LUT 904 before the result is written out to the P accumulator 912. In the preferred embodiment, a particular rounding is performed to give the desired result with a minimum number of intermediate decimal places. That is, each multiplication operation is rounded to a precision of 2 decimal places and instead of adding 0.5 (relative to the least significant stored bit), 0.25 is added, and in addition with respect to the final multiply-add operation, 0.5 is added relative to the stage performed in the truncate and clamp unit 916. An example of the operations of the P blend MAD unit 908 is shown with the following pseudocode:

[0086]

[0087]

[0088] Due to the limited range of the input values, the "TempResult" value is limited in the range [-2272, 10448] and thus does not fit in an S15 value, so that the accumulated result (AccResult) fits in an S12 value.

[0089] Similarly, the Q blend MAD unit 910 has the same basic structure but with slightly wider intermediate values. Thus, the Q blend MAD unit 910 receives the intermediate interpolated value for the current row (410 or 412), the weight from the Q weight LUT 906, the value currently stored in the Q accumulator 914, and an indication of the current row number from the row number unit 708. The Q blend MAD unit 910 multiplies the intermediate interpolated value for the current row (410 or 412) by the weight from the Q weight LUT 906 and adds that weighted value to the current value in the Q accumulator 914. The result is written back to the Q accumulator 914. If the current row is the first row in the set of rows on which interpolation is being performed, the Q accumulator 914 does not store a related result from a previous row, so the current value of the Q accumulator 914 is not added to the result of multiplying the intermediate interpolated value for the current row (410 or 412) by the weight from the Q weight LUT 906 before the result is written out to the Q accumulator 914. As described above, in a preferred embodiment, a particular rounding is performed to give a desired result with respect to a minimum number of intermediate decimal places. An example of the operation of the Q blend MAD unit 910 is illustrated with the following pseudo code:

[0090]

[0091] Because of the limited range of input values, the TempResult value is limited to the range [-17540, 82948] and thus does not fit in the S18 value, so that the accumulated result (AccResult) fits in the S12 value.

[0092] The P and Q accumulator units (912 and 914) in the example described above are 12-bit registers that store the S12 result output from the P and Q blend MAD units 908 and 910, respectively.

[0093] In step S608, when the four row values have been accumulated in the P and Q accumulators (912 and 914), the values in the P and Q accumulators represent the two surrounding interpolated values on either side of the column component of the sample position 416 indicated by the V parameter, and these accumulated values are output from the column calculation unit 704. These two surrounding interpolated values are determined at the two closest of the plurality of predetermined interpolation positions. However, in the example, before the accumulated values are output from the column calculation unit 704, the truncate and clamp units 916 and 918 truncate and clamp the twelve-bit signed accumulated values from the respective accumulators 912 and 914 to thereby convert the accumulated values to eight-bit unsigned values. This is done to limit the interpolated values to the original range, and in some examples, this can not be necessary. The operation of each of the truncate and clamp units 916 and 918 can be summarized, for example, by the following pseudo code:

[0094]

[0095] The outputs of the clipping and clamping units 916 and 918 from one of the column computation units 704 are the surrounding interpolation values 414 on either side of the column component at the sample location for a column. For example, in the first column computation unit 704i, the outputs of the clipping and clamping units 916 and 918 represent the surrounding interpolation values 414 on either side of the location 416i 11 and 414 21 (as shown in Figure 4b ). Similarly, as an example, in the second column computation unit 7042, the outputs of the clipping and clamping units 916 and 918 represent the surrounding interpolation values 414 on either side of the location 4162 12 and 414 22 (as shown in Figure 4b ). In each of the column computation units 704, the multiplexer 920 optionally reverses the order of the surrounding interpolation values 414 according to the PQSwap signal (which is equal to the third bit of the V parameter, v2). In this way, the first surrounding interpolation value 414i is above the column component at the sample location 416 and the second surrounding interpolation value 4142is below the column component at the sample location 416. The operation of the multiplexer 920 can be given by the following pseudocode, for example:

[0096]

[0097] The four surrounding interpolation values 414 11 , 414 12 , 414 21 , and 414 22 are output from the bicubic interpolation unit 504 and passed to the bilinear interpolation unit 506. In addition, the bilinear U parameter and the bilinear V parameter are passed from the bicubic interpolation unit 504 to the bilinear interpolation unit 506. In step S610, the bilinear interpolation unit 504 performs bilinear interpolation on the surrounding interpolation values 414 11 , 414 12 , 414 21 , and 414 22 using the U and V parameters that indicate the sample location 408 between the surrounding interpolation values. In this way, the interpolation values are determined. The interpolation values are output from the interpolation logic 502 and represent the result of the interpolation.

[0098] It can be recognized that the bilinear interpolation on the surrounding interpolation values 414 11 , 414 12 , 414 21 , and 414 22 will provide a better approximation of the data point 41422 , 414 23 , 414 32 and 414 33 The bilinear interpolation performed on the above is closer to the interpolation of the full cubic interpolation. In this sense, the interpolation logic 502 provides a smoother interpolated value than if only the bilinear interpolation unit were used. However, the interpolation logic 502 is easier to implement in hardware than the full cubic interpolation unit because the interpolation logic 502 performs a weighted sum rather than a relatively complex cubic polynomial calculation.

[0099] In the example described above, the surrounding interpolated values 414 are the closest to the sample location 408 among the predetermined interpolation locations. In other examples, it would be possible (although less likely to be preferred) to select surrounding interpolated values that are not the closest to the sample location among the predetermined interpolation locations. In these other examples, the final interpolated value can still result from performing a full cubic interpolation.

[0100] The example described above includes a bicubic interpolation unit 504 and a bilinear interpolation unit 506. In other examples, the interpolation unit 504 can be any type of interpolation unit other than a linear interpolation unit, i.e., a “non-linear” interpolation unit. That is, generally, the interpolation unit 504 is a non-linear interpolation unit configured to perform some type of non-linear interpolation. The term “non-linear interpolation” is used herein to refer to any interpolation other than linear interpolation, i.e., non-linear, and can be, for example, a polynomial interpolation, a cubic interpolation or a higher order interpolation, a Mitchell-Netravali interpolation or other non-polynomial interpolation, or any other suitable interpolation. The interpolation logic 502 is used to approximate a non-linear interpolation without requiring a full non-linear interpolation calculation to be performed.

[0101] In the example shown in Figure 4a and 4b there are eight predetermined interpolation locations between two adjacent data points in one dimension. In other examples, there can be a different number (e.g., 2, 4, 10, or 16) of predetermined interpolation locations between two adjacent data points in one dimension. As described above in the example, the predetermined interpolation locations are preferably regularly spaced between the adjacent data points, but in some examples, the predetermined interpolation locations can be irregularly spaced between the adjacent data points.

[0102] As Figure 5As shown in FIG. 5 and described above, the interpolation logic 502 includes a non-linear interpolation unit (e.g., the bicubic interpolation unit 504) and a linear interpolation unit (e.g., the bilinear interpolation unit 506). The non-linear interpolation unit and the linear interpolation unit can be implemented in the same interpolation module or they can be implemented in separate modules within the computer system, with communication between the non-linear interpolation unit and the linear interpolation unit being via an interface that allows data to be passed between different modules within the computer system.

[0103] In the examples described above, one row of the four rows of the 4x4 set of data points is processed on each clock cycle of a plurality of clock cycles. However, in other examples, some of the processing can be performed in parallel. For example, more than one row of the four rows of the 4x4 set of data points can be processed in parallel. Increasing the parallelization of the processing can increase the performance (e.g., speed) of the system.

[0104] The above description has been made with reference to Figures 5 to 9 The described method involves interpolation within a 2D array of data points. The corresponding principles can be applied to interpolation within an n-dimensional array, where n > 1. For example, for interpolation within a 3D array of data points, the interpolation logic can include: (i) a ternary cubic interpolation unit configured to determine eight surrounding interpolation values at eight predetermined interpolation locations closest to the sample location; and (ii) a tri-linear interpolation unit configured to perform tri-linear interpolation on the eight surrounding interpolation values to determine the interpolation value.

[0105] In the examples described above, the data array is processed first in rows and then in columns. It will be apparent to those skilled in the art that the same techniques can be applied to process the data array first in columns and then in rows. That is, the processing of rows and columns can be swapped in the examples described above.

[0106] The interpolation methods described herein can be used for any suitable interpolation. For example, the data points in the array can be texels of a texture, where the interpolation value represents a texture value at the sample location. Alternatively, the data points in the array can be pixels of an image, where the interpolation value represents an image value at the sample location, which can be useful for image processing functions such as image scaling or lens aberration correction. More generally, the data points can be any type of graphical data. Yet more generally, in other examples, the data points can represent height, temperature, density or electric field, or any other suitable quantity.

[0107] The values and data points are described in the examples above as taking a fixed-point format. In general, any suitable format can be used, and for example in some examples the values and / or data points can be represented as floating-point numbers.

[0108] The interpolation logic 502 described above can be implemented in a computer system. For example, Figure 10 A computer system is shown that includes a GPU 1002, a GPU 1004, a memory 1006, and other devices 1008 such as a display 1010, speakers 1012, a microphone 1014, and a keyboard 1016. The components of the computer system can communicate with each other via a communication bus 1018. The interpolation logic 502 can be implemented (e.g., in hardware) as part of the GPU 1002 as shown in Figure 10 Alternatively, the interpolation logic can be implemented on the CPU 1004. If the interpolation logic 502 is implemented in software, it can be stored in the memory 1006 as computer program code and can be executed on a processing unit of the computer system (e.g., on the GPU 1002 or the CPU 1004).

[0109] In general, any of the above-described functions, methods, techniques, or components (e.g., the interpolation logic 502 and its components) can be implemented in a module using software, firmware, hardware, such as fixed logic circuitry, or any combination of these implementations. The terms “module,” “functionality,” “component,” “block,” “unit,” and “logic” are used generically herein to represent software, firmware, hardware, or any combination thereof.

[0110] In the case of a software implementation, the module, functionality, component, unit, or logic represents program code that performs specified tasks when run on a processor (e.g., one or more CPUs or GPUs). In one example, the described methods can be performed by a computer configured with software stored in a computer readable medium in machine-readable form. One such configuration of a computer readable medium is a signal bearing medium and thus is configured to transmit instructions (e.g., as a carrier wave) such as via a network to a computing device. The computer readable medium can also be configured into a non-transitory computer readable storage medium and thus is not a signal bearing medium. Examples of computer readable storage media include random access memory (RAM), read only memory (ROM), optical disc, flash memory, hard disk storage, and other storage devices that can be used to store instructions or other data and that can be accessed by a machine.

[0111] The software can be in the form of a computer program comprising components for configuring a computer to perform the described methods or comprising computer program code means adapted to perform all the steps of any of the methods described herein when the program is run on a computer and wherein the computer program can be embodied on a computer readable medium. The program code can be stored on one or more computer readable media. The features of the technology described herein are platform-independent, meaning that the technology can be implemented on a variety of computing platforms having a variety of processors.

[0112] Those skilled in the art will also appreciate that all or portions of the functionality, techniques, or methods can be implemented by specialized circuits, application-specific integrated circuits, programmable logic arrays, programmable gate arrays, or the like. For example, the modules, functions, components, units, or logic (e.g., the interpolation logic 502 and components thereof) can include hardware in the form of circuitry. Such circuitry can include transistors and / or other hardware elements available in a manufacturing process. Such transistors and / or other elements can be used to form circuitry or structures that implement and / or contain, for example, memory such as registers, flip-flops, or latches, logic operations (such as Boolean operations) operators, mathematical operations (such as adders, multipliers, or shifters), interconnected circuitry, or structures. Such elements can be provided as custom circuitry or standard cell libraries, macros, or at other levels of abstraction. Such elements can be interconnected in a particular arrangement. The modules, functions, components, units, or logic (e.g., the interpolation logic 502 and components thereof) can include fixed-function circuitry and circuitry that can be programmed to perform one or more functions; such programming can be provided by firmware or software updates or control mechanisms. In an example, hardware logic has circuitry that implements fixed-function operations, state machines, or processes.

[0113] It is also intended to encompass software that "describes" or defines the configuration of hardware, such as HDL (hardware description language) software, as opposed to software that merely serves to interact with a human being, such as an operating system with user applications. That is, software that defines the configuration of hardware, such as the interconnection of components of an integrated circuit, or the configuration of a programmable chip, is intended to be encompassed by the description of the module, function, component, unit or logic implementing the above described module, function, component, unit or logic. That is, a computer readable storage medium can be provided having computer readable program code encoded thereon for generating interpolation logic configured to perform any one of the methods described herein, or for generating interpolation logic comprising any of the apparatus described herein. That is, a computer system can be configured to generate a representation of a digital circuit from a definition of circuit elements and a data definition rule for combining those circuit elements, where a non-transitory computer readable storage medium can have stored thereon processor executable instructions that, when executed on such a system, cause the computer system to generate an interpolation as described herein. To implement in another way, a non-transitory computer readable storage medium can be provided having stored thereon computer readable instructions that, when processed on a computer system for generating an implementation form of an integrated circuit, cause the computer system to generate a representation of interpolation logic according to any one of the examples described herein.

[0114] The terms "processor" and "computer" are used herein to refer to any device or portion thereof that has the processing capability to execute instructions and / or to realize all or part of the described functionality or methods, or any combination thereof.

[0115] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. It is to be understood that the benefits and advantages of the above-described benefits and advantages can relate to one example or can relate to several examples.

[0116] As will be apparent to those of skill in the art, any of the above-described ranges or values can be extended or modified without losing the intended effect. Steps of the methods described herein can be implemented in any suitable order, or simultaneously where appropriate. Aspects of any of the above-described examples can be combined with aspects of any of the other described examples to form further examples without losing the intended effect.

Claims

1. A nonlinear interpolation unit configured to determine, for a plurality of predetermined interpolation positions around a sampling position within an array of data points, a plurality of surrounding interpolated values representing results of performing nonlinear interpolation at the surrounding predetermined interpolation positions using a corresponding set of predetermined weights and the plurality of data points, wherein, The data points in the array are graphical data points.

2. The non-linear interpolation unit of claim 1, wherein the non-linear interpolation unit is further configured to pass the surrounding interpolation values to a linear interpolation unit.

3. The nonlinear interpolation unit of claim 1, wherein the array is an n-dimensional array and the predetermined interpolation locations in the neighborhood are the 2 n closest locations in the predetermined interpolation locations to the sample location.

4. The non-linear interpolation unit of claim 3, wherein n = 1, and wherein the non-linear interpolation is a cubic interpolation.

5. The non-linear interpolation unit of claim 3, wherein n = 2, and wherein the non-linear interpolation is a bi-cubic interpolation.

6. The non-linear interpolation unit of claim 1, comprising a fixed function multiplier arrangement configured as hardware to determine the plurality of surrounding interpolation values.

7. The non-linear interpolation unit of claim 6, wherein the fixed function multiplier arrangement comprises a multiply and add MAD arrangement implemented as hardware and arranged to perform a weighted summation of the data points using the corresponding predetermined set of weights to determine the plurality of surrounding interpolation values.

8. The non-linear interpolation unit of claim 1, wherein the non-linear interpolation unit is configured to perform a weighted summation of the data points using the corresponding predetermined set of weights to determine the plurality of surrounding interpolation values.

9. The non-linear interpolation unit of claim 8, wherein the plurality of data points comprises a 4x4 set of data points, wherein the sample location is described by two parameters, and wherein the non-linear interpolation unit comprises: an A computation unit configured to determine, for each line of the 4x4 set of data points in a first dimension, a first intermediate interpolation value and a second intermediate interpolation value of either side of a first component of the sample location in the first dimension, wherein the first component of the sample location in the first dimension is indicated by a first parameter of the two parameters; a first B computation unit configured to determine, using the first intermediate interpolation values from four lines in the first dimension, a first surrounding interpolation value and a second surrounding interpolation value of either side of a second component of the sample location in a second dimension indicated by a second parameter of the two parameters; and a second B computation unit configured to determine, using the second intermediate interpolation values from four lines in the first dimension, a third surrounding interpolation value and a fourth surrounding interpolation value of either side of the second component of the sample location in the second dimension indicated by the second parameter of the two parameters.

10. The non-linear interpolation unit of claim 9, wherein the A computation unit is configured to determine, for each line of the lines in the first dimension, the first intermediate interpolation value and the second intermediate interpolation value by performing a weighted summation according to the following formula: ​ w A (u) A + w B (u) B + w C (u) C + w D (u) D wherein, A, B, C and D are four data points of a line in the first dimension and w A , w B , w C and w D are their corresponding weights, which are functions of a first parameter u, wherein for values of the first parameter corresponding to the predetermined interpolation positions, the values of the weights are predetermined, and wherein the A computation unit is configured to determine the first intermediate interpolation value and the second intermediate interpolation value at two predetermined interpolation positions in the predetermined interpolation positions that are closest to the first component of the sampling position in the first dimension, respectively.

11. The non-linear interpolation unit of claim 10, wherein the A computation unit comprises hardware adapted to perform the weighted summation, and wherein the predetermined weights are set to provide an imperfect representation of the non-linear interpolation to thereby simplify the hardware adapted to perform the weighted summation as compared to providing a perfect representation of the non-linear interpolation.

12. The non-linear interpolation unit of claim 11, wherein the non-linear interpolation is a Catmull-Rom interpolation.

13. The non-linear interpolation unit of claim 10, wherein for each of the predetermined interpolation positions, the predetermined weights w A , w B , w C , and w D sum up to one, and wherein the predetermined weights are symmetric such that w A (u)≡w D (1 -u) and w B (u)≡w C (1 -u).

14. The non-linear interpolation unit of claim 9, wherein the A computation unit is configured to add an offset when determining the first intermediate interpolation value and the second intermediate interpolation value so as to ensure that the first intermediate interpolation value and the second intermediate interpolation value are not negative.

15. The non-linear interpolation unit of claim 9, wherein the A computation unit is configured to process one line of the four lines in the first dimension on each of a plurality of clock cycles, and wherein the first B computation unit is configured to multiply the first intermediate interpolation value by an appropriate weight of the predetermined weights on each of the plurality of clock cycles, and is configured to accumulate the results over the plurality of clock cycles to determine the first surrounding interpolation value and the second surrounding interpolation value; and wherein the second B computation unit is configured to multiply the second intermediate interpolation value by an appropriate weight of the predetermined weights on each of the plurality of clock cycles, and is configured to accumulate the results over the plurality of clock cycles to determine the third surrounding interpolation value and the fourth surrounding interpolation value.

17. The non-linear interpolation unit of claim 1, wherein the data points in the array are texels of a texture.

16. The non-linear interpolation unit of claim 13, wherein the predetermined interpolation positions divide the area between adjacent data points of the array into 8 segments, and the non-linear interpolation is a Catmull-Rom spline, and wherein the weights w A , w B , w C , and w D are given by the following table:

18. An interpolation apparatus comprising: a non-linear interpolation unit according to claim 1; and a linear interpolation unit configured to perform a linear interpolation for the plurality of surrounding interpolation values to determine an interpolated value at the sample location.

19. An interpolation method implemented by an interpolation apparatus comprising: determining, by at least one logic module, for a plurality of predetermined interpolation locations surrounding a sample location within an array of data points, a plurality of surrounding interpolation values representing results of performing a non-linear interpolation at the surrounding predetermined interpolation locations using a corresponding set of predetermined weights and a plurality of the data points in the array, wherein the data points in the array are graphics data points.

20. A non-transitory computer readable storage medium having stored thereon a computer readable description of a non-linear interpolation unit, the computer readable description, when processed, configures a system for generating the non-linear interpolation unit, the data points in the array are graphics data points. wherein the non-linear interpolation unit is configured to determine, for a plurality of predetermined interpolation positions around the sampling position within the array of data points, a plurality of surrounding interpolation values representing results of performing non-linear interpolation at the surrounding predetermined interpolation positions using a corresponding set of predetermined weights and a plurality of data points of the data points, wherein ​

Citation Information

Patent Citations

  • Method and apparatus for processing an image

    US6782143B1