diff --git a/codec/decoder/core/src/mc.cpp b/codec/decoder/core/src/mc.cpp index e0c5d84b..bcc166be 100644 --- a/codec/decoder/core/src/mc.cpp +++ b/codec/decoder/core/src/mc.cpp @@ -892,7 +892,7 @@ void McHorVer33_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, in void McLuma_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) { - static PWelsMcWidthHeightFunc pWelsMcFunc[4][4] = { //[x][y] + static const PWelsMcWidthHeightFunc pWelsMcFunc[4][4] = { //[x][y] {McCopy_neon, McHorVer01_neon, McHorVer02_neon, McHorVer03_neon}, {McHorVer10_neon, McHorVer11_neon, McHorVer12_neon, McHorVer13_neon}, {McHorVer20_neon, McHorVer21_neon, McHorVer22_neon, McHorVer23_neon}, @@ -1143,7 +1143,7 @@ void McHorVer33_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* void McLuma_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) { - static PWelsMcWidthHeightFunc pWelsMcFunc[4][4] = { //[x][y] + static const PWelsMcWidthHeightFunc pWelsMcFunc[4][4] = { //[x][y] {McCopy_AArch64_neon, McHorVer01_AArch64_neon, McHorVer02_AArch64_neon, McHorVer03_AArch64_neon}, {McHorVer10_AArch64_neon, McHorVer11_AArch64_neon, McHorVer12_AArch64_neon, McHorVer13_AArch64_neon}, {McHorVer20_AArch64_neon, McHorVer21_AArch64_neon, McHorVer22_AArch64_neon, McHorVer23_AArch64_neon}, diff --git a/codec/encoder/core/src/md.cpp b/codec/encoder/core/src/md.cpp index 6eaf8ea4..334c51c2 100644 --- a/codec/encoder/core/src/md.cpp +++ b/codec/encoder/core/src/md.cpp @@ -590,8 +590,8 @@ void MeRefineFracPixel (sWelsEncCtx* pEncCtx, uint8_t* pMemPredInterMb, SWelsME* int32_t iBestQuarPix = ME_NO_BEST_QUAR_PIXEL; SQuarRefineParams sParams; - static int32_t iMvQuarAddX[10] = {0, 0, -1, 1, 0, 0, 0, -1, 1, 0}; - int32_t* pMvQuarAddY = iMvQuarAddX + 3; + static const int32_t iMvQuarAddX[10] = {0, 0, -1, 1, 0, 0, 0, -1, 1, 0}; + const int32_t* pMvQuarAddY = iMvQuarAddX + 3; uint8_t* pBestPredInter = pRef; int32_t iInterBlk4Stride = ME_REFINE_BUF_STRIDE; diff --git a/codec/encoder/core/src/svc_encode_slice.cpp b/codec/encoder/core/src/svc_encode_slice.cpp index 78a87781..398966e0 100644 --- a/codec/encoder/core/src/svc_encode_slice.cpp +++ b/codec/encoder/core/src/svc_encode_slice.cpp @@ -697,11 +697,11 @@ int32_t WelsCodePOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice) { // 1st index: 0: for P pSlice; 1: for I pSlice; // 2nd index: 0: for non-dynamic pSlice; 1: for dynamic I pSlice; -PWelsCodingSliceFunc g_pWelsSliceCoding[2][2] = { +static const PWelsCodingSliceFunc g_pWelsSliceCoding[2][2] = { { WelsCodePSlice, WelsCodePOverDynamicSlice }, // P SSlice { WelsISliceMdEnc, WelsISliceMdEncDynamic } // I SSlice }; -PWelsSliceHeaderWriteFunc g_pWelsWriteSliceHeader[2] = { // 0: for base; 1: for ext; +static const PWelsSliceHeaderWriteFunc g_pWelsWriteSliceHeader[2] = { // 0: for base; 1: for ext; WelsSliceHeaderWrite, WelsSliceHeaderExtWrite };