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

Frame QP adjustment support on HEVC?


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

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?


0 Kudos
2 Replies

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.



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