PandA-2024.02
mpeg2.c
Go to the documentation of this file.
1 /*
2 +--------------------------------------------------------------------------+
3 | CHStone : a suite of benchmark programs for C-based High-Level Synthesis |
4 | ======================================================================== |
5 | |
6 | * Collected and Modified : Y. Hara, H. Tomiyama, S. Honda, |
7 | H. Takada and K. Ishii |
8 | Nagoya University, Japan |
9 | |
10 | * Remark : |
11 | 1. This source code is modified to unify the formats of the benchmark |
12 | programs in CHStone. |
13 | 2. Test vectors are added for CHStone. |
14 | 3. If "main_result" is 0 at the end of the program, the program is |
15 | correctly executed. |
16 | 4. Please follow the copyright of each benchmark program. |
17 +--------------------------------------------------------------------------+
18 */
19 /*
20  * Copyright (C) 2008
21  * Y. Hara, H. Tomiyama, S. Honda, H. Takada and K. Ishii
22  * Nagoya University, Japan
23  * All rights reserved.
24  *
25  * Disclaimer of Warranty
26  *
27  * These software programs are available to the user without any license fee or
28  * royalty on an "as is" basis. The authors disclaims any and all warranties,
29  * whether express, implied, or statuary, including any implied warranties or
30  * merchantability or of fitness for a particular purpose. In no event shall the
31  * copyright-holder be liable for any incidental, punitive, or consequential damages
32  * of any kind whatsoever arising from the use of these programs. This disclaimer
33  * of warranty extends to the user of these programs and user's customers, employees,
34  * agents, transferees, successors, and assigns.
35  *
36  */
37 #include <stdio.h>
38 
39 #define Num 2048
40 
41 /*
42 +--------------------------------------------------------------------------+
43 | * Test Vectors (added for CHStone) |
44 | inRdbfr, inPMV, inPMV : input data |
45 | outPMV, outmvfs : expected output data |
46 +--------------------------------------------------------------------------+
47 */
48 const unsigned char inRdbfr[Num] = {
49  0, 104, 120, 48, 72, 32, 160, 192, 192, 64, 56, 248, 248, 88, 136, 224, 200,
50  208, 176, 72, 96, 40, 184, 160, 32, 32, 120, 168, 64, 32, 72, 184,
51  216, 240, 0, 216, 192, 64, 112, 48, 160, 152, 40, 176, 32, 32, 248, 200,
52  104, 24, 216, 240, 128, 176, 72, 232, 240, 184, 48, 120, 48, 192, 64, 168,
53  160, 128, 160, 160, 232, 208, 104, 120, 232, 120, 8, 184, 120, 200, 64, 160,
54  200, 224, 64, 168, 40, 120, 80, 104, 16, 0, 8, 120, 144, 136, 80, 144,
55  72, 24, 128, 216, 216, 24, 80, 16, 64, 32, 200, 112, 128, 144, 88, 24, 112,
56  120, 32, 104, 72, 176, 24, 16, 184, 56, 24, 200, 152, 152, 48, 48,
57  136, 80, 240, 8, 216, 200, 240, 32, 168, 112, 48, 56, 40, 192, 232, 32, 48,
58  232, 232, 32, 0, 88, 208, 24, 240, 72, 120, 96, 248, 136, 224, 208,
59  8, 184, 192, 144, 88, 48, 144, 136, 112, 192, 96, 240, 200, 160, 184, 160,
60  24, 48, 208, 152, 128, 184, 184, 144, 144, 168, 240, 144, 160, 168, 48,
61  48,
62  24, 200, 144, 120, 208, 56, 96, 72, 48, 88, 80, 200, 248, 208, 248, 40, 136,
63  112, 32, 8, 8, 80, 192, 40, 32, 224, 56, 192, 200, 56, 56, 232,
64  200, 80, 120, 8, 184, 216, 232, 80, 168, 128, 32, 216, 136, 104, 248, 168,
65  248, 8, 192, 168, 192, 56, 240, 192, 208, 136, 120, 48, 224, 112, 168, 80,
66  192, 96, 80, 120, 120, 16, 120, 48, 168, 168, 160, 224, 128, 24, 72, 24,
67  248, 240, 152, 160, 208, 56, 192, 56, 88, 128, 192, 136, 128, 208, 112,
68  40,
69  64, 192, 32, 176, 80, 56, 168, 208, 24, 168, 168, 248, 240, 136, 96, 32, 56,
70  184, 8, 136, 16, 0, 176, 40, 0, 32, 104, 160, 56, 88, 232, 56,
71  0, 240, 184, 232, 88, 32, 176, 0, 216, 248, 184, 40, 16, 80, 8, 208, 64,
72  224, 72, 40, 72, 72, 144, 80, 144, 120, 136, 64, 184, 160, 136, 16,
73  48, 104, 232, 104, 104, 72, 208, 72, 192, 184, 40, 56, 232, 72, 160, 80,
74  152, 232, 248, 32, 224, 40, 0, 168, 24, 96, 112, 160, 152, 8, 32, 160,
75  104, 208, 32, 24, 248, 8, 248, 144, 120, 16, 192, 88, 152, 176, 200, 160,
76  152, 160, 96, 168, 240, 16, 248, 176, 24, 216, 0, 56, 80, 248, 96, 8,
77  128, 32, 192, 104, 48, 208, 240, 184, 128, 80, 56, 192, 0, 112, 176, 48, 96,
78  56, 24, 56, 24, 32, 24, 96, 80, 0, 64, 112, 48, 24, 88, 56,
79  152, 224, 160, 192, 184, 72, 248, 128, 8, 8, 104, 104, 200, 48, 136, 136,
80  208, 144, 80, 40, 136, 96, 8, 208, 160, 104, 160, 80, 64, 96, 176, 144,
81  8, 56, 88, 88, 208, 120, 48, 240, 240, 96, 248, 192, 104, 128, 248, 24, 104,
82  72, 64, 120, 248, 192, 48, 192, 32, 80, 144, 16, 80, 96, 112, 184,
83  56, 80, 248, 232, 0, 40, 248, 56, 192, 32, 192, 96, 248, 48, 136, 224, 80,
84  0, 192, 128, 104, 120, 208, 128, 0, 176, 216, 8, 192, 96, 16, 40,
85  184, 96, 32, 72, 80, 192, 104, 104, 136, 0, 16, 160, 24, 104, 48, 8, 24,
86  152, 120, 128, 72, 32, 176, 112, 104, 120, 16, 32, 144, 160, 56, 240,
87  0, 232, 184, 24, 16, 208, 200, 240, 200, 200, 104, 112, 24, 208, 128, 168,
88  248, 64, 152, 120, 64, 224, 128, 208, 120, 216, 16, 152, 48, 144, 240, 80,
89  144, 224, 48, 160, 192, 248, 0, 128, 120, 128, 160, 232, 168, 208, 112, 112,
90  104, 184, 8, 192, 56, 176, 40, 96, 64, 72, 104, 216, 152, 216, 80, 152,
91  184, 216, 32, 56, 32, 64, 240, 152, 240, 168, 136, 8, 232, 168, 128, 88, 72,
92  128, 8, 192, 48, 120, 112, 32, 144, 208, 192, 216, 16, 176, 168, 160,
93  168, 88, 136, 56, 8, 64, 0, 80, 216, 104, 64, 80, 88, 208, 64, 80, 200, 24,
94  120, 160, 80, 72, 56, 216, 24, 56, 72, 40, 72, 0, 56, 136,
95  56, 200, 72, 136, 88, 72, 136, 240, 0, 176, 176, 152, 192, 248, 224, 240,
96  72, 8, 112, 232, 200, 120, 16, 0, 40, 48, 64, 72, 32, 136, 104, 152,
97  16, 240, 184, 80, 0, 152, 32, 176, 128, 120, 0, 160, 40, 64, 112, 40, 80,
98  48, 144, 96, 168, 0, 152, 72, 184, 136, 88, 152, 184, 48, 88, 152,
99  96, 216, 240, 184, 200, 136, 64, 104, 112, 232, 0, 208, 176, 128, 112, 248,
100  144, 248, 120, 112, 0, 120, 240, 88, 88, 88, 8, 248, 80, 8, 64, 216,
101  240, 56, 56, 144, 112, 208, 144, 72, 16, 160, 136, 216, 176, 112, 56, 8,
102  168, 104, 72, 40, 176, 88, 40, 120, 24, 40, 56, 104, 40, 160, 232, 160,
103  24, 144, 144, 232, 120, 144, 112, 96, 136, 176, 8, 128, 112, 184, 96, 120,
104  64, 112, 0, 184, 80, 72, 184, 80, 144, 72, 120, 200, 168, 32, 24, 0,
105  144, 72, 24, 248, 24, 152, 72, 128, 0, 8, 224, 32, 72, 72, 48, 112, 232, 16,
106  240, 24, 64, 32, 232, 120, 168, 200, 152, 112, 8, 144, 0, 120,
107  112, 0, 112, 144, 72, 160, 24, 216, 112, 128, 224, 152, 104, 136, 40, 0, 16,
108  144, 48, 248, 136, 48, 64, 88, 152, 208, 248, 16, 112, 224, 184, 168,
109  40, 168, 64, 248, 144, 104, 200, 144, 152, 16, 168, 192, 240, 96, 72, 136,
110  216, 136, 0, 32, 192, 112, 240, 160, 248, 184, 16, 48, 232, 88, 160, 16,
111  104, 176, 144, 136, 24, 240, 184, 160, 8, 16, 32, 56, 176, 144, 168, 168,
112  56, 88, 88, 104, 248, 184, 96, 32, 128, 88, 224, 240, 32, 120, 216, 136,
113  8, 72, 80, 104, 120, 152, 32, 96, 232, 80, 232, 24, 80, 200, 208, 216, 184,
114  16, 56, 40, 216, 208, 128, 120, 16, 16, 80, 200, 144, 104, 160, 72,
115  24, 136, 176, 32, 192, 120, 136, 80, 16, 88, 208, 160, 16, 232, 40, 24, 144,
116  208, 32, 16, 88, 192, 48, 176, 152, 24, 160, 32, 80, 24, 240, 80,
117  160, 152, 160, 128, 80, 88, 40, 184, 208, 144, 48, 200, 200, 48, 112, 144,
118  104, 224, 144, 224, 200, 8, 224, 240, 32, 152, 232, 16, 8, 80, 184, 40,
119  184, 248, 64, 8, 232, 16, 88, 88, 8, 120, 128, 48, 240, 88, 64, 104, 104,
120  248, 96, 240, 192, 152, 208, 56, 152, 240, 136, 8, 216, 24, 112, 168,
121  88, 136, 80, 224, 136, 152, 40, 24, 248, 216, 152, 136, 96, 224, 64, 80, 56,
122  56, 72, 8, 24, 64, 144, 24, 208, 216, 128, 120, 96, 168, 120, 152,
123  112, 232, 136, 80, 72, 96, 152, 208, 72, 216, 64, 120, 120, 48, 232, 72,
124  184, 176, 48, 232, 200, 184, 120, 72, 112, 128, 248, 160, 168, 216, 152,
125  80,
126  176, 112, 48, 152, 112, 64, 40, 200, 232, 80, 160, 56, 216, 192, 168, 72,
127  40, 64, 208, 32, 224, 240, 24, 104, 232, 240, 168, 24, 248, 32, 80, 152,
128  144, 160, 112, 120, 96, 240, 64, 160, 248, 248, 152, 48, 112, 88, 128, 232,
129  240, 240, 232, 168, 120, 32, 152, 176, 104, 16, 80, 152, 240, 224, 128,
130  16,
131  48, 32, 216, 8, 104, 248, 184, 208, 216, 120, 80, 208, 128, 56, 112, 40,
132  184, 16, 224, 168, 152, 248, 56, 144, 168, 224, 8, 168, 80, 136, 152, 48,
133  96, 0, 184, 88, 192, 24, 16, 128, 0, 176, 152, 40, 96, 72, 192, 0, 32, 128,
134  24, 240, 48, 248, 176, 120, 16, 168, 224, 72, 8, 200, 48, 176,
135  112, 224, 160, 8, 152, 64, 16, 16, 240, 224, 64, 144, 128, 80, 184, 40, 232,
136  200, 112, 248, 24, 112, 176, 128, 128, 56, 40, 152, 24, 184, 120, 104,
137  72, 64, 200, 48, 224, 0, 56, 232, 32, 240, 184, 104, 104, 32, 192, 200, 200,
138  64, 152, 72, 216, 216, 80, 0, 80, 0, 0, 160, 120, 40, 136, 240,
139  32, 120, 152, 216, 56, 112, 16, 24, 8, 120, 104, 192, 144, 176, 8, 16, 96,
140  104, 168, 80, 192, 232, 112, 112, 56, 88, 176, 240, 32, 176, 248, 80,
141  176, 24, 224, 192, 8, 176, 168, 16, 232, 248, 16, 16, 104, 128, 232, 0, 32,
142  240, 112, 32, 184, 184, 56, 232, 80, 144, 16, 72, 240, 208, 64, 176,
143  240, 16, 136, 16, 80, 192, 24, 72, 216, 56, 80, 216, 32, 144, 72, 24, 64,
144  248, 0, 224, 72, 32, 136, 232, 240, 72, 32, 88, 128, 104, 16, 8,
145  32, 192, 224, 8, 152, 248, 224, 0, 176, 48, 16, 104, 216, 176, 24, 240, 200,
146  80, 248, 208, 128, 200, 72, 8, 152, 128, 80, 120, 80, 152, 232, 200,
147  168, 88, 16, 176, 232, 40, 72, 208, 232, 112, 240, 112, 80, 176, 176, 16,
148  72, 120, 32, 184, 224, 80, 24, 176, 0, 208, 16, 56, 112, 16, 120, 160,
149  24, 216, 128, 136, 192, 152, 248, 120, 160, 56, 192, 224, 0, 136, 112, 112,
150  8, 8, 184, 168, 88, 160, 120, 160, 240, 168, 32, 40, 168, 88, 8, 16,
151  24, 104, 104, 48, 248, 136, 72, 144, 128, 160, 216, 88, 240, 120, 232, 72,
152  192, 200, 248, 192, 48, 240, 104, 208, 40, 104, 16, 128, 80, 224, 224, 56,
153  56, 120, 40, 24, 176, 16, 184, 24, 176, 224, 168, 16, 184, 104, 136, 200,
154  168, 208, 120, 200, 224, 40, 208, 16, 112, 160, 192, 224, 64, 40, 232,
155  120,
156  24, 232, 168, 80, 88, 144, 104, 72, 192, 112, 0, 112, 104, 224, 232, 160,
157  112, 208, 176, 216, 56, 224, 224, 160, 104, 56, 176, 216, 192, 24, 208, 8,
158  40, 56, 248, 8, 120, 184, 128, 40, 168, 56, 184, 192, 136, 96, 72, 216, 8,
159  64, 72, 56, 16, 176, 144, 16, 128, 176, 136, 208, 120, 16, 184, 224,
160  160, 216, 144, 88, 208, 200, 144, 96, 152, 200, 224, 208, 240, 120, 8, 104,
161  184, 112, 168, 200, 112, 72, 0, 192, 0, 40, 120, 136, 112, 40, 152, 56,
162  144, 32, 224, 240, 32, 192, 56, 200, 16, 136, 104, 192, 192, 0, 0, 0, 8,
163  232, 104, 240, 88, 192, 8, 168, 216, 208, 184, 224, 240, 72, 152, 72,
164  168, 184, 176, 216, 48, 144, 80, 32, 184, 208, 112, 160, 88, 88, 8, 144,
165  144, 120, 152, 48, 200, 168, 112, 8, 160, 216, 240, 128, 104, 128, 144,
166  248,
167  64, 168, 136, 240, 160, 56, 136, 216, 80, 56, 192, 32, 64, 128, 80, 32, 32,
168  96, 88, 200, 152, 72, 160, 16, 128, 200, 160, 144, 112, 16, 112, 152,
169  56, 136, 56, 216, 8, 24, 192, 144, 176, 200, 48, 72, 40, 72, 240, 120, 120,
170  160, 80, 152, 144, 216, 224, 152, 40, 144, 160, 88, 184, 184, 192, 128,
171  0, 200, 72, 112, 208, 248, 152, 0, 152, 8, 40, 16, 168, 152, 64, 176, 88,
172  24, 232, 136, 32, 152, 232, 208, 192, 240, 136, 0, 232, 200, 8, 216,
173  104, 184, 64, 192, 8, 96, 184, 120, 208, 80, 16, 64, 136, 136, 72, 8, 112,
174  184, 248, 120, 136, 8, 56, 232, 208, 96, 16, 64, 168, 112, 48, 32,
175  184, 224, 72, 88, 128, 184, 72, 168, 224, 216, 160, 232, 64, 168, 48, 152,
176  64, 152, 16, 200, 168, 56, 144, 192, 64, 120, 168, 8, 128, 216, 16, 8,
177  104, 32, 128, 96, 160, 88, 136, 96, 56, 16, 128, 56, 88, 16, 208, 200, 24,
178  96, 240, 32, 232, 192, 104, 168, 40, 0, 192, 40, 200, 96, 184, 8,
179  72, 216, 104, 232, 112, 248, 8, 8, 248, 192, 152, 32, 0, 168, 232, 80, 248,
180  64, 8, 24, 80, 32, 96, 240, 232, 48, 80, 16, 144, 200, 16, 48,
181  88, 40, 112, 232, 88, 168, 56, 160, 232, 16, 128, 248, 48, 80, 200, 168,
182  152, 72, 216, 224, 72, 208, 152, 192, 0, 224, 48, 136, 168, 96, 16, 152
183 };
184 const unsigned char out_ld_Rdptr[Num] = {
185  72, 184, 216, 240, 0, 216, 192, 64, 112, 48, 160, 152, 40, 176, 32, 32, 248,
186  200, 104, 24, 216, 240, 128, 176, 72, 232, 240, 184, 48, 120, 48, 192,
187  64, 168, 160, 128, 160, 160, 232, 208, 104, 120, 232, 120, 8, 184, 120, 200,
188  64, 160, 200, 224, 64, 168, 40, 120, 80, 104, 16, 0, 8, 120, 144, 136,
189  80, 144, 72, 24, 128, 216, 216, 24, 80, 16, 64, 32, 200, 112, 128, 144, 88,
190  24, 112, 120, 32, 104, 72, 176, 24, 16, 184, 56, 24, 200, 152, 152,
191  48, 48, 136, 80, 240, 8, 216, 200, 240, 32, 168, 112, 48, 56, 40, 192, 232,
192  32, 48, 232, 232, 32, 0, 88, 208, 24, 240, 72, 120, 96, 248, 136,
193  224, 208, 8, 184, 192, 144, 88, 48, 144, 136, 112, 192, 96, 240, 200, 160,
194  184, 160, 24, 48, 208, 152, 128, 184, 184, 144, 144, 168, 240, 144, 160,
195  168,
196  48, 48, 24, 200, 144, 120, 208, 56, 96, 72, 48, 88, 80, 200, 248, 208, 248,
197  40, 136, 112, 32, 8, 8, 80, 192, 40, 32, 224, 56, 192, 200, 56,
198  56, 232, 200, 80, 120, 8, 184, 216, 232, 80, 168, 128, 32, 216, 136, 104,
199  248, 168, 248, 8, 192, 168, 192, 56, 240, 192, 208, 136, 120, 48, 224,
200  112,
201  168, 80, 192, 96, 80, 120, 120, 16, 120, 48, 168, 168, 160, 224, 128, 24,
202  72, 24, 248, 240, 152, 160, 208, 56, 192, 56, 88, 128, 192, 136, 128, 208,
203  112, 40, 64, 192, 32, 176, 80, 56, 168, 208, 24, 168, 168, 248, 240, 136,
204  96, 32, 56, 184, 8, 136, 16, 0, 176, 40, 0, 32, 104, 160, 56, 88,
205  232, 56, 0, 240, 184, 232, 88, 32, 176, 0, 216, 248, 184, 40, 16, 80, 8,
206  208, 64, 224, 72, 40, 72, 72, 144, 80, 144, 120, 136, 64, 184, 160,
207  136, 16, 48, 104, 232, 104, 104, 72, 208, 72, 192, 184, 40, 56, 232, 72,
208  160, 80, 152, 232, 248, 32, 224, 40, 0, 168, 24, 96, 112, 160, 152, 8,
209  32, 160, 104, 208, 32, 24, 248, 8, 248, 144, 120, 16, 192, 88, 152, 176,
210  200, 160, 152, 160, 96, 168, 240, 16, 248, 176, 24, 216, 0, 56, 80, 248,
211  96, 8, 128, 32, 192, 104, 48, 208, 240, 184, 128, 80, 56, 192, 0, 112, 176,
212  48, 96, 56, 24, 56, 24, 32, 24, 96, 80, 0, 64, 112, 48, 24,
213  88, 56, 152, 224, 160, 192, 184, 72, 248, 128, 8, 8, 104, 104, 200, 48, 136,
214  136, 208, 144, 80, 40, 136, 96, 8, 208, 160, 104, 160, 80, 64, 96,
215  176, 144, 8, 56, 88, 88, 208, 120, 48, 240, 240, 96, 248, 192, 104, 128,
216  248, 24, 104, 72, 64, 120, 248, 192, 48, 192, 32, 80, 144, 16, 80, 96,
217  112, 184, 56, 80, 248, 232, 0, 40, 248, 56, 192, 32, 192, 96, 248, 48, 136,
218  224, 80, 0, 192, 128, 104, 120, 208, 128, 0, 176, 216, 8, 192, 96,
219  16, 40, 184, 96, 32, 72, 80, 192, 104, 104, 136, 0, 16, 160, 24, 104, 48, 8,
220  24, 152, 120, 128, 72, 32, 176, 112, 104, 120, 16, 32, 144, 160,
221  56, 240, 0, 232, 184, 24, 16, 208, 200, 240, 200, 200, 104, 112, 24, 208,
222  128, 168, 248, 64, 152, 120, 64, 224, 128, 208, 120, 216, 16, 152, 48,
223  144,
224  240, 80, 144, 224, 48, 160, 192, 248, 0, 128, 120, 128, 160, 232, 168, 208,
225  112, 112, 104, 184, 8, 192, 56, 176, 40, 96, 64, 72, 104, 216, 152, 216,
226  80, 152, 184, 216, 32, 56, 32, 64, 240, 152, 240, 168, 136, 8, 232, 168,
227  128, 88, 72, 128, 8, 192, 48, 120, 112, 32, 144, 208, 192, 216, 16, 176,
228  168, 160, 168, 88, 136, 56, 8, 64, 0, 80, 216, 104, 64, 80, 88, 208, 64, 80,
229  200, 24, 120, 160, 80, 72, 56, 216, 24, 56, 72, 40, 72, 0,
230  56, 136, 56, 200, 72, 136, 88, 72, 136, 240, 0, 176, 176, 152, 192, 248,
231  224, 240, 72, 8, 112, 232, 200, 120, 16, 0, 40, 48, 64, 72, 32, 136,
232  104, 152, 16, 240, 184, 80, 0, 152, 32, 176, 128, 120, 0, 160, 40, 64, 112,
233  40, 80, 48, 144, 96, 168, 0, 152, 72, 184, 136, 88, 152, 184, 48,
234  88, 152, 96, 216, 240, 184, 200, 136, 64, 104, 112, 232, 0, 208, 176, 128,
235  112, 248, 144, 248, 120, 112, 0, 120, 240, 88, 88, 88, 8, 248, 80, 8,
236  64, 216, 240, 56, 56, 144, 112, 208, 144, 72, 16, 160, 136, 216, 176, 112,
237  56, 8, 168, 104, 72, 40, 176, 88, 40, 120, 24, 40, 56, 104, 40, 160,
238  232, 160, 24, 144, 144, 232, 120, 144, 112, 96, 136, 176, 8, 128, 112, 184,
239  96, 120, 64, 112, 0, 184, 80, 72, 184, 80, 144, 72, 120, 200, 168, 32,
240  24, 0, 144, 72, 24, 248, 24, 152, 72, 128, 0, 8, 224, 32, 72, 72, 48, 112,
241  232, 16, 240, 24, 64, 32, 232, 120, 168, 200, 152, 112, 8, 144,
242  0, 120, 112, 0, 112, 144, 72, 160, 24, 216, 112, 128, 224, 152, 104, 136,
243  40, 0, 16, 144, 48, 248, 136, 48, 64, 88, 152, 208, 248, 16, 112, 224,
244  184, 168, 40, 168, 64, 248, 144, 104, 200, 144, 152, 16, 168, 192, 240, 96,
245  72, 136, 216, 136, 0, 32, 192, 112, 240, 160, 248, 184, 16, 48, 232, 88,
246  160, 16, 104, 176, 144, 136, 24, 240, 184, 160, 8, 16, 32, 56, 176, 144,
247  168, 168, 56, 88, 88, 104, 248, 184, 96, 32, 128, 88, 224, 240, 32, 120,
248  216, 136, 8, 72, 80, 104, 120, 152, 32, 96, 232, 80, 232, 24, 80, 200, 208,
249  216, 184, 16, 56, 40, 216, 208, 128, 120, 16, 16, 80, 200, 144, 104,
250  160, 72, 24, 136, 176, 32, 192, 120, 136, 80, 16, 88, 208, 160, 16, 232, 40,
251  24, 144, 208, 32, 16, 88, 192, 48, 176, 152, 24, 160, 32, 80, 24,
252  240, 80, 160, 152, 160, 128, 80, 88, 40, 184, 208, 144, 48, 200, 200, 48,
253  112, 144, 104, 224, 144, 224, 200, 8, 224, 240, 32, 152, 232, 16, 8, 80,
254  184, 40, 184, 248, 64, 8, 232, 16, 88, 88, 8, 120, 128, 48, 240, 88, 64,
255  104, 104, 248, 96, 240, 192, 152, 208, 56, 152, 240, 136, 8, 216, 24,
256  112, 168, 88, 136, 80, 224, 136, 152, 40, 24, 248, 216, 152, 136, 96, 224,
257  64, 80, 56, 56, 72, 8, 24, 64, 144, 24, 208, 216, 128, 120, 96, 168,
258  120, 152, 112, 232, 136, 80, 72, 96, 152, 208, 72, 216, 64, 120, 120, 48,
259  232, 72, 184, 176, 48, 232, 200, 184, 120, 72, 112, 128, 248, 160, 168,
260  216,
261  152, 80, 176, 112, 48, 152, 112, 64, 40, 200, 232, 80, 160, 56, 216, 192,
262  168, 72, 40, 64, 208, 32, 224, 240, 24, 104, 232, 240, 168, 24, 248, 32,
263  80, 152, 144, 160, 112, 120, 96, 240, 64, 160, 248, 248, 152, 48, 112, 88,
264  128, 232, 240, 240, 232, 168, 120, 32, 152, 176, 104, 16, 80, 152, 240,
265  224,
266  128, 16, 48, 32, 216, 8, 104, 248, 184, 208, 216, 120, 80, 208, 128, 56,
267  112, 40, 184, 16, 224, 168, 152, 248, 56, 144, 168, 224, 8, 168, 80, 136,
268  152, 48, 96, 0, 184, 88, 192, 24, 16, 128, 0, 176, 152, 40, 96, 72, 192, 0,
269  32, 128, 24, 240, 48, 248, 176, 120, 16, 168, 224, 72, 8, 200,
270  48, 176, 112, 224, 160, 8, 152, 64, 16, 16, 240, 224, 64, 144, 128, 80, 184,
271  40, 232, 200, 112, 248, 24, 112, 176, 128, 128, 56, 40, 152, 24, 184,
272  120, 104, 72, 64, 200, 48, 224, 0, 56, 232, 32, 240, 184, 104, 104, 32, 192,
273  200, 200, 64, 152, 72, 216, 216, 80, 0, 80, 0, 0, 160, 120, 40,
274  136, 240, 32, 120, 152, 216, 56, 112, 16, 24, 8, 120, 104, 192, 144, 176, 8,
275  16, 96, 104, 168, 80, 192, 232, 112, 112, 56, 88, 176, 240, 32, 176,
276  248, 80, 176, 24, 224, 192, 8, 176, 168, 16, 232, 248, 16, 16, 104, 128,
277  232, 0, 32, 240, 112, 32, 184, 184, 56, 232, 80, 144, 16, 72, 240, 208,
278  64, 176, 240, 16, 136, 16, 80, 192, 24, 72, 216, 56, 80, 216, 32, 144, 72,
279  24, 64, 248, 0, 224, 72, 32, 136, 232, 240, 72, 32, 88, 128, 104,
280  16, 8, 32, 192, 224, 8, 152, 248, 224, 0, 176, 48, 16, 104, 216, 176, 24,
281  240, 200, 80, 248, 208, 128, 200, 72, 8, 152, 128, 80, 120, 80, 152,
282  232, 200, 168, 88, 16, 176, 232, 40, 72, 208, 232, 112, 240, 112, 80, 176,
283  176, 16, 72, 120, 32, 184, 224, 80, 24, 176, 0, 208, 16, 56, 112, 16,
284  120, 160, 24, 216, 128, 136, 192, 152, 248, 120, 160, 56, 192, 224, 0, 136,
285  112, 112, 8, 8, 184, 168, 88, 160, 120, 160, 240, 168, 32, 40, 168, 88,
286  8, 16, 24, 104, 104, 48, 248, 136, 72, 144, 128, 160, 216, 88, 240, 120,
287  232, 72, 192, 200, 248, 192, 48, 240, 104, 208, 40, 104, 16, 128, 80, 224,
288  224, 56, 56, 120, 40, 24, 176, 16, 184, 24, 176, 224, 168, 16, 184, 104,
289  136, 200, 168, 208, 120, 200, 224, 40, 208, 16, 112, 160, 192, 224, 64,
290  40,
291  232, 120, 24, 232, 168, 80, 88, 144, 104, 72, 192, 112, 0, 112, 104, 224,
292  232, 160, 112, 208, 176, 216, 56, 224, 224, 160, 104, 56, 176, 216, 192,
293  24,
294  208, 8, 40, 56, 248, 8, 120, 184, 128, 40, 168, 56, 184, 192, 136, 96, 72,
295  216, 8, 64, 72, 56, 16, 176, 144, 16, 128, 176, 136, 208, 120, 16,
296  184, 224, 160, 216, 144, 88, 208, 200, 144, 96, 152, 200, 224, 208, 240,
297  120, 8, 104, 184, 112, 168, 200, 112, 72, 0, 192, 0, 40, 120, 136, 112,
298  40,
299  152, 56, 144, 32, 224, 240, 32, 192, 56, 200, 16, 136, 104, 192, 192, 0, 0,
300  0, 8, 232, 104, 240, 88, 192, 8, 168, 216, 208, 184, 224, 240, 72,
301  152, 72, 168, 184, 176, 216, 48, 144, 80, 32, 184, 208, 112, 160, 88, 88, 8,
302  144, 144, 120, 152, 48, 200, 168, 112, 8, 160, 216, 240, 128, 104, 128,
303  144, 248, 64, 168, 136, 240, 160, 56, 136, 216, 80, 56, 192, 32, 64, 128,
304  80, 32, 32, 96, 88, 200, 152, 72, 160, 16, 128, 200, 160, 144, 112, 16,
305  112, 152, 56, 136, 56, 216, 8, 24, 192, 144, 176, 200, 48, 72, 40, 72, 240,
306  120, 120, 160, 80, 152, 144, 216, 224, 152, 40, 144, 160, 88, 184, 184,
307  192, 128, 0, 200, 72, 112, 208, 248, 152, 0, 152, 8, 40, 16, 168, 152, 64,
308  176, 88, 24, 232, 136, 32, 152, 232, 208, 192, 240, 136, 0, 232, 200,
309  8, 216, 104, 184, 64, 192, 8, 96, 184, 120, 208, 80, 16, 64, 136, 136, 72,
310  8, 112, 184, 248, 120, 136, 8, 56, 232, 208, 96, 16, 64, 168, 112,
311  48, 32, 184, 224, 72, 88, 128, 184, 72, 168, 224, 216, 160, 232, 64, 168,
312  48, 152, 64, 152, 16, 200, 168, 56, 144, 192, 64, 120, 168, 8, 128, 216,
313  16, 8, 104, 32, 128, 96, 160, 88, 136, 96, 56, 16, 128, 56, 88, 16, 208,
314  200, 24, 96, 240, 32, 232, 192, 104, 168, 40, 0, 192, 40, 200, 96,
315  184, 8, 72, 216, 104, 232, 112, 248, 8, 8, 248, 192, 152, 32, 0, 168, 232,
316  80, 248, 64, 8, 24, 80, 32, 96, 240, 232, 48, 80, 16, 144, 200,
317  16, 48, 88, 40, 112, 232, 88, 168, 56, 160, 232, 16, 128, 248, 48, 80, 200,
318  168, 152, 72, 216, 224, 72, 208, 152, 192, 0, 224, 48, 136, 168, 96,
319  16, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 227, 227, 227,
320  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
321 };
322 const int inPMV[2][2][2] = { {{45, 207}, {70, 41}}, {{4, 180}, {120, 216}} };
323 const int inmvfs[2][2] = { {232, 200}, {32, 240} };
324 const int outPMV[2][2][2] =
325  { {{1566, 206}, {70, 41}}, {{1566, 206}, {120, 216}} };
326 const int outmvfs[2][2] = { {0, 200}, {0, 240} };
327 
328 int evalue;
329 #include "config.h"
330 #include "global.h"
331 #include "getbits.c"
332 #include "getvlc.h"
333 #include "getvlc.c"
334 #include "motion.c"
335 
336 void
338 {
339  ld_Incnt = 0;
340  ld_Rdptr = ld_Rdbfr + 2048;
341  ld_Rdmax = ld_Rdptr;
342  ld_Bfr = 68157440;
343  Flush_Buffer (0); /* fills valid data into bfr */
344 }
345 
346 int
348 {
349  int i, j, k;
350  int main_result;
351  int PMV[2][2][2];
352  int dmvector[2];
353  int motion_vertical_field_select[2][2];
354  int s, motion_vector_count, mv_format, h_r_size, v_r_size, dmv, mvscale;
355 
356  main_result = 0;
357  evalue = 0;
358  System_Stream_Flag = 0;
359  s = 0;
360  motion_vector_count = 1;
361  mv_format = 0;
362  h_r_size = 200;
363  v_r_size = 200;
364  dmv = 0;
365  mvscale = 1;
366  for (i = 0; i < 2; i++)
367  {
368  dmvector[i] = 0;
369  for (j = 0; j < 2; j++)
370  {
371  motion_vertical_field_select[i][j] = inmvfs[i][j];
372  for (k = 0; k < 2; k++)
373  PMV[i][j][k] = inPMV[i][j][k];
374  }
375  }
376 
378  motion_vectors (PMV, dmvector, motion_vertical_field_select, s,
379  motion_vector_count, mv_format, h_r_size, v_r_size, dmv,
380  mvscale);
381 
382  for (i = 0; i < 2; i++)
383  for (j = 0; j < 2; j++)
384  {
385  main_result +=
386  (motion_vertical_field_select[i][j] != outmvfs[i][j]);
387  for (k = 0; k < 2; k++)
388  main_result += (PMV[i][j][k] != outPMV[i][j][k]);
389  }
390 
391 
392  printf ("%d\n", main_result);
393  return main_result;
394 
395 }
void Flush_Buffer(int N)
Definition: getbits.c:136
const int outmvfs[2][2]
Definition: mpeg2.c:326
const unsigned char inRdbfr[Num]
Definition: mpeg2.c:48
int ld_Incnt
Definition: global.h:80
int System_Stream_Flag
Definition: global.h:75
const int outPMV[2][2][2]
Definition: mpeg2.c:324
int main_result
Definition: mips.c:38
unsigned char ld_Rdbfr[2048]
Definition: global.h:77
unsigned char * ld_Rdmax
Definition: global.h:78
const int inPMV[2][2][2]
Definition: mpeg2.c:322
#define Num
Definition: mpeg2.c:39
static const uint32_t k[]
Definition: sha-256.c:22
const unsigned char out_ld_Rdptr[Num]
Definition: mpeg2.c:184
void Initialize_Buffer()
Definition: mpeg2.c:337
int evalue
Definition: mpeg2.c:328
unsigned char * ld_Rdptr
Definition: global.h:78
const int inmvfs[2][2]
Definition: mpeg2.c:323
void motion_vectors(PMV, dmvector, motion_vertical_field_select, int s, int motion_vector_count, int mv_format, int h_r_size, int v_r_size, int dmv, int mvscale)
Definition: motion.c:55
unsigned int ld_Bfr
Definition: global.h:79
int main()
Definition: mpeg2.c:347

Generated on Mon Feb 12 2024 13:02:49 for PandA-2024.02 by doxygen 1.8.13