Media (Intel® oneAPI 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 sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

question on simple transcode

MyMother
Beginner
224 Views

hi Intel,

OS: Ubuntu 12.04

       mediasdk-tutorials-0.0.3

       MediaServerStudioEssentials2015R6

Platform:  i5-4570S

Q1.  I found following and the question is below

        // Decode a frame asychronously (returns immediately)
        sts = mfxDEC.DecodeFrameAsync(&mfxBS, pSurfaces[nIndex], &pmfxOutSurface, &syncpD);
        ...
        ...   ==>  why  session.SyncOperation(syncpD, 60000) is unnecessary ???
        ...
        // Encode a frame asychronously (returns immediately)
        sts = mfxENC.EncodeFrameAsync(NULL, pmfxOutSurface, &mfxEncBS, &syncpE);
        ...
        sts = session.SyncOperation(syncpE, 60000);     // Synchronize. Wait until frame processing is ready

 

0 Kudos
3 Replies
Jiandong_Z_Intel
Employee
224 Views

Hi Medwin,

Are you refer simple_5_transcode in mediasdk-tutorials-0.0.3 for your code ?

You can found following in simple_5_transcode\src\simple_transcode.cpp.

        // Ignore warnings if output is available,
        // if no output and no action required just repeat the DecodeFrameAsync call

        if (MFX_ERR_NONE < sts && syncpD)
            sts = MFX_ERR_NONE;
 

The comments maybe answered your questions.

 

Thanks,

Zachary

MyMother
Beginner
224 Views

hi Zachary,

When I check simple_2_decode/simple_2_decode_vmem, there're always something below

        sts = mfxDEC.DecodeFrameAsync(&mfxBS, pmfxSurfaces[nIndex], &pmfxOutSurface, &syncp);

        // Ignore warnings if output is available,
        // if no output and no action required just repeat the DecodeFrameAsync call
        if (MFX_ERR_NONE < sts && syncp)
            sts = MFX_ERR_NONE;

        if (MFX_ERR_NONE == sts)
            sts = session.SyncOperation(syncp, 60000);      // Synchronize. Wait until decoded frame is ready

         > How transcoding make sure there're frames ready for encode without above line ??

Thanks.

 

 

Jiandong_Z_Intel
Employee
224 Views

Hi Medwin,

I have checked the simple_2_decode/simple_2_decode_vmem. 

session.SyncOperation is used in page 13 in mediasdk-man.pdf, I think both of them are correct. you can use both them as you wish, I think  session.SyncOperation  is more better, because session.SyncOperation is used in mediasdk-man.pdf

> How transcoding make sure there're frames ready for encode without above line ??

About this question, I suggest you do some debug to watch "syncp" and "sts", to check when "syncp" is set and the values of "sts" can refer to mfxdefs.h

 

Thanks

Zachary

 

 

Reply