
About Adobe's Flash Player Not Having Access to H.264 HW Acceleration on OSX - barredo
http://daringfireball.net/2010/02/flash_hardware_acceleration
======
Zak
The facts that Flash performs just as poorly on Linux as on OS X, and _far_
worse on a fast PowerPC (youtube is painfully choppy on a G5 Quad) than a slow
x86 (youtube is tolerable on an Atom) suggest explanations that differ from
the Adobe party line.

~~~
papersmith
In my experience flash under Linux was much worse than OS X. One of the main
reasons I switched to OS X was to make flex development less painful.

~~~
Zak
The overall experience is worse on Linux, with sound issues and on 64-bit
Linux, clickable areas that don't line up with the visible controls. I was
just talking about CPU usage.

------
blasdel
Goddamnit, why do people keep taking Adobe's statements at face value --
shipping versions of Flash on Windows aren't hardware accelerated either!

The Windows Flash 10.1 plugin has been in public beta for less than 6 months,
and only accelerates video decoding on minority hardware. A few percent of
their install base has it, tops. Flash on Windows has decoded H.264 video at
unaccelerated libavcodec speeds just fine without it going back to Flash 9 in
2007, and H.263 going back to Flash 6 in 2002. Neither of those codecs works
nearly as well on OS X or Linux.

They're pushing this angle because it makes them out to be the heroes -- see
the passive-aggressive spiel you get when you visit the Flash page on an
iPhone -- they'd love to frame everything as "if only Apple would let us".
Unfortunately it's not true in the slightest.

------
ricardo
Adobe ignored OS X for years and is now finding themselves in a position where
they're losing a hold on Flash as the 'standard' for online video. Rather than
fixing the technical issues they're focused on marketing. The last 3 years of
iPhone sales have proven that people can live without Flash. All Apple has to
do now is continue to ignore them and hold their ground while Flash slowly
fades away.

~~~
wmf
Actually they are fixing Flash, although that doesn't excuse Doing It Wrong
for all those years.

<http://www.kaourantin.net/2010/02/core-animation.html>

~~~
DeusExMachina
Yes, I think this is a little to late for them. It seems to me that they went
along with something like "Apple has too little market share so it's not so
relevant to us".

In the meanwhile Apple become relevant increasing its computer market share
with the Mac, conquering the third place in the smartphone market with the
iPhone and creating a device (the iPad) that is targeted to a big new audience
and in my opinion will take a big share on of the pie (also considering that
this is the "multimedia" pie, one very relevant to Adobe).

But in all these years they pissed of Steve Jobs, and he is the wrong person
to have as an enemy when you will depend more and more on Apple platforms.

------
staunch
_"Lastly, does anyone really think it would be a good idea for web content
plugins to have direct access to graphics card hardware?"_ As if there's no
secure way to allow it access? Of course there is, and it should have that
access if it means the difference between being able to stream video from the
web well or not.

I'm not clicking links to anymore of this guy's posts. He's the very
definition of a mouthpiece. Nearly every post of his are bad rationalizations
for Apple's policies.

~~~
tvon
> _Of course there is, and it should have that access if it means the
> difference between being able to stream video from the web well or not._

Evidence seems to be strongly indicating that it is not necessary, unless
you're Adobe and you need someone to blame for years of neglect.

Also, as pointed out all over the place, it hardly amounts to an excuse for
everything else that Flash does that isn't related to h.264.

> _Nearly every post of his are bad rationalizations for Apple's policies._

Hard to argue that a browser plugin should have direct GPU access when it
clearly doesn't need it.

Also note that Gruber is an Apple pundit and obviously a fan of the company,
but he has also been very critical of them in areas (eg, App Store policies).

~~~
kelnos
> Hard to argue that a browser plugin should have direct GPU access when it
> clearly doesn't need it.

Straw man. Flash doesn't need direct GPU access, just access to video decoding
APIs that are accelerated.

------
octover
I subscribe that at least part of the 'problem' is Adobe's (previously
Macromedia's) attention to the Mac. Flash has always been subpar, and I'm not
alone in that the majority of apps that crash Flash is the root problem. If
Adobe would step up their game it would probably go a long way, but they may
have already blown their chance. Jobs does not like that Safari crashes
unexpectedly, especially cause the layman user doesn't realize it was really
the Flash plugin.

~~~
cpr
Adobe's inattention to the Mac extends far beyond flash.

All their applications now basically use a cross-platform UI that mocks both
Mac OS and Windows conventions, and defines their own bizarre little world.
(Flash is just more of the same.)

Their Mac updater software is a Byzantine nightmare.

I could go on. Just read some of the irate Mac users' commentary on John
Nack's blog at <http://blogs.adobe.com/jnack/> .

------
raganwald
_Should Flash Player be a kernel extension, so that it can ensure it gets
plenty of CPU cycles and have direct access to whatever hardware it wants?_

Yes, that way developers code for the proprietary platform Flash, and Apple
joins all the other PC manufacturers in making commodity hardware with little
differentiation except styling.

------
voidpointer
I'd love to see someone come up with actual facts around this Flash on Mac
issue. There seems to be somewhat of a shortage of facts. Gruber has mostly
hearsay (although he is very convincing with that).

We'd need to do real benchmarking for various sorts of flash content. What
about poorly written ActionScript in the SWF? Does it matter when you are
running multiple instances of the player, etc.

These ongoing political speculations are entertaining, but they are getting us
nowhere.

~~~
wmf
As posted twice in this thread already:
<http://www.kaourantin.net/2010/02/core-animation.html>

They're currently burning a lot of cycles just drawing to the screen.

~~~
voidpointer
Yep, that is already quite interesting. He doesn't say how this compares to
the situation on windows (and linux). Nevertheless - this is already far more
substantial.

------
coldnose
If Adobe wants access to h264 acceleration, use the QuickTime libraries.

In fact, why isn't Adobe using QTKit? Why are they rolling out their own
appalling h264 implementation?

~~~
wmf
Adobe claims there's a mismatch between QTKit and Flash Player's rendering
model, so using QTKit would either introduce _more_ overhead or require a re-
architecture of Flash Player.

~~~
Anechoic
How does Perian handle it?

~~~
duskwuff
Perian is just a set of decoders for QuickTime, not a full video player
pipeline.

~~~
GeneralMaximus
Yes. Perian mostly includes ffmpeg decoders that plug into the OS X Component
Manager.

------
sparky
I don't see how the fact that other developers aren't complaining is proof
that hardware acceleration is not useful. There is a full spectrum of how much
access you allow browser plugins and client-side code to features of the
underlying OS and hardware. Apple has chosen a relatively conservative point
along that spectrum, Microsoft chose a more aggressive one (ActiveX). There is
an obvious tradeoff between capabilities/performance and security. Google,
with its Native Client sandbox, static analysis tools, etc. is attempting to
get the performance of ActiveX with the security of more stringent sandboxes.
This is an extraordinarily difficult problem, and Apple is justified in not
wanting to deal with it. However, they are not justified in saying they're not
leaving performance on the table.

Adobe should be able to improve H.264 decode performance without HW
acceleration, but it is unclear what the upper bound is on performance when
running inside the browser sandbox. Certainly it can do no better than a
native app.

EDIT: wmf is probably right; though there is no browser-specific sandbox that
prevents third-party browsers from allowing plugins access to underlying OS
APIs, such an API for HW-accelerated video decoding doesn't exist. It's
unclear to me if acceleration is just not supported by the driver at all, or
if the capability is only exposed via a private API, reserving it for first-
party apps like Quicktime. Certainly many of the GPUs included in Apple
products support hardware acceleration, so it seems to be primarily a software
issue.

~~~
wmf
I don't think OS X has any browser plugin sandbox. The issue is not that
browser plugins are denied access to the H.264 API for security reasons;
_there is no public H.264 API_.

Edit: There is a private H.264 API that is used by QuickTime.

------
neilc
_Apple’s own QuickTime on Snow Leopard only makes use of H.264 hardware
acceleration with a single graphics card: the Nvidia 9400M. If you don’t have
that graphics card in your Mac, you don’t get H.264 hardware acceleration,
period._

Seems very surprising if H264 hardware accel is not also supported by the
9600M GT (which is an upgrade on some models of the MBP).

~~~
frou_dh
Those MBPs have a 9600 in addition to the 9400.

~~~
neilc
Right -- but as far as I know, switching between the 9400 and 9600 requires
logging out. Seems strange if you'd actually see _worse_ H264 performance
using the 9600 than the 9400.

~~~
yuvi
The 9400 is still active when the 9600 is; you can use both at the same with
with OpenCL for instance.

And I'd imagine that there's only one video decode ASIC between the two of
them, no need to uselessly duplicate hardware.

~~~
neilc
Interesting. Thanks for the info!

------
armandososa
This is off-topic, but, why does Gruber ends his posts with open ended
questions when there's no way of leaving comments?

Sites like CopyBlogger always suggest that ending a post with a question or
two is a way to make sure that people will feel compelled to comment. What's
the reason here?

Is he (ab)using sites like HN as his comment system? Or is this a new form of
linkbait?

~~~
tvon
It was a rhetorical question.

~~~
armandososa
I don't think so. Aren't rhetorical questions devices intended to reinforce a
point whose nobody shoukd answer? Do we even need an answer regarding the
access of a plugin to the hardware card?

See? that's a rhetorical question. Or isn't it?

------
statictype
>Lastly, does anyone really think it would be a good idea for web content
plugins to have direct access to graphics card hardware?

Well, since moving all applications 'into the cloud' seems to be all the rage
these days, it's inevitable that browsers expose deeper functionality of the
underlying operating system. So, no, its not that unreasonable to expect it.

------
hardwareguy
Is there some reason adobe can't use OpenCL to accelerate video decoding?

------
wendroid
What is mildly amusing is that Gnash has had H.264 HW acceleration available
for months.

[http://www.phoronix.com/scan.php?page=news_item&px=NzU1M...](http://www.phoronix.com/scan.php?page=news_item&px=NzU1MA)

[http://www.splitted-
desktop.com/static/en/pdf/actu/Linux_wit...](http://www.splitted-
desktop.com/static/en/pdf/actu/Linux_with_Gnash.pdf)

------
mooted
IMHO, Adobe should definitely act more responsible and finetune Flash Player
to perform better across all platforms.

But i disagree with John Gruber.

#1) Flash is not "slower" on Mac . It uses up too much resources compared to
its Windows edition. I switch between Windows(work) and Mac (personal) all the
time and i have never seen anything Flash playing "slower" on mac.Flash makes
use of GPU access (if required) not just for video playback. I assume Adobe's
excuse for resource hungriness is , 'too much time marketing'?

#2) As <http://www.apple.com/quicktime/guide/hd/recommendations.html>
suggests, without a card you are going to experience crappy playback for HD
video on Quicktime,Flash plugin and everything.

#3)John is comparing native desktop video playback tools to a plugin that
lives inside a browser.

Lastly.. read staunch's comment.

Why doesnt John have comments enabled in his blog?

~~~
mattdw
> _Flash is not "slower" on Mac . It uses up too much resources compared to
> its Windows edition. I switch between Windows(work) and Mac (personal) all
> the time and i have never seen anything Flash playing "slower" on mac._

I think you'll find that, with regards to computer software "slower" and "uses
more resources" are generally interchangable; it's a trade-off. And "slower"
can be quite obviously observed when a "uses more resources" app hits a
resource limit. For instance, there are flash games (not videos -- _games_)
which are so choppy as to be unplayable on my dual core 2.5GHz MBP -- because
it uses too much of "more resources," and runs out of cpu cycles.

~~~
mooted
"slower" means "choppy" and is not interchangeable with "use more resources"
as you suggests. I have never seen any flash content that runs choppy on my 2
GHz Macbook. Post an example and back up your claim.

------
Que
Such constant extreme unfounded evangelism for Apple is making it very
difficult to extract any true insight from John Gruber's "articles".

------
radley
IDEA: why not get Adobe's perspective before hitting "Publish"? Two views are
better than rants.

~~~
radley
Oh that's right. This is better as a one-sided topic...

