96 |
if (pParam->max_quantizer < pParam->min_quantizer) |
if (pParam->max_quantizer < pParam->min_quantizer) |
97 |
pParam->max_quantizer = pParam->min_quantizer; |
pParam->max_quantizer = pParam->min_quantizer; |
98 |
|
|
99 |
if ((pEnc = (Encoder *) xvid_malloc(sizeof(Encoder), 16)) == NULL) |
if ((pEnc = (Encoder *) xvid_malloc(sizeof(Encoder), CACHE_LINE)) == NULL) |
100 |
return XVID_ERR_MEMORY; |
return XVID_ERR_MEMORY; |
101 |
|
|
102 |
/* Fill members of Encoder structure */ |
/* Fill members of Encoder structure */ |
161 |
return XVID_ERR_MEMORY; |
return XVID_ERR_MEMORY; |
162 |
} |
} |
163 |
|
|
164 |
pEnc->pMBs = xvid_malloc(sizeof(MACROBLOCK) * pEnc->mbParam.mb_width * pEnc->mbParam.mb_height, 16); |
pEnc->pMBs = xvid_malloc(sizeof(MACROBLOCK) * pEnc->mbParam.mb_width * pEnc->mbParam.mb_height, CACHE_LINE); |
165 |
if (pEnc->pMBs == NULL) |
if (pEnc->pMBs == NULL) |
166 |
{ |
{ |
167 |
image_destroy(&pEnc->sCurrent, pEnc->mbParam.edged_width, pEnc->mbParam.edged_height); |
image_destroy(&pEnc->sCurrent, pEnc->mbParam.edged_width, pEnc->mbParam.edged_height); |
253 |
|
|
254 |
if ((pEnc->mbParam.global_flags & XVID_LUMIMASKING) > 0) |
if ((pEnc->mbParam.global_flags & XVID_LUMIMASKING) > 0) |
255 |
{ |
{ |
256 |
int * temp_dquants = (int *) xvid_malloc(pEnc->mbParam.mb_width * pEnc->mbParam.mb_height * sizeof(int), 16); |
int * temp_dquants = (int *) xvid_malloc(pEnc->mbParam.mb_width * pEnc->mbParam.mb_height * sizeof(int), CACHE_LINE); |
257 |
|
|
258 |
pEnc->mbParam.quant = adaptive_quantization(pEnc->sCurrent.y, pEnc->mbParam.width, |
pEnc->mbParam.quant = adaptive_quantization(pEnc->sCurrent.y, pEnc->mbParam.width, |
259 |
temp_dquants, pFrame->quant, pFrame->quant, |
temp_dquants, pFrame->quant, pFrame->quant, |