]> git.sesse.net Git - ffmpeg/commit
avfilter/af_headphone: Avoid intermediate buffer III
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 25 Aug 2020 13:08:31 +0000 (15:08 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 9 Sep 2020 11:47:35 +0000 (13:47 +0200)
commitabe0a5dd0a87aa8f509a366910ed6e3ccc2bd281
tree09c34d85837f99f5813ac1a856d07ad15b67ea77
parent9d1f58424aa3154e63b7c7cfed6c5311ad6a6ccc
avfilter/af_headphone: Avoid intermediate buffer III

The headphone filter allocates a pair of buffers to be used as
intermediate buffers lateron: Before every use they are zeroed, then
some elements of the buffer are set and lateron the complete buffers are
copied into another, bigger buffer. These intermediate buffers are
unnecessary as the data can be directly written into the bigger buffer.
Furthermore, the whole buffer has been zeroed initially and because no
piece of this buffer is set twice (due to the fact that duplicate
channel map entries are skipped), it is unnecessary to rezero the part
of the big buffer that is about to be written to.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/af_headphone.c