Posts

Post not yet marked as solved
1 Replies
592 Views
I am currently working with AVAssetWriterInput with interlaced source.I want to know the proper procedure to preserve 'fiel' format description extension through AVAssetWriterInput compression operation.Do you anyone have an answer on this?>>Technical Note TN2162>>Uncompressed Y´CbCr Video in QuickTime Files>>The 'fiel' ImageDescription Extension: Field/Frame Information//What I have tried is following:First decode into sample buffer with Field/Frame information- Decode DV-NTSC source and get current FieldCount/Detail of source data- Create a kCVPixelFormatType_422YpCbCr8 CVImageBuffer from source- CMSetAttachments() kCVImageBufferFieldCountKey/kCVImageBufferFieldDetailKey with FieldCount=2/FieldDetail=14 to imageBuffer, same as DV-NTSC source- CMVideoFormatDescriptionCreateForImageBuffer()- CMSampleBufferCreateForImageBuffer()- Now decompressed samplebuffer has kCMFormatDescriptionExtension_FieldXXX same as sourceSecond encode using ProRes422- Next I create AVAssetWriterInput to transcode from _422YpCbCr8 into AVVideoCodecAppleProRes422- Now AVAssetWriter can produce ProRes422 mov file, but it does not contain the format description extension 'fiel'.- ProRes422 Encoder does preserve 'colr', 'pasp', 'clap' same as source, but no 'fiel' is there.I have also tried to serve format description with kCMFormatDescriptionExtension_FieldXXX with initWithMediaType:outputSettings:sourceFormatHint:but no success.//
Posted
by MyCometG3.
Last updated
.
Post marked as solved
1 Replies
499 Views
Hi,I'd like to understand vImageConver for ARGB2101010. Please help me about endianness.> vImageConvert_ARGB16UToARGB2101010> vImageConvert_ARGB16UToXRGB2101010> vImageConvert_ARGB2101010ToARGB16UUnder header they show it is "little endian" a.k.a. "host endian".Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h 10171 This format is 10-bit little endian 32-bit pixels. The 2 MSB are zero.But if I understand correctly, described pseudo code in header shows big endian to host endian conversion.(read in ARGB2101010)10180 The per-pixel operation is: 10181 @code 10182 uint32_t *srcPixel = src.data; 10183 uint32_t pixel = ntohl(srcPixel[0]); 10184 srcPixel += 1;On the other hand, described pseudo code in header seems to run in "host endian", in other word "little endian".(write out ARGB2101010)10303 uint32_t *destPixel = dest.data; 10304 destPixel[0] = (A2 << 30) | (R10 << 20) | (G10 << 10) | (B10 << 0); 10305 destPixel += 1; 10306 @endcodeIf the header doc is correct, vImage runs as "Reading in BigEndian and Writing in HostEndian".There should be some inconsistencies.Please tell me how to use these APIs.
Posted
by MyCometG3.
Last updated
.
Post not yet marked as solved
2 Replies
801 Views
I am trying to rewrite old FireWire CamCorder controll command line utilities into XPC Service.Old utility was modified version of simpleAVCSample.c in legacy sample codeAnd existing command binary works on macOS 10.14I tried same IOKit/IOCFPlugIn code in Application or XPCServiceBut they failed at following step kern_return_t result = IOCreatePlugInInterfaceForService( service, kIOFireWireAVCLibUnitTypeID, kIOCFPlugInInterfaceID, &interface,&score); // 0xe00002be = kIOReturnNoResources in IOReturn.hAnd always console.app logged sandboxd rejected as: Sandbox: testAVC(8332) System Policy: deny(1) iokit-open IOFireWireAVCUserClient Violation: System Policy: deny(1) iokit-open IOFireWireAVCUserClientBut this is always logged even if I DO NOT check sandbox entitlement.I also tried "com.apple.security.device.firewire" entitlement, because /System/Library/Sandbox/Profiles/Application.sb contains following part as:(when (entitlement "com.apple.security.device.firewire") (allow iokit-open (iokit-user-client-class "IOFireWireUserClient")) (allow iokit-open (iokit-user-client-class "IOFireWireAVCUserClient")) (allow iokit-open (iokit-user-client-class "IOFireWireAVCProtocolUserClient")) (allow iokit-set-properties (iokit-property "SummonNub")))But it also does not help.Please give me some hint how to resolve IOCreatePlugInInterfaceForService() error.
Posted
by MyCometG3.
Last updated
.