lcevcdec: Fix LCEVC picture access flags
Even though the LCEVC decoder works fine without this, it is recommended to set read access to base pictures that are sent to the decoder, and write access to enhanced pictures that are received from the decoder. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
This commit is contained in:
parent
265b69520a
commit
3208d6c62a
@ -103,7 +103,7 @@ picture_data_new (LCEVC_DecoderHandle decoder_handle, GstVideoFrame * frame)
|
||||
|
||||
/* Alloc LCEVC picture handle */
|
||||
if (!gst_lcevc_dec_utils_alloc_picture_handle (decoder_handle, frame,
|
||||
&ret->picture_handle)) {
|
||||
&ret->picture_handle, LCEVC_Access_Write)) {
|
||||
g_free (ret);
|
||||
return NULL;
|
||||
}
|
||||
@ -574,7 +574,7 @@ send_base_picture (GstLcevcDec * lcevc, GstBuffer * input_buffer)
|
||||
}
|
||||
|
||||
if (!gst_lcevc_dec_utils_alloc_picture_handle (lcevc->decoder_handle,
|
||||
&frame, &picture_handle)) {
|
||||
&frame, &picture_handle, LCEVC_Access_Read)) {
|
||||
GST_ELEMENT_ERROR (lcevc, STREAM, DECODE, (NULL),
|
||||
("Could not allocate input picture handle %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (GST_BUFFER_PTS (input_buffer))));
|
||||
|
@ -50,7 +50,8 @@ gst_lcevc_dec_utils_get_color_format (GstVideoFormat format)
|
||||
|
||||
gboolean
|
||||
gst_lcevc_dec_utils_alloc_picture_handle (LCEVC_DecoderHandle decoder_handle,
|
||||
GstVideoFrame * frame, LCEVC_PictureHandle * picture_handle)
|
||||
GstVideoFrame * frame, LCEVC_PictureHandle * picture_handle,
|
||||
LCEVC_Access access)
|
||||
{
|
||||
LCEVC_PictureDesc picture_desc = { 0, };
|
||||
LCEVC_PictureBufferDesc buffer_desc = { 0, };
|
||||
@ -71,7 +72,7 @@ gst_lcevc_dec_utils_alloc_picture_handle (LCEVC_DecoderHandle decoder_handle,
|
||||
/* Set buffer description */
|
||||
buffer_desc.data = GST_VIDEO_FRAME_PLANE_DATA (frame, 0);
|
||||
buffer_desc.byteSize = GST_VIDEO_FRAME_SIZE (frame);
|
||||
buffer_desc.access = LCEVC_Access_Write;
|
||||
buffer_desc.access = access;
|
||||
|
||||
/* Set plane description */
|
||||
for (i = 0; i < GST_VIDEO_FRAME_N_PLANES (frame); i++) {
|
||||
|
@ -35,7 +35,7 @@ LCEVC_ColorFormat gst_lcevc_dec_utils_get_color_format (GstVideoFormat format);
|
||||
|
||||
gboolean gst_lcevc_dec_utils_alloc_picture_handle (
|
||||
LCEVC_DecoderHandle decoder_handle, GstVideoFrame *frame,
|
||||
LCEVC_PictureHandle *picture_handle);
|
||||
LCEVC_PictureHandle *picture_handle, LCEVC_Access access);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user