Community
cancel
Showing results for 
Search instead for 
Did you mean: 
NAves
Novice
32 Views

Partial Acceleration on Hevc Encode under Ubuntu

Hi

Running HEVC plugin on Ubuntu 14.04, with i7-4760HQ, and 3.8 kernel, is very slow compare to avc encode: (I’ve played around with vaapi option, but it didn’t make a difference):

AVC:
# time ./sample_encode_drm h264 -i ~/Videos/BasketballDrive_1920x1080_50.yuv -o ~/Videos/BasketballDrive_1920x1080_50.h264 -w 1920 -h 1080 -hw -vaapi
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Intel(R) Media SDK Encoding Sample Version 5.0.1603344.93446

Input file format    YUV420
Output video        AVC
Source picture:
    Resolution    1920x1088
    Crop X,Y,W,H    0,0,1920,1080
Destination picture:
    Resolution    1920x1088
    Crop X,Y,W,H    0,0,1920,1080
Frame rate    30.00
Bit rate(Kbps)    3757
Target usage    balanced
Memory type    d3d
Media SDK impl        hw
Media SDK version    1.10

Processing started
Frame number: 501
Processing finished

real    0m2.326s
user    0m1.104s
sys    0m0.440s

HEVC:

# time ./sample_encode_drm h265 -i ~/Videos/BasketballDrive_1920x1080_50.yuv -o ~/Videos/BasketballDrive_1920x1080_50.h265 -w 1920 -h 1080 -hw -vaapi -b 3757
info: plugin 'Intel (R) Media SDK plugin for HEVC ENCODE' loaded successfully
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
WARNING: partial acceleration
Intel(R) Media SDK Encoding Sample Version 5.0.1603344.93446

Input file format    YUV420
Output video        HEVC
Source picture:
    Resolution    1920x1088
    Crop X,Y,W,H    0,0,1920,1080
Destination picture:
    Resolution    1920x1088
    Crop X,Y,W,H    0,0,1920,1080
Frame rate    30.00
Bit rate(Kbps)    3757
Target usage    balanced
Memory type    d3d
Media SDK impl        hw
Media SDK version    1.10

Processing started
Frame number: 501
Processing finished

real    2m1.247s
user    15m59.160s
sys    0m0.492s

The large difference between user and real times is indicative of major blocking during execution. Any comment or help is appreciated.
Cheers,

 

0 Kudos
4 Replies
32 Views

Hello there - thanks for reporting out the HEVC numbers. The current performance of HEVC is surely not at the mark of AVC (by an order of magnitude), but there is a lot of effort being put into improving this. Stay tuned for the latest updates!

Regarding your experiments with HEVC, there are a certain knobs that can really bump up your performance (fps I mean). Here they are:"-u 7 -async N", where N is >5.

"-u 7" -> target usage speed

"-async N" -> depth of asyn pipeline (think number of parallel async operations). default is 1 here.

Hope this helps. Let me know if you have more questions.

 

NAves
Novice
32 Views

Hi

Thank you for your prompt reply. It seems that I can't give any argument to -async:

# time ./sample_encode_drm h265 -i ~/Videos/Parkjoy_1080p50_1920x1080.yuv -o ~/Videos/Parkjoy_1080p50_1920x1080_lAcc.h265 -w 1920 -h 1080 -hw  -b 3500  -u 7 -async 6
Intel(R) Media SDK Decoding Sample Version 5.0.1603344.93446

Error: Unknown options


....

However, I can run it without any argument to -async:

# time ./sample_encode_drm h265 -i ~/Videos/Parkjoy_1080p50_1920x1080.yuv -o ~/Videos/Parkjoy_1080p50_1920x1080_lAcc.h265 -w 1920 -h 1080 -hw  -b 3500  -u 7 –async
info: plugin 'Intel (R) Media SDK plugin for HEVC ENCODE' loaded successfully
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
WARNING: partial acceleration
Intel(R) Media SDK Encoding Sample Version 5.0.1603344.93446

Input file format    YUV420
Output video        HEVC
Source picture:
    Resolution    1920x1088
    Crop X,Y,W,H    0,0,1920,1080
Destination picture:
    Resolution    1920x1088
    Crop X,Y,W,H    0,0,1920,1080
Frame rate    30.00
Bit rate(Kbps)    3500
Target usage    balanced
Memory type    system
Media SDK impl        hw
Media SDK version    1.10

Processing started
Frame number: 500
Processing finished

real    1m34.959s
user    12m33.156s
sys    0m0.412s


Unfortunately, as noted above, the user time to real time ratio is still high.

To be clear then, the warning "WARNING: partial acceleration" is expected?

Cheers,

 

32 Views

Hello there - We just got back after multiple day meetings, and I will get back to you today. I have not seen this issue before, but looking at the error - there seems to be some weird parsing issue. Too soon to tell - let me get back to you if I can reproduce.

32 Views

Hello there - I think I know what went wrong here. In the 5.0.1603344.93446 version of the samples, -async parameter is not being parsed by the sample_encode.cpp. This parameter is being parsed in the latest preview version ().

So, you can easily add that parameter in the pipeline_encode.cpp file in structure m_mfxEncParams, and/or modify the sample_encode.cpp to accept -async as a parameter. Hope this helps.

The partial acceleration warning is alright - it does not have anything to do with the error you are seeing.

Reply