[FFmpeg-devel] [PATCH v2 1/1] avfilter/vf_vpp_qsv: apply 3D LUT from file.

Anton Khirnov anton at khirnov.net
Mon Jan 29 19:07:22 EET 2024


Quoting Chen Yufei (2024-01-29 04:01:51)
> On Sun, Jan 28, 2024 at 10:10 PM Anton Khirnov <anton at khirnov.net> wrote:
> >
> > Quoting Zhao Zhili (2024-01-28 14:51:58)
> > >
> > >
> > > > On Jan 28, 2024, at 18:31, Anton Khirnov <anton at khirnov.net> wrote:
> > > >
> > > > Quoting Chen Yufei (2024-01-25 17:16:46)
> > > >> On Wed, Jan 24, 2024 at 7:39 PM Anton Khirnov <anton at khirnov.net> wrote:
> > > >>>
> > > >>> Quoting Chen Yufei (2024-01-20 16:14:29)
> > > >>>> Usage: "vpp_qsv=lut3d_file=<path to file>"
> > > >>>
> > > >>> Passing file paths to a filter and having the filter load the file is
> > > >>> not recommended, it is generally preferable to have an
> > > >>> AV_OPT_TYPE_BINARY option, with IO performed by the caller.
> 
> "is not recommended, it is generally preferable"
> I take this as using `AV_OPT_TYPE_BINARY` is not a MUST.
> 
> I'm not an English native speaker, correct me If I'm wrong.
> 
> > > >>>
> > > >>> E.g. in ffmpeg CLI you can do
> > > >>> -filter vpp_qsv=/lut3d=<file>
> > > >>> to load the option value from a file.
> > > >>
> > > >> I searched for code using `AV_OPT_TYPE_BINARY`.
> > > >> `vf_libplacebo.c` gives me a good example.
> > > >>
> > > >> The LUT parsing code is took from `libavfilter/vf_lut3d.c`.
> > > >> It's mainly text processing which calls functions on `FILE*`.
> > > >> Using `AV_OPT_TYPE_BINARY` would require many changes in LUT paring
> > > >> code, and also need to change the command line option of `vf_lut3d`.
> > > >> So I'd keep the lut file option as is.
> > > >
> > > > Your patch is rejected then.
> 
> Now I understand using `AV_OPT_TYPE_BINARY` is a must.

Okay, sorry for being unclear. When I say 'recommended', it means it
must be done this way unless there is a strong technical reason to do it
otherwise. But then please provide a detailed explanation, not
something vague like "didn't seem appropriate".

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list