mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 18:12:05 +08:00
b4adcd2e56
* completely untested * it builds now * bug fixes, save 1ms * using a kernel to copy works * more sane API to loadyuv Co-authored-by: Comma Device <device@comma.ai> old-commit-hash: 83ff9ca3314b3d551949c822a98290713a0917bf
17 lines
468 B
C
17 lines
468 B
C
#pragma once
|
|
|
|
#include "selfdrive/common/clutil.h"
|
|
|
|
typedef struct {
|
|
int width, height;
|
|
cl_kernel loadys_krnl, loaduv_krnl, copy_krnl;
|
|
} LoadYUVState;
|
|
|
|
void loadyuv_init(LoadYUVState* s, cl_context ctx, cl_device_id device_id, int width, int height);
|
|
|
|
void loadyuv_destroy(LoadYUVState* s);
|
|
|
|
void loadyuv_queue(LoadYUVState* s, cl_command_queue q,
|
|
cl_mem y_cl, cl_mem u_cl, cl_mem v_cl,
|
|
cl_mem out_cl, bool do_shift = false);
|