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

Side by Side Diff: webrtc/common_types.h

Issue 1412233003: Support simulcast and spatial layers in VideoQualityTest (PERF NOTE) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase + suppress log spamming Created 5 years, 1 month 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
« no previous file with comments | « no previous file | webrtc/config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 kVideoNV12 = 11, 540 kVideoNV12 = 11,
541 kVideoNV21 = 12, 541 kVideoNV21 = 12,
542 kVideoBGRA = 13, 542 kVideoBGRA = 13,
543 kVideoUnknown = 99 543 kVideoUnknown = 99
544 }; 544 };
545 545
546 // Video codec 546 // Video codec
547 enum { kConfigParameterSize = 128}; 547 enum { kConfigParameterSize = 128};
548 enum { kPayloadNameSize = 32}; 548 enum { kPayloadNameSize = 32};
549 enum { kMaxSimulcastStreams = 4}; 549 enum { kMaxSimulcastStreams = 4};
550 enum { kMaxSpatialLayers = 5 };
550 enum { kMaxTemporalStreams = 4}; 551 enum { kMaxTemporalStreams = 4};
551 552
552 enum VideoCodecComplexity 553 enum VideoCodecComplexity
553 { 554 {
554 kComplexityNormal = 0, 555 kComplexityNormal = 0,
555 kComplexityHigh = 1, 556 kComplexityHigh = 1,
556 kComplexityHigher = 2, 557 kComplexityHigher = 2,
557 kComplexityMax = 3 558 kComplexityMax = 3
558 }; 559 };
559 560
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 targetBitrate == other.targetBitrate && 670 targetBitrate == other.targetBitrate &&
670 minBitrate == other.minBitrate && 671 minBitrate == other.minBitrate &&
671 qpMax == other.qpMax; 672 qpMax == other.qpMax;
672 } 673 }
673 674
674 bool operator!=(const SimulcastStream& other) const { 675 bool operator!=(const SimulcastStream& other) const {
675 return !(*this == other); 676 return !(*this == other);
676 } 677 }
677 }; 678 };
678 679
680 struct SpatialLayer {
681 int scaling_factor_num;
682 int scaling_factor_den;
683 int target_bitrate_bps;
684 // TODO(ivica): Add max_quantizer and min_quantizer?
685 };
686
679 enum VideoCodecMode { 687 enum VideoCodecMode {
680 kRealtimeVideo, 688 kRealtimeVideo,
681 kScreensharing 689 kScreensharing
682 }; 690 };
683 691
684 // Common video codec properties 692 // Common video codec properties
685 struct VideoCodec { 693 struct VideoCodec {
686 VideoCodecType codecType; 694 VideoCodecType codecType;
687 char plName[kPayloadNameSize]; 695 char plName[kPayloadNameSize];
688 unsigned char plType; 696 unsigned char plType;
689 697
690 unsigned short width; 698 unsigned short width;
691 unsigned short height; 699 unsigned short height;
692 700
693 unsigned int startBitrate; // kilobits/sec. 701 unsigned int startBitrate; // kilobits/sec.
694 unsigned int maxBitrate; // kilobits/sec. 702 unsigned int maxBitrate; // kilobits/sec.
695 unsigned int minBitrate; // kilobits/sec. 703 unsigned int minBitrate; // kilobits/sec.
696 unsigned int targetBitrate; // kilobits/sec. 704 unsigned int targetBitrate; // kilobits/sec.
697 705
698 unsigned char maxFramerate; 706 unsigned char maxFramerate;
699 707
700 VideoCodecUnion codecSpecific; 708 VideoCodecUnion codecSpecific;
701 709
702 unsigned int qpMax; 710 unsigned int qpMax;
703 unsigned char numberOfSimulcastStreams; 711 unsigned char numberOfSimulcastStreams;
704 SimulcastStream simulcastStream[kMaxSimulcastStreams]; 712 SimulcastStream simulcastStream[kMaxSimulcastStreams];
713 SpatialLayer spatialLayers[kMaxSpatialLayers];
705 714
706 VideoCodecMode mode; 715 VideoCodecMode mode;
707 716
708 // When using an external encoder/decoder this allows to pass 717 // When using an external encoder/decoder this allows to pass
709 // extra options without requiring webrtc to be aware of them. 718 // extra options without requiring webrtc to be aware of them.
710 Config* extra_options; 719 Config* extra_options;
711 720
712 bool operator==(const VideoCodec& other) const { 721 bool operator==(const VideoCodec& other) const {
713 bool ret = codecType == other.codecType && 722 bool ret = codecType == other.codecType &&
714 (STR_CASE_CMP(plName, other.plName) == 0) && 723 (STR_CASE_CMP(plName, other.plName) == 0) &&
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 uint32_t ssrc) = 0; 902 uint32_t ssrc) = 0;
894 }; 903 };
895 904
896 // RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size 905 // RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size
897 // RTCP mode is described by RFC 5506. 906 // RTCP mode is described by RFC 5506.
898 enum class RtcpMode { kOff, kCompound, kReducedSize }; 907 enum class RtcpMode { kOff, kCompound, kReducedSize };
899 908
900 } // namespace webrtc 909 } // namespace webrtc
901 910
902 #endif // WEBRTC_COMMON_TYPES_H_ 911 #endif // WEBRTC_COMMON_TYPES_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698