46 |
#include "../utils/emms.h" |
#include "../utils/emms.h" |
47 |
#include "../dct/fdct.h" |
#include "../dct/fdct.h" |
48 |
|
|
49 |
|
/***************************************************************************** |
50 |
|
* Modified rounding tables -- declared in motion.h |
51 |
|
* Original tables see ISO spec tables 7-6 -> 7-9 |
52 |
|
****************************************************************************/ |
53 |
|
|
54 |
|
const uint32_t roundtab[16] = |
55 |
|
{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 }; |
56 |
|
|
57 |
|
/* K = 4 */ |
58 |
|
const uint32_t roundtab_76[16] = |
59 |
|
{ 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1 }; |
60 |
|
|
61 |
|
/* K = 2 */ |
62 |
|
const uint32_t roundtab_78[8] = |
63 |
|
{ 0, 0, 1, 1, 0, 0, 0, 1 }; |
64 |
|
|
65 |
|
/* K = 1 */ |
66 |
|
const uint32_t roundtab_79[4] = |
67 |
|
{ 0, 1, 0, 0 }; |
68 |
|
|
69 |
#define INITIAL_SKIP_THRESH (10) |
#define INITIAL_SKIP_THRESH (10) |
70 |
#define FINAL_SKIP_THRESH (50) |
#define FINAL_SKIP_THRESH (50) |
71 |
#define MAX_SAD00_FOR_SKIP (20) |
#define MAX_SAD00_FOR_SKIP (20) |
74 |
#define CHECK_CANDIDATE(X,Y,D) { \ |
#define CHECK_CANDIDATE(X,Y,D) { \ |
75 |
CheckCandidate((X),(Y), (D), &iDirection, data ); } |
CheckCandidate((X),(Y), (D), &iDirection, data ); } |
76 |
|
|
77 |
|
/***************************************************************************** |
78 |
|
* Code |
79 |
|
****************************************************************************/ |
80 |
|
|
81 |
static __inline uint32_t |
static __inline uint32_t |
82 |
d_mv_bits(int x, int y, const VECTOR pred, const uint32_t iFcode, const int qpel, const int rrv) |
d_mv_bits(int x, int y, const VECTOR pred, const uint32_t iFcode, const int qpel, const int rrv) |
83 |
{ |
{ |