• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2 *
3 * Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore
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 /**
19 *******************************************************************************
20 * @file
21 *  ihevcd_function_selector.c
22 *
23 * @brief
24 *  Contains functions to initialize function pointers used in hevc
25 *
26 * @author
27 *  Naveen
28 *
29 * @par List of Functions:
30 * @remarks
31 *  None
32 *
33 *******************************************************************************
34 */
35 /*****************************************************************************/
36 /* File Includes                                                             */
37 /*****************************************************************************/
38 #include <stdio.h>
39 #include <stddef.h>
40 #include <stdlib.h>
41 #include <string.h>
42 
43 #include "ihevc_typedefs.h"
44 #include "iv.h"
45 #include "ivd.h"
46 #include "ihevc_defs.h"
47 #include "ihevc_debug.h"
48 #include "ihevc_structs.h"
49 #include "ihevc_macros.h"
50 #include "ihevc_platform_macros.h"
51 #include "ihevc_cabac_tables.h"
52 #include "ihevc_disp_mgr.h"
53 #include "ihevc_buf_mgr.h"
54 #include "ihevc_dpb_mgr.h"
55 #include "ihevc_error.h"
56 
57 #include "ihevcd_defs.h"
58 #include "ihevcd_function_selector.h"
59 #include "ihevcd_structs.h"
60 
61 void ihevcd_init_function_ptr_mips_generic(codec_t *ps_codec);
62 void ihevcd_init_function_ptr_mips_32(codec_t *ps_codec);
63 
ihevcd_init_function_ptr(void * pv_codec)64 void ihevcd_init_function_ptr(void *pv_codec)
65 {
66     codec_t *ps_codec = (codec_t *)pv_codec;
67     switch(ps_codec->e_processor_arch)
68     {
69 #if ENABLE_MIPS32_SIMD
70         case ARCH_MIPS_32:
71             ihevcd_init_function_ptr_mips_32(ps_codec);
72             break;
73 #endif
74         case ARCH_MIPS_GENERIC:
75         default:
76             ihevcd_init_function_ptr_mips_generic(ps_codec);
77             break;
78     }
79 }
80 
ihevcd_init_arch(void * pv_codec)81 void ihevcd_init_arch(void *pv_codec)
82 {
83     codec_t *ps_codec = (codec_t *)pv_codec;
84     ps_codec->e_processor_arch = ARCH_MIPS_32;
85 }
86