Regarding the DR plugin SDK - how are you guys able to override 'pIOPropColorModel' once it's set in s_RegisterCodecs? for example, clrNV12 @ 4:2:0
// NV12 4:2:0
uint32_t val = clrNV12;
codecInfo.SetProperty(pIOPropColorModel, propTypeUInt32, &val, 1);
uint8_t hSampling = 2;
uint8_t vSampling = 1;
codecInfo.SetProperty(pIOPropHSubsampling, propTypeUInt8, &hSampling, 1);
codecInfo.SetProperty(pIOPropVSubsampling, propTypeUInt8, &vSampling, 1);
The sample x264_plugin_encoder makes it look like you can override it in DoInit(HostPropertyCollectionRef* p_pProps) with the following
// UYVY 4:2:2
uint32_t val = clrUYVY
p_pProps->SetProperty(pIOPropColorModel, propTypeUInt32, &vColorModel, 1);
uint8_t hSampling = 2;
uint8_t vSampling = 2;
codecInfo.SetProperty(pIOPropHSubsampling, propTypeUInt8, &hSampling, 1);
codecInfo.SetProperty(pIOPropVSubsampling, propTypeUInt8, &vSampling, 1);
But the frame buffer being passed to DoProcess(HostBufferRef* p_pBuff) is definitely still NV12 4:2:0 and not UYVY 4:2:2. It seems as if one has to write a plugin, you have to pick a 'pIOPropColorModel' and set it to a pixel format that's larger or equal to what you need, then if one were to use a CODEC that uses a lesser pixel format, then one has to manually convert it which is quite inefficent.
I'm trying to modify the x265_encoder_plugin and make it more efficient by getting rid of the vector copy needed to convert from UYVY -> NV12.