OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM 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 <assert.h> | 11 #include <assert.h> |
12 #include <limits.h> | 12 #include <limits.h> |
13 | 13 |
14 #include "./vpx_scale_rtcd.h" | 14 #include "./vpx_scale_rtcd.h" |
15 | 15 |
16 #include "vpx_mem/vpx_mem.h" | 16 #include "vpx_mem/vpx_mem.h" |
| 17 #include "vpx_ports/mem.h" |
17 | 18 |
18 #include "vp9/common/vp9_loopfilter.h" | 19 #include "vp9/common/vp9_loopfilter.h" |
19 #include "vp9/common/vp9_onyxc_int.h" | 20 #include "vp9/common/vp9_onyxc_int.h" |
20 #include "vp9/common/vp9_quant_common.h" | 21 #include "vp9/common/vp9_quant_common.h" |
21 | 22 |
22 #include "vp9/encoder/vp9_encoder.h" | 23 #include "vp9/encoder/vp9_encoder.h" |
23 #include "vp9/encoder/vp9_picklpf.h" | 24 #include "vp9/encoder/vp9_picklpf.h" |
24 #include "vp9/encoder/vp9_quantize.h" | 25 #include "vp9/encoder/vp9_quantize.h" |
25 | 26 |
26 static int get_max_filter_level(const VP9_COMP *cpi) { | 27 static int get_max_filter_level(const VP9_COMP *cpi) { |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 int filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18); | 183 int filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18); |
183 #endif // CONFIG_VP9_HIGHBITDEPTH | 184 #endif // CONFIG_VP9_HIGHBITDEPTH |
184 if (cm->frame_type == KEY_FRAME) | 185 if (cm->frame_type == KEY_FRAME) |
185 filt_guess -= 4; | 186 filt_guess -= 4; |
186 lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level); | 187 lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level); |
187 } else { | 188 } else { |
188 lf->filter_level = search_filter_level(sd, cpi, | 189 lf->filter_level = search_filter_level(sd, cpi, |
189 method == LPF_PICK_FROM_SUBIMAGE); | 190 method == LPF_PICK_FROM_SUBIMAGE); |
190 } | 191 } |
191 } | 192 } |
OLD | NEW |