[FFmpeg-devel] [PATCH] cuvid: add drop_second_field as input option and enable it by default

Timo Rothenpieler timo at rothenpieler.org
Sun Feb 12 21:56:42 EET 2017

On 2/12/2017 8:35 PM, Miroslav SlugeĊˆ wrote:
> Thx for comment,
> cuvid can't output 50fps deinterlaced output, both frames are same, and
> default behavior for yadif is to downcovert to half frame rate, so i
> think is very clever to do the same here.
> Also if we return in decoder that input is framerate/2 when
> deinterlacing we should stay with that!
> if (ctx->deint_mode != cudaVideoDeinterlaceMode_Weave)
>     avctx->framerate = av_mul_q(avctx->framerate, (AVRational){2, 1});

That equation multiplies the framerate by two, as deinterlacing doubles
it from for example 25 to 50, producing two output frames for each input
frame with two fields.

Judging from the cuvid examples, extracting two frames per interlaced
frame is the intended way of using the decoder, and at least in Adaptive
mode the frames are definitely not the same.
Never gave bob to much of a look, maybe it doesn't support it there.

More information about the ffmpeg-devel mailing list