Localized image compression calculating method and apparatus to control anti-aliasing filtering in 3-D manipulation of 2-D video images

Abstract: A dynamically variable anti-aliasing filtering system calculates on a local basis the compression factors (Cf) present in an image that is being mapped from a two-dimensional source image through a three-dimensional space and into a two-dimensional target image, the apparatus implementing a linear equation of the form: Cf = A*X s + B*Y s + C where, X s and Y s are, respectively, the horizontal and vertical coordinates of pixels in the source image, and A, B and C are precalculated (each field or frame) constants that depend on the transform matrix function F. A total of four compression factors are required, one for control of horizontal luminance filtering, one for control of vertical luminance filtering, one for control of horizontal chrominance filtering and one for control of vertical chrominance filtering. Three dual accumulator circuits (20,30,40) are used to implement the linear equation in X s and Y s for three different sets of A, B and C. One of these circuits measures horizontal chrominance compression, one vertical luminance compression and one compression due to skew angles. The outputs of these circuits are converted to logarithms and combined with each other and with the logarithms of multiplicative constants representing the ratios between calculated compression factors and the other required compression factor to produce those other compression factors.

Description: Background of the Invention This invention relates to video special effects, and more particularly to an improved apparatus and method for the calculation of image compression to optimize the amount of anti-aliasing filtering that is performed over different parts of a video image that is to be mapped from 2-D to 3-D and back to 2-D. A three-dimensional digital video effects system maps an incoming video image that is two-dimensional into a three-dimensional space and then performs a perspective projection of the mapped image back into two dimensions for eventual display. The incoming (source) image is in the form of a two-dimensional array of picture elements, or pixels. This array of pixels is resampled into an output (target) image, which is also a two-dimensional array of pixels. Because the mapping (transformation) of the source image into three-dimensional space and back into the target image results in varying amounts of compression (resizing) of the source image as it appears in the target image, the resampling operation often results in an undersampling of the source image detail as it appears in the target image. Image undersampling can produce the effect commonly known as "aliasing". Aliasing can arise whenever the two-dimensional frequency content of the source image is greater than half of the two-dimensional sampling rate of that image by the resampling process in forming the target image. The visual effect that results from aliasing is a displeasing graininess in the resulting target image. Aliasing can be reduced by low-pass filtering the source image prior to resampling, so as to reduce its high frequency content at and above the resampling rate. Excessively low-pass filtering the incoming video image, with a cutoff frequency that is much below the resampling frequency, causes a blurring of the resulting target image. It is therefore important to know exactly how much compression of the image has taken place, so that the anti-aliasing low-pass filtering can be minimized and yet be effective. A useful rule is that the cutoff frequency of the anti-aliasing filter, normalized to the sample rate of the incoming image, be 1/(2.0 x the amount of compression). Sending an image to a farther perceived depth via an effects transform image makes the target image appear smaller than the source image. An effects system can also make the target image look smaller by resizing the source image through remapping. Without any additional depth cues it is impossible to tell if a compressed target image is a result of resizing or of depth displacement. For the remainder of this document we will refer to compression from resizing and compression from depth displacement as depth-based compression. The amount of compression of the source image as it appears in the target image arises from both the perception of depth and of perspective skew, each of which arises from the apparent perspective in which the source image appears in the target image. Referring to FIG. 1A, it can be seen that the "A" on :he left appears smaller and therefore compressed relative to the one on the right. And, referring to FIG. 1B, it can be seen that the "B" at the top left and the "B" at the top right have undergone some perspective or vanishing point compression relative to the "B" at the top middle. All three "B"s in the top of this image have undergone the type of compression seen in FIG. 1A, but the ones on the sides are also affected by additional compression due to vanishing point (perspective) skew that makes the rectangular source image appear as a trapezoid. Because both of these factors, perception of depth and perspective skew, vary from point to point within a transformed image, determining the cut-off frequency for the low-pass filtering process is preferably accomplished locally within the image, ideally on a pixel-by-pixel basis, so that only the minimum necessary amount of filtering is performed. Thus, the compression factors should be calculated in video real time, and it is naturally desirable to be able to calculate these compression factors with a minimum of computational resources. Performing the function of finding local compression factors to aid in optimizing anti-aliasing filtering is not new. For example, the DPM-1 (also known as "Kaleidoscope") video effects system made by The Grass Valley Group, Inc. of Grass Valley, California, provides a system for finding local compression factors to aid in controlling anti-aliasing filtering; however, in that system a great deal of computational resources are employed to attain the desired filter compression factor control signals. GB-A-2244622 also relates to the use of an aliasing reducing filter in image signal manipulation where an address generator generates addresses for successive words of a digital input signal representing an input image to be manipulated. Local scaling factor computation means monitors the addresses for successive sets of three words of the input signal, each set comprising first and second words that are relatively horizontally spaced in the input image and a third word that is aligned vertically with the second word in the input image, and computes from each set both horizontal and vertical local scaling factors representing the extent of compression in the horizontal and vertical directions of a corresponding local area of the manipulated image. A digital filter effects a two-dimensional filtering of the input image. A bandwidth controller is responsive to the successive local scaling factors to vary the horizontal and vertical bandwidths of the filter to minimise aliasing that would be caused by the manipulation of the local areas. The computation means computes the local scaling factors for each area such that the horizontal scaling factor corresponds to the length of a line that extends perpendicularly from a line passing through the positions of the second and third words in the manipulated image to the position of the first word in the manipulated image and the vertical local scaling factor corresponds to the length of a line that extends perpendicularly from a line passing through the positions of the first and second words in a manipulated image to the position of the third word in the manipulated image. Such a signal processing apparatus is a forward address generation system where the video is input to the frame buffer as a function of a transform algorithm and then read out in raster frame order. Summary of the Invention It is an object of the present invention to provide a simpler approach to the calculation of local image compression factors used to optimize the amount of anti-aliasing filtering of a planar video image that is being mapped from 2-D to 3-D and back to 2-D, the simpler approach conserving computational resources while producing the desired filtering. According to a first aspect of this invention, there is provided an anti-aliasing filtering system as claimed in claim 1 herein. According to a second aspect of this invention, there is provided a method for anti-aliasing filtering as claimed in claim 20 herein. According to a third aspect of this invention, there is provided a video image manipulation apparatus as claimed in claim 39 herein. Accordingly, there is provided a dynamically variable anti-aliasing filtering system that includes an apparatus for calculating locally the compression factors (Cf) present in an image that is being mapped from a two-dimensional source image through a three-dimensional space and into a two-dimensional target image according to a transform function F, the apparatus implementing a linear equation of the form: Cf = A*X s + B*Y s + C where, X s is the horizontal step (ideally one pixel) location in the source image, Y s is the vertical step (ideally one line) number in the source image, and A, B and C are precalculated (each field or frame) constants that depend on the transform function F. Simplifying assumptions and considerable pre-calculation allow this linear equation to produce acceptable compression factors for control of the anti-aliasing filtering. The linear equation can be implemented using a dual accumulator, with the first stage of the dual accumulator being initialized with C at the beginning of each field or frame and accumulating by B each vertical step (yielding C + B*Y s ) and the second stage being initialized with the output of the first stage each vertical step at the beginning of each line and accumulating by A each horizontal step (yielding A*X s + B*Y s + C ), so that Cf is always available at the output of the second stage of the dual accumulator. A total of four compression factors are requited, one for control of horizontal luminance filtering, one for control of vertical luminance filtering, one for control of horizontal chrominance filtering and one for control of vertical chrominance filtering. If a key signal (often used to specify the opacity of its related video signal for mixing with other signals) is being filtered, its filter control will be shared with the control for luminance because those two signals are usually sampled at the same tates. Chrominance is sampled horizontally at half the luminance rate, and therefore needs separate control. Three of the dual accumulator circuits are used to implement the linear equation in X and Y for three different sets of A, B and C. One of these circuits measures horizontal chrominance compression, one vertical luminance compression and one the compression due to skew angles. The outputs of these circuits are converted to their logarithms and combined with each other to produce two of four required compression factors. The other two compression factors are obtained by adding the logarithms of multiplicative constants to the logarithms of those that have been calculated. These multiplicative constants are the ratios, which are constant within each field or frame, between the calculated compression factors and the other required compression factors. The subject matter of the present invention is particularly pointed out and distinctly claimed in the concluding portion of this specification. However, both the organization and method of operation, together with further advantages and objects thereof, may best be understood by reference to the following detailed description and accompanying drawings. Brief Description of the Drawings FIGS. 1A and 1B illustrate the compression and skew effects that create the need for anti-aliasing filtering with optimized filter selection based on local compression; FIG. 2 is a block diagram of a portion of a video effects system that performs 3-D manipulation of 2-D images and anti-aliasing filtering; FIG. 3 is a block diagram of an image compression calculator used in the present invention; FIG. 4 is a diagram of the angles used in the skew angle coefficients generation process; and FIG. 5 is a block diagram of a dual accumulator suitable for implementing the equation Cf = AX + BY + C used in the present invention. Detailed Description Referring to FIG. 2, luminance and chrominance video components are applied to a two-dimensional to three-dimensional to two-dimensional video transform circuit 400 through a set of variable filters under the control of an image compression calculator 100. The set of variable filters 200,250,300,350 comprises a variable horizontal luminance filter 200, a variable vertical luminance filter 250, a variable horizontal chrominance filter 300 and a variable vertical chrominance filter 350. The 2D-3D-2D video transform circuitry 400 receives operator inputs, F control, that determine how the planar two-dimensional image is to be manipulated in the three-dimensional space. This input determines the transform matrix function, F, that the image compression calculator 100 receives from the 2D-3D-2D video transform circuit 400. The video transform circuitry 400 uses the transform matrix function F to map source space pixels (X s ,Y s ) to intermediate three-dimensional variables X i , Y i and Z i as follows: The transformed target output image is derived from the intermediate three-dimensional variables using perspective projection onto an output plane in which Z t = 0 according to the following equations: X t = X i Z i Y t = Y i Z i The image compression calculator 100 uses the information contained in the transform matrix function F to determine how much compression is going to occur in the immediate region of each pixel, and produces, on a pixel-by-pixel basis, a horizontal chrominance compression factor, Cf hC , a horizontal luminance compression factor, Cf hL , a vertical luminance compression factor, Cf vL and a vertical chrominance compression factor, Cf vC , each for controlling the behavior of the respective filters. Each variable filter 200, 250, 300 and 350 has 128 different settings that vary from no filtering, which is appropriate to a compression factor of 1:1 or even image expansion, to a maximum level of filtering which is appropriate to a compression factor of approximately 16:1. FIG. 3 shows one embodiment of an image compression calculator of the present invention. A microprocessor 10 receives the transform matrix function F from the video transform circuitry 400, and from it calculates skew angle coefficients A sa , B sa and C sa , horizontal chrominance compression coefficients A hC , B hC and C hC , and vertical luminance compression coefficients A vL , B vL and C vL . These coefficients are downloaded to their respective dual accumulators 20, 30 and 40 before the beginning of each field (or frame in a non-interlaced system). The calculation of these coefficients will now be discussed in detail. COORDINATE DEFINITIONS: Source Coordinates: L h = last pixel on 1st line L v = last line Target coordinates X, as mapped from the indicated source coordinates (h,v): X (0,0) = x coord. from 1st pixel on 1st line X (1,0) = x coord. from 2nd pixel on 1st line X (Lh,0) = x coord. from last pixel on 1st line X (Lh+1,0) = x coord. from last pixel plus one , 1st line X (0,1) = x coord. from 1st pixel on 2nd line X (Lh,1) = x coord. from last pixel on 2nd line X (0,Lv) = x coord. from 1st pixel on last line X (1,Lv) = x coord. from 2nd pixel on last line X (0,Lv+1) = x coord. from 1st pixel on last-plus-one line Y (0,0) = y coord. from 1st pixel on 1st line Y (1,0) = y coord. from 2nd pixel on 1st line Y (Lh,0) = y coord. from last pixel on 1st line Y (Lh+1,0) = y coord. from last pixel plus one , 1st line Y (0,1) = y coord. from 1st pixel on 2nd line Y (Lh,1) = y coord. from last pixel on 2nd line Y (0,Lv) = y coord. from 1st pixel on last line Y (1,Lv) = y coord. from 2nd pixel on last line Y (0,Lv+1) = y coord. from 1st pixel on last-plus-one line CHANGE FACTORS AT CORNERS IN TARGET SPACE: dX h1 = x distance moved in target space for a unit horizontal step in source space, for source's 1st pixel on 1st line dY h1 = y distance moved in target space for a unit horizontal step in source space, for source's 1st pixel on 1st line dX h2 = x distance moved in target space for a unit horizontal step in source space, for source's last pixel on 1st line dY h2 = y distance moved in target space for a unit horizontal step in source space, for source's last pixel on 1st line dX h3 = x distance moved in target space for a unit horizontal step in source space, for source's 1st pixel on last line dY h3 = x distance moved in target space for a unit horizontal step in source space, for source's 1st pixel on last line dX v1 = x distance moved in target space for a unit vertical step in source space, for source's 1st pixel on 1st line dY v1 = y distance moved in target space for a unit vertical step in source space, for source's 1st pixel on 1st line dX v2 = x distance moved in target space for a unit vertical step in source space, for source's last pixel on 1st line dY v3 = y distance moved in target space for a unit vertical step in source space, for source's last pixel on 1st line dX v3 = x distance moved in target space for a unit vertical step in source space, for source's 1st pixel on last line dY v3 = x distance moved in target space for a unit vertical step in source space, for source's 1st pixel on last line Each of these change factors at the corners can then be evaluated in terms of the matrix elements of the transform matrix function, F, as shown in equation (2) as follows: Similarly, but omitting the intermediate steps: Because a 2-D to 3-D transform may also rotate an image, both dX h and dY h must be considered in producing a horizontal compression factor. That is, to prevent aliasing in either direction, both the horizontal and vertical target space displacements that result from a horizontal source space step must be taken into account in calculating the horizontal compression factor that must be applied to the source space image as it is mapped into the target space. This is because rotation causes a horizontal source space step to create vertical and horizontal target displacements. By finding the horizontal compression factors at three of the four corners of the source image rectangle, a linear equation can be found that approximates the horizontal compression factor at each pixel location of the source image: Cf h = A h *X s + B h *Y s + C h where and C h = Cf h1 In a system operating on a pixel-by-pixel basis, the number of horizontal steps, N horiz.steps , will be the number of pixels, and the number of vertical steps, N vert.steps , will be the number of lines. Other systems are envisioned in which multiple pixels and lines are considered to be a single step, with the constant values A, B and C varied accordingly. Equation (17) relies on the following three equations (18), (19) and (20) for the horizontal compression factors at the three corners of the source image rectangle: A comparable set of equations can be derived for a vertical compression factor: Cf v = A v *X s + B v *Y s + C v where Because horizontal chrominance components are sampled at half the frequency of the luminance components, the chrominance channel requites different filtering than the luminance channel does. This difference in horizontal sample rate affects both horizontal and vertical compression factors because image rotation makes horizontal sampling affect vertical target image detail. To avoid the need for additional dual accumulators and coefficients for them, a subset of the required compression factors can be calculated and the rest derived from those by multiplication by an appropriate factor. To utilize this approach, it is first noted that some of the change factors for chrominance filtering vary from the change factors for luminance filtering by a factor of two. In the following equations, dX and dY refer to the direction, horizontal and vertical, respectively, of changes in the target space that are the result of the changes in the source space that are indicated by the associated subscripts. The first character of the subscripts, h or v, indicates the direction of a unit change in the source space that produced that effect, with h representing horizontal and v representing vertical unit steps. The second, capitalized character in the subscripts indicates whether luminance, L, or chrominance, C, is being described: Using these relationships, the chrominance compression factors can be calculated using luminance change factors: The coefficients A hC , B hC , C hC , and A vC , B vC , C vC can be recalculated in terms of the luminance change factors. The horizontal chrominance compression factor, Cf hL , and horizontal luminance compression factor, Cf hC , are related by a multiplicative constant: where R = |EP-NG| |DP-MG| and ranges between 0 and ∞. It can be demonstrated that the compression factor ratio, Cf hL /Cf hC , lies between 1 and 2 for any value of R (from 0 to ∞). Similarly, the ratio of the vertical chrominance compression factor, Cf vC , to the vertical luminance compression factor, Cf vL , are also related by a multiplicative constant: where S = |JP-KN| |HP-KM| and ranges between 0 and ∞. Similarly, it can be demonstrated that the compression factor ratio, Cf vC /Cf vL , lies between 1 and 2 for any value of S (from 0 to ∞). The foregoing facts will be very useful in reducing circuit complexity, as will be further described below. Referring again to FIG. 3, the microprocessor 10 supplies the horizontal chrominance compression factor calculation coefficients, A hC , B hC and C hC and vertical luminance compression factor calculation coefficients, A vL , B vL and C vL to the horizontal chrominance compression dual accumulator 30 and vertical luminance compression dual accumulator 40, respectively. Referring to FIG. 4, a rectangular image 80 from the source space is shown mapped into the target space. Three lines 81, 82 and 83, that are parallel to the X-axis of the target space are shown intersecting three corners of the rectangular image 80. The derivation of the formulas for the third set of compression factor calculation coefficients, those used by skew angle dual accumulator 20, will now be described with reference to this Figure. A linear equation in the source coordinates, X s and Y s , that provides a step-by-step approximation of the local skew angle, Θ s , is: Θ s = A sa *X + B sa *Y + C sa where and C sa = Θ 1 To obtain the values of Θ 1 , Θ 2 and Θ 3 needed for equations (37.a), (37.b) and (37.c), the other angles in FIG. 4 must be determined. As can be seen in FIG. 4 and equation (32), angle Θ 1 is equal to angle Θ B1 minus angle Θ A1 : Θ 1 = Θ B1 - Θ A1 Angle Θ A1 is the angle between the X-axis in the target space and the line defined in the target space by mapping the source origin and a unit horizontal step (to 1,0 in the source space) mapped to the target space. All angles are measured as positive in the clockwise direction from the target space horizontal axis and as negative in the counter-clockwise direction from that same axis. Angle Θ A1 is determined according to equation (39): The arctan function used in equation (39), as well as elsewhere in this document, is the 4 quadrant arctangent, where the individual signs of the numerator and denominator have significance in identifying the quadrant; it is equivalent to the FORTRAN function ATAN2. Angle Θ B1 is the angle between the X-axis in the target space and the line defined in the target space by mapping the source origin and a unit vertical step (to 0,1 in the source space) to the target space. Angle Θ B1 is determined according to equation (40): As can be seen in FIG. 4 and equation (41), angle Θ 2 is equal to angle Θ B2 minus angle Θ A2 : Θ 2 = Θ B2 - Θ A2 Angle Θ A2 is the angle between the X-axis in the target space and the line defined in the target space by mapping the last pixel on the first line in the source space and a unit horizontal step from that pixel (to L+1,0 in the source space) mapped to the target space. According to a basic geometric principle, i.e., that a straight line intersects parallel lines at the same angle, angle Θ A2 must be equal to angle Θ A1 : Θ A2 = Θ A1 Angle Θ B2 is the angle between the X-axis in the target space and the line defined in the target space by mapping the last pixel on the first line in the source space and a unit vertical step from that pixel (to L,1 in the source space) mapped to the target space. Angle Θ B2 is determined according to equation (43): As can be seen in FIG. 4 and equation (44), angle Θ 3 is equal to angle Θ B3 minus angle Θ A3 : Θ 3 = Θ B3 - Θ A3 Angle Θ A3 is the angle between the X-axis in the target space and the line defined in the target space by mapping the first pixel on the last line in the source space and a unit horizontal step from that pixel (to 1,L in the source space) mapped to the target space. Angle Θ A3 is determined according to equation (45): And, for the geometric reason given above in connection with equation (42): Θ B3 = Θ B1 Referring again to FIG. 3, the microprocessor 10 calculates the A sa , B sa and C sa coefficients of equations (37.a), (37.b) and (37.c) every field and supplies them to skew angle dual accumulator 20. In accordance with the timing signals from the timing generator 50, the skew angle dual accumulator 20 produces a 32 bit output according to equation (38). Referring now to FIG. 5, all three of the dual accumulators 20, 30 and 40 are identical. The dual accumulators contain a first adder 60 that sums the B coefficient input and the contents of a first register 64. A first multiplexer 62 selects between the C coefficient on its "1" input and the output of the first adder 60 on its "0" input. The output of the first multiplexer 62 is the input to the first register 64. A second multiplexer 70 selects between the contents of the first register 64 on its "1" input and the output of a second adder 68 on its "0" input. The output of the second multiplexer 70 is the input to a second register 72. The second adder 68 sums the A coefficient input and the contents of the second register 72. The output of the second register is the desired linear equation, which can be a compression factor or a skew angle. At the beginning of a new field, VSEL (vertical select) is a "1" and the first multiplexer 62 supplies the C coefficient to the input of the first register 64. VENL (vertical enable) goes high for one clock cycle, enabling AND gate 66 so that a CLK (pixel rate clock) is allowed to pass and the first register 64 is clocked once, after which it holds the value of C. VSEL then goes low for the duration of the field and the first multiplexer 62 presents the output of the first adder 60 to the input of the first register 64. Once each vertical step (ideally one line) VENL allows another CLK to reach the first register 64, so that the first register 64 keeps increasing by another B each vertical step to implement BY s + C. HSEL (horizontal select) controls the second multiplexer 70. At the beginning of each line HSEL goes high for one clock cycle, causing the second multiplexer 70 to present the output of the first register 64 to the input of the second register 72. Thus, prior to the beginning of each line the second register is initialized to the current value of BY s + C. During the rest of each line HSEL is low and the output of the second adder 68 is connected by multiplexer 70 to the input of the second register 72. HENL (horizontal enable) is high during all active video time. Each CLK therefore causes the second register 72 to increment by another A value via the operation of the second adder 68, so that the output of the second register 72 is the desired equation, AX s + BY s + C . The dual accumulators 20, 30 and 40 could alternatively be implemented as single accumulators. In this implementation, a microprocessor 10 replaces the first (vertical) accumulator 60,62,64,66 by supplying a new B*Y s + C to the horizontal accumulator 68,70,72,74 just prior to the beginning of each vertical step. The output of the horizontal chrominance compression dual accumulator 30 is a 32 bit integer representing the horizontal chrominance compression factor for chrominance, Cf hC . That integer is converted to a floating point number by int-to-float converter 32. The resulting floating point number has five bits of exponent and seven bits of mantissa. The floating point version of the horizontal chrominance compression factor for chrominance is then converted to an integer logarithm by float-to-log,int converter 34, which produces an output having four bits of integer and six bits of fraction. The output of the float-to-log,int converter 34 is applied to one input of summation circuit 36. The sign bits of the integer outputs of the horizontal chrominance compression dual accumulator 30 and the vertical luminance compression dual accumulator 32 are used by the limiters 28, 38, 48 and 58 to limit their outputs to zero when the sign bits indicate the presence of a negative number. While a base-two logarithm implementation is shown, it could have another base. Base-two logarithms are particularly convenient, however, since the floating point exponent becomes the integer part of the logarithm without further conversion. The output of the vertical luminance compression dual accumulator 32 is also a 32 bit integer. It represents the vertical compression factor for luminance, Cf vL . That integer is converted to a floating point number by int-to-float converter 42. The resulting floating point number has five bits of exponent and seven bits of mantissa. The floating point version of the vertical luminance compression factor is then converted to an integer logarithm by float-to-log,int converter 44, which produces an output having a sign bit, four bits of integer and six bits of fraction. The output of the float-to-log,int converter 44 is applied to one input of summation circuit 46. Referring again to FIG. 3, absolute value circuit 22 receives the output of the skew angle dual accumulator 20 and produces the absolute value of the most significant 11 bits as its output (the sign bit and 20 least significant bits being discarded). This value represents an angle between 0 and 180 degrees. The output of the absolute value circuit 22 is applied to a lookup table 24, typically a PROM, that implements the log 2 of a skew angle determining function whose value approaches infinity for angles neat 0° and 180°, and whose value approaches one for angles near 90°. Three such functions are shown in equations (47), (48), and (49a), (49b), the latter two of which operate as a pair over the indicated ranges of angles: Output = log x [1/sin(|Θ s |)] Output = log x [1/√(1-cos(|Θ s |))] Output = log x [1/(|Θ s /90|)] {0<|Θ|≤90} Output = log x [1/(|(180-Θ s )/90|)] {90<|Θ|<180} The essential characteristic of the inner portion of these functions, the portion that is inverted and its logarithm taken, is that it have a value of one at 90° and a value of zero at 0° and 180°. The lookup table 24 is shown as implementing equation (48), with x = 2. The output of lookup table 24 has two bits of integer part and six nits of fractional part, so that it has a maximum value of 3 and 63/64. If the value of the input to the lookup table 24 would produce a compression that exceeds 3 and 63/64, the lookup table 24 produces 3 and 63/64 instead. The output of the lookup table 24 is applied to one input of summation circuit 36 and one input of summation circuit 46. The output of summation circuit 36 is four bits of integer, five bits of fraction and sign and overflow bits, and represents the base two logarithm of the combined compression factors for skew angle and horizontal chrominance compression. The output of summation circuit 36 is applied to the input of limiter 38. The output of summation circuit 46 is also four bits of integer, five bits of fraction and sign and overflow bits, and represents the base two logarithm of the combined compression factors for skew angle and vertical luminance compression. The output of summation circuit 46 is applied to the input of limiter 48. The output of summation circuit 36 is applied to one input of summation circuit 26, the other input of which is supplied with an offset. For example, if the horizontal chrominance compression factor, Cf hC , is known, it can be multiplied by the ratio of horizontal luminance compression factor, Cf hL , to the horizontal chrominance compression factor, Cf hC , as described above in connection with equation (35), to produce the horizontal luminance compression factor: Cf hC x Cf hL Cf hC = Cf hL Because addition of logarithms is equivalent to the multiplication of their anti-logs, the offset that is added by summation circuit 26 is the (base two) logarithm of the ratio of the horizontal luminance compression factor, Cf hL , to the horizontal chrominance compression factor, Cf hC , [equation (35)]. Because the transform matrix function does not change within a given field, the ratio of the chrominance compression factor to the luminance compression factor is a constant within that field, and so is the logarithm of the ratio of those compression factors. Therefore, the logarithm of this number is a constant, a constant that varies between zero and one for base-two logarithms, as shown above, which can be calculated by the microprocessor 10 between fields and downloaded to the hardware. The result of adding this offset is to produce the logarithm of the horizontal luminance compression factor, Cf hL , from the logarithm of the horizontal chrominance compression factor, Cf hC , with an adder rather than another dual accumulator; and, because the horizontal luminance compression factor is always greater than or equal to the horizontal chrominance compression factor, as shown earlier, the logarithm of this ratio is always positive and summation circuit 26 can be a simple adder. The output of summation circuit 46 is applied to one input of summation circuit 56, the other input of which is supplied with an offset that is the (base two) logarithm of the ratio of the vertical chrominance compression factor, Cf vC , to the vertical luminance compression factor, Cf vL , as described above in connection with equation (36), to produce the vertical chrominance compression factor: As with the other offset, this ratio is a constant that can be calculated by the microprocessor 10 between fields and downloaded to the hardware. And again, this permits the production of the logarithm of the vertical chrominance compression factor, Cf vC , from the vertical luminance compression factor, Cf vL , with an adder rather than another dual accumulator. And, because the vertical chrominance compression factor is always greater than or equal to the vertical luminance compression factor, the logarithm of this ratio is also always positive and summation circuit 56 can also be a simple adder. The limiters 28, 38, 48 and 58, all produce two bits of integer and five bits of fraction, for a maximum value of 3 and 31/32. They also monitor the overflow bit on their inputs, and, if it is set, they respond to it by forcing their output bits to all "1"s. If the sign bits received from the dual accumulators 30 or 32 indicate that an input is negative, the limiters 28 and 38, or 48 and 58, force their outputs to all "0"s. The limiters 28, 38, 48 and 58 thus limit their outputs to the range of 0 to 3 and 31/32, inclusive. The seven bits of the outputs of the limiters 28, 38, 48 and 58 select among 128 filter coefficients that are available in each of the variable filters 200, 250, 300 and 350 (shown in FIG. 2) to produce filtering that is appropriate to compression factors ranging from 1:1 to 2 (3+31/32) :1 (approximately 15.657:1). Inputs to the limiters 28, 38, 48 and 58 that are negative represent expansion of the image rather than compression, and these are appropriately treated as no compression. Inputs to the limiters 28, 38, 48 and 58 that are greater than 3 and 31/32, i.e., an overflow condition, are only filtered the maximum amount, corresponding to the compression factor of approximately 15.657:1, even if more filtering would be desirable. While this implementation shown uses one skew angle dual accumulator 20 and one each horizontal and vertical dual accumulators 30 and 40, other alternatives are possible. Because the vertical filter operates over a number of lines, there is a delay of several lines (four, for example) between the center tap of the horizontal filter and the center tap of the vertical filter. For ideal filtering, two skew compression calculators could be employed, one for the horizontal filter and another for the vertical one, with the vertical one generating the same factor for data delayed by the number of lines between the center taps of the two filters; however, because the number of lines of delay involved is so small compared to the whole field, adequate results are obtained by using only one skew compression calculator for both filters, with that one skew compression calculator calculating for a line in between the two center taps. Similar reasoning could also be employed to further reduce the number of dual accumulators to two. Horizontal and vertical filters could also share one dual accumulator, if the assumption were made that changes in depth across a few lines were largely insignificant, so that an "average" depth-based compression factor could be used for both filters. The depth factor calculator would then calculate the logarithm of the smallest of the depth factors and each of the other factors could be derived by adding an offset based on ratios between the desired factor and the one actually calculated. These ratios would all be constant for any one field, and yet could be recalculated on a field-by-field basis. In an actual implementation there may be registers between various processing elements of this apparatus in order to break operations into steps that can be performed in individual clock periods. This method is frequently referred to as pipelining. If pipelining is employed, the horizontal accumulator may have to be started a few clock periods before the beginning of the line, in order to account for the register delays from the accumulator output until the selected filter coefficients multiply with the first horizontal pixel at the horizontal filter's center tap. In fact, the horizontal accumulator may start several clock periods (horizontal steps) earlier than what is required to account for register delays; for every horizontal step "early" that the accumulator loads, the value that it is loaded with is decremented by A. For example, if the horizontal accumulator is loaded five horizontal steps early, the value of C is decremented by 5*A. Similarly, the vertical accumulator may be loaded as early as desired, as long as the constant C is decremented by B multiplied by the number of lines between the accumulator loading and the first line of the field entering the center tap of the vertical filter. While the embodiment of the invention described utilizes logarithmic control of the variable filtering means 200,250,300,350, and therefore uses summation circuits 26,36,46,56 to combine logarithmic compression factors and offsets, these combinations could be effectuated by other means. For example, generic combining means 27,37,47,57 could be implemented as multiplication circuits. Although multiplication circuits are more complicated and expensive than summation circuits, their use would eliminate the need for float-to-log,int converters 34 and 44. This alternative would also require changing the functionality of circuit 24 to eliminate the log function, and would require the variable filters 200,250,300,350 to be controllable by linear numerical means. A mixture of linear and logarithmic processing could be employed at separate stages. While a preferred embodiment of the present invention has been shown and described, it will be apparent to those skilled in the art that many changes and modifications may be made without departing from the invention in its broader aspects. The claims that follow are therefore intended to cover all such changes and modifications as fall within the true scope of the invention.

Claims: An anti-aliasing filter system for video effects equipment that performs 3-D manipulation of 2-D images, the system comprising: microprocessor means (10) for calculating constants A, B and C on a field-by-field or frame-by-frame basis according to the content of a transform matrix function F used to map a two-dimensional source image, corresponding to a video signal to be manipulated, through a three-dimensional space into a two-dimensional target image; dual accumulator means (30, 40) for implementing, on a local basis within a region of a field or frame, a linear equation, Cf = AX s + BY s + C , to produce a compression factor Cf where X s if a horizontal step address, Y s is a vertical step address, and A, B and C are the calculated constants; and dynamically controllable filter means (200, 250, 300, 350) capable of filtering a video signal input to a selected cutoff frequency, the cutoff frequency being controllable on a local basis within a region of a field or frame according to the compression factor Cf input, the filter means producing a filtered video output ready for transformation by the transform matrix function F. An anti-aliasing filter system according to claim 1 wherein the means for impllementing comprises a dual accumulator (30, 40), with a first stage (60 - 66) of the dual accumulator being initialized with C at the beginning of each field or frame and accumulating by B each vertical step to form B*Y s + C , and a second stage (68 - 74) being initialized with B*Y s + C at the beginning of each vertical step and accumulating by A each horizontal step to form A*X s + B*Y s + C , so that Cf is always available at an output of the second stage of the dual accumulator. An anti-aliasing filtering system according to claim 1 wherein the means for implementing comprises a single accumulator (68-74) that is supplied with B*Y s + C by the microprocessor means (10) for calculating at the beginning of each vertical step, the single accumulator accumulating by A each horizontal step to form A*X s + B*Y s + C , so that Cf is always available at an output of the single accumulator. An anti-aliasing filtering system according to claim 1 wherein the horizontal step is a pixel, and the vertical step is one line. An anti-aliasing filtering system according to claim 1 further comprising: means (22, 24) for determining a ratio of a second compression factor Cf 2 to the compression factor Cf on a field-by-field or frame-by-frame basis according to the content of the transform matrix function F; and means (37, 47) for multiplying Cf by the ratio to obtain Cf 2 . An anti-aliasing filtering system according to claim 1 wherein the dynamically controllable filter means accepts logarithmic compression factor inputs and the anti-aliasing filtering system further comprises: means (32, 34; 42, 44) for converting the compression factor Cf to the logarithm of the compression factor log:Cf. An anti-aliasing filtering system according to claim 6 further comprising: means (22, 24) for determining a logarithm, log:ratio, of a ratio of a second compression factor Cf 2 to the compression factor Cf on a field-by-field or frame-by-frame basis according to the content of the transform matrix function F; and means (37, 47) for adding log:ratio to log:Cf to obtain log:Cf 2 . An anti-aliasing filtering system according to claim 6 further comprising: additional means (10) for calculating skew angle constants A sa , B sa and C sa on a field-by-field or frame-by-frame basis according to the content of a transform matrix function F; means (20-24) for producing a skew angle log compression factor, log:Cf sa , based on the skew angle constants A sa , B sa and C sa ; and means (36, 46) for adding the skew angle log compression factor log:Cf sa to the log compression factor log:Cf to produce a combined log compression factor, log:Cfc, the combined log compression factor Cfc being used as the log compression factor Cf by the dynamically controllable filter means. An anti-aliasing filtering system according to claim 8 further comprising: means (24) for determining a logarithm, log:ratio, of a ratio of a second compression factor Cf 2 to the compression factor Cf on a field-by-field or frame-by-frame basis according to the content of the transform matrix function F; and means (37, 47) for adding log:ratio to log:Cf to obtain log:Cf 2 . An anti-aliasing filtering system according to claim 8 wherein the means for producing comprises: means (20) for implementing, on a pixel-by-pixel basis, a linear equation, Cf = A sa *X s + B sa *Y s + C , to produce a skew angle Θ, where X s is a pixel address, Y s is a line address, and A sa , B sa and C sa are the calculated constants; means (22) for finding the absolute value of Θ, |Θ|; and means (24) for ascertaining the logarithmic value of the inverse of a skew angle determining function to produce the skew angle log compression factor, log:Cf sa , the determining function having the property of being one at 90° and zero at 0° and 180°. An anti-aliasing filtering system according to claim 10 wherein the skew angle determining function is the square root of the quantity [ 1 - cos(|Θ|) ]. An anti-aliasing filtering system according to claim 10 wherein the skew angle determining function is the sine of the absolute value of the skew angle. An anti-aliasing filtering system according to claim 10 wherein the skew angle determining function is |Θ s /90| for Θ s between 0° and 90° and (180 - |Θ s |)/90 for Θ s between 90° and 180°. An anti-aliasing filtering system according to claim 1 further comprising: additional means (10) for calculating skew angle constants A sa , B sa and C sa on a field-by-field or frame-by-frame basis according to the content of a transform matrix function F; means (20-24) for producing a skew angle compression factor, Cf sa , based on the skew angle constants A sa , B sa and C sa ; and means (37, 47) for combining the skew angle compression factor Cf sa with the compression factor Cf to produce a combined compression factor, Cfc, the combined compression factor Cfc being used as the compression factor Cf by the dynamically controllable fiber means. An anti-aliasing filtering system according to claim 14 further comprising: means (22, 24) for determining a ratio of a second compression factor Cf 2 to the compression factor Cf on a field-by-field or frame-by-frame basis according to the content of the transform matrix function F; and means (37, 47) for multiplying Cf by the ratio to obtain Cf 2 . An anti-aliasing filtering system according to claim 14 wherein the means for producing comprises: means (20) for implementing, on a step-by-step basis, a linear equation, Cf = A sa *X s + B sa *Y s + C sa , to produce a skew angle Θ, where X s is a horizontal step address, Y s is a vertical step address, and A sa , B sa and C sa are the calculated constants; means (22) for finding the absolute value of Θ, |Θ|; and means (24) for ascertaining the value of the inverse of a skew angle determining function to produce the skew angle compression factor, Cf sa , the determining function having the property of being one at 90° and zero at 0° and 180°. An anti-aliasing filtering system according to claim 16 wherein the skew angle determining function is the square root of the quantity [ 1 - cos(|Θ|) ]. An anti-aliasing filtering system according to claim 16 wherein the skew angle determining function is the sine of the absolute value of the skew angle. An anti-aliasing filtering system according to claim 16 wherein the skew angle determining function is |Θ s /90| for Θ s between 0° and 90° and (180 - |Θ s |)/90 for Θ s between 90° and 180°. A method for anti-aliasing filtering a two dimensional video signal that is being manipulated in three dimensions by video effects equipment, the method comprising the steps of: pre-calculating, on a field-by-field or frame-by-frame basis, coefficients for a linear equation Cf = AX s + BY s + C s , where Cf is a resulting compression factor, X s is the horizontal step location on each vertical step and Y s is the vertical step location in each field or frame, the coefficients being based on the content of a transform matrix function F used to map a two-dimensional source image corresponding to said video signal through a three-dimensional space into a two-dimensional target image; calculating, on a local basis within a field or frame, the compression factor Cf using the linear equation; and selecting a filtering function, on a local basis within a region of a field or frame, based on the compression factor Cf to provide a filtered video output that is ready for transformation by the transform matrix function F. A method according to claim 20 wherein the calculating step comprises the steps of: storing at the beginning of each frame a value C to produce a stored value of BY s + C where Y s initially equals 0; adding B to the stored value of BY s + C upon the occurrence of each vertical step Y s to implement BY s + C; transferring the value of BY s + C to a second storage location upon the occurrence of each vertical step Y s to produce a stored value of AX s + BY s + C where X s initially equals 0; and adding A to the second stored value of BY s + C upon the occurrence of each horizontal step X s to produce the output Cf = AX s + BY s + C . A method according to claim 20 wherein the calculating step comprises the steps of: also pre-calculating each vertical step a value of BY s + C; storing the also pre-calculated value; and adding A to the stored value upon the occurrence of each horizontal step X s to produce the output Cf = AX s + BY s + C . A method according to claim 20 wherein the horizontal step is a pixel and the vertical step is a line. A method according to claim 20 further comprising the steps of: determining a ratio of a second compression factor Cf 2 to the compression factor Cf on a field-by-field or frame-by-frame basis according to the content of the transform matrix function F; and multiplying Cf by the ratio to obtain Cf 2 . A method according to claim 20 wherein the selecting step selects the filtering function based on the logarithm, log:Cf, of the compression factor Cf and the method further comprises the step of: converting the compression factor Cf to its logarithm, log:Cf. A method according to claimed 25 further comprising the steps of: determining a logarithm, log:ratio, of a ratio of a second compression factor Cf 2 to the compression factor Cf on a field-by-field or frame-by-frame basis according to the content of the transform matrix function F; and adding log:ratio to log:Cf to obtain log:Cf 2 . A method according to claim 25 further comprising the steps of: also calculating skew angle constants A sa , B sa and C sa on a field-by-field or frame-by-frame basis according to the content of a transform matrix function F; producing a skew angle log compression factor, log:Cf sa , based on the skew angle constants A sa , B sa and C sa ; and adding the skew angle log compression factor log:Cf sa to the log compression factor log:Cf to produce a combined log compression factor, log:Cfc, the combined log compression factor log:Cfc being used as the log compression factor Cf in the selecting step. A method according to claim 27 further comprising the steps of: determining a logarithm, log:ratio, of a ratio of a second compression factor Cf 2 to the compression factor Cf on a field-by-field or frame-by-frame basis according to the content of the transform matrix function F; and adding log:ratio to log:Cf to obtain log:Cf 2 . A method according to claim 27 wherein the producing step comprises the steps of: implementing, on a pixel-by-pixel basis, a linear equation, Cf = A sa *X s + B sa *Y s + C , to produce a skew angle Θ, where X s is a pixel address, Y s is a line address, and A sa , B sa and C sa are the calculated constants; finding the absolute value of Θ, |Θ|; and ascertaining the logarithmic value of the inverse of a skew angle determining function to produce the skew angle log compression factor, log:Cf sa , the determining function having the property of being one at 90° and zero at 0° and 180°. A method according to claim 29 wherein the skew angle determining function is the square root of the quantity [ 1 - cos(|Θ|) ]. A method according to claim 29 wherein the skew angle determining function is the sine of the absolute value of the skew angle. A method according to claim 29 wherein the skew angle determining function is |Θ s /90| for Θ s between 0° and 90° and (180 - |Θ s |)/90 for Θ s between 90° and 180°. A method according to claimed 20 further comprising the steps of: also calculating skew angle constants A sa , B sa and C sa on a field-by-field or frame-by-frame basis according to the content of a transform matrix function F; producing a skew angle compression factor, Cf sa , based on the skew angle constants A sa , B sa and C sa ; and combining the skew angle compression factor Cf sa with the compression factor Cf to produce a combined compression factor, Cfc, the combined compression factor Cfc being used as the compression factor Cf in the selecting step. A method according to claim 33 further comprising the steps of: determining a ratio of a second compression factor Cf 2 to the compression factor Cf on a field-by-field or frame-by-frame basis according to the content of the transform matrix function F; and multiplying Cf by the ratio to obtain Cf 2 . A method according to claim 33 wherein the producing step comprises the steps of: implementing, on a pixel-by-pixel basis, a linear equation, Cf = A sa *X s + B sa *Y s + C , to produce a skew angle Θ, where X s is a pixel address, Y s is a line address, and A sa , B sa and C sa are the calculated constants; finding the absolute value of Θ, |Θ|; and ascertaining the value of the inverse of a skew angle determining function to produce the skew angle compression factor, Cf sa , the determining function having the property of being one at 90° and zero at 0° and 180°. A method according to claim 35 wherein the skew angle determining function is the square root of the quantity [ 1 - cos(|Θ|) ]. A method according to claim 35 wherein the skew angle determining function is the sine of the absolute value of the skew angle. A method according to claim 35 wherein the skew angle determining function is |Θ s /90| for Θ s between 0° and 90° and (180 - |Θ s |)/90 for Θ s between 90° and 180°. A video image manipulation apparatus comprising: means (400) for performing two-dimension to three-dimension to two-dimension manipulation of input planar video images according to a transform matrix function F derived from operator input; dynamically controllable filter means (200, 250, 300, 350) capable of filtering a video signal input to a selected cutoff frequency, the cutoff frequency being controllable on a local basis within a region of a field or frame according to a compression factor Cf input, the filter means producing a filtered video output forming saio planar video images input to said manipulation means (400); microprocessor means (10) for calculating constants A, B and C on a field-by-field or frame-by-frame basis according to the content of a transform matrix function F; dual accumulator means (30, 40) for implementing, on a local basis within a region of a field or frame, a linear equation, Cf = AX s + BY s + C , to produce the compression factor Cf where X s is a horizontal step address, Y s is a vertical step address, and A, B and C are the calculated constants.

Inventors: DESJARDINS PHILIP A, SQUIER JAMES V, DESJARDINS, PHILIP A., SQUIER, JAMES V.
Applicants: GRASS VALLEY GROUP, THE GRASS VALLEY GROUP, INC.
Application year: 1993
Main classification: G06T5
IPC codes: G06T15, G06T3, G06T5, H04N5