]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpc.h
binkaudio: simplify frame_len_bits and frame_len calculation
[ffmpeg] / libavcodec / mpc.h
index ce438e3af955924bd0c21c3d6d757a30816fa437..2d9755a59307366d5c3b748584bfaad2af5d5d2e 100644 (file)
  */
 
 /**
- * @file mpc.h Musepack decoder
+ * @file
+ * Musepack decoder
  * MPEG Audio Layer 1/2 -like codec with frames of 1152 samples
  * divided into 32 subbands.
  */
 
-#ifndef FFMPEG_MPC_H
-#define FFMPEG_MPC_H
+#ifndef AVCODEC_MPC_H
+#define AVCODEC_MPC_H
 
+#include "libavutil/lfg.h"
 #include "avcodec.h"
-#include "bitstream.h"
+#include "get_bits.h"
 #include "dsputil.h"
-#include "random.h"
-
-#ifdef CONFIG_MPEGAUDIO_HP
-#define USE_HIGHPRECISION
-#endif
 #include "mpegaudio.h"
 
 #include "mpcdata.h"
@@ -66,15 +63,15 @@ typedef struct {
     int cur_frame, frames;
     uint8_t *bits;
     int buf_size;
-    AVRandomState rnd;
+    AVLFG rnd;
     int frames_to_skip;
     /* for synthesis */
-    DECLARE_ALIGNED_16(MPA_INT, synth_buf[MPA_MAX_CHANNELS][512*2]);
+    DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2];
     int synth_buf_offset[MPA_MAX_CHANNELS];
-    DECLARE_ALIGNED_16(int32_t, sb_samples[MPA_MAX_CHANNELS][36][SBLIMIT]);
+    DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT];
 } MPCContext;
 
-extern void ff_mpc_init();
-extern void ff_mpc_dequantize_and_synth(MPCContext *c, int maxband, void *dst);
+void ff_mpc_init(void);
+void ff_mpc_dequantize_and_synth(MPCContext *c, int maxband, void *dst, int channels);
 
-#endif /* FFMPEG_MPC_H */
+#endif /* AVCODEC_MPC_H */