[FFmpeg-devel] [PATCH 4/4] lavc/mpv_enc: rationalize dct_quantize init

Rémi Denis-Courmont remi at remlab.net
Sun Jun 9 12:01:04 EEST 2024


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.

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.

-- 
Rémi Denis-Courmont
http://www.remlab.net/





More information about the ffmpeg-devel mailing list