661 |
CheckCandidateBits16(const int x, const int y, const int Direction, int * const dir, const SearchData * const data) |
CheckCandidateBits16(const int x, const int y, const int Direction, int * const dir, const SearchData * const data) |
662 |
{ |
{ |
663 |
|
|
664 |
static int16_t in[64], coeff[64]; |
int16_t *in = data->dctSpace, *coeff = data->dctSpace + 64; |
665 |
int32_t bits = 0, sum; |
int32_t bits = 0, sum; |
666 |
VECTOR * current; |
VECTOR * current; |
667 |
const uint8_t * ptr; |
const uint8_t * ptr; |
746 |
CheckCandidateBits8(const int x, const int y, const int Direction, int * const dir, const SearchData * const data) |
CheckCandidateBits8(const int x, const int y, const int Direction, int * const dir, const SearchData * const data) |
747 |
{ |
{ |
748 |
|
|
749 |
static int16_t in[64], coeff[64]; |
int16_t *in = data->dctSpace, *coeff = data->dctSpace + 64; |
750 |
int32_t sum, bits; |
int32_t sum, bits; |
751 |
VECTOR * current; |
VECTOR * current; |
752 |
const uint8_t * ptr; |
const uint8_t * ptr; |
1012 |
VECTOR currentMV[5]; |
VECTOR currentMV[5]; |
1013 |
VECTOR currentQMV[5]; |
VECTOR currentQMV[5]; |
1014 |
int32_t iMinSAD[5]; |
int32_t iMinSAD[5]; |
1015 |
|
DECLARE_ALIGNED_MATRIX(dct_space, 2, 64, int16_t, CACHE_LINE); |
1016 |
SearchData Data; |
SearchData Data; |
1017 |
memset(&Data, 0, sizeof(SearchData)); |
memset(&Data, 0, sizeof(SearchData)); |
1018 |
Data.iEdgedWidth = iEdgedWidth; |
Data.iEdgedWidth = iEdgedWidth; |
1025 |
Data.qpel = current->vol_flags & XVID_VOL_QUARTERPEL; |
Data.qpel = current->vol_flags & XVID_VOL_QUARTERPEL; |
1026 |
Data.chroma = MotionFlags & XVID_ME_CHROMA16; |
Data.chroma = MotionFlags & XVID_ME_CHROMA16; |
1027 |
Data.rrv = current->vop_flags & XVID_VOP_REDUCED; |
Data.rrv = current->vop_flags & XVID_VOP_REDUCED; |
1028 |
|
Data.dctSpace = dct_space; |
1029 |
|
|
1030 |
if ((current->vop_flags & XVID_VOP_REDUCED)) { |
if ((current->vop_flags & XVID_VOP_REDUCED)) { |
1031 |
mb_width = (pParam->width + 31) / 32; |
mb_width = (pParam->width + 31) / 32; |
2550 |
int cbp = 0, bits = 0, t = 0, i, iDirection; |
int cbp = 0, bits = 0, t = 0, i, iDirection; |
2551 |
SearchData Data2, *Data8 = &Data2; |
SearchData Data2, *Data8 = &Data2; |
2552 |
int sumx = 0, sumy = 0; |
int sumx = 0, sumy = 0; |
2553 |
int16_t in[64], coeff[64]; |
int16_t *in = Data->dctSpace, *coeff = Data->dctSpace + 64; |
2554 |
|
|
2555 |
memcpy(Data8, Data, sizeof(SearchData)); |
memcpy(Data8, Data, sizeof(SearchData)); |
2556 |
CheckCandidate = CheckCandidateBits8; |
CheckCandidate = CheckCandidateBits8; |
2692 |
int bits = 1; //this one is ac/dc prediction flag. always 1. |
int bits = 1; //this one is ac/dc prediction flag. always 1. |
2693 |
int cbp = 0, i, t, dc = 0, b_dc = 1024; |
int cbp = 0, i, t, dc = 0, b_dc = 1024; |
2694 |
const uint32_t iQuant = Data->lambda16; |
const uint32_t iQuant = Data->lambda16; |
2695 |
int16_t in[64], coeff[64]; |
int16_t *in = Data->dctSpace, * coeff = Data->dctSpace + 64; |
2696 |
|
|
2697 |
for(i = 0; i < 4; i++) { |
for(i = 0; i < 4; i++) { |
2698 |
uint32_t iDcScaler = get_dc_scaler(iQuant, 1); |
uint32_t iDcScaler = get_dc_scaler(iQuant, 1); |