ducatividdec: fix deadlocks on early out paths
ducatividdec: prevent overread when all buffer slots are used
ducatividdec: detect unsupported codecs when switching from NULL to READY
This should allow playbin2 to try other codecs, if available.
This should allow playbin2 to try other codecs, if available.
ducatividdec: support crop qdata
Note: eventually remove crop event.. but for now leave it until other
elements are updated.
Note: eventually remove crop event.. but for now leave it until other
elements are updated.
use GstDRMBufferPool and dmabuf for sharing buffers
Use GstDRMBufferPool instead of own private bufferpool, and use
dmabuf to import buffers (either allocated by our bufferpool or
by downstream element) and qdata to attach our own private data
to the buffer. In this way the differences in code path between
using our own buffers and a downstream element's buffers is
minimized.
Use GstDRMBufferPool instead of own private bufferpool, and use
dmabuf to import buffers (either allocated by our bufferpool or
by downstream element) and qdata to attach our own private data
to the buffer. In this way the differences in code path between
using our own buffers and a downstream element's buffers is
minimized.
Revert "ducatividdec: share the drm fd with other elements in the pipeline"
Instead use dmabuf fd's to share w/ other elements in the pipeline. This
way we don't need to share a common fd for the drm/omapdce device.
This reverts commit c115a41edd4abbc4784e6921e5a9c30a17b63dfa.
Instead use dmabuf fd's to share w/ other elements in the pipeline. This
way we don't need to share a common fd for the drm/omapdce device.
This reverts commit c115a41edd4abbc4784e6921e5a9c30a17b63dfa.
ducatih264dec: force free outbufs on error 0x201 (concealment, no slice)
When the codec returns error 0x201, it doesn't free the output buffer, leading
to (downstream) buffer pool exhaustion. Special case this condition, partly
reverting 1c65dfe58e9c178503cae32dfcf10eb18c8e1bf2.
When the codec returns error 0x201, it doesn't free the output buffer, leading
to (downstream) buffer pool exhaustion. Special case this condition, partly
reverting 1c65dfe58e9c178503cae32dfcf10eb18c8e1bf2.
ducatividdec: share the drm fd with other elements in the pipeline
Implement the GstVideoContext interface to share the drm fd with
other elements in the pipeline
Implement the GstVideoContext interface to share the drm fd with
other elements in the pipeline
Initial port to omapdce
Disable encoders as they aren't supported by omapdce yet
Remove dependency on libtimemmgr
ducatih264dec: don't free inArgs->inputID twice on some error conditions
Remove some code that used to force-free inArgs->inputID on some errors. Now we
flush the codec so the buffer is unlocked during flushing.
Remove some code that used to force-free inArgs->inputID on some errors. Now we
flush the codec so the buffer is unlocked during flushing.
ducatividdec: never leave the flow_ret outarg uninitialized in codec_process
README update
ducatibufferpool: fix race in gst_ducati_bufferpool_destroy
Pop items from ->freelist with the pool lock taken to avoid races with other
threads unreffing outstanding buffers.
Pop items from ->freelist with the pool lock taken to avoid races with other
threads unreffing outstanding buffers.
ducatividdec: propagate downstream flow errors
ducatividdec: reset outArgs in flush()
Reset outArgs in flush() so that it isn't left in an inconsistent state if
flush() is called from codec_process() during error handling.
Reset outArgs in flush() so that it isn't left in an inconsistent state if
flush() is called from codec_process() during error handling.
ducatividdec: fix getcaps method adding rowstride
For yuv-strided formats we need to add the rowstride field with the
allowed range to make caps intersect properly.
For yuv-strided formats we need to add the rowstride field with the
allowed range to make caps intersect properly.
ducatividdec: Implement src pad getcaps function
The caps of the src pad should not change with upstream negotiation
except between regular yuv and rowstrided.
The caps of the src pad should not change with upstream negotiation
except between regular yuv and rowstrided.
ducatividdec: Fix indentation
ducatividenc: err.. mark keyframes on IVIDEO_IDR_FRAME frames
ducatividenc: add cropping support
ducatividenc: mark keyframes
ducatih264enc: set output caps
ducatividenc: don't memcpy input if it's already tiler backed
ducatih264dec: implement LATENCY query
ducatividdec: store upstream framerate
ducatih264dec: det displayDelay to IVIDDEC3_DISPLAY_DELAY_1
ducatividdec: flush the codec on caps changes
Flush the codec when caps change. Needed for downstream sinks that provide a
buffer pool and need to destroy all the outstanding buffers before they can
negotiate new caps (hello v4l2sink).
Flush the codec when caps change. Needed for downstream sinks that provide a
buffer pool and need to destroy all the outstanding buffers before they can
negotiate new caps (hello v4l2sink).
ducatividdec: send a crop event every time caps change
ducatih264dec: don't leak on decode errors
ducatih264dec: handle IH264VDEC_ERR_NOSLICE errors
Handle IH264VDEC_ERR_NOSLICE errors by flushing and skipping to the next
keyframe.
Handle IH264VDEC_ERR_NOSLICE errors by flushing and skipping to the next
keyframe.
ducatividdec: make codec_flush non-static so it can be used by derived classes
Rename codec_flush to gst_ducati_viddec_codec_flush and make it non-static so
derived elements can use it (for example during error recovering).
Rename codec_flush to gst_ducati_viddec_codec_flush and make it non-static so
derived elements can use it (for example during error recovering).
ducatividdec: add var to skip buffers until the next keyframe
Add wait_keyframe variable that is set to TRUE whenever we need to skip buffers
until the next keyframe.
Add wait_keyframe variable that is set to TRUE whenever we need to skip buffers
until the next keyframe.
ducatih264dec: implement B frame dropping strategy similar to ducativc1dec
ducatividdec: don't discard input timestamps at stream start
Don't discard input timestamps when forcing the allocation of buffers from the
internal pool (see 9471fe2). Fixes sync glitches with interlaced streams.
Don't discard input timestamps when forcing the allocation of buffers from the
internal pool (see 9471fe2). Fixes sync glitches with interlaced streams.
12 years agoducatividdec: workaround for the mpeg2 decoder giving wrong crop_height for interlace...
ducatividdec: workaround for the mpeg2 decoder giving wrong crop_height for interlaced streams
ducatividdec: don't renegotiate while flushing
Fixes a crash introduced by calling codec_flush in PAUSED=>READY
Fixes a crash introduced by calling codec_flush in PAUSED=>READY
ducatividdec: flush the codec going to READY
Flush the codec going to READY so we don't leak buffers if state is changed to
<= READY before EOS.
Flush the codec going to READY so we don't leak buffers if state is changed to
<= READY before EOS.
bufferpool: reset ->orig to NULL in _finalize
Reset ->orig to NULL on _finalize so that if a buffer is recycled we don't
_unref invalid memory.
Reset ->orig to NULL on _finalize so that if a buffer is recycled we don't
_unref invalid memory.
ducativc1dec: when dropping frames, drop only bframes
ducatividdec: make it possible for subclasses to participate in qos handling
ducatimpeg4dec: don't leak input buffers
ducatividdec: destroy the internal pool once we have an output buffer
We use the internal pool until we get the first output buffer, then we switch to
downstream provided buffers. Destroy the internal pool once we get the first
output buffer so that we release memory. The pool is then recreated when/if
needed.
We use the internal pool until we get the first output buffer, then we switch to
downstream provided buffers. Destroy the internal pool once we get the first
output buffer so that we release memory. The pool is then recreated when/if
needed.
ducatividdec: update the internal pool caps when switching interlaced mode
set encoders' ranks to PRIMARY + 1
Increase encoders' ranks to make them be chosen before other
primary encoders.
Increase encoders' ranks to make them be chosen before other
primary encoders.
gstducati: Fix indentation
ducatividdec: workaround for interlaced clips that are detected as progressive from upstream
Sometimes upstream thinks that some input is progressive (usually if interlaced
isn't marked correctly at the container level) when it's actually interlaced.
Detect such cases with help from the codec and adjust caps (and buffers)
accordingly.
Sometimes upstream thinks that some input is progressive (usually if interlaced
isn't marked correctly at the container level) when it's actually interlaced.
Detect such cases with help from the codec and adjust caps (and buffers)
accordingly.
ducatividdec: fix regression with clips having outBufsInUseFlag==TRUE
ducatimpeg4dec: don't forget to push the codec data buffer
ducatividdec: auto-detect when input ts are PTS
When input timestamps are in ascending order, and output timestamps
are not, that must mean the parser/demuxser is giving us the timestamps
in presentation order (PTS), not decode order (DTS).
When input timestamps are in ascending order, and output timestamps
are not, that must mean the parser/demuxser is giving us the timestamps
in presentation order (PTS), not decode order (DTS).
ducatividdec: some minor trace cleanups
ducatimpeg2dec: we want parsed stream
ducativc1dec: workaround to not abort decoding on broken frames
When on some broken frames the codec returns fatal error 0x00409000, pretend it
isn't fatal and just carry on as the codec seems to be able to continue
decoding subsequent valid frames correctly.
When on some broken frames the codec returns fatal error 0x00409000, pretend it
isn't fatal and just carry on as the codec seems to be able to continue
decoding subsequent valid frames correctly.
ducatividdec: make it possible for decoders to implement their own error handling
Useful to implement decoder specific hacks to workaround broken error reporting
from codecs.
Useful to implement decoder specific hacks to workaround broken error reporting
from codecs.
mpeg4dec: don't enable deblocking filter. Fixes codec creation failures.
Set outloopDeBlocking to FALSE as the codec doesn't seem to support that being
TRUE on recent ducati.
Set outloopDeBlocking to FALSE as the codec doesn't seem to support that being
TRUE on recent ducati.
ducatimpeg2dec: fix mpeg2 playback with 1d buffers
ducatimpeg4dec: fix compiler warnings on glp1.4
ducatividdec: fix memory leak with bufferpool buffers
If we don't have an input frame, and unref the outbuf, and the original
buffer was replaced by a bufferpool buffer, we need to unref the new
buffer, not the original.
If we don't have an input frame, and unref the outbuf, and the original
buffer was replaced by a bufferpool buffer, we need to unref the new
buffer, not the original.
ducatimpeg4dec: enabling workarounds for XviD too
ducatividdec: fix seek issue with xvid (ts_is_pts) clips
ducatimpeg4dec/ducatividdec: implement DTS queue
When packed frames are used, the timestamps we get from demuxer are
actually PTS, not DTS. Detect this and fix up the timestamps on
the outgoing buffers.
This commit implements detection of packed frames (PB-frames) in
ducatimpeg4dec, and a DTS queue in the base ducatividdec (which
could be used by other decoders). When packed frames are detected,
we assume the demuxer doesn't properly understand B-frames, and
therefore timestamps from demuxer must actually be PTS timestamps.
Because the codec is unaware of this, and re-ordering frames to
display order, if we preserve the original timestamps the video
sink ends up seeing timestamps out of order. To work around this
we pop the DTS from the demuxer out of a queue and use that
instead.
When packed frames are used, the timestamps we get from demuxer are
actually PTS, not DTS. Detect this and fix up the timestamps on
the outgoing buffers.
This commit implements detection of packed frames (PB-frames) in
ducatimpeg4dec, and a DTS queue in the base ducatividdec (which
could be used by other decoders). When packed frames are detected,
we assume the demuxer doesn't properly understand B-frames, and
therefore timestamps from demuxer must actually be PTS timestamps.
Because the codec is unaware of this, and re-ordering frames to
display order, if we preserve the original timestamps the video
sink ends up seeing timestamps out of order. To work around this
we pop the DTS from the demuxer out of a queue and use that
instead.
ducatimpeg4dec: xvid support
Handle xvid streams with B-frames encoded in containers that don't
support B-frames natively (ie. PB-frames). Packed frames are split
and passed to the codec in successive _process() calls, and non-coded
frames are discarded.
Handle xvid streams with B-frames encoded in containers that don't
support B-frames natively (ie. PB-frames). Packed frames are split
and passed to the codec in successive _process() calls, and non-coded
frames are discarded.
Revert "ducatimpeg4dec: use base VIDDEC3_* structs in allocate_params"
This reverts commit cad4102f744ea191dbce0d2a0d4e637320b387e8.
This commit broke KungFuPanda_1280x720_orig.mp4 which makes me a sad panda.
This reverts commit cad4102f744ea191dbce0d2a0d4e637320b387e8.
This commit broke KungFuPanda_1280x720_orig.mp4 which makes me a sad panda.
ducatividdec: fix NPE if outcaps are EMPTY
ducatividdec: reduce debug verbosity
ducatividdec: add support for outBufsInUseFlag
When outArgs->outBufsInUseFlag is set, the codec needs the current output buffer
to be passed for the next input frame.
When outArgs->outBufsInUseFlag is set, the codec needs the current output buffer
to be passed for the next input frame.
ducativc1dec: remove WMV1/WMV2 support
The codec can only do WMV3/VC1.
The codec can only do WMV3/VC1.
ducatih264dec: specify in template caps that the decoder can do up to profile=high,level=4.2
ducatividdec: emit a STREAM DECODE error when codec_process fails
ducatividdec: implement QoS handling
Helps a lot with large resolution clips where occasionally, especially at
the beginning, the codecs can't keep up decoding in realtime.
Helps a lot with large resolution clips where occasionally, especially at
the beginning, the codecs can't keep up decoding in realtime.
ducatividdec: set unaligned width and height in the crop event
Set unaligned width and height in the crop event. Fixes artifacts at bottom of
some clips.
Set unaligned width and height in the crop event. Fixes artifacts at bottom of
some clips.
bufferpool: alloc 1d buffers if the pool is created with null caps
bufferpool: allocate 1d or 2d according to caps
ducatividdec: propagate pixel-aspect-ratio in caps
Parse pixel-aspect-ratio in sink caps and set it on source caps.
Parse pixel-aspect-ratio in sink caps and set it on source caps.
gst-indent gstducatividdec.c
ducatividdec: don't log an ERROR when pad_alloc returns wrong-state
...as it's a pretty common condition while seeking or shutting down the pipeline
...as it's a pretty common condition while seeking or shutting down the pipeline
ducatividdec: don't error out on non fatal errors
If VIDDEC3_process returns a non fatal error, log it but don't return FLOW_ERROR
upstream.
If VIDDEC3_process returns a non fatal error, log it but don't return FLOW_ERROR
upstream.
ducatividdec: add support for video/x-raw-yuv-strided
Add support video/x-raw-yuv-strided and rework negotiation a bit so that we can
support upstream negotiation for the rowstride field (v4l2sink likes to do
that).
Add support video/x-raw-yuv-strided and rework negotiation a bit so that we can
support upstream negotiation for the rowstride field (v4l2sink likes to do
that).
ducatividenc: fix typo basevideocoder => basevideoencoder
ducatividenc: fix outbuf size calculation
ducatividenc: fix crash going PLAYING->READY->PLAYING
ducatimpeg4enc: use less custom parameters
ducatimpeg4enc: add mpeg4 encoder
Factor out a base encoder class from ducatih264enc
ducatih264enc: use base VIDENC2 structures where possible
ducatih264enc: add h264 encoder
viddec: workaround for the vc1 codec
Set memType=XDM_MEMTYPE_RAW on outbuf descs when the underlying memory is
actually of type XDM_MEMTYPE_TILEDPAGE. This should be reverted once the codec
is fixed.
Set memType=XDM_MEMTYPE_RAW on outbuf descs when the underlying memory is
actually of type XDM_MEMTYPE_TILEDPAGE. This should be reverted once the codec
is fixed.
Undo a change in gst_ducati_get_mem_type.
Make it return -1 when the virtual address doesn't match any of the known zones.
Make it return -1 when the virtual address doesn't match any of the known zones.
viddec: set the size in bytes OR pixels for outbufs, not both
viddec: more fixes to support 1d buffers
Don't detect TILEDPAGE memory as RAW. Set outbuf descs sizes in bytes when the
underlying memory is RAW or TILEDPAGE.
Don't detect TILEDPAGE memory as RAW. Set outbuf descs sizes in bytes when the
underlying memory is RAW or TILEDPAGE.
viddec: use 1d buffers
Expect and allocate 1d buffers. Support for 2d buffers will be added again at
some point in the near future.
Expect and allocate 1d buffers. Support for 2d buffers will be added again at
some point in the near future.
ducativc1dec: set frameLayerDataPresentFlag to FALSE
ducativc1dec: add debugging code to optionally forge frame headers
Add code to inject frame headers if params->frameLayerDataPresentFlag is set to
TRUE. Disabled by default, useful for debugging.
Add code to inject frame headers if params->frameLayerDataPresentFlag is set to
TRUE. Disabled by default, useful for debugging.
ducativc1dec: try hard to produce a valid sequence layer header
Make sure the codec data in the sequence layer is always 4 bytes as per STRUCT_C
definition. Some files seem to come with larger, 0 padded, codec_data buffers...
Ensure that the Reserved6 bit of STRUCT_C is always set to 1 as the codec seems
to be strict about this and some files seem to have it set to 0...
Make sure the codec data in the sequence layer is always 4 bytes as per STRUCT_C
definition. Some files seem to come with larger, 0 padded, codec_data buffers...
Ensure that the Reserved6 bit of STRUCT_C is always set to 1 as the codec seems
to be strict about this and some files seem to have it set to 0...
ducativc1dec: change param settings
Set lateAcquireArg to -1 so that the codec starts at all.. enable error
concealment and configure codec to not expect frame headers.
Set lateAcquireArg to -1 so that the codec starts at all.. enable error
concealment and configure codec to not expect frame headers.
viddec: forward queries that we don't handle directly
ducativp6dec: set payloadHeaderPresent to TRUE
ducativp7dec: set payloadHeaderPresent to TRUE
ducatimpeg4dec: use base VIDDEC3_* structs in allocate_params