[FFmpeg-devel] [PATCH] lavc/vaapi_encode_h264: Enable MB rate control
Mark Thompson
sw at jkqxz.net
Sun May 14 14:19:35 EEST 2017
On 12/05/17 05:00, Jun Zhao wrote:
> On 2017/5/11 19:39, Mark Thompson wrote:
>> On 11/05/17 01:29, Jun Zhao wrote:
>>> From b32e4c9c1de47b3bf76327b0ecd11ccf9e3c693f Mon Sep 17 00:00:00 2001
>>> From: Jun Zhao <jun.zhao at intel.com>
>>> Date: Tue, 9 May 2017 08:19:16 +0800
>>> Subject: [PATCH] lavc/vaapi_encode_h264: Enable MB rate control.
>>>
>>> Enables macroblock-level bitrate control that generally improves
>>> subjective visual quality. It may have a negative impact on
>>> performance and objective visual quality metrics. Default is off
>>> and can't compatible with Constant QP.
>>>
>>> Signed-off-by: Jun Zhao <jun.zhao at intel.com>
>>> ---
>>> libavcodec/vaapi_encode_h264.c | 11 +++++++++++
>>> 1 file changed, 11 insertions(+)
>>>
...
>>> + else
>>> + ctx->rc_params.rc.rc_flags.bits.mb_rate_control = opt->mbbrc;
>>
>> The documentation says that 0 is default, 1 is enable and 2 is disable. Since this is becoming an active choice, pass 1 or 2 here depending on the option setting? (Given the explanation, avoiding "default" seems reasonable to me.)
>>
>
> Now i965 driver use default (0) == disable (2), (1) is enable, I think libva/va.h comment for mb_rate_control is confused.
The header matches the implementation in the H.265 encoder as well - it looks like the H.264 encoder is wrong to me.
I made <https://github.com/01org/intel-vaapi-driver/issues/166> to clarify.
Thanks,
- Mark
More information about the ffmpeg-devel
mailing list