Showing the changes to codec/decoder/core/src/mc.cpp (1 of 1 file). Show all
Unified · Split
| @@ -220,88 +220,88 @@ static inline void McHorVer22_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDs · 219 unmodified lines | |||
| 220 | /////////////////////luma MC////////////////////////// | 220 | /////////////////////luma MC////////////////////////// |
| 221 | static inline void McHorVer01_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 221 | static inline void McHorVer01_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 222 | int32_t iHeight) { | 222 | int32_t iHeight) { |
| 223 | uint8_t uiTmp[256] = { 0 }; | 223 | uint8_t uiTmp[256]; |
| 224 | McHorVer02_c (pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); | 224 | McHorVer02_c (pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); |
| 225 | PixelAvg_c (pDst, iDstStride, pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); | 225 | PixelAvg_c (pDst, iDstStride, pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); |
| 226 | } | 226 | } |
| 227 | static inline void McHorVer03_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 227 | static inline void McHorVer03_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 228 | int32_t iHeight) { | 228 | int32_t iHeight) { |
| 229 | uint8_t uiTmp[256] = { 0 }; | 229 | uint8_t uiTmp[256]; |
| 230 | McHorVer02_c (pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); | 230 | McHorVer02_c (pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); |
| 231 | PixelAvg_c (pDst, iDstStride, pSrc + iSrcStride, iSrcStride, uiTmp, 16, iWidth, iHeight); | 231 | PixelAvg_c (pDst, iDstStride, pSrc + iSrcStride, iSrcStride, uiTmp, 16, iWidth, iHeight); |
| 232 | } | 232 | } |
| 233 | static inline void McHorVer10_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 233 | static inline void McHorVer10_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 234 | int32_t iHeight) { | 234 | int32_t iHeight) { |
| 235 | uint8_t uiTmp[256] = { 0 }; | 235 | uint8_t uiTmp[256]; |
| 236 | McHorVer20_c (pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); | 236 | McHorVer20_c (pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); |
| 237 | PixelAvg_c (pDst, iDstStride, pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); | 237 | PixelAvg_c (pDst, iDstStride, pSrc, iSrcStride, uiTmp, 16, iWidth, iHeight); |
| 238 | } | 238 | } |
| 239 | static inline void McHorVer11_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 239 | static inline void McHorVer11_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 240 | int32_t iHeight) { | 240 | int32_t iHeight) { |
| 241 | uint8_t uiHorTmp[256] = { 0 }; | 241 | uint8_t uiHorTmp[256]; |
| 242 | uint8_t uiVerTmp[256] = { 0 }; | 242 | uint8_t uiVerTmp[256]; |
| 243 | McHorVer20_c (pSrc, iSrcStride, uiHorTmp, 16, iWidth, iHeight); | 243 | McHorVer20_c (pSrc, iSrcStride, uiHorTmp, 16, iWidth, iHeight); |
| 244 | McHorVer02_c (pSrc, iSrcStride, uiVerTmp, 16, iWidth, iHeight); | 244 | McHorVer02_c (pSrc, iSrcStride, uiVerTmp, 16, iWidth, iHeight); |
| 245 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight); | 245 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight); |
| 246 | } | 246 | } |
| 247 | static inline void McHorVer12_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 247 | static inline void McHorVer12_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 248 | int32_t iHeight) { | 248 | int32_t iHeight) { |
| 249 | uint8_t uiVerTmp[256] = { 0 }; | 249 | uint8_t uiVerTmp[256]; |
| 250 | uint8_t uiCtrTmp[256] = { 0 }; | 250 | uint8_t uiCtrTmp[256]; |
| 251 | McHorVer02_c (pSrc, iSrcStride, uiVerTmp, 16, iWidth, iHeight); | 251 | McHorVer02_c (pSrc, iSrcStride, uiVerTmp, 16, iWidth, iHeight); |
| 252 | McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight); | 252 | McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight); |
| 253 | PixelAvg_c (pDst, iDstStride, uiVerTmp, 16, uiCtrTmp, 16, iWidth, iHeight); | 253 | PixelAvg_c (pDst, iDstStride, uiVerTmp, 16, uiCtrTmp, 16, iWidth, iHeight); |
| 254 | } | 254 | } |
| 255 | static inline void McHorVer13_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 255 | static inline void McHorVer13_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 256 | int32_t iHeight) { | 256 | int32_t iHeight) { |
| 257 | uint8_t uiHorTmp[256] = { 0 }; | 257 | uint8_t uiHorTmp[256]; |
| 258 | uint8_t uiVerTmp[256] = { 0 }; | 258 | uint8_t uiVerTmp[256]; |
| 259 | McHorVer20_c (pSrc + iSrcStride, iSrcStride, uiHorTmp, 16, iWidth, iHeight); | 259 | McHorVer20_c (pSrc + iSrcStride, iSrcStride, uiHorTmp, 16, iWidth, iHeight); |
| 260 | McHorVer02_c (pSrc, iSrcStride, uiVerTmp, 16, iWidth, iHeight); | 260 | McHorVer02_c (pSrc, iSrcStride, uiVerTmp, 16, iWidth, iHeight); |
| 261 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight); | 261 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight); |
| 262 | } | 262 | } |
| 263 | static inline void McHorVer21_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 263 | static inline void McHorVer21_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 264 | int32_t iHeight) { | 264 | int32_t iHeight) { |
| 265 | uint8_t uiHorTmp[256] = { 0 }; | 265 | uint8_t uiHorTmp[256]; |
| 266 | uint8_t uiCtrTmp[256] = { 0 }; | 266 | uint8_t uiCtrTmp[256]; |
| 267 | McHorVer20_c (pSrc, iSrcStride, uiHorTmp, 16, iWidth, iHeight); | 267 | McHorVer20_c (pSrc, iSrcStride, uiHorTmp, 16, iWidth, iHeight); |
| 268 | McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight); | 268 | McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight); |
| 269 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiCtrTmp, 16, iWidth, iHeight); | 269 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiCtrTmp, 16, iWidth, iHeight); |
| 270 | } | 270 | } |
| 271 | static inline void McHorVer23_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 271 | static inline void McHorVer23_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 272 | int32_t iHeight) { | 272 | int32_t iHeight) { |
| 273 | uint8_t uiHorTmp[256] = { 0 }; | 273 | uint8_t uiHorTmp[256]; |
| 274 | uint8_t uiCtrTmp[256] = { 0 }; | 274 | uint8_t uiCtrTmp[256]; |
| 275 | McHorVer20_c (pSrc + iSrcStride, iSrcStride, uiHorTmp, 16, iWidth, iHeight); | 275 | McHorVer20_c (pSrc + iSrcStride, iSrcStride, uiHorTmp, 16, iWidth, iHeight); |
| 276 | McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight); | 276 | McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight); |
| 277 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiCtrTmp, 16, iWidth, iHeight); | 277 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiCtrTmp, 16, iWidth, iHeight); |
| 278 | } | 278 | } |
| 279 | static inline void McHorVer30_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 279 | static inline void McHorVer30_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 280 | int32_t iHeight) { | 280 | int32_t iHeight) { |
| 281 | uint8_t uiHorTmp[256] = { 0 }; | 281 | uint8_t uiHorTmp[256]; |
| 282 | McHorVer20_c (pSrc, iSrcStride, uiHorTmp, 16, iWidth, iHeight); | 282 | McHorVer20_c (pSrc, iSrcStride, uiHorTmp, 16, iWidth, iHeight); |
| 283 | PixelAvg_c (pDst, iDstStride, pSrc + 1, iSrcStride, uiHorTmp, 16, iWidth, iHeight); | 283 | PixelAvg_c (pDst, iDstStride, pSrc + 1, iSrcStride, uiHorTmp, 16, iWidth, iHeight); |
| 284 | } | 284 | } |
| 285 | static inline void McHorVer31_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 285 | static inline void McHorVer31_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 286 | int32_t iHeight) { | 286 | int32_t iHeight) { |
| 287 | uint8_t uiHorTmp[256] = { 0 }; | 287 | uint8_t uiHorTmp[256]; |
| 288 | uint8_t uiVerTmp[256] = { 0 }; | 288 | uint8_t uiVerTmp[256]; |
| 289 | McHorVer20_c (pSrc, iSrcStride, uiHorTmp, 16, iWidth, iHeight); | 289 | McHorVer20_c (pSrc, iSrcStride, uiHorTmp, 16, iWidth, iHeight); |
| 290 | McHorVer02_c (pSrc + 1, iSrcStride, uiVerTmp, 16, iWidth, iHeight); | 290 | McHorVer02_c (pSrc + 1, iSrcStride, uiVerTmp, 16, iWidth, iHeight); |
| 291 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight); | 291 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight); |
| 292 | } | 292 | } |
| 293 | static inline void McHorVer32_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 293 | static inline void McHorVer32_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 294 | int32_t iHeight) { | 294 | int32_t iHeight) { |
| 295 | uint8_t uiVerTmp[256] = { 0 }; | 295 | uint8_t uiVerTmp[256]; |
| 296 | uint8_t uiCtrTmp[256] = { 0 }; | 296 | uint8_t uiCtrTmp[256]; |
| 297 | McHorVer02_c (pSrc + 1, iSrcStride, uiVerTmp, 16, iWidth, iHeight); | 297 | McHorVer02_c (pSrc + 1, iSrcStride, uiVerTmp, 16, iWidth, iHeight); |
| 298 | McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight); | 298 | McHorVer22_c (pSrc, iSrcStride, uiCtrTmp, 16, iWidth, iHeight); |
| 299 | PixelAvg_c (pDst, iDstStride, uiVerTmp, 16, uiCtrTmp, 16, iWidth, iHeight); | 299 | PixelAvg_c (pDst, iDstStride, uiVerTmp, 16, uiCtrTmp, 16, iWidth, iHeight); |
| 300 | } | 300 | } |
| 301 | static inline void McHorVer33_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, | 301 | static inline void McHorVer33_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride, int32_t iWidth, |
| 302 | int32_t iHeight) { | 302 | int32_t iHeight) { |
| 303 | uint8_t uiHorTmp[256] = { 0 }; | 303 | uint8_t uiHorTmp[256]; |
| 304 | uint8_t uiVerTmp[256] = { 0 }; | 304 | uint8_t uiVerTmp[256]; |
| 305 | McHorVer20_c (pSrc + iSrcStride, iSrcStride, uiHorTmp, 16, iWidth, iHeight); | 305 | McHorVer20_c (pSrc + iSrcStride, iSrcStride, uiHorTmp, 16, iWidth, iHeight); |
| 306 | McHorVer02_c (pSrc + 1, iSrcStride, uiVerTmp, 16, iWidth, iHeight); | 306 | McHorVer02_c (pSrc + 1, iSrcStride, uiVerTmp, 16, iWidth, iHeight); |
| 307 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight); | 307 | PixelAvg_c (pDst, iDstStride, uiHorTmp, 16, uiVerTmp, 16, iWidth, iHeight); |
| @@ -311,7 +311,7 @@ void McLuma_c (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStr · 3 unmodified lines | |||
| 311 | int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) | 311 | int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) |
| 312 | //pSrc has been added the offset of mv | 312 | //pSrc has been added the offset of mv |
| 313 | { | 313 | { |
| 314 | PWelsMcWidthHeightFunc pWelsMcFunc[4][4] = { //[x][y] | 314 | static const PWelsMcWidthHeightFunc pWelsMcFunc[4][4] = { //[x][y] |
| 315 | {McCopy_c, McHorVer01_c, McHorVer02_c, McHorVer03_c}, | 315 | {McCopy_c, McHorVer01_c, McHorVer02_c, McHorVer03_c}, |
| 316 | {McHorVer10_c, McHorVer11_c, McHorVer12_c, McHorVer13_c}, | 316 | {McHorVer10_c, McHorVer11_c, McHorVer12_c, McHorVer13_c}, |
| 317 | {McHorVer20_c, McHorVer21_c, McHorVer22_c, McHorVer23_c}, | 317 | {McHorVer20_c, McHorVer21_c, McHorVer22_c, McHorVer23_c}, |
| @@ -623,7 +623,7 @@ void McLuma_sse2 (uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDst · 305 unmodified lines | |||
| 623 | int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) | 623 | int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) |
| 624 | //pSrc has been added the offset of mv | 624 | //pSrc has been added the offset of mv |
| 625 | { | 625 | { |
| 626 | PWelsMcWidthHeightFunc pWelsMcFunc[4][4] = { //[x][y] | 626 | static const PWelsMcWidthHeightFunc pWelsMcFunc[4][4] = { //[x][y] |
| 627 | {McCopy_sse2, McHorVer01_sse2, McHorVer02_sse2, McHorVer03_sse2}, | 627 | {McCopy_sse2, McHorVer01_sse2, McHorVer02_sse2, McHorVer03_sse2}, |
| 628 | {McHorVer10_sse2, McHorVer11_sse2, McHorVer12_sse2, McHorVer13_sse2}, | 628 | {McHorVer10_sse2, McHorVer11_sse2, McHorVer12_sse2, McHorVer13_sse2}, |
| 629 | {McHorVer20_sse2, McHorVer21_sse2, McHorVer22_sse2, McHorVer23_sse2}, | 629 | {McHorVer20_sse2, McHorVer21_sse2, McHorVer22_sse2, McHorVer23_sse2}, |