xref: /aosp_15_r20/external/libhevc/decoder/riscv64/ihevcd_function_selector.c (revision c83a76b084498d55f252f48b2e3786804cdf24b7)
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 
ihevcd_init_function_ptr(void * pv_codec)61 void ihevcd_init_function_ptr(void *pv_codec)
62 {
63     codec_t *ps_codec = (codec_t *)pv_codec;
64     switch(ps_codec->e_processor_arch)
65     {
66         default:
67         case ARCH_RISCV64_GENERIC:
68             ihevcd_init_function_ptr_generic(pv_codec);
69     }
70 }
71 
ihevcd_init_arch(void * pv_codec)72 void ihevcd_init_arch(void *pv_codec)
73 {
74     codec_t *ps_codec = (codec_t *)pv_codec;
75     ps_codec->e_processor_arch = ARCH_RISCV64_GENERIC;
76 }
77