1 /************************************************************************** 2 * 3 * Copyright 2010 VMware, Inc. 4 * All Rights Reserved. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the 8 * "Software"), to deal in the Software without restriction, including 9 * without limitation the rights to use, copy, modify, merge, publish, 10 * distribute, sub license, and/or sell copies of the Software, and to 11 * permit persons to whom the Software is furnished to do so, subject to 12 * the following conditions: 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 17 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, 18 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 19 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 20 * USE OR OTHER DEALINGS IN THE SOFTWARE. 21 * 22 * The above copyright notice and this permission notice (including the 23 * next paragraph) shall be included in all copies or substantial portions 24 * of the Software. 25 * 26 **************************************************************************/ 27 28 29 #ifndef U_FORMAT_BPTC_H_ 30 #define U_FORMAT_BPTC_H_ 31 32 33 #include "pipe/p_compiler.h" 34 35 #include "c99_compat.h" 36 37 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 void 42 util_format_bptc_rgba_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, 43 const uint8_t *restrict src_row, unsigned src_stride, 44 unsigned width, unsigned height); 45 void 46 util_format_bptc_rgba_unorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, 47 const uint8_t *restrict src_row, unsigned src_stride, 48 unsigned width, unsigned height); 49 void 50 util_format_bptc_rgba_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, 51 const uint8_t *restrict src_row, unsigned src_stride, 52 unsigned width, unsigned height); 53 void 54 util_format_bptc_rgba_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, 55 const float *restrict src_row, unsigned src_stride, 56 unsigned width, unsigned height); 57 void 58 util_format_bptc_rgba_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, 59 unsigned width, unsigned height); 60 61 void 62 util_format_bptc_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, 63 const uint8_t *restrict src_row, unsigned src_stride, 64 unsigned width, unsigned height); 65 void 66 util_format_bptc_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, 67 const uint8_t *restrict src_row, unsigned src_stride, 68 unsigned width, unsigned height); 69 void 70 util_format_bptc_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, 71 const uint8_t *restrict src_row, unsigned src_stride, 72 unsigned width, unsigned height); 73 void 74 util_format_bptc_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, 75 const float *restrict src_row, unsigned src_stride, 76 unsigned width, unsigned height); 77 void 78 util_format_bptc_srgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, 79 unsigned width, unsigned height); 80 81 void 82 util_format_bptc_rgb_float_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, 83 const uint8_t *restrict src_row, unsigned src_stride, 84 unsigned width, unsigned height); 85 void 86 util_format_bptc_rgb_float_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, 87 const uint8_t *restrict src_row, unsigned src_stride, 88 unsigned width, unsigned height); 89 void 90 util_format_bptc_rgb_float_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, 91 const uint8_t *restrict src_row, unsigned src_stride, 92 unsigned width, unsigned height); 93 void 94 util_format_bptc_rgb_float_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, 95 const float *restrict src_row, unsigned src_stride, 96 unsigned width, unsigned height); 97 void 98 util_format_bptc_rgb_float_fetch_rgba(void *restrict dst, const uint8_t *restrict src, 99 unsigned width, unsigned height); 100 101 void 102 util_format_bptc_rgb_ufloat_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, 103 const uint8_t *restrict src_row, unsigned src_stride, 104 unsigned width, unsigned height); 105 void 106 util_format_bptc_rgb_ufloat_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, 107 const uint8_t *restrict src_row, unsigned src_stride, 108 unsigned width, unsigned height); 109 void 110 util_format_bptc_rgb_ufloat_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, 111 const uint8_t *restrict src_row, unsigned src_stride, 112 unsigned width, unsigned height); 113 void 114 util_format_bptc_rgb_ufloat_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, 115 const float *restrict src_row, unsigned src_stride, 116 unsigned width, unsigned height); 117 void 118 util_format_bptc_rgb_ufloat_fetch_rgba(void *restrict dst, const uint8_t *restrict src, 119 unsigned width, unsigned height); 120 #ifdef __cplusplus 121 } 122 #endif 123 124 #endif /* U_FORMAT_BPTC_H_ */ 125