high cpu usage in realtime encoding scenarios due to broken code in lookahead.c

27 views
Skip to first unread message

Haseeb

unread,
Jun 14, 2016, 1:33:15 PM6/14/16
to Codec Developers
Hi,

I'm investigating high CPU usage with VP8 when using active maps. My target frame is 3840x2400 @ 30fps where only a few macro blocks changing each frame. I noticed some code that broke a while ago in lookahead.c. The original change that added optimizations to only copy macro blocks specified in the active_map was added in this checkin:

One of the conditions for the optimized copying code was that it only worked when the lookahead depth == 1.  However, that broke because of the following checkin which set the depth to be always set to atleast 2:

As a test, I tried to remove the depth == 1 check from the original checkin and I saw a substantial drop in CPU usage for my use case: ~35% in my rough tests. Any suggestions on what the correct way to fix this problem?

Thanks.

Johann Koenig

unread,
Jun 14, 2016, 5:37:11 PM6/14/16
to codec...@webmproject.org
Both of those changes are from many years back. Are you still running
into issues if you use v1.5.0 (or git HEAD, which will be released as
v1.6.0 soon)
> --
> You received this message because you are subscribed to the Google Groups
> "Codec Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to codec-devel...@webmproject.org.
> To post to this group, send email to codec...@webmproject.org.
> Visit this group at
> https://groups.google.com/a/webmproject.org/group/codec-devel/.
> For more options, visit
> https://groups.google.com/a/webmproject.org/d/optout.

Haseeb Abdul Qadir

unread,
Jun 14, 2016, 5:52:36 PM6/14/16
to codec...@webmproject.org
I just checked out HEAD and just by reading the code in vp8/encoder/lookahead.c, it seems like the issue is still present (depth always has a minimum value of 2 and the active map check looks for depth == 1).
Reply all
Reply to author
Forward
0 new messages