libs: encoder: set VA HRD param before RC param
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Thu, 19 Mar 2020 18:19:18 +0000 (11:19 -0700)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Thu, 19 Mar 2020 19:09:03 +0000 (12:09 -0700)
commit861b4cc4b63aab197c2ec60448e80a4e6bd0c37c
treea43c86dd507c07d98cf6d53094ed7d0177b0a73c
parent61516dd5e19a13ef6790795e6ab496be935be338
libs: encoder: set VA HRD param before RC param

This is a workaround for intel-media-driver bug
https://github.com/intel/media-driver/issues/865

The driver will force the RC method to CBR for HEVCe
when it parses the HRD param.  Thus, any RC method
param submitted "prior" to the HRD param will be lost.
Therefore, VBR, ICQ and QVBR for HEVCe can't be
effectively enabled if the RC method param "precedes"
the HRD param.

To work around this issue, set the HRD param before
the RC method param so the driver will parse the RC
method param "after" the HRD param.

Afaict, other codecs in the driver (and other drivers)
do not appear to be dependent on the order of HRD and
RC param submission.
gst-libs/gst/vaapi/gstvaapiencoder.c