Opened 11 months ago
Last modified 11 months ago
[PATCH] OpenGL: Speed up transfer of packed images to texture buffer
|Reported by:||Lawrence Rust <lvr@…>||Owned by:||beirdo|
|Component:||MythTV - Video Playback||Version:||Master Head|
|Severity:||medium||Keywords:||OpenGL texture optimize|
I have observed that OpenGL TV playback can consume large amounts of CPU time making it unrealistic for some systems.
Profiling playback shows that, for interlaced content, the main overhead is the function pack_yv12interlaced which takes around 23mS using MMX instructions on an Intel i5 661 @ 3.33GHz using onboard graphics with Linux 3.4 KMS. With other processing overheads the VideoLoop? exceeds 40mS causing frames to be dropped.
Further profiling shows that the main overhead is in writing to the texture buffer which is situated in graphics memory. This patch coalesces all writes to the texture buffer into one burst and reduces the time taken by pack_yv12interlaced to 12mS using MMX and 15mS without - a reduction of ~300%
Using this patch, playback of interlaced content is smooth and no frames are dropped.
Change History (2)
Changed 11 months ago by Lawrence Rust <lvr@…>
comment:1 Changed 11 months ago by beirdo
- Owner set to beirdo
- Status changed from new to assigned