Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc

Issue 1287643002: Enabling spatial layers in VP9Impl. Filter layers in the loopback test. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing unit tests Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 bool* last_packet) { 571 bool* last_packet) {
572 if (packets_.empty()) { 572 if (packets_.empty()) {
573 return false; 573 return false;
574 } 574 }
575 PacketInfo packet_info = packets_.front(); 575 PacketInfo packet_info = packets_.front();
576 packets_.pop(); 576 packets_.pop();
577 577
578 if (!WriteHeaderAndPayload(packet_info, buffer, bytes_to_send)) { 578 if (!WriteHeaderAndPayload(packet_info, buffer, bytes_to_send)) {
579 return false; 579 return false;
580 } 580 }
581 *last_packet = packets_.empty(); 581 // If SVC used, num_spatial_layers must be populated for each packet.
sprang_webrtc 2015/08/13 13:52:07 This comment is a bit confusing. Do you mean that
ivica 2015/08/13 15:20:30 Yeah, it really is confusing. I removed it, it's c
582 *last_packet = packets_.empty() &&
583 (hdr_.spatial_idx == kNoSpatialIdx ||
584 hdr_.spatial_idx == hdr_.num_spatial_layers - 1);
582 return true; 585 return true;
583 } 586 }
584 587
585 // VP9 format: 588 // VP9 format:
586 // 589 //
587 // Payload descriptor for F = 1 (flexible mode) 590 // Payload descriptor for F = 1 (flexible mode)
588 // 0 1 2 3 4 5 6 7 591 // 0 1 2 3 4 5 6 7
589 // +-+-+-+-+-+-+-+-+ 592 // +-+-+-+-+-+-+-+-+
590 // |I|P|L|F|B|E|V|-| (REQUIRED) 593 // |I|P|L|F|B|E|V|-| (REQUIRED)
591 // +-+-+-+-+-+-+-+-+ 594 // +-+-+-+-+-+-+-+-+
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 if (parsed_payload->payload_length == 0) { 757 if (parsed_payload->payload_length == 0) {
755 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; 758 LOG(LS_ERROR) << "Failed parsing VP9 payload data.";
756 return false; 759 return false;
757 } 760 }
758 parsed_payload->payload = 761 parsed_payload->payload =
759 payload + payload_length - parsed_payload->payload_length; 762 payload + payload_length - parsed_payload->payload_length;
760 763
761 return true; 764 return true;
762 } 765 }
763 } // namespace webrtc 766 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698