vah264enc: Avoid mapping coded buffer twice.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 3 Mar 2022 08:59:28 +0000 (09:59 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 4 Mar 2022 12:41:37 +0000 (12:41 +0000)
commit1a19a835a9c4a7452389144a8e18ced17def6518
tree298a27f473acdfd2fa8883ca75466cc1994c7457
parent81b99c37d81bade516e241bfc847b692501ee762
vah264enc: Avoid mapping coded buffer twice.

Currently for copying the coded buffer onto a GStreamer buffer, the
coded buffer is mapped two times: one for getting the size, and later
for do the actual copy. We can avoid this by doing directly in the
element rather than in the general encoder object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
subprojects/gst-plugins-bad/sys/va/gstvaencoder.c
subprojects/gst-plugins-bad/sys/va/gstvaencoder.h
subprojects/gst-plugins-bad/sys/va/gstvah264enc.c