get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes
authorDiego Biurrun <diego@biurrun.de>
Sat, 4 Jun 2016 13:07:30 +0000 (15:07 +0200)
committerDiego Biurrun <diego@biurrun.de>
Tue, 7 Jun 2016 11:09:57 +0000 (13:09 +0200)
This avoids the danger that get_bits.h might get indirectly #included before
BITSTREAM_READER_LE is defined.

Also sort headers into canonical order where appropriate.

33 files changed:
libavcodec/bink.c
libavcodec/binkaudio.c
libavcodec/dxtory.c
libavcodec/eatgq.c
libavcodec/eatgv.c
libavcodec/escape124.c
libavcodec/escape130.c
libavcodec/g723_1dec.c
libavcodec/indeo2.c
libavcodec/indeo4.c
libavcodec/interplayvideo.c
libavcodec/ivi.c
libavcodec/metasound.c
libavcodec/msgsmdec.c
libavcodec/nellymoserdec.c
libavcodec/qdm2.c
libavcodec/ra288.c
libavcodec/sipr.c
libavcodec/smacker.c
libavcodec/tak.c
libavcodec/tak.h
libavcodec/tak_parser.c
libavcodec/takdec.c
libavcodec/tiertexseqv.c
libavcodec/tscc2.c
libavcodec/tta.c
libavcodec/vble.c
libavcodec/vorbis.c
libavcodec/vorbisdec.c
libavcodec/wavpack.c
libavcodec/webp.c
libavcodec/xan.c
libavformat/takdec.c

index 94d1598..7433697 100644 (file)
 #include "libavutil/attributes.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/internal.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "binkdata.h"
 #include "binkdsp.h"
 #include "blockdsp.h"
+#include "get_bits.h"
 #include "hpeldsp.h"
 #include "internal.h"
 #include "mathops.h"
 
-#define BITSTREAM_READER_LE
-#include "get_bits.h"
-
 #define BINK_FLAG_ALPHA 0x00100000
 #define BINK_FLAG_GRAY  0x00020000
 
index 71ad344..2638eb2 100644 (file)
  */
 
 #include "libavutil/channel_layout.h"
-#include "avcodec.h"
+#include "libavutil/intfloat.h"
+
 #define BITSTREAM_READER_LE
-#include "get_bits.h"
+#include "avcodec.h"
 #include "dct.h"
-#include "rdft.h"
+#include "get_bits.h"
 #include "internal.h"
+#include "rdft.h"
 #include "wma_freqs.h"
-#include "libavutil/intfloat.h"
 
 static float quant_table[96];
 
index 01726b9..937b96c 100644 (file)
 
 #include <inttypes.h>
 
+#include "libavutil/common.h"
+#include "libavutil/intreadwrite.h"
+
 #define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "bytestream.h"
 #include "get_bits.h"
 #include "internal.h"
 #include "unary.h"
-#include "libavutil/common.h"
-#include "libavutil/intreadwrite.h"
 
 static int dxtory_decode_v1_rgb(AVCodecContext *avctx, AVFrame *pic,
                                 const uint8_t *src, int src_size,
index a0496a0..ff0aa55 100644 (file)
  * http://wiki.multimedia.cx/index.php?title=Electronic_Arts_TGQ
  */
 
-#include "avcodec.h"
 #define BITSTREAM_READER_LE
-#include "get_bits.h"
-#include "bytestream.h"
-#include "idctdsp.h"
 #include "aandcttab.h"
+#include "avcodec.h"
+#include "bytestream.h"
 #include "eaidct.h"
+#include "get_bits.h"
+#include "idctdsp.h"
 #include "internal.h"
 
 typedef struct TgqContext {
index 4faae50..7f40f45 100644 (file)
  * http://wiki.multimedia.cx/index.php?title=Electronic_Arts_TGV
  */
 
-#include "avcodec.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/mem.h"
+
 #define BITSTREAM_READER_LE
+#include "avcodec.h"
 #include "get_bits.h"
 #include "internal.h"
-#include "libavutil/imgutils.h"
-#include "libavutil/mem.h"
 
 #define EA_PREAMBLE_SIZE    8
 #define kVGT_TAG MKTAG('k', 'V', 'G', 'T')
index 629ba5e..6d1b487 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "avcodec.h"
-#include "internal.h"
-
 #define BITSTREAM_READER_LE
+#include "avcodec.h"
 #include "get_bits.h"
+#include "internal.h"
 
 typedef union MacroBlock {
     uint16_t pixels[4];
index e69e42e..bfc1f3f 100644 (file)
@@ -21,8 +21,9 @@
 
 #include "libavutil/attributes.h"
 #include "libavutil/mem.h"
-#include "avcodec.h"
+
 #define BITSTREAM_READER_LE
+#include "avcodec.h"
 #include "get_bits.h"
 #include "internal.h"
 
index 701e034..f50bed1 100644 (file)
  * G.723.1 compatible decoder
  */
 
-#define BITSTREAM_READER_LE
 #include "libavutil/channel_layout.h"
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
-#include "avcodec.h"
-#include "get_bits.h"
+
+#define BITSTREAM_READER_LE
 #include "acelp_vectors.h"
+#include "avcodec.h"
 #include "celp_filters.h"
-#include "g723_1.h"
+#include "get_bits.h"
 #include "internal.h"
+#include "g723_1.h"
 
 #define CNG_RANDOM_SEED 12345
 
index e667420..3154e23 100644 (file)
@@ -24,8 +24,9 @@
  * Intel Indeo 2 decoder.
  */
 
-#define BITSTREAM_READER_LE
 #include "libavutil/attributes.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "get_bits.h"
 #include "indeo2data.h"
index 217311f..ab42e7b 100644 (file)
 #define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "get_bits.h"
-#include "ivi.h"
-#include "ivi_dsp.h"
 #include "indeo4data.h"
 #include "internal.h"
+#include "ivi.h"
+#include "ivi_dsp.h"
 
 #define IVI4_PIC_SIZE_ESC   7
 
index e41fc34..e0d1e91 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "bytestream.h"
-#include "hpeldsp.h"
-#define BITSTREAM_READER_LE
 #include "get_bits.h"
+#include "hpeldsp.h"
 #include "internal.h"
 
 #define PALETTE_COUNT 256
index caa3fe6..8a59777 100644 (file)
 
 #include <inttypes.h>
 
-#define BITSTREAM_READER_LE
 #include "libavutil/attributes.h"
 #include "libavutil/timer.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "get_bits.h"
 #include "internal.h"
index dbb2a63..a3b210e 100644 (file)
 #include <math.h>
 #include <stdint.h>
 
-#define BITSTREAM_READER_LE
 #include "libavutil/channel_layout.h"
 #include "libavutil/float_dsp.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
-#include "get_bits.h"
 #include "fft.h"
+#include "get_bits.h"
 #include "internal.h"
 #include "lsp.h"
 #include "sinewin.h"
index be5062a..92b5ae6 100644 (file)
@@ -21,8 +21,9 @@
 
 #define BITSTREAM_READER_LE
 #include "avcodec.h"
-#include "msgsmdec.h"
 #include "gsm.h"
+#include "msgsmdec.h"
+
 #include "gsmdec_template.c"
 
 int ff_msgsm_decode_block(AVCodecContext *avctx, int16_t *samples,
index 5033282..355935f 100644 (file)
 #include "libavutil/float_dsp.h"
 #include "libavutil/lfg.h"
 #include "libavutil/random_seed.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "fft.h"
+#include "get_bits.h"
 #include "internal.h"
 #include "nellymoser.h"
 #include "sinewin.h"
 
-#define BITSTREAM_READER_LE
-#include "get_bits.h"
-
 
 typedef struct NellyMoserDecodeContext {
     AVCodecContext* avctx;
index b33e7c6..ec57b35 100644 (file)
 #include <stddef.h>
 #include <stdio.h>
 
-#define BITSTREAM_READER_LE
 #include "libavutil/channel_layout.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "get_bits.h"
 #include "internal.h"
-#include "rdft.h"
-#include "mpegaudiodsp.h"
 #include "mpegaudio.h"
+#include "mpegaudiodsp.h"
+#include "rdft.h"
 
 #include "qdm2data.h"
 #include "qdm2_tablegen.h"
index a9f1045..96d8d1e 100644 (file)
 #include "libavutil/channel_layout.h"
 #include "libavutil/float_dsp.h"
 #include "libavutil/internal.h"
-#include "avcodec.h"
-#include "internal.h"
+
 #define BITSTREAM_READER_LE
+#include "avcodec.h"
+#include "celp_filters.h"
 #include "get_bits.h"
-#include "ra288.h"
+#include "internal.h"
 #include "lpc.h"
-#include "celp_filters.h"
+#include "ra288.h"
 
 #define MAX_BACKWARD_FILTER_ORDER  36
 #define MAX_BACKWARD_FILTER_LEN    40
index 3f17686..686b3e2 100644 (file)
 #include "libavutil/channel_layout.h"
 #include "libavutil/float_dsp.h"
 #include "libavutil/mathematics.h"
-#include "avcodec.h"
+
 #define BITSTREAM_READER_LE
+#include "avcodec.h"
 #include "get_bits.h"
 #include "internal.h"
-
 #include "lsp.h"
 #include "acelp_vectors.h"
 #include "acelp_pitch_delay.h"
index 1ec957a..e3e5475 100644 (file)
 #include <stdlib.h>
 
 #include "libavutil/channel_layout.h"
-#include "avcodec.h"
-#include "internal.h"
-#include "mathops.h"
 
 #define BITSTREAM_READER_LE
-#include "get_bits.h"
+#include "avcodec.h"
 #include "bytestream.h"
+#include "get_bits.h"
+#include "internal.h"
+#include "mathops.h"
 
 #define SMKTREE_BITS 9
 #define SMK_NODE 0x80000000
index 867a84b..bd82c3d 100644 (file)
@@ -22,6 +22,8 @@
 #include "libavutil/bswap.h"
 #include "libavutil/crc.h"
 #include "libavutil/intreadwrite.h"
+
+#define BITSTREAM_READER_LE
 #include "tak.h"
 
 static const uint16_t frame_duration_type_quants[] = {
index fa91149..19b1c47 100644 (file)
@@ -29,9 +29,8 @@
 
 #include <stdint.h>
 
-#define BITSTREAM_READER_LE
-#include "get_bits.h"
 #include "avcodec.h"
+#include "get_bits.h"
 
 #define TAK_FORMAT_DATA_TYPE_BITS               3
 #define TAK_FORMAT_SAMPLE_RATE_BITS            18
index 295df24..9ac1deb 100644 (file)
@@ -24,8 +24,9 @@
  * TAK parser
  **/
 
-#include "tak.h"
+#define BITSTREAM_READER_LE
 #include "parser.h"
+#include "tak.h"
 
 typedef struct TAKParseContext {
     ParseContext  pc;
index 93098be..c9db928 100644 (file)
 
 #include "libavutil/internal.h"
 #include "libavutil/samplefmt.h"
-#include "tak.h"
+
+#define BITSTREAM_READER_LE
 #include "audiodsp.h"
 #include "avcodec.h"
 #include "internal.h"
 #include "unary.h"
+#include "tak.h"
 
 #define MAX_SUBFRAMES     8                         // max number of subframes per channel
 #define MAX_PREDICTORS  256
index 626324a..8ca7edf 100644 (file)
@@ -24,8 +24,8 @@
  * Tiertex Limited SEQ video decoder
  */
 
-#include "avcodec.h"
 #define BITSTREAM_READER_LE
+#include "avcodec.h"
 #include "get_bits.h"
 #include "internal.h"
 
index e830bf9..d3d45e4 100644 (file)
@@ -28,8 +28,8 @@
 
 #define BITSTREAM_READER_LE
 #include "avcodec.h"
-#include "get_bits.h"
 #include "bytestream.h"
+#include "get_bits.h"
 #include "internal.h"
 #include "mathops.h"
 #include "tscc2data.h"
index 7399827..2b57406 100644 (file)
  * @author Alex Beregszaszi
  */
 
-#define BITSTREAM_READER_LE
 #include <limits.h>
+
+#include "libavutil/crc.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "get_bits.h"
 #include "internal.h"
-#include "libavutil/crc.h"
 
 #define FORMAT_SIMPLE    1
 #define FORMAT_ENCRYPTED 2
index 7ce1aee..1a78036 100644 (file)
  * VBLE Decoder
  */
 
-#define BITSTREAM_READER_LE
-
 #include "libavutil/imgutils.h"
 
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "get_bits.h"
 #include "huffyuvdsp.h"
index 66fa21b..d29769c 100644 (file)
@@ -25,7 +25,6 @@
 #define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "get_bits.h"
-
 #include "vorbis.h"
 
 
index abc01c8..8b800fd 100644 (file)
 #include <inttypes.h>
 #include <math.h>
 
-#define BITSTREAM_READER_LE
 #include "libavutil/float_dsp.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
-#include "get_bits.h"
 #include "fft.h"
+#include "get_bits.h"
 #include "internal.h"
-
 #include "vorbis.h"
 #include "vorbisdsp.h"
 #include "xiph.h"
index ab9dec9..7f55f51 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#define BITSTREAM_READER_LE
-
 #include "libavutil/channel_layout.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
+#include "bytestream.h"
 #include "get_bits.h"
 #include "internal.h"
 #include "unary.h"
-#include "bytestream.h"
 
 /**
  * @file
index c475744..b26399c 100644 (file)
  *   - Exif and XMP metadata
  */
 
-#define BITSTREAM_READER_LE
 #include "libavutil/imgutils.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "bytestream.h"
-#include "internal.h"
 #include "get_bits.h"
+#include "internal.h"
 #include "thread.h"
 #include "vp8.h"
 
index a46b58c..c16c651 100644 (file)
 
 #include "libavutil/intreadwrite.h"
 #include "libavutil/mem.h"
+
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "bytestream.h"
-#define BITSTREAM_READER_LE
 #include "get_bits.h"
 #include "internal.h"
 
index 61ead31..b28d44c 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define BITSTREAM_READER_LE
 #include "libavcodec/tak.h"
+
+#include "apetag.h"
 #include "avformat.h"
 #include "internal.h"
 #include "rawdec.h"
-#include "apetag.h"
 
 typedef struct TAKDemuxContext {
     int     mlast_frame;