| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
There was a missing break for the 4:4:4 case which would break the sizeimage
calculation. We don't currently have hardware that supports 4:4:4, so this
code wasn't tested. This was detected by Coverity.
CID 1463592 1463591
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1283>
|
|
|
|
|
|
|
|
|
| |
The Cedrus driver would otherwise choose 1KB buffer, which is too small.
This follows what some drivers do, which is simply to use the size a
packed raw image would have. Specifications do not really guaranty any minimum
compression ratio.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1268>
|
|
|
|
|
|
|
|
|
| |
This adds support for slice based decoder like the Allwinner/Cedrus driver. In
order to keep things efficient, we hold the sink buffer until we reach the end
of the picture. Note that as we don't know which one is last, we lazy queue the
slices. This effectively introduces one slice latency.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1268>
|
|
|
|
|
|
|
| |
If none of the format the HW produce is supported, the fiter will be NULL,
which would lead to assertion when trying to release it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1268>
|
|
|
|
|
|
|
|
| |
The Cedrus driver uses the lagacy buffer type (non-mplane). This automatically
detect and use the right v4l2_buf_type. This also affect code using
v4l2_buffer and v4l2_format structures.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1268>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1268>
|
|
|
|
|
|
|
|
| |
Pass reference picture lists to decode_slice() vmethods
Change gstv4l2codech264dec and gstnvh264dec accordingly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1238>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit does the following things to fix compilation on FreeBSD:
1. Add required typedefs to linux/types-compat.h.
2. Remove unnecessary include linux/ioctl.h and replace linux/types.h
with linux/types-compat.h. Both files do not exist on FreeBSD.
3. Check the header including makedev macro. FreeBSD does not have
sys/sysmacros.h, and including it unconditionally causes error.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1259>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In section 9.3.4 a), segment_feature_mode have 0 for absolute and 1 for delta,
while in 19.2, it says the opposite. But the reference code, which usually
rules over the text state that 1 means absolute:
if (hdr->update_data)
{
hdr->abs = bool_get_bit(bool);
And uses it with that meaning to decide weither to override the existing value
or just add the detla. This fixes multiple decoding issues.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1245>
|
|
|
|
|
|
| |
This field was not copied.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1245>
|
|
|
|
|
|
| |
This simply trace the frame number of the references used for decoding.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1245>
|
|
|
|
|
|
|
|
| |
Our parser strictly read the bitstream. As it's known from DXVA that always
having a valid width/height might be needed, use the cached width/height
instead of the value from the parser. This didn't impact Hantro driver.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1245>
|
|
|
|
| |
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1245>
|
|
|
|
|
|
|
| |
This introduce a common place for generic functions and factor out the plugin
registration code. This code is nearly identical between implementation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1216>
|
|
|
|
|
|
|
| |
The driver adjust the width/height to coded size. This was not an issue for
H264, as the coded size is in the bitstream, but is an issue with VP8.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1216>
|
|
|
|
|
|
|
| |
This is derived from the H264 decoder, some boiler plate will be factored out
in the following commits.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1216>
|
|
|
|
|
|
|
|
| |
h264decoder baseclass provides parsed sps/pps (from codec data) for
subclass. Also, since current implementation is putting start code prefix
manually, the format of stream should not be matter for subclass.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1214>
|
|
|
|
| |
So tracer can do its job.
|
|
|
|
|
| |
Currently the GType of v4l2codecdevice is hardcoded to zero, but it
rather should be delivered by the GType system.
|
|
|
|
|
|
| |
This was revealed by Coverity.
CID 1461248
|
|
|
|
|
|
|
| |
A copy paste error was leading to file descriptor leak. This was detected by
Coverity.
CID 1461285
|
|
|
|
|
| |
This is not useful on any other OSs, it will also avoid potential build
failure as this code uses Linux specific calls.
|
|
|
|
|
| |
This ensure that the registry cache get updated when a meaningful change is
made in /dev for files named media*.
|
|
|
|
|
|
| |
This code add required mechanism to try and allocate (not implemented yet)
otherwise wait for more buffers. This also comes with mechanism to terminate
the wait on flush or PAUSED_TO_READY transitions.
|
|
|
|
|
| |
This simply consit of cycling through STREAMOFF/STREAMON with stateless
decoders.
|
|
|
|
|
| |
This add function to wait for buffers to get back into the pool along with a
set_flushing() method to allow unblocking this wait.
|
|
|
|
|
| |
This simply create an empty GstBuffer when the pool is empty. This way it's up
to the allocator to grow or wait if we ran out of memory.
|
|
|
|
|
|
| |
Use a goto to ensure that for all cases we cleanup the current picture state.
And move the src buffer allocation higher, so we don't queue a bitstream
buffer if we don't have a picture buffer to decode into.
|
|
|
|
|
|
| |
This allow negotiating the output format through caps. Some drivers can
pipeline the decoder buffer through an image processor. This only support
colorspace conversion for now.
|
|
|
|
| |
This will be needed in the output format negotiation.
|
|
|
|
|
|
| |
This implements driver stride support but only for single allocation buffers.
This code is imported from the original v4l2 plugin and adapted to the new
helper context.
|
|
|
|
|
|
|
| |
In some case, when downstream does not support GstVideoMeta, we need to
normalize the stride and offset of the buffer so that downstream can render
properly with a GstVideoMeta. This code is not called when GstVideoMeta is
supported downstream.
|
|
|
|
|
|
| |
In this patch we strictly set the GstVideoMeta width/height to the coded width
and height. Further patches will add stride support and frame copying when
downstream does not support GstVideoMeta.
|
|
|
|
|
| |
Don't let downstream cause a renegotiation at random point in time. This would
lead to spurious renegotiation and the decoder state may not be recoverable.
|
|
|
|
|
| |
These buffers should not be reused for decoding until they are no longer
referenced.
|
|
|
|
|
| |
Pass the actual amount of bytes we have copied into the bitstream buffer. Also
unmap the memory before queuing.
|
|
|
|
|
| |
This enables the request to be processed by the HW (STREAMON) and to be pushed
downstream for further processing.
|
|
|
|
| |
This includings polling of the request and streamon/streamoff.
|
|
|
|
|
|
| |
We now pass the controls, associated to a request, queue the bitstream, qeueue
a picture buffer to decode into and finally queue the request. This now runs
until the buffer pool is exhausted. The next step will be to dequeue.
|
| |
|
| |
|
|
|
|
|
|
| |
In this patch we fill the control structure with the bitstream paramter and
copy the bitstream data into V4L2 memory. Slice paramters are only the subset
of what Hantro needs, without any support for interlaced content.
|
|
|
|
| |
We now allocate and free the memory needed for streaming.
|
|
|
|
|
|
| |
This is a pooling allocator and the buffer pool does nothing other then
reusing the GstBuffer structure. Note that the pool is an internal pool, so
the start/stop/set_config virtual functions are not implemented.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This introduces the skeleton of the H264 decoder. The plugin will list the
devices and register a subclass of the GstV4L2CodecH264Dec base class. The
subclass will pick the required specific information from the GstV4L2Device
stored in the subclass structure.
|
|
|
|
|
|
|
| |
This is a GstObject which will be used to hold on media and video device file
descriptor and provide abstracted ioctl calls with these descriptor. At the
moment this helper contains just enough to enumerate the supported format.
This part will be used by the plugin to register the CODEC specific elements..
|
|
|
|
|
|
| |
Most of the features we need are very early or not expose yet in the uAPI.
Using an internal copy ensure that we everything we need is defined avoiding
to add load of checks and conditionnal code.
|