diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-08-14 18:19:46 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-08-15 14:38:03 +0200 |
commit | 38f64c03301ac66d7b54b3e4bd2bf6454f9fb2d3 (patch) | |
tree | d436db473b3c5e1f0ba6b2d49b4efd6064f18365 /libavcodec/mpeg12dec.c | |
parent | ec6c1b1d832ec3261cc3faf93a18d7b2a84883c6 (diff) | |
download | ffmpeg-38f64c03301ac66d7b54b3e4bd2bf6454f9fb2d3.tar.gz |
mpeg12decdata.h: Move all tables to the only place they are used
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r-- | libavcodec/mpeg12dec.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 2465b1ea6c..d9b49f3ab9 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -34,7 +34,6 @@ #include "error_resilience.h" #include "mpeg12.h" #include "mpeg12data.h" -#include "mpeg12decdata.h" #include "bytestream.h" #include "xvmc_internal.h" #include "thread.h" @@ -54,6 +53,39 @@ typedef struct Mpeg1Context { int extradata_decoded; } Mpeg1Context; +#define MB_TYPE_ZERO_MV 0x20000000 + +static const uint32_t ptype2mb_type[7] = { + MB_TYPE_INTRA, + MB_TYPE_L0 | MB_TYPE_CBP | MB_TYPE_ZERO_MV | MB_TYPE_16x16, + MB_TYPE_L0, + MB_TYPE_L0 | MB_TYPE_CBP, + MB_TYPE_QUANT | MB_TYPE_INTRA, + MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP | MB_TYPE_ZERO_MV | MB_TYPE_16x16, + MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP, +}; + +static const uint32_t btype2mb_type[11] = { + MB_TYPE_INTRA, + MB_TYPE_L1, + MB_TYPE_L1 | MB_TYPE_CBP, + MB_TYPE_L0, + MB_TYPE_L0 | MB_TYPE_CBP, + MB_TYPE_L0L1, + MB_TYPE_L0L1 | MB_TYPE_CBP, + MB_TYPE_QUANT | MB_TYPE_INTRA, + MB_TYPE_QUANT | MB_TYPE_L1 | MB_TYPE_CBP, + MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP, + MB_TYPE_QUANT | MB_TYPE_L0L1 | MB_TYPE_CBP, +}; + +static const uint8_t non_linear_qscale[32] = { + 0, 1, 2, 3, 4, 5, 6, 7, + 8,10,12,14,16,18,20,22, + 24,28,32,36,40,44,48,52, + 56,64,72,80,88,96,104,112, +}; + /* as H.263, but only 17 codes */ static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred) { |