summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-16 13:13:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-16 13:13:58 +0200
commitdbcee7cc5c26fd6bf5007076493f9d9c81c5bf8c (patch)
tree5a195f55fcc76c605776ff9e7a509a5f0b01c1d9 /libavcodec/mpeg12.c
parent89f4812cda5f91b46531637f2f76e6dd0bbfba79 (diff)
parent38f64c03301ac66d7b54b3e4bd2bf6454f9fb2d3 (diff)
Merge commit '38f64c03301ac66d7b54b3e4bd2bf6454f9fb2d3'
* commit '38f64c03301ac66d7b54b3e4bd2bf6454f9fb2d3': mpeg12decdata.h: Move all tables to the only place they are used Conflicts: libavcodec/mpeg12decdata.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index e7602e77af..184f953ac4 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -38,13 +38,36 @@
#include "error_resilience.h"
#include "mpeg12.h"
#include "mpeg12data.h"
-#include "mpeg12decdata.h"
#include "bytestream.h"
#include "xvmc_internal.h"
#include "thread.h"
uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
+static const uint8_t table_mb_ptype[7][2] = {
+ { 3, 5 }, // 0x01 MB_INTRA
+ { 1, 2 }, // 0x02 MB_PAT
+ { 1, 3 }, // 0x08 MB_FOR
+ { 1, 1 }, // 0x0A MB_FOR|MB_PAT
+ { 1, 6 }, // 0x11 MB_QUANT|MB_INTRA
+ { 1, 5 }, // 0x12 MB_QUANT|MB_PAT
+ { 2, 5 }, // 0x1A MB_QUANT|MB_FOR|MB_PAT
+};
+
+static const uint8_t table_mb_btype[11][2] = {
+ { 3, 5 }, // 0x01 MB_INTRA
+ { 2, 3 }, // 0x04 MB_BACK
+ { 3, 3 }, // 0x06 MB_BACK|MB_PAT
+ { 2, 4 }, // 0x08 MB_FOR
+ { 3, 4 }, // 0x0A MB_FOR|MB_PAT
+ { 2, 2 }, // 0x0C MB_FOR|MB_BACK
+ { 3, 2 }, // 0x0E MB_FOR|MB_BACK|MB_PAT
+ { 1, 6 }, // 0x11 MB_QUANT|MB_INTRA
+ { 2, 6 }, // 0x16 MB_QUANT|MB_BACK|MB_PAT
+ { 3, 6 }, // 0x1A MB_QUANT|MB_FOR|MB_PAT
+ { 2, 5 }, // 0x1E MB_QUANT|MB_FOR|MB_BACK|MB_PAT
+};
+
#define INIT_2D_VLC_RL(rl, static_size)\
{\
static RL_VLC_ELEM rl_vlc_table[static_size];\