| 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 | 11 |
| 12 #include "vpx_config.h" | 12 #include "vpx_config.h" |
| 13 #include "vp8_rtcd.h" | 13 #include "vp8_rtcd.h" |
| 14 #include "./vpx_dsp_rtcd.h" |
| 14 #include "quantize.h" | 15 #include "quantize.h" |
| 15 #include "vp8/common/reconintra4x4.h" | 16 #include "vp8/common/reconintra4x4.h" |
| 16 #include "encodemb.h" | 17 #include "encodemb.h" |
| 17 #include "vp8/common/invtrans.h" | 18 #include "vp8/common/invtrans.h" |
| 18 #include "encodeintra.h" | 19 #include "encodeintra.h" |
| 19 | 20 |
| 20 | 21 |
| 21 int vp8_encode_intra(VP8_COMP *cpi, MACROBLOCK *x, int use_dc_pred) | 22 int vp8_encode_intra(VP8_COMP *cpi, MACROBLOCK *x, int use_dc_pred) |
| 22 { | 23 { |
| 23 | 24 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 37 } | 38 } |
| 38 else | 39 else |
| 39 { | 40 { |
| 40 for (i = 0; i < 16; i++) | 41 for (i = 0; i < 16; i++) |
| 41 { | 42 { |
| 42 x->e_mbd.block[i].bmi.as_mode = B_DC_PRED; | 43 x->e_mbd.block[i].bmi.as_mode = B_DC_PRED; |
| 43 vp8_encode_intra4x4block(x, i); | 44 vp8_encode_intra4x4block(x, i); |
| 44 } | 45 } |
| 45 } | 46 } |
| 46 | 47 |
| 47 intra_pred_var = vp8_get_mb_ss(x->src_diff); | 48 intra_pred_var = vpx_get_mb_ss(x->src_diff); |
| 48 | 49 |
| 49 return intra_pred_var; | 50 return intra_pred_var; |
| 50 } | 51 } |
| 51 | 52 |
| 52 void vp8_encode_intra4x4block(MACROBLOCK *x, int ib) | 53 void vp8_encode_intra4x4block(MACROBLOCK *x, int ib) |
| 53 { | 54 { |
| 54 BLOCKD *b = &x->e_mbd.block[ib]; | 55 BLOCKD *b = &x->e_mbd.block[ib]; |
| 55 BLOCK *be = &x->block[ib]; | 56 BLOCK *be = &x->block[ib]; |
| 56 int dst_stride = x->e_mbd.dst.y_stride; | 57 int dst_stride = x->e_mbd.dst.y_stride; |
| 57 unsigned char *dst = x->e_mbd.dst.y_buffer + b->offset; | 58 unsigned char *dst = x->e_mbd.dst.y_buffer + b->offset; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 x->src.v_buffer, x->src.uv_stride, xd->dst.u_buffer, | 130 x->src.v_buffer, x->src.uv_stride, xd->dst.u_buffer, |
| 130 xd->dst.v_buffer, xd->dst.uv_stride); | 131 xd->dst.v_buffer, xd->dst.uv_stride); |
| 131 | 132 |
| 132 vp8_transform_mbuv(x); | 133 vp8_transform_mbuv(x); |
| 133 | 134 |
| 134 vp8_quantize_mbuv(x); | 135 vp8_quantize_mbuv(x); |
| 135 | 136 |
| 136 if (x->optimize) | 137 if (x->optimize) |
| 137 vp8_optimize_mbuv(x); | 138 vp8_optimize_mbuv(x); |
| 138 } | 139 } |
| OLD | NEW |