OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Return whether a block might cause trailing artifact by checking if one of | 46 // Return whether a block might cause trailing artifact by checking if one of |
47 // its neighbor blocks is a moving edge block. | 47 // its neighbor blocks is a moving edge block. |
48 bool IsTrailingBlock(const std::unique_ptr<uint8_t[]>& d_status, | 48 bool IsTrailingBlock(const std::unique_ptr<uint8_t[]>& d_status, |
49 int mb_row, | 49 int mb_row, |
50 int mb_col); | 50 int mb_col); |
51 | 51 |
52 // Copy input blocks to dst buffer on moving object blocks (MOB). | 52 // Copy input blocks to dst buffer on moving object blocks (MOB). |
53 void CopySrcOnMOB(const uint8_t* y_src, uint8_t* y_dst); | 53 void CopySrcOnMOB(const uint8_t* y_src, uint8_t* y_dst); |
54 | 54 |
| 55 // Copy luma margin blocks when frame width/height not divisible by 16. |
| 56 void CopyLumaOnMargin(const uint8_t* y_src, uint8_t* y_dst); |
| 57 |
55 int width_; | 58 int width_; |
56 int height_; | 59 int height_; |
57 int mb_rows_; | 60 int mb_rows_; |
58 int mb_cols_; | 61 int mb_cols_; |
59 int stride_y_; | 62 int stride_y_; |
60 int stride_u_; | 63 int stride_u_; |
61 int stride_v_; | 64 int stride_v_; |
62 CpuType cpu_type_; | 65 CpuType cpu_type_; |
63 std::unique_ptr<DenoiserFilter> filter_; | 66 std::unique_ptr<DenoiserFilter> filter_; |
64 std::unique_ptr<NoiseEstimation> ne_; | 67 std::unique_ptr<NoiseEstimation> ne_; |
65 // 1 for moving edge block, 0 for static block. | 68 // 1 for moving edge block, 0 for static block. |
66 std::unique_ptr<uint8_t[]> moving_edge_; | 69 std::unique_ptr<uint8_t[]> moving_edge_; |
67 // 1 for moving object block, 0 for static block. | 70 // 1 for moving object block, 0 for static block. |
68 std::unique_ptr<uint8_t[]> moving_object_; | 71 std::unique_ptr<uint8_t[]> moving_object_; |
69 // x_density_ and y_density_ are used in MOD process. | 72 // x_density_ and y_density_ are used in MOD process. |
70 std::unique_ptr<uint8_t[]> x_density_; | 73 std::unique_ptr<uint8_t[]> x_density_; |
71 std::unique_ptr<uint8_t[]> y_density_; | 74 std::unique_ptr<uint8_t[]> y_density_; |
72 // Save the return values by MbDenoise for each block. | 75 // Save the return values by MbDenoise for each block. |
73 std::unique_ptr<DenoiserDecision[]> mb_filter_decision_; | 76 std::unique_ptr<DenoiserDecision[]> mb_filter_decision_; |
74 }; | 77 }; |
75 | 78 |
76 } // namespace webrtc | 79 } // namespace webrtc |
77 | 80 |
78 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ | 81 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ |
OLD | NEW |