diff options
author | Danil Chapovalov <danilchap@webrtc.org> | 2020-06-11 19:44:24 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-12 12:42:09 +0000 |
commit | 222fdfdace7f23d06975fcc6028911febd5af3ee (patch) | |
tree | 84726ae9912c5ccb5c0d2b6552c2e9b82b00c288 | |
parent | ce73ec4a9a081350d240c403c89512c309219e41 (diff) | |
download | webrtc-222fdfdace7f23d06975fcc6028911febd5af3ee.tar.gz |
in AV1 Encoder remove hack of removing temporal delimiter OBU
Bug: webrtc:11174
Change-Id: I70e3ab1af92562b44f974aa415e0215e06fcf1cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177009
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31512}
-rw-r--r-- | modules/video_coding/codecs/av1/libaom_av1_encoder.cc | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc index ed2507d03f..0ba515e51b 100644 --- a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc +++ b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc @@ -471,20 +471,9 @@ int32_t LibaomAv1Encoder::Encode( "one data packet for an input video frame."; Release(); } - // TODO(bugs.webrtc.org/11174): Remove this hack when - // webrtc_pc_e2e::SingleProcessEncodedImageDataInjector not used or - // fixed not to assume that encoded image transfered as is. - const uint8_t* data = static_cast<const uint8_t*>(pkt->data.frame.buf); - size_t size = pkt->data.frame.sz; - if (size > 2 && data[0] == 0b0'0010'010 && data[1] == 0) { - // Typically frame starts with a Temporal Delimter OBU of size 0 that - // is not need by any component in webrtc and discarded during rtp - // packetization. Before discarded it confuses test framework that - // assumes received encoded frame is exactly same as sent frame. - data += 2; - size -= 2; - } - encoded_image.SetEncodedData(EncodedImageBuffer::Create(data, size)); + encoded_image.SetEncodedData(EncodedImageBuffer::Create( + /*data=*/static_cast<const uint8_t*>(pkt->data.frame.buf), + /*size=*/pkt->data.frame.sz)); if ((pkt->data.frame.flags & AOM_EFLAG_FORCE_KF) != 0) { layer_frame.Keyframe(); |