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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 cpi->this_frame_percent_intra = cc->this_frame_percent_intra; | 289 cpi->this_frame_percent_intra = cc->this_frame_percent_intra; |
290 } | 290 } |
291 | 291 |
292 | 292 |
293 void vp8_setup_key_frame(VP8_COMP *cpi) | 293 void vp8_setup_key_frame(VP8_COMP *cpi) |
294 { | 294 { |
295 /* Setup for Key frame: */ | 295 /* Setup for Key frame: */ |
296 | 296 |
297 vp8_default_coef_probs(& cpi->common); | 297 vp8_default_coef_probs(& cpi->common); |
298 | 298 |
299 vpx_memcpy(cpi->common.fc.mvc, vp8_default_mv_context, sizeof(vp8_default_mv
_context)); | 299 memcpy(cpi->common.fc.mvc, vp8_default_mv_context, sizeof(vp8_default_mv_con
text)); |
300 { | 300 { |
301 int flag[2] = {1, 1}; | 301 int flag[2] = {1, 1}; |
302 vp8_build_component_cost_table(cpi->mb.mvcost, (const MV_CONTEXT *) cpi-
>common.fc.mvc, flag); | 302 vp8_build_component_cost_table(cpi->mb.mvcost, (const MV_CONTEXT *) cpi-
>common.fc.mvc, flag); |
303 } | 303 } |
304 | 304 |
305 /* Make sure we initialize separate contexts for altref,gold, and normal. | 305 /* Make sure we initialize separate contexts for altref,gold, and normal. |
306 * TODO shouldn't need 3 different copies of structure to do this! | 306 * TODO shouldn't need 3 different copies of structure to do this! |
307 */ | 307 */ |
308 vpx_memcpy(&cpi->lfc_a, &cpi->common.fc, sizeof(cpi->common.fc)); | 308 memcpy(&cpi->lfc_a, &cpi->common.fc, sizeof(cpi->common.fc)); |
309 vpx_memcpy(&cpi->lfc_g, &cpi->common.fc, sizeof(cpi->common.fc)); | 309 memcpy(&cpi->lfc_g, &cpi->common.fc, sizeof(cpi->common.fc)); |
310 vpx_memcpy(&cpi->lfc_n, &cpi->common.fc, sizeof(cpi->common.fc)); | 310 memcpy(&cpi->lfc_n, &cpi->common.fc, sizeof(cpi->common.fc)); |
311 | 311 |
312 cpi->common.filter_level = cpi->common.base_qindex * 3 / 8 ; | 312 cpi->common.filter_level = cpi->common.base_qindex * 3 / 8 ; |
313 | 313 |
314 /* Provisional interval before next GF */ | 314 /* Provisional interval before next GF */ |
315 if (cpi->auto_gold) | 315 if (cpi->auto_gold) |
316 cpi->frames_till_gf_update_due = cpi->baseline_gf_interval; | 316 cpi->frames_till_gf_update_due = cpi->baseline_gf_interval; |
317 else | 317 else |
318 cpi->frames_till_gf_update_due = DEFAULT_GF_INTERVAL; | 318 cpi->frames_till_gf_update_due = DEFAULT_GF_INTERVAL; |
319 | 319 |
320 cpi->common.refresh_golden_frame = 1; | 320 cpi->common.refresh_golden_frame = 1; |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 | 1552 |
1553 /* Check if we're dropping the frame: */ | 1553 /* Check if we're dropping the frame: */ |
1554 if (cpi->drop_frame) | 1554 if (cpi->drop_frame) |
1555 { | 1555 { |
1556 cpi->drop_frame = 0; | 1556 cpi->drop_frame = 0; |
1557 return 0; | 1557 return 0; |
1558 } | 1558 } |
1559 } | 1559 } |
1560 return 1; | 1560 return 1; |
1561 } | 1561 } |
OLD | NEW |