radeonsi/video: Use ac_uvd_alloc_stream_handle

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807>
This commit is contained in:
David Rosca 2025-05-05 09:34:31 +02:00 committed by Marge Bot
parent 5fee04bcae
commit f5677a9050

View file

@ -14,19 +14,17 @@
#include "util/u_video.h"
#include "vl/vl_defines.h"
#include "vl/vl_video_buffer.h"
#include "ac_uvd_dec.h"
#include <unistd.h>
/* generate an stream handle */
unsigned si_vid_alloc_stream_handle()
{
static unsigned counter = 0;
static unsigned handle_base = 0;
if (!handle_base)
handle_base = util_bitreverse(getpid() ^ os_time_get());
return handle_base ^ ++counter;
static struct ac_uvd_stream_handle stream_handle;
if (!stream_handle.base)
ac_uvd_init_stream_handle(&stream_handle);
return ac_uvd_alloc_stream_handle(&stream_handle);
}
/* create a buffer in the winsys */