[FFmpeg-devel] [PATCH] libavformat/hlsenc: Allow usage of 'periodic-rekey' with multi-variant streams

2020-04-30 Thread Yaroslav Pogrebnyak
ch then as needed. Signed-off-by: Yaroslav Pogrebnyak --- libavformat/hlsenc.c | 81 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index d75684741f..1522eb5218 100644 --- a/libavformat/hlse

Re: [FFmpeg-devel] [PATCH v2 2/2] avfilter: add vf_overlay_cuda

2020-03-20 Thread Yaroslav Pogrebnyak
On 20.03.20 00:47, Timo Rothenpieler wrote: I'm looking into adding hardware-frame support to make_writable, so modifications might not be needed. Yep it seems to be more consistent if av_frame_make_writable could support hardware frames. Please let me know if you are going to do it, or if

Re: [FFmpeg-devel] [PATCH v2 2/2] avfilter: add vf_overlay_cuda

2020-03-19 Thread Yaroslav Pogrebnyak
On 19.03.20 22:41, Timo Rothenpieler wrote: h264_cuvid copies frames back to normal VRAM, and does not pass around mapped nvdec surfaces, like nvdec does. Writing around in these is documented as disallowed. You can call av_frame_is_writable() on the frame. If it returns true, it's safe to wr

Re: [FFmpeg-devel] [PATCH v2 2/2] avfilter: add vf_overlay_cuda

2020-03-19 Thread Yaroslav Pogrebnyak
On 19.03.20 21:40, Timo Rothenpieler wrote: For what I'm aware, make_writable does not work on hardware frames. And the nvdec hwaccel returns frames that are mapped device memory, and thus hard read-only. You will need to manually allocate output frames from the hw_frames_ctx. Yes I see. So

Re: [FFmpeg-devel] [PATCH v2 2/2] avfilter: add vf_overlay_cuda

2020-03-19 Thread Yaroslav Pogrebnyak
Oh, I didn't noticed that h264_cuvid is legacy. It seems the problem in this line: ret = av_frame_make_writable(input_main); If removed, it starts to work with -hwaccel cuda. I'll take a closed look why and what happens but any advice would be helpful. Thanks! On 19.03.20 21:15, Timo Rothe

[FFmpeg-devel] [PATCH v2 0/2] Overlay Cuda Filter

2020-03-18 Thread Yaroslav Pogrebnyak
v2 changes: - Splitted changes into two distinct patches, one for hwcontext, another for filter itself - Fixed switch() statement indent according to style Yaroslav Pogrebnyak (2): avutil/hwcontext_cuda: add YUVA420P pixel format avfilter: add vf_overlay_cuda configure

[FFmpeg-devel] [PATCH v2 1/2] avutil/hwcontext_cuda: add YUVA420P pixel format

2020-03-18 Thread Yaroslav Pogrebnyak
Signed-off-by: Yaroslav Pogrebnyak --- libavutil/hwcontext_cuda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c index a87c280cf7..3c4e36dde7 100644 --- a/libavutil/hwcontext_cuda.c +++ b/libavutil/hwcontext_cuda.c

[FFmpeg-devel] [PATCH v2 2/2] avfilter: add vf_overlay_cuda

2020-03-18 Thread Yaroslav Pogrebnyak
Signed-off-by: Yaroslav Pogrebnyak --- Changes in v2: - Fixed switch() indentation style configure | 2 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_overlay_cuda.c | 446 + libavfilter

[FFmpeg-devel] [PATCH] avfilter: add vf_overlay_cuda

2020-03-18 Thread Yaroslav Pogrebnyak
yuva420p, hwupload[o], [v:0]scale_npp=format=yuv420p[m], [m][o]overlay_cuda=x=0:y=0:shortest=false" \ -an -c:v h264_nvenc -b:v 5M output.mp4 Patch attached. P.S. This is my first patch, I would be grateful for any feedback to know if I'm doing things correctly or not. Thanks!