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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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).