[SCM] libav/experimental: move a couple of macros and structs to mpegaudio.h

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:02:04 UTC 2013


The following commit has been merged in the experimental branch:
commit c2d08dc0d78e85e6a45abb33e587b8a66a2de754
Author: Måns Rullgård <mans at mansr.com>
Date:   Sat Jun 16 22:58:43 2007 +0000

    move a couple of macros and structs to mpegaudio.h
    
    Originally committed as revision 9343 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mpegaudio.h b/libavcodec/mpegaudio.h
index 8a830e2..d046152 100644
--- a/libavcodec/mpegaudio.h
+++ b/libavcodec/mpegaudio.h
@@ -62,6 +62,10 @@
 #define WFRAC_BITS  14   /* fractional bits for window */
 #endif
 
+#define FRAC_ONE    (1 << FRAC_BITS)
+
+#define FIX(a)   ((int)((a) * FRAC_ONE))
+
 #if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT)
 typedef int32_t OUT_INT;
 #define OUT_MAX INT32_MAX
@@ -116,6 +120,13 @@ typedef struct MPADecodeContext {
     AVCodecContext* avctx;
 } MPADecodeContext;
 
+/* layer 3 huffman tables */
+typedef struct HuffTable {
+    int xsize;
+    const uint8_t *bits;
+    const uint16_t *codes;
+} HuffTable;
+
 int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf);
 int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate);
 void ff_mpa_synth_init(MPA_INT *window);
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 9e8472f..f2eb841 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -46,9 +46,6 @@
 
 #include "mathops.h"
 
-#define FRAC_ONE    (1 << FRAC_BITS)
-
-#define FIX(a)   ((int)((a) * FRAC_ONE))
 /* WARNING: only correct for posititive numbers */
 #define FIXR(a)   ((int)((a) * FRAC_ONE + 0.5))
 #define FRAC_RND(a) (((a) + (FRAC_ONE/2)) >> FRAC_BITS)
@@ -91,13 +88,6 @@ typedef struct GranuleDef {
 #define MODE_EXT_MS_STEREO 2
 #define MODE_EXT_I_STEREO  1
 
-/* layer 3 huffman tables */
-typedef struct HuffTable {
-    int xsize;
-    const uint8_t *bits;
-    const uint16_t *codes;
-} HuffTable;
-
 #include "mpegaudiodata.h"
 #include "mpegaudiodectab.h"
 
diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index d0506c6..ede4492 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -31,7 +31,6 @@
 /* currently, cannot change these constants (need to modify
    quantization stage) */
 #define MUL(a,b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS)
-#define FIX(a)   ((int)((a) * (1 << FRAC_BITS)))
 
 #define SAMPLES_BUF_SIZE 4096
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list