VideoToolBox中是否可以控制RGB转YUV矩阵?

Is it possible to control the conversion of RGB to YUV matrix in VideoToolBox?

我发现不同的 Iphone 硬件编码器有不同的矩阵用于将输入 RGB 转换为 YUV.That 是,在函数 OSStatus VTCompressionSessionEncodeFrame(VTCompressionSessionRef session, CVImageBufferRef imageBuffer, CMTime presentationTimeStamp, CMTime duration, CFDictionaryRef frameProperties, void *sourceFrameRefcon, VTEncodeInfoFlags *infoFlagsOut); imageBuffer格式是RGB.Before编码,VideoToolBox会把RGB转YUV发给encoder.I想知道VideoToolBox用什么矩阵把RGB转YUV,如何控制选区转换矩阵。 硬件编码器VideoToolbox的输入参数中,只有 kVTCompressionPropertyKey_YCbCrMatrix与颜色有关conversion.But该参数不控制输入RGB转YUV矩阵。因为我尝试输入不同的值,没有change.This导致解码时无法匹配矩阵,导致色aberration.I在网上找了半天。但是没有用。请帮助或尝试提供一些想法如何实现这一目标。

问题已解决。设置kVTCompressionPropertyKey_PixelTransferProperties控制VideoToolBox中RGB转YUV矩阵

    CFMutableDictionaryRef attrs = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
    CFDictionarySetValue(attrs, kVTPixelTransferPropertyKey_DestinationYCbCrMatrix, kCVImageBufferYCbCrMatrix_ITU_R_601_4);//kCVImageBufferYCbCrMatrix_ITU_R_709_2
    status = VTSessionSetProperty(_encoderSession, kVTCompressionPropertyKey_PixelTransferProperties, attrs);