Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 12 files). Show all
Unified · Split
| @@ -146,7 +146,14 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx) { · 145 unmodified lines | ||
| 146 | 146 | |
| 147 | 147 | #if defined(X86_ASM) |
| 148 | 148 | pCtx->uiCpuFlag = WelsCPUFeatureDetect (&iCpuCores); |
| 149 | −#endif//X86_ASM | |
| 149 | +#elif defined(HAVE_NEON) | |
| 150 | +#if defined(ANDROID_NDK) | |
| 151 | + pCtx->uiCpuFlag = WelsCPUFeatureDetectAndroid(); | |
| 152 | +#endif | |
| 153 | +#if defined(APPLE_IOS) | |
| 154 | + pCtx->uiCpuFlag = WelsCPUFeatureDetectIOS(); | |
| 155 | +#endif | |
| 156 | +#endif | |
| 150 | 157 | |
| 151 | 158 | pCtx->iImgWidthInPixel = 0; |
| 152 | 159 | pCtx->iImgHeightInPixel = 0; // alloc picture data when picture size is available |
| @@ -657,26 +664,28 @@ void AssignFuncPointerForRec (PWelsDecoderContext pCtx) { · 504 unmodified lines | ||
| 657 | 664 | pCtx->pIdctResAddPredFunc = IdctResAddPred_c; |
| 658 | 665 | |
| 659 | 666 | #if defined(HAVE_NEON) |
| 660 | − pCtx->pIdctResAddPredFunc = IdctResAddPred_neon; | |
| 667 | + if ( pCtx->uiCpuFlag & WELS_CPU_NEON ) { | |
| 668 | + pCtx->pIdctResAddPredFunc = IdctResAddPred_neon; | |
| 661 | 669 | |
| 662 | − pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC] = WelsDecoderI16x16LumaPredDc_neon; | |
| 663 | − pCtx->pGetI16x16LumaPredFunc[I16_PRED_P] = WelsDecoderI16x16LumaPredPlane_neon; | |
| 664 | − pCtx->pGetI16x16LumaPredFunc[I16_PRED_H] = WelsDecoderI16x16LumaPredH_neon; | |
| 665 | − pCtx->pGetI16x16LumaPredFunc[I16_PRED_V] = WelsDecoderI16x16LumaPredV_neon; | |
| 670 | + pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC] = WelsDecoderI16x16LumaPredDc_neon; | |
| 671 | + pCtx->pGetI16x16LumaPredFunc[I16_PRED_P] = WelsDecoderI16x16LumaPredPlane_neon; | |
| 672 | + pCtx->pGetI16x16LumaPredFunc[I16_PRED_H] = WelsDecoderI16x16LumaPredH_neon; | |
| 673 | + pCtx->pGetI16x16LumaPredFunc[I16_PRED_V] = WelsDecoderI16x16LumaPredV_neon; | |
| 666 | 674 | |
| 667 | − pCtx->pGetI4x4LumaPredFunc[I4_PRED_V ] = WelsDecoderI4x4LumaPredV_neon; | |
| 668 | − pCtx->pGetI4x4LumaPredFunc[I4_PRED_H ] = WelsDecoderI4x4LumaPredH_neon; | |
| 669 | − pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL ] = WelsDecoderI4x4LumaPredDDL_neon; | |
| 670 | − pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDR ] = WelsDecoderI4x4LumaPredDDR_neon; | |
| 671 | − pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL ] = WelsDecoderI4x4LumaPredVL_neon; | |
| 672 | − pCtx->pGetI4x4LumaPredFunc[I4_PRED_VR ] = WelsDecoderI4x4LumaPredVR_neon; | |
| 673 | − pCtx->pGetI4x4LumaPredFunc[I4_PRED_HU ] = WelsDecoderI4x4LumaPredHU_neon; | |
| 674 | − pCtx->pGetI4x4LumaPredFunc[I4_PRED_HD ] = WelsDecoderI4x4LumaPredHD_neon; | |
| 675 | + pCtx->pGetI4x4LumaPredFunc[I4_PRED_V ] = WelsDecoderI4x4LumaPredV_neon; | |
| 676 | + pCtx->pGetI4x4LumaPredFunc[I4_PRED_H ] = WelsDecoderI4x4LumaPredH_neon; | |
| 677 | + pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL ] = WelsDecoderI4x4LumaPredDDL_neon; | |
| 678 | + pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDR ] = WelsDecoderI4x4LumaPredDDR_neon; | |
| 679 | + pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL ] = WelsDecoderI4x4LumaPredVL_neon; | |
| 680 | + pCtx->pGetI4x4LumaPredFunc[I4_PRED_VR ] = WelsDecoderI4x4LumaPredVR_neon; | |
| 681 | + pCtx->pGetI4x4LumaPredFunc[I4_PRED_HU ] = WelsDecoderI4x4LumaPredHU_neon; | |
| 682 | + pCtx->pGetI4x4LumaPredFunc[I4_PRED_HD ] = WelsDecoderI4x4LumaPredHD_neon; | |
| 675 | 683 | |
| 676 | − pCtx->pGetIChromaPredFunc[C_PRED_H] = WelsDecoderIChromaPredH_neon; | |
| 677 | − pCtx->pGetIChromaPredFunc[C_PRED_V] = WelsDecoderIChromaPredV_neon; | |
| 678 | − pCtx->pGetIChromaPredFunc[C_PRED_P ] = WelsDecoderIChromaPredPlane_neon; | |
| 679 | − pCtx->pGetIChromaPredFunc[C_PRED_DC] = WelsDecoderIChromaPredDC_neon; | |
| 684 | + pCtx->pGetIChromaPredFunc[C_PRED_H] = WelsDecoderIChromaPredH_neon; | |
| 685 | + pCtx->pGetIChromaPredFunc[C_PRED_V] = WelsDecoderIChromaPredV_neon; | |
| 686 | + pCtx->pGetIChromaPredFunc[C_PRED_P ] = WelsDecoderIChromaPredPlane_neon; | |
| 687 | + pCtx->pGetIChromaPredFunc[C_PRED_DC] = WelsDecoderIChromaPredDC_neon; | |
| 688 | + } | |
| 680 | 689 | #endif//HAVE_NEON |
| 681 | 690 | |
| 682 | 691 | |