Improve CPU utilization when encoding VP8 with a single temporal layer

Prior to this CL, when software VP8 encoding was done with one temporal
layer, instead of only predicting from the latest frame, the code
allowed the encoder to reference the latest key frame as well.
This improves quality for the few frames immediately after
the key frame, but is not useful for later frames, which diverge
significantly from the key frame. However, the cost of producing
the prediction from more than one reference is incurred by all frames.
My measurements of the effect of this show an improvement
in CPU utilization of 5%-13% when this is not done.

foreman_352x288, 30fps, target bitrate 500kps
Pre-change:
send_enc_speed_fps: avg(566.187, 570.012, 575.665) = 570.621
send_avg_qp: 45.36
send_avg_psnr: 37.13
Post-change:
send_enc_speed_fps: avg(633.188, 604.694, 623.232) = 620.371
send_avg_qp: 45.88
send_avg_psnr: 37.0749
Improvement in send_enc_speed_fps: 8.71%

foreman_480x272, 30fps, target bitrate 500kps
Pre-change:
send_enc_speed_fps: avg(481.244, 486.971, 487.322) = 485.179
send_avg_qp: 48.9
send_avg_psnr: 37.6217
Post-change:
send_enc_speed_fps: avg(521.651, 499.416, 511.551) = 510.872
send_avg_qp: 48.88
send_avg_psnr: 37.6094
Improvement in send_enc_speed_fps: 5.29%

news_352x288, 30fps, target bitrate 500kps
Pre-change:
send_enc_speed_fps: avg(699.407, 697.837, 699.49) = 698.9113333
send_avg_qp: 24.15
send_avg_psnr: 40.9551
Post-change:
send_enc_speed_fps: avg(758.526, 768.104, 757.232) = 761.2873333
send_avg_qp: 23.9833
send_avg_psnr: 40.9697
Improvement in send_enc_speed_fps: 8.92%

Bridge_180x320_15 (video of brandtr@ from Google), 15fps, target bitrate 500kps
Pre-change:
send_enc_speed_fps: avg(454.757, 450.399, 446.812) = 450.656
send_avg_qp: 17.6771
send_avg_psnr: 39.9267
Post-change:
send_enc_speed_fps: avg(500.014, 513.316, 513.613) = 508.981
send_avg_qp: 17.6837
send_avg_psnr: 39.9137
Improvement in send_enc_speed_fps: 12.94%

Bug: webrtc:10281
Change-Id: If02736e1535c5f46689fd42b657e35a1e1f64d6d
Reviewed-on: https://webrtc-review.googlesource.com/c/120904
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26511}
1 file changed
tree: 8cde11ceedc1a7ddb1988edda179064f96b1a5af
  1. api/
  2. audio/
  3. build_overrides/
  4. call/
  5. common_audio/
  6. common_video/
  7. data/
  8. examples/
  9. logging/
  10. media/
  11. modules/
  12. p2p/
  13. pc/
  14. resources/
  15. rtc_base/
  16. rtc_tools/
  17. sdk/
  18. stats/
  19. style-guide/
  20. system_wrappers/
  21. test/
  22. tools_webrtc/
  23. video/
  24. .clang-format
  25. .git-blame-ignore-revs
  26. .gitignore
  27. .gn
  28. .vpython
  29. abseil-in-webrtc.md
  30. AUTHORS
  31. BUILD.gn
  32. CODE_OF_CONDUCT.md
  33. codereview.settings
  34. common_types.h
  35. DEPS
  36. ENG_REVIEW_OWNERS
  37. LICENSE
  38. license_template.txt
  39. native-api.md
  40. OWNERS
  41. PATENTS
  42. PRESUBMIT.py
  43. presubmit_test.py
  44. presubmit_test_mocks.py
  45. pylintrc
  46. README.chromium
  47. README.md
  48. style-guide.md
  49. WATCHLISTS
  50. webrtc.gni
  51. whitespace.txt
README.md

WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.

Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.

The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.

Development

See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.

Authoritative list of directories that contain the native API header files.

More info