[FFmpeg-devel] [PATCH v2] lavfi: add nlmeans CUDA filter

Dylan Fernando dylanf123 at gmail.com
Sun Sep 5 21:02:14 EEST 2021


On Sat, Sep 4, 2021 at 10:43 AM Timo Rothenpieler <timo at rothenpieler.org>
wrote:

> On 04.09.2021 22:03, Dylan Fernando wrote:
> > On Thu, Sep 2, 2021 at 4:25 PM Timo Rothenpieler <timo at rothenpieler.org>
> > wrote:
> >
> >> On 02.09.2021 15:32, Timo Rothenpieler wrote:
> >>> On 02.09.2021 19:50, Dylan Fernando wrote:
> >>>> I want to add support for the other formats, but I'm not sure how to
> >> find
> >>>> video files to test it out. I tried looking through
> >>>> https://samples.ffmpeg.org/, but I'm not sure which files on there
> are
> >>>> the
> >>>> formats im looking for (AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV444P,
> >>>> AV_PIX_FMT_P010, AV_PIX_FMT_P016, AV_PIX_FMT_YUV444P16).
> >>>
> >>> Just slap a format_cuda filter in front and convert to the desired
> >> format.
> >>> For RGB formats, which it doesn't support right now, just use
> >>> format,hwupload_cuda.
> >>
> >> sorry, scale_cuda or format+hwupload
> >> _______________________________________________
> >> ffmpeg-devel mailing list
> >> ffmpeg-devel at ffmpeg.org
> >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>
> >> To unsubscribe, visit link above, or email
> >> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> >>
> >
> > Thanks, I have yuv420p and yuv444p working now.
> >
> > For P010, I tried using:
> > ffmpeg -loglevel debug -v verbose -hwaccel cuda -hwaccel_output_format
> cuda
> > -i noise.mp4 -vf format=p010,hwupload,nlmeans_cuda=20,hwdownload
> nlmeans.mp4
> >
> > and I get:
> > [Parsed_format_0 @ 0x558bf0ff6bc0] auto-inserting filter 'auto_scale_0'
> > between the filter 'graph 0 input from stream 0:0' and the filter
> > 'Parsed_format_0'
> > Impossible to convert between the formats supported by the filter 'graph
> 0
> > input from stream 0:0' and the filter 'auto_scale_0'
> >
> > Segmentation fault (core dumped)
>
> you're trying to hwupload something that already is uploaded by the
> decoder.
> Either use scale_cuda for the conversion, or don't have the decoder
> output CUDA frames.
>
> The segfault is a bit unexpected though. Can you get a backtrace?
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


Impossible to convert between the formats supported by the filter 'graph 0
input from stream 0:0' and the filter 'auto_scale_0'

Thread 1 "ffmpeg" received signal SIGSEGV, Segmentation fault.
0x00005555556726eb in uninit (ctx=0x55555817e800) at
libavfilter/vf_nlmeans_cuda.c:704
704         CudaFunctions *cu = s->hwctx->internal->cuda_dl;
(gdb) backtrace
#0  0x00005555556726eb in uninit (ctx=0x55555817e800) at
libavfilter/vf_nlmeans_cuda.c:704
#1  0x0000555555742e65 in avfilter_free (filter=0x55555817e800) at
libavfilter/avfilter.c:769
#2  0x0000555555744cac in avfilter_graph_free (graph=0x55555716ded0) at
libavfilter/avfiltergraph.c:126
#3  0x0000555555707ae0 in cleanup_filtergraph (fg=0x55555716dec0) at
fftools/ffmpeg_filter.c:952
#4  configure_filtergraph (fg=fg at entry=0x55555716dec0) at
fftools/ffmpeg_filter.c:1130
#5  0x000055555571b060 in ifilter_send_frame (frame=0x555557a72d00,
ifilter=0x55555716db40) at fftools/ffmpeg.c:2242
#6  send_frame_to_filters (ist=ist at entry=0x55555716c5c0,
decoded_frame=decoded_frame at entry=0x555557a72d00) at fftools/ffmpeg.c:2323
#7  0x000055555571c204 in decode_video (decode_failed=<optimized out>,
eof=<optimized out>, duration_pts=<optimized out>, got_output=<optimized
out>, pkt=<optimized out>, ist=<optimized out>)
    at fftools/ffmpeg.c:2520
#8  process_input_packet (ist=ist at entry=0x55555716c5c0, pkt=0x55555716c7c0,
no_eof=no_eof at entry=0) at fftools/ffmpeg.c:2682
#9  0x000055555571daee in process_input (file_index=<optimized out>) at
fftools/ffmpeg.c:4636
#10 transcode_step () at fftools/ffmpeg.c:4776
#11 transcode () at fftools/ffmpeg.c:4830
#12 0x00005555556f84a7 in main (argc=<optimized out>, argv=<optimized out>)
at fftools/ffmpeg.c:5035

>


More information about the ffmpeg-devel mailing list