• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright (C) 2022 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 *  isvc_mem_fns.h
24 *
25 * @brief
26 *  Function declarations used for memory functions
27 *
28 * @author
29 *  Ittiam
30 *
31 * @remarks
32 *  None
33 *
34 *******************************************************************************
35 */
36 #ifndef _ISVC_MEM_FNS_H_
37 #define _ISVC_MEM_FNS_H_
38 
39 #include "ih264_typedefs.h"
40 
41 typedef void *FT_MEM_ALLOC(UWORD32 u4_size);
42 
43 typedef void FT_MEM_FREE(void *pv_mem);
44 
45 typedef void FT_MEMCPY(UWORD8 *pu1_dst, UWORD8 *pu1_src, UWORD32 num_bytes);
46 
47 typedef void FT_COPY_2D(UWORD8 *pu1_dst, WORD32 i4_dst_stride, UWORD8 *pu1_src,
48                         WORD32 i4_src_stride, WORD32 i4_blk_wd, WORD32 i4_blk_ht);
49 
50 typedef void FT_MEMSET_2D(UWORD8 *pu1_dst, WORD32 i4_dst_stride, UWORD8 u1_val, WORD32 i4_blk_wd,
51                           WORD32 i4_blk_ht);
52 
53 typedef void FT_MEMSET(UWORD8 *pu1_dst, UWORD8 value, UWORD32 num_bytes);
54 
55 typedef void FT_MEMSET_16BIT(UWORD16 *pu2_dst, UWORD16 value, UWORD32 num_words);
56 
57 typedef void FT_16BIT_INTERLEAVED_COPY(WORD16 *pi2_src, WORD16 *pi2_dst, WORD32 src_strd,
58                                        WORD32 dst_strd, WORD32 ht, WORD32 wd);
59 
60 typedef void FT_16BIT_INTERLEAVED_MEMSET(WORD16 *pi2_src, WORD32 i4_src_strd, WORD16 i2_value,
61                                          WORD32 i4_wd, WORD32 i4_ht);
62 
63 typedef UWORD8 FT_NONZERO_CHECKER(UWORD8 *pu1_data, WORD32 i4_data_strd, UWORD32 u4_wd,
64                                   UWORD32 u4_ht);
65 
66 /* C function declarations */
67 extern FT_MEMCPY ih264_memcpy;
68 extern FT_MEMCPY ih264_memcpy_mul_8;
69 extern FT_MEMSET ih264_memset;
70 extern FT_MEMSET ih264_memset_mul_8;
71 extern FT_MEMSET_16BIT ih264_memset_16bit;
72 extern FT_MEMSET_16BIT ih264_memset_16bit_mul_8;
73 extern FT_COPY_2D isvc_copy_2d;
74 extern FT_MEMSET_2D isvc_memset_2d;
75 extern FT_16BIT_INTERLEAVED_COPY isvc_16bit_interleaved_copy;
76 extern FT_16BIT_INTERLEAVED_MEMSET isvc_16bit_interleaved_memset;
77 extern FT_NONZERO_CHECKER isvc_is_nonzero_blk;
78 extern FT_MEM_ALLOC isvc_memory_alloc;
79 extern FT_MEM_FREE isvc_memory_free;
80 
81 /* A9 Q function declarations */
82 extern FT_MEMCPY isvc_memcpy_a9q;
83 extern FT_MEMCPY ih264_memcpy_mul_8_a9q;
84 extern FT_MEMSET ih264_memset_a9q;
85 extern FT_MEMSET ih264_memset_mul_8_a9q;
86 extern FT_MEMSET_16BIT ih264_memset_16bit_a9q;
87 extern FT_MEMSET_16BIT ih264_memset_16bit_mul_8_a9q;
88 
89 /* AV8 function declarations */
90 extern FT_MEMCPY ih264_memcpy_av8;
91 extern FT_MEMCPY ih264_memcpy_mul_8_av8;
92 extern FT_MEMSET ih264_memset_av8;
93 extern FT_MEMSET ih264_memset_mul_8_av8;
94 extern FT_MEMSET_16BIT ih264_memset_16bit_av8;
95 extern FT_MEMSET_16BIT ih264_memset_16bit_mul_8_av8;
96 
97 /* NEON function declarations */
98 extern FT_MEMSET_2D isvc_memset_2d_neon;
99 
100 /* SSSE3 variants */
101 extern FT_MEMCPY ih264_memcpy_mul_8_ssse3;
102 extern FT_MEMSET ih264_memset_mul_8_ssse3;
103 extern FT_MEMSET_16BIT ih264_memset_16bit_mul_8_ssse3;
104 extern FT_COPY_2D isvc_copy_2d_ssse3;
105 
106 /* SSE4.2 variants */
107 extern FT_MEMSET_2D isvc_memset_2d_sse42;
108 
109 #endif
110