藉口,我的英語的QuickTime - AVID,ITU-R 601(16-235)選項
我需要使用AVID編解碼器導入的.mov文件。 在導入設置中的AVID Composer程序中,可以通過安裝選項RGB(0-255)或601(16-235)來自定義色階。
如何在代碼中設置此選項(601)?
我試着設置會話時設置了:
long lwidth;
CHECK_FAILED(m_pMt->get_Pixels(&lwidth));
SInt32 width = lwidth;
number = CFNumberCreate(NULL, kCFNumberSInt32Type, &width);
CFDictionaryAddValue(pixelBufferAttributes, kCVPixelBufferWidthKey, number);
CFRelease(number);
long lheight;
CHECK_FAILED(m_pMt->get_Lines(&lheight));
SInt32 height = lheight;
number = CFNumberCreate(NULL, kCFNumberSInt32Type, &height);
CFDictionaryAddValue(pixelBufferAttributes, kCVPixelBufferHeightKey, number);
CFRelease(number);
double gamma = 2.199997;
// Always seems to equal 2.5 for RGB colorspaces and 2.199997 for YUV
number = CFNumberCreate(NULL, kCFNumberDoubleType, &gamma);
CFDictionaryAddValue(pixelBufferAttributes, kCVImageBufferGammaLevelKey, number);
CFRelease(number);
CFDictionaryAddValue(pixelBufferAttributes, kCVImageBufferYCbCrMatrixKey, kCVImageBufferYCbCrMatrix_ITU_R_601_4);
CHECK_OSSTATUS(ICMDecompressionSessionCreate(NULL, imageDesc, NULL, pixelBufferAttributes, &trackingCallbackRecord, &m_decompressionSession));
但沒有奏效。
如果你要解決的問題是從你也許可以解壓縮會議收到「601(16-235)」數據通過從解壓縮會話請求YUV數據來完成此操作。看看我的'編輯'如何做到這一點... – Bjoern 2009-12-16 10:05:51