| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 
| 3  * | 3  * | 
| 4  *  Use of this source code is governed by a BSD-style license | 4  *  Use of this source code is governed by a BSD-style license | 
| 5  *  that can be found in the LICENSE file in the root of the source | 5  *  that can be found in the LICENSE file in the root of the source | 
| 6  *  tree. An additional intellectual property rights grant can be found | 6  *  tree. An additional intellectual property rights grant can be found | 
| 7  *  in the file PATENTS.  All contributing project authors may | 7  *  in the file PATENTS.  All contributing project authors may | 
| 8  *  be found in the AUTHORS file in the root of the source tree. | 8  *  be found in the AUTHORS file in the root of the source tree. | 
| 9  */ | 9  */ | 
| 10 | 10 | 
| 11 | 11 | 
| 12 #include "vpx_ports/config.h" | 12 #include "vpx_ports/config.h" | 
| 13 #include "vpx_ports/arm.h" | 13 #include "vpx_ports/arm.h" | 
| 14 #include "vp8/common/g_common.h" | 14 #include "vp8/common/g_common.h" | 
| 15 #include "vp8/common/pragmas.h" | 15 #include "vp8/common/pragmas.h" | 
| 16 #include "vp8/common/subpixel.h" | 16 #include "vp8/common/subpixel.h" | 
| 17 #include "vp8/common/loopfilter.h" | 17 #include "vp8/common/loopfilter.h" | 
| 18 #include "vp8/common/recon.h" | 18 #include "vp8/common/recon.h" | 
| 19 #include "vp8/common/idct.h" | 19 #include "vp8/common/idct.h" | 
| 20 #include "vp8/common/onyxc_int.h" | 20 #include "vp8/common/onyxc_int.h" | 
| 21 | 21 | 
| 22 void vp8_arch_arm_common_init(VP8_COMMON *ctx) | 22 void vp8_arch_arm_common_init(VP8_COMMON *ctx) | 
| 23 { | 23 { | 
| 24 #if CONFIG_RUNTIME_CPU_DETECT | 24 #if CONFIG_RUNTIME_CPU_DETECT | 
| 25     VP8_COMMON_RTCD *rtcd = &ctx->rtcd; | 25     VP8_COMMON_RTCD *rtcd = &ctx->rtcd; | 
| 26     int flags = arm_cpu_caps(); | 26     int flags = arm_cpu_caps(); | 
| 27     int has_edsp = flags & HAS_EDSP; |  | 
| 28     int has_media = flags & HAS_MEDIA; |  | 
| 29     int has_neon = flags & HAS_NEON; |  | 
| 30     rtcd->flags = flags; | 27     rtcd->flags = flags; | 
| 31 | 28 | 
| 32     /* Override default functions with fastest ones for this CPU. */ | 29     /* Override default functions with fastest ones for this CPU. */ | 
|  | 30 #if HAVE_ARMV5TE | 
|  | 31     if (flags & HAS_EDSP) | 
|  | 32     { | 
|  | 33     } | 
|  | 34 #endif | 
|  | 35 | 
| 33 #if HAVE_ARMV6 | 36 #if HAVE_ARMV6 | 
| 34     if (has_media) | 37     if (flags & HAS_MEDIA) | 
| 35     { | 38     { | 
| 36         rtcd->subpix.sixtap16x16   = vp8_sixtap_predict16x16_armv6; | 39         rtcd->subpix.sixtap16x16   = vp8_sixtap_predict16x16_armv6; | 
| 37         rtcd->subpix.sixtap8x8     = vp8_sixtap_predict8x8_armv6; | 40         rtcd->subpix.sixtap8x8     = vp8_sixtap_predict8x8_armv6; | 
| 38         rtcd->subpix.sixtap8x4     = vp8_sixtap_predict8x4_armv6; | 41         rtcd->subpix.sixtap8x4     = vp8_sixtap_predict8x4_armv6; | 
| 39         rtcd->subpix.sixtap4x4     = vp8_sixtap_predict_armv6; | 42         rtcd->subpix.sixtap4x4     = vp8_sixtap_predict_armv6; | 
| 40         rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_armv6; | 43         rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_armv6; | 
| 41         rtcd->subpix.bilinear8x8   = vp8_bilinear_predict8x8_armv6; | 44         rtcd->subpix.bilinear8x8   = vp8_bilinear_predict8x8_armv6; | 
| 42         rtcd->subpix.bilinear8x4   = vp8_bilinear_predict8x4_armv6; | 45         rtcd->subpix.bilinear8x4   = vp8_bilinear_predict8x4_armv6; | 
| 43         rtcd->subpix.bilinear4x4   = vp8_bilinear_predict4x4_armv6; | 46         rtcd->subpix.bilinear4x4   = vp8_bilinear_predict4x4_armv6; | 
| 44 | 47 | 
| 45         rtcd->idct.idct1        = vp8_short_idct4x4llm_1_v6; | 48         rtcd->idct.idct1        = vp8_short_idct4x4llm_1_v6; | 
| 46         rtcd->idct.idct16       = vp8_short_idct4x4llm_v6_dual; | 49         rtcd->idct.idct16       = vp8_short_idct4x4llm_v6_dual; | 
| 47         rtcd->idct.iwalsh1      = vp8_short_inv_walsh4x4_1_v6; | 50         rtcd->idct.iwalsh1      = vp8_short_inv_walsh4x4_1_v6; | 
| 48         rtcd->idct.iwalsh16     = vp8_short_inv_walsh4x4_v6; | 51         rtcd->idct.iwalsh16     = vp8_short_inv_walsh4x4_v6; | 
| 49 | 52 | 
| 50         rtcd->loopfilter.normal_mb_v = vp8_loop_filter_mbv_armv6; | 53         rtcd->loopfilter.normal_mb_v = vp8_loop_filter_mbv_armv6; | 
| 51         rtcd->loopfilter.normal_b_v  = vp8_loop_filter_bv_armv6; | 54         rtcd->loopfilter.normal_b_v  = vp8_loop_filter_bv_armv6; | 
| 52         rtcd->loopfilter.normal_mb_h = vp8_loop_filter_mbh_armv6; | 55         rtcd->loopfilter.normal_mb_h = vp8_loop_filter_mbh_armv6; | 
| 53         rtcd->loopfilter.normal_b_h  = vp8_loop_filter_bh_armv6; | 56         rtcd->loopfilter.normal_b_h  = vp8_loop_filter_bh_armv6; | 
| 54         rtcd->loopfilter.simple_mb_v = vp8_loop_filter_mbvs_armv6; | 57         rtcd->loopfilter.simple_mb_v = | 
|  | 58                 vp8_loop_filter_simple_vertical_edge_armv6; | 
| 55         rtcd->loopfilter.simple_b_v  = vp8_loop_filter_bvs_armv6; | 59         rtcd->loopfilter.simple_b_v  = vp8_loop_filter_bvs_armv6; | 
| 56         rtcd->loopfilter.simple_mb_h = vp8_loop_filter_mbhs_armv6; | 60         rtcd->loopfilter.simple_mb_h = | 
|  | 61                 vp8_loop_filter_simple_horizontal_edge_armv6; | 
| 57         rtcd->loopfilter.simple_b_h  = vp8_loop_filter_bhs_armv6; | 62         rtcd->loopfilter.simple_b_h  = vp8_loop_filter_bhs_armv6; | 
| 58 | 63 | 
| 59         rtcd->recon.copy16x16   = vp8_copy_mem16x16_v6; | 64         rtcd->recon.copy16x16   = vp8_copy_mem16x16_v6; | 
| 60         rtcd->recon.copy8x8     = vp8_copy_mem8x8_v6; | 65         rtcd->recon.copy8x8     = vp8_copy_mem8x8_v6; | 
| 61         rtcd->recon.copy8x4     = vp8_copy_mem8x4_v6; | 66         rtcd->recon.copy8x4     = vp8_copy_mem8x4_v6; | 
| 62         rtcd->recon.recon       = vp8_recon_b_armv6; | 67         rtcd->recon.recon       = vp8_recon_b_armv6; | 
| 63         rtcd->recon.recon2      = vp8_recon2b_armv6; | 68         rtcd->recon.recon2      = vp8_recon2b_armv6; | 
| 64         rtcd->recon.recon4      = vp8_recon4b_armv6; | 69         rtcd->recon.recon4      = vp8_recon4b_armv6; | 
| 65     } | 70     } | 
| 66 #endif | 71 #endif | 
| 67 | 72 | 
| 68 #if HAVE_ARMV7 | 73 #if HAVE_ARMV7 | 
| 69     if (has_neon) | 74     if (flags & HAS_NEON) | 
| 70     { | 75     { | 
| 71         rtcd->subpix.sixtap16x16   = vp8_sixtap_predict16x16_neon; | 76         rtcd->subpix.sixtap16x16   = vp8_sixtap_predict16x16_neon; | 
| 72         rtcd->subpix.sixtap8x8     = vp8_sixtap_predict8x8_neon; | 77         rtcd->subpix.sixtap8x8     = vp8_sixtap_predict8x8_neon; | 
| 73         rtcd->subpix.sixtap8x4     = vp8_sixtap_predict8x4_neon; | 78         rtcd->subpix.sixtap8x4     = vp8_sixtap_predict8x4_neon; | 
| 74         rtcd->subpix.sixtap4x4     = vp8_sixtap_predict_neon; | 79         rtcd->subpix.sixtap4x4     = vp8_sixtap_predict_neon; | 
| 75         rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_neon; | 80         rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_neon; | 
| 76         rtcd->subpix.bilinear8x8   = vp8_bilinear_predict8x8_neon; | 81         rtcd->subpix.bilinear8x8   = vp8_bilinear_predict8x8_neon; | 
| 77         rtcd->subpix.bilinear8x4   = vp8_bilinear_predict8x4_neon; | 82         rtcd->subpix.bilinear8x4   = vp8_bilinear_predict8x4_neon; | 
| 78         rtcd->subpix.bilinear4x4   = vp8_bilinear_predict4x4_neon; | 83         rtcd->subpix.bilinear4x4   = vp8_bilinear_predict4x4_neon; | 
| 79 | 84 | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 100         rtcd->recon.recon_mb    = vp8_recon_mb_neon; | 105         rtcd->recon.recon_mb    = vp8_recon_mb_neon; | 
| 101         rtcd->recon.build_intra_predictors_mby = | 106         rtcd->recon.build_intra_predictors_mby = | 
| 102             vp8_build_intra_predictors_mby_neon; | 107             vp8_build_intra_predictors_mby_neon; | 
| 103         rtcd->recon.build_intra_predictors_mby_s = | 108         rtcd->recon.build_intra_predictors_mby_s = | 
| 104             vp8_build_intra_predictors_mby_s_neon; | 109             vp8_build_intra_predictors_mby_s_neon; | 
| 105     } | 110     } | 
| 106 #endif | 111 #endif | 
| 107 | 112 | 
| 108 #endif | 113 #endif | 
| 109 } | 114 } | 
| OLD | NEW | 
|---|