Issue 1694 in webm: vp9 encoder causes memory leak

123 views
Skip to first unread message

mradha.… via monorail

unread,
Jun 6, 2020, 3:30:21 AM6/6/20
to webm-d...@webmproject.org
Status: Untriaged
Owner: ----
Labels: Type-Bug Pri-2
Components: libvpx

New issue 1694 by mradha....@gmail.com: vp9 encoder causes memory leak
https://bugs.chromium.org/p/webm/issues/detail?id=1694

What is the expected behavior? What do you see instead?

During usage of multi threaded programs by calling vp9encoder and vp9decoder multiple times with HD resolution, the memory is getting gradually increased and causing a crash in server based applications though vpx_codec_destroy is called each time.

What version are you using? On what operating system?
libvpx 1.8.2 have been used on RHEL os

Can you reproduce using the vpxdec or vpxenc tools? What command line are
you using?
Not using vpxdec or vpxenc tools, tester is only used.

Please provide any additional information below.
The settings used in tester are as follows:
bool openDecoderVP9()
{
int flags = 0;
//int flags = VPX_CODEC_USE_ERROR_CONCEALMENT;
dcfg.w = width;
dcfg.h = height;
dcfg.threads = 3;
if(vpx_codec_dec_init(&codec, dec_interface, &dcfg, flags))
return false;

vp8_postproc_cfg_t ppcfg;
ppcfg.post_proc_flag = VP8_MFQE;
ppcfg.deblocking_level = 3;
ppcfg.noise_level = 1;
ppcfg.post_proc_flag |= VP8_DEBLOCK | VP8_DEMACROBLOCK;
vpx_codec_control(&codec, VP8_SET_POSTPROC, &ppcfg);

return true;
}

bool openEncoderVP9()
{
//svpx_codec_flags_t flags = 0;
if(!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 1))
return false;

// Populate encoder configuration
if (vpx_codec_enc_config_default(vpx_interface, &cfg, 0))
return false;

//vp9 config
cfg.g_w = width;
cfg.g_h = height;
cfg.g_timebase.num = 1;
cfg.g_timebase.den = 30;
cfg.rc_target_bitrate = 500;
cfg.g_threads = 4;

cfg.rc_end_usage = VPX_CBR;
cfg.rc_buf_sz = 6000;
cfg.rc_buf_initial_sz = 4000;
cfg.rc_buf_optimal_sz = 5000;


cfg.g_usage = 0;
cfg.g_profile = 0;
cfg.g_bit_depth = VPX_BITS_8;
cfg.g_input_bit_depth = 8;
cfg.g_error_resilient = 1;
cfg.g_pass = VPX_RC_ONE_PASS;
cfg.g_lag_in_frames = 0;
cfg.rc_dropframe_thresh = 0;
cfg.rc_resize_allowed = 0;
cfg.rc_scaled_width = 0;
cfg.rc_scaled_height = 0;
cfg.rc_resize_up_thresh = 60;
cfg.rc_resize_down_thresh = 30;
cfg.rc_min_quantizer = 4;
cfg.rc_max_quantizer = 48;
cfg.rc_undershoot_pct = 95;
cfg.rc_overshoot_pct = 25;
cfg.rc_2pass_vbr_bias_pct = 50;
cfg.rc_2pass_vbr_minsection_pct = 0;
cfg.rc_2pass_vbr_maxsection_pct = 2000;

cfg.kf_mode = VPX_KF_AUTO;
cfg.kf_min_dist = 0;
cfg.kf_max_dist = 30;


// Initialize codec
if(vpx_codec_enc_init(&codec, vpx_interface, &cfg, 0))
return false;

vpx_codec_control(&codec, VP8E_SET_CPUUSED, 8);
vpx_codec_control(&codec, VP9E_SET_FRAME_PARALLEL_DECODING, 1);
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 0);
vpx_codec_control(&codec, VP8E_SET_MAX_INTRA_BITRATE_PCT, 300);
vpx_codec_control(&codec, VP9E_SET_TILE_ROWS, 1);
}

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

jz… via monorail

unread,
Jun 16, 2020, 5:39:28 PM6/16/20
to webm-d...@webmproject.org
Updates:
Cc: ji...@google.com
Owner: kys...@google.com
Status: Assigned

Comment #1 on issue 1694 by jz...@google.com: vp9 encoder causes memory leak
https://bugs.chromium.org/p/webm/issues/detail?id=1694#c1

(No comment was entered for this change.)

ji… via monorail

unread,
Jun 16, 2020, 7:51:10 PM6/16/20
to webm-d...@webmproject.org
Updates:
Cc: -ji...@google.com kys...@google.com mar...@google.com jz...@google.com
Owner: ji...@google.com

Comment #2 on issue 1694 by ji...@google.com: vp9 encoder causes memory leak
https://bugs.chromium.org/p/webm/issues/detail?id=1694#c2

I will take this one since it's libvpx related.

ji… via monorail

unread,
May 20, 2021, 8:54:30 PM5/20/21
to webm-d...@webmproject.org
Updates:
Labels: Needs-Feedback

Comment #3 on issue 1694 by ji...@google.com: vp9 encoder causes memory leak
https://bugs.chromium.org/p/webm/issues/detail?id=1694#c3

Thanks for reporting.

Could you please share more info about how vp9 encoder/decoder is called by the program? What did you mean by "calling vp9encoder and vp9decoder multiple times with HD resolution"? Did you call encoder & decoder several times in one program or run the program several times?

jz… via monorail

unread,
Oct 19, 2021, 5:39:48 PM10/19/21
to webm-d...@webmproject.org
Updates:
Status: Invalid

Comment #4 on issue 1694 by jz...@google.com: vp9 encoder causes memory leak
https://bugs.chromium.org/p/webm/issues/detail?id=1694#c4

Closing this due to lack of activity. If you're still running into an issue please answer the questions in comment #3 and reopen the bug.

Aakash chowdhury

unread,
Aug 10, 2022, 3:27:40 AM8/10/22
to WebM Discussion, jz… via monorail, no_r...@monorail-prod.appspotmail.com
 int flags = VPX_CODEC_USE_ERROR_CONCEALMENT;

can I use this configuration on the vp9 decoder??? or is it only for vp8?

James Zern

unread,
Aug 10, 2022, 2:21:40 PM8/10/22
to WebM Discussion
On Wed, Aug 10, 2022 at 12:27 AM Aakash chowdhury <amiia...@gmail.com> wrote:
 int flags = VPX_CODEC_USE_ERROR_CONCEALMENT;

can I use this configuration on the vp9 decoder??? or is it only for vp8?

This is only supported in vp8. You can check the codec interface's capabilities for VPX_CODEC_CAP_ERROR_CONCEALMENT [1]. In the future, it would be better to start a new email thread rather than replying to an unrelated bug report.

 

On Wednesday, October 20, 2021 at 3:39:48 AM UTC+6 jz… via monorail wrote:
Updates:
Status: Invalid

Comment #4 on issue 1694 by jz...@google.com: vp9 encoder causes memory leak
https://bugs.chromium.org/p/webm/issues/detail?id=1694#c4

Closing this due to lack of activity. If you're still running into an issue please answer the questions in comment #3 and reopen the bug.


--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webm-discuss/d79a4926-9101-4380-a07f-42aeb368fb75n%40webmproject.org.
Reply all
Reply to author
Forward
0 new messages