[vlc-devel] [PATCH 0/6] Trying to fix the big one: Frame threading regressions
Thomas Guillem
thomas at gllm.fr
Fri Sep 27 11:45:39 CEST 2019
Here is new a branch https://code.videolan.org/tguillem/vlc/commits/decoder-frame-delay/2
I attached the diff between this new branch and my first branch (grrr, impossible to print a diff from 2 non-master branches from gitlab)
Changes since the first branch:
- The decoder latency is not added to the overall clock dejitter delay. Only the MAX between the input_dejitter (file/network-caching) and the highest decoder latency will be used. The update of the decoder latency will always succeed if it is lower than input_dejitter. For example, using the default file-caching of 300ms, video decoders will always be able to setup 9threads at 30fps (1000*9/30 = 300). If a video decoder need more threads or a lower fps, the decoder has to be started just after/before (80ms gap) the audio decoder.
- The avcodec module will try to setup less thread instead of fallbacking directly to 1 in case of decoder_UpdateVideoFrameLatency() failure.
Note: Videos tracks will very likely be started just after/before the audio (80ms gap). In that case, the update of the decoder latency will always succeed regardless of the fps/theead_count.
On Thu, Sep 26, 2019, at 16:38, Thomas Guillem wrote:
> cf. https://mailman.videolan.org/pipermail/vlc-devel/2019-September/127432.html
>
> I chose to solve this issue with:
> "- Have a way to report decoder delay.. but that would mean no playback
> until data decodes (what if only bogus data ? mutiple decs ?..)."
>
> Yes, no playback until data decodes, that is why we have a jitter delay in the
> output clock (80ms minimum).
>
> The solution I propose (explained commits by commits) will work on most case
> but won't work if the video is started late. In that case, threaded decoding
> will be disabled by avcodec. I guess it's OK since it's a corner case.
>
> Thomas Guillem (6):
> clock: remove unused variable
> clock: store the full list of clocks on the main one
> clock: add vlc_clock_SetDecoderLatency
> decoder: add decoder_UpdateVideoFrameLatency
> avcodec: re-indent for the next commit
> avcodec: use decoder_UpdateVideoFrameLatency()
>
> include/vlc_codec.h | 22 +++++++++
> modules/codec/avcodec/video.c | 69 ++++++++++++++++++---------
> src/clock/clock.c | 88 ++++++++++++++++++++++++++++++++++-
> src/clock/clock.h | 13 ++++++
> src/input/decoder.c | 30 ++++++++++++
> 5 files changed, 197 insertions(+), 25 deletions(-)
>
> --
> 2.20.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decoder-frame-delay.diff
Type: text/x-patch
Size: 5842 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190927/fa9a5c1c/attachment.bin>
More information about the vlc-devel
mailing list