[FFmpeg-devel] [PATCH v4 13/18] avfilter/overlay_graphicsubs: Add overlay_graphicsubs and graphicsub2video filters
Soft Works
softworkz at hotmail.com
Sat Sep 11 22:17:28 EEST 2021
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Paul B Mahol
> Sent: Saturday, 11 September 2021 21:00
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH v4 13/18]
> avfilter/overlay_graphicsubs: Add overlay_graphicsubs and
> graphicsub2video filters
>
> On Sat, Sep 11, 2021 at 8:42 PM Soft Works <softworkz at hotmail.com>
> wrote:
>
> >
> >
> > > -----Original Message-----
> > > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > > Paul B Mahol
> > > Sent: Saturday, 11 September 2021 12:49
> > > To: FFmpeg development discussions and patches <ffmpeg-
> > > devel at ffmpeg.org>
> > > Subject: Re: [FFmpeg-devel] [PATCH v4 13/18]
> > > avfilter/overlay_graphicsubs: Add overlay_graphicsubs and
> > > graphicsub2video filters
> > >
> > > You are still duplicating core overlaying code from overlay
> filter,
> > > among
> > > other things.
> > >
> > > Filter should be in same file as vf_overlay filter, this is more
> > > demanding
> > > to do because its harder than code extraction/copy&paste and
> adding
> > > defines
> > > and extra variables/functions for different paths.
> >
> > I've been afraid to do that because there are significant
> differences:
> >
> > - The functions in vf_overlay are based on both images having the
> > same planes/layout, but in overlay_graphicsubs, the overlay image
> > is always PAL8, even when overlaying on something like yuv420p
> >
> > - For overlaying the PAL8 over YUV, it's most efficient to convert
> > the palette to YUV first, and then lookup in the converted
> palette
> > while overlaying
> >
> > Wouldn't you think that changing the code in vf_overlay to
> accommodate
> > for those cases, would add a bit too much complication? IMO, it
> would
> > make the resulting code hard to read and maintain.
> >
> > I can still do it - are you sure I should?
> >
>
> With some refactoring it could be done. But if subtitle stuff is
> always
> PAL8 than
> not needed to do it into vf_overlay.
OK, good.
> But some stuff is still duplicated... So refactoring could/should be
> done.
Sure, I'll remove those parts that are redundant given the fact that
it's always handling PAL8.
Thanks,
softworkz
More information about the ffmpeg-devel
mailing list