[FFmpeg-devel] [PATCH 4/4] lavc/mpv_enc: rationalize dct_quantize init
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Sun Jun 9 12:26:50 EEST 2024
Rémi Denis-Courmont:
> Le sunnuntaina 9. kesäkuuta 2024, 11.39.55 EEST Andreas Rheinhardt a écrit :
>> Andreas Rheinhardt:
>>> Rémi Denis-Courmont:
>>>> On entry the function pointer is always NULL. We just need to set the
>>>> pointer before probing x86 CPU optimisations.
>>>
>>> Incorrect:
>>> https://github.com/mkver/FFmpeg/commit/d22d4ee8419788f9bb239a21e276cebce08
>>> 91737 (see also
>>> https://github.com/mkver/FFmpeg/commits/mpegvideo_pool/?after=d2dfcf8f226c
>>> 3708f3df080aed043ff4aa26e7cd+34 which contains the equivalent of patches
>>> 1+2 and a better version of #4)
>> Wait, I see that you only set dct_quantize unconditionally. So your
>> claim that dct_quantize is always NULL on entry is correct. But setting
>> only one of the two in the ordinary way is insufficient.
>
> In what way is it insufficient? The nullity of dct_unquantize is not used
> anywhere that I can see. And if it were used, it would behave different
> depending on the availability of MMX which would most certainly not work.
>
The two refers to the functions that are set by ff_dct_encode_init():
dct_quantize and denoise_dct (the other one). It does not involve
dct_unquantize at all.
> Of course it would be *better* to also clean-up the denoise_dct pointer. If
> you have a better patchset coming, I can drop this one but otherwise I don't
> get your point here.
>
Ok. Will send my patchset (it is currently in a branch on top of my
other mpegvideo patchset, but actually it is not logically dependent on
the rest).
- Andreas
More information about the ffmpeg-devel
mailing list