[FFmpeg-devel] [PATCH] lavc: deprecate avcodec_dct, av_fft, av_dct, av_rdft and av_mdct

James Almer jamrial at gmail.com
Sat Feb 18 15:15:35 EET 2023


On 2/18/2023 8:52 AM, Lynne wrote:
> Feb 18, 2023, 01:00 by h.leppkes at gmail.com:
> 
>> On Fri, Feb 17, 2023 at 7:45 PM Lynne <dev at lynne.ee> wrote:
>>
>>>
>>> Feb 17, 2023, 18:08 by jamrial at gmail.com:
>>>
>>>> On 2/17/2023 1:54 PM, Lynne wrote:
>>>>
>>>>> This reverts commit 26cb36f35746fe6ef53688b119852bfa6d555f62.
>>>>>
>>>>> All filters and all codecs (except wmavoice) have been ported for the
>>>>> lavu/tx API.
>>>>>
>>>>> The noise should be minimal.
>>>>>
>>>>
>>>> It isn't. I'm getting more than two thousand lines of warnings after applying this patch from
>>>>
>>>> libavfilter/vf_spp.c
>>>> libavfilter/x86/vf_spp.c
>>>> libavcodec/asvenc.c
>>>> libavcodec/avdct.c
>>>> libavcodec/avfft.c
>>>> libavcodec/dct.c
>>>> libavcodec/fdctdsp.c
>>>> libavcodec/fft_float.c
>>>> libavcodec/fft_init_table.c
>>>> libavcodec/idctdsp.c
>>>> libavcodec/jfdctfst.c
>>>> libavcodec/jfdctint.c
>>>> libavcodec/jrevdct.c
>>>> libavcodec/mpegaudiodsp.c
>>>> libavcodec/mpegvideo_enc.c
>>>> libavcodec/rdft.c
>>>> libavcodec/wmavoice.c
>>>> libavcodec/x86/dct_init.c
>>>> libavcodec/x86/fft_init.c
>>>> libavcodec/x86/mpegvideoenc.c
>>>>
>>>> It's not just wmavoice, there's also mpeg and jpeg stuff, and one filter. For the actual fft/dct/rdft/mdct source files, you should use the deprecation warning pragmas to silence them, but the other modules need to be ported.
>>>> This patch is also missing the schedule FF_API deprecation wrapper.
>>>>
>>>
>>> Is the noise acceptable if I just deprecate the functions?
>>> It wasn't before, but it should be much less now.
>>>
>>
>> An API we still use internally doesn't seem very deprecated to me.
>> Should get rid of it, then there won't be any warnings.
>>
> 
> git grep av_fft_init | cut -d ':' -f 1 | uniq
> libavcodec/avfft.c
> libavcodec/avfft.h
> libavcodec/tests/fft.c
> 
> git grep av_dct_init | cut -d ':' -f 1 | uniq
> libavcodec/avfft.c
> libavcodec/avfft.h
> libavcodec/tests/fft.c
> 
> git grep av_rdft_init | cut -d ':' -f 1 | uniq
> fftools/ffplay.c
> libavcodec/avfft.c
> libavcodec/avfft.h
> libavcodec/tests/fft.c
> 
> git grep av_mdct_init | cut -d ':' -f 1 | uniq
> libavcodec/avfft.c
> libavcodec/avfft.h
> libavcodec/tests/fft.c
> 
> git grep av_tx_init | cut -d ':' -f 1 | uniq
> libavcodec/aacdec_template.c
> libavcodec/aacenc.c
> libavcodec/aacsbr_template.c
> libavcodec/ac3dec.c
> libavcodec/ac3enc_fixed.c
> libavcodec/ac3enc_float.c
> libavcodec/atrac1.c
> libavcodec/atrac3.c
> libavcodec/atrac3plusdec.c
> libavcodec/atrac9dec.c
> libavcodec/binkaudio.c
> libavcodec/cook.c
> libavcodec/dca_core.c
> libavcodec/dca_lbr.c
> libavcodec/dcaenc.c
> libavcodec/dolby_e.c
> libavcodec/hcadec.c
> libavcodec/imc.c
> libavcodec/nellymoserdec.c
> libavcodec/nellymoserenc.c
> libavcodec/on2avc.c
> libavcodec/opusdec_celt.c
> libavcodec/opusenc.c
> libavcodec/opusenc_psy.c
> libavcodec/qdm2.c
> libavcodec/qdmc.c
> libavcodec/siren.c
> libavcodec/twinvq.c
> libavcodec/vorbisdec.c
> libavcodec/vorbisenc.c
> libavcodec/wmadec.c
> libavcodec/wmaenc.c
> libavcodec/wmaprodec.c
> libavfilter/af_adrc.c
> libavfilter/af_afftdn.c
> libavfilter/af_afftfilt.c
> libavfilter/af_afir.c
> libavfilter/af_apsyclip.c
> libavfilter/af_arnndn.c
> libavfilter/af_aspectralstats.c
> libavfilter/af_atempo.c
> libavfilter/af_dialoguenhance.c
> libavfilter/af_firequalizer.c
> libavfilter/af_headphone.c
> libavfilter/af_sofalizer.c
> libavfilter/af_superequalizer.c
> libavfilter/af_surround.c
> libavfilter/afir_template.c
> libavfilter/asrc_afirsrc.c
> libavfilter/asrc_sinc.c
> libavfilter/avf_showcqt.c
> libavfilter/avf_showcwt.c
> libavfilter/avf_showfreqs.c
> libavfilter/avf_showspatial.c
> libavfilter/avf_showspectrum.c
> libavfilter/vaf_spectrumsynth.c
> libavfilter/vf_bm3d.c
> libavfilter/vf_convolve.c
> libavfilter/vf_fftdnoiz.c
> libavfilter/vf_fftfilt.c
> libavutil/tx.c
> libavutil/tx.h
> tests/checkasm/av_tx.c
> tests/checkasm/synth_filter.c
> 
> ...I rest my case. This is getting deprecated as soon as we reach a consensus
> on what to mark as deprecated.

git grep avcodec_dct_init | cut -d ':' -f 1 | uniq
doc/APIchanges
libavcodec/avdct.c
libavcodec/avdct.h
libavfilter/vf_spp.c

Also, just deprecate the functions, not the structs. Said structs are 
being used in places like wmavoice and mpegaudiodsp using the internal 
versions of this API. so if you intention is to remove the entire 
fft/dct/rdft/mdct code from lavc, not just the public interface, then 
they need to be ported to lavu tx eventually.
You also need to silence the warnings in the tests with the 
FF_{ENA,DISA}BLE_DEPRECATION_WARNINGS pragmas, and add a new FF_API_ 
deprecation wrapper where corresponds.


More information about the ffmpeg-devel mailing list