#define orc_audio_convert_unpack_s32_be orc_audio_convert_unpack_s32_swap
#define orc_audio_convert_unpack_float_le orc_audio_convert_unpack_float_s32
#define orc_audio_convert_unpack_float_be orc_audio_convert_unpack_float_s32_swap
+#define orc_audio_convert_unpack_float_hq_le orc_audio_convert_unpack_float_double
+#define orc_audio_convert_unpack_float_hq_be orc_audio_convert_unpack_float_double_swap
+#define orc_audio_convert_unpack_double_hq_le orc_audio_convert_unpack_double_double
+#define orc_audio_convert_unpack_double_hq_be orc_audio_convert_unpack_double_double_swap
+#define orc_audio_convert_unpack_u8_float orc_audio_convert_unpack_u8_double
+#define orc_audio_convert_unpack_u16_le_float orc_audio_convert_unpack_u16_double
+#define orc_audio_convert_unpack_u16_be_float orc_audio_convert_unpack_u16_double_swap
+#define orc_audio_convert_unpack_u32_le_float orc_audio_convert_unpack_u32_double
+#define orc_audio_convert_unpack_u32_be_float orc_audio_convert_unpack_u32_double_swap
+#define orc_audio_convert_unpack_s8_float orc_audio_convert_unpack_s8_double
+#define orc_audio_convert_unpack_s16_le_float orc_audio_convert_unpack_s16_double
+#define orc_audio_convert_unpack_s16_be_float orc_audio_convert_unpack_s16_double_swap
+#define orc_audio_convert_unpack_s32_le_float orc_audio_convert_unpack_s32_double
+#define orc_audio_convert_unpack_s32_be_float orc_audio_convert_unpack_s32_double_swap
#define orc_audio_convert_pack_u16_le orc_audio_convert_pack_u16
#define orc_audio_convert_pack_u16_be orc_audio_convert_pack_u16_swap
#define orc_audio_convert_pack_s16_le orc_audio_convert_pack_s16
#define orc_audio_convert_pack_s32_be orc_audio_convert_pack_s32_swap
#define orc_audio_convert_pack_float_le orc_audio_convert_pack_s32_float
#define orc_audio_convert_pack_float_be orc_audio_convert_pack_s32_float_swap
+#define orc_audio_convert_pack_float_hq_le orc_audio_convert_pack_double_float
+#define orc_audio_convert_pack_float_hq_be orc_audio_convert_pack_double_float_swap
+#define orc_audio_convert_pack_s8_float orc_audio_convert_pack_double_s8
+#define orc_audio_convert_pack_s16_le_float orc_audio_convert_pack_double_s16
+#define orc_audio_convert_pack_s16_be_float orc_audio_convert_pack_double_s16_swap
+#define orc_audio_convert_pack_s32_le_float orc_audio_convert_pack_double_s32
+#define orc_audio_convert_pack_s32_be_float orc_audio_convert_pack_double_s32_swap
#else
#define orc_audio_convert_unpack_u16_be orc_audio_convert_unpack_u16
#define orc_audio_convert_unpack_u16_le orc_audio_convert_unpack_u16_swap
#define orc_audio_convert_unpack_s32_le orc_audio_convert_unpack_s32_swap
#define orc_audio_convert_unpack_float_be orc_audio_convert_unpack_float_s32
#define orc_audio_convert_unpack_float_le orc_audio_convert_unpack_float_s32_swap
+#define orc_audio_convert_unpack_float_hq_be orc_audio_convert_unpack_float_double
+#define orc_audio_convert_unpack_float_hq_le orc_audio_convert_unpack_float_double_swap
+#define orc_audio_convert_unpack_double_hq_be orc_audio_convert_unpack_double_double
+#define orc_audio_convert_unpack_double_hq_le orc_audio_convert_unpack_double_double_swap
+#define orc_audio_convert_unpack_u8_float orc_audio_convert_unpack_u8_double
+#define orc_audio_convert_unpack_u16_be_float orc_audio_convert_unpack_u16_double
+#define orc_audio_convert_unpack_u16_le_float orc_audio_convert_unpack_u16_double_swap
+#define orc_audio_convert_unpack_u32_be_float orc_audio_convert_unpack_u32_double
+#define orc_audio_convert_unpack_u32_le_float orc_audio_convert_unpack_u32_double_swap
+#define orc_audio_convert_unpack_s8_float orc_audio_convert_unpack_s8_double
+#define orc_audio_convert_unpack_s16_be_float orc_audio_convert_unpack_s16_double
+#define orc_audio_convert_unpack_s16_le_float orc_audio_convert_unpack_s16_double_swap
+#define orc_audio_convert_unpack_s32_be_float orc_audio_convert_unpack_s32_double
+#define orc_audio_convert_unpack_s32_le_float orc_audio_convert_unpack_s32_double_swap
#define orc_audio_convert_pack_u16_be orc_audio_convert_pack_u16
#define orc_audio_convert_pack_u16_le orc_audio_convert_pack_u16_swap
#define orc_audio_convert_pack_s16_be orc_audio_convert_pack_s16
#define orc_audio_convert_pack_s32_le orc_audio_convert_pack_s32_swap
#define orc_audio_convert_pack_float_be orc_audio_convert_pack_s32_float
#define orc_audio_convert_pack_float_le orc_audio_convert_pack_s32_float_swap
+#define orc_audio_convert_pack_float_hq_be orc_audio_convert_pack_double_float
+#define orc_audio_convert_pack_float_hq_le orc_audio_convert_pack_double_float_swap
+#define orc_audio_convert_pack_s8_float orc_audio_convert_pack_double_s8
+#define orc_audio_convert_pack_s16_be_float orc_audio_convert_pack_double_s16
+#define orc_audio_convert_pack_s16_le_float orc_audio_convert_pack_double_s16_swap
+#define orc_audio_convert_pack_s32_be_float orc_audio_convert_pack_double_s32
+#define orc_audio_convert_pack_s32_le_float orc_audio_convert_pack_double_s32_swap
#endif
/* sign bit in the intermediate format */
*dst++ = (gdouble) FUNC (*src++); \
}
+/* unpack from float to float 64 (double) with orc */
+#define MAKE_UNPACK_FUNC_ORC_FF(name, type, FUNC) \
+static void \
+MAKE_UNPACK_FUNC_NAME (name) (type * src, gdouble * dst, gint s, \
+ gint count) \
+{ \
+ MAKE_ORC_UNPACK_FUNC_NAME (name) ((gdouble *) dst, src, count); \
+}
+
/* unpack from int to float 64 (double) */
#define MAKE_UNPACK_FUNC_IF(name, stride, sign, READ_FUNC) \
static void \
} \
}
+#define MAKE_UNPACK_FUNC_ORC_IF(name, stride, sign, READ_FUNC) \
+static void \
+MAKE_UNPACK_FUNC_NAME (name) (guint8 *src, gdouble *dst, \
+ gint scale, gint count) \
+{ \
+ MAKE_ORC_UNPACK_FUNC_NAME (name) (dst, src, scale, count); \
+}
+
#define READ8(p) GST_READ_UINT8(p)
#define READ16_FROM_LE(p) GST_READ_UINT16_LE (p)
#define READ16_FROM_BE(p) GST_READ_UINT16_BE (p)
MAKE_UNPACK_FUNC_ORC_FI (float_be, gfloat, GFLOAT_FROM_BE);
MAKE_UNPACK_FUNC_FI (double_le, gdouble, GDOUBLE_FROM_LE);
MAKE_UNPACK_FUNC_FI (double_be, gdouble, GDOUBLE_FROM_BE);
-MAKE_UNPACK_FUNC_FF (float_hq_le, gfloat, GFLOAT_FROM_LE);
-MAKE_UNPACK_FUNC_FF (float_hq_be, gfloat, GFLOAT_FROM_BE);
-MAKE_UNPACK_FUNC_FF (double_hq_le, gdouble, GDOUBLE_FROM_LE);
-MAKE_UNPACK_FUNC_FF (double_hq_be, gdouble, GDOUBLE_FROM_BE);
-MAKE_UNPACK_FUNC_IF (u8_float, 1, SIGNED, READ8);
-MAKE_UNPACK_FUNC_IF (s8_float, 1, 0, READ8);
-MAKE_UNPACK_FUNC_IF (u16_le_float, 2, SIGNED, READ16_FROM_LE);
-MAKE_UNPACK_FUNC_IF (s16_le_float, 2, 0, READ16_FROM_LE);
-MAKE_UNPACK_FUNC_IF (u16_be_float, 2, SIGNED, READ16_FROM_BE);
-MAKE_UNPACK_FUNC_IF (s16_be_float, 2, 0, READ16_FROM_BE);
+MAKE_UNPACK_FUNC_ORC_FF (float_hq_le, gfloat, GFLOAT_FROM_LE);
+MAKE_UNPACK_FUNC_ORC_FF (float_hq_be, gfloat, GFLOAT_FROM_BE);
+MAKE_UNPACK_FUNC_ORC_FF (double_hq_le, gdouble, GDOUBLE_FROM_LE);
+MAKE_UNPACK_FUNC_ORC_FF (double_hq_be, gdouble, GDOUBLE_FROM_BE);
+MAKE_UNPACK_FUNC_ORC_IF (u8_float, 1, SIGNED, READ8);
+MAKE_UNPACK_FUNC_ORC_IF (s8_float, 1, 0, READ8);
+MAKE_UNPACK_FUNC_ORC_IF (u16_le_float, 2, SIGNED, READ16_FROM_LE);
+MAKE_UNPACK_FUNC_ORC_IF (s16_le_float, 2, 0, READ16_FROM_LE);
+MAKE_UNPACK_FUNC_ORC_IF (u16_be_float, 2, SIGNED, READ16_FROM_BE);
+MAKE_UNPACK_FUNC_ORC_IF (s16_be_float, 2, 0, READ16_FROM_BE);
MAKE_UNPACK_FUNC_IF (u24_le_float, 3, SIGNED, READ24_FROM_LE);
MAKE_UNPACK_FUNC_IF (s24_le_float, 3, 0, READ24_FROM_LE);
MAKE_UNPACK_FUNC_IF (u24_be_float, 3, SIGNED, READ24_FROM_BE);
MAKE_UNPACK_FUNC_IF (s24_be_float, 3, 0, READ24_FROM_BE);
-MAKE_UNPACK_FUNC_IF (u32_le_float, 4, SIGNED, READ32_FROM_LE);
-MAKE_UNPACK_FUNC_IF (s32_le_float, 4, 0, READ32_FROM_LE);
-MAKE_UNPACK_FUNC_IF (u32_be_float, 4, SIGNED, READ32_FROM_BE);
-MAKE_UNPACK_FUNC_IF (s32_be_float, 4, 0, READ32_FROM_BE);
+MAKE_UNPACK_FUNC_ORC_IF (u32_le_float, 4, SIGNED, READ32_FROM_LE);
+MAKE_UNPACK_FUNC_ORC_IF (s32_le_float, 4, 0, READ32_FROM_LE);
+MAKE_UNPACK_FUNC_ORC_IF (u32_be_float, 4, SIGNED, READ32_FROM_BE);
+MAKE_UNPACK_FUNC_ORC_IF (s32_be_float, 4, 0, READ32_FROM_BE);
/* One of the double_hq_* functions generated above is ineffecient, but it's
* never used anyway. The same is true for one of the s32_* functions. */
*dst++ = FUNC ((type) (*src++)); \
}
+/* pack from float 64 (double) to float with orc */
+#define MAKE_PACK_FUNC_ORC_FF(name, type, FUNC) \
+static void \
+MAKE_PACK_FUNC_NAME (name) (gdouble * src, type * dst, gint s, \
+ gint count) \
+{ \
+ MAKE_PACK_FUNC_NAME_ORC (name) (dst, src, count); \
+}
+
/* pack from float 64 (double) to signed int.
* the floats are already in the correct range. Only a cast is needed.
*/
} \
}
+/* pack from float 64 (double) to signed int with orc.
+ * the floats are already in the correct range. Only a cast is needed.
+ */
+#define MAKE_PACK_FUNC_ORC_FI_S(name, stride, WRITE_FUNC) \
+static void \
+MAKE_PACK_FUNC_NAME (name) (gdouble * src, guint8 * dst, gint scale, \
+ gint count) \
+{ \
+ MAKE_PACK_FUNC_NAME_ORC (name) (dst, src, scale, count); \
+}
+
#define WRITE8(p, v) GST_WRITE_UINT8 (p, v)
#define WRITE16_TO_LE(p,v) GST_WRITE_UINT16_LE (p, (guint16)(v))
#define WRITE16_TO_BE(p,v) GST_WRITE_UINT16_BE (p, (guint16)(v))
MAKE_PACK_FUNC_ORC_IF (float_be, gfloat, GFLOAT_TO_BE);
MAKE_PACK_FUNC_IF (double_le, gdouble, GDOUBLE_TO_LE);
MAKE_PACK_FUNC_IF (double_be, gdouble, GDOUBLE_TO_BE);
-MAKE_PACK_FUNC_FF (float_hq_le, gfloat, GFLOAT_TO_LE);
-MAKE_PACK_FUNC_FF (float_hq_be, gfloat, GFLOAT_TO_BE);
+MAKE_PACK_FUNC_ORC_FF (float_hq_le, gfloat, GFLOAT_TO_LE);
+MAKE_PACK_FUNC_ORC_FF (float_hq_be, gfloat, GFLOAT_TO_BE);
MAKE_PACK_FUNC_FI_U (u8_float, 1, WRITE8);
-MAKE_PACK_FUNC_FI_S (s8_float, 1, WRITE8);
+MAKE_PACK_FUNC_ORC_FI_S (s8_float, 1, WRITE8);
MAKE_PACK_FUNC_FI_U (u16_le_float, 2, WRITE16_TO_LE);
-MAKE_PACK_FUNC_FI_S (s16_le_float, 2, WRITE16_TO_LE);
+MAKE_PACK_FUNC_ORC_FI_S (s16_le_float, 2, WRITE16_TO_LE);
MAKE_PACK_FUNC_FI_U (u16_be_float, 2, WRITE16_TO_BE);
-MAKE_PACK_FUNC_FI_S (s16_be_float, 2, WRITE16_TO_BE);
+MAKE_PACK_FUNC_ORC_FI_S (s16_be_float, 2, WRITE16_TO_BE);
MAKE_PACK_FUNC_FI_U (u24_le_float, 3, WRITE24_TO_LE);
MAKE_PACK_FUNC_FI_S (s24_le_float, 3, WRITE24_TO_LE);
MAKE_PACK_FUNC_FI_U (u24_be_float, 3, WRITE24_TO_BE);
MAKE_PACK_FUNC_FI_S (s24_be_float, 3, WRITE24_TO_BE);
MAKE_PACK_FUNC_FI_U (u32_le_float, 4, WRITE32_TO_LE);
-MAKE_PACK_FUNC_FI_S (s32_le_float, 4, WRITE32_TO_LE);
+MAKE_PACK_FUNC_ORC_FI_S (s32_le_float, 4, WRITE32_TO_LE);
MAKE_PACK_FUNC_FI_U (u32_be_float, 4, WRITE32_TO_BE);
-MAKE_PACK_FUNC_FI_S (s32_be_float, 4, WRITE32_TO_BE);
+MAKE_PACK_FUNC_ORC_FI_S (s32_be_float, 4, WRITE32_TO_BE);
/* For double_hq, packing and unpacking is the same, so we reuse the unpacking
* functions here. */