/src/libmpeg2/common/x86/impeg2_platform_macros.h
Line | Count | Source |
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 | | #ifndef __IMPEG2_PLATFORM_MACROS_H__ |
21 | | #define __IMPEG2_PLATFORM_MACROS_H__ |
22 | | |
23 | | |
24 | 107M | #define CONV_LE_TO_BE(u4_temp2,u4_temp1) u4_temp2 = __builtin_bswap32(u4_temp1); |
25 | | |
26 | | static __inline UWORD32 CLZ(UWORD32 u4_word) |
27 | 28.8M | { |
28 | 28.8M | if(u4_word) |
29 | 28.8M | return (__builtin_clz(u4_word)); |
30 | 18.4E | else |
31 | 18.4E | return 32; |
32 | 28.8M | } Unexecuted instantiation: impeg2d_api_main.c:CLZ Unexecuted instantiation: impeg2d_decoder.c:CLZ Unexecuted instantiation: impeg2d_pic_proc.c:CLZ Unexecuted instantiation: impeg2d_pnb_pic.c:CLZ Line | Count | Source | 27 | 28.8M | { | 28 | 28.8M | if(u4_word) | 29 | 28.8M | return (__builtin_clz(u4_word)); | 30 | 18.4E | else | 31 | 18.4E | return 32; | 32 | 28.8M | } |
Unexecuted instantiation: impeg2d_deinterlace.c:CLZ Unexecuted instantiation: impeg2d_function_selector.c:CLZ Unexecuted instantiation: impeg2d_function_selector_sse42.c:CLZ Unexecuted instantiation: impeg2d_function_selector_ssse3.c:CLZ Unexecuted instantiation: impeg2_globals.c:CLZ Unexecuted instantiation: impeg2_idct.c:CLZ Unexecuted instantiation: impeg2d_bitstream.c:CLZ Unexecuted instantiation: impeg2d_dec_hdr.c:CLZ Unexecuted instantiation: impeg2d_d_pic.c:CLZ Unexecuted instantiation: impeg2d_function_selector_generic.c:CLZ Unexecuted instantiation: impeg2d_globals.c:CLZ Unexecuted instantiation: impeg2d_i_pic.c:CLZ Unexecuted instantiation: impeg2d_mc.c:CLZ Unexecuted instantiation: impeg2d_mv_dec.c:CLZ Unexecuted instantiation: impeg2_format_conv.c:CLZ Unexecuted instantiation: impeg2_inter_pred.c:CLZ |
33 | | |
34 | | |
35 | 831M | #define CLIP_U8(x) ((x) > 255) ? (255) : (((x) < 0) ? (0) : (x)) |
36 | | #define CLIP_S8(x) ((x) > 127) ? (127) : (((x) < -128) ? (-128) : (x)) |
37 | | |
38 | | #define CLIP_U12(x) ((x) > 4095) ? (4095) : (((x) < 0) ? (0) : (x)) |
39 | 24.8M | #define CLIP_S12(x) ((x) > 2047) ? (2047) : (((x) < -2048) ? (-2048) : (x)) |
40 | | |
41 | | #define CLIP_U16(x) ((x) > 65535) ? (65535) : (((x) < 0) ? (0) : (x)) |
42 | 695M | #define CLIP_S16(x) ((x) > 32767) ? (32767) : (((x) < -32768) ? (-32768) : (x)) |
43 | | #define PLD(x) |
44 | | |
45 | | #endif /* __IMPEG2_PLATFORM_MACROS_H__ */ |