mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-22 20:36:06 +08:00
[video] only add isp for bebop
This commit is contained in:
@@ -36,7 +36,7 @@ $(TARGET).srcs += $(SRC_BOARD)/board.c
|
||||
|
||||
# Compile the video specific parts
|
||||
$(TARGET).CFLAGS += -DI2C_BUF_LEN=56 -DUSE_I2C0
|
||||
$(TARGET).srcs += $(SRC_BOARD)/mt9v117.c $(SRC_BOARD)/mt9f002.c
|
||||
$(TARGET).srcs += $(SRC_BOARD)/mt9v117.c $(SRC_BOARD)/mt9f002.c modules/computer_vision/lib/isp/libisp.c modules/computer_vision/lib/isp/libisp_config.c
|
||||
|
||||
# Link static (Done for GLIBC)
|
||||
$(TARGET).CFLAGS += -DLINUX_LINK_STATIC
|
||||
|
||||
@@ -39,7 +39,7 @@ $(TARGET).srcs += $(SRC_BOARD)/board.c
|
||||
|
||||
# Compile the video specific parts
|
||||
$(TARGET).CFLAGS += -DI2C_BUF_LEN=56 -DUSE_I2C0
|
||||
$(TARGET).srcs += $(SRC_BOARD)/mt9v117.c $(SRC_BOARD)/mt9f002.c
|
||||
$(TARGET).srcs += $(SRC_BOARD)/mt9v117.c $(SRC_BOARD)/mt9f002.c modules/computer_vision/lib/isp/libisp.c modules/computer_vision/lib/isp/libisp_config.c
|
||||
|
||||
# Link static (Done for GLIBC)
|
||||
$(TARGET).CFLAGS += -DLINUX_LINK_STATIC
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
<file name="image.c" dir="modules/computer_vision/lib/vision"/>
|
||||
<file name="v4l2.c" dir="modules/computer_vision/lib/v4l"/>
|
||||
<file name="jpeg.c" dir="modules/computer_vision/lib/encoding"/>
|
||||
<file name="libisp.c" dir="modules/computer_vision/lib/isp"/>
|
||||
|
||||
<!-- Random flags -->
|
||||
<!-- Does this influence the compilation of fast9? -->
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "math/pprz_algebra_int.h"
|
||||
#include "boards/bebop.h"
|
||||
#include "modules/computer_vision/lib/isp/libisp.h"
|
||||
#include "modules/computer_vision/lib/isp/libisp_config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@@ -43,8 +42,6 @@
|
||||
#define MT9F002_MAX_WIDTH 4608
|
||||
#define MT9F002_MAX_HEIGHT 3288
|
||||
|
||||
extern struct libisp_config isp_config;
|
||||
|
||||
/* Camera structure */
|
||||
struct video_config_t front_camera = {
|
||||
.output_size = {
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
//#include "libisp.h"
|
||||
#include "libisp_config.h"
|
||||
#include "libisp.h"
|
||||
|
||||
#define AVI_BASE 0x400000
|
||||
#define AVI_SIZE 0x100000
|
||||
|
||||
@@ -100,6 +100,8 @@ struct isp_yuv_stats_t {
|
||||
uint32_t ae_histogram_Y[256];
|
||||
};
|
||||
|
||||
extern struct libisp_config isp_config;
|
||||
|
||||
int configure_isp(struct v4l2_device *dev);
|
||||
int isp_get_statistics_yuv(struct isp_yuv_stats_t *yuv_stats);
|
||||
|
||||
|
||||
-5
@@ -1,6 +1,3 @@
|
||||
#ifndef _LIBISP_CONFIG_H
|
||||
#define _LIBISP_CONFIG_H
|
||||
|
||||
#include "boards/bebop/mt9f002.h"
|
||||
#include "libisp.h"
|
||||
|
||||
@@ -496,5 +493,3 @@ struct libisp_config isp_config = {
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
#endif /* _LIBISP_CONFIG_H */
|
||||
@@ -39,13 +39,17 @@
|
||||
#include "lib/v4l/v4l2.h"
|
||||
#include "lib/vision/image.h"
|
||||
#include "lib/vision/bayer.h"
|
||||
#include "lib/isp/libisp.h"
|
||||
|
||||
#include "mcu_periph/sys_time.h"
|
||||
|
||||
// include board for bottom_camera and front_camera on ARDrone2 and Bebop
|
||||
#include BOARD_CONFIG
|
||||
|
||||
// Bebop uses ISP
|
||||
#ifdef BOARD_BEBOP
|
||||
#include "lib/isp/libisp.h"
|
||||
#endif
|
||||
|
||||
// Threaded computer vision
|
||||
#include <pthread.h>
|
||||
#include "rt_priority.h"
|
||||
@@ -102,10 +106,12 @@ static void *video_thread_function(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef BOARD_BEBOP
|
||||
// Configure ISP if needed
|
||||
if (vid->filters & VIDEO_FILTER_ISP) {
|
||||
configure_isp(vid->thread.dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
// be nice to the more important stuff
|
||||
set_nice_level(VIDEO_THREAD_NICE_LEVEL);
|
||||
|
||||
Reference in New Issue
Block a user