OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/modules/video_processing/main/source/brighten.h" | 11 #include "webrtc/modules/video_processing/brighten.h" |
12 | 12 |
13 #include <stdlib.h> | 13 #include <stdlib.h> |
14 | 14 |
15 namespace webrtc { | 15 namespace webrtc { |
16 namespace VideoProcessing { | 16 namespace VideoProcessing { |
17 | 17 |
18 int32_t Brighten(VideoFrame* frame, int delta) { | 18 int32_t Brighten(VideoFrame* frame, int delta) { |
19 assert(frame); | 19 assert(frame); |
20 if (frame->IsZeroSize()) { | 20 if (frame->IsZeroSize()) { |
21 return VPM_PARAMETER_ERROR; | 21 return VPM_PARAMETER_ERROR; |
(...skipping 14 matching lines...) Expand all Loading... |
36 | 36 |
37 for (int i = 0; i < num_pixels; i++) { | 37 for (int i = 0; i < num_pixels; i++) { |
38 *temp_ptr = static_cast<uint8_t>(look_up[*temp_ptr]); | 38 *temp_ptr = static_cast<uint8_t>(look_up[*temp_ptr]); |
39 temp_ptr++; | 39 temp_ptr++; |
40 } | 40 } |
41 return VPM_OK; | 41 return VPM_OK; |
42 } | 42 } |
43 | 43 |
44 } // namespace VideoProcessing | 44 } // namespace VideoProcessing |
45 } // namespace webrtc | 45 } // namespace webrtc |
OLD | NEW |