armVCM4P2_Lookup_Tables.c revision 21e525fdcc234c22d843a8bf1a4ec35c4b376314
1 /**
2 *
3 * File Name:  armVCM4P2_Lookup_Tables.c
4 * OpenMAX DL: v1.0.2
5 * Revision:   12290
6 * Date:       Wednesday, April 9, 2008
7 *
8 * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
9 *
10 *
11 *
12 * File:        armVCM4P2_Lookup_Tables.c
13 * Description: Contains all the Lookup tables used in MPEG4 codec
14 *
15 */
16
17#include "omxtypes.h"
18#include "armOMX.h"
19
20    /* * Table Entries contain Dc Scaler values
21       * armVCM4P2_DCScaler[i]= 8           for i=1  to  4 and i=33 to 36
22       *                      = 2*i         for i=5  to  8
23       *                      = i+8         for i=9  to  25
24       *                      = 2*i-16      for i=26 to  31
25       *                      = (i-32+13)/2 for i=37 to  59
26       *                      = i-6-32      for i=60 to  63
27       *                      = 255         for i=0 and i=32
28       */
29
30const OMX_U8 armVCM4P2_DCScaler[64]={
31	0xff, 0x8,  0x8,  0x8,  0x8,  0xa,  0xc,  0xe,
32    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
33    0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
34    0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e,
35    0xff, 0x8,  0x8,  0x8,  0x8,  0x9,  0x9,  0xa,
36    0xa,  0xb,  0xb,  0xc,  0xc,  0xd,  0xd,  0xe,
37    0xe,  0xf,  0xf,  0x10, 0x10, 0x11, 0x11, 0x12,
38    0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
39
40};
41
42
43     /*  Table Entries Contain reciprocal of 1 to 63
44      *  armVCM4P2_Reciprocal_QP_S16[i]=round(32767/i)
45      *  armVCM4P2_Reciprocal_QP_S16[0]= 0
46      */
47
48const OMX_S16 armVCM4P2_Reciprocal_QP_S16[64]={
49	0x0000,0x7fff,0x4000,0x2aaa,0x2000,0x1999,0x1555,0x1249,
50    0x1000,0x0e39,0x0ccd,0x0ba3,0x0aab,0x09d9,0x0925,0x0888,
51    0x0800,0x0787,0x071c,0x06bd,0x0666,0x0618,0x05d1,0x0591,
52    0x0555,0x051f,0x04ec,0x04be,0x0492,0x046a,0x0444,0x0421,
53    0x0400,0x03e1,0x03c4,0x03a8,0x038e,0x0376,0x035e,0x0348,
54    0x0333,0x031f,0x030c,0x02fa,0x02e9,0x02d8,0x02c8,0x02b9,
55    0x02ab,0x029d,0x028f,0x0282,0x0276,0x026a,0x025f,0x0254,
56    0x0249,0x023f,0x0235,0x022b,0x0222,0x0219,0x0211,0x0208
57
58};
59
60      /* Table Entries Contain reciprocal of 1 to 63
61       * armVCM4P2_Reciprocal_QP_S32[i]=round(131071/i)
62       * armVCM4P2_Reciprocal_QP_S32[0]= 0
63       */
64
65const OMX_S32 armVCM4P2_Reciprocal_QP_S32[64]={
66	0x00000000,0x0001ffff,0x00010000,0x0000aaaa, 0x00008000, 0x00006666, 0x00005555, 0x00004924,
67    0x00004000,0x000038e3,0x00003333,0x00002e8c, 0x00002aab, 0x00002762, 0x00002492, 0x00002222,
68    0x00002000,0x00001e1e,0x00001c72,0x00001af2, 0x0000199a, 0x00001861, 0x00001746, 0x00001643,
69    0x00001555,0x0000147b,0x000013b1,0x000012f6, 0x00001249, 0x000011a8, 0x00001111, 0x00001084,
70    0x00001000,0x00000f84,0x00000f0f,0x00000ea1, 0x00000e39, 0x00000dd6, 0x00000d79, 0x00000d21,
71    0x00000ccd,0x00000c7d,0x00000c31,0x00000be8, 0x00000ba3, 0x00000b61, 0x00000b21, 0x00000ae5,
72    0x00000aab,0x00000a73,0x00000a3d,0x00000a0a, 0x000009d9, 0x000009a9, 0x0000097b, 0x0000094f,
73    0x00000925,0x000008fb,0x000008d4,0x000008ae, 0x00000889, 0x00000865, 0x00000842, 0x00000820
74
75};
76