#9286: ffmpeg-qsv pipelines causes app hang if vpp_qsv+fps filters present
-------------------------------------+-------------------------------------
             Reporter:  dvrogozh     |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avfilter     |                  Version:  git-
             Keywords:  qsv          |  master
  scale_qsv fps                      |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 I've used ffmpeg from master branch @ 4c705a2 commit w/ ffmpeg-qsv
 pipeline having qsv decoder, encoder, vp. If vpp_qsv and fps filters
 present in pipeline application hangs at the very end and dumps some
 warning messages - see below

 How to reproduce:
 {{{
 $ ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v h264_qsv -i
 input.mp4 -vf "vpp_qsv=w=1920:h=1080,fps=fps=24" -c:v h264_qsv  a.mp4 -y

 ...
 [h264_qsv @ 0x5bd49a309dc0] A decode call did not consume any data: expect
 more data at input (-10)
     Last message repeated 2 times
 [out_0_0 @ 0x5bd49a8f9080] 100 buffers queued in out_0_0, something may be
 wrong.
 [out_0_0 @ 0x5bd49a8f9080] 1000 buffers queued in out_0_0, something may
 be wrong.
 [out_0_0 @ 0x5bd49a8f9080] 10000 buffers queued in out_0_0, something may
 be wrong.
 [out_0_0 @ 0x5bd49a8f9080] 100000 buffers queued in out_0_0, something may
 be wrong.
 [out_0_0 @ 0x5bd49a8f9080] 1000000 buffers queued in out_0_0, something
 may be wrong.
 }}}

 Culprit looks to be the following commit. When I revert it issue
 disappears:
 {{{
 commit 89ffcd1bbe1150aa07ae52a4e1545668a4e83a3e
 Author: Fei Wang <[email protected]>
 Date:   Wed Mar 31 10:07:44 2021 +0800

     lavfi/qsvvpp: support async depth

     Async depth will allow qsv filter cache few frames, and avoid force
     switch and end filter task frame by frame. This change will improve
     performance for some multi-task case, for example 1:N transcode(
     decode + vpp + encode) with all QSV plugins.

     Performance data test on my Coffee Lake Desktop(i7-8700K) by using
     the following 1:8 transcode test case improvement:
     1. Fps improved from 55 to 130.
     2. Render/Video usage improved from ~61%/~38% to ~100%/~70%.(Data get
     from intel_gpu_top)

     test CMD:
     ffmpeg -v verbose -init_hw_device qsv=hw:/dev/dri/renderD128
 -filter_hw_device                 \
      hw -hwaccel qsv -hwaccel_output_format qsv -c:v h264_qsv -i
 1920x1080.264                     \
     -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset
 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
     -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset
 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
     -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset
 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
     -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset
 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
     -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset
 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
     -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset
 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
     -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset
 7 -g 33 -refs 2 -bf 3 -q 24 -f null -

     Signed-off-by: Fei Wang <[email protected]>
     Reviewed-by: Linjie Fu <[email protected]>
     Signed-off-by: Zhong Li <[email protected]>
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9286>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to