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

Unified Diff: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc

Issue 1677543002: Avoid OpenH264 encoder bug for #threads > 1 on Mac and Chromium+Sandbox. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
index 281eb3d55a8f0a38ada596f913b0d928a4853f04..99402607c1c1071c2303f7ff14312f297beefe91 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -28,15 +28,18 @@ namespace {
const bool kOpenH264EncoderDetailedLogging = false;
int NumberOfThreads(int width, int height, int number_of_cores) {
- if (width * height >= 1920 * 1080 && number_of_cores > 8) {
- return 8; // 8 threads for 1080p on high perf machines.
- } else if (width * height > 1280 * 960 && number_of_cores >= 6) {
- return 3; // 3 threads for 1080p.
- } else if (width * height > 640 * 480 && number_of_cores >= 3) {
- return 2; // 2 threads for qHD/HD.
- } else {
- return 1; // 1 thread for VGA or less.
- }
+ // TODO(hbos): In Chromium, multiple threads do not work with sandbox on Mac,
+ // see crbug.com/583348. Until further investigated, only use one thread.
+// if (width * height >= 1920 * 1080 && number_of_cores > 8) {
+// return 8; // 8 threads for 1080p on high perf machines.
+// } else if (width * height > 1280 * 960 && number_of_cores >= 6) {
+// return 3; // 3 threads for 1080p.
+// } else if (width * height > 640 * 480 && number_of_cores >= 3) {
+// return 2; // 2 threads for qHD/HD.
+// } else {
+// return 1; // 1 thread for VGA or less.
+// }
+ return 1;
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698