convert loadyuv.c to loadyuv.cc (#2754)

old-commit-hash: d6eead25d0
commatwo_master
Dean Lee 4 years ago committed by GitHub
parent 0066e93b34
commit 75e3d20dac
  1. 3
      release/files_common
  2. 2
      selfdrive/modeld/SConscript
  3. 3
      selfdrive/modeld/transforms/loadyuv.cc
  4. 20
      selfdrive/modeld/transforms/loadyuv.h
  5. 2
      selfdrive/modeld/visiontest.mk

@ -398,7 +398,8 @@ selfdrive/modeld/models/driving.h
selfdrive/modeld/models/dmonitoring.cc selfdrive/modeld/models/dmonitoring.cc
selfdrive/modeld/models/dmonitoring.h selfdrive/modeld/models/dmonitoring.h
selfdrive/modeld/transforms/loadyuv.[c,h] selfdrive/modeld/transforms/loadyuv.cc
selfdrive/modeld/transforms/loadyuv.h
selfdrive/modeld/transforms/loadyuv.cl selfdrive/modeld/transforms/loadyuv.cl
selfdrive/modeld/transforms/transform.cc selfdrive/modeld/transforms/transform.cc
selfdrive/modeld/transforms/transform.h selfdrive/modeld/transforms/transform.h

@ -8,7 +8,7 @@ TEST_THNEED = False
common_src = [ common_src = [
"models/commonmodel.cc", "models/commonmodel.cc",
"runners/snpemodel.cc", "runners/snpemodel.cc",
"transforms/loadyuv.c", "transforms/loadyuv.cc",
"transforms/transform.cc" "transforms/transform.cc"
] ]

@ -1,8 +1,5 @@
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include "clutil.h"
#include "loadyuv.h" #include "loadyuv.h"
void loadyuv_init(LoadYUVState* s, cl_context ctx, cl_device_id device_id, int width, int height) { void loadyuv_init(LoadYUVState* s, cl_context ctx, cl_device_id device_id, int width, int height) {

@ -1,18 +1,8 @@
#ifndef LOADYUV_H #pragma once
#define LOADYUV_H
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h> #include <stdbool.h>
#include "clutil.h"
#ifdef __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct { typedef struct {
int width, height; int width, height;
@ -26,9 +16,3 @@ void loadyuv_destroy(LoadYUVState* s);
void loadyuv_queue(LoadYUVState* s, cl_command_queue q, void loadyuv_queue(LoadYUVState* s, cl_command_queue q,
cl_mem y_cl, cl_mem u_cl, cl_mem v_cl, cl_mem y_cl, cl_mem u_cl, cl_mem v_cl,
cl_mem out_cl); cl_mem out_cl);
#ifdef __cplusplus
}
#endif
#endif // LOADYUV_H

@ -49,7 +49,7 @@ all: visiontest
libvisiontest_inputs := visiontest.c \ libvisiontest_inputs := visiontest.c \
transforms/transform.cc \ transforms/transform.cc \
transforms/loadyuv.c \ transforms/loadyuv.cc \
../common/clutil.cc \ ../common/clutil.cc \
$(BASEDIR)/selfdrive/common/util.c \ $(BASEDIR)/selfdrive/common/util.c \
$(CEREAL_OBJS) $(CEREAL_OBJS)

Loading…
Cancel
Save