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

Unified Diff: webrtc/modules/video_processing/util/skin_detection.cc

Issue 1508793002: Clang format of video_processing folder. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_processing/util/skin_detection.cc
diff --git a/webrtc/modules/video_processing/util/skin_detection.cc b/webrtc/modules/video_processing/util/skin_detection.cc
old mode 100755
new mode 100644
index b3b2cd6aada6f286b6ae5faa529582460838fbf3..bf631ce2f6f4cbd5dc95f090c57cbe409d6b8e68
--- a/webrtc/modules/video_processing/util/skin_detection.cc
+++ b/webrtc/modules/video_processing/util/skin_detection.cc
@@ -48,19 +48,13 @@ bool MbHasSkinColor(const uint8_t* y_src,
const int stride_v,
const int mb_row,
const int mb_col) {
- const uint8_t* y =
- y_src + ((mb_row << 4) + 8) * stride_y + (mb_col << 4) + 8;
- const uint8_t* u =
- u_src + ((mb_row << 3) + 4) * stride_u + (mb_col << 3) + 4;
- const uint8_t* v =
- v_src + ((mb_row << 3) + 4) * stride_v + (mb_col << 3) + 4;
+ const uint8_t* y = y_src + ((mb_row << 4) + 8) * stride_y + (mb_col << 4) + 8;
+ const uint8_t* u = u_src + ((mb_row << 3) + 4) * stride_u + (mb_col << 3) + 4;
+ const uint8_t* v = v_src + ((mb_row << 3) + 4) * stride_v + (mb_col << 3) + 4;
// Use 2x2 average of center pixel to compute skin area.
- uint8_t y_avg =
- (*y + *(y + 1) + *(y + stride_y) + *(y + stride_y + 1)) >> 2;
- uint8_t u_avg =
- (*u + *(u + 1) + *(u + stride_u) + *(u + stride_u + 1)) >> 2;
- uint8_t v_avg =
- (*v + *(v + 1) + *(v + stride_v) + *(v + stride_v + 1)) >> 2;
+ uint8_t y_avg = (*y + *(y + 1) + *(y + stride_y) + *(y + stride_y + 1)) >> 2;
+ uint8_t u_avg = (*u + *(u + 1) + *(u + stride_u) + *(u + stride_u + 1)) >> 2;
+ uint8_t v_avg = (*v + *(v + 1) + *(v + stride_v) + *(v + stride_v + 1)) >> 2;
// Ignore MB with too high or low brightness.
if (y_avg < y_low || y_avg > y_high)
return false;

Powered by Google App Engine
This is Rietveld 408576698