Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop while framerate lower than input

2020-07-05 Thread Max Dmitrichenko
On Sun, Jul 5, 2020 at 5:56 PM Zhong Li  wrote:

> > > I can't see the benefit to use MSDK framerate conversion function. Is
> > > it a good idea to drop it and use ffmpeg native fps filter instead?
> >
> > Reconsidering this, leaving the filter buggy doesn't seem to be
> comfortable to me,
> > hence IMHO it'll be better to have this bug fixed.
> My suggestion would be just delete MSDK framerate conversion instead
> of patch it.
> Will send a patch if nobody against.
>

should be ok when comes with proper description,
as comes with price of performance

regards
Max
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop while framerate lower than input

2020-07-05 Thread Zhong Li
> > I can't see the benefit to use MSDK framerate conversion function. Is
> > it a good idea to drop it and use ffmpeg native fps filter instead?
>
> Reconsidering this, leaving the filter buggy doesn't seem to be comfortable 
> to me,
> hence IMHO it'll be better to have this bug fixed.
My suggestion would be just delete MSDK framerate conversion instead
of patch it.
Will send a patch if nobody against.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop while framerate lower than input

2020-06-30 Thread Fu, Linjie
> From: Zhong Li 
> Sent: Sunday, April 19, 2020 23:00
> To: Fu, Linjie 
> Cc: FFmpeg development discussions and patches  de...@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop
> while framerate lower than input
> 
> Fu, Linjie  于2020年2月29日周六 下午5:35写道:
> >
> > > -Original Message-
> > > From: Zhong Li 
> > > Sent: Saturday, February 29, 2020 13:14
> > > To: FFmpeg development discussions and patches  > > de...@ffmpeg.org>
> > > Cc: Fu, Linjie 
> > > Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite
> loop
> > > while framerate lower than input
> > >
> > > Linjie Fu  于2020年2月28日周五 下午11:34写
> 道:
> > > >
> > > > There are frame droppings in frc while converting into a lower
> framerate,
> > > > and MSDK returns ERROR_MORE_DATA which should be ignored.
> > >
> > > Should be fixed in MSDK instead of working around in FFmpeg?
> >
> > MSDK made decision regarding frame rate conversion. If it's the framerate
> down case,
> > FRC would skip frame without producing an output [1], and request a new
> input frame.
> 
> I can't see the benefit to use MSDK framerate conversion function. Is
> it a good idea to drop it and use ffmpeg native fps filter instead?

Reconsidering this, leaving the filter buggy doesn't seem to be comfortable to 
me,
hence IMHO it'll be better to have this bug fixed.

Ping for this, thx.

- Linjie

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop while framerate lower than input

2020-04-21 Thread Fu, Linjie
> From: Zhong Li 
> Sent: Tuesday, April 21, 2020 17:10
> To: Fu, Linjie 
> Cc: FFmpeg development discussions and patches  de...@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop
> while framerate lower than input
> 
> > > I can't see the benefit to use MSDK framerate conversion function. Is
> > > it a good idea to drop it and use ffmpeg native fps filter instead?
> >
> > The implementation of FRC inside MSDK is quite straight-forward or simple
> > currently since it just drops or repeats frames, hence I think using native
> fps
> > filter is a good idea for decoding + FRC or FRC + encoding.
> >
> > However, for a pure hardware transcoding pipeline, there may be some
> > performance issues if inserting a software filter, extra memory copy would
> > be introduced in hwdownload/hwupload between system memory and
> video
> > memory, which would impact a lot for large resolutions.
> IIRC, it is not necessary to insert hwdownload/upload to use fps filter. No ?
Ahh, you are right, the native fps filter would be fair enough for this case.

Thanks for the elaborations.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop while framerate lower than input

2020-04-21 Thread Zhong Li
> > I can't see the benefit to use MSDK framerate conversion function. Is
> > it a good idea to drop it and use ffmpeg native fps filter instead?
>
> The implementation of FRC inside MSDK is quite straight-forward or simple
> currently since it just drops or repeats frames, hence I think using native 
> fps
> filter is a good idea for decoding + FRC or FRC + encoding.
>
> However, for a pure hardware transcoding pipeline, there may be some
> performance issues if inserting a software filter, extra memory copy would
> be introduced in hwdownload/hwupload between system memory and video
> memory, which would impact a lot for large resolutions.
IIRC, it is not necessary to insert hwdownload/upload to use fps filter. No ?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop while framerate lower than input

2020-04-20 Thread Fu, Linjie
> From: Zhong Li 
> Sent: Sunday, April 19, 2020 23:00
> To: Fu, Linjie 
> Cc: FFmpeg development discussions and patches  de...@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop
> while framerate lower than input
> 
> Fu, Linjie  于2020年2月29日周六 下午5:35写道:
> >
> > > -Original Message-
> > > From: Zhong Li 
> > > Sent: Saturday, February 29, 2020 13:14
> > > To: FFmpeg development discussions and patches  > > de...@ffmpeg.org>
> > > Cc: Fu, Linjie 
> > > Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite
> loop
> > > while framerate lower than input
> > >
> > > Linjie Fu  于2020年2月28日周五 下午11:34写
> 道:
> > > >
> > > > There are frame droppings in frc while converting into a lower
> framerate,
> > > > and MSDK returns ERROR_MORE_DATA which should be ignored.
> > >
> > > Should be fixed in MSDK instead of working around in FFmpeg?
> >
> > MSDK made decision regarding frame rate conversion. If it's the framerate
> down case,
> > FRC would skip frame without producing an output [1], and request a new
> input frame.
> 
> I can't see the benefit to use MSDK framerate conversion function. Is
> it a good idea to drop it and use ffmpeg native fps filter instead?

The implementation of FRC inside MSDK is quite straight-forward or simple
currently since it just drops or repeats frames, hence I think using native fps
filter is a good idea for decoding + FRC or FRC + encoding.

However, for a pure hardware transcoding pipeline, there may be some
performance issues if inserting a software filter, extra memory copy would
be introduced in hwdownload/hwupload between system memory and video
memory, which would impact a lot for large resolutions.

Took a simple tests for 4K 10bit HEVC transcoding:

# inserting a fps filter in the transcoding: 20 fps
$ ffmpeg -hwaccel qsv -c:v hevc_qsv -i ../Exodus_UHD_HDR_Exodus_draft.mp4 -vf 
"hwdownload,format=p010le,fps=fps=60,hwupload=extra_hw_frames=40" -c:v hevc_qsv 
out.mp4

# using msdk framerate conversion: 33 fps
$ ffmpeg -hwaccel qsv -c:v hevc_qsv -i ../Exodus_UHD_HDR_Exodus_draft.mp4 -vf 
"vpp_qsv=framerate=60" -c:v hevc_qsv out.mp4

- Linjie
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop while framerate lower than input

2020-04-19 Thread Zhong Li
Fu, Linjie  于2020年2月29日周六 下午5:35写道:
>
> > -Original Message-
> > From: Zhong Li 
> > Sent: Saturday, February 29, 2020 13:14
> > To: FFmpeg development discussions and patches  > de...@ffmpeg.org>
> > Cc: Fu, Linjie 
> > Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop
> > while framerate lower than input
> >
> > Linjie Fu  于2020年2月28日周五 下午11:34写道:
> > >
> > > There are frame droppings in frc while converting into a lower framerate,
> > > and MSDK returns ERROR_MORE_DATA which should be ignored.
> >
> > Should be fixed in MSDK instead of working around in FFmpeg?
>
> MSDK made decision regarding frame rate conversion. If it's the framerate 
> down case,
> FRC would skip frame without producing an output [1], and request a new input 
> frame.

I can't see the benefit to use MSDK framerate conversion function. Is
it a good idea to drop it and use ffmpeg native fps filter instead?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop while framerate lower than input

2020-02-29 Thread Fu, Linjie
> -Original Message-
> From: Zhong Li 
> Sent: Saturday, February 29, 2020 13:14
> To: FFmpeg development discussions and patches  de...@ffmpeg.org>
> Cc: Fu, Linjie 
> Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop
> while framerate lower than input
> 
> Linjie Fu  于2020年2月28日周五 下午11:34写道:
> >
> > There are frame droppings in frc while converting into a lower framerate,
> > and MSDK returns ERROR_MORE_DATA which should be ignored.
> 
> Should be fixed in MSDK instead of working around in FFmpeg?

MSDK made decision regarding frame rate conversion. If it's the framerate down 
case, 
FRC would skip frame without producing an output [1], and request a new input 
frame.

This seems to match the description in mediasdk-man.md [2]:
MFX_ERR_MORE_DATA: Need more input frames before VPP can produce an output

[1] 
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/_studio/mfx_lib/vpp/src/mfx_vpp_hw.cpp#L324
[2] 
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxvideovpp_runframevppasync

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH] lavfi/vf_vpp_qsv: fix the infinite loop while framerate lower than input

2020-02-28 Thread Zhong Li
Linjie Fu  于2020年2月28日周五 下午11:34写道:
>
> There are frame droppings in frc while converting into a lower framerate,
> and MSDK returns ERROR_MORE_DATA which should be ignored.

Should be fixed in MSDK instead of working around in FFmpeg?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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