News for hackers. Stuff that matters.
Re:Solving Different Problems by ebassi on Sunday August 05, 2012 @04:12AM (#4340911)
not every video frame is encoded in RGB. actually, very few transports use that.

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.

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.

Re:Solving Different Problems by novalis on Sunday August 05, 2012 @09:59AM (#4341435)
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)
Re:Solving Different Problems by antihero on Sunday August 05, 2012 @05:20AM (#4341013)
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?
Re:Solving Different Problems by 0x0 on Sunday August 05, 2012 @06:03AM (#4341069)
I _think_ you lose a _lot_ of color going from RGB->YUV, also you are just replacing one expensive color space conversion with another.