Revision d9b1c197 libavcodec/mpegaudiodec.c

View differences:

libavcodec/mpegaudiodec.c
25 25
//#define DEBUG
26 26
#include "avcodec.h"
27 27
#include "bitstream.h"
28
#include "mpegaudio.h"
29 28
#include "dsputil.h"
30 29

  
31 30
/*
......
40 39
#define USE_HIGHPRECISION
41 40
#endif
42 41

  
43
#ifdef USE_HIGHPRECISION
44
#define FRAC_BITS   23   /* fractional bits for sb_samples and dct */
45
#define WFRAC_BITS  16   /* fractional bits for window */
46
#else
47
#define FRAC_BITS   15   /* fractional bits for sb_samples and dct */
48
#define WFRAC_BITS  14   /* fractional bits for window */
49
#endif
50

  
51
#if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT)
52
typedef int32_t OUT_INT;
53
#define OUT_MAX INT32_MAX
54
#define OUT_MIN INT32_MIN
55
#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 31)
56
#else
57
typedef int16_t OUT_INT;
58
#define OUT_MAX INT16_MAX
59
#define OUT_MIN INT16_MIN
60
#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15)
61
#endif
42
#include "mpegaudio.h"
62 43

  
63 44
#define FRAC_ONE    (1 << FRAC_BITS)
64 45

  
......
75 56
    return ((int64_t)(a) * (int64_t)(b))>>32;
76 57
}
77 58

  
78
#if FRAC_BITS <= 15
79
typedef int16_t MPA_INT;
80
#else
81
typedef int32_t MPA_INT;
82
#endif
83

  
84 59
/****************/
85 60

  
86 61
#define HEADER_SIZE 4

Also available in: Unified diff