History

Remove deblocking arm asm code to common folder, add cpu detect for arm, clean some code.

Licai Guo committed 12 years ago

Commit b7a25df1 parent 0fd9db212 files · +127 −801Browse files

Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 12 files). Show all

Unified · Split

codec/decoder/core/src/decoder.cpp+27−18
@@ -146,7 +146,14 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx) { · 145 unmodified lines
146 146
147#if defined(X86_ASM)147#if defined(X86_ASM)
148 pCtx->uiCpuFlag = WelsCPUFeatureDetect (&iCpuCores);148 pCtx->uiCpuFlag = WelsCPUFeatureDetect (&iCpuCores);
149#endif//X86_ASM149#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 pCtx->iImgWidthInPixel = 0;158 pCtx->iImgWidthInPixel = 0;
152 pCtx->iImgHeightInPixel = 0; // alloc picture data when picture size is available159 pCtx->iImgHeightInPixel = 0; // alloc picture data when picture size is available
@@ -657,26 +664,28 @@ void AssignFuncPointerForRec (PWelsDecoderContext pCtx) { · 504 unmodified lines
657 pCtx->pIdctResAddPredFunc = IdctResAddPred_c;664 pCtx->pIdctResAddPredFunc = IdctResAddPred_c;
658 665
659#if defined(HAVE_NEON)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;670 pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC] = WelsDecoderI16x16LumaPredDc_neon;
663 pCtx->pGetI16x16LumaPredFunc[I16_PRED_P] = WelsDecoderI16x16LumaPredPlane_neon;671 pCtx->pGetI16x16LumaPredFunc[I16_PRED_P] = WelsDecoderI16x16LumaPredPlane_neon;
664 pCtx->pGetI16x16LumaPredFunc[I16_PRED_H] = WelsDecoderI16x16LumaPredH_neon;672 pCtx->pGetI16x16LumaPredFunc[I16_PRED_H] = WelsDecoderI16x16LumaPredH_neon;
665 pCtx->pGetI16x16LumaPredFunc[I16_PRED_V] = WelsDecoderI16x16LumaPredV_neon;673 pCtx->pGetI16x16LumaPredFunc[I16_PRED_V] = WelsDecoderI16x16LumaPredV_neon;
666 674
667 pCtx->pGetI4x4LumaPredFunc[I4_PRED_V ] = WelsDecoderI4x4LumaPredV_neon;675 pCtx->pGetI4x4LumaPredFunc[I4_PRED_V ] = WelsDecoderI4x4LumaPredV_neon;
668 pCtx->pGetI4x4LumaPredFunc[I4_PRED_H ] = WelsDecoderI4x4LumaPredH_neon;676 pCtx->pGetI4x4LumaPredFunc[I4_PRED_H ] = WelsDecoderI4x4LumaPredH_neon;
669 pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL ] = WelsDecoderI4x4LumaPredDDL_neon;677 pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL ] = WelsDecoderI4x4LumaPredDDL_neon;
670 pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDR ] = WelsDecoderI4x4LumaPredDDR_neon;678 pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDR ] = WelsDecoderI4x4LumaPredDDR_neon;
671 pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL ] = WelsDecoderI4x4LumaPredVL_neon;679 pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL ] = WelsDecoderI4x4LumaPredVL_neon;
672 pCtx->pGetI4x4LumaPredFunc[I4_PRED_VR ] = WelsDecoderI4x4LumaPredVR_neon;680 pCtx->pGetI4x4LumaPredFunc[I4_PRED_VR ] = WelsDecoderI4x4LumaPredVR_neon;
673 pCtx->pGetI4x4LumaPredFunc[I4_PRED_HU ] = WelsDecoderI4x4LumaPredHU_neon;681 pCtx->pGetI4x4LumaPredFunc[I4_PRED_HU ] = WelsDecoderI4x4LumaPredHU_neon;
674 pCtx->pGetI4x4LumaPredFunc[I4_PRED_HD ] = WelsDecoderI4x4LumaPredHD_neon;682 pCtx->pGetI4x4LumaPredFunc[I4_PRED_HD ] = WelsDecoderI4x4LumaPredHD_neon;
675 683
676 pCtx->pGetIChromaPredFunc[C_PRED_H] = WelsDecoderIChromaPredH_neon;684 pCtx->pGetIChromaPredFunc[C_PRED_H] = WelsDecoderIChromaPredH_neon;
677 pCtx->pGetIChromaPredFunc[C_PRED_V] = WelsDecoderIChromaPredV_neon;685 pCtx->pGetIChromaPredFunc[C_PRED_V] = WelsDecoderIChromaPredV_neon;
678 pCtx->pGetIChromaPredFunc[C_PRED_P ] = WelsDecoderIChromaPredPlane_neon;686 pCtx->pGetIChromaPredFunc[C_PRED_P ] = WelsDecoderIChromaPredPlane_neon;
679 pCtx->pGetIChromaPredFunc[C_PRED_DC] = WelsDecoderIChromaPredDC_neon;687 pCtx->pGetIChromaPredFunc[C_PRED_DC] = WelsDecoderIChromaPredDC_neon;
688 }
680#endif//HAVE_NEON689#endif//HAVE_NEON
681 690
682 691

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t