Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

De-interlace code in Multi Transcode Sample framework

Manish_K_
Beginner
340 Views

Hi,

I am using the multi transcode sample framework downloaded from link:

https://software.intel.com/sites/default/files/managed/da/e6/MediaSamples_Windows_6.0.0.49.msi

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 ?

-Manish

0 Kudos
3 Replies
Shaojuan_Z_Intel
Employee
340 Views

Hi Manish,

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. 

0 Kudos
Manish_K_
Beginner
340 Views

Hi Shaojuan,

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.

 

0 Kudos
Shaojuan_Z_Intel
Employee
340 Views

Hi Manish,

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.

0 Kudos
Reply