1233d2500723e5594f3e7c70896ffeeef32b9c950ywan/* 2233d2500723e5594f3e7c70896ffeeef32b9c950ywan * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3233d2500723e5594f3e7c70896ffeeef32b9c950ywan * 4233d2500723e5594f3e7c70896ffeeef32b9c950ywan * Use of this source code is governed by a BSD-style license 5233d2500723e5594f3e7c70896ffeeef32b9c950ywan * that can be found in the LICENSE file in the root of the source 6233d2500723e5594f3e7c70896ffeeef32b9c950ywan * tree. An additional intellectual property rights grant can be found 7233d2500723e5594f3e7c70896ffeeef32b9c950ywan * in the file PATENTS. All contributing project authors may 8233d2500723e5594f3e7c70896ffeeef32b9c950ywan * be found in the AUTHORS file in the root of the source tree. 9233d2500723e5594f3e7c70896ffeeef32b9c950ywan */ 10233d2500723e5594f3e7c70896ffeeef32b9c950ywan 11233d2500723e5594f3e7c70896ffeeef32b9c950ywan 12233d2500723e5594f3e7c70896ffeeef32b9c950ywan#ifndef VP8_COMMON_ENTROPYMV_H_ 13233d2500723e5594f3e7c70896ffeeef32b9c950ywan#define VP8_COMMON_ENTROPYMV_H_ 14233d2500723e5594f3e7c70896ffeeef32b9c950ywan 15233d2500723e5594f3e7c70896ffeeef32b9c950ywan#include "treecoder.h" 16233d2500723e5594f3e7c70896ffeeef32b9c950ywan 17233d2500723e5594f3e7c70896ffeeef32b9c950ywan#ifdef __cplusplus 18233d2500723e5594f3e7c70896ffeeef32b9c950ywanextern "C" { 19233d2500723e5594f3e7c70896ffeeef32b9c950ywan#endif 20233d2500723e5594f3e7c70896ffeeef32b9c950ywan 21233d2500723e5594f3e7c70896ffeeef32b9c950ywanenum 22233d2500723e5594f3e7c70896ffeeef32b9c950ywan{ 23233d2500723e5594f3e7c70896ffeeef32b9c950ywan mv_max = 1023, /* max absolute value of a MV component */ 24233d2500723e5594f3e7c70896ffeeef32b9c950ywan MVvals = (2 * mv_max) + 1, /* # possible values "" */ 25233d2500723e5594f3e7c70896ffeeef32b9c950ywan mvfp_max = 255, /* max absolute value of a full pixel MV component */ 26233d2500723e5594f3e7c70896ffeeef32b9c950ywan MVfpvals = (2 * mvfp_max) +1, /* # possible full pixel MV values */ 27233d2500723e5594f3e7c70896ffeeef32b9c950ywan 28233d2500723e5594f3e7c70896ffeeef32b9c950ywan mvlong_width = 10, /* Large MVs have 9 bit magnitudes */ 29233d2500723e5594f3e7c70896ffeeef32b9c950ywan mvnum_short = 8, /* magnitudes 0 through 7 */ 30233d2500723e5594f3e7c70896ffeeef32b9c950ywan 31233d2500723e5594f3e7c70896ffeeef32b9c950ywan /* probability offsets for coding each MV component */ 32233d2500723e5594f3e7c70896ffeeef32b9c950ywan 33233d2500723e5594f3e7c70896ffeeef32b9c950ywan mvpis_short = 0, /* short (<= 7) vs long (>= 8) */ 34233d2500723e5594f3e7c70896ffeeef32b9c950ywan MVPsign, /* sign for non-zero */ 35233d2500723e5594f3e7c70896ffeeef32b9c950ywan MVPshort, /* 8 short values = 7-position tree */ 36233d2500723e5594f3e7c70896ffeeef32b9c950ywan 37233d2500723e5594f3e7c70896ffeeef32b9c950ywan MVPbits = MVPshort + mvnum_short - 1, /* mvlong_width long value bits */ 38233d2500723e5594f3e7c70896ffeeef32b9c950ywan MVPcount = MVPbits + mvlong_width /* (with independent probabilities) */ 39233d2500723e5594f3e7c70896ffeeef32b9c950ywan}; 40233d2500723e5594f3e7c70896ffeeef32b9c950ywan 41233d2500723e5594f3e7c70896ffeeef32b9c950ywantypedef struct mv_context 42233d2500723e5594f3e7c70896ffeeef32b9c950ywan{ 43233d2500723e5594f3e7c70896ffeeef32b9c950ywan vp8_prob prob[MVPcount]; /* often come in row, col pairs */ 44233d2500723e5594f3e7c70896ffeeef32b9c950ywan} MV_CONTEXT; 45233d2500723e5594f3e7c70896ffeeef32b9c950ywan 46233d2500723e5594f3e7c70896ffeeef32b9c950ywanextern const MV_CONTEXT vp8_mv_update_probs[2], vp8_default_mv_context[2]; 47233d2500723e5594f3e7c70896ffeeef32b9c950ywan 48233d2500723e5594f3e7c70896ffeeef32b9c950ywan#ifdef __cplusplus 49233d2500723e5594f3e7c70896ffeeef32b9c950ywan} // extern "C" 50233d2500723e5594f3e7c70896ffeeef32b9c950ywan#endif 51233d2500723e5594f3e7c70896ffeeef32b9c950ywan 52233d2500723e5594f3e7c70896ffeeef32b9c950ywan#endif // VP8_COMMON_ENTROPYMV_H_ 53