Re:Solving Different Problems
by darkestkhan on Sunday August 05, 2012 @04:24AM
(#4340925)
My system isn't shader capable and still playing HTML5 video tag consumes only ~30% of CPU while playing flash ~90%.
There is no excuse for that - I could understand higher CPU usage, but not by factor of 3.
Are you on Linux ?
That is the only plat that I see taking higher cpu usage while playing viedo in flash. Both windows and osx now play flash with little cpu usage.
Re:Solving Different Problems
by darkestkhan on Saturday August 18, 2012 @04:12AM
(#4400562)
Yes, I'm on Linux - but it still doesn't explain why flash is consuming so much CPU (I'm using VESA drivers for graphics)
Why don't they encode the elements to YUV once, and then flip to YUV (so not needing to convert each time), as opposed to converting the video to RGB?
the in-memory layout of a YUV-encoded frame is different than the one of a RGB one. it needs conversion, which implies an intermediate copy, as well as traversing a buffer that can go up to 1080 rows.
most video players (and Flash on Windows and MacOS), these days, use shaders and multi-texturing to do that conversion on the GPU; it removes a copy, because you just push the YUV frame as it is to the GPU - and your CPU can go back to a low C state.
I think Flash on Linux does this as well, on nVidia: the blog post linked is from 2010. the way Adobe detect capabilities is, in itself, hilariously bad - instead of checking the GL required GL extensions like any normal people, they do a check on the GL vendor string. the Mesa guys pointed that out, but I doubt they ever received a response.