]> mj.ucw.cz Git - libucw.git/blobdiff - images/signature.h
reverted invalid usage of GET*/PUT* macros
[libucw.git] / images / signature.h
index 94a0813d0633266624683bb2cb92ec9e41076f61..e84c7f3164fbb01784fb9c527af634756f39b2d7 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _IMAGES_SIGNATURE_H
 #define _IMAGES_SIGNATURE_H
 
-#include "lib/fastbuf.h"
-
 /* Configuration */
 extern uns image_sig_min_width, image_sig_min_height;
 extern uns *image_sig_prequant_thresholds;
@@ -44,13 +42,13 @@ struct image_cluster {
   union {
     struct {
       s32 dot;                 /* Dot product of the splitting plane */
-      byte vec[IMAGE_VEC_F];   /* Normal vector of the splitting plane */
-    };
+      s8 vec[IMAGE_VEC_F];     /* Normal vector of the splitting plane */
+    } PACKED;
     struct {
       u64 pos;                 /* Cluster size in bytes */
-    };
-  };
-};
+    } PACKED;
+  } PACKED;
+} PACKED;
 
 static inline uns
 image_signature_size(uns len)
@@ -100,33 +98,6 @@ struct image_sig_data {
   u32 f[IMAGE_VEC_F];
 };
 
-/* sig-fb.c */
-
-#define IMAGE_VECTOR_SIZE (sizeof(struct image_vector))
-
-static inline uns
-image_vector_read(struct fastbuf *fb, struct image_vector *vec)
-{
-  breadb(fb, vec, sizeof(*vec));
-  return IMAGE_VECTOR_SIZE;
-}
-
-static inline uns
-image_vector_write(struct fastbuf *fb, struct image_vector *vec)
-{
-  bwrite(fb, vec, sizeof(*vec));
-  return IMAGE_VECTOR_SIZE;
-}
-
-static inline uns
-image_signature_peek_size(struct fastbuf *fb)
-{
-  return image_signature_size(bpeekc(fb));
-}
-
-uns image_signature_read(struct fastbuf *fb, struct image_signature *sig);
-uns image_signature_write(struct fastbuf *fb, struct image_signature *sig);
-
 /* sig-init.c */
 
 int compute_image_signature(struct image_thread *thread, struct image_signature *sig, struct image *image);