From 77e3c46ba9e763ac240f56d9365208c422fc6b20 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Mon, 8 Jun 2009 11:16:43 +0200 Subject: libv4l: move ov518 decompression code to an external helper From: Hans de Goede Change support for decompressing ov518 "JPEG" to piping data through an external helper as I've failed to contact Mark W. McClelland to get permission to relicense the code. If you know a working email address for Mark W. McClelland, please let me know. Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h') diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h index a2242e91a..afd111da6 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h @@ -20,6 +20,7 @@ #define __LIBV4LCONVERT_PRIV_H #include +#include #include "libv4lconvert.h" #include "control/libv4lcontrol.h" #include "processing/libv4lprocessing.h" @@ -126,6 +127,11 @@ struct v4lconvert_data { unsigned char *convert_pixfmt_buf; struct v4lcontrol_data *control; struct v4lprocessing_data *processing; + + /* Data for external decompression helpers code */ + pid_t decompress_pid; + int decompress_in_pipe[2]; /* Data from helper to us */ + int decompress_out_pipe[2]; /* Data from us to helper */ }; struct v4lconvert_pixfmt { @@ -186,10 +192,6 @@ void v4lconvert_spca508_to_yuv420(const unsigned char *src, unsigned char *dst, void v4lconvert_sn9c20x_to_yuv420(const unsigned char *src, unsigned char *dst, int width, int height, int yvu); -/* Warning this one modifies its input buffer! */ -void v4lconvert_ov518_to_yuv420(unsigned char *src, unsigned char *dst, - int width, int height, int yvu, int src_size); - void v4lconvert_decode_spca561(const unsigned char *src, unsigned char *dst, int width, int height); @@ -232,4 +234,10 @@ void v4lconvert_flip(unsigned char *src, unsigned char *dest, void v4lconvert_crop(unsigned char *src, unsigned char *dest, const struct v4l2_format *src_fmt, const struct v4l2_format *dest_fmt); +int v4lconvert_helper_decompress(struct v4lconvert_data *data, + const char *helper, const unsigned char *src, int src_size, + unsigned char *dest, int dest_size, int width, int height, int command); + +void v4lconvert_helper_cleanup(struct v4lconvert_data *data); + #endif -- cgit v1.2.3