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 <math.h> | 11 #include <math.h> |
12 #include <limits.h> | 12 #include <limits.h> |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 | 14 |
15 #include "./vpx_scale_rtcd.h" | 15 #include "./vpx_scale_rtcd.h" |
16 #include "block.h" | 16 #include "block.h" |
17 #include "onyx_int.h" | 17 #include "onyx_int.h" |
18 #include "vp8/common/variance.h" | 18 #include "vp8/common/variance.h" |
19 #include "encodeintra.h" | 19 #include "encodeintra.h" |
20 #include "vp8/common/setupintrarecon.h" | 20 #include "vp8/common/setupintrarecon.h" |
21 #include "vp8/common/systemdependent.h" | 21 #include "vp8/common/systemdependent.h" |
22 #include "mcomp.h" | 22 #include "mcomp.h" |
23 #include "firstpass.h" | 23 #include "firstpass.h" |
24 #include "vpx_scale/vpxscale.h" | 24 #include "vpx_scale/vpx_scale.h" |
25 #include "encodemb.h" | 25 #include "encodemb.h" |
26 #include "vp8/common/extend.h" | 26 #include "vp8/common/extend.h" |
27 #include "vpx_mem/vpx_mem.h" | 27 #include "vpx_mem/vpx_mem.h" |
28 #include "vp8/common/swapyv12buffer.h" | 28 #include "vp8/common/swapyv12buffer.h" |
29 #include "rdopt.h" | 29 #include "rdopt.h" |
30 #include "vp8/common/quant_common.h" | 30 #include "vp8/common/quant_common.h" |
31 #include "encodemv.h" | 31 #include "encodemv.h" |
32 #include "encodeframe.h" | 32 #include "encodeframe.h" |
33 | 33 |
34 /* #define OUTPUT_FPF 1 */ | 34 /* #define OUTPUT_FPF 1 */ |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 | 563 |
564 vp8_build_block_offsets(x); | 564 vp8_build_block_offsets(x); |
565 | 565 |
566 /* set up frame new frame for intra coded blocks */ | 566 /* set up frame new frame for intra coded blocks */ |
567 vp8_setup_intra_recon(new_yv12); | 567 vp8_setup_intra_recon(new_yv12); |
568 vp8cx_frame_init_quantizer(cpi); | 568 vp8cx_frame_init_quantizer(cpi); |
569 | 569 |
570 /* Initialise the MV cost table to the defaults */ | 570 /* Initialise the MV cost table to the defaults */ |
571 { | 571 { |
572 int flag[2] = {1, 1}; | 572 int flag[2] = {1, 1}; |
573 vp8_initialize_rd_consts(cpi, vp8_dc_quant(cm->base_qindex, cm->y1dc_del
ta_q)); | 573 vp8_initialize_rd_consts(cpi, x, vp8_dc_quant(cm->base_qindex, cm->y1dc_
delta_q)); |
574 vpx_memcpy(cm->fc.mvc, vp8_default_mv_context, sizeof(vp8_default_mv_con
text)); | 574 vpx_memcpy(cm->fc.mvc, vp8_default_mv_context, sizeof(vp8_default_mv_con
text)); |
575 vp8_build_component_cost_table(cpi->mb.mvcost, (const MV_CONTEXT *) cm->
fc.mvc, flag); | 575 vp8_build_component_cost_table(cpi->mb.mvcost, (const MV_CONTEXT *) cm->
fc.mvc, flag); |
576 } | 576 } |
577 | 577 |
578 /* for each macroblock row in image */ | 578 /* for each macroblock row in image */ |
579 for (mb_row = 0; mb_row < cm->mb_rows; mb_row++) | 579 for (mb_row = 0; mb_row < cm->mb_rows; mb_row++) |
580 { | 580 { |
581 int_mv best_ref_mv; | 581 int_mv best_ref_mv; |
582 | 582 |
583 best_ref_mv.as_int = 0; | 583 best_ref_mv.as_int = 0; |
(...skipping 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3352 } | 3352 } |
3353 | 3353 |
3354 if ((cpi->common.Width != new_width) || (cpi->common.Height != new_heigh
t)) | 3354 if ((cpi->common.Width != new_width) || (cpi->common.Height != new_heigh
t)) |
3355 { | 3355 { |
3356 cpi->common.Width = new_width; | 3356 cpi->common.Width = new_width; |
3357 cpi->common.Height = new_height; | 3357 cpi->common.Height = new_height; |
3358 vp8_alloc_compressor_data(cpi); | 3358 vp8_alloc_compressor_data(cpi); |
3359 } | 3359 } |
3360 } | 3360 } |
3361 } | 3361 } |
OLD | NEW |