Yes vade you are correct about the capabilities of the Decklink. 
I am using QuartzComposerOffline sample application's code already for writing 
frames to offscreen pixel buffer, I will try frame buffer option too but I 
don't think that would improve performance.
That pixel buffer is copied into the decklink's video buffer directly in a 
callback provided by decklink API
        //Render a frame from the composition at the specified time
        if(![_renderer renderAtTime:time arguments:nil])
                return;
        //Read pixels back from the OpenGL pixel buffer in ARGB 32 bits format 
- For extra safety, we save / restore the OpenGL states we change 
        glGetIntegerv(GL_PACK_ROW_LENGTH, &save);
        glPixelStorei(GL_PACK_ROW_LENGTH, _scratchBufferRowBytes / 4);
#if __BIG_ENDIAN__
        glReadPixels(0, 0, width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 
nextWord);
#else
        //glReadPixels(0, 0, width, height, GL_BGRA_EXT, 
GL_UNSIGNED_INT_8_8_8_8, _scratchBufferPtr);
        glReadPixels(0, 0, width, height, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8, 
nextWord);
#endif
        glPixelStorei(GL_PACK_ROW_LENGTH, save);

As you can see "nextWord" is the decklink video buffer created using decklink's 
API.  scratchBufferRowBytes was initialized earlier using following code
//Create a scratch buffer used to downloads the pixels from the OpenGL pixel 
buffer - For optimal performances the buffer is paged-aligned and the rowbytes 
is a multiple of 64 bytes_scratchBufferRowBytes = (width * 4 + 63) & ~63; 
So this means that the application is using GPU capabilities and right now I am 
not concerned about antialiasing and other RT effects, As a first step I am 
only concerned the title to scroll smoothly at 25fps or 50fps.
Now either it is not possible with these card at all or there is some software 
level trick that I am missing in my code.
ThanksNisar

Subject: Re: exporting a composition to a quicktime movie
From: dokt...@mac.com
Date: Sat, 25 Dec 2010 10:16:49 -0500
CC: quartzcomposer-dev@lists.apple.com
To: nisar...@hotmail.com



if you are rendering out to the decklink, then you do not have any GL 
acceleration and are using software rendering. The Decklink and AJA sty;e cards 
do not have any GL facilities built in, so you will get CPU side rendering.  
That might account for some of the sluggishness that you are seeing.
You might be better off rendering to a CGLContext and an offscreen FBO, and 
doing readback yourself and sending that to your decklink's quicktime output 
session. Rendering directly to the Decklink and AJA will guarantee sup-par 
performance due to QCs OpenGL requirement and those cards lack of hardware 
acceleration for it.
Good luck.


On Dec 25, 2010, at 6:29 AM, Nisar Ahmed wrote:Quartz crystal is not a plugin 
so I cannot use it in my xcode application, but the processing it is doing on 
each frame can be done inside the xcode application as I am using core video's 
display link to fetch a frame from composition (QCRenderer's renderAtTime). 
CoreVideo's display link syncs with the monitor's refresh rate which is 60Hz 
and renders smoothly on the desktop but at 25fps the result is choppy on 
Decklink as well. The hops are not an issue on the desktop but it is on the 
Decklink SDI output.
I would like to know what quartz crystal does to each frame inside the code so 
that I can do that to my composition frames too before sending it to SDI card's 
memory.
Dear Achim,
I can understand the fps issue you are taking about but in my application I 
have used displaylink which can be set to callback a function at 25fps as well 
and inside that callback we can fetch next frame by using QCRendere's 
renderAtTime function. Also hops are not an issue on computer's monitor, the 
requirement is a smooth playback through the video card not the GPU which is 
Decklink in my case.
  
Subject: Re: exporting a composition to a quicktime movie
From: dokt...@mac.com
Date: Fri, 24 Dec 2010 16:18:01 -0500
CC: quartzcomposer-dev@lists.apple.com
To: nisar...@hotmail.com

It might be helpful to describe why the movie is poor. What is the expected 
result, what do you actually see, etc.
If the issue is flickering text, then yes, Quartz Composer renders at 60fps, DV 
@ 25 will make the title crawl look choppy since there are less frames to show 
the text crawl between two positions. Doing smooth titles is not easy at high 
speed, low framerate, there are some tricks you can do, but the best thing is 
to adjust the speed of the scrolling until it looks good.
Maybe look into Quartz Crystal from Kineme and use frame blending which will 
help ease the "pops" in position between consecutive frames.
Is that the issue you are noticing?


On Dec 24, 2010, at 7:41 AM, Nisar Ahmed wrote:I am trying to export a quartz 
composition movie to a quicktime movie using quicktime pro but the result is 
poor as compared to the original composition file.
I am attaching the composition you can try opening it with quicktime pro and 
exporting it to dv-pal movie 25fps and see the result. I have also tried other 
combinations but failed to reproduce the expected result.
Thanks in advanceNisar<crawler.qtz> 
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/doktorp%40mac.com

This email sent to dokt...@mac.com

                                          
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to