[FFmpeg-devel] [PATCH] libavcodec: Implementation of AC3 fixed point decoder
Nedeljko Babic
Nedeljko.Babic at imgtec.com
Tue Dec 31 14:36:51 CET 2013
>> >> + * constraints: multiple of 4
>> >> + */
>> >> + void (*vector_fmul_window_fixed)(int32_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len);
>> >> +
>> >> +} AVFixedDSPContext;
>> >> +
>> >> +/**
>> >> + * Initialize a fixed DSP context.
>> >> + *
>> >> + * @param fdsp fixed DSP context
>> >> + * @param strict setting to non-zero avoids using functions which may not be IEEE-754 compliant
>> >> + */
>> >> +void avpriv_fixed_dsp_init(AVFixedDSPContext *fdsp, int strict);
>> >
>> >This API/ABI is not extendible, any field added to the struct requires
>> >a major version and soname bump, adding such API/ABI is not ok
>> >yes i know you copied that design from existing code, its not ok there
>> >either
>>
>> We can make these functions stand alone and call them as such, but I guess
>> that this is bad idea also. Do you have a suggestion how should we treat them
>> correctly?
>
>i guess the easiest solution is to make the struct allocated
>by something
>
>like for example:
>AVFixedDSPContext * avpriv_alloc_fixed_dsp(int strict);
>and drop avpriv_fixed_dsp_init()
>
>and document how it has to be freed (like av_free or a seperate
>avpriv_free_fixed_dsp()
But we would still have the same structure that implements the same API/ABI,
even if it is allocated and we would still need to initialize function pointers.
Wouldn't we?
Or am I missing something...?
-Nedeljko
More information about the ffmpeg-devel
mailing list