webrtc/modules/video_coding/codecs
Henrik Boström 56db9ff1e1 VideoStreamEncoder: Don't map kNative video frame buffers.
Follow-up CL to VP8 and VP9 encoders taking care of mapping.
Context again:
  This CL is part of Optimized Scaling efforts. In Chromium, the native
frame buffer is getting an optimized CropAndScale() implementation. To
support HW accelerated scaling, returning pre-scaled images and skipping
unnecessary intermediate downscales, WebRTC needs to 1) use CropAndScale
instead of libyuv::XXXXScale and 2) only map buffers it actually intends
to encode.

In this CL, VideoStreamEncoder no longer calls GetMappedFrameBuffer() on
behalf of the encoders, since the encoders are now able to either do the
mapping or performs ToI420() anyway.

- Tests for old VSE behaviors are updated to test the new behavior (i.e.
  that native frames are pretty much always forwarded).
- The "having to call ToI420() twice" workaround to Android bug
  https://crbug.com/webrtc/12602 is added to H264 and AV1 encoders.

Bug: webrtc:12469
Change-Id: Ibdc2e138d4782a140f433c8330950e61b9829f43
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211940
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#33548}
2021-03-24 09:43:11 +00:00
..
av1 VideoStreamEncoder: Don't map kNative video frame buffers. 2021-03-24 09:43:11 +00:00
h264 VideoStreamEncoder: Don't map kNative video frame buffers. 2021-03-24 09:43:11 +00:00
interface Extend LibvpxInterface with VP9 support and use it from LibvpxVp9Encoder 2020-12-13 18:07:05 +00:00
multiplex Support native scaling of VideoFrameBuffers in LibvpxVp9Encoder. 2021-03-22 13:35:35 +00:00
test AV1: Use Default TX type for encoding 2021-03-23 17:19:27 +00:00
vp8 Support native scaling of VideoFrameBuffers in LibvpxVp8Encoder. 2021-03-23 09:08:58 +00:00
vp9 Support native scaling of VideoFrameBuffers in LibvpxVp8Encoder. 2021-03-23 09:08:58 +00:00