On Tue, Sep 08, 2020 at 11:18:40PM +0200, Andreas Rheinhardt wrote: > The headphone filter has an option for the user to specify an assignment > of inputs to channels (or from pairs of channels of the second input to > channels). Up until now, these channels were stored in an int containing > the logarithm of the channel layout. Yet it is not the logarithm that is > used lateron and so a retransformation was necessary. Therefore this > commit simply stores the uint64_t as is, avoiding the retransformation. > > This also has the advantage that unset channels (whose corresponding > entry is zero) can't be mistaken for valid channels any more; the old > code had to initialize the channels to -1 to solve this problem and had > to check for whether a channel is set before the retransformation > (because 1 << -1 is UB). > > The only downside of this approach is that the size of the context > increases (by 256 bytes); but this is not exceedingly much. > > Finally, the array has been moved to the end of the context; it is only > used a few times during the initialization process and moving it > decreased the offsets of lots of other entries, reducing codesize. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> > --- > libavfilter/af_headphone.c | 40 +++++++++++++------------------------- > 1 file changed, 13 insertions(+), 27 deletions(-) >
ok, if does not break usage. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".