GPU Two-Pass Colorspace Conversion for CPU Resource Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for converting graphics system pixel content from interleaved RGBA to planar YV12 format are CPU-intensive, requiring expensive CPU resources and often rely on hand-written assembly code to achieve interactive performance.
Innovation Solution
A two-pass color space conversion process is performed on a graphical processing unit (GPU), where the first pass converts video data from a multi-component format to an intermediate format with interleaved components, and the second pass de-interleaves these components to achieve the final planar YV12 format, utilizing DirectX9's multiple-render-target capability and custom pixel shaders.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If CPU is used for color space conversion, then conversion accuracy is maintained, but CPU resource consumption increases significantly
Solution Approach 1:
The patent segments the color conversion process into two separate GPU passes: first pass converts RGBA to intermediate format with interleaved components, second pass de-interleaves to final planar format. This segmentation allows the conversion to be distributed across multiple rendering targets, reducing CPU involvement while maintaining accuracy through precise component separation and recombination.
Solution Approach 2:
The patent introduces an intermediate multi-component format as a mediator between the source RGBA format and the target planar YV12 format. This intermediate format with interleaved components serves as a transitional representation that enables efficient GPU-based conversion while preserving color accuracy, avoiding the need for direct CPU-mediated conversion.
2Productivity
If hand-written assembly code is used for conversion, then interactive performance is achieved, but code complexity and maintenance difficulty increase
Solution Approach 1:
The patent replaces the mechanical assembly code execution model with a GPU-based parallel rendering model. Instead of using hand-written assembly that directly manipulates pixels, the system uses shader programs that leverage the GPU's parallel architecture, achieving interactive performance through hardware acceleration rather than optimized low-level code.
Solution Approach 2:
The patent creates a universal GPU-based conversion framework that can handle multiple color format conversions through the same two-pass architecture. The shader programs and rendering target configuration provide a multi-functional solution that works for various source and target formats, eliminating the need for separate assembly code implementations for each conversion scenario.
3Device complexity
If single-pass conversion is attempted, then process simplicity is maintained, but conversion completeness and output format accuracy deteriorate
Solution Approach 1:
The patent divides the conversion process into two distinct passes, each with a specific function: the first pass handles the color space transformation to an intermediate format, and the second pass handles the de-interleaving to the final planar format. This segmentation ensures that each pass can be optimized for its specific task, maintaining high output format accuracy while keeping the overall process structured and manageable.
Solution Approach 2:
The first pass performs preliminary conversion of the RGBA data to an intermediate format with interleaved components, preparing the data in a state that is optimized for the second de-interleaving pass. This preliminary action ensures that the final pass can focus solely on achieving the correct planar output format, guaranteeing conversion completeness and accuracy.
Data Source
AI summary
Disclosed is a method including converting, during a first pass, video data from a first multi-component format to an intermediate multi-component format, the intermediate multi-component format including a first video component, the intermediate multi-component format including a second video component interleaved with a third video component, and converting, during a second pass, the video data from the intermediate multi-component format to a second multi-component format by de-interleaving the second component and third component.


