Fix for a dmabuf memory leak
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Changes for reverse playback
Adapt the re-order buffer to send out frames in reverse order
when playing with negative rate.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Adapt the re-order buffer to send out frames in reverse order
when playing with negative rate.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
removed code that adds jpegparse to the pipeline
Instead increased the priority of jpegparse element.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Instead increased the priority of jpegparse element.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Set GstBuffer flags for interlaced frames
Set the Top-Field-Fist, Repeat-First-Field flags for interlaced
content on gstreamer output buffers.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Set the Top-Field-Fist, Repeat-First-Field flags for interlaced
content on gstreamer output buffers.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Allocate buffers from downstream element
Due to setting "first_out_buffer" to true by default, this plugin
does not use buffers allocated by downstream peer element. Changing
this to allow for downstream elements such as VPE plugin to allocate
and supply buffers to the decoder.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Due to setting "first_out_buffer" to true by default, this plugin
does not use buffers allocated by downstream peer element. Changing
this to allow for downstream elements such as VPE plugin to allocate
and supply buffers to the decoder.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
gst_buffer_make_metadata_writable is not needed
gst_buffer_make_metadata_writable is not needed, moreover it
creates a copy of the buffer, just gst_buffer_set_caps will set a
new caps on the buffer
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
gst_buffer_make_metadata_writable is not needed, moreover it
creates a copy of the buffer, just gst_buffer_set_caps will set a
new caps on the buffer
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
[FIX] Check for valid input ID and correct order of deletion
During the flush command, the inputID would not be valid, hence
the function call to get the dmabuf id would result in SIGSEGV
error. Added a check for the inputID before getting the fd.
Also, if the call to IPU Engine_close is done in the starting, the
access to params or dce related data results in SIGSEGV, hence moving
the call to Engine_close just before dce_deinit.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
During the flush command, the inputID would not be valid, hence
the function call to get the dmabuf id would result in SIGSEGV
error. Added a check for the inputID before getting the fd.
Also, if the call to IPU Engine_close is done in the starting, the
access to params or dce related data results in SIGSEGV, hence moving
the call to Engine_close just before dce_deinit.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
[FIX] Defer buffer lock till calling process
Fix for issue OMAPS00301600.
The output buffers need to be locked (pinned to tiler) before calling
VIDDEC3_process.
Earlier this call, dce_buf_lock, was getting called much earlier.
So, in case of an error scenario, the buffers were not being unlocked
as dce_buf_unlock was not getting called.
This patch fixes the issue by defering the locking call till
before calling VIDDEC3_process.
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Fix for issue OMAPS00301600.
The output buffers need to be locked (pinned to tiler) before calling
VIDDEC3_process.
Earlier this call, dce_buf_lock, was getting called much earlier.
So, in case of an error scenario, the buffers were not being unlocked
as dce_buf_unlock was not getting called.
This patch fixes the issue by defering the locking call till
before calling VIDDEC3_process.
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
directory struct alignment with latest codecengine
Adapted the directory structures according to the latest
codecengine for including header files
Signed-off-by: Chandramohan C <chandramohan.c@ti.com>
Adapted the directory structures according to the latest
codecengine for including header files
Signed-off-by: Chandramohan C <chandramohan.c@ti.com>
dmabuffer usage added to gst ducati plugins as per IPC3.x
According to IPC3.x input and output buffers need to be passed as
dmabuffer fd and all the output buffers need to be lock/unlock
before and after process call.This patch is to add support to
dmabuf fd and lock/unlock mechanism.
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
According to IPC3.x input and output buffers need to be passed as
dmabuffer fd and all the output buffers need to be lock/unlock
before and after process call.This patch is to add support to
dmabuf fd and lock/unlock mechanism.
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
Compilation error fixed. Happened due to a typo
playbin2 uses ducati for MJPEG/JPEG playback
Bugs fixed:
- larger files (> 4K x 4k) will still use jpegdec
- smaller files will use ducati, though nowhere to be displayed
- putting a jpegparse explicitly will not affect operation
- mjpeg is played using ducati in playbin2
Bugs fixed:
- larger files (> 4K x 4k) will still use jpegdec
- smaller files will use ducati, though nowhere to be displayed
- putting a jpegparse explicitly will not affect operation
- mjpeg is played using ducati in playbin2
Revert "playbin2 uses ducatijpegdec to play mjpeg streams"
This reverts commit b0bba5e159710919a2579bd00ee4803137304096.
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
This reverts commit b0bba5e159710919a2579bd00ee4803137304096.
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
Added debug statements to display codec version and VIDDEC3 calls
playbin2 uses ducatijpegdec to play mjpeg streams
jpegdec and ducatijpegdec both were ranked primary in the
plugin registry. increasing the rank of ducatijpegdec by one
will make it the default plugin for playing JPEG and MJPEG
streams
jpegdec and ducatijpegdec both were ranked primary in the
plugin registry. increasing the rank of ducatijpegdec by one
will make it the default plugin for playing JPEG and MJPEG
streams
10 years agoducatih264dec.c : Changed displayDelay to IVIDDEC3_DISPLAY_DELAY_AUTO from IVIDDEC3_D...
ducatih264dec.c : Changed displayDelay to IVIDDEC3_DISPLAY_DELAY_AUTO from IVIDDEC3_DECODE_ORDER
ducatimpeg2dec: disable manual reordering
I have found a video where we get ordered timestamps but out of
order frames. Until some method of working out the real ordering
of frames by looking inside the frames data, let's disable this.
I have found a video where we get ordered timestamps but out of
order frames. Until some method of working out the real ordering
of frames by looking inside the frames data, let's disable this.
ducatividdec: move latency query from ducatih264dec
It will be of use to all codecs that can delay frames when
doing reordering.
It will be of use to all codecs that can delay frames when
doing reordering.
DEBIAN: debianization
ducatijpegdec: add jpeg decoder error strings
ducatijpegdec: fix description, this MJPEG, not MPEG-2
Removed a duplicate script
Removed redundant definitions in h264enc fields
ducatih264enc is now using ih264enc.h from ducati side, rather than re-defining enums
ducatimpeg4enc is now using impeg4enc.h from ducati side, rather than re-defining enums
Removed elements for codecs not available in ducati firmware: VP6, VP7 and RealVideo
ducativp6dec, ducativp7dec and ducatirvdec are not functional
ducativp6dec, ducativp7dec and ducatirvdec are not functional
Added a tool to process GST traces and provide latencies for each element
Added a playback script, to exercise the endurance of gst-ducati
ducatividenc: use GST_PERFORMANCE category for traces related to profiling
Realigned code on new Ducati header files
Added a tool to process GST traces and provide latencies for each element
ducatividenc: use GST_PERFORMANCE category for traces related to profiling
jpegvdec: set numOutputDataUnits = 1 to please the codec
Add ducatijpegdec
ducatimpeg4dec: add MPEG4 decoder error strings
ducatih264dec: write out a MB error map when codec debug info is on
ducativc1dec: lie about simple profile videos being main profile
This fixes playback of at least one video claiming it's simple profile,
but containing frames that use a feature that are unavailable in
simple profile (intensity compensation).
As Ducati supports both main and simple profile, I don't *think* this
should have any adverse effect, but if there happens to be some profile
related issue in the future, this patch may be one to revert to see if
things improve.
This fixes playback of at least one video claiming it's simple profile,
but containing frames that use a feature that are unavailable in
simple profile (intensity compensation).
As Ducati supports both main and simple profile, I don't *think* this
should have any adverse effect, but if there happens to be some profile
related issue in the future, this patch may be one to revert to see if
things improve.
Mangle a few files with gst-indent, for future sanity
ducativc1dec: add VC1 error strings
ducatih264dec: add H264 decoder error strings
ducati: rework debug bit logging for extensibility
Codecs have their own "bit space", in which the same bits
represent different conditions.
Codecs have their own "bit space", in which the same bits
represent different conditions.
ducatih264dec: log basic MB error information when requested
ducatividdec: add a property for gathering debug info from the codec
The actual info is codec dependent. This is not done unconditionally
because it requires extra allocated memory, and potentially incurs
a speed penalty.
The actual info is codec dependent. This is not done unconditionally
because it requires extra allocated memory, and potentially incurs
a speed penalty.
ducativc1dec: move log where it will be displayed
Revert "h264dec: Actually do not accept level 5.1 in High profiles"
We had the confirmation that 5.1 HP is supported
This reverts commit bd0024c9af7016e897192e66bcb3c5717f9faf08.
We had the confirmation that 5.1 HP is supported
This reverts commit bd0024c9af7016e897192e66bcb3c5717f9faf08.
ducatividdec: remove another leftover -strided caps remnant
ducativc1dec: use const where appropriate
ducatividdec: print timestamp difference, not start timestamp
ducatih264enc: check dpb size calculation for negative values
It will happen if the required input parameters are unknown.
It will happen if the required input parameters are unknown.
ducatividdec: fix typo in log
ducatih264enc: add num-reorder-frames on caps
Since we know in advance how many frames will be required for
reordering, and since ducati doesn't seem to put that information
in the stream, we can set it in caps to tell the decoder it
doesn't have to use a conservative high bound that will most
likely be way too much.
Since we know in advance how many frames will be required for
reordering, and since ducati doesn't seem to put that information
in the stream, we can set it in caps to tell the decoder it
doesn't have to use a conservative high bound that will most
likely be way too much.
ducatividenc/ducatividdec: time VIDENC/VIDDEC call time in ms
Makes it easier to read than ns, and the encoder was missing it.
Makes it easier to read than ns, and the encoder was missing it.
ducatividdec: remove -strided caps remnants
ducatividenc: add ordering info to encoded buffers
Since we know about the ordering, doing so lets us avoid
needing a parser fill this in (if we have a parser that
can do it in the first place).
Since we know about the ordering, doing so lets us avoid
needing a parser fill this in (if we have a parser that
can do it in the first place).
ducatividenc: properly timestamp frames to cater for B frames
This relies on an assumption about the codec which is explained
in a comment in the source.
This relies on an assumption about the codec which is explained
in a comment in the source.
ducatividdec: do not push all frames on IDR
h264parse now generates an ordering that doesn't reset on IDR frames,
so we do not need to do this, which breaks in some cases, and we now
always rely on the ordering information we get.
h264parse now generates an ordering that doesn't reset on IDR frames,
so we do not need to do this, which breaks in some cases, and we now
always rely on the ordering information we get.
ducatividenc: change default keyframe interval to 16
For some unclear reason, the ducati H264 encoder only accepts
some particular pairs of values for inter and intra intervals.
While 15 was working fine with no B frames, the default intra
interval does not like being used with 15, but accepts 16.
For some unclear reason, the ducati H264 encoder only accepts
some particular pairs of values for inter and intra intervals.
While 15 was working fine with no B frames, the default intra
interval does not like being used with 15, but accepts 16.
ducatih264enc: force inter-interval to 1 for low delay case
This is a setup requirement of the ducati encoder.
This is a setup requirement of the ducati encoder.
ducatih264enc: fix B frames being disabled
The dynparams also need overriding, or the settings in
params will get ignored.
The dynparams also need overriding, or the settings in
params will get ignored.
ducatividenc: change the "None" rate-preset value to "none", for consistency
ducatividenc: remove duplicate casts and assignments
ducatih264enc: override params after letting the base class set defaults
Make max-reorder-frames an actual max, not a default max
This is more user friendly, and more useful.
This is more user friendly, and more useful.
ducatividdec: do not reorder frames when reordering info is absent
This will happen for H264 if no parser is used, for instance.
This will happen for H264 if no parser is used, for instance.
ducatih264enc: default to using B frames
Also reword the inter-interval description for clarity,
it wasn't quite correct on the exact number of B frames.
Also reword the inter-interval description for clarity,
it wasn't quite correct on the exact number of B frames.
ducativideodec: add a max-reorder-frames decoder property
It allows giving a default high bound for the number of
previous frames to buffer in order to do reordering, for
those codecs with B frames. This will be used instead of
the default high bound of 16 if a stream limit can not
be found, allowing latency to be kept in check.
It allows giving a default high bound for the number of
previous frames to buffer in order to do reordering, for
those codecs with B frames. This will be used instead of
the default high bound of 16 if a stream limit can not
be found, allowing latency to be kept in check.
ducatividenc: log how many bytes the encoded data is
ducatih264enc: expose number of B frames allowed
Make the sync point determination codec specific
This removes some H264 special casing code from the base class.
This removes some H264 special casing code from the base class.
ducatividenc: use the defines from the dce header where possible
ducatimpeg4enc: set caps in configure
If this is not done, then a buffer-alloc call will be done
downstream before caps are set, and downstream will not yet
know stream particularities such as width and height.
This fixes pipelines with ducatimpeg4enc ! ducatimpeg4dec
without an intervening mpeg4videoparse.
If this is not done, then a buffer-alloc call will be done
downstream before caps are set, and downstream will not yet
know stream particularities such as width and height.
This fixes pipelines with ducatimpeg4enc ! ducatimpeg4dec
without an intervening mpeg4videoparse.
ducatih264enc: fix hrd-buffer-size property type
It is unsigned, not signed.
It is unsigned, not signed.
ducatih264enc: include profile and level on src caps
ducatih264dec: assume no B frames for baseline profile
... and constrained-baseline too, as this doesn't appear in my
H264 spec and it looks like it should be stricter than baseline
from the name.
... and constrained-baseline too, as this doesn't appear in my
H264 spec and it looks like it should be stricter than baseline
from the name.
ducatimpeg2dec: add frame reordering
ducatividdec: move frame reordering to the base class
It was made for H264, but MPEG2 is going to need it as well.
When reordering is enabled, the buffer end offset is used as
an opaque value to compare buffer. H264 sets it to the POC,
but it may be set to a timestamp, or anything else.
It was made for H264, but MPEG2 is going to need it as well.
When reordering is enabled, the buffer end offset is used as
an opaque value to compare buffer. H264 sets it to the POC,
but it may be set to a timestamp, or anything else.
ducatih264dec: use num-reorder-frames to size the frame backlog array
Using the number of reference frames is incorrect, I did not realize
when I wrote this code that all frames may not be used as reference,
and so the numbers may differ.
Using the number of reference frames is incorrect, I did not realize
when I wrote this code that all frames may not be used as reference,
and so the numbers may differ.
ducatih264dec: reorder buffers by picture order count
This fixes out of order frames when H264 video comes from
demuxers which timestamp by decoding order instead of
presentation order (such as MPEG/TS and AVI).
This fixes out of order frames when H264 video comes from
demuxers which timestamp by decoding order instead of
presentation order (such as MPEG/TS and AVI).
h264enc: Expose the SliceMode property
h264enc: Expose the EntropyCodingMode property
videnc: Allow 'None' and 'user defined' values for VidEncRatePreset
h264enc: expose the HRDBufferSize parameter
h264enc: Expose qpI/qpMinI/qpMaxI parameters
h264enc: Expose the rcAlgo parameter
ducatividdec: set number of out buffers to 0 when we don't pass any
This fixes a spurious error from the codec on flushing, when we
call process with no output buffers, while still being configured
for two output buffers.
This fixes a spurious error from the codec on flushing, when we
call process with no output buffers, while still being configured
for two output buffers.
ducatih264enc: fix alignment misnamed align
h264dec: Actually do not accept level 5.1 in High profiles
The codec documentation is not very clear about whether it is supported
or not. To avoid accepting files that would make the codec crashing
make sure not to use the ducati decoder in that case.
The codec documentation is not very clear about whether it is supported
or not. To avoid accepting files that would make the codec crashing
make sure not to use the ducati decoder in that case.
h264dec: Set the maxNumRefFrames attribute we get from the caps
In some corner case the one computed in ivahd did not correspond to
the real value of the file. We do have the right value ourself so
rely on it.
Fixes: "#101 decoder error / planet.mkv / DCE / glp1.x"
In some corner case the one computed in ivahd did not correspond to
the real value of the file. We do have the right value ourself so
rely on it.
Fixes: "#101 decoder error / planet.mkv / DCE / glp1.x"
h264dec: Set the max level to 5.1 in caps as IVAHD actually supports it
+ Pass gstducatih264dec through gst-indent
+ Pass gstducatih264dec through gst-indent
ducatividenc: log extended error info, and use the correct one from _process
ducatih264enc: announce stream-format and align in template caps
Since these are set to specific values when the source pad is
set up, they are not subject to negotiation, so it's best to
announce them in the template caps so linking can fail early.
Since these are set to specific values when the source pad is
set up, they are not subject to negotiation, so it's best to
announce them in the template caps so linking can fail early.
ducatividdec: do not tell ducati we pass input when we do not
ducatividenc: cleanup param initialization
Use a local params pointer, and remove a nop assignment
and a duplicate one.
Use a local params pointer, and remove a nop assignment
and a duplicate one.
ducatimpeg4enc: avoid casting before checking if the cast is valid
Especially as the cast was made after again.
Especially as the cast was made after again.
viddec: Add a lookup table between decoder arrays and the buffers we pass in
This avoid leak if we flush and some buffers have not been "officially" freed by
the decoders.
This avoid leak if we flush and some buffers have not been "officially" freed by
the decoders.
viddec: Do not rely on the decoder setting freeBufID to unref our buffers when possible
In some corner cases this is not reliable and once a buffer is processed and pushed through the
pad we can just drop our references without any problem.
In some corner cases this is not reliable and once a buffer is processed and pushed through the
pad we can just drop our references without any problem.
viddec: Pass through gst-indent
ducati: fix spelling mistake in plugin description
Revert "ducati: fix build when encoders are missing"
This reverts commit d17883fbb7224040671dadb422f7613439abac48.
This reverts commit d17883fbb7224040671dadb422f7613439abac48.
mpeg4enc: the codec header is not used so don't include it