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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 | 1141 |
1142 if (vp8_yv12_alloc_frame_buffer(&cpi->scaled_source, | 1142 if (vp8_yv12_alloc_frame_buffer(&cpi->scaled_source, |
1143 width, height, VP9BORDERINPIXELS)) | 1143 width, height, VP9BORDERINPIXELS)) |
1144 vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR, | 1144 vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR, |
1145 "Failed to allocate scaled source buffer"); | 1145 "Failed to allocate scaled source buffer"); |
1146 | 1146 |
1147 | 1147 |
1148 vpx_free(cpi->tok); | 1148 vpx_free(cpi->tok); |
1149 | 1149 |
1150 { | 1150 { |
1151 unsigned int tokens = cm->mb_rows * cm->mb_cols * 24 * 16; | 1151 unsigned int tokens = cm->mb_rows * cm->mb_cols * (24 * 16 + 1); |
1152 | 1152 |
1153 CHECK_MEM_ERROR(cpi->tok, vpx_calloc(tokens, sizeof(*cpi->tok))); | 1153 CHECK_MEM_ERROR(cpi->tok, vpx_calloc(tokens, sizeof(*cpi->tok))); |
1154 } | 1154 } |
1155 | 1155 |
1156 // Data used for real time vc mode to see if gf needs refreshing | 1156 // Data used for real time vc mode to see if gf needs refreshing |
1157 cpi->inter_zz_count = 0; | 1157 cpi->inter_zz_count = 0; |
1158 cpi->gf_bad_count = 0; | 1158 cpi->gf_bad_count = 0; |
1159 cpi->gf_update_recommended = 0; | 1159 cpi->gf_update_recommended = 0; |
1160 | 1160 |
1161 | 1161 |
(...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4253 } | 4253 } |
4254 | 4254 |
4255 return Total; | 4255 return Total; |
4256 } | 4256 } |
4257 | 4257 |
4258 | 4258 |
4259 int vp9_get_quantizer(VP9_PTR c) { | 4259 int vp9_get_quantizer(VP9_PTR c) { |
4260 VP9_COMP *cpi = (VP9_COMP *) c; | 4260 VP9_COMP *cpi = (VP9_COMP *) c; |
4261 return cpi->common.base_qindex; | 4261 return cpi->common.base_qindex; |
4262 } | 4262 } |
OLD | NEW |