50 |
#define MAX_SAD00_FOR_SKIP (20) |
#define MAX_SAD00_FOR_SKIP (20) |
51 |
#define MAX_CHROMA_SAD_FOR_SKIP (22) |
#define MAX_CHROMA_SAD_FOR_SKIP (22) |
52 |
|
|
53 |
#define CHECK_CANDIDATE(X,Y,D) { \ |
#define CHECK_CANDIDATE(X,Y,D) { CheckCandidate((X),(Y), (D), &iDirection, data ); } |
|
(*CheckCandidate)((const int)(X),(const int)(Y), (D), &iDirection, data ); } |
|
54 |
|
|
55 |
static __inline uint32_t |
static __inline uint32_t |
56 |
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) |
1111 |
|
|
1112 |
for (i = 1; i < 7; i++) { |
for (i = 1; i < 7; i++) { |
1113 |
if (!(mask = make_mask(pmv, i)) ) continue; |
if (!(mask = make_mask(pmv, i)) ) continue; |
1114 |
(*CheckCandidate)(pmv[i].x, pmv[i].y, mask, &iDirection, Data); |
CheckCandidate(pmv[i].x, pmv[i].y, mask, &iDirection, Data); |
1115 |
if (Data->iMinSAD[0] <= threshA) break; |
if (Data->iMinSAD[0] <= threshA) break; |
1116 |
} |
} |
1117 |
|
|
1144 |
if (!(MVequal(startMV, backupMV))) { |
if (!(MVequal(startMV, backupMV))) { |
1145 |
bSAD = Data->iMinSAD[0]; Data->iMinSAD[0] = MV_MAX_ERROR; |
bSAD = Data->iMinSAD[0]; Data->iMinSAD[0] = MV_MAX_ERROR; |
1146 |
|
|
1147 |
(*CheckCandidate)(startMV.x, startMV.y, 255, &iDirection, Data); |
CheckCandidate(startMV.x, startMV.y, 255, &iDirection, Data); |
1148 |
(*MainSearchPtr)(startMV.x, startMV.y, Data, 255); |
(*MainSearchPtr)(startMV.x, startMV.y, Data, 255); |
1149 |
if (bSAD < Data->iMinSAD[0]) { |
if (bSAD < Data->iMinSAD[0]) { |
1150 |
Data->currentMV[0] = backupMV; |
Data->currentMV[0] = backupMV; |
1157 |
if (!(MVequal(startMV, backupMV))) { |
if (!(MVequal(startMV, backupMV))) { |
1158 |
bSAD = Data->iMinSAD[0]; Data->iMinSAD[0] = MV_MAX_ERROR; |
bSAD = Data->iMinSAD[0]; Data->iMinSAD[0] = MV_MAX_ERROR; |
1159 |
|
|
1160 |
(*CheckCandidate)(startMV.x, startMV.y, 255, &iDirection, Data); |
CheckCandidate(startMV.x, startMV.y, 255, &iDirection, Data); |
1161 |
(*MainSearchPtr)(startMV.x, startMV.y, Data, 255); |
(*MainSearchPtr)(startMV.x, startMV.y, Data, 255); |
1162 |
if (bSAD < Data->iMinSAD[0]) { |
if (bSAD < Data->iMinSAD[0]) { |
1163 |
Data->currentMV[0] = backupMV; |
Data->currentMV[0] = backupMV; |
1589 |
|
|
1590 |
CheckCandidate = b_mb->mode == MODE_INTER4V ? CheckCandidateDirect : CheckCandidateDirectno4v; |
CheckCandidate = b_mb->mode == MODE_INTER4V ? CheckCandidateDirect : CheckCandidateDirectno4v; |
1591 |
|
|
1592 |
(*CheckCandidate)(0, 0, 255, &k, Data); |
CheckCandidate(0, 0, 255, &k, Data); |
1593 |
|
|
1594 |
// initial (fast) skip decision |
// initial (fast) skip decision |
1595 |
if (*Data->iMinSAD < pMB->quant * INITIAL_SKIP_THRESH * (2 + Data->chroma?1:0)) { |
if (*Data->iMinSAD < pMB->quant * INITIAL_SKIP_THRESH * (2 + Data->chroma?1:0)) { |