From 97036161f78b336d9778460335d8fedb42259e5f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 19 Mar 2012 12:58:24 +0100 Subject: snapshot: Add JPEG compression support Specifying the -j flag results in captured images being saved in JPEG format instead of raw YUYV. JPEG compression implies YUYV capture, software demosaicing isn't supported. Signed-off-by: Laurent Pinchart --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 107e34d..07d1973 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,13 @@ LIBS := -lomap3isp -lrt OBJ_LIVE := live.o events.o iq.o videoout.o OBJ_SNAP := snapshot.o events.o iq.o +ifneq (x$(LIBJPEG), x) +CFLAGS += -I$(LIBJPEG)/include -DUSE_LIBJPEG=1 +SNAP_LDFLAGS = -L$(LIBJPEG)/lib +SNAP_LIBS = -ljpeg +OBJ_SNAP += jpeg.o +endif + %.o : %.c $(CC) $(CFLAGS) -c -o $@ $< @@ -18,7 +25,7 @@ live: $(OBJ_LIVE) isp/libomap3isp.so $(CC) $(LDFLAGS) -o $@ $(OBJ_LIVE) $(LIBS) snapshot: $(OBJ_SNAP) isp/libomap3isp.so - $(CC) $(LDFLAGS) -o $@ $(OBJ_SNAP) $(LIBS) + $(CC) $(LDFLAGS) $(SNAP_LDFLAGS) -o $@ $(OBJ_SNAP) $(LIBS) $(SNAP_LIBS) __isp: $(MAKE) -C isp CROSS_COMPILE=$(CROSS_COMPILE) KDIR=$(KDIR) -- cgit v1.2.3