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.
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.
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.
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.
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
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.
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.
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>
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>
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.
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
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.
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.
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.
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.
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.