]> git.sesse.net Git - ffmpeg/commit
vc2enc_dwt: pad the temporary buffer by the slice size
authorRostislav Pehlivanov <atomnuker@gmail.com>
Wed, 8 Nov 2017 23:50:04 +0000 (23:50 +0000)
committerRostislav Pehlivanov <atomnuker@gmail.com>
Thu, 9 Nov 2017 00:05:48 +0000 (00:05 +0000)
commit3228ac730c11eca49d5680d5550128e397061c85
treed1d58e831e225462a2d4a0be00ecc31803a9f433
parent69218b41980883a7e75656f3058171939f5729ef
vc2enc_dwt: pad the temporary buffer by the slice size

Since non-Haar wavelets need to look into pixels outside the frame, we
need to pad the buffer. The old factor of two seemed to be a workaround
that fact and only padded to the left and bottom. This correctly pads
by the slice size and as such reduces memory usage and potential
exploits.
Reported by Liu Bingchang.

Ideally, there should be no temporary buffer but the encoder is designed
to deinterleave the coefficients into the classical wavelet structure
with the lower frequency values in the top left corner.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
libavcodec/vc2enc.c
libavcodec/vc2enc_dwt.c
libavcodec/vc2enc_dwt.h