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
Объявления
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.

question on simple transcode

MyMother
Начинающий
783Просмотр.

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 баллов
3 Ответы
Jiandong_Z_Intel
Сотрудник
783Просмотр.

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
Начинающий
783Просмотр.

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
Сотрудник
783Просмотр.

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

 

 

Ответить