| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/capturer/differ_block.h" | 5 #include "media/video/capture/screen/differ_block.h" |
| 6 | 6 |
| 7 #include "base/cpu.h" | 7 #include "base/cpu.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "remoting/capturer/differ_block_sse2.h" | 9 #include "media/video/capture/screen/differ_block_sse2.h" |
| 10 | 10 |
| 11 namespace remoting { | 11 namespace media { |
| 12 | 12 |
| 13 int BlockDifference_C(const uint8* image1, const uint8* image2, int stride) { | 13 int BlockDifference_C(const uint8* image1, const uint8* image2, int stride) { |
| 14 int width_bytes = kBlockSize * kBytesPerPixel; | 14 int width_bytes = kBlockSize * kBytesPerPixel; |
| 15 | 15 |
| 16 for (int y = 0; y < kBlockSize; y++) { | 16 for (int y = 0; y < kBlockSize; y++) { |
| 17 if (memcmp(image1, image2, width_bytes) != 0) | 17 if (memcmp(image1, image2, width_bytes) != 0) |
| 18 return 1; | 18 return 1; |
| 19 image1 += stride; | 19 image1 += stride; |
| 20 image2 += stride; | 20 image2 += stride; |
| 21 } | 21 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 39 diff_proc = &BlockDifference_SSE2_W16; | 39 diff_proc = &BlockDifference_SSE2_W16; |
| 40 } else { | 40 } else { |
| 41 diff_proc = &BlockDifference_C; | 41 diff_proc = &BlockDifference_C; |
| 42 } | 42 } |
| 43 #endif | 43 #endif |
| 44 } | 44 } |
| 45 | 45 |
| 46 return diff_proc(image1, image2, stride); | 46 return diff_proc(image1, image2, stride); |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace remoting | 49 } // namespace media |
| OLD | NEW |