[FFmpeg-devel] [PATCH] avcodec/hevc: reduce memory used by the SAO

Christophe Gisquet christophe.gisquet at gmail.com
Thu Feb 5 07:29:51 CET 2015


Hi,

2015-02-04 2:05 GMT+01:00 Michael Niedermayer <michaelni at gmx.at>:
> applied the cherry picked code and the update

James mentioned this issue:
http://fate.ffmpeg.org/report.cgi?time=20150205015545&slot=x86_64-archlinux-gcc-valgrindundef

This looks like a missing free:
==15442==    at 0x4C2C526: memalign (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15442==    by 0x4C2C641: posix_memalign (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15442==    by 0xD21B86: av_malloc (mem.c:95)
==15442==    by 0x7B8E9E: set_sps (hevc.c:345)
for sao_pixel_buffer_[hv].

We do have the cleaning code in hevc_decode_free:
    for (i = 0; i < 3; i++) {
        av_freep(&s->sao_pixel_buffer_h[i]);
        av_freep(&s->sao_pixel_buffer_v[i]);
still there is that issue.

We were previously reference-counting the sao-buffer. Should we do
that for sao_pixel_buffer_[hv], then?

-- 
Christophe


More information about the ffmpeg-devel mailing list