Avoid copying GMB NV12 frames behind feature
Adds blink feature WebRtvLibvpxEncoderNV12. When enabled which will avoid copying and converting GMB frames in NV12 format, by mapping the data for reading. This is only available when scaling does not need to be done. When scaling is needed, the frame will be converted to I420 and scaled as before. Comparing encode times with the feature on and off shows trivial differences with the Mac facetime camera, capturing NV12 to an IOSurface shows a trivial difference in encode time (10.2ms for I420 vs 9.8ms NV12 on mapped GMB). Both runs done in compiled Chrome with appr.tc sending HD encoded with VP9. Power draw is also about the same (+0.2W with I420 at a stddev of 2.4W) Tested running Chrome with the feature on and off, confirming that NV12 images were encoded with the VP9 encoder. Bug: 1134165 Change-Id: I479e3541536317268c5ca25a3e88c4898bfa2ff1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2467860Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Henrik Boström <hbos@chromium.org> Commit-Queue: Evan Shrubsole <eshr@google.com> Cr-Commit-Position: refs/heads/master@{#818819}
Showing
This diff is collapsed.
Please register or sign in to comment