mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
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:
parent
5fee04bcae
commit
f5677a9050
1 changed files with 5 additions and 7 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue