Post

Replies

Boosts

Views

Activity

hdr dolby vision video color correction to 8 bit still images
Hey guys, tried to follow the super confusing doc on this, but no luck yet. https://developer.apple.com/av-foundation/Incorporating-HDR-video-with-Dolby-Vision-into-your-apps.pdf I have code that uses AVAssetReader and AVAssetReaderTrackOutput to directly pull frames from a video, but the colors are wrong for HDR dolby videos. Basically what I want is to extract frames from an HDR Dolby video as images and have those images not be the wrong color. Don't care if they are only 8 bit per color instead of 10 and all the all new stuff, just the closest that old fashioned 8 bit per color supports. I added the statement marked // added for dolby hdr per the above doc, (spread across several lines), no luck, still bad colors. Any hints of what I am missing? NSMutableDictionary* dictionary = [[NSMutableDictionary alloc] init];                                [dictionary setObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA] forKey:(NSString*)kCVPixelBufferPixelFormatTypeKey];                // added for dolby hdr                dictionary[AVVideoColorPropertiesKey] = @{                 AVVideoColorPrimariesKey: AVVideoColorPrimaries_ITU_R_709_2,                 AVVideoTransferFunctionKey: AVVideoTransferFunction_ITU_R_709_2,                 AVVideoYCbCrMatrixKey: AVVideoYCbCrMatrix_ITU_R_709_2                 };                                AVAssetReaderTrackOutput* asset_reader_output = [[AVAssetReaderTrackOutput alloc] initWithTrack:video_track outputSettings:dictionary];                                  [asset_reader addOutput:asset_reader_output]; // from here we get sample buffers like this CMSampleBufferRef buffer2 = [asset_reader_output copyNextSampleBuffer]; // then pixel buffer  CVPixelBufferRef inputPixelBuffer = CMSampleBufferGetImageBuffer(buffer2); // then a CIImage   CIImage* ciImage = [CIImage imageWithCVPixelBuffer:inputPixelBuffer]; // one vid frame then we use standard stuff to convert that to a CGImage/UIImage
2
0
2.1k
Mar ’23
set background color of [UIImage systemImageNamed: ... ]
hello all, any idea if you can set the background color of one of these new SFSymbol images? i tried this paletteColors: method, it seems to take only the first color and use it as the foreground color   UIImageSymbolConfiguration * config =         [UIImageSymbolConfiguration configurationWithPaletteColors:@[[UIColor blueColor], [UIColor redColor]]];     UIImage * confMatImageSel = [UIImage systemImageNamed:@"square.grid.2x2"             withConfiguration:config];
Topic: Design SubTopic: General Tags:
2
0
2.4k
Oct ’22
expire test subscription immediately?
is there a way to make a test subscription in-app purchase expire immediately, for faster testing? it seems exceedingly complicated to test subscriptions if we have to a) wait until the next day for expiry, or b) keep on creating new apple ids to get into a fully unsubscribed state? it is still kind of madness testing this stuff, after all the years it has been available.
2
0
31
1d
CIToneCurve spline formulation?
Can anyone from apple provide the spline formulation that is used in the CIToneCurve filter?The documentation says that a spline is passed thru the points you give it, but thereare a lot of spline types in the world, and they all can yield different shapes thru the same set of points.
1
0
781
Dec ’21
neural engine for model training?
Can anyone clarify which devices or chips the so-called "neural engine" can be used for machine learning model Training? As opposed to inference (or prediction)? And can external libraries such as Tensorflow (perhaps via the browser-based javascript library) access the neural engine in any manner for training or inference?
1
0
2.4k
Mar ’22
mac app store rankings
does anyone know if the mac app store ranking system has changed recently for mac apps? my mac apps have dropped like a proverbial rock in the ranking system near the end of last week. has any one done any experiments to see if mac app store rankings are higher if you recompile your apps for M1 apple silicon systems?
1
0
945
Feb ’21
imessage extension not getting touch events
hi all, trying to create an imessage extension example based upon the Hello World story board that shows up when you create the extension. if i add a button to the hello world story board, and hook up the button to a method, i dont seem to be getting any tap events on that button. i tried also creating a button manually with [UIButton buttonWithType] and adding a target to it...the buttons show up, but they don't take tap events. i used the UI examiner in xcode, and touch events seem to be enabled on all views in the imsg extension view stack. i do see a strange message in the xcode console which i havent seen before: [PPT] Error creating the CFMessagePort needed to communicate with PPT. any ideas? PS: this is on simulator. i tried on device, same behavior. no touch events.
1
0
3.1k
Feb ’22