2020-12-13 09:10:51 +08:00
|
|
|
#pragma once
|
2020-01-17 11:20:17 -08:00
|
|
|
|
2022-05-18 14:11:57 -07:00
|
|
|
#include "common/clutil.h"
|
2020-01-17 11:20:17 -08:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int width, height;
|
2021-09-16 14:13:03 -07:00
|
|
|
cl_kernel loadys_krnl, loaduv_krnl, copy_krnl;
|
2020-01-17 11:20:17 -08:00
|
|
|
} 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,
|
2021-09-16 14:13:03 -07:00
|
|
|
cl_mem out_cl, bool do_shift = false);
|