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

Side by Side Diff: talk/media/base/videocommon.cc

Issue 1507903005: Revert of Merge webrtc/video_engine/ into webrtc/video/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Resolved merge conflict Created 5 years 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 | « WATCHLISTS ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('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 * libjingle 2 * libjingle
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 return kScaleFactors[best_index]; 101 return kScaleFactors[best_index];
102 } 102 }
103 103
104 // Computes a scale less to fit in max_pixels while maintaining aspect ratio. 104 // Computes a scale less to fit in max_pixels while maintaining aspect ratio.
105 void ComputeScaleMaxPixels(int frame_width, int frame_height, int max_pixels, 105 void ComputeScaleMaxPixels(int frame_width, int frame_height, int max_pixels,
106 int* scaled_width, int* scaled_height) { 106 int* scaled_width, int* scaled_height) {
107 ASSERT(scaled_width != NULL); 107 ASSERT(scaled_width != NULL);
108 ASSERT(scaled_height != NULL); 108 ASSERT(scaled_height != NULL);
109 ASSERT(max_pixels > 0); 109 ASSERT(max_pixels > 0);
110 // For VP8 the values for max width and height can be found here
111 // webrtc/src/video_engine/vie_defines.h (kViEMaxCodecWidth and
112 // kViEMaxCodecHeight)
110 const int kMaxWidth = 4096; 113 const int kMaxWidth = 4096;
111 const int kMaxHeight = 3072; 114 const int kMaxHeight = 3072;
112 int new_frame_width = frame_width; 115 int new_frame_width = frame_width;
113 int new_frame_height = frame_height; 116 int new_frame_height = frame_height;
114 117
115 // Limit width. 118 // Limit width.
116 if (new_frame_width > kMaxWidth) { 119 if (new_frame_width > kMaxWidth) {
117 new_frame_height = new_frame_height * kMaxWidth / new_frame_width; 120 new_frame_height = new_frame_height * kMaxWidth / new_frame_width;
118 new_frame_width = kMaxWidth; 121 new_frame_width = kMaxWidth;
119 } 122 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 238 }
236 } 239 }
237 240
238 std::ostringstream ss; 241 std::ostringstream ss;
239 ss << fourcc_name << width << "x" << height << "x" 242 ss << fourcc_name << width << "x" << height << "x"
240 << IntervalToFpsFloat(interval); 243 << IntervalToFpsFloat(interval);
241 return ss.str(); 244 return ss.str();
242 } 245 }
243 246
244 } // namespace cricket 247 } // namespace cricket
OLDNEW
« no previous file with comments | « WATCHLISTS ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698