mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
VA: Add a helper function of decoder_add_slice_buffer_with_n_params.
Some codecs such as AV1 needs several parameters associated with one slice. It may have multi tiles within one slice and each tile needs its description parameter. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
This commit is contained in:
parent
315b101394
commit
e40e78a793
2 changed files with 21 additions and 4 deletions
|
@ -527,9 +527,9 @@ gst_va_decoder_add_param_buffer (GstVaDecoder * self, GstVaDecodePicture * pic,
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_va_decoder_add_slice_buffer (GstVaDecoder * self, GstVaDecodePicture * pic,
|
gst_va_decoder_add_slice_buffer_with_n_params (GstVaDecoder * self,
|
||||||
gpointer params_data, gsize params_size, gpointer slice_data,
|
GstVaDecodePicture * pic, gpointer params_data, gsize params_size,
|
||||||
gsize slice_size)
|
guint params_num, gpointer slice_data, gsize slice_size)
|
||||||
{
|
{
|
||||||
VABufferID params_buffer, slice_buffer;
|
VABufferID params_buffer, slice_buffer;
|
||||||
VADisplay dpy;
|
VADisplay dpy;
|
||||||
|
@ -543,7 +543,7 @@ gst_va_decoder_add_slice_buffer (GstVaDecoder * self, GstVaDecodePicture * pic,
|
||||||
dpy = gst_va_display_get_va_dpy (self->display);
|
dpy = gst_va_display_get_va_dpy (self->display);
|
||||||
gst_va_display_lock (self->display);
|
gst_va_display_lock (self->display);
|
||||||
status = vaCreateBuffer (dpy, self->context, VASliceParameterBufferType,
|
status = vaCreateBuffer (dpy, self->context, VASliceParameterBufferType,
|
||||||
params_size, 1, params_data, ¶ms_buffer);
|
params_size, params_num, params_data, ¶ms_buffer);
|
||||||
gst_va_display_unlock (self->display);
|
gst_va_display_unlock (self->display);
|
||||||
if (status != VA_STATUS_SUCCESS) {
|
if (status != VA_STATUS_SUCCESS) {
|
||||||
GST_ERROR_OBJECT (self, "vaCreateBuffer: %s", vaErrorStr (status));
|
GST_ERROR_OBJECT (self, "vaCreateBuffer: %s", vaErrorStr (status));
|
||||||
|
@ -565,6 +565,15 @@ gst_va_decoder_add_slice_buffer (GstVaDecoder * self, GstVaDecodePicture * pic,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gst_va_decoder_add_slice_buffer (GstVaDecoder * self, GstVaDecodePicture * pic,
|
||||||
|
gpointer params_data, gsize params_size, gpointer slice_data,
|
||||||
|
gsize slice_size)
|
||||||
|
{
|
||||||
|
return gst_va_decoder_add_slice_buffer_with_n_params (self, pic, params_data,
|
||||||
|
params_size, 1, slice_data, slice_size);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_va_decoder_decode (GstVaDecoder * self, GstVaDecodePicture * pic)
|
gst_va_decoder_decode (GstVaDecoder * self, GstVaDecodePicture * pic)
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,6 +65,14 @@ gboolean gst_va_decoder_add_slice_buffer (GstVaDecoder * self,
|
||||||
gsize params_size,
|
gsize params_size,
|
||||||
gpointer slice_data,
|
gpointer slice_data,
|
||||||
gsize slice_size);
|
gsize slice_size);
|
||||||
|
gboolean gst_va_decoder_add_slice_buffer_with_n_params
|
||||||
|
(GstVaDecoder * self,
|
||||||
|
GstVaDecodePicture * pic,
|
||||||
|
gpointer params_data,
|
||||||
|
gsize params_size,
|
||||||
|
guint params_num,
|
||||||
|
gpointer slice_data,
|
||||||
|
gsize slice_size);
|
||||||
gboolean gst_va_decoder_decode (GstVaDecoder * self,
|
gboolean gst_va_decoder_decode (GstVaDecoder * self,
|
||||||
GstVaDecodePicture * pic);
|
GstVaDecodePicture * pic);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue