00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00028 #ifndef AVCODEC_MPEG12DECDATA_H
00029 #define AVCODEC_MPEG12DECDATA_H
00030
00031 #include <stdint.h>
00032 #include "mpegvideo.h"
00033
00034
00035 #define MB_TYPE_ZERO_MV 0x20000000
00036 #define IS_ZERO_MV(a) ((a)&MB_TYPE_ZERO_MV)
00037
00038 static const uint8_t table_mb_ptype[7][2] = {
00039 { 3, 5 },
00040 { 1, 2 },
00041 { 1, 3 },
00042 { 1, 1 },
00043 { 1, 6 },
00044 { 1, 5 },
00045 { 2, 5 },
00046 };
00047
00048 static const uint32_t ptype2mb_type[7] = {
00049 MB_TYPE_INTRA,
00050 MB_TYPE_L0 | MB_TYPE_CBP | MB_TYPE_ZERO_MV | MB_TYPE_16x16,
00051 MB_TYPE_L0,
00052 MB_TYPE_L0 | MB_TYPE_CBP,
00053 MB_TYPE_QUANT | MB_TYPE_INTRA,
00054 MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP | MB_TYPE_ZERO_MV | MB_TYPE_16x16,
00055 MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP,
00056 };
00057
00058 static const uint8_t table_mb_btype[11][2] = {
00059 { 3, 5 },
00060 { 2, 3 },
00061 { 3, 3 },
00062 { 2, 4 },
00063 { 3, 4 },
00064 { 2, 2 },
00065 { 3, 2 },
00066 { 1, 6 },
00067 { 2, 6 },
00068 { 3, 6 },
00069 { 2, 5 },
00070 };
00071
00072 static const uint32_t btype2mb_type[11] = {
00073 MB_TYPE_INTRA,
00074 MB_TYPE_L1,
00075 MB_TYPE_L1 | MB_TYPE_CBP,
00076 MB_TYPE_L0,
00077 MB_TYPE_L0 | MB_TYPE_CBP,
00078 MB_TYPE_L0L1,
00079 MB_TYPE_L0L1 | MB_TYPE_CBP,
00080 MB_TYPE_QUANT | MB_TYPE_INTRA,
00081 MB_TYPE_QUANT | MB_TYPE_L1 | MB_TYPE_CBP,
00082 MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP,
00083 MB_TYPE_QUANT | MB_TYPE_L0L1 | MB_TYPE_CBP,
00084 };
00085
00086 static const uint8_t non_linear_qscale[32] = {
00087 0, 1, 2, 3, 4, 5, 6, 7,
00088 8,10,12,14,16,18,20,22,
00089 24,28,32,36,40,44,48,52,
00090 56,64,72,80,88,96,104,112,
00091 };
00092
00093 #endif