Resource-friendly anisotropic filtering system

By converting the initial anisotropic ratio and major axis length to a different format and using a 16.8 fixed-point format for calculation, the problem of high GPU chip resource consumption is solved, and the computational efficiency of the anisotropic filtering layer is improved.

CN122431898APending Publication Date: 2026-07-21METAX INTEGRATED CIRCUITS (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
METAX INTEGRATED CIRCUITS (SHANGHAI) CO LTD
Filing Date
2026-05-26
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In texture mapping scenarios, anisotropic filtering processes consume significant GPU chip hardware resources in existing technologies, resulting in low computational efficiency.

Method used

By converting the initial anisotropic ratio and major axis length into a new format, the reference anisotropic ratio and major axis length are obtained. The calculations are performed in integer format to avoid the resource consumption of floating-point format. A fixed-point format with a 16-bit width for the integer part and an 8-bit width for the fractional part is used for processing.

Benefits of technology

While ensuring computational accuracy, the storage bandwidth and computing unit resources of the GPU chip are reduced, the computational efficiency of the anisotropic filtering layer is improved, and the consumption of hardware resources is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431898A_ABST
    Figure CN122431898A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of integrated circuit design, in particular to a resource-friendly anisotropic filtering system. The system performs lightweight format conversion on an initial anisotropic ratio and an initial long axis length to obtain a reference anisotropic ratio and a reference long axis length, so that the storage bandwidth, operation units and other resources of a GPU chip are as low as possible under the premise of meeting the anisotropic filtering level calculation accuracy, thereby reducing the consumption of hardware resources of the GPU chip and improving the efficiency of anisotropic filtering level calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of integrated circuit design technology, and in particular to a resource-friendly anisotropic filtering system. Background Technology

[0002] Currently, in texture mapping scenarios, when using anisotropic filtering, it is usually necessary to calculate the Level of Detail (LOD) to determine which level of texture image to use for texture sampling.

[0003] In existing technologies, during the level-of-detail (LOD) computation process, the data involved in the computation is usually uniformly set to conform to the FP32 format to facilitate the computation process. However, using floating-point data for LOD computation results in the consumption of more GPU chip hardware resources, that is, the GPU chip hardware resources are consumed in a large way.

[0004] Therefore, how to reduce the hardware resource consumption of GPU chips during anisotropic filtering has become an urgent problem to be solved. Summary of the Invention

[0005] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows: A resource-friendly anisotropic filtering system includes a processor and a memory storing a computer program. When the computer program is executed by the processor, it performs the following steps: S101, the obtained initial anisotropy ratio and initial major axis length are converted into a format to obtain the reference anisotropy ratio and reference major axis length. S102, when the reference anisotropy ratio and the preset maximum ratio value meet the preset conditions, update the reference anisotropy ratio to the target anisotropy ratio, and determine the anisotropy filtering level according to the target anisotropy ratio and the reference major axis length. S103, when the reference anisotropy ratio and the preset maximum ratio value do not meet the preset conditions, the anisotropy filtering level is determined according to the reference anisotropy ratio and the obtained area scaling factor.

[0006] Compared with the prior art, the present invention has significant advantages. Through the above technical solution, the resource-friendly anisotropic filtering system provided by the present invention achieves considerable technological progress and practicality, and has broad industrial application value. It has at least the following advantages: This invention performs a lightweight format conversion on the initial anisotropy ratio and initial major axis length to obtain the reference anisotropy ratio and reference major axis length. This minimizes the use of GPU chip resources such as storage bandwidth and computing units while meeting the anisotropic filtering level calculation accuracy requirements, thereby reducing the consumption of GPU chip hardware resources and improving the efficiency of anisotropic filtering level calculation. Attached Figure Description

[0007] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0008] Figure 1 This is a flowchart illustrating the execution of a computer program by a processor in a resource-friendly anisotropic filtering system provided in an embodiment of the present invention. Detailed Implementation

[0009] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0010] This embodiment provides a resource-friendly anisotropic filtering system; see [link to documentation]. Figure 1 This is a flowchart illustrating the execution of a computer program by a processor in a resource-friendly anisotropic filtering system according to an embodiment of the present invention. The system includes a processor and a memory storing the computer program. When the computer program is executed by the processor, the following steps are implemented: S101, the obtained initial anisotropy ratio and initial major axis length are converted into a format to obtain the reference anisotropy ratio and reference major axis length. S102, when the reference anisotropy ratio and the preset maximum ratio value meet the preset conditions, update the reference anisotropy ratio to the target anisotropy ratio, and determine the anisotropy filtering level according to the target anisotropy ratio and the reference major axis length. S103, when the reference anisotropy ratio and the preset maximum ratio value do not meet the preset conditions, the anisotropy filtering level is determined according to the reference anisotropy ratio and the obtained area scaling factor.

[0011] The initial anisotropy ratio can refer to the anisotropy ratio before format conversion. The anisotropy ratio can refer to the ratio of the major axis length to the minor axis length of the texture stretching, which is used to reflect the degree of texture anisotropy. The larger the anisotropy ratio, the more uneven the texture stretching.

[0012] The initial major axis length can refer to the major axis length of the texture stretch without format conversion, which is the maximum stretch length of a single pixel in the texture space.

[0013] The reference anisotropy ratio can refer to the anisotropy ratio after format conversion, and the reference major axis length can refer to the major axis length of the texture stretch after format conversion.

[0014] The preset maximum ratio value can refer to the upper limit of the anisotropy ratio configured in the GPU chip. It is used to prevent the ratio from being too large, resulting in too many samples and thus overloading the GPU chip. The maximum ratio value can usually be configured to 8, 16, etc. The implementer can configure the maximum ratio value according to the actual situation.

[0015] Preset conditions can be used to determine whether the reference anisotropy ratio exceeds the hardware limit.

[0016] The target anisotropy ratio can refer to the updated anisotropy ratio when the reference anisotropy ratio exceeds the hardware limit.

[0017] Anisotropic filtering levels can refer to Level of Detail (LOD) levels, which are used to determine which level of the texture image to sample. Generally, the higher the level of the texture image, the lower the resolution of the texture image.

[0018] Specifically, the anisotropic filtering system provided in this embodiment can also be integrated into the GPU hardware texture unit to implement each step.

[0019] In one specific implementation, the process of obtaining the initial anisotropy ratio, the initial major axis length, and the area scaling factor includes: S201, based on the obtained first texture differential value, second texture differential value, third texture differential value and fourth texture differential value, determine the first basic stretch length square value, the second basic stretch length square value and the area scaling factor; S202, determine the initial major axis length and the initial anisotropy ratio based on the squared value of the first basic stretch length, the squared value of the second basic stretch length, and the area scaling factor.

[0020] Wherein, the first texture differential value can represent the change in coordinates in the u direction of the texture image when the screen image moves a single pixel in the X direction, the second texture differential value can represent the change in coordinates in the u direction of the texture image when the screen image moves a single pixel in the Y direction, the third texture differential value can represent the change in coordinates in the v direction of the texture image when the screen image moves a single pixel in the X direction, and the fourth texture differential value can represent the change in coordinates in the v direction of the texture image when the screen image moves a single pixel in the Y direction.

[0021] The first basic stretch length square value can represent the square value of the texture stretch length in the X direction of the screen image. The first basic stretch length square value is obtained by adding the square value of the first texture differential value and the square value of the third texture differential value.

[0022] The second basic stretch length square value can represent the square value of the texture stretch length in the Y direction of the screen image. The second basic stretch length square value is obtained by adding the square value of the second texture differential value and the square value of the fourth texture differential value.

[0023] Based on the first and second basic stretch length square values, it can be determined whether the X direction of the screen image is the direction with more severe texture stretching. This is represented by a Boolean value: when the first basic stretch length square value is greater than the second basic stretch length square value, the Boolean value is 1, indicating that the X direction of the screen image is the direction with more severe texture stretching; when the first basic stretch length square value is not greater than the second basic stretch length square value, the Boolean value is 0, indicating that the X direction of the screen image is not the direction with more severe texture stretching.

[0024] When the Boolean value is 1, the square value of the first basic tensile length is determined to be the square value of the length in the main tensile direction. When the Boolean value is 0, the square value of the second basic tensile length is determined to be the square value of the length in the main tensile direction.

[0025] The initial major axis length is the result of taking the square root of the square value of the length in the main stretching direction.

[0026] The initial anisotropy ratio is determined by the ratio of the square of the length in the principal stretching direction to the area scaling factor.

[0027] In one specific implementation, determining the first base stretch length squared value, the second base stretch length squared value, and the area scaling factor based on the obtained first texture differential value, second texture differential value, third texture differential value, and fourth texture differential value includes: Multiply the first texture differential value and the fourth texture differential value to obtain the first multiplication result; Multiply the second texture differential value and the third texture differential value to obtain the second multiplication result; The area scaling factor is obtained by subtracting the first multiplication result from the second multiplication result and taking the absolute value.

[0028] Among them, the first texture differential value, the second texture differential value, the third texture differential value and the fourth texture differential value are all floating-point numbers, usually in single-precision floating-point format.

[0029] In one specific implementation, the reference anisotropy ratio, the reference major axis length, the maximum ratio value, and the area scaling factor are all in a first preset format, which is a fixed-point number format with an integer part width of 16 bits and a fractional part width of 8 bits.

[0030] The first preset format is a 16.8 fixed-point format.

[0031] Specifically, the judgment and calculation steps involving the reference anisotropic ratio, reference major axis length, maximum ratio value, and area scaling factor are all completed in the first preset format, without the need to convert back to floating-point format, thereby reducing the hardware resource consumption of the GPU chip.

[0032] It should be noted that the first preset format should meet the preset accuracy requirements. These accuracy requirements are typically determined based on industry conventions. In this embodiment, when the first preset format is a 16.8 fixed-point number format, the calculated anisotropy ratio, level of detail, etc., all meet the accuracy requirements. Implementers can choose other formats that meet the accuracy requirements and consume fewer computational resources than the single-precision floating-point number format as the first preset format, depending on the actual situation.

[0033] In one specific implementation, the preset condition is that the reference anisotropy ratio is greater than the maximum ratio value.

[0034] When the reference anisotropy ratio is greater than the maximum ratio, it means that the anisotropy ratio exceeds the maximum ratio allowed by the GPU chip and needs to be clamped.

[0035] In one specific implementation, updating the reference anisotropy ratio to the target anisotropy ratio when the reference anisotropy ratio and the preset maximum ratio value meet a preset condition includes: When the reference anisotropy ratio and the preset maximum ratio value meet the preset conditions, the reference anisotropy ratio is updated with the maximum ratio value to obtain the target anisotropy ratio.

[0036] When the reference anisotropy ratio and the preset maximum ratio value meet the preset conditions, it means that the reference anisotropy ratio is greater than the preset maximum ratio value. In this case, the reference anisotropy ratio needs to be constrained by the maximum ratio value, and the maximum ratio value is used as the target anisotropy ratio.

[0037] In one specific implementation, determining the anisotropic filtering level based on the target anisotropy ratio and the reference major axis length includes: The first logarithmic calculation result is obtained by performing a logarithmic calculation on the reference major axis length; The logarithmic ratio of the target is calculated to obtain the second logarithmic calculation result. The difference between the first logarithm calculation result and the second logarithm calculation result is used as the anisotropic filtering level.

[0038] The first logarithmic result can refer to the base-2 logarithmic value of the reference major axis length, and the second logarithmic result can refer to the base-2 logarithmic value of the target anisotropy ratio.

[0039] Specifically, this embodiment replaces the division calculation of the reference major axis length and the target anisotropy ratio with logarithmic subtraction calculation, which can effectively reduce the division instruction overhead of the GPU chip and thus improve the efficiency of the GPU chip in performing anisotropic texture filtering.

[0040] In one specific implementation, determining the anisotropic filtering level based on the reference anisotropy ratio and the area scaling factor includes: The first logarithmic calculation result is obtained by performing a logarithmic calculation on the reference major axis length; Perform a logarithmic calculation on the area scaling factor to obtain the third logarithmic calculation result; The difference between the third logarithm calculation result and the first logarithm calculation result is used as the anisotropic filtering level.

[0041] The first logarithmic result can refer to the base-2 logarithmic value of the reference major axis length, and the third logarithmic result can refer to the base-2 logarithmic value of the area scaling factor.

[0042] In this embodiment, the initial anisotropy ratio and initial major axis length are subjected to a lightweight format conversion to obtain the reference anisotropy ratio and reference major axis length. This minimizes the consumption of GPU chip resources such as storage bandwidth and computing units while meeting the anisotropic filtering level calculation accuracy requirements, thereby reducing the consumption of GPU chip hardware resources and improving the efficiency of anisotropic filtering level calculation.

[0043] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of this invention is defined by the appended claims.

Claims

1. A resource-friendly anisotropic filtering system, characterized in that, The system includes a processor and a memory storing a computer program, which, when executed by the processor, performs the following steps: S101, the obtained initial anisotropy ratio and initial major axis length are converted into a format to obtain the reference anisotropy ratio and reference major axis length. S102, when the reference anisotropy ratio and the preset maximum ratio value meet the preset conditions, update the reference anisotropy ratio to the target anisotropy ratio, and determine the anisotropy filtering level according to the target anisotropy ratio and the reference major axis length. S103, when the reference anisotropy ratio and the preset maximum ratio value do not meet the preset conditions, the anisotropy filtering level is determined according to the reference anisotropy ratio and the obtained area scaling factor.

2. The resource-friendly anisotropic filtering system according to claim 1, characterized in that, The process of obtaining the initial anisotropy ratio, the initial major axis length, and the area scaling factor includes: S201, based on the obtained first texture differential value, second texture differential value, third texture differential value and fourth texture differential value, determine the first basic stretch length square value, the second basic stretch length square value and the area scaling factor; S202, determine the initial major axis length and the initial anisotropy ratio based on the squared value of the first basic stretch length, the squared value of the second basic stretch length, and the area scaling factor.

3. The resource-friendly anisotropic filtering system according to claim 2, characterized in that, The step of determining the first base stretch length squared value, the second base stretch length squared value, and the area scaling factor based on the obtained first texture differential value, second texture differential value, third texture differential value, and fourth texture differential value includes: Multiply the first texture differential value and the fourth texture differential value to obtain the first multiplication result; Multiply the second texture differential value and the third texture differential value to obtain the second multiplication result; The area scaling factor is obtained by subtracting the first multiplication result from the second multiplication result and taking the absolute value.

4. The resource-friendly anisotropic filtering system according to claim 1, characterized in that, The reference anisotropy ratio, the reference major axis length, the maximum ratio value, and the area scaling factor are all in a first preset format, which is a fixed-point number format with an integer part width of 16 bits and a fractional part width of 8 bits.

5. The resource-friendly anisotropic filtering system according to claim 1, characterized in that, The preset condition is that the reference anisotropy ratio is greater than the maximum ratio value.

6. The resource-friendly anisotropic filtering system according to claim 1, characterized in that, The step of updating the reference anisotropy ratio to the target anisotropy ratio when the reference anisotropy ratio and the preset maximum ratio value meet a preset condition includes: When the reference anisotropy ratio and the preset maximum ratio value meet the preset conditions, the reference anisotropy ratio is updated with the maximum ratio value to obtain the target anisotropy ratio.

7. The resource-friendly anisotropic filtering system according to claim 1, characterized in that, The step of determining the anisotropic filtering level based on the target anisotropy ratio and the reference major axis length includes: The first logarithmic calculation result is obtained by performing a logarithmic calculation on the reference major axis length; The logarithmic ratio of the target is calculated to obtain the second logarithmic calculation result. The difference between the first logarithm calculation result and the second logarithm calculation result is used as the anisotropic filtering level.

8. The resource-friendly anisotropic filtering system according to claim 1, characterized in that, The step of determining the anisotropic filtering level based on the reference anisotropy ratio and the area scaling factor includes: The first logarithmic calculation result is obtained by performing a logarithmic calculation on the reference major axis length; Perform a logarithmic calculation on the area scaling factor to obtain the third logarithmic calculation result; The difference between the third logarithm calculation result and the first logarithm calculation result is used as the anisotropic filtering level.