Handbrake and Snowl Leopard's GCD and CLI

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
defender
Novice
Posts: 66
Joined: Sun Jan 04, 2009 9:41 pm

Handbrake and Snowl Leopard's GCD and CLI

Post by defender »

I use HandBrake all the time and LOVE IT!

I apologize if this question has already been asked by someone in another post. If so, perhaps someone can simply direct me to that discussion.

With Snow Leopard's Grand Central Dispatch, which better harnesses the synergistic performance benefits of multiple cores and multiple processors and with OpenCL, a programming language designed to tap into the awesome power of today's mindblowing GPU cards, Apple has decided not to wait for developers to tap into these APIs or programming languages, but Snow Leopard itself utilizes these technologies and reaps the benefits.

My question is, without any code changes at all to Handbrake, will Handbrake benefit from Snow Leopard's own use of GCD and OpenCL?

I was told by one developer that existing software "inherits" these benefits (even PowerPC apps under Rosetta! -- so they claim).

Can one expect the case to be the same for Handbrake in its current incarnation? :?:

defender
siromega
Posts: 36
Joined: Mon Jul 02, 2007 5:06 am

Re: Handbrake and Snowl Leopard's GCD and CLI

Post by siromega »

Yes, this has been asked before.

The short answer is that its out of Handbrake's developers hands. To grossly oversimply this, handbrake sits on top of x264, which does all the encoding. If x264 ever implements OpenCL and GCD then Handbrake will inherit those enhancements. x264 did have a google summer of code position open for someone to write a motion estimator in CUDA, but it doesn't seem like anything came of it.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Handbrake and Snowl Leopard's GCD and CLI

Post by TedJ »

Benchmarks performed by several HB devs pre and post upgrade to suggest the benefit is negligable, in the order or 0.1 - 0.2 fps.
defender
Novice
Posts: 66
Joined: Sun Jan 04, 2009 9:41 pm

Re: Handbrake and Snowl Leopard's GCD and CLI

Post by defender »

siromega wrote:Yes, this has been asked before.

The short answer is that its out of Handbrake's developers hands. To grossly oversimply this, handbrake sits on top of x264, which does all the encoding. If x264 ever implements OpenCL and GCD then Handbrake will inherit those enhancements. x264 did have a google summer of code position open for someone to write a motion estimator in CUDA, but it doesn't seem like anything came of it.
Thanx, siromega, for pointing me to the previous discussion. It was most helpful.

I must say I am disappointed.

In the previous discussion, rhester (Rodney) wrote:
rhester wrote:Mostly because the CUDA-based apps that are turning out "amazing performance" are actually doing very low-quality encodes and roughly virtually the same speeds could be realized *without* CUDA on equivalent processors. Even more simply, CUDA is pretty much smoke-and-mirrors for H.264 encoding outside of motion estimation, where it remains of dubious value from a coding complexity standpoint.
This is disappointing to me as a Mac user. I thought CUDA (or OpenCL) optimized and sped up x264 encoding, but if it is "faking it" or taking short cuts resulting in a lower-quality encode then I WANT NO PART OF IT!

If there is a way to disable CUDA acceleration or OpenCL or whatever so that I can get the best encode possible I'll do it. I'll sacrifice the extra time it takes to get the best quality encode (within reason).

And if Snow Leopard with Grand Central Dispatch and OpenCL affords you only a 0.1 frame rate encode speedup then it's a bust.

On an off topic, Apple has decided to Open Source the Grand Central Dispatch API as libdispatch under the Apache v2.0 licensing platform.

See: http://www.osnews.com/story/22152

I'm not sure I see the wisdom in this as the proprietary APIs of Mac OS X are what make the whole operating system and are its selling point to would-be developers and customers. By Apple's giving away the "Crown Jewels" to give a boost to Linux/Unix, I don't see how it benefits Apple.

And as far as leagues of Open Source programmers diving in the water and improving Grand Central Dispatch -- Paaah! It will probably only help Micro$oft.

Lastly, can anyone tell me how the Mac Elgato products speed up x64 encodes? Is it a processor in the dongle or a software routine In EyeTV? Does HandBrake have a check box that says, "use Elgato acceleration if available," as it does in Roxio Toast?

Thanx, everyone,

defender :oops:
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake and Snowl Leopard's GCD and CLI

Post by s55 »

HandBrake and x264 are already heavily threaded and that theading works well currently, thus GCD doesn't offer any performance benefit. It may one day make programming easier but that would be about it.
OpenCL could one day speed things up, but it'll be a good amount of time before we see if it'll really benefit x264 or not.
Lastly, can anyone tell me how the Mac Elgato products speed up x64 encodes? Is it a processor in the dongle or a software routine In EyeTV?
It's a dedicated processor on that usb stick.
Does HandBrake have a check box that says, "use Elgato acceleration if available," as it does in Roxio Toast?
Nope, Never going to happen. While they may be faster on slower machines, they sacrifice quality.
defender
Novice
Posts: 66
Joined: Sun Jan 04, 2009 9:41 pm

Re: Handbrake and Snowl Leopard's GCD and CLI

Post by defender »

Good answers s55.

Thanx,

defender
defender
Novice
Posts: 66
Joined: Sun Jan 04, 2009 9:41 pm

Re: Handbrake and Snowl Leopard's GCD and CLI

Post by defender »

s55:

I DO NOT want to sacrifice quality!

defender :|
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake and Snowl Leopard's GCD and CLI

Post by s55 »

OpenCL and GCD is nothing you, as a user, has to worry about.

It's a feature for developers. If HandBrake ever does end up with OpenCL support in the x264 lib, it certainly won't be at the expense of quality.
defender
Novice
Posts: 66
Joined: Sun Jan 04, 2009 9:41 pm

Re: Handbrake and Snowl Leopard's GCD and CLI

Post by defender »

Thanks, s55
Post Reply