Showing the changes to codec/processing/src (3 of 20 files). Show all
Unified · Split
| @@ -1,69 +0,0 @@ | |||
| 1 | /*! | ||
| 2 | * \copy | ||
| 3 | * Copyright (c) 2013, Cisco Systems | ||
| 4 | * All rights reserved. | ||
| 5 | * | ||
| 6 | * Redistribution and use in source and binary forms, with or without | ||
| 7 | * modification, are permitted provided that the following conditions | ||
| 8 | * are met: | ||
| 9 | * | ||
| 10 | * * Redistributions of source code must retain the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer. | ||
| 12 | * | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in | ||
| 15 | * the documentation and/or other materials provided with the | ||
| 16 | * distribution. | ||
| 17 | * | ||
| 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| 24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
| 28 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 29 | * POSSIBILITY OF SUCH DAMAGE. | ||
| 30 | * | ||
| 31 | */ | ||
| 32 | |||
| 33 | #include "common.h" | ||
| 34 | #include "ls_defines.h" | ||
| 35 | |||
| 36 | WELSVP_NAMESPACE_BEGIN | ||
| 37 | |||
| 38 | void WelsI16x16LumaPredV_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) { | ||
| 39 | uint8_t i = 15; | ||
| 40 | const int8_t* kpSrc = (int8_t*)&pRef[-kiStride]; | ||
| 41 | const uint64_t kuiT1 = LD64 (kpSrc); | ||
| 42 | const uint64_t kuiT2 = LD64 (kpSrc + 8); | ||
| 43 | uint8_t* pDst = pPred; | ||
| 44 | |||
| 45 | do { | ||
| 46 | ST64 (pDst , kuiT1); | ||
| 47 | ST64 (pDst + 8, kuiT2); | ||
| 48 | pDst += 16; | ||
| 49 | } while (i-- > 0); | ||
| 50 | } | ||
| 51 | |||
| 52 | void WelsI16x16LumaPredH_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) { | ||
| 53 | int32_t iStridex15 = (kiStride << 4) - kiStride; | ||
| 54 | int32_t iPredStride = 16; | ||
| 55 | int32_t iPredStridex15 = 240; //(iPredStride<<4)-iPredStride; | ||
| 56 | uint8_t i = 15; | ||
| 57 | |||
| 58 | do { | ||
| 59 | const uint8_t kuiSrc8 = pRef[iStridex15 - 1]; | ||
| 60 | const uint64_t kuiV64 = (uint64_t) (0x0101010101010101ULL * kuiSrc8); | ||
| 61 | ST64 (&pPred[iPredStridex15], kuiV64); | ||
| 62 | ST64 (&pPred[iPredStridex15 + 8], kuiV64); | ||
| 63 | |||
| 64 | iStridex15 -= kiStride; | ||
| 65 | iPredStridex15 -= iPredStride; | ||
| 66 | } while (i-- > 0); | ||
| 67 | } | ||
| 68 | |||
| 69 | WELSVP_NAMESPACE_END | ||
| @@ -38,14 +38,24 @@ · 37 unmodified lines | |||
| 38 | * | 38 | * |
| 39 | */ | 39 | */ |
| 40 | 40 | ||
| 41 | #ifndef WELSVP_SCENECHANGEDETECTIONCOMMON_H | 41 | #ifndef WELSVP_COMMON_H |
| 42 | #define WELSVP_SCENECHANGEDETECTIONCOMMON_H | 42 | #define WELSVP_COMMON_H |
| 43 | 43 | ||
| 44 | #include "util.h" | 44 | #include "util.h" |
| 45 | #include "memory.h" | 45 | #include "memory.h" |
| 46 | #include "WelsFrameWork.h" | 46 | #include "WelsFrameWork.h" |
| 47 | #include "IWelsVP.h" | 47 | #include "IWelsVP.h" |
| 48 | #include "sad_common.h" | 48 | #include "sad_common.h" |
| 49 | #include "intra_pred_common.h" | ||
| 50 | |||
| 51 | |||
| 52 | |||
| 53 | typedef void (GetIntraPred) (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride); | ||
| 54 | |||
| 55 | typedef GetIntraPred* GetIntraPredPtr; | ||
| 56 | |||
| 57 | GetIntraPred WelsI16x16LumaPredV_c; | ||
| 58 | GetIntraPred WelsI16x16LumaPredH_c; | ||
| 49 | 59 | ||
| 50 | WELSVP_NAMESPACE_BEGIN | 60 | WELSVP_NAMESPACE_BEGIN |
| 51 | 61 | ||
| @@ -56,12 +66,6 @@ typedef SadFunc* SadFuncPtr; · 4 unmodified lines | |||
| 56 | typedef int32_t (Sad16x16Func) (uint8_t* pSrcY, int32_t iSrcStrideY, uint8_t* pRefY, int32_t iRefStrideY); | 66 | typedef int32_t (Sad16x16Func) (uint8_t* pSrcY, int32_t iSrcStrideY, uint8_t* pRefY, int32_t iRefStrideY); |
| 57 | typedef Sad16x16Func* PSad16x16Func; | 67 | typedef Sad16x16Func* PSad16x16Func; |
| 58 | 68 | ||
| 59 | typedef void (GetIntraPred) (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride); | ||
| 60 | |||
| 61 | typedef GetIntraPred* GetIntraPredPtr; | ||
| 62 | |||
| 63 | GetIntraPred WelsI16x16LumaPredV_c; | ||
| 64 | GetIntraPred WelsI16x16LumaPredH_c; | ||
| 65 | 69 | ||
| 66 | #ifdef HAVE_NEON | 70 | #ifdef HAVE_NEON |
| 67 | WELSVP_EXTERN_C_BEGIN | 71 | WELSVP_EXTERN_C_BEGIN |
| @@ -33,10 +33,10 @@ · 32 unmodified lines | |||
| 33 | #include "ComplexityAnalysis.h" | 33 | #include "ComplexityAnalysis.h" |
| 34 | #include "cpu.h" | 34 | #include "cpu.h" |
| 35 | #include "macros.h" | 35 | #include "macros.h" |
| 36 | #include "intra_pred_common.h" | ||
| 36 | 37 | ||
| 37 | WELSVP_NAMESPACE_BEGIN | 38 | WELSVP_NAMESPACE_BEGIN |
| 38 | 39 | ||
| 39 | |||
| 40 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 40 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 41 | 41 | ||
| 42 | CComplexityAnalysis::CComplexityAnalysis (int32_t iCpuFlag) { | 42 | CComplexityAnalysis::CComplexityAnalysis (int32_t iCpuFlag) { |
| @@ -280,18 +280,26 @@ CComplexityAnalysisScreen::CComplexityAnalysisScreen (int32_t iCpuFlag) { · 237 unmodified lines | |||
| 280 | #ifdef X86_ASM | 280 | #ifdef X86_ASM |
| 281 | if (iCpuFlag & WELS_CPU_SSE2) { | 281 | if (iCpuFlag & WELS_CPU_SSE2) { |
| 282 | m_pSadFunc = WelsSampleSad16x16_sse2; | 282 | m_pSadFunc = WelsSampleSad16x16_sse2; |
| 283 | m_pIntraFunc[0] = WelsI16x16LumaPredV_sse2; | ||
| 284 | m_pIntraFunc[1] = WelsI16x16LumaPredH_sse2; | ||
| 285 | |||
| 283 | } | 286 | } |
| 284 | #endif | 287 | #endif |
| 285 | 288 | ||
| 286 | #if defined (HAVE_NEON) | 289 | #if defined (HAVE_NEON) |
| 287 | if (iCpuFlag & WELS_CPU_NEON) { | 290 | if (iCpuFlag & WELS_CPU_NEON) { |
| 288 | m_pSadFunc = WelsSampleSad16x16_neon; | 291 | m_pSadFunc = WelsSampleSad16x16_neon; |
| 292 | m_pIntraFunc[0] = WelsI16x16LumaPredV_neon; | ||
| 293 | m_pIntraFunc[1] = WelsI16x16LumaPredH_neon; | ||
| 294 | |||
| 289 | } | 295 | } |
| 290 | #endif | 296 | #endif |
| 291 | 297 | ||
| 292 | #if defined (HAVE_NEON_AARCH64) | 298 | #if defined (HAVE_NEON_AARCH64) |
| 293 | if (iCpuFlag & WELS_CPU_NEON) { | 299 | if (iCpuFlag & WELS_CPU_NEON) { |
| 294 | m_pSadFunc = WelsSampleSad16x16_AArch64_neon; | 300 | m_pSadFunc = WelsSampleSad16x16_AArch64_neon; |
| 301 | m_pIntraFunc[0] = WelsI16x16LumaPredV_AArch64_neon; | ||
| 302 | m_pIntraFunc[1] = WelsI16x16LumaPredH_AArch64_neon; | ||
| 295 | } | 303 | } |
| 296 | #endif | 304 | #endif |
| 297 | 305 | ||