Reapply "qcom2 -> tici"

This reverts commit 58b193cb8d.
pull/36202/head
Adeeb Shihadeh 2 days ago
parent 58b193cb8d
commit 26f9c0e7d0
  1. 4
      SConstruct
  2. 2
      selfdrive/ui/qt/qt_window.cc
  3. 2
      selfdrive/ui/qt/qt_window.h
  4. 12
      selfdrive/ui/qt/widgets/cameraview.cc
  5. 4
      selfdrive/ui/qt/widgets/cameraview.h
  6. 2
      system/camerad/cameras/camera_qcom2.cc
  7. 2
      system/hardware/hw.h
  8. 2
      system/loggerd/encoderd.cc

@ -65,8 +65,8 @@ if arch == "larch64":
"#third_party/libyuv/larch64/lib",
"/usr/lib/aarch64-linux-gnu"
]
cflags = ["-DQCOM2", "-mcpu=cortex-a57"]
cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"]
cflags = ["-DTICI", "-mcpu=cortex-a57"]
cxxflags = ["-DTICI", "-mcpu=cortex-a57"]
rpath += ["/usr/local/lib"]
else:
cflags = []

@ -13,7 +13,7 @@ void setMainWindow(QWidget *w) {
}
w->show();
#ifdef QCOM2
#ifdef TICI
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
wl_surface *s = reinterpret_cast<wl_surface*>(native->nativeResourceForWindow("surface", w->windowHandle()));
wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);

@ -6,7 +6,7 @@
#include <QScreen>
#include <QWidget>
#ifdef QCOM2
#ifdef TICI
#include <qpa/qplatformnativeinterface.h>
#include <wayland-client-protocol.h>
#include <QPlatformSurfaceEvent>

@ -27,7 +27,7 @@ const char frame_vertex_shader[] =
"}\n";
const char frame_fragment_shader[] =
#ifdef QCOM2
#ifdef TICI
"#version 300 es\n"
"#extension GL_OES_EGL_image_external_essl3 : enable\n"
"precision mediump float;\n"
@ -79,7 +79,7 @@ CameraWidget::~CameraWidget() {
glDeleteVertexArrays(1, &frame_vao);
glDeleteBuffers(1, &frame_vbo);
glDeleteBuffers(1, &frame_ibo);
#ifndef QCOM2
#ifndef TICI
glDeleteTextures(2, textures);
#endif
}
@ -137,7 +137,7 @@ void CameraWidget::initializeGL() {
glUseProgram(program->programId());
#ifdef QCOM2
#ifdef TICI
glUniform1i(program->uniformLocation("uTexture"), 0);
#else
glGenTextures(2, textures);
@ -165,7 +165,7 @@ void CameraWidget::stopVipcThread() {
vipc_thread = nullptr;
}
#ifdef QCOM2
#ifdef TICI
EGLDisplay egl_display = eglGetCurrentDisplay();
assert(egl_display != EGL_NO_DISPLAY);
for (auto &pair : egl_images) {
@ -226,7 +226,7 @@ void CameraWidget::paintGL() {
glUseProgram(program->programId());
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
#ifdef QCOM2
#ifdef TICI
// no frame copy
glActiveTexture(GL_TEXTURE0);
glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, egl_images[frame->idx]);
@ -263,7 +263,7 @@ void CameraWidget::vipcConnected(VisionIpcClient *vipc_client) {
stream_height = vipc_client->buffers[0].height;
stream_stride = vipc_client->buffers[0].stride;
#ifdef QCOM2
#ifdef TICI
EGLDisplay egl_display = eglGetCurrentDisplay();
assert(egl_display != EGL_NO_DISPLAY);
for (auto &pair : egl_images) {

@ -13,7 +13,7 @@
#include <QOpenGLWidget>
#include <QThread>
#ifdef QCOM2
#ifdef TICI
#define EGL_EGLEXT_PROTOTYPES
#define EGL_NO_X11
#define GL_TEXTURE_EXTERNAL_OES 0x8D65
@ -63,7 +63,7 @@ protected:
std::unique_ptr<QOpenGLShaderProgram> program;
QColor bg = QColor("#000000");
#ifdef QCOM2
#ifdef TICI
std::map<int, EGLImageKHR> egl_images;
#endif

@ -12,7 +12,7 @@
#include <string>
#include <vector>
#ifdef QCOM2
#ifdef TICI
#include "CL/cl_ext_qcom.h"
#else
#define CL_PRIORITY_HINT_HIGH_QCOM NULL

@ -5,7 +5,7 @@
#include "system/hardware/base.h"
#include "common/util.h"
#if QCOM2
#if TICI
#include "system/hardware/tici/hardware.h"
#define Hardware HardwareTici
#else

@ -3,7 +3,7 @@
#include "system/loggerd/loggerd.h"
#include "system/loggerd/encoder/jpeg_encoder.h"
#ifdef QCOM2
#ifdef TICI
#include "system/loggerd/encoder/v4l_encoder.h"
#define Encoder V4LEncoder
#else

Loading…
Cancel
Save