| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <glib.h> |
| 7 |
|
| 8 |
#ifdef __cplusplus |
| 9 |
extern "C" { |
| 10 |
#endif |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
#ifndef _ORC_INTEGER_TYPEDEFS_ |
| 15 |
#define _ORC_INTEGER_TYPEDEFS_ |
| 16 |
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| 17 |
#include <stdint.h> |
| 18 |
typedef int8_t orc_int8; |
| 19 |
typedef int16_t orc_int16; |
| 20 |
typedef int32_t orc_int32; |
| 21 |
typedef int64_t orc_int64; |
| 22 |
typedef uint8_t orc_uint8; |
| 23 |
typedef uint16_t orc_uint16; |
| 24 |
typedef uint32_t orc_uint32; |
| 25 |
typedef uint64_t orc_uint64; |
| 26 |
#define ORC_UINT64_C(x) UINT64_C(x) |
| 27 |
#elif defined(_MSC_VER) |
| 28 |
typedef signed __int8 orc_int8; |
| 29 |
typedef signed __int16 orc_int16; |
| 30 |
typedef signed __int32 orc_int32; |
| 31 |
typedef signed __int64 orc_int64; |
| 32 |
typedef unsigned __int8 orc_uint8; |
| 33 |
typedef unsigned __int16 orc_uint16; |
| 34 |
typedef unsigned __int32 orc_uint32; |
| 35 |
typedef unsigned __int64 orc_uint64; |
| 36 |
#define ORC_UINT64_C(x) (x##Ui64) |
| 37 |
#define inline __inline |
| 38 |
#else |
| 39 |
#include <limits.h> |
| 40 |
typedef signed char orc_int8; |
| 41 |
typedef short orc_int16; |
| 42 |
typedef int orc_int32; |
| 43 |
typedef unsigned char orc_uint8; |
| 44 |
typedef unsigned short orc_uint16; |
| 45 |
typedef unsigned int orc_uint32; |
| 46 |
#if INT_MAX == LONG_MAX |
| 47 |
typedef long long orc_int64; |
| 48 |
typedef unsigned long long orc_uint64; |
| 49 |
#define ORC_UINT64_C(x) (x##ULL) |
| 50 |
#else |
| 51 |
typedef long orc_int64; |
| 52 |
typedef unsigned long orc_uint64; |
| 53 |
#define ORC_UINT64_C(x) (x##UL) |
| 54 |
#endif |
| 55 |
#endif |
| 56 |
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; |
| 57 |
typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32; |
| 58 |
typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64; |
| 59 |
#endif |
| 60 |
#ifndef ORC_RESTRICT |
| 61 |
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| 62 |
#define ORC_RESTRICT restrict |
| 63 |
#elif defined(__GNUC__) && __GNUC__ >= 4 |
| 64 |
#define ORC_RESTRICT __restrict__ |
| 65 |
#elif defined(_MSC_VER) |
| 66 |
#define ORC_RESTRICT __restrict |
| 67 |
#else |
| 68 |
#define ORC_RESTRICT |
| 69 |
#endif |
| 70 |
#endif |
| 71 |
|
| 72 |
#ifndef ORC_INTERNAL |
| 73 |
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) |
| 74 |
#define ORC_INTERNAL __attribute__((visibility("hidden"))) |
| 75 |
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) |
| 76 |
#define ORC_INTERNAL __hidden |
| 77 |
#elif defined (__GNUC__) |
| 78 |
#define ORC_INTERNAL __attribute__((visibility("hidden"))) |
| 79 |
#else |
| 80 |
#define ORC_INTERNAL |
| 81 |
#endif |
| 82 |
#endif |
| 83 |
|
| 84 |
void bayer_orc_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n); |
| 85 |
void bayer_orc_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n); |
| 86 |
void bayer_orc_merge_bg_bgra (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 87 |
void bayer_orc_merge_gr_bgra (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 88 |
void bayer_orc_merge_bg_abgr (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 89 |
void bayer_orc_merge_gr_abgr (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 90 |
void bayer_orc_merge_bg_rgba (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 91 |
void bayer_orc_merge_gr_rgba (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 92 |
void bayer_orc_merge_bg_argb (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 93 |
void bayer_orc_merge_gr_argb (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 94 |
void bayer16_orc_horiz_upsample_le (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint16 * ORC_RESTRICT s1, int n); |
| 95 |
void bayer16_orc_horiz_upsample_be (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint16 * ORC_RESTRICT s1, int n); |
| 96 |
void bayer16_orc_merge_bg_bgra (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 97 |
void bayer16_orc_merge_gr_bgra (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 98 |
void bayer16_orc_merge_bg_abgr (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 99 |
void bayer16_orc_merge_gr_abgr (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 100 |
void bayer16_orc_merge_bg_rgba (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 101 |
void bayer16_orc_merge_gr_rgba (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 102 |
void bayer16_orc_merge_bg_argb (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 103 |
void bayer16_orc_merge_gr_argb (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); |
| 104 |
void bayer16to16_orc_reorder (guint8 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n); |
| 105 |
void bayer16to8_orc_reorder (guint8 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n); |
| 106 |
void bayer8to16_orc_reorder (guint8 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int n); |
| 107 |
|
| 108 |
#ifdef __cplusplus |
| 109 |
} |
| 110 |
#endif |
| 111 |
|