Late 2008 MacBook / MacBook Pro GPU Video Decoding

Random chit-chat and anything that doesn't belong elsewhere
Forum rules
Forum Rules can be found here

Late 2008 MacBook / MacBook Pro GPU Video Decoding

Postby jbrjake » Sat Oct 18, 2008 5:43 pm

So MacRumors has this story claiming the new MBs and MBPs use the GPU for decoding h.264. This sounded crazy to me...wouldn't Jobs have highlighted this at the launch event?

One would think so, and yet...it's true.

Running lsof on QuickTime reveals it's using: /System/Library/QuickTime/AppleVAH264HW.component/Contents/MacOS/AppleVAH264HW
(Yes, that's HW as in "hardware.")

Running strings on the component and searching for NV reveals:
Code: Select all
15NVDA_BufferPool
ava error: create_slice_dec_NVIDIA %s driverInstance == NULL ...
ava error: create_slice_dec_NVIDIA %s SetBufferInfo ...
ava error: create_slice_dec_NVIDIA %s kAVA_HDDisplayCopyOrientation SetParameter error = %d
ava error: create_slice_dec_NVIDIA vp3 film_grain (%08x), SetParameter error = %d
ava error: create_slice_dec_NVIDIA vp3 film_grain (%08x), is not supported
ava error: create_slice_dec_NVIDIA SetParameter is NULL
ava info: slice_decoder_completion_NVIDIA_VP2 queryNoBlock = %d , usleepTime = %d(uSec) [%d/%d , cnt = %d] ...
ava warning: slice_decoder_completion_NVIDIA_VP2 SetParameter kAVAQuerySleepTimeUsec error = %d  %d
ava error: slice_decoder_completion_NVIDIA_VP2 requestCmd ...
ava error: slice_decoder_completion_NVIDIA_VP2 getFrameInfo (begin)...
ava error: slice_decoder_completion_NVIDIA_VP2 getFrameInfo (end)...
ava warning: slice_decoder_completion_NVIDIA_VP2 SetParameter kAVAQuerySleepTimeUsec error = %d  %d:%d:%d
ava error: slice_decoder_completion_NVIDIA_VP2 queryStatus.errorCode = %d, status = %d
ava error: slice_decoder_completion_NVIDIA_VP2 retireCmd ...
ava warning: slice_decoder_completion_NVIDIA_VP2 drop %d [%d] err = %d...
ava error: slice_decoder_sync_scheduling_NVIDIA_VP2  disable pp [%d x %d]
ava warning: slice_decoder_sync_scheduling_NVIDIA_VP2 parsing error  sid = %d [ref =%d]...
ava error: slice_decoder_sync_scheduling_NVIDIA_VP2 BeginDecode ...
ava error: slice_decoder_sync_scheduling_NVIDIA_VP2 registerBeginCmd ...
ava error: slice_decoder_sync_scheduling_NVIDIA_VP2 writePacketNoBlock 1 ...
ava error: slice_decoder_sync_scheduling_NVIDIA_VP2 Decode err = %d...
ava error: slice_decoder_sync_scheduling_NVIDIA_VP2 registerCmd ...
ava error: slice_decoder_sync_scheduling_NVIDIA_VP2 writePacketNoBlock 2 ...
ava error: slice_decoder_sync_scheduling_NVIDIA_VP2 registerEndCmd ...
ava error: slice_decoder_sync_scheduling_NVIDIA_VP2 writePacketNoBlock 3 ...
19NVDA_VP2_BufferPool

QT also loads /System/Library/Extensions/GeForceVADriver.bundle/Contents/MacOS/GeForceVADriver, and running strings on that shows all sorts of goodies:
Code: Select all
13BSPClientH264
seqCtrl:
chroma_format_idc = %ld
log2_max_frame_num_minus4 = %ld
pic_order_cnt_type = %ld
log2_max_pic_order_cnt_lsb_minus4 = %ld
delta_pic_order_always_zero_flag = %ld
num_ref_frames = %ld
pic_width_in_mbs_minus1 = %ld
pic_height_in_map_units_minus1 = %ld
frame_mbs_only_flag = %ld
mb_adaptive_frame_field_flag = %ld
direct_8x8_inference_flag = %ld
picCtrl:
entropy_coding_mode_flag = %ld
pic_order_present_flag = %ld
num_slice_groups_minus1 = %ld
slice_group_map_type = %ld
pic_size_in_map_units_minus1 = %ld
num_ref_idx_l0_active_minus1 = %ld
num_ref_idx_l1_active_minus1 = %ld
weighted_pred_flag = %ld
weighted_bipred_idc = %ld
pic_init_qp_minus26 = %ld
chroma_qp_index_offset = %ld
deblocking_filter_control_present_flag = %ld
constrained_intra_pred_flag = %ld
redundant_pic_cnt_present_flag = %ld
transform_8x8_mode_flag = %ld
second_chroma_qp_index_offset = %ld
CurrPicIdx = %ld
CurrPicOrderCnt = %ld
CurrFieldOrderCnt[0] = %ld
CurrFieldOrderCnt[1] = %ld
CurrColIdx = %ld
field_pic_flag = %ld
bottom_field_flag = %ld

Looks like it started to Snow a bit early this year ;-)

(And before anyone asks: NO, this does not help HandBrake in any way, no we can not use it for decoding video, no we can not use it for encoding video, nor is there anything anyone on our team could do to make it help...it's just cool.)
jbrjake
Developer
 
Posts: 4762
Joined: Wed Dec 13, 2006 2:38 am

 

Re: Late 2008 MacBook / MacBook Pro GPU Video Decoding

Postby belloq » Sat Oct 18, 2008 6:33 pm

Very interesting. Curious on the last point you made about Handbrake taking advantage: is this something that programs like Final Cut x, iMovie, and other non Apple software like MPEG Streamclip which do rely on Quicktime de/encoding will likely get a boost from?
belloq
 
Posts: 216
Joined: Sun Oct 12, 2008 6:09 am

Re: Late 2008 MacBook / MacBook Pro GPU Video Decoding

Postby Ritsuka » Sat Oct 18, 2008 6:43 pm

I want it on my 2007 macbook pro :|

belloq, yes every quicktime-based application will get a boost. If you are editing avchd in iMovie or Final Cut you will get a pretty big boost.
Ritsuka
Developer
 
Posts: 351
Joined: Fri Jan 12, 2007 12:29 pm

Re: Late 2008 MacBook / MacBook Pro GPU Video Decoding

Postby brianlees » Mon Oct 20, 2008 2:43 am

OK, at the risk of a flame....since this will discuss un-released software...

What I read about Snow Leopard is that GPU acceleration will be built into the OS accessible by "any application"...and it is not Quicktime specific. Am I missing something or misreading? I guess I'll have to wait until next year to see Handbrake on the snowy cat. :(
brianlees
 
Posts: 62
Joined: Wed Mar 28, 2007 3:17 am

Re: Late 2008 MacBook / MacBook Pro GPU Video Decoding

Postby Ritsuka » Mon Oct 20, 2008 8:06 am

H.264 decoding acceleration has nothing to do with opencl and cuda. It uses a specific part of the video card made only for video decoding.
Ritsuka
Developer
 
Posts: 351
Joined: Fri Jan 12, 2007 12:29 pm

Re: Late 2008 MacBook / MacBook Pro GPU Video Decoding

Postby brianlees » Wed Oct 22, 2008 1:51 am

Ah, that makes sense. So, will Handbrake support OpenCL? I'm sure it is too early to ask...but I just couldn't help myself. Of course, it could be me getting excited because I was using a server at work today to encode to AppleTV at 180+ frames per second! It is good to be the king (well, at least of my network).... Of course, I'm not sure how long that will last, since I need to use the server eventually for something!
brianlees
 
Posts: 62
Joined: Wed Mar 28, 2007 3:17 am

Re: Late 2008 MacBook / MacBook Pro GPU Video Decoding

Postby rhester » Wed Oct 22, 2008 1:56 am

As has been stated in the past, it is not a matter of HandBrake supporting any GPU PL. The open-source encoders we utilize, like x264, must support them, and as a result HandBrake will "for free".

Rodney
rhester
Developer
 
Posts: 2888
Joined: Tue Apr 18, 2006 11:24 pm
Location: Brooklyn, NY

Re: Late 2008 MacBook / MacBook Pro GPU Video Decoding

Postby LinBrake » Wed Oct 22, 2008 1:31 pm

rhester wrote:As has been stated in the past, it is not a matter of HandBrake supporting any GPU PL. The open-source encoders we utilize, like x264, must support them, and as a result HandBrake will "for free".

Rodney


It will be interesting to see Linux, FreeBSD, and Solaris releases with OpenCL implementations. I am actually curious how much of a performance boost it will give encoding as most of the encoding software available is already very efficient. QuickTime certainly needs every bit of help it can get so I'm happy to see it "released" ahead of time.
LinBrake
 
Posts: 88
Joined: Tue Oct 07, 2008 8:39 am


Return to Tiki Bar