V4L2 needs to stop on any change that triggers a V4L2_EVENT_SOURCE_CHANGE,
and that includes aspect ratio and colourspace changes.
Add a new parameter to request that behaviour from the RIL component.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This change adds a colour denoise config structure to allow us to set the
operating mode of the software colour denoise. This essentially chooses
between the video and stills colour denoise variants.
The related kernel change is at:
https://github.com/raspberrypi/linux/pull/4069
The link was broken during the documentation revamp. Just link
to vcgencmd in the online docs. Related documentation is easy
to find with the online search and reduces the number for links
to update in the future.
A misformed string in an override, eg
changeme = <0>, "-1,-2";
would stall the parsing as it didn't know how to handle ','
and kept trying to process it over and over.
Abort on incorrect syntax.
bcm_host_is_model_pi4 should be equivalent to a test that the processor
type is BCM2711, so implement it as such (having added BCM2711 as a
recognised processor type and deprecating the name BCM2838).
See: https://github.com/raspberrypi/userland/issues/695
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
I've spent a little time going through the excellent raspberry pi
documentation site in order to build some man-pages for most of the
utilities in the suite. Note that not all utilities are covered here
(notably vchiq_test, mmal_vc_diag are missing) but I think it covers the
most commonly used utilities.
I've also included some auxilliary man-pages (in section 7) for
information relevant to utilities like vcmailbox (covering things like
the mailbox info from the wiki-page, and the OTP registers from the
documentation site).
Video_decode was always ensuring that timestamps increased in value
during a stream.
V4L2 M2M API wants a direct mapping, so add an option to disable it.
Unicam can unpack to 16bpp, but only using the bottom N bits, and
V4L2 supports them all. It is also far easier for a CPU to process.
Adds support to the framework and to the ISP component (changes the
black level config).
It's supported as a standard preset within the VEC, but there was
no way of selecting it.
The 2 bits for SDTV mode in enum SDTV_MODE_T were fully utilised,
so add it as a modifier in one of the higher bits if PAL is
selected.
https://github.com/raspberrypi/firmware/issues/811
The function parameters were extended without spotting another
user with their own local prototype.
Observed as misaligned exception when using video_render.
MIPI raw 14 wasn't previously defined, so add it for completeness
To support monochrome image sensors, add formats to handle the relevant
packed data formats into the ISP, and disable demosaic.
The Bayer pipeline is still active in Bayer mode, so all 4 channels need
to be programmed with the same data for blocks such as black level and
lens shading.
Adds the equivalent to "Add option to start in burst mode if AE settings
are manual" patch to RaspiStillYUV so it too can drop straight into
capture mode.
See https://github.com/raspberrypi/userland/issues/640
The examples read the first 512 bytes of the stream and try stuffing
them into the codec as header bytes.
If running a debug build of MMAL this will fail as the extradata
field of the port format is bigger than MMAL_FORMAT_EXTRADATA_MAX_SIZE
Reduce the header bytes array down to 128bytes to match
MMAL_FORMAT_EXTRADATA_MAX_SIZE.
Both these libraries/apps were related to the VPU accessing the
host file system over VCHI. This has never been used on the Pi,
and is creating build warnings with the latest versions of gcc.
Remove them from the source tree.
Current header generates warnings of the form "warning: cast from
function call of type ‘pthread_t’ {aka ‘long unsigned int’} to
non-matching type ‘VCOS_LLTHREAD_T *’ {aka ‘struct VCOS_LLTHREAD_T *’}
[-Wbad-function-cast]". Fix that.
SET_LAUNCH_VPU (0x30013) works like SET_EXECUTE_CODE except it
runs the code on VPU1 using the QPU rpc thread. The mailbox
returns immediately, and will only fail if out of memory.
The old lens_shading parameter structures exist for backwards
compatability, but there's a new v2 version which includes a
corner_sampled flag (when the grid is sampled on cell corners rather
than centrally) and a gain_format, which allows different fractional
precision in the uint8_t values, and even a u4.10 16-bit format.
Calls through the V4L2 interface to the ISP should use the v2
style of structure.
The new 3-channel method wants 16-bit black levels whereas the single-channel method uses native sensor bit depth. This does lead to some slightly awkward code; please refer to the inline comments for the conventions used.
If exposure and analogue gain are set manually, and we run a stats
pass to setup all other control algorithms, then we can skip the
viewfinder phase and jump straight into captures, saving time over
dropped frames.
Add the relevant logic to allow this.
MMAL and video_render used not to allow the client to set the column
stride or the chroma offset.
format->es->video.width wasn't actually being used for anything as
mmal_encoding_width_to_stride returns 0 meaning the component has to
compute it.
Add an extra flag for format->flags (MMAL_ES_FORMAT_FLAG_COL_FMTS_WIDTH_IS_COL_STRIDE)
that treats format->es->video.width as the column stride instead of
being ignored.
video_render also used to ignore nSliceHeight (format->es->video.width)
on the column formats.
Adding support in setting that (via vc_image vpitch) means that you can
crop down a larger image with the chroma in a different place.
eg width=(col stride), height=2160, crop.width=1920, crop.height=1080
flags = MMAL_ES_FORMAT_FLAG_COL_FMTS_WIDTH_IS_COL_STRIDE
will display the top left 1080p image out of a 4k source image.
Need to reduce the min fps limit to 0.005 for 200s exposures
available in HQ cam.
commit 27db31a8a8 fixed this for the video
port, but we need to do the same for the stills port as well.
Add a new option (-fw) in the raspicam applications to draw
a Figure of Merit (FoM) value to indicate sharpness in the displayed
region. A larger value of FoM indicates a sharper image.
This is useful for the HQ camera to help with focussing on a subject.