GPU Shader Texture Conversion for Faster Image Encoding
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing image processing technologies face inefficiencies in converting image data between different color spaces, particularly due to the need to traverse and calculate pixel values one by one, leading to low conversion efficiency.
Innovation Solution
An image processing method and apparatus that utilizes a graphics processor (GPU) to perform encoding format conversion in parallel by creating texture storage areas and using shaders to convert image data between color spaces, avoiding pixel-by-pixel computation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If pixel-by-pixel traversal and calculation is used for color space conversion, then conversion accuracy is maintained, but conversion efficiency deteriorates
Solution Approach 1:
The patent replaces the traditional CPU-based sequential pixel processing with GPU-based parallel processing. The shader program leverages the GPU's architecture to perform color space conversion on multiple pixels simultaneously, substituting the mechanical sequential operation with a parallel computational system that achieves significant speedup while maintaining conversion accuracy
Solution Approach 2:
The patent transitions from one-dimensional sequential processing to multi-dimensional parallel processing by utilizing the GPU's fragment shader architecture. Each pixel coordinate (u, v) in the texture space is processed independently and simultaneously across thousands of shader cores, effectively adding a parallelism dimension to the conversion process
Data Source
AI summary
An image processing method includes: acquiring an image size of an image and original image data of the image; creating a first texture storage area according to the image size, and storing image data of the image into the first texture storage area; creating, according to the image size and a target encoding format, a second texture storage area for storing target image data to be generated, a color encoding format corresponding to the target image data being the target encoding format; and performing, through a shader called by a graphics processor (GPU), encoding format conversion on the original image data stored in the first texture storage area to generate the target image data corresponding to each texture coordinate in the second texture storage area, and storing the target image data corresponding into the each texture coordinate to a corresponding storage location in the second texture storage area.


