summaryrefslogtreecommitdiff
path: root/src/qcam/assets/feathericons/smartphone.svg
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-11-16 14:29:02 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-12-11 17:53:40 +0100
commita645898af50396a4ae1b32e418c21011c8b3f99d (patch)
treedd9460dbce03a65a340a09e7a2f3e818007a2662 /src/qcam/assets/feathericons/smartphone.svg
parent7a34707bfdf1f5c855ce506245cc57eeae52dfff (diff)
libcamera: request: Add Fence to Request::addBuffer()
Add an optional fence parameter to Request::addBuffer() to allow associating a Fence with a FrameBuffer. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/qcam/assets/feathericons/smartphone.svg')
0 files changed, 0 insertions, 0 deletions
#include <sys/types.h> #include <unistd.h> static void usage(const char *argv0) { printf("Usage: %s input-file output-file\n", basename(argv0)); printf("Unpack the IPU3 raw Bayer format to 16-bit Bayer\n"); } int main(int argc, char *argv[]) { int in_fd; int out_fd; int ret; if (argc != 3) { usage(argv[0]); return 1; } in_fd = open(argv[1], O_RDONLY); if (in_fd == -1) { fprintf(stderr, "Failed to open input file '%s': %s\n", argv[1], strerror(errno)); return 1; } out_fd = open(argv[2], O_WRONLY | O_TRUNC | O_CREAT, 0644); if (out_fd == -1) { fprintf(stderr, "Failed to open output file '%s': %s\n", argv[2], strerror(errno)); return 1; } while (1) { uint8_t in_data[32]; uint8_t out_data[50]; unsigned int i; ret = read(in_fd, in_data, 32); if (ret == -1) { fprintf(stderr, "Failed to read input data: %s\n", strerror(errno)); goto done; } if (ret < 32) { if (ret != 0) fprintf(stderr, "%u bytes of stray data at end of input\n", ret); break; } for (i = 0; i < 25; ++i) { unsigned int index = (i * 10) / 8; unsigned int lsb_shift = (i * 10) % 8; unsigned int msb_shift = 8 - lsb_shift; uint16_t pixel; pixel = ((in_data[index+1] << msb_shift) & 0x3ff)