Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: source/libvpx/vp9/encoder/vp9_encodemv.c

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encodemv.h ('k') | source/libvpx/vp9/encoder/vp9_encoder.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "vp9/common/vp9_systemdependent.h" 15 #include "vp9/common/vp9_systemdependent.h"
16 16
17 #include "vp9/encoder/vp9_cost.h" 17 #include "vp9/encoder/vp9_cost.h"
18 #include "vp9/encoder/vp9_encodemv.h" 18 #include "vp9/encoder/vp9_encodemv.h"
19 19
20 static struct vp9_token mv_joint_encodings[MV_JOINTS]; 20 static struct vp9_token mv_joint_encodings[MV_JOINTS];
21 static struct vp9_token mv_class_encodings[MV_CLASSES]; 21 static struct vp9_token mv_class_encodings[MV_CLASSES];
22 static struct vp9_token mv_fp_encodings[MV_FP_SIZE]; 22 static struct vp9_token mv_fp_encodings[MV_FP_SIZE];
23 static struct vp9_token mv_class0_encodings[CLASS0_SIZE]; 23 static struct vp9_token mv_class0_encodings[CLASS0_SIZE];
24 24
25 void vp9_entropy_mv_init() { 25 void vp9_entropy_mv_init(void) {
26 vp9_tokens_from_tree(mv_joint_encodings, vp9_mv_joint_tree); 26 vp9_tokens_from_tree(mv_joint_encodings, vp9_mv_joint_tree);
27 vp9_tokens_from_tree(mv_class_encodings, vp9_mv_class_tree); 27 vp9_tokens_from_tree(mv_class_encodings, vp9_mv_class_tree);
28 vp9_tokens_from_tree(mv_class0_encodings, vp9_mv_class0_tree); 28 vp9_tokens_from_tree(mv_class0_encodings, vp9_mv_class0_tree);
29 vp9_tokens_from_tree(mv_fp_encodings, vp9_mv_fp_tree); 29 vp9_tokens_from_tree(mv_fp_encodings, vp9_mv_fp_tree);
30 } 30 }
31 31
32 static void encode_mv_component(vp9_writer* w, int comp, 32 static void encode_mv_component(vp9_writer* w, int comp,
33 const nmv_component* mvcomp, int usehp) { 33 const nmv_component* mvcomp, int usehp) {
34 int offset; 34 int offset;
35 const int sign = comp < 0; 35 const int sign = comp < 0;
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 if (mi->bmi[i].as_mode == NEWMV) 257 if (mi->bmi[i].as_mode == NEWMV)
258 inc_mvs(mbmi, mi->bmi[i].as_mv, &td->counts->mv); 258 inc_mvs(mbmi, mi->bmi[i].as_mv, &td->counts->mv);
259 } 259 }
260 } 260 }
261 } else { 261 } else {
262 if (mbmi->mode == NEWMV) 262 if (mbmi->mode == NEWMV)
263 inc_mvs(mbmi, mbmi->mv, &td->counts->mv); 263 inc_mvs(mbmi, mbmi->mv, &td->counts->mv);
264 } 264 }
265 } 265 }
266 266
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encodemv.h ('k') | source/libvpx/vp9/encoder/vp9_encoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698