GNOME Bugzilla – Bug 785917
vaapi: h264/h265: support MB(Macroblock) bitrate control
Last modified: 2017-09-13 09:18:28 UTC
This can be supported by providing new property "mbbrc", which can have value 0(off) or 1(on). Note that this can be adjusted when CBR/VBR not CQP mode.
In addition, "auto" can be added, which can be determined according to quality level.
Created attachment 357088 [details] [review] libs: encoder: Add mbbrc property This property supports Macroblock level Bitrate Control as the following: 0: auto 1: on 2: off
Created attachment 357089 [details] [review] libs: encoder: h264/h265: adjust mbbrc to rate control params if CBR/VBR.
Review of attachment 357088 [details] [review]: Adding this property in the base case all the encoders will expose it, though only H264 and H265 handle it. Is this something that we want? if so, why it is not set in gst_vaapi_encoder_reconfigure_internal() for all the encoders? ::: gst-libs/gst/vaapi/gstvaapiencoder.c @@ +159,3 @@ + * GstVaapiEncoder:mbbrc: + * + * Macroblock level bitrate cotnrol. typo: control @@ +166,3 @@ + g_param_spec_uint ("mbbrc", + "Macroblock level Bitrate Control", + "Macroblock level Bitrate Control (0: auto, 1: on, 2: off)", 0, 2, I prefer an enum type for this ON/OFF/AUTO
(In reply to Víctor Manuel Jáquez Leal from comment #4) > Review of attachment 357088 [details] [review] [review]: > @@ +166,3 @@ > + g_param_spec_uint ("mbbrc", > + "Macroblock level Bitrate Control", > + "Macroblock level Bitrate Control (0: auto, 1: on, 2: off)", 0, 2, > > I prefer an enum type for this ON/OFF/AUTO I intended to use same value as the driver. We should add map table or something like that if we change it. If you meant that you agree with this, I'll be working on it, but I don't think it's worth doing so.
(In reply to Víctor Manuel Jáquez Leal from comment #4) > Review of attachment 357088 [details] [review] [review]: > > Adding this property in the base case all the encoders will expose it, > though only H264 and H265 handle it. Is this something that we want? if so, > why it is not set in gst_vaapi_encoder_reconfigure_internal() for all the > encoders? > My bad. mbbrc should be exposed only in h264/h265 encoder.
Created attachment 359681 [details] [review] libs: encoder: h264: Add mbbrc property This property supports Macroblock level Bitrate Control as the following: 0: auto 1: on 2: off
Created attachment 359682 [details] [review] libs: encoder: h265: Add mbbrc property This property supports Macroblock level Bitrate Control as the following (same as h264 encoder): 0: auto 1: on 2: off
Attachment 359681 [details] pushed as 6816d7c - libs: encoder: h264: Add mbbrc property Attachment 359682 [details] pushed as e7c099b - libs: encoder: h265: Add mbbrc property