753 |
uint32_t x, y; |
uint32_t x, y; |
754 |
uint32_t iIntra = 0; |
uint32_t iIntra = 0; |
755 |
int32_t InterBias, quant = current->quant, sad00; |
int32_t InterBias, quant = current->quant, sad00; |
|
uint8_t *qimage; |
|
756 |
|
|
757 |
// some pre-initialized thingies for SearchP |
// some pre-initialized thingies for SearchP |
758 |
int32_t temp[8]; |
int32_t temp[8]; |
778 |
Data.qpel = Data.chroma = 0; |
Data.qpel = Data.chroma = 0; |
779 |
} |
} |
780 |
|
|
781 |
if((qimage = (uint8_t *) malloc(32 * pParam->edged_width)) == NULL) |
Data.RefQ = pRefV->u; // a good place, also used in MC (for similar purpose) |
|
return 1; // allocate some mem for qpel interpolated blocks |
|
|
// somehow this is dirty since I think we shouldn't use malloc outside |
|
|
// encoder_create() - so please fix me! |
|
|
Data.RefQ = qimage; |
|
782 |
if (sadInit) (*sadInit) (); |
if (sadInit) (*sadInit) (); |
783 |
|
|
784 |
for (y = 0; y < mb_height; y++) { |
for (y = 0; y < mb_height; y++) { |
870 |
pParam->edged_width); |
pParam->edged_width); |
871 |
|
|
872 |
if (deviation < (pMB->sad16 - InterBias)) { |
if (deviation < (pMB->sad16 - InterBias)) { |
873 |
if (++iIntra >= iLimit) { free(qimage); return 1; } |
if (++iIntra >= iLimit) return 1; |
874 |
pMB->mode = MODE_INTRA; |
pMB->mode = MODE_INTRA; |
875 |
pMB->mvs[0] = pMB->mvs[1] = pMB->mvs[2] = |
pMB->mvs[0] = pMB->mvs[1] = pMB->mvs[2] = |
876 |
pMB->mvs[3] = zeroMV; |
pMB->mvs[3] = zeroMV; |
882 |
} |
} |
883 |
} |
} |
884 |
} |
} |
|
free(qimage); |
|
885 |
|
|
886 |
if (current->coding_type == S_VOP) /* first GMC step only for S(GMC)-VOPs */ |
if (current->coding_type == S_VOP) /* first GMC step only for S(GMC)-VOPs */ |
887 |
current->GMC_MV = GlobalMotionEst( pMBs, pParam, current->fcode ); |
current->GMC_MV = GlobalMotionEst( pMBs, pParam, current->fcode ); |
1754 |
|
|
1755 |
const int32_t TRB = time_pp - time_bp; |
const int32_t TRB = time_pp - time_bp; |
1756 |
const int32_t TRD = time_pp; |
const int32_t TRD = time_pp; |
|
uint8_t * qimage; |
|
1757 |
|
|
1758 |
// some pre-inintialized data for the rest of the search |
// some pre-inintialized data for the rest of the search |
1759 |
|
|
1770 |
Data.qpel = pParam->m_quarterpel; |
Data.qpel = pParam->m_quarterpel; |
1771 |
Data.rounding = 0; |
Data.rounding = 0; |
1772 |
|
|
1773 |
if((qimage = (uint8_t *) malloc(32 * pParam->edged_width)) == NULL) |
Data.RefQ = f_refV->u; // a good place, also used in MC (for similar purpose) |
|
return; // allocate some mem for qpel interpolated blocks |
|
|
// somehow this is dirty since I think we shouldn't use malloc outside |
|
|
// encoder_create() - so please fix me! |
|
|
Data.RefQ = qimage; |
|
|
|
|
1774 |
// note: i==horizontal, j==vertical |
// note: i==horizontal, j==vertical |
1775 |
for (j = 0; j < pParam->mb_height; j++) { |
for (j = 0; j < pParam->mb_height; j++) { |
1776 |
|
|
1867 |
} |
} |
1868 |
} |
} |
1869 |
} |
} |
|
free(qimage); |
|
1870 |
} |
} |
1871 |
|
|
1872 |
static __inline void |
static __inline void |