Re: [FFmpeg-trac] #10668(avcodec:open): cuvid regression creates jerky output

2023-11-21 Thread FFmpeg
#10668: cuvid regression creates jerky output
+---
 Reporter:  Jason Dove  |Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  important   |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  cuvid   |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Roman Arzumanyan):

 Hello,

 402d98c9d467dff6931d906ebb732b9a00334e0b merely changes the default value
 of nb_surfaces variable and allows user to set it via extra_hw_frames:

 {{{

 fifo_size_inc = ctx->nb_surfaces;
 ctx->nb_surfaces = FFMAX(ctx->nb_surfaces, format->min_num_decode_surfaces
 + 3);

 if (avctx->extra_hw_frames > 0)
 ctx->nb_surfaces += avctx->extra_hw_frames;

 fifo_size_inc = ctx->nb_surfaces - fifo_size_inc;
 if (fifo_size_inc > 0 && av_fifo_grow2(ctx->frame_queue, fifo_size_inc) <
 0) {
 av_log(avctx, AV_LOG_ERROR, "Failed to grow frame queue on video
 sequence callback\n");
 ctx->internal_error = AVERROR(ENOMEM);
 return 0;
 }
 }}}


 So it can be easily fixed by reverting the default nb_surfaces value:
 {{{
 { "surfaces", "Maximum surfaces to be used for decoding",
 OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = -1 }, 25, INT_MAX, VD |
 AV_OPT_FLAG_DEPRECATED }
 }}}

 But to me it looks like a bug in Video Codec SDK which returns invalid
 min_num_decode_surfaces value.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10668(avcodec:open): cuvid regression creates jerky output

2023-11-21 Thread FFmpeg
#10668: cuvid regression creates jerky output
+---
 Reporter:  Jason Dove  |Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  important   |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  cuvid   |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Balling):

 Dup. of #10409, workaround is -surfaces 10
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10668(avcodec:open): cuvid regression creates jerky output

2023-11-20 Thread FFmpeg
#10668: cuvid regression creates jerky output
+---
 Reporter:  Jason Dove  |Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  important   |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  cuvid   |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Balling):

 It is funny. That commit was derived for a fix for another bug #8948, but
 it did not fix it, not to mention cuvid is not affected. So no wonder it
 broke other stuff.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10668(avcodec:open): cuvid regression creates jerky output

2023-11-20 Thread FFmpeg
#10668: cuvid regression creates jerky output
+---
 Reporter:  Jason Dove  |Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  important   |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  cuvid   |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Jason Dove):

 I did a git bisect and the first bad commit is
 402d98c9d467dff6931d906ebb732b9a00334e0b.

 I also confirmed that master with libavcodec/cuviddec.c at
 dc7bd7c5a5ad5ea800dfb63cc5dd15670d065527 works properly, so I at least
 have a workaround for now.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10668(avcodec:open): cuvid regression creates jerky output

2023-11-17 Thread FFmpeg
#10668: cuvid regression creates jerky output
+---
 Reporter:  Jason Dove  |Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  important   |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  cuvid   |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Changes (by Balling):

 * keywords:  cuvid decoder nvidia => cuvid
 * status:  new => open

Comment:

 Yep very simple to reproduce with  ffplay.exe -vcodec h264_cuvid
 C:\Users\ZAQU\Downloads\cuvid-decoder-regression-sample.mkv

 Wrong reordering. Indeed, a regression
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".