| 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 | 12 |
| 13 #include "vp9/common/vp9_common.h" | 13 #include "vp9/common/vp9_common.h" |
| 14 #include "vp9/common/vp9_entropymode.h" | 14 #include "vp9/common/vp9_entropymode.h" |
| 15 | 15 |
| 16 #include "vp9/encoder/vp9_cost.h" | 16 #include "vp9/encoder/vp9_cost.h" |
| 17 #include "vp9/encoder/vp9_encodemv.h" | 17 #include "vp9/encoder/vp9_encodemv.h" |
| 18 | 18 |
| 19 #include "vpx_dsp/vpx_dsp_common.h" |
| 20 |
| 19 static struct vp9_token mv_joint_encodings[MV_JOINTS]; | 21 static struct vp9_token mv_joint_encodings[MV_JOINTS]; |
| 20 static struct vp9_token mv_class_encodings[MV_CLASSES]; | 22 static struct vp9_token mv_class_encodings[MV_CLASSES]; |
| 21 static struct vp9_token mv_fp_encodings[MV_FP_SIZE]; | 23 static struct vp9_token mv_fp_encodings[MV_FP_SIZE]; |
| 22 static struct vp9_token mv_class0_encodings[CLASS0_SIZE]; | 24 static struct vp9_token mv_class0_encodings[CLASS0_SIZE]; |
| 23 | 25 |
| 24 void vp9_entropy_mv_init(void) { | 26 void vp9_entropy_mv_init(void) { |
| 25 vp9_tokens_from_tree(mv_joint_encodings, vp9_mv_joint_tree); | 27 vp9_tokens_from_tree(mv_joint_encodings, vp9_mv_joint_tree); |
| 26 vp9_tokens_from_tree(mv_class_encodings, vp9_mv_class_tree); | 28 vp9_tokens_from_tree(mv_class_encodings, vp9_mv_class_tree); |
| 27 vp9_tokens_from_tree(mv_class0_encodings, vp9_mv_class0_tree); | 29 vp9_tokens_from_tree(mv_class0_encodings, vp9_mv_class0_tree); |
| 28 vp9_tokens_from_tree(mv_fp_encodings, vp9_mv_fp_tree); | 30 vp9_tokens_from_tree(mv_fp_encodings, vp9_mv_fp_tree); |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 if (mi->bmi[i].as_mode == NEWMV) | 260 if (mi->bmi[i].as_mode == NEWMV) |
| 259 inc_mvs(mbmi, mbmi_ext, mi->bmi[i].as_mv, &td->counts->mv); | 261 inc_mvs(mbmi, mbmi_ext, mi->bmi[i].as_mv, &td->counts->mv); |
| 260 } | 262 } |
| 261 } | 263 } |
| 262 } else { | 264 } else { |
| 263 if (mbmi->mode == NEWMV) | 265 if (mbmi->mode == NEWMV) |
| 264 inc_mvs(mbmi, mbmi_ext, mbmi->mv, &td->counts->mv); | 266 inc_mvs(mbmi, mbmi_ext, mbmi->mv, &td->counts->mv); |
| 265 } | 267 } |
| 266 } | 268 } |
| 267 | 269 |
| OLD | NEW |