| 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 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 const uint8_t vp9_coefband_trans_4x4[16] = { | 128 const uint8_t vp9_coefband_trans_4x4[16] = { |
| 129 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, | 129 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 const uint8_t vp9_pt_energy_class[ENTROPY_TOKENS] = { | 132 const uint8_t vp9_pt_energy_class[ENTROPY_TOKENS] = { |
| 133 0, 1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5 | 133 0, 1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5 |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 const vp9_tree_index vp9_coefmodel_tree[TREE_SIZE(UNCONSTRAINED_NODES + 1)] = { | |
| 137 -EOB_MODEL_TOKEN, 2, | |
| 138 -ZERO_TOKEN, 4, | |
| 139 -ONE_TOKEN, -TWO_TOKEN, | |
| 140 }; | |
| 141 | |
| 142 // Model obtained from a 2-sided zero-centerd distribuition derived | 136 // Model obtained from a 2-sided zero-centerd distribuition derived |
| 143 // from a Pareto distribution. The cdf of the distribution is: | 137 // from a Pareto distribution. The cdf of the distribution is: |
| 144 // cdf(x) = 0.5 + 0.5 * sgn(x) * [1 - {alpha/(alpha + |x|)} ^ beta] | 138 // cdf(x) = 0.5 + 0.5 * sgn(x) * [1 - {alpha/(alpha + |x|)} ^ beta] |
| 145 // | 139 // |
| 146 // For a given beta and a given probablity of the 1-node, the alpha | 140 // For a given beta and a given probablity of the 1-node, the alpha |
| 147 // is first solved, and then the {alpha, beta} pair is used to generate | 141 // is first solved, and then the {alpha, beta} pair is used to generate |
| 148 // the probabilities for the rest of the nodes. | 142 // the probabilities for the rest of the nodes. |
| 149 | 143 |
| 150 // beta = 8 | 144 // beta = 8 |
| 151 | 145 |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 } else if (cm->last_frame_type == KEY_FRAME) { | 808 } else if (cm->last_frame_type == KEY_FRAME) { |
| 815 update_factor = COEF_MAX_UPDATE_FACTOR_AFTER_KEY; /* adapt quickly */ | 809 update_factor = COEF_MAX_UPDATE_FACTOR_AFTER_KEY; /* adapt quickly */ |
| 816 count_sat = COEF_COUNT_SAT_AFTER_KEY; | 810 count_sat = COEF_COUNT_SAT_AFTER_KEY; |
| 817 } else { | 811 } else { |
| 818 update_factor = COEF_MAX_UPDATE_FACTOR; | 812 update_factor = COEF_MAX_UPDATE_FACTOR; |
| 819 count_sat = COEF_COUNT_SAT; | 813 count_sat = COEF_COUNT_SAT; |
| 820 } | 814 } |
| 821 for (t = TX_4X4; t <= TX_32X32; t++) | 815 for (t = TX_4X4; t <= TX_32X32; t++) |
| 822 adapt_coef_probs(cm, t, count_sat, update_factor); | 816 adapt_coef_probs(cm, t, count_sat, update_factor); |
| 823 } | 817 } |
| OLD | NEW |