[WebRTC] Using `-O3` optimizations for the WebRTC and libsrtp 19/297819/1
authorAdam Bujalski <a.bujalski@samsung.com>
Tue, 11 Apr 2023 11:35:37 +0000 (13:35 +0200)
committerj.gajownik2 <j.gajownik2@samsung.com>
Thu, 24 Aug 2023 16:26:22 +0000 (18:26 +0200)
WebRTC has complex logic related to RTP packet demuxing and error
correction processing (FEC). To allow playback of high bitrate and
high frame rate contents where each video frame is composed from
more than 100 packets maximal optimization allowed by compiler are
required.

Bug: https://cam.sprc.samsung.pl/browse/VDGAME-249
Change-Id: I0d66ff5c7b57b2b0af7fb67a573d91753fc48812

third_party/libsrtp/BUILD.gn
third_party/webrtc/webrtc.gni

index 0f0f9e50de71864b4e43484d0e274d99264f4fef..fe74c1b624b7455e8e317dfd02c2fdca62fc577c 100644 (file)
@@ -136,6 +136,11 @@ static_library("libsrtp") {
   public_deps = [
     "//third_party/boringssl:boringssl",
   ]
+
+  if (!is_debug && is_tizen) {
+    configs -= [ "//build/config/compiler:default_optimization" ]
+    configs += [ "//build/config/compiler:optimize_speed" ]
+  }
 }
 
 if (build_libsrtp_tests) {
index adca99bff4d21ff02d60bd2b114918ac7f5cb22e..73f5425e9d92cedc7ca6a8099a8c0f6af2bec2b1 100644 (file)
@@ -629,6 +629,11 @@ template("rtc_source_set") {
         deps += absl_deps
       }
     }
+
+    if (!is_debug && is_tizen) {
+      configs -= [ "//build/config/compiler:default_optimization" ]
+      configs += [ "//build/config/compiler:optimize_speed" ]
+    }
   }
 }
 
@@ -718,6 +723,11 @@ template("rtc_static_library") {
         deps += absl_deps
       }
     }
+
+    if (!is_debug && is_tizen) {
+      configs -= [ "//build/config/compiler:default_optimization" ]
+      configs += [ "//build/config/compiler:optimize_speed" ]
+    }
   }
 }
 
@@ -852,6 +862,11 @@ template("rtc_library") {
         deps += absl_deps
       }
     }
+
+    if (!is_debug && is_tizen) {
+      configs -= [ "//build/config/compiler:default_optimization" ]
+      configs += [ "//build/config/compiler:optimize_speed" ]
+    }
   }
 }