[Bug 784590] encoder: h264: Performance tuning for specific platforms

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jul 19 18:00:21 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=784590

--- Comment #5 from sreerenj <bsreerenj at gmail.com> ---
(In reply to Víctor Manuel Jáquez Leal from comment #4)
> Review of attachment 354985 [details] [review]:
> 
> ::: gst-libs/gst/vaapi/gstvaapiencoder_h264.c
> @@ +98,3 @@
> +      {GST_VAAPI_ENCODER_H264_COMPLIANCE_MODE_RESTRICT_CODED_BUFFER_ALLOC,
> +            "Restict the allocation size of coded-buffer",
> +          "restrict-buf-alloc"}
> 
> the array needs a null structure
> {0,NULL,NULL}
> 
> otherwise the code might crash

I will fix it, thanks!

> 
> @@ +2925,3 @@
> +  if (encoder->compliance_mode ==
> +      GST_VAAPI_ENCODER_H264_COMPLIANCE_MODE_RESTRICT_CODED_BUFFER_ALLOC)
> +    base_encoder->codedbuf_size /= encoder->min_cr;
> 
> I don't like having a property for this. 

I too, but I can't find a better way to do this.

A property named "restrict-coded-buf-size" is another option. But we may add
more of this kind of properties in future, specific to some hardware for eg.
May be it is better to consolidate everything under a single property
"compliance-mode" like we did for vaapih264dec?

> would be possible to query the driver to know if this is required, avoiding
> the property?

Not possible. This is not related with libva at all. In theory, using the
min-compression-ratio outside of the equations provided in the spec is not
correct, but we are only considering intel-vaapi-driver here and which should
work with the new size calculation. So in nutshell, it is a *tweak* which we
don't want to enable by default, but on the other hand, many of the customers
don't care about specification/implementation as long as they get better
performance :). Software like yami is allocating even lower size for
coded-buffer which is something I don't want to do. So enabling this under a
property seems to be a fair compromise IMHO.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list