Opened 13 years ago
Closed 11 years ago
Last modified 11 years ago
#10922 closed Patch - Feature (fixed)
[PATCH] OpenGL: Speed up transfer of packed images to texture buffer
Reported by: | Owned by: | stuartm | |
---|---|---|---|
Priority: | minor | Milestone: | 0.28 |
Component: | MythTV - Video Playback | Version: | Master Head |
Severity: | medium | Keywords: | OpenGL texture optimize |
Cc: | Ticket locked: | no |
Description
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.
Attachments (1)
Change History (5)
Changed 13 years ago by
Attachment: | 0001-OpenGL-Optimize-writing-packed-images-to-pixel-buffe.patch added |
---|
comment:1 Changed 13 years ago by
Owner: | set to beirdo |
---|---|
Status: | new → assigned |
comment:2 Changed 11 years ago by
Milestone: | unknown → 0.28 |
---|---|
Owner: | changed from beirdo to stuartm |
Status: | assigned → accepted |
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:4 Changed 11 years ago by
I should add that I believe this could be optimised (mainly for DXVA and VAAPI) using the same USWC methods implemented in MythUSWCCopy class
In 10d5820665ca01ed04e520651bdad4eae80da34f/mythtv: