[FFmpeg-devel] [PATCH 4/5] avcodec/on2avc: Avoid indirection when calling float dsp function

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Wed Oct 21 08:38:39 EEST 2020


Andreas Rheinhardt:
> Anton Khirnov:
>> Quoting Andreas Rheinhardt (2020-10-19 13:07:05)
>>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
>>> ---
>>>  libavcodec/on2avc.c | 35 ++++++++++++++++++-----------------
>>>  1 file changed, 18 insertions(+), 17 deletions(-)
>>>
>>
>> I don't quite see the point of this. I cannot imagine it is measurably
>> faster, the memory savings should also be negligible.
>> And strictly speaking, it is API abuse as the functions are tied to the
>> context. It is conceivable that they could be compiled at runtime and
>> freeing the context would invalidate them.
>>
> Seems like we disagree here: I don't think that something needs to be
> measurably faster for it to be done; I don't think that small memory
> savings are negligible. And I absolutely don't think it to be API abuse:
> The API does not say that these functions are tied to the context. And
> I'd really be interested to know how freeing the context could somehow
> invalidate the functions -- after all, the AVFloatDSPContext doesn't
> have a custom free function.
> 
> - Andreas
> 
I forgot to add: Despite me disagreeing with you, I'll drop this patch.

- Andreas


More information about the ffmpeg-devel mailing list