Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Efficient decoding - replace GetMoviePict?



Russ wrote:

I could conceivably request YUV results and write my own parallelized converter, but that would be a pain and it's not obvious how to tell when this is a good idea, given an arbitrary movie (ie if the codec already produces RGB it would be counterproductive, how to tell?).

You can ask a codec for its wanted destination pixel type list.

I also have major zero-fill problems --- when ingesting footage my app is running as a RAM cache so gobbling huge amounts of RAM is a given.

I don't understand what you mean by "running as a RAM cache".
Always try to reuse memory from a pool instead of allocating memory for each frame anew.
I remember sending frames from one application to another using CFMessagePort and crashing because my 4GB amount of memory was used up or because the user's hard disk got filled with swapped out data.

**** Now the show-stopper **** When I try reading a different movie: my code reads all the "interesting times" from the movie; to get a given frame, it does a SetMovieTime with the corresponding interesting time built up into a TimeRecord containing the interesting time, the scale value, and the timebase (as obtained earlier from the movie). So it's all exact integer timing. The interesting times in the movie have some variability, at frame 10 in this particular movie, it is timevalue 201. But, when the VisualContextIMageAvailableCallback is called, I extract the timevalue and it is 200! Since it's waiting for the requested timevalue 201, the reader hangs permanently.

This may be caused by the movie and media time scales being different. This leads to rounding errors in track or movie sample durations. Sometimes you can solve this by setting the movie time scale equal to the media time scale before manipulating the movie with the next interesting time routines.
It looks like QT is calculating times in this case as previous time + duration which isn't always correct.

Jan E.
 _______________________________________________
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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.