xref: /aosp_15_r20/external/webrtc/api/video_codecs/scalability_mode.cc (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Worker /*
2*d9f75844SAndroid Build Coastguard Worker  *  Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
3*d9f75844SAndroid Build Coastguard Worker  *
4*d9f75844SAndroid Build Coastguard Worker  *  Use of this source code is governed by a BSD-style license
5*d9f75844SAndroid Build Coastguard Worker  *  that can be found in the LICENSE file in the root of the source
6*d9f75844SAndroid Build Coastguard Worker  *  tree. An additional intellectual property rights grant can be found
7*d9f75844SAndroid Build Coastguard Worker  *  in the file PATENTS.  All contributing project authors may
8*d9f75844SAndroid Build Coastguard Worker  *  be found in the AUTHORS file in the root of the source tree.
9*d9f75844SAndroid Build Coastguard Worker  */
10*d9f75844SAndroid Build Coastguard Worker 
11*d9f75844SAndroid Build Coastguard Worker #include "api/video_codecs/scalability_mode.h"
12*d9f75844SAndroid Build Coastguard Worker 
13*d9f75844SAndroid Build Coastguard Worker #include "rtc_base/checks.h"
14*d9f75844SAndroid Build Coastguard Worker 
15*d9f75844SAndroid Build Coastguard Worker namespace webrtc {
16*d9f75844SAndroid Build Coastguard Worker 
ScalabilityModeToString(ScalabilityMode scalability_mode)17*d9f75844SAndroid Build Coastguard Worker absl::string_view ScalabilityModeToString(ScalabilityMode scalability_mode) {
18*d9f75844SAndroid Build Coastguard Worker   switch (scalability_mode) {
19*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL1T1:
20*d9f75844SAndroid Build Coastguard Worker       return "L1T1";
21*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL1T2:
22*d9f75844SAndroid Build Coastguard Worker       return "L1T2";
23*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL1T3:
24*d9f75844SAndroid Build Coastguard Worker       return "L1T3";
25*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T1:
26*d9f75844SAndroid Build Coastguard Worker       return "L2T1";
27*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T1h:
28*d9f75844SAndroid Build Coastguard Worker       return "L2T1h";
29*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T1_KEY:
30*d9f75844SAndroid Build Coastguard Worker       return "L2T1_KEY";
31*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T2:
32*d9f75844SAndroid Build Coastguard Worker       return "L2T2";
33*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T2h:
34*d9f75844SAndroid Build Coastguard Worker       return "L2T2h";
35*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T2_KEY:
36*d9f75844SAndroid Build Coastguard Worker       return "L2T2_KEY";
37*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T2_KEY_SHIFT:
38*d9f75844SAndroid Build Coastguard Worker       return "L2T2_KEY_SHIFT";
39*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T3:
40*d9f75844SAndroid Build Coastguard Worker       return "L2T3";
41*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T3h:
42*d9f75844SAndroid Build Coastguard Worker       return "L2T3h";
43*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL2T3_KEY:
44*d9f75844SAndroid Build Coastguard Worker       return "L2T3_KEY";
45*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL3T1:
46*d9f75844SAndroid Build Coastguard Worker       return "L3T1";
47*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL3T1h:
48*d9f75844SAndroid Build Coastguard Worker       return "L3T1h";
49*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL3T1_KEY:
50*d9f75844SAndroid Build Coastguard Worker       return "L3T1_KEY";
51*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL3T2:
52*d9f75844SAndroid Build Coastguard Worker       return "L3T2";
53*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL3T2h:
54*d9f75844SAndroid Build Coastguard Worker       return "L3T2h";
55*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL3T2_KEY:
56*d9f75844SAndroid Build Coastguard Worker       return "L3T2_KEY";
57*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL3T3:
58*d9f75844SAndroid Build Coastguard Worker       return "L3T3";
59*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL3T3h:
60*d9f75844SAndroid Build Coastguard Worker       return "L3T3h";
61*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kL3T3_KEY:
62*d9f75844SAndroid Build Coastguard Worker       return "L3T3_KEY";
63*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS2T1:
64*d9f75844SAndroid Build Coastguard Worker       return "S2T1";
65*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS2T1h:
66*d9f75844SAndroid Build Coastguard Worker       return "S2T1h";
67*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS2T2:
68*d9f75844SAndroid Build Coastguard Worker       return "S2T2";
69*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS2T2h:
70*d9f75844SAndroid Build Coastguard Worker       return "S2T2h";
71*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS2T3:
72*d9f75844SAndroid Build Coastguard Worker       return "S2T3";
73*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS2T3h:
74*d9f75844SAndroid Build Coastguard Worker       return "S2T3h";
75*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS3T1:
76*d9f75844SAndroid Build Coastguard Worker       return "S3T1";
77*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS3T1h:
78*d9f75844SAndroid Build Coastguard Worker       return "S3T1h";
79*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS3T2:
80*d9f75844SAndroid Build Coastguard Worker       return "S3T2";
81*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS3T2h:
82*d9f75844SAndroid Build Coastguard Worker       return "S3T2h";
83*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS3T3:
84*d9f75844SAndroid Build Coastguard Worker       return "S3T3";
85*d9f75844SAndroid Build Coastguard Worker     case ScalabilityMode::kS3T3h:
86*d9f75844SAndroid Build Coastguard Worker       return "S3T3h";
87*d9f75844SAndroid Build Coastguard Worker   }
88*d9f75844SAndroid Build Coastguard Worker   RTC_CHECK_NOTREACHED();
89*d9f75844SAndroid Build Coastguard Worker }
90*d9f75844SAndroid Build Coastguard Worker 
91*d9f75844SAndroid Build Coastguard Worker }  // namespace webrtc
92