]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/indeo3data.h
cbs: Add an explicit type for coded bitstream unit types
[ffmpeg] / libavcodec / indeo3data.h
index 55164c2531cd86ca06e8003b90f0a5d5fc46ff28..41a29e5c13d3ef09cfe51560fdbe5ecda9105f62 100644 (file)
 
 
 /**
- * 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
 
 /**
@@ -281,13 +281,13 @@ static const int16_t delta_tab_3_5[79]  = { TAB_3_5 };
 #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
 
 /*
@@ -320,7 +320,7 @@ static const int32_t delta_tab_3_4_m10[79]  = { TAB_3_4 };
 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