I am using the multi transcode sample framework downloaded from link:
There is a option to use -deinterlace to deinterlace the video. I tried this for a interlaced video and it gives the correct output. However, I would like to see the code of deinterlace being used by the framework. can you just point me to the specific section of the code in the framework which does that?
If I am writing my own opencl kernel code to de-interlace what changes I should do in the framework ?
The code of deinterlace in sample_multi_transcode is not open sourced, it is embedded in our hardware driver. If you want to develop your own de-interlace kernel, you may look at simple_decode_vpp_postproc in the tutorial package and replace the VPP part with your own implementation. In the simple_decode_vpp_pp.cpp, you need to change VPPParams.vpp.In.PicStruct to MFX_PICSTRUCT_FIELD_TFF (or MFX_PICSTRUCT_FIELD_BFF), so the decoder would output interlaced format, then you can plug in your code. In simple_decode_vpp_pp.cpp, with interlaced bitstream, set vpp.In.Pictruct to field based, and depending on VPPParams.vpp.Out.PicStruct as progressive or field based, a progressive or interlaced output would be generated.
I need to write an opencl kernel code and I think the changes you are suggesting is for simple C/C++ code in the framework.
Can you tell me how to create plugin properly that can be used by multi-transcode framework? There is a rotation of image by 180 example in the framework itself. But I want to know how to start inserting plugins and how to share the surfaces between the multitranscode framework and opencl ?
Also, why did you mention that I need to change the vpp.In.Pictruct to field based. The framework already copies the decoder frame-info in the VPP.In structure. So do we need this change ? I think decoder will get to know the picStruct information from the header itself.
The reason that I mentioned to change the vpp.In.PicStruct to field based is that, in simple_vpp_pp.cpp, the VPP parameters are assigned at the beginning. While in sample_multi_transcode, you are correct that the parameters for VPP.In are copied from decoder frame info.
As for how to add a user's own plugin, you may refer to mediasdkusr-man.pdf under MediaSDK InstallationDirectory/doc.