From: John Cox <jc@kynesim.co.uk> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback Date: Tue, 25 Jul 2023 12:41:38 +0100 Message-ID: <9obvbi9pb7edh81bll4vpa1dfos75rg3eu@4ax.com> (raw) In-Reply-To: <0ea5bd3d-4e6c-cd83-fe69-58e17e7e59e1@gmail.com> On Sun, 23 Jul 2023 17:04:55 -0300, you wrote: >On 7/23/2023 4:40 PM, Paul B Mahol wrote: >> On Sun, Jul 23, 2023 at 9:26?PM Nicolas George <george@nsup.org> wrote: >> >>> James Almer (12023-07-23): >>>> What about when FF_FILTER_FLAG_HWFRAME_AWARE filters are present in the >>>> graph? hw_frames_ctx from AVFilterLink can't be accessed from outside >>> lavfi. >>>> Is vf_hwdownload meant to be added to the graph before buffersink? >>> >>> I do not know how hardware acceleration works at all. (The tidbits of >>> discussion I catch left me the impression all of it is very badly >>> designed, but I have low confidence in that impression.) If this API >>> only works with filters that output software frames, it is already very >>> useful. >>> >> >> Patch is only marginally useful: >> >> - missing audio support > >Trivially added if needed and when needed. alloc_cb is a union that can >get a new callback typedef field for audio. Now added in v4 >> - missing full internal buffers allocation replacement support > >What is the benefit of supporting a custom allocator for all filters in >the chain? Internally, it's already using a very optimized buffer pool. >The caller only cares about how what they get out of buffersink is >allocated. A case was made that you might want to tweak the number of buffers in the pool, but I remain to be convinced that the substantial extra complexity of trying to do this is worth it. >> - missing/untested hardware acceleration support > >This however i agree about. We need to know how it will behave in this >scenario. How does buffersink currently handle things when the previous >filter in the chain propagates hardware frames? It just delivers them to the user The case that this code was written for and I suspect pretty much the only case it will be used for is where the user wants the frame in a special buffer that it can pass directly to display or other hardware and doesn't want the overhead of copying. Assuming that to be the case then there are two possibilities if the final filter stage produces hardware frames: a) The frames are in the right sort of h/w buffer in which case no custom allocator is wanted - code unused b) they need copying / conversion to the right sort of buffer - again custom allocation doesn't help So given that I could do the same as what avcodec ff_getbuffer does and if there is an existing h/w frame allocator then the user function isn't called. Would that be OK? If not then I'd like some constructive suggestions as to what exactly would be OK please. Regards JC >> >>> Regards, >>> >>> -- >>> Nicolas George >>> _______________________________________________ >>> ffmpeg-devel mailing list >>> ffmpeg-devel@ffmpeg.org >>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>> >>> To unsubscribe, visit link above, or email >>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". >>> >> _______________________________________________ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> To unsubscribe, visit link above, or email >> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". >_______________________________________________ >ffmpeg-devel mailing list >ffmpeg-devel@ffmpeg.org >https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > >To unsubscribe, visit link above, or email >ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2023-07-25 11:41 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-22 17:03 [FFmpeg-devel] [PATCH v3 0/1] avfilter/buffersink: Add user video frame allocation John Cox 2023-07-22 17:03 ` [FFmpeg-devel] [PATCH v3 1/1] avfilter/buffersink: Add video frame allocation callback John Cox 2023-07-22 19:14 ` Andreas Rheinhardt 2023-07-23 8:23 ` John Cox 2023-07-23 8:32 ` Andreas Rheinhardt 2023-07-23 17:21 ` James Almer 2023-07-23 19:03 ` John Cox 2023-07-23 19:06 ` Nicolas George 2023-07-23 19:16 ` James Almer 2023-07-23 19:26 ` Nicolas George 2023-07-23 19:40 ` Paul B Mahol 2023-07-23 19:36 ` Nicolas George 2023-07-23 19:45 ` Paul B Mahol 2023-07-24 8:21 ` Nicolas George 2023-07-24 9:07 ` Paul B Mahol 2023-07-24 18:24 ` James Almer 2023-07-23 19:52 ` Paul B Mahol 2023-07-23 20:04 ` James Almer 2023-07-24 18:04 ` Kieran Kunhya 2023-07-25 11:41 ` John Cox [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=9obvbi9pb7edh81bll4vpa1dfos75rg3eu@4ax.com \ --to=jc@kynesim.co.uk \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git