#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: <https://trac.ffmpeg.org/ticket/10668#comment:8>
FFmpeg <https://ffmpeg.org>
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".

Reply via email to