Home | History | Annotate | Download | only in arm
      1 /******************************************************************************
      2  *
      3  * Copyright (C) 2015 The Android Open Source Project
      4  *
      5  * Licensed under the Apache License, Version 2.0 (the "License");
      6  * you may not use this file except in compliance with the License.
      7  * You may obtain a copy of the License at:
      8  *
      9  * http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  *
     17  *****************************************************************************
     18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
     19 */
     20 /**
     21 *******************************************************************************
     22 * @file
     23 *  ideint_function_selector.c
     24 *
     25 * @brief
     26 *  This file contains the function selector related code
     27 *
     28 * @author
     29 *  Ittiam
     30 *
     31 * @par List of Functions:
     32 * ih264e_init_function_ptr
     33 *
     34 * @remarks
     35 *  None
     36 *
     37 *******************************************************************************
     38 */
     39 /*****************************************************************************/
     40 /* File Includes                                                             */
     41 /*****************************************************************************/
     42 /* System include files */
     43 #include <stdio.h>
     44 #include <stdint.h>
     45 #include <string.h>
     46 #include <stdlib.h>
     47 #include <assert.h>
     48 
     49 
     50 /* User include files */
     51 #include "icv_datatypes.h"
     52 #include "icv_macros.h"
     53 #include "icv_platform_macros.h"
     54 #include "icv.h"
     55 #include "icv_variance.h"
     56 #include "icv_sad.h"
     57 #include "ideint.h"
     58 
     59 #include "ideint_defs.h"
     60 #include "ideint_structs.h"
     61 #include "ideint_utils.h"
     62 #include "ideint_cac.h"
     63 #include "ideint_debug.h"
     64 #include "ideint_function_selector.h"
     65 
     66 /**
     67 *******************************************************************************
     68 *
     69 * @brief
     70 *  Call corresponding function pointer initialization function
     71 *
     72 * @par Description
     73 *  Call corresponding function pointer initialization function
     74 *
     75 * @param[in] ps_ctxt
     76 *  Context
     77 *
     78 * @returns  none
     79 *
     80 * @remarks none
     81 *
     82 *******************************************************************************
     83 */
     84 void ideint_init_function_ptr(ctxt_t *ps_ctxt)
     85 {
     86     ideint_init_function_ptr_generic(ps_ctxt);
     87 
     88     switch(ps_ctxt->s_params.e_arch)
     89     {
     90 #if defined(ARMV8)
     91         default:
     92             ideint_init_function_ptr_av8(ps_ctxt);
     93             break;
     94 #elif !defined(DISABLE_NEON)
     95         case ICV_ARM_NONEON:
     96             break;
     97         case ICV_ARM_A5:
     98         case ICV_ARM_A7:
     99         case ICV_ARM_A9:
    100         case ICV_ARM_A15:
    101         case ICV_ARM_A9Q:
    102         default:
    103             ideint_init_function_ptr_a9(ps_ctxt);
    104             break;
    105 #else
    106         default:
    107             break;
    108 #endif
    109     }
    110 
    111 }
    112 
    113 /**
    114 *******************************************************************************
    115 *
    116 * @brief Determine the architecture of the encoder executing environment
    117 *
    118 * @par Description: This routine returns the architecture of the enviro-
    119 * ment in which the current encoder is being tested
    120 *
    121 * @param[in] void
    122 *
    123 * @returns  IV_ARCH_T
    124 *  architecture
    125 *
    126 * @remarks none
    127 *
    128 *******************************************************************************
    129 */
    130 ICV_ARCH_T ideint_default_arch(void)
    131 {
    132     return ICV_ARM_A9Q;
    133 }
    134 
    135