| 1 |
.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation |
| 2 |
.. |
| 3 |
.. SPDX-License-Identifier: CC-BY-4.0 |
| 4 |
|
| 5 |
===================== |
| 6 |
CQP HRD Mode Encoding |
| 7 |
===================== |
| 8 |
|
| 9 |
The application can configure an AVC encoder to work in CQP rate control mode with |
| 10 |
HRD model parameters. |vpl_short_name| will place HRD information to SPS/VUI and choose the |
| 11 |
appropriate profile/level. It’s the responsibility of the application to provide |
| 12 |
per-frame QP, track HRD conformance, and insert required SEI messages to the |
| 13 |
bitstream. |
| 14 |
|
| 15 |
The following example shows how to enable CQP HRD mode. The application should |
| 16 |
set :ref:`RateControlMethod` to CQP, |
| 17 |
:cpp:member:`mfxExtCodingOption::VuiNalHrdParameters` to ON, |
| 18 |
:cpp:member:`mfxExtCodingOption::NalHrdConformance` to OFF, and |
| 19 |
set rate control parameters similar to CBR or VBR modes (instead of QPI, QPP, |
| 20 |
and QPB). |vpl_short_name| will choose CBR or VBR HRD mode based on the ``MaxKbps`` |
| 21 |
parameter. If ``MaxKbps`` is set to zero, |vpl_short_name| will use CBR HRD model |
| 22 |
(write cbr_flag = 1 to VUI), otherwise the VBR model will be used |
| 23 |
(and cbr_flag = 0 is written to VUI). |
| 24 |
|
| 25 |
.. note:: For CQP, if implementation does not support individual QPI, QPP and QPB |
| 26 |
parameters, then QPI parameter should be used as a QP parameter across all frames. |
| 27 |
|
| 28 |
.. literalinclude:: ../snippets/appnd_f.c |
| 29 |
:language: c++ |
| 30 |
:start-after: /*beg1*/ |
| 31 |
:end-before: /*end1*/ |
| 32 |
:lineno-start: 1 |
| 33 |
|
| 34 |
|