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.

Jpeg encoding

song_l_
Beginner
1,578 Views

Hi.

I've encountered two problem in encoding jpeg with intel media sdk.

1. The MFXVideoENCODE_Init function always returns MFX_WRN_PARTIAL_ACCELERATION. Even using the sample_encode.exe,  the result is the same. Is that mean QuickSync does not support jpeg encoding? (using h264 is OK)

2. The time  between MFXVideoENCODE_EncodeFrameAsync and MFXVideoCORE_SyncOperation is 16ms. It seems much longer than I expected.

The parameter to init encoder is:

    mfxVideoParam m_mfxEncParams;
    memset(&m_mfxEncParams, 0, sizeof(mfxVideoParam));

    m_mfxEncParams.mfx.CodecId = MFX_CODEC_JPEG;
    m_mfxEncParams.mfx.EncodedOrder = 0; // binary flag, 0 signals encoder to take frames in display order
    m_mfxEncParams.IOPattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY;

    // frame info parameters
    m_mfxEncParams.mfx.FrameInfo.FourCC = MFX_FOURCC_YV12;
    m_mfxEncParams.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
    m_mfxEncParams.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;

    // set frame size and crops
    m_mfxEncParams.mfx.FrameInfo.Width = MSDK_ALIGN16(WIDTH);
    m_mfxEncParams.mfx.FrameInfo.Height = (MFX_PICSTRUCT_PROGRESSIVE == m_mfxEncParams.mfx.FrameInfo.PicStruct) ?
        MSDK_ALIGN16(HEIGHT) : MSDK_ALIGN32(HEIGHT);

    m_mfxEncParams.mfx.FrameInfo.CropX = 0;
    m_mfxEncParams.mfx.FrameInfo.CropY = 0;
    m_mfxEncParams.mfx.FrameInfo.CropW = WIDTH;
    m_mfxEncParams.mfx.FrameInfo.CropH = HEIGHT;

    m_mfxEncParams.mfx.FrameInfo.FrameRateExtD = 1;
    m_mfxEncParams.mfx.FrameInfo.FrameRateExtN = 0x1e;


    // JPEG encoder settings overlap with other encoders settings in mfxInfoMFX structure
    m_mfxEncParams.mfx.Interleaved = 1;
    m_mfxEncParams.mfx.Quality = 75;
    m_mfxEncParams.mfx.RestartInterval = 0;

    m_mfxEncParams.AsyncDepth = 4;

 The output of Analysis is:

Intel(r) Media Server Studio 2015 R6 - System Analyzer (64-bit)


The following versions of Media SDK API are supported by platform/driver
[opportunistic detection of MSDK API > 1.16]:

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X       X
        1.0     SW      Yes             X       X
        1.1     HW      Yes             X       X
        1.1     SW      Yes             X       X
        1.2     HW      Yes             X       X
        1.2     SW      Yes             X       X
        1.3     HW      Yes             X       X
        1.3     SW      Yes             X       X
        1.4     HW      Yes             X       X
        1.4     SW      Yes             X       X
        1.5     HW      Yes             X       X
        1.5     SW      Yes             X       X
        1.6     HW      Yes             X       X
        1.6     SW      Yes             X       X
        1.7     HW      Yes             X       X
        1.7     SW      Yes             X       X
        1.8     HW      Yes             X       X
        1.8     SW      Yes             X       X
        1.9     HW      Yes             X       X
        1.9     SW      Yes             X       X
        1.10    HW      Yes             X       X
        1.10    SW      Yes             X       X
        1.11    HW      Yes             X       X
        1.11    SW      Yes             X       X
        1.12    HW      Yes             X       X
        1.12    SW      Yes             X       X
        1.13    HW      Yes             X       X
        1.13    SW      Yes             X       X
        1.14    HW      Yes             X       X
        1.14    SW      Yes             X       X
        1.15    HW      Yes             X       X
        1.15    SW      Yes             X       X
        1.16    HW      Yes             X       X
        1.16    SW      Yes             X       X
        1.17    SW      Yes             X       X

Graphics Devices:
        Name                                         Version             State
        Intel(R) HD Graphics 4600                    10.18.15.4256       Active
        NVIDIA GeForce GTX 860M                      10.18.13.5390       08

System info:
        CPU:    Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
        OS:     Microsoft Windows 10 ???
        Arch:   64 ?

Installed Media SDK packages (be patient...processing takes some time):
        Intel(R) Media Samples 6.0.0.68
        Intel(R) Media SDK 2016

Analysis complete... [press ENTER]

 

0 Kudos
1 Solution
Harshdeep_B_Intel
1,578 Views

Hi There, 

Thanks for detailed description and log from the system analyzer tool. This helps us provide your complete system information. Currently you are using Intel(R) HD Graphics 4600, this is a 4th generation processor, on which JPEG  HW implementation for encoding is a Hybrid solution. It is not a full HW implementation. Hence when you run your application or sample_encode you can see  MFX_WRN_PARTIAL_ACCELERATION.

As, this is a Hybrid implementation(partial HW), slow performance is expected. Currently from 6th generation processor, includes full HW support for JPEG encode. To achieve better performance, I suggest upgrading your hardware to latest 6th generation processor. 

Thanks, 

 

View solution in original post

0 Kudos
3 Replies
Harshdeep_B_Intel
1,579 Views

Hi There, 

Thanks for detailed description and log from the system analyzer tool. This helps us provide your complete system information. Currently you are using Intel(R) HD Graphics 4600, this is a 4th generation processor, on which JPEG  HW implementation for encoding is a Hybrid solution. It is not a full HW implementation. Hence when you run your application or sample_encode you can see  MFX_WRN_PARTIAL_ACCELERATION.

As, this is a Hybrid implementation(partial HW), slow performance is expected. Currently from 6th generation processor, includes full HW support for JPEG encode. To achieve better performance, I suggest upgrading your hardware to latest 6th generation processor. 

Thanks, 

 

0 Kudos
song_l_
Beginner
1,578 Views

Thank you.

0 Kudos
Harshdeep_B_Intel
1,578 Views

So, we will close this thread. Please free to start a new thread for further questions. 

Thanks, 

0 Kudos
Reply