-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FFmpeg-vaapi-encode][KBL][max_frame_size] memory leak #611
Comments
Fixes intel#611. Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Thanks @wangyan42164 , after applying the PR, got the dumped log: HEAP SUMMARY: The first leaking issue is solved, but the second still occurs. |
Fixes intel#611. Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
@fulinjie Thanks for your test. It seems only reduce 4 bytes leak based your latest log. I update my PR for free after encoding every time. Could you please try it again? Thanks. |
@wangyan42164 Sorry for replying late, I had tested it early but didn't update the result until now. ==15144== HEAP SUMMARY: After applying the updated PR, all the memory leaks are gone. |
Fixes intel#611. Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Fixes intel#611. Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Fixes intel#611. Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Fixes #611. Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
apply patch to enable max_frame_size for vaapi:
intel-media-ci/ffmpeg@bd592e7
run cmdline:
valgrind --tool=memcheck --leak-check=full --log-file=webm_log.txt ffmpeg_g -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -v verbose -f rawvideo -s:v 352x288 -i ./MOBILE_352x288_30_orig_01.yuv -vf format=nv12,hwupload -c:v h264_vaapi -profile:v main -b:v 5M -g 30 -bf 3 -max_frame_size 40000 -vframes 100 -y ./vaapi_mobile_max_frame_size.h264
Memory leak info:
==19386== HEAP SUMMARY:
==19386== in use at exit: 24,481 bytes in 121 blocks
==19386== total heap usage: 25,224 allocs, 25,103 frees, 48,604,956 bytes allocated
==19386==
==19386== 4 bytes in 1 blocks are definitely lost in loss record 2 of 19
==19386== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19386== by 0x1445B824: MOS_AllocAndZeroMemoryUtils (mos_utilities.c:3600)
==19386== by 0x1498AE37: DdiEncodeAvc::ParseMiscParamMultiPassFrameSize(void*) (media_ddi_encode_avc.cpp:364)
==19386== by 0x14991A76: DdiEncodeAvc::ParseMiscParams(void*) (media_ddi_encode_avc.cpp:1930)
==19386== by 0x1498DB27: DdiEncodeAvc::RenderPicture(VADriverContext*, unsigned int, unsigned int*, int) (media_ddi_encode_avc.cpp:940)
==19386== by 0x14963968: DdiEncode_RenderPicture(VADriverContext*, unsigned int, unsigned int*, int) (media_libva_encoder.cpp:568)
==19386== by 0x149CA604: DdiMedia_RenderPicture(VADriverContext*, unsigned int, unsigned int*, int) (media_libva.cpp:3209)
==19386== by 0x6536EA8: vaapi_encode_issue (vaapi_encode.c:432)
==19386== by 0x6538B75: ff_vaapi_encode_receive_packet (vaapi_encode.c:1007)
==19386== by 0x5EC159E: avcodec_receive_packet (encode.c:427)
==19386== by 0x13632A: flush_encoders (ffmpeg.c:1934)
==19386== by 0x141358: transcode (ffmpeg.c:4712)
==19386==
==19386== 396 bytes in 99 blocks are definitely lost in loss record 13 of 19
==19386== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19386== by 0x1445B824: MOS_AllocAndZeroMemoryUtils (mos_utilities.c:3600)
==19386== by 0x1498AE37: DdiEncodeAvc::ParseMiscParamMultiPassFrameSize(void*) (media_ddi_encode_avc.cpp:364)
==19386== by 0x14991A76: DdiEncodeAvc::ParseMiscParams(void*) (media_ddi_encode_avc.cpp:1930)
==19386== by 0x1498DB27: DdiEncodeAvc::RenderPicture(VADriverContext*, unsigned int, unsigned int*, int) (media_ddi_encode_avc.cpp:940)
==19386== by 0x14963968: DdiEncode_RenderPicture(VADriverContext*, unsigned int, unsigned int*, int) (media_libva_encoder.cpp:568)
==19386== by 0x149CA604: DdiMedia_RenderPicture(VADriverContext*, unsigned int, unsigned int*, int) (media_libva.cpp:3209)
==19386== by 0x6536EA8: vaapi_encode_issue (vaapi_encode.c:432)
==19386== by 0x6538B75: ff_vaapi_encode_receive_packet (vaapi_encode.c:1007)
==19386== by 0x5EC159E: avcodec_receive_packet (encode.c:427)
==19386== by 0x13328C: do_video_out (ffmpeg.c:1294)
==19386== by 0x134348: reap_filters (ffmpeg.c:1504)
==19386==
==19386== LEAK SUMMARY:
==19386== definitely lost: 400 bytes in 100 blocks
==19386== indirectly lost: 0 bytes in 0 blocks
==19386== possibly lost: 0 bytes in 0 blocks
==19386== still reachable: 24,081 bytes in 21 blocks
==19386== suppressed: 0 bytes in 0 blocks
==19386== Reachable blocks (those to which a pointer was found) are not shown.
==19386== To see them, rerun with: --leak-check=full --show-leak-kinds=all
The text was updated successfully, but these errors were encountered: