]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/amrwbdata.h
vdpau: add av_vdpau_bind_context()
[ffmpeg] / libavcodec / amrwbdata.h
index 47b0d42a9cfb9d2e80b286909d14960b5a8203c9..81f8b47d1b254522d14454b536e34b10da242ed4 100644 (file)
@@ -2,20 +2,20 @@
  * AMR wideband data and definitions
  * Copyright (c) 2010 Marcelo Galvao Povoa
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -28,6 +28,7 @@
 #define AVCODEC_AMRWBDATA_H
 
 #include <stdint.h>
+#include <stddef.h>
 
 #define LP_ORDER            16                ///< linear predictive coding filter order
 #define LP_ORDER_16k        20                ///< lpc filter order at 16kHz
@@ -65,7 +66,7 @@ enum Mode {
 
 /* All decoded parameters in these structs must be 2 bytes long
  * because of the direct indexing at the frame parsing */
-typedef struct {
+typedef struct AMRWBSubFrame {
     uint16_t adap;                         ///< adaptive codebook index
     uint16_t ltp;                          ///< ltp-filtering flag
     uint16_t vq_gain;                      ///< VQ adaptive and innovative gains
@@ -74,14 +75,14 @@ typedef struct {
     uint16_t pul_il[4];                    ///< LSBs part of codebook index
 } AMRWBSubFrame;
 
-typedef struct {
+typedef struct AMRWBFrame {
     uint16_t vad;                          ///< voice activity detection flag
     uint16_t isp_id[7];                    ///< index of ISP subvectors
     AMRWBSubFrame subframe[4];             ///< data for subframes
 } AMRWBFrame;
 
 /** The index of a frame parameter */
-#define AMR_BIT(field)                  (offsetof(AMRWBFrame, field) >> 1)
+#define AMR_BIT(field)                  (offsetof(AMRWBFrame, field))
 /** The index of a subframe-specific parameter */
 #define AMR_OF(frame_num, variable)     AMR_BIT(subframe[frame_num].variable)
 
@@ -1886,4 +1887,4 @@ static const uint16_t cf_sizes_wb[] = {
     40 /// SID/comfort noise frame
 };
 
-#endif
+#endif /* AVCODEC_AMRWBDATA_H */