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: image quality



Hi Dave;

On 25-Jun-08, at 1:41 PM, Dave McCarthy wrote:


Here is some pseudo code for an old but still-used function:

OpenMovieFile(...&movieRefNum,fsRdPerm);
NewMovieFromFile(&movie,movieRefNum,...newMovieActive,...);
CloseMovieFile(movieRefNum);

gworld = ... (allocate a gworld 1920x1080);

SetMovieGWorld(movie,gworld,NULL);
SetMovieBox(movie,&a1920x1080Rect);

for (frame = 0; frame < numFrames; ++frame)
{
movieTime = ConvertFrameToMovieTime(frame);

SetMovieTimeValue(movie,movieTime);
MoviesTask(movie,0);

// save the gworld contents somewhere
}

Now here's my issue: with certain source movies, for example one encoded with the Apple XDCAM HD 1080i60 codec, the encoded frame is 1440x1080 and QuickTime is using a not-particularly-great scaler to give the full 1920 width. The resulting gworld therefore is not as well-defined as it could be. Is there a way to tell QuickTime that I'm more interested in quality than speed for this piece of code?

Yes, assuming Apple's render actually listens to what we tell it do via track settings..

You need to walk through all the video tracks in the movie and then do the following for each video track.

theTrack = GetMovieIndTrack(thisMovie, theTrackid);
if (theTrack > -1)
SetTrackLoadSettings(theTrack,0, 0, 0,hintsHighQuality);

That sets the rendering quality to maximum.

Also to work around some bugs, it's best to call 

SetMovieActive(thisMovie,false);

it right after NewMovieFromFile() and then set up the environment (i.e. SetTrackLoadSettings(), SetMovieGWorld(), SetMovieBox() etc.)

and lastly call

SetMovieActive(thisMovie,true);

which in the past forced QT to rebuild the rendering pipeline for the codec(s).

Hope That Helps..

Milton J. Aupperle
President
ASC - Aupperle Services and Contracting
Mac Software (Drivers, Components and Application) Specialist
#1005 - 815 14th Avenue. S.W.
Calgary Alberta T2R0N5
1-(403)-229-9456
www.outcastsoft.com


 _______________________________________________
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

References: 
 >image quality (From: Dave McCarthy <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.