852 Commits

Author SHA1 Message Date
James Hughes
11389772c7 Update README.md 2018-02-19 11:42:00 +00:00
James Hughes
7f18da3e20 Update README.md 2018-02-19 11:36:27 +00:00
James Hughes
106ac0f641 Update README.md 2018-02-19 11:34:04 +00:00
popcornmix
6c9eb49569 vc_image: Add plumbing for side-by-side YUV420 format
So U and V have same pitch as Y, but V = U + pitch/2
2018-02-07 19:09:06 +00:00
Dave Stevenson
da1dab313d MMAL: Use calloc on some structures to make Valgrind happy
Valgrind complains that various bits of MMAL structures
are used before initialised. They aren't, but are filled
in by the VPU or kernel so are out of sight of Valgrind.

Using calloc for a couple of structures has minimal overhead
and shuts Valgrind up.
2018-02-05 18:18:14 +00:00
ledazul
fd98fcd643 Raspicam: Verbose does not need to be disabled when writing to stdout
When writing to stdout ("-o -") verbose mode was being cancelled
due to an expected conflict.
Verbose text actually goes to stderr, so there is no conflict,
therefore remove the code that was disabling verbose mode.
2018-01-31 17:33:32 +00:00
Dave Stevenson
b09c6e0030 raspividyuv: Fix saving timestamps.
The copy/paste from raspivid was missing some bits, so
fix it.
2018-01-31 17:33:32 +00:00
James Hughes
1c3a9eb76d Support for independant display configuration
Add config.txt entries for individual display transposition and
mods to dispmanx to support it.

Required (in a way) for new LCD displays that operate by default
in portrait, where you need to rotate them, but not the HDMI
output.

Displays info structure now contains information to say what needs to be
done to the orientation to make it landscape so display driver can
tell dispmanx whether a transpose is required without configuration
options needing to be set.

Three new config.txt flags:
display_lcd_rotate -specifies rotate of LCD only.
display_hdmi_rotate - rotate of HDMI/composite only.
extra_transpose_buffer - allocates an extra transpose buffer when of
a display is required.
2018-01-29 22:07:27 +00:00
Dave Stevenson
7c8ee0eec5 vc_image_helper: Add YUV 16 bit formats to second header
Duplicated in vc_image.h and vc_image_helper.h :-(
2018-01-29 22:07:27 +00:00
Dave Stevenson
e38766e5a6 vc_image: Add VC_IMAGE_TF_U8 and V8 to the ANY_TFORMAT case
Thew case_VC_IMAGE_ANY_TFORMAT macro was missing VC_IMAGE_TF_U8
and VC_IMAGE_TF_V8, so computing the pitch was failing.

The case described in https://github.com/raspberrypi/userland/issues/433
is fixed with this.
2018-01-29 22:07:27 +00:00
Dave Stevenson
e2cf59f2e5 Video encode: Add option to set number of droppable P frames
OMX_IndexParamBrcmDroppablePFrames allowed the codec to be set up
to make every other P-frame droppable (ie not a refernce frame for
any subsequent frames).
Extend this with OMX_IndexParamBrcmDroppableRunLength/
MMAL_PARAMETER_VIDEO_DROPPABLE_PFRAME_LENGTH to set the rate at which
reference P frames will be inserted.

https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=201882
2018-01-29 22:07:27 +00:00
Dave Stevenson
744830a6c8 mmal/ril: Add MMAL_PARAMETER_VIDEO_ENCODE_SEPARATE_NAL_BUFS
Adds MMAL_PARAMETER_VIDEO_ENCODE_SEPARATE_NAL_BUFS to map to
OMX_IndexParamBrcmNALSSeparate.
Also adds MMAL_BUFFER_HEADER_FLAG_NAL_END to map to
OMX_BUFFERFLAG_ENDOFNAL.
2018-01-29 22:07:27 +00:00
Dave Stevenson
bff44579f1 mmal_il: Add missing mappings for 8 bit Bayer encodings
Mappings were missing for MMAL_ENCODING_BAYER_SGRBG8,
SGBRG8, and SRGGB8. Add them.
2018-01-29 21:11:22 +00:00
D C
ff2eac3548 gx_create_window error cleanup fix
In the event of an error the cleanup code for gx_create_window() was cleaning up things that hadn't happened and crashing.
2018-01-29 17:03:39 +00:00
ledazul
e9e90c674e Verbose is not disabled when capture is streamed
Verbose was being disabled when a capture is sent to stdout, but verbose is sent to stderr, so there is no need to disable it.
2018-01-29 13:19:29 +00:00
Guillermo A. Amaral
9c42baea7b Install interface/peer headers.
Currently vc_vchi_dispmanx.h requires vc_vchi_dispmanx_common.h which is
not distributed on install. This limits access to the ELEMENT_CHANGE_*
defines.
2018-01-18 16:23:20 +00:00
Yukimasa Sugizaki
c9d823d0c3 user-vcsm: Add an interface to get a VideoCore address of handle (#445) 2018-01-03 14:55:14 +00:00
Phil Elwell
3cd60d45bc dtoverlay app: Report unknown parameters in help
dtoverlay and dtparam will now report the first unknown parameter and
return an error.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
2017-12-08 15:13:40 +00:00
Phil Elwell
2e0e726a27 dtoverlay app: Keep overlay symbols private
As of 4.14, the kernel overlay merging includes any symbols defined
by an overlay, which can cause clashes between overlays (and even
within them in the case that an overlay deliberately adds a global
symbol as a way of exporting it to other overlays).

In future we may choose to make use of this mechanism as a nicer
way of exporting symbols, but for now just delete all symbols before
presenting the overlay to the kernel.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
2017-12-08 15:13:40 +00:00
Yann E. MORIN
2fe51001db host-apps/dtoverlay: don't install scripts in random location
Currently, we add a custom command that installs the dtoverlay pre/post
scripts in ${CMAKE_BINARY_DIR}/../../bin

However:

  - this points outside of the package directory; it even points two
    directories higher;

  - when doing cross-compilation, this is definitely not the place where
    the /bin directory really is;

  - the scripts are already properly installed without this code.

Remove that code, it serves no purpose and breaks for cross-compilation.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2017-12-08 15:13:40 +00:00
Phil Elwell
d9a493ba3c dtoverlay: Create "/aliases" node when needed
Attempting to add an alias currently fails if there is no
existing "/aliases" node. Prevent an error by creating one
as necessary.

See: https://github.com/raspberrypi/firmware/issues/906

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
2017-12-08 15:13:40 +00:00
James Hughes
b65652494c Update README.md 2017-12-05 12:44:02 +00:00
Serge Schneider
359099dc38 Include stdarg.h in dtoverlay.h 2017-11-27 10:00:50 +00:00
Spencer
bc3c52a513 raspicam: Improved readme with readme syntax (#439) 2017-11-14 10:22:33 +00:00
6by9
20ecf5c83d RaspiVid: Print message stating TC358743 drivers are unsupported (#437)
Support requests for the TC358743 are getting annoying, so
state that the drivers are unsupported, and are there on an
as-is basis.
2017-11-03 13:32:10 +00:00
James Hughes
d819af5de6 Merge pull request #438 from maditnerd/patch-1
RaspiCamControl.c : Typo in digital gain
2017-11-03 11:04:58 +00:00
Rémi Sarrailh
375006f0dd RaspiCamControl.c : Typo in digital gain 2017-11-03 11:52:54 +01:00
Dave Stevenson
212184f0f1 Raspicam: Add manual controls for analog and digital gain.
Requires exposure mode to be left at "auto" (or at least not
"off").
Fixes the value of analog and digital gains independently,
so eg fixing analog gain at x4.0 will still allow exposure
and digital gain to vary.
2017-10-10 13:44:17 +01:00
Dave Stevenson
511ae2dfae MMAL: Fix example_basic_2 to actually play video
example_basic_2 seemed to be broken. It tried to use
ZERO_COPY but in an invalid way. It also never looked
for format changed events off the decoder, so would
just stop once the decoder issued those.

It now correctly allocates pools so that it can use zero
copy, and also acts on MMAL_EVENT_FORMAT_CHANGED events
to reallocate the pools and hence proceed.

Fixes #285
2017-10-10 13:44:17 +01:00
Dave Stevenson
30e3cdd8f6 .gitignore: Ignore typical output files 2017-10-10 13:44:17 +01:00
Yukimasa Sugizaki
c19cf729d7 mmal_wrapper: Fix a short allocation for pools and queues (#426)
mmal_component_wrapper: Fix a short allocation for pools and queues
2017-10-10 10:45:29 +01:00
popcornmix
52758b7637 interface: Remove some compiler warnings 2017-10-06 18:48:13 +01:00
popcornmix
66bb8d0f01 tvservice: Avoid unmatched reference counting on attach/unplugged events
Thanks to Phil for spotting the suspicious code.
See: https://github.com/raspberrypi/firmware/issues/875
2017-10-06 18:45:47 +01:00
Dave Stevenson
1b6e913f53 IL ISP: Add white balance and digital gain to ISP component 2017-10-06 18:44:55 +01:00
Dave Stevenson
1b87d5696e IL Camera: Add manual analog and digital gain controls.
With MMAL_PARAMETER_ANALOG_GAIN and MMAL_PARAMETER_DIGITAL_GAIN
setting either numerator or denominator to 0 will retain auto
operation, otherwise the tuner will adopt the specified gain
where the hardware will allow.
The AGC algorithm does NOT include a fixed digital gain,
so a fixed digital gain with auto exposure and analog gain
will typically result in over exposed images.
2017-10-06 18:44:47 +01:00
Dave Stevenson
a7976021a8 vcsm: Add dmabuf import function. 2017-09-08 18:29:52 +01:00
Dave Stevenson
8c63a00a4d IL/MMAL: Add I420 and YUVUV 10bpp formats
10bits per pixel packed in the least significant bits
of 16 bit words.
Not replicated in VC_IMAGE, and only supported by the ISP component.
2017-09-08 18:28:40 +01:00
popcornmix
3caf0cd4a6 vcsm: Add new clean/invalidate command for 2D blocks 2017-08-22 15:23:00 +01:00
popcornmix
109acbfd6c hello_fft: Fixup offset calculation when mapping/unmapping buffers
See: https://github.com/raspberrypi/userland/issues/408
2017-08-22 15:19:55 +01:00
Dave Stevenson
c507de9810 vc_image headers: Tidy up duplication
When vc_image_helper.h was merged in, some stuff got
left behind in vc_image.h leading to duplication and
confusion. Clean it up.
2017-08-22 15:18:31 +01:00
Dave Stevenson
9aab1498b5 IL ISP: Add option for adjusting the input CCM
Two new parameters:
CcmShift shifts the CCM N bits left or right
CustomCcm overrides the defined CCM totally. It is divided by 8
so that the magnitude of samples remains as expected.
2017-07-22 00:36:02 +01:00
Dave Stevenson
afcf7f24b6 IL ISP: Add option to alter the shift in the output stage.
Allows data to be packed into the least significant bits of
a 16 bit word.
2017-07-22 00:36:02 +01:00
m00fighter
771a9aa715 Raspicam: Add command line option for flicker avoidance (#406)
Make it possible to control flicker avoidance from command line.
Option "--flicker" or "-fli", with values of "off", "auto", "50hz" or "60hz".
2017-07-13 10:19:30 +01:00
Dave Stevenson
29835184aa MMAL/RIL: Add mapping for OMX_IndexConfigCommon[In|Out]putCrop
InputCrop is supported by resize (and soon vc.ril.isp).

MMAL/RIL: Add MMAL_PARAMETER_RESIZE_PARAMS / OMX_IndexParamResize mapping

Used by the resize component as an alternative way of setting up
the resize parameters.

IL ISP: Add black level and lens shading controls

Lens shading takes the same form as the override used on
the camera component.
2017-07-11 14:34:08 +01:00
Dave Stevenson
ce575fb89a vc_image/mmal/il/isp: Add support for 16bit/component YUV420 and YUVUV 2017-07-11 14:27:17 +01:00
popcornmix
aa3977538b vcdbg: Don't use dma when file provided 2017-06-13 18:07:28 +01:00
Dave Stevenson
97d9486956 vc_image/mmal/il/isp: Add support for 16bit/component YUV420 and YUVUV
Adopt 64pixel/128byte wide columns for YUV_UV_16 so that the strides
work out the same as YUV_UV.

Plumbed int through vc_image for basic setup.
OpenMaxIL/MMAL have the plumbing in place.
IL "source" component can generate YUV420_16, YUV_UV_128, or
YUVUV_16 for most patterns. (YUVUV_128 and YUVUV_16 produce
different results to other formats for random. YUVUV_16 also
produces a doubled slope angle for diagonal)

IL "isp" component will accept them as input formats.
2017-06-13 18:05:59 +01:00
Dave Stevenson
d9e4d8c266 vc_image: Remove structure definition duplication
interface/vctypes/vc_image_structs.h gained all the
VC_IMAGE structures, but they didn't removed from
helpers/vc_image/vc_image.h.
Remove this duplication.
2017-06-13 18:02:29 +01:00
Phil Elwell
70239d863c dtoverlay: Short-circuit empty parameter handling
Return success early if a parameter declaration has an empty body,
to avoid mallocing a zero-length block and save time.
2017-06-13 17:51:50 +01:00
popcornmix
126f3de96f tvservice: Avoid referencing uninitialised state when unsuccessful 2017-05-30 15:59:10 +01:00