/**
- * Pack two delta values (a,b) into one 16bit word
- * according with endianess of the host machine.
+ * Pack two delta values (a,b) into one 16-bit word
+ * according with endianness of the host machine.
*/
#if HAVE_BIGENDIAN
-#define PD(a,b) (((a) << 8) + (b))
+#define PD(a,b) (((a) * (1 << 8)) + (b))
#else
-#define PD(a,b) (((b) << 8) + (a))
+#define PD(a,b) (((b) * (1 << 8)) + (a))
#endif
/**
#undef PD
/**
- * Pack four delta values (a,a,b,b) into one 32bit word
- * according with endianess of the host machine.
+ * Pack four delta values (a,a,b,b) into one 32-bit word
+ * according with endianness of the host machine.
*/
#if HAVE_BIGENDIAN
-#define PD(a,b) (((a) << 24) + ((a) << 16) + ((b) << 8) + (b))
+#define PD(a,b) (((a) * (1 << 24)) + ((a) * (1 << 16)) + ((b) * (1 << 8)) + (b))
#else
-#define PD(a,b) (((b) << 24) + ((b) << 16) + ((a) << 8) + (a))
+#define PD(a,b) (((b) * (1 << 24)) + ((b) * (1 << 16)) + ((a) * (1 << 8)) + (a))
#endif
/*
static const int32_t delta_tab_3_5_m10[79] = { TAB_3_5 };
-typedef struct {
+typedef struct vqEntry {
const int16_t *deltas; ///< delta tables for 4x4 block modes
const int32_t *deltas_m10; ///< delta tables for 8x8 block modes
uint8_t num_dyads; ///< number of two-pixel deltas