omap4-v4l2-camera:takashi-suzukis-yavta.git
6 years agoMerge branch 'master' of git://git.ideasonboard.org/yavta master
Sergio Aguirre [Tue, 28 Feb 2012 03:09:57 +0000 (21:09 -0600)]
Merge branch 'master' of git://git.ideasonboard.org/yavta

6 years agoAdd --stride argument
Laurent Pinchart [Wed, 25 Jan 2012 15:44:17 +0000 (16:44 +0100)]
Add --stride argument

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agowarn if written size is different to original one
Andy Shevchenko [Tue, 24 Jan 2012 11:43:21 +0000 (13:43 +0200)]
warn if written size is different to original one

This patch also eliminates compiler warning:
 yavta.c: In function ‘video_save_image’:
 yavta.c:974:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Print different messages depending on whether the return value is
negative or positive]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd NV pixel formats
Jacob Pan [Tue, 24 Jan 2012 11:43:20 +0000 (13:43 +0200)]
Add NV pixel formats

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Add NV21, NV16, NV61, NV24 and NV42 formats]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd support for Y10 and Y12 pixel formats
Laurent Pinchart [Wed, 21 Dec 2011 10:54:04 +0000 (11:54 +0100)]
Add support for Y10 and Y12 pixel formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd missing header file sys/stat.h
Giorgio Vazzana [Fri, 9 Dec 2011 15:26:45 +0000 (16:26 +0100)]
Add missing header file sys/stat.h

This file defines the initial permission flags used by open when we
create a file using O_CREAT flag.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoSupport writing all frames to a single file
Laurent Pinchart [Fri, 25 Nov 2011 12:02:42 +0000 (13:02 +0100)]
Support writing all frames to a single file

When using the -F/--file argument to capture frames to files, the file
name given as argument is now a pattern. If the pattern contains '#',
the first '#' character will be expanded to the frame number. Otherwise
all frames will be written to the same file.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoExit when VIDIOC_STREAMON fails.
Laurent Pinchart [Tue, 25 Oct 2011 11:59:45 +0000 (13:59 +0200)]
Exit when VIDIOC_STREAMON fails.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoPrint both error text and error code in error messages.
Laurent Pinchart [Tue, 25 Oct 2011 11:41:55 +0000 (13:41 +0200)]
Print both error text and error code in error messages.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoUse monotonic clock to retrieve timestamps
Laurent Pinchart [Tue, 25 Oct 2011 08:14:22 +0000 (10:14 +0200)]
Use monotonic clock to retrieve timestamps

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoAdd support for RGB formats
Laurent Pinchart [Tue, 25 Oct 2011 08:14:13 +0000 (10:14 +0200)]
Add support for RGB formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agoraw2bmp: Add support for raw 10bit (EXP16) format
Sergio Aguirre [Wed, 28 Sep 2011 19:07:12 +0000 (14:07 -0500)]
raw2bmp: Add support for raw 10bit (EXP16) format

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
6 years agoAdd raw bayer to bitmap conversion tool
Sergio Aguirre [Wed, 28 Sep 2011 19:00:27 +0000 (14:00 -0500)]
Add raw bayer to bitmap conversion tool

This is an exact copy of the code example shared here:

http://forums.quickcamteam.net/showthread.php?tid=1454&pid=5374#pid5374

Credits to Paulo Assis for the handy code!

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
6 years agoAdd buffer overrun checks overrun
Laurent Pinchart [Mon, 21 Mar 2011 16:33:26 +0000 (17:33 +0100)]
Add buffer overrun checks

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoFree userspace buffers when freeing video buffers
Laurent Pinchart [Mon, 11 Jul 2011 20:09:29 +0000 (22:09 +0200)]
Free userspace buffers when freeing video buffers

Memory allocated with posix_memalign() must be freed with free().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd --realtime option to switch to RR scheduling
Laurent Pinchart [Mon, 11 Apr 2011 15:29:46 +0000 (17:29 +0200)]
Add --realtime option to switch to RR scheduling

The optional argument selects the static priority. If omitted, the
priority is set to 1.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd support for missing Bayer formats
Laurent Pinchart [Sat, 14 May 2011 13:06:23 +0000 (15:06 +0200)]
Add support for missing Bayer formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoPrint class controls as headers
Laurent Pinchart [Wed, 4 May 2011 10:39:17 +0000 (12:39 +0200)]
Print class controls as headers

This improves the controls list readability.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoIgnore failed VIDIOC_QUERYCAP.
Sakari Ailus [Wed, 4 May 2011 09:18:51 +0000 (12:18 +0300)]
Ignore failed VIDIOC_QUERYCAP.

This is not a fatal error, and especially subdevs do not support it. If
VIDIOC_QUERY returns an error, assume the device is a V4L2 subdev and
set the --no-query option.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoSupport holes in menu indices
Laurent Pinchart [Sat, 30 Apr 2011 12:43:16 +0000 (14:43 +0200)]
Support holes in menu indices

When querying menu entries, don't stop at the first error returned by
the driver but loop over the [min,max] range and print supported menu
entries only.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoSupport pattern files for compressed formats
Laurent Pinchart [Mon, 21 Mar 2011 16:27:46 +0000 (17:27 +0100)]
Support pattern files for compressed formats

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoDisplay the instant frame rate for each frame during capture
Laurent Pinchart [Sun, 23 Jan 2011 01:06:19 +0000 (02:06 +0100)]
Display the instant frame rate for each frame during capture

This helps debugging framerate related problems.

Thanks to Martin Hostettler for submitting a first version of this
patch.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd support for GREY/Y8 format
Martin Hostettler [Fri, 21 Jan 2011 00:14:47 +0000 (01:14 +0100)]
Add support for GREY/Y8 format

7 years agoFix an off-by-one bug in frame count
Laurent Pinchart [Thu, 23 Dec 2010 08:49:48 +0000 (09:49 +0100)]
Fix an off-by-one bug in frame count

Thanks to Stefan Steuerwald for pointing out the issue and providing an
initial patch.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd support for the V4L2_PIX_FMT_SGRBG12 format
Laurent Pinchart [Thu, 2 Dec 2010 23:16:50 +0000 (00:16 +0100)]
Add support for the V4L2_PIX_FMT_SGRBG12 format

The format isn't available in the mainline kernel yet, so guard it with
conditional compilation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd support for SGRBG10_DPCM8 format
Laurent Pinchart [Fri, 26 Nov 2010 15:25:25 +0000 (16:25 +0100)]
Add support for SGRBG10_DPCM8 format

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd struct buffer object
Laurent Pinchart [Fri, 26 Nov 2010 15:20:25 +0000 (16:20 +0100)]
Add struct buffer object

Use the new buffer object to hold the buffer size and memory pointer.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoFix uninitialized variable warning in video_do_capture()
Laurent Pinchart [Fri, 26 Nov 2010 15:19:34 +0000 (16:19 +0100)]
Fix uninitialized variable warning in video_do_capture()

Make sure the variable won't be use uninitialized and silent the
warning.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd buffer error flag to information printed after VIDIOC_DQBUF
Laurent Pinchart [Fri, 26 Nov 2010 14:58:32 +0000 (15:58 +0100)]
Add buffer error flag to information printed after VIDIOC_DQBUF

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoAdd option to make requeue of last buffers configurable
Laurent Pinchart [Wed, 29 Sep 2010 08:32:14 +0000 (10:32 +0200)]
Add option to make requeue of last buffers configurable

When capturing n image with p buffers, dequeued buffers don't need to be
requeued in the last n - p iterations. Don't requeue them by default,
and add a --requeue-last option to force the old behaviour.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoPrint device bus info when opening the device
Laurent Pinchart [Wed, 29 Sep 2010 08:37:29 +0000 (10:37 +0200)]
Print device bus info when opening the device

To differentiate between identically named devices, print the bus info
reported by VIDIOC_QUERYCAP.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoDo not divide by zero.
Sakari Ailus [Fri, 6 Aug 2010 13:03:35 +0000 (16:03 +0300)]
Do not divide by zero.

If only one buffer was processed the performance measurement calculation
caused a division by zero. Do not do show measurements if they are bad.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
7 years agoBasic test pattern support for video output devices
Laurent Pinchart [Fri, 6 Aug 2010 13:10:37 +0000 (15:10 +0200)]
Basic test pattern support for video output devices

Instead of filling video output buffers with 0s, generate and user a
test pattern.

If the -F argument is given, the test pattern is read from the specified
file. The file size must be at equal to or bigger than the image size.

If the -F argument is not given, a basic test pattern is generated
automatically. Every byte is set to the sum of its X and Y coordinates.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoOptimise for safer free() usage.
Sakari Ailus [Sun, 1 Aug 2010 11:08:04 +0000 (14:08 +0300)]
Optimise for safer free() usage.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
7 years agoMake -c and -F options accept an optional argument
Laurent Pinchart [Fri, 30 Jul 2010 13:21:32 +0000 (15:21 +0200)]
Make -c and -F options accept an optional argument

The long --capture and --file options have an optional argument, fix the
short versions.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agoDo accept CFLAGS and LDFLAGS from environment.
Sakari Ailus [Thu, 29 Jul 2010 15:01:10 +0000 (18:01 +0300)]
Do accept CFLAGS and LDFLAGS from environment.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
7 years agoAdd support for the V4L2_PIX_FMT_Y16 format
Laurent Pinchart [Thu, 22 Jul 2010 20:09:28 +0000 (22:09 +0200)]
Add support for the V4L2_PIX_FMT_Y16 format

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoAdd --offset option to select userspace buffer alignment
Laurent Pinchart [Wed, 23 Jun 2010 07:30:41 +0000 (09:30 +0200)]
Add --offset option to select userspace buffer alignment

For driver testing purpose the --offset option can be used to modify the
userspace buffers alignment. Instead of a fixed page-boundary alignment,
buffers can now be aligned to a fixed offset starting to the beginning
of the page.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoSet the v4l2_buffer::length field when queueing a buffer
Laurent Pinchart [Wed, 2 Jun 2010 12:21:31 +0000 (14:21 +0200)]
Set the v4l2_buffer::length field when queueing a buffer

Userspace buffers size needs to be passed to drivers on VIDIOC_QBUF. Set
the v4l2_buffer::length field to the size of the allocated buffer before
calling VIDIOC_QBUF.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoAlign userspace buffers to a page size boundary
Laurent Pinchart [Wed, 2 Jun 2010 12:18:29 +0000 (14:18 +0200)]
Align userspace buffers to a page size boundary

Some devices need userspace buffers to be page-aligned. Use the
posix_memalign function instead of malloc to allocate page-aligned
buffers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoWarn when v4l2_buffer::bytesused has an unexpected value
Laurent Pinchart [Fri, 21 May 2010 13:17:31 +0000 (15:17 +0200)]
Warn when v4l2_buffer::bytesused has an unexpected value

For uncompressed formats in capture devices, the v4l2_buffer::bytesused
field should have the same value as the v4l2_pix_format::sizeimage field
reported by the VIDIOC_G_FMT ioctl.

Print a warning on VIDIOC_DQBUG when the values don't match.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoInitial import
Laurent Pinchart [Wed, 19 May 2010 09:59:00 +0000 (11:59 +0200)]
Initial import

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>