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.

Frame QP adjustment support on HEVC?

刚_隆_
Beginner
344 Views

I'm using Intel MSS 2015 R6 on Windows 7 64bit, Core i5 4590 processor with very recent driver. And latest Intel Media Samples 6.0.0.68.

When I tried to modify sample_encode to enable QP adjustment per-frame, I found it success when encoding with H.264 but failure when encoding with HEVC - no matter using HEVC SW plugin or HEVC HW plugin (i.e. GAcc mode).

My test case was like this:

I used Const QP mode with -qpi 25 -qpp 28 -qpb 29, and then encoded a yuv to a bitstream (A).

Then in the same conditions, I added a few code to enable mfxEncodeCtrl parameter to the EncodeFrameAsync() function calls, e.g. I set the "QP" parameter to 22 and encoded the same yuv to a bitstream (B).

By byte-to-byte comparison, I found bitstream A and B are exactly the same, which suggests that the QP adjustment in mfxEncodeCtrl doesn't work at all with HEVC encoding! -In contrast, if switching my command line to corresponding H.264 cases, it can be proved that per-frame QP does work.

Please correct me if anything wrong, and let me know in case per-frame QP adjustment is possible with HEVC?

Thanks!

0 Kudos
2 Replies
Jeffrey_M_Intel1
Employee
344 Views

Thanks for reporting this issue.  I've replicated the behavior you've described and will get back to you soon (hopefully tomorrow) with next steps.

 

0 Kudos
Jeffrey_M_Intel1
Employee
344 Views

I have an update for you.

  • For the software and GPU accelerated HEVC codec plugins mfxEncodeCtrl .QP settings are not used, so the behavior you've described is expected.  
  • However, if you can update your hardware to 6th generation (Skylake architecture) the hardware accelerated HEVC does support setting QP via mfxEncodeCtrl.  This is the recommended path for your scenario.

Regards, Jeff

0 Kudos
Reply