My app retrieves the decompressed images from QT movies as fast as
possible (>realtime), and I have long-standing working code using
GetMoviePict and QDPictDrawToCGContext. However, performance is poor
and when I look at it with Shark it is clear why --- the codec is
only a small portion of the time per frame. (The case I'm
interested in especially is HD ProRes on 8-core machines.) There is
a NewGWorld call within GetMoviePict, and that image is then erased.
After the codec runs, the pict is rerendered into the CGContext.
Each of those single-threaded operations takes several longer than
the codec run (which is easy to see---all 8 cores fire up to decode
as expected.) Since newly-allocated storage is used within
GetMoviePict, there are a fantastic number of zero-fill faults
throughout as well. The codec is maybe 10% of the time per frame, a
mediocre balancing result.
Is there a more efficient access path? Ideally I'd want to be able
to supply recycled storage for the codec to render the image into
directly. I'm not sure if there is Core Video stuff that can be used
for this, or it is just yet another wrapper around the same slow
stuff. If there is a way, a pointer to a code sample would be
appreciated. Note that I'm looking for a generic movie-reading
approach that works for any codec and source, not something I have
to build specially based on reading and decoding the contents of a
particular movie.
Alternatively, is there a way to grab the bits directly from the
Pict, and avoid the second rerendering stage?
In the ideal world, I'd like to give the codec the output surface
format (ie a storage-efficient 24b/pixel form) to eliminate the
reformating operation I currently have to perform as well. OpenGL
has this right!
Or is all of this the impetus for "Quicktime X"?
This sample code may give you some starting points about the modern
way to extract image from a Movie:
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden
This email sent to email@hidden