On 19 Jan 2015, at 17:53, Quincey Morris <quinceymor...@rivergatesoftware.com> wrote:
> On Jan 19, 2015, at 04:02 , Kevin Meaney <k...@yvs.eu.com> wrote: >> >> What I'd like to be able to do is to compare profiles obtained this way with >> what I think must be AVFoundation's equivalent e.g.: >> >> AVVideoColorPropertiesKey : [ >> AVVideoColorPrimariesKey : AVVideoColorPrimaries_ITU_R_709_2, >> AVVideoTransferFunctionKey : >> AVVideoTransferFunction_ITU_R_709_2, >> AVVideoYCbCrMatrixKey : AVVideoYCbCrMatrix_ITU_R_601_4 >> ], >> >> But the documentation is so poor, I do not understand what things like >> AVVideoColorPrimaries_ITU_R_709_2 mean, Apple docs don't help and my duck >> duck go searches haven't helped. > > Yes, this sucks, but it’s not quite Apple’s fault. This area (colorspaces) is > a morass of disconnected information, and you have no real alternative to > putting it together yourself. Each information source has different > assumptions about your prior knowledge, your intentions and your workflow, > and so doesn’t bother to connect its information to anything else. In many > cases, you can’t even tell for sure which *direction* data is moving, let > alone what’s happening to it. > > Wikipedia is a good place to start. “ITU_R_709_2” refers to ITU Rec. BT-709: > > http://en.wikipedia.org/wiki/Rec._709 > > “ITU_R_601” is ITU Rec. BT-601: > > http://en.wikipedia.org/wiki/Rec._601 I've read those articles recently, but well kittens could get as much practical information out of them as I have in terms of understanding how this fits together within AV Foundation. >> >> What I'd like to know is, is the color profile of the image generated from >> an imported movie the same as the color profile equivalent for the movie >> (see AVFoundation color property keys above) I'm creating from individual >> frames? It would be ideal if I could keep everything using the same profile >> color space in my processing pipeline. > > Because different color space names may imply different underlying color > space conversion technologies, about all a mere mortal can do is compare > names. However, I’m not sure what “keep” means in that last sentence. If you > have an input image file, it already has a color space (explicit or implied). > Your output movie has a color space that you specified when you started. If > they don’t match, there’s nothing you can do to “keep” them the same, you > simply have to do a conversion. > > It’s the AVAssetWriter’s job to make the conversion for you. The point is you > don’t *want* to deal with anything beyond that. If I'm reading frames from a HD video, doing some processing of those frames and writing a HD video with those frames there is a good chance input and output are using the same profile. When that is the case I'd like not to do unnecessary color space conversions. > “It’s kittens all the way down.” More kittens are always part of the solution. Kevin _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com