]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/g723_1_data.h
cavsdec: switch to av_assert
[ffmpeg] / libavcodec / g723_1_data.h
index bd1abe9f0d6cc840992326c2a446e633ad8a7d28..b62f207b23cd45ee234e7c5bdfb4211f56dec791 100644 (file)
  * G723.1 compatible decoder data tables
  */
 
+#ifndef AVCODEC_G723_1_DATA_H
+#define AVCODEC_G723_1_DATA_H
+
+#include <stdint.h>
+
 #define SUBFRAMES       4
 #define SUBFRAME_LEN    60
 #define FRAME_LEN       (SUBFRAME_LEN << 2)
 /**
  * G723.1 frame types
  */
-typedef enum {
-    ActiveFrame,        ///< Active speech
-    SIDFrame,           ///< Silence Insertion Descriptor frame
-    UntransmittedFrame
+typedef enum FrameType {
+    ACTIVE_FRAME,        ///< Active speech
+    SID_FRAME,           ///< Silence Insertion Descriptor frame
+    UNTRANSMITTED_FRAME
 } FrameType;
 
-static const uint8_t frame_size[4] = {24, 20, 4, 1};
+static const uint8_t frame_size[4] = { 24, 20, 4, 1 };
 
-typedef enum {
-    Rate6k3,
-    Rate5k3
+typedef enum Rate {
+    RATE_6300,
+    RATE_5300
 } Rate;
 
 /**
  * G723.1 unpacked data subframe
  */
-typedef struct {
+typedef struct G723_1_Subframe {
     int ad_cb_lag;     ///< adaptive codebook lag
     int ad_cb_gain;
     int dirac_train;
@@ -1313,3 +1318,5 @@ static const int16_t percept_flt_tbl[2][LPC_ORDER] = {
     /* Pole part */
     {16384,  8192,  4096,  2048,  1024,   512,   256,   128,    64,    32}
 };
+
+#endif /* AVCODEC_G723_1_DATA_H */