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.

Sample code of decode encode pipeline

Manish_K_
Beginner
312 Views

Hi,

Does intel provide any sample code of intel media which does the decode and encode of the yuv or raw data?

or

Does intel provide any sample code of intel media which does the decode - opencl - encode of the yuv or raw data?

I found the DECODE - OPENCL pipeline code in Intel Media Samples 6.0.0.98947.

is there any sample code which has the full pipeline DECODE - OPENCL - ENCODE?

 

0 Kudos
2 Replies
Sravanthi_K_Intel
312 Views

All the samples and tutorials (also code examples) can be found here - https://software.intel.com/en-us/intel-media-server-studio-support/code-samples, https://software.intel.com/en-us/intel-media-server-studio-support/training

There are code samples and tutorails showing decode and encode of yuv/raw data using Media SDK.

For OpenCL, you can take a look at sample_encode -- one of the options in this sample is to use the opencl rotate plugin. This should give you a basic understanding of how to add opencl (as a plugin) in the media pipeline.

Hope this helps. If you are looking for a full end-to-end media pipeline with opencl - you can use sample_multi_transcode sample and add openCL plugin (methodology from sample_encode). 

Let me know if you need more information.

0 Kudos
Manish_K_
Beginner
312 Views

Thanks Sravanthi.

I was going through the sample code of ocl_media_sdk_interop I am not able to understand one of the part of code:

which is written as:

            if (MFX_ERR_NONE == sts)
            {// decoder return sync point then fill the curretn task nad switch to OCL Plugin feeding
                m_Tasks[m_TaskIndex].m_DecodeSync = DecodeSyncPoint;
                m_Tasks[m_TaskIndex].m_pDecodeOutSurface = m_pmfxDecodeSurfaceLast;
                // look for output process
                if(m_Tasks[m_TaskIndex].m_pDecodeOutSurface)
                    _InterlockedIncrement16((short*)&m_Tasks[m_TaskIndex].m_pDecodeOutSurface->Data.Locked);
                break;
            }

What exactly the purpose of interlockedIncrement here. What Data.locked signify here?

 

 

0 Kudos
Reply