Add crop and mplane support

This commit is contained in:
Martijn Braam
2023-07-19 00:08:30 +02:00
parent a1778cbf37
commit 1b47dd9053
5 changed files with 218 additions and 37 deletions

View File

@@ -2,6 +2,7 @@
#define LIBMEGAPIXELS_HEADER
#include <stdint.h>
#include <linux/videodev2.h>
#define EXPORT __attribute__((__visibility__("default")))
@@ -11,6 +12,7 @@ libmegapixels_find_config(char *configfile);
#define LIBMEGAPIXELS_CMD_LINK 1
#define LIBMEGAPIXELS_CMD_MODE 2
#define LIBMEGAPIXELS_CMD_CROP 3
#define LIBMEGAPIXELS_CFA_NONE 0
#define LIBMEGAPIXELS_CFA_BGGR 1
@@ -26,7 +28,9 @@ struct _lmp_cmd {
int pad_to;
int width;
int height;
uint32_t mode;
int top;
int left;
int format;
uint32_t entity_from_id;
int pad_from_id;
@@ -109,11 +113,14 @@ EXPORT void
libmegapixels_close(libmegapixels_camera *camera);
EXPORT unsigned int
libmegapixels_select_mode(libmegapixels_camera *camera, libmegapixels_mode *mode);
libmegapixels_select_mode(libmegapixels_camera *camera, libmegapixels_mode *mode, struct v4l2_format *format);
EXPORT char *
libmegapixels_v4l_pixfmt_to_string(uint32_t pixfmt);
EXPORT char *
libmegapixels_format_name(int format);
EXPORT const char *
libmegapixels_format_cfa(int format);