mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 03:03:57 +08:00
* rgb to nv12
* nv12 works (w memcpy)
* correct now
* no copy
* fix nv12 with fast debayer
* reverts of unused stuff
* ui use nv12
* comment out thumbnails for now
* rebase fix
* dm read nv12
* model read nv12
* fix ffmpeg encoder
* thumbnails from nv12
* replay to nv12
* python framereader support nv12
* remove hardcoded frame/buffer sizes
* fix build
* ffmpeg encoder fix buffers
* small cleanup
* reduce power usage test
* fix cpu usage test
* fix snapshot
* fix loggerd test
* bump cereal
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Joost Wooning <jwooning@gmail.com>
old-commit-hash: ea5b8cdfb1
26 lines
663 B
C
26 lines
663 B
C
#pragma once
|
|
|
|
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
|
#ifdef __APPLE__
|
|
#include <OpenCL/cl.h>
|
|
#else
|
|
#include <CL/cl.h>
|
|
#endif
|
|
|
|
#include "common/mat.h"
|
|
|
|
typedef struct {
|
|
cl_kernel krnl;
|
|
cl_mem m_y_cl, m_uv_cl;
|
|
} Transform;
|
|
|
|
void transform_init(Transform* s, cl_context ctx, cl_device_id device_id);
|
|
|
|
void transform_destroy(Transform* transform);
|
|
|
|
void transform_queue(Transform* s, cl_command_queue q,
|
|
cl_mem yuv, int in_width, int in_height, int in_stride, int in_uv_offset,
|
|
cl_mem out_y, cl_mem out_u, cl_mem out_v,
|
|
int out_width, int out_height,
|
|
const mat3& projection);
|