Re: [FFmpeg-devel] [PATCH] avcodec/amfenc: Fix for windows imprecise sleep

2023-10-18 Thread Evgeny Pavlov
On Tue, Oct 17, 2023 at 9:45 PM Kacper Michajlow wrote: > On Tue, 17 Oct 2023 at 19:34, Evgeny Pavlov wrote: > > > > The reason for using av_usleep() here is that AMF API doesn’t provide an > > API for explicit wait. There are two modes to get output from encoder: > > > > 1. Polling with some sl

Re: [FFmpeg-devel] [PATCH] avcodec/amfenc: Fix for windows imprecise sleep

2023-10-17 Thread Kacper Michajlow
On Tue, 17 Oct 2023 at 19:34, Evgeny Pavlov wrote: > > The reason for using av_usleep() here is that AMF API doesn’t provide an > API for explicit wait. There are two modes to get output from encoder: > > 1. Polling with some sleep to avoid CPU thrashing – currently used in FFmpeg > > 2. Set timeo

Re: [FFmpeg-devel] [PATCH] avcodec/amfenc: Fix for windows imprecise sleep

2023-10-17 Thread Evgeny Pavlov
The reason for using av_usleep() here is that AMF API doesn’t provide an API for explicit wait. There are two modes to get output from encoder: 1. Polling with some sleep to avoid CPU thrashing – currently used in FFmpeg 2. Set timeout parameter on AMF encoder and QueryOutput call will block till

Re: [FFmpeg-devel] [PATCH] avcodec/amfenc: Fix for windows imprecise sleep

2023-10-16 Thread Zhao Zhili
> 在 2023年10月17日,上午5:24,Mark Thompson 写道: > > On 16/10/2023 10:13, Evgeny Pavlov wrote: >> This commit reduces the sleep time on Windows to improve AMF encoding >> performance on low resolution input videos. >> This fix is for Windows only, because sleep() function isn't >> very accurate on Wind

Re: [FFmpeg-devel] [PATCH] avcodec/amfenc: Fix for windows imprecise sleep

2023-10-16 Thread Mark Thompson
On 16/10/2023 10:13, Evgeny Pavlov wrote: This commit reduces the sleep time on Windows to improve AMF encoding performance on low resolution input videos. This fix is for Windows only, because sleep() function isn't very accurate on Windows OS. Fix for issue #10622 Signed-off-by: Evgeny Pavlov

[FFmpeg-devel] [PATCH] avcodec/amfenc: Fix for windows imprecise sleep

2023-10-16 Thread Evgeny Pavlov
This commit reduces the sleep time on Windows to improve AMF encoding performance on low resolution input videos. This fix is for Windows only, because sleep() function isn't very accurate on Windows OS. Fix for issue #10622 Signed-off-by: Evgeny Pavlov --- libavcodec/amfenc.c | 4 1 file