1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp8/common/entropymv.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 + 1.15 +#ifndef __INC_ENTROPYMV_H 1.16 +#define __INC_ENTROPYMV_H 1.17 + 1.18 +#include "treecoder.h" 1.19 + 1.20 +enum 1.21 +{ 1.22 + mv_max = 1023, /* max absolute value of a MV component */ 1.23 + MVvals = (2 * mv_max) + 1, /* # possible values "" */ 1.24 + mvfp_max = 255, /* max absolute value of a full pixel MV component */ 1.25 + MVfpvals = (2 * mvfp_max) +1, /* # possible full pixel MV values */ 1.26 + 1.27 + mvlong_width = 10, /* Large MVs have 9 bit magnitudes */ 1.28 + mvnum_short = 8, /* magnitudes 0 through 7 */ 1.29 + 1.30 + /* probability offsets for coding each MV component */ 1.31 + 1.32 + mvpis_short = 0, /* short (<= 7) vs long (>= 8) */ 1.33 + MVPsign, /* sign for non-zero */ 1.34 + MVPshort, /* 8 short values = 7-position tree */ 1.35 + 1.36 + MVPbits = MVPshort + mvnum_short - 1, /* mvlong_width long value bits */ 1.37 + MVPcount = MVPbits + mvlong_width /* (with independent probabilities) */ 1.38 +}; 1.39 + 1.40 +typedef struct mv_context 1.41 +{ 1.42 + vp8_prob prob[MVPcount]; /* often come in row, col pairs */ 1.43 +} MV_CONTEXT; 1.44 + 1.45 +extern const MV_CONTEXT vp8_mv_update_probs[2], vp8_default_mv_context[2]; 1.46 + 1.47 +#endif