• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2017 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20  * OTHER DEALINGS IN THE SOFTWARE.
21  *
22 */
23 
24 #ifndef _uve_ib_h_
25 #define _uve_ib_h_
26 
27 static const uint32_t uve_session_info[] = {
28 	0x00000018,
29 	0x00000001,
30 	0x00000000,
31 	0x00010000,
32 };
33 
34 static const uint32_t uve_task_info[] = {
35 	0x00000014,
36 	0x00000002,
37 };
38 
39 static const uint32_t uve_session_init[] = {
40 	0x00000020,
41 	0x00000003,
42 	0x000000c0,
43 	0x00000080,
44 	0x00000020,
45 	0x00000000,
46 	0x00000000,
47 	0x00000000,
48 };
49 
50 static const uint32_t uve_layer_ctrl[] = {
51 	0x00000010,
52 	0x00000004,
53 	0x00000001,
54 	0x00000001,
55 };
56 
57 static const uint32_t uve_layer_select[] = {
58 	0x0000000c,
59 	0x00000005,
60 	0x00000000,
61 };
62 
63 static const uint32_t uve_slice_ctrl[] = {
64 	0x00000014,
65 	0x00000006,
66 	0x00000000,
67 	0x00000006,
68 	0x00000006,
69 };
70 
71 static const uint32_t uve_spec_misc[] = {
72 	0x00000024,
73 	0x00000007,
74 	0x00000000,
75 	0x00000000,
76 	0x00000000,
77 	0x00000000,
78 	0x00000000,
79 	0x00000001,
80 	0x00000001,
81 };
82 
83 static const uint32_t uve_rc_session_init[] = {
84 	0x00000010,
85 	0x00000008,
86 	0x00000000,
87 	0x00000040,
88 };
89 
90 static const uint32_t uve_rc_layer_init[] = {
91 	0x00000028,
92 	0x00000009,
93 	0x001e8480,
94 	0x001e8480,
95 	0x0000001e,
96 	0x00000001,
97 	0x0001046a,
98 	0x0001046a,
99 	0x0001046a,
100 	0xaaaaaaaa,
101 };
102 
103 static const uint32_t uve_deblocking_filter[] = {
104 	0x00000020,
105 	0x0000000e,
106 	0x00000000,
107 	0x00000000,
108 	0x00000000,
109 	0x00000000,
110 	0x00000000,
111 	0x00000000,
112 };
113 
114 static const uint32_t uve_quality_params[] = {
115 	0x00000014,
116 	0x0000000d,
117 	0x00000000,
118 	0x00000000,
119 	0x00000000,
120 };
121 
122 static const uint32_t uve_feedback_buffer[] = {
123 	0x0000001c,
124 	0x00000012,
125 	0x00000000,
126 };
127 
128 static const uint32_t uve_feedback_buffer_additional[] = {
129 	0x00000108,
130 	0x00000014,
131 	0x00000001,
132 	0x00000010,
133 	0x00000000,
134 	0x00000000,
135 	0x00000000,
136 	0x00000000,
137 	0x00000000,
138 	0x00000000,
139 	0x00000000,
140 	0x00000000,
141 	0x00000000,
142 	0x00000000,
143 	0x00000000,
144 	0x00000000,
145 	0x00000000,
146 	0x00000000,
147 	0x00000000,
148 	0x00000000,
149 	0x00000000,
150 	0x00000000,
151 	0x00000000,
152 	0x00000000,
153 	0x00000000,
154 	0x00000000,
155 	0x00000000,
156 	0x00000000,
157 	0x00000000,
158 	0x00000000,
159 	0x00000000,
160 	0x00000000,
161 	0x00000000,
162 	0x00000000,
163 	0x00000000,
164 	0x00000000,
165 	0x00000000,
166 	0x00000000,
167 	0x00000000,
168 	0x00000000,
169 	0x00000000,
170 	0x00000000,
171 	0x00000000,
172 	0x00000000,
173 	0x00000000,
174 	0x00000000,
175 	0x00000000,
176 	0x00000000,
177 	0x00000000,
178 	0x00000000,
179 	0x00000000,
180 	0x00000000,
181 	0x00000000,
182 	0x00000000,
183 	0x00000000,
184 	0x00000000,
185 	0x00000000,
186 	0x00000000,
187 	0x00000000,
188 	0x00000000,
189 	0x00000000,
190 	0x00000000,
191 	0x00000000,
192 	0x00000000,
193 	0x00000000,
194 	0x00000000,
195 };
196 
197 static const uint32_t uve_nalu_buffer_1[] = {
198 	0x00000018,
199 	0x00000013,
200 	0x00000001,
201 	0x00000007,
202 	0x00000001,
203 	0x46011000,
204 };
205 
206 static const uint32_t uve_nalu_buffer_2[] = {
207 	0x0000002c,
208 	0x00000013,
209 	0x00000002,
210 	0x0000001b,
211 	0x00000001,
212 	0x40010c01,
213 	0xffff0160,
214 	0x00000300,
215 	0xb0000003,
216 	0x00000300,
217 	0x962c0900,
218 };
219 
220 static const uint32_t uve_nalu_buffer_3[] = {
221 	0x00000034,
222 	0x00000013,
223 	0x00000003,
224 	0x00000023,
225 	0x00000001,
226 	0x42010101,
227 	0x60000003,
228 	0x00b00000,
229 	0x03000003,
230 	0x0096a018,
231 	0x2020708f,
232 	0xcb924295,
233 	0x12e08000,
234 };
235 
236 static const uint32_t uve_nalu_buffer_4[] = {
237 	0x0000001c,
238 	0x00000013,
239 	0x00000004,
240 	0x0000000b,
241 	0x00000001,
242 	0x4401e0f1,
243 	0x80992000,
244 };
245 
246 static const uint32_t uve_slice_header[] = {
247 	0x000000c8,
248 	0x0000000b,
249 	0x28010000,
250 	0x40000000,
251 	0x60000000,
252 	0x00000000,
253 	0x00000000,
254 	0x00000000,
255 	0x00000000,
256 	0x00000000,
257 	0x00000000,
258 	0x00000000,
259 	0x00000000,
260 	0x00000000,
261 	0x00000000,
262 	0x00000000,
263 	0x00000000,
264 	0x00000000,
265 	0x00000002,
266 	0x00000010,
267 	0x00000003,
268 	0x00000000,
269 	0x00000002,
270 	0x00000002,
271 	0x00000004,
272 	0x00000000,
273 	0x00000001,
274 	0x00000000,
275 	0x00000002,
276 	0x00000003,
277 	0x00000005,
278 	0x00000000,
279 	0x00000002,
280 	0x00000000,
281 	0x00000000,
282 	0x00000000,
283 	0x00000000,
284 	0x00000000,
285 	0x00000000,
286 	0x00000000,
287 	0x00000000,
288 	0x00000000,
289 	0x00000000,
290 	0x00000000,
291 	0x00000000,
292 	0x00000000,
293 	0x00000000,
294 	0x00000000,
295 	0x00000000,
296 	0x00000000,
297 };
298 
299 static const uint32_t uve_encode_param[] = {
300 	0x00000000,
301 	0x00000000,
302 	0x00000000,
303 	0x00000000,
304 	0xffffffff,
305 	0x00000001,
306 	0x00000000,
307 	0x00000000,
308 	0x00000000,
309 	0x00000000,
310 	0x00000000,
311 	0x00000000,
312 	0x00000000,
313 };
314 
315 static const uint32_t uve_intra_refresh[] = {
316 	0x00000014,
317 	0x0000000f,
318 	0x00000000,
319 	0x00000000,
320 	0x00000001,
321 };
322 
323 static const uint32_t uve_ctx_buffer[] = {
324 	0x00000000,
325 	0x00000000,
326 	0x000000a0,
327 	0x000000a0,
328 	0x00000000,
329 	0x00000000,
330 	0x00000000,
331 	0x00000000,
332 	0x00000000,
333 	0x00000000,
334 	0x00000000,
335 	0x00000000,
336 	0x00000000,
337 	0x00000000,
338 	0x00000000,
339 	0x00000000,
340 	0x00000000,
341 	0x00000000,
342 	0x00000000,
343 	0x00000000,
344 	0x00000000,
345 	0x00000000,
346 	0x00000000,
347 	0x00000000,
348 	0x00000000,
349 	0x00000000,
350 	0x00000000,
351 	0x00000000,
352 	0x00000000,
353 	0x00000000,
354 	0x00000000,
355 	0x00000000,
356 	0x00000000,
357 	0x00000000,
358 	0x00000000,
359 	0x00000000,
360 	0x00000000,
361 	0x00000000,
362 	0x00000000,
363 	0x00000000,
364 	0x00000000,
365 	0x00000000,
366 	0x00000000,
367 	0x00000000,
368 	0x00000000,
369 	0x00000000,
370 	0x00000000,
371 	0x00000000,
372 	0x00000000,
373 	0x00000000,
374 	0x00000000,
375 	0x00000000,
376 	0x00000000,
377 	0x00000000,
378 	0x00000000,
379 	0x00000000,
380 	0x00000000,
381 	0x00000000,
382 	0x00000000,
383 	0x00000000,
384 	0x00000000,
385 	0x00000000,
386 	0x00000000,
387 	0x00000000,
388 	0x00000000,
389 	0x00000000,
390 	0x00000000,
391 	0x00000000,
392 	0x00000000,
393 	0x00000000,
394 	0x00000000,
395 	0x00000000,
396 	0x00000000,
397 	0x00000000,
398 	0x00000000,
399 	0x00000000,
400 	0x00000000,
401 	0x00000000,
402 	0x00000000,
403 	0x00000000,
404 	0x00000000,
405 	0x00000000,
406 	0x00000000,
407 	0x00000000,
408 	0x00000000,
409 	0x00000000,
410 	0x00000000,
411 	0x00000000,
412 	0x00000000,
413 	0x00000000,
414 	0x00000000,
415 	0x00000000,
416 	0x00000000,
417 	0x00000000,
418 	0x00000000,
419 	0x00000000,
420 	0x00000000,
421 	0x00000000,
422 	0x00000000,
423 	0x00000000,
424 	0x00000000,
425 	0x00000000,
426 	0x00000000,
427 	0x00000000,
428 	0x00000000,
429 	0x00000000,
430 	0x00000000,
431 	0x00000000,
432 	0x00000000,
433 	0x00000000,
434 	0x00000000,
435 	0x00000000,
436 	0x00000000,
437 	0x00000000,
438 	0x00000000,
439 	0x00000000,
440 	0x00000000,
441 	0x00000000,
442 	0x00000000,
443 	0x00000000,
444 	0x00000000,
445 	0x00000000,
446 	0x00000000,
447 	0x00000000,
448 	0x00000000,
449 	0x00000000,
450 	0x00000000,
451 	0x00000000,
452 	0x00000000,
453 	0x00000000,
454 	0x00000000,
455 	0x00000000,
456 	0x00000000,
457 	0x00000000,
458 	0x00000000,
459 	0x00000000,
460 	0x00000000,
461 	0x00000000,
462 	0x00000000,
463 	0x00000000,
464 	0x00000000,
465 	0x00000000,
466 	0x00000000,
467 	0x00000000,
468 	0x00000000,
469 };
470 
471 static const uint32_t uve_bitstream_buffer[] = {
472 	0x0000001c,
473 	0x00000011,
474 };
475 
476 static const uint32_t uve_rc_per_pic[] = {
477 	0x00000024,
478 	0x0000000a,
479 	0x0000001a,
480 	0x00000000,
481 	0x00000033,
482 	0x00000000,
483 	0x00000000,
484 	0x00000000,
485 	0x00000001,
486 };
487 
488 static const uint32_t uve_op_init[] = {
489 	0x00000008,
490 	0x08000001,
491 };
492 
493 static const uint32_t uve_op_close[] = {
494 	0x00000008,
495 	0x08000002,
496 };
497 
498 static const uint32_t uve_op_encode[] = {
499 	0x00000008,
500 	0x08000003,
501 };
502 
503 static const uint32_t uve_op_init_rc[] = {
504 	0x00000008,
505 	0x08000004,
506 };
507 
508 static const uint32_t uve_op_init_rc_vbv_level[] = {
509 	0x00000008,
510 	0x08000005,
511 };
512 
513 static const uint32_t uve_op_speed_enc_mode[] = {
514 	0x00000008,
515 	0x08000006,
516 };
517 
518 static const uint32_t uve_op_balance_enc_mode[] = {
519 	0x00000008,
520 	0x08000007,
521 };
522 
523 static const uint32_t uve_op_quality_enc_mode[] = {
524 	0x00000008,
525 	0x08000008,
526 };
527 #endif /*_uve_ib_h*/
528