Merge pull request #460 from mstorsjo/add-const
Mark pointers as const where possible in vaacalc
This commit is contained in:
commit
e99df3377d
@ -359,7 +359,7 @@ SampleVariance16x16_sse2:
|
||||
|
||||
WELS_EXTERN VAACalcSad_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSad_sse2( uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight
|
||||
;void VAACalcSad_sse2( const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight
|
||||
; int32_t iPicStride, int32_t *psadframe, int32_t *psad8x8)
|
||||
;*************************************************************************************************************
|
||||
|
||||
@ -551,7 +551,7 @@ SampleVariance16x16_sse2:
|
||||
|
||||
WELS_EXTERN VAACalcSad_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSad_sse2( uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight
|
||||
;void VAACalcSad_sse2( const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight
|
||||
; int32_t iPicStride, int32_t *psadframe, int32_t *psad8x8)
|
||||
;*************************************************************************************************************
|
||||
|
||||
@ -649,7 +649,7 @@ width_loop:
|
||||
%ifdef X86_32
|
||||
WELS_EXTERN VAACalcSadVar_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSadVar_sse2( uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight
|
||||
;void VAACalcSadVar_sse2( const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight
|
||||
; int32_t iPicStride, int32_t *psadframe, int32_t *psad8x8, int32_t *psum16x16, int32_t *psqsum16x16)
|
||||
;*************************************************************************************************************
|
||||
|
||||
@ -785,7 +785,7 @@ var_width_loop:
|
||||
|
||||
WELS_EXTERN VAACalcSadVar_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSadVar_sse2( uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight
|
||||
;void VAACalcSadVar_sse2( const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight
|
||||
; int32_t iPicStride, int32_t *psadframe, int32_t *psad8x8, int32_t *psum16x16, int32_t *psqsum16x16)
|
||||
;*************************************************************************************************************
|
||||
|
||||
@ -928,7 +928,7 @@ var_width_loop:
|
||||
|
||||
WELS_EXTERN VAACalcSadSsd_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSadSsd_sse2(uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
;void VAACalcSadSsd_sse2(const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
; int32_t iPicStride,int32_t *psadframe, int32_t *psad8x8, int32_t *psum16x16, int32_t *psqsum16x16, int32_t *psqdiff16x16)
|
||||
;*************************************************************************************************************
|
||||
|
||||
@ -1084,7 +1084,7 @@ sqdiff_width_loop:
|
||||
|
||||
WELS_EXTERN VAACalcSadSsd_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSadSsd_sse2(uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
;void VAACalcSadSsd_sse2(const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
; int32_t iPicStride,int32_t *psadframe, int32_t *psad8x8, int32_t *psum16x16, int32_t *psqsum16x16, int32_t *psqdiff16x16)
|
||||
;*************************************************************************************************************
|
||||
|
||||
@ -1248,7 +1248,7 @@ sqdiff_width_loop:
|
||||
%ifdef X86_32
|
||||
WELS_EXTERN VAACalcSadBgd_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSadBgd_sse2(uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
;void VAACalcSadBgd_sse2(const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
; int32_t iPicStride, int32_t *psadframe, int32_t *psad8x8, int32_t *p_sd8x8, uint8_t *p_mad8x8)
|
||||
;*************************************************************************************************************
|
||||
|
||||
@ -1427,7 +1427,7 @@ bgd_width_loop:
|
||||
|
||||
WELS_EXTERN VAACalcSadSsdBgd_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSadSsdBgd_sse2(uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
;void VAACalcSadSsdBgd_sse2(const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
; int32_t iPicStride, int32_t *psadframe, int32_t *psad8x8, int32_t *psum16x16, int32_t *psqsum16x16,
|
||||
; int32_t *psqdiff16x16, int32_t *p_sd8x8, uint8_t *p_mad8x8)
|
||||
;*************************************************************************************************************
|
||||
@ -1658,7 +1658,7 @@ sqdiff_bgd_width_loop:
|
||||
|
||||
WELS_EXTERN VAACalcSadBgd_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSadBgd_sse2(uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
;void VAACalcSadBgd_sse2(const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
; int32_t iPicStride, int32_t *psadframe, int32_t *psad8x8, int32_t *p_sd8x8, uint8_t *p_mad8x8)
|
||||
;*************************************************************************************************************
|
||||
|
||||
@ -1829,7 +1829,7 @@ bgd_width_loop:
|
||||
|
||||
WELS_EXTERN VAACalcSadSsdBgd_sse2
|
||||
;*************************************************************************************************************
|
||||
;void VAACalcSadSsdBgd_sse2(uint8_t *cur_data, uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
;void VAACalcSadSsdBgd_sse2(const uint8_t *cur_data, const uint8_t *ref_data, int32_t iPicWidth, int32_t iPicHeight,
|
||||
; int32_t iPicStride, int32_t *psadframe, int32_t *psad8x8, int32_t *psum16x16, int32_t *psqsum16x16,
|
||||
; int32_t *psqdiff16x16, int32_t *p_sd8x8, uint8_t *p_mad8x8)
|
||||
;*************************************************************************************************************
|
||||
|
@ -34,10 +34,10 @@
|
||||
|
||||
WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
void VAACalcSadSsd_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
void VAACalcSadSsd_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* psqsum16x16, int32_t* psqdiff16x16) {
|
||||
uint8_t* tmp_ref = pRefData;
|
||||
uint8_t* tmp_cur = pCurData;
|
||||
const uint8_t* tmp_ref = pRefData;
|
||||
const uint8_t* tmp_cur = pCurData;
|
||||
int32_t iMbWidth = (iPicWidth >> 4);
|
||||
int32_t mb_height = (iPicHeight >> 4);
|
||||
int32_t mb_index = 0;
|
||||
@ -49,8 +49,8 @@ void VAACalcSadSsd_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, i
|
||||
for (int32_t j = 0; j < iMbWidth; j ++) {
|
||||
int32_t k, l;
|
||||
int32_t l_sad, l_sqdiff, l_sum, l_sqsum;
|
||||
uint8_t* tmp_cur_row;
|
||||
uint8_t* tmp_ref_row;
|
||||
const uint8_t* tmp_cur_row;
|
||||
const uint8_t* tmp_ref_row;
|
||||
|
||||
pSum16x16[mb_index] = 0;
|
||||
psqsum16x16[mb_index] = 0;
|
||||
@ -145,10 +145,10 @@ void VAACalcSadSsd_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, i
|
||||
tmp_cur += step;
|
||||
}
|
||||
}
|
||||
void VAACalcSadVar_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
void VAACalcSadVar_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* psqsum16x16) {
|
||||
uint8_t* tmp_ref = pRefData;
|
||||
uint8_t* tmp_cur = pCurData;
|
||||
const uint8_t* tmp_ref = pRefData;
|
||||
const uint8_t* tmp_cur = pCurData;
|
||||
int32_t iMbWidth = (iPicWidth >> 4);
|
||||
int32_t mb_height = (iPicHeight >> 4);
|
||||
int32_t mb_index = 0;
|
||||
@ -160,8 +160,8 @@ void VAACalcSadVar_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, i
|
||||
for (int32_t j = 0; j < iMbWidth; j ++) {
|
||||
int32_t k, l;
|
||||
int32_t l_sad, l_sum, l_sqsum;
|
||||
uint8_t* tmp_cur_row;
|
||||
uint8_t* tmp_ref_row;
|
||||
const uint8_t* tmp_cur_row;
|
||||
const uint8_t* tmp_ref_row;
|
||||
|
||||
pSum16x16[mb_index] = 0;
|
||||
psqsum16x16[mb_index] = 0;
|
||||
@ -249,10 +249,10 @@ void VAACalcSadVar_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, i
|
||||
}
|
||||
|
||||
|
||||
void VAACalcSad_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
void VAACalcSad_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8) {
|
||||
uint8_t* tmp_ref = pRefData;
|
||||
uint8_t* tmp_cur = pCurData;
|
||||
const uint8_t* tmp_ref = pRefData;
|
||||
const uint8_t* tmp_cur = pCurData;
|
||||
int32_t iMbWidth = (iPicWidth >> 4);
|
||||
int32_t mb_height = (iPicHeight >> 4);
|
||||
int32_t mb_index = 0;
|
||||
@ -264,8 +264,8 @@ void VAACalcSad_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int3
|
||||
for (int32_t j = 0; j < iMbWidth; j ++) {
|
||||
int32_t k, l;
|
||||
int32_t l_sad;
|
||||
uint8_t* tmp_cur_row;
|
||||
uint8_t* tmp_ref_row;
|
||||
const uint8_t* tmp_cur_row;
|
||||
const uint8_t* tmp_ref_row;
|
||||
|
||||
l_sad = 0;
|
||||
tmp_cur_row = tmp_cur;
|
||||
@ -332,14 +332,14 @@ void VAACalcSad_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int3
|
||||
}
|
||||
}
|
||||
|
||||
void VAACalcSadSsdBgd_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
void VAACalcSadSsdBgd_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* psqsum16x16, int32_t* psqdiff16x16, int32_t* pSd8x8,
|
||||
uint8_t* pMad8x8)
|
||||
|
||||
{
|
||||
uint8_t* tmp_ref = pRefData;
|
||||
uint8_t* tmp_cur = pCurData;
|
||||
const uint8_t* tmp_ref = pRefData;
|
||||
const uint8_t* tmp_cur = pCurData;
|
||||
int32_t iMbWidth = (iPicWidth >> 4);
|
||||
int32_t mb_height = (iPicHeight >> 4);
|
||||
int32_t mb_index = 0;
|
||||
@ -351,8 +351,8 @@ void VAACalcSadSsdBgd_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth
|
||||
for (int32_t j = 0; j < iMbWidth; j ++) {
|
||||
int32_t k, l;
|
||||
int32_t l_sad, l_sqdiff, l_sum, l_sqsum, l_sd, l_mad;
|
||||
uint8_t* tmp_cur_row;
|
||||
uint8_t* tmp_ref_row;
|
||||
const uint8_t* tmp_cur_row;
|
||||
const uint8_t* tmp_ref_row;
|
||||
|
||||
pSum16x16[mb_index] = 0;
|
||||
psqsum16x16[mb_index] = 0;
|
||||
@ -480,10 +480,10 @@ void VAACalcSadSsdBgd_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth
|
||||
}
|
||||
}
|
||||
|
||||
void VAACalcSadBgd_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
void VAACalcSadBgd_c (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight, int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSd8x8, uint8_t* pMad8x8) {
|
||||
uint8_t* tmp_ref = pRefData;
|
||||
uint8_t* tmp_cur = pCurData;
|
||||
const uint8_t* tmp_ref = pRefData;
|
||||
const uint8_t* tmp_cur = pCurData;
|
||||
int32_t iMbWidth = (iPicWidth >> 4);
|
||||
int32_t mb_height = (iPicHeight >> 4);
|
||||
int32_t mb_index = 0;
|
||||
@ -495,8 +495,8 @@ void VAACalcSadBgd_c (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, i
|
||||
for (int32_t j = 0; j < iMbWidth; j ++) {
|
||||
int32_t k, l;
|
||||
int32_t l_sad, l_sd, l_mad;
|
||||
uint8_t* tmp_cur_row;
|
||||
uint8_t* tmp_ref_row;
|
||||
const uint8_t* tmp_cur_row;
|
||||
const uint8_t* tmp_ref_row;
|
||||
|
||||
l_mad = l_sd = l_sad = 0;
|
||||
tmp_cur_row = tmp_cur;
|
||||
|
@ -49,24 +49,24 @@
|
||||
|
||||
WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
typedef void (VAACalcSadBgdFunc) (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
typedef void (VAACalcSadBgdFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSd8x8, uint8_t* pMad8x8);
|
||||
|
||||
typedef void (VAACalcSadSsdBgdFunc) (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
typedef void (VAACalcSadSsdBgdFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* pSumSquare16x16,
|
||||
int32_t* pSsd16x16, int32_t* pSd8x8, uint8_t* pMad8x8);
|
||||
|
||||
typedef void (VAACalcSadFunc) (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
typedef void (VAACalcSadFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8);
|
||||
|
||||
typedef void (VAACalcSadVarFunc) (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
typedef void (VAACalcSadVarFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* pSumSquare16x16);
|
||||
|
||||
typedef void (VAACalcSadSsdFunc) (uint8_t* pCurData, uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
typedef void (VAACalcSadSsdFunc) (const uint8_t* pCurData, const uint8_t* pRefData, int32_t iPicWidth, int32_t iPicHeight,
|
||||
int32_t iPicStride,
|
||||
int32_t* pFrameSad, int32_t* pSad8x8, int32_t* pSum16x16, int32_t* pSumSquare16x16, int32_t* pSsd16x16);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user