Mailing Lists: Apple Mailing Lists

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

ICMDecompressionSession and deinterlace (sometimes)



Hi,

I have a Windows application that is extracting frames from DV movies. The frames need to be deinterlaced so I use the following code based on Technical Q&A QA1460 (error handling removed for clarity):

CodecQ codecAccuracy = codecHighQuality;
ICMFieldMode fieldMode = kICMFieldMode_DeinterlaceFields;

ICMDecompressionSessionOptionsCreate(kCFAllocatorDefault, &sessionOptions);

ICMDecompressionSessionOptionsSetProperty(sessionOptions,
          kQTPropertyClass_ICMDecompressionSessionOptions,
          kICMDecompressionSessionOptionsPropertyID_Accuracy,
          sizeof(CodecQ),
          &codecAccuracy);

ICMDecompressionSessionOptionsSetProperty(sessionOptions,
          kQTPropertyClass_ICMDecompressionSessionOptions,
          kICMDecompressionSessionOptionsPropertyID_FieldMode,
          sizeof(ICMFieldMode),
          &fieldMode);

ICMDecompressionSessionCreate( NULL, imageDesc, sessionOptions,
pixelBufferAttributes, &trackingCallbackRecord, decompressionSession );


ICMDecompressionSessionOptionsRelease(sessionOptions);

Each frame is extracted using:

frameTime.recordSize = sizeof(ICMFrameTimeRecord);
*(TimeValue64 *)&frameTime.value = sampleDecodeTime;
frameTime.scale = GetMediaTimeScale(m_VideoMedia);
frameTime.rate = fixed1;
frameTime.frameNumber = (long)sampleNumber;

ICMDecompressionSessionDecodeFrame(m_videoDecompressionSession,
        sampleData, sampleDataSize, NULL, &frameTime, sampleData);

And this works, but **not on all systems**. On about half of systems tested so far kICMFieldMode_DeinterlaceFields has no affect whatsoever - frames are clearly still interlaced. Source movie is the same, application binaries are the same, QuickTime versions are the same (tested with 7.1.3 and 7.1.5). QuickTime SDK is 7.0.3. The only clue (and this may be a completely red herring) is that the systems that do deinterlace are in Europe and those that don't are in the US!

So:

a) Does ICMDecompressionSession depend on any external OS/graphics/QuickTime configuration or preferences that might alter the way these settings behave?

b) Any other idea what I might be doing wrong or what I should try?

Thanks,

John.

_________________________________________________________
John Cromie
Skylark Associates Ltd. http://www.skylark.ie


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