Hi Ted,
Media SDK supports YUV format NV12 (this is 4:2:0) natively. The SDK also supports 2 additional YUV formats: YV12 (this is 4:2:0) and YUY2 (this is 4:2:2). To use format YV12 or YUY2 a developer must first use VPP to convert format to NV12 before feeding the input frames to encoder.
So the issue you're facing is likely due to the fact that neither NV12 or YV12 are 4:2:2 formats. You can use YUY2 if that is the type of YUV data the camera delivers. If not, you will have to do the conversion from your YUV 4:2:2 format to NV12 yourself. If that is the case you may also explore Intel Integrated Performance Primitives (IPP) which supplies a wide range of color conversion routines, it may be that one of those fits your needs.
Regards,
Petter




Need help setting up the mfxvideoparam for 422
I am just getting started using this SDK and have been able to get the sample_encode VC project to compile and convert a 4:2:0 file.
What I am trying to do is encode 4:2:2 frames output from a DeltaCast sdi board and encode them to a h.264 / mp4 file. So to start off I thought the best thing to try was to get the Init function to work without errors. After days and days of messing around and failing miserably I finally got the 4:2:0 working using: MFX_FOURCC_NV12 and MFX_CHROMAFORMAT_YUV420 and copying the exact parameters used by sample_encode. Then I tried to use:MFX_FOURCC_YV12 and MFX_CHROMAFORMAT_YUV422 and have now gone back to failing miserably. No matter what I do it comes back with MFX_ERR_INVALID_VIDEO_PARAM.
When I use MFX_FOURCC_NV12 and MFX_CHROMAFORMAT_YUV422 it comes back with MFX_WRN_INCOMPATIBLE_VIDEO_PARAM which from what I can gather the params may have fixed themselves but what got fixed?
I have been through the mediaSDK_man.pdf which by the way needs a proper index and has multiple incorrect pointers. The document has very little useful information on what parameter combinations are necessary for the different formats. The .h file is of little use in this matter as well.
What I need it a set of valid parameters that I can use as a baseline to encode 1080i (4:2:2) frames to h.264. Does anyone have a clue what are the necessary parameter settings might be? Or a document that has this kind of info?
I have not even attempted to get the surfaces initialized (much less understand what is going on), for I fear another nightmare in the making.
Please anyone, help me...
Thanks in advance,
Ted