OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 <limits.h> | 11 #include <limits.h> |
12 #include <math.h> | 12 #include <math.h> |
13 | 13 |
14 #include "vp9/encoder/vp9_aq_cyclicrefresh.h" | 14 #include "vp9/encoder/vp9_aq_cyclicrefresh.h" |
15 | 15 |
16 #include "vp9/common/vp9_seg_common.h" | 16 #include "vp9/common/vp9_seg_common.h" |
17 | 17 |
18 #include "vp9/encoder/vp9_ratectrl.h" | 18 #include "vp9/encoder/vp9_ratectrl.h" |
19 #include "vp9/encoder/vp9_rdopt.h" | |
20 #include "vp9/encoder/vp9_segmentation.h" | 19 #include "vp9/encoder/vp9_segmentation.h" |
21 | 20 |
22 struct CYCLIC_REFRESH { | 21 struct CYCLIC_REFRESH { |
23 // Percentage of super-blocks per frame that are targeted as candidates | 22 // Percentage of super-blocks per frame that are targeted as candidates |
24 // for cyclic refresh. | 23 // for cyclic refresh. |
25 int max_sbs_perframe; | 24 int max_sbs_perframe; |
26 // Maximum q-delta as percentage of base q. | 25 // Maximum q-delta as percentage of base q. |
27 int max_qdelta_perc; | 26 int max_qdelta_perc; |
28 // Block size below which we don't apply cyclic refresh. | 27 // Block size below which we don't apply cyclic refresh. |
29 BLOCK_SIZE min_block_size; | 28 BLOCK_SIZE min_block_size; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 314 |
316 void vp9_cyclic_refresh_set_rate_and_dist_sb(CYCLIC_REFRESH *cr, | 315 void vp9_cyclic_refresh_set_rate_and_dist_sb(CYCLIC_REFRESH *cr, |
317 int64_t rate_sb, int64_t dist_sb) { | 316 int64_t rate_sb, int64_t dist_sb) { |
318 cr->projected_rate_sb = rate_sb; | 317 cr->projected_rate_sb = rate_sb; |
319 cr->projected_dist_sb = dist_sb; | 318 cr->projected_dist_sb = dist_sb; |
320 } | 319 } |
321 | 320 |
322 int vp9_cyclic_refresh_get_rdmult(const CYCLIC_REFRESH *cr) { | 321 int vp9_cyclic_refresh_get_rdmult(const CYCLIC_REFRESH *cr) { |
323 return cr->rdmult; | 322 return cr->rdmult; |
324 } | 323 } |
OLD | NEW |