]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto7_multimedia/ti-img-encode-decode.git/commitdiff
driver/encoder: VXE384MP2 encoder driver support has been added
authorSunita Nadampalli <sunitan@ti.com>
Mon, 9 Sep 2019 19:35:51 +0000 (14:35 -0500)
committerAngela Stegmaier <angelabaker@ti.com>
Tue, 10 Sep 2019 15:34:25 +0000 (10:34 -0500)
This patch adds implementation of H264 encoder using VXE384MP2
core. This patch supports Linux driver and provides common
encoder driver baseline for RTOS encoder.
Supported features are:
1. H264 I & P frame encoding
2. 8-bit content
3. NV12 format
4. configurable bitrate

Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: David Huang <d-huang@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
38 files changed:
driver/common/img_mem_man.c
driver/encoder/fw_binaries/ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_bin.c [new file with mode: 0644]
driver/encoder/fw_binaries/include_all_fw_variants.h [new file with mode: 0644]
driver/encoder/fw_headers/coreflags.h [new file with mode: 0644]
driver/encoder/fw_headers/defs.h [new file with mode: 0644]
driver/encoder/fw_headers/mtx_fwif.h [new file with mode: 0644]
driver/encoder/fw_headers/topazscfwif.h [new file with mode: 0644]
driver/encoder/fw_headers/vxe_common.h [new file with mode: 0644]
driver/encoder/header_gen.c [new file with mode: 0644]
driver/encoder/header_gen.h [new file with mode: 0644]
driver/encoder/mtx_fwif.c [new file with mode: 0644]
driver/encoder/reg_headers/img_soc_dmac_regs.h [new file with mode: 0644]
driver/encoder/reg_headers/mtx_regs.h [new file with mode: 0644]
driver/encoder/reg_headers/topaz_coreext_regs.h [new file with mode: 0644]
driver/encoder/reg_headers/topaz_db_regs.h [new file with mode: 0644]
driver/encoder/reg_headers/topaz_vlc_regs.h [new file with mode: 0644]
driver/encoder/reg_headers/topazhp_core_regs.h [new file with mode: 0644]
driver/encoder/reg_headers/topazhp_multicore_regs.h [new file with mode: 0644]
driver/encoder/reg_headers/topazhp_multicore_regs_old.h [new file with mode: 0644]
driver/encoder/target.h [new file with mode: 0644]
driver/encoder/target_config.h [new file with mode: 0644]
driver/encoder/topaz_api.c [new file with mode: 0644]
driver/encoder/topaz_api.h [new file with mode: 0644]
driver/encoder/topaz_api_utils.c [new file with mode: 0644]
driver/encoder/topaz_api_utils.h [new file with mode: 0644]
driver/encoder/topaz_color_formats.h [new file with mode: 0644]
driver/encoder/topaz_device.c [new file with mode: 0644]
driver/encoder/topaz_device.h [new file with mode: 0644]
driver/encoder/topazmmu.c [new file with mode: 0644]
driver/encoder/topazmmu.h [new file with mode: 0644]
driver/encoder/vxe_enc.c [new file with mode: 0644]
driver/encoder/vxe_enc.h [new file with mode: 0644]
driver/encoder/vxe_public_regdefs.h [new file with mode: 0644]
linux/encoder/Makefile [new file with mode: 0644]
linux/encoder/vxe_v4l2.c [new file with mode: 0644]
linux/encoder/vxe_v4l2.h [new file with mode: 0644]
osal/inc/osa_define.h
osal/inc/osa_types.h

index 46b07850f2a18250ed4ea11ac17384e80360d190..81821438086d0d7ea382ea3fe5e0e74a59cea1c7 100644 (file)
@@ -63,7 +63,7 @@ static void _img_mem_free(struct buffer *buffer);
 static void _img_mmu_unmap(struct mmu_ctx_mapping *mapping);
 static void _img_mmu_ctx_destroy(struct mmu_ctx *ctx);
 
-#ifdef DEBUG_DECODER_DRIVER
+#if defined (DEBUG_DECODER_DRIVER) | defined (DEBUG_ENCODER_DRIVER)
 static uint8 *get_heap_name(enum heap_type type)
 {
        switch (type) {
diff --git a/driver/encoder/fw_binaries/ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_bin.c b/driver/encoder/fw_binaries/ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_bin.c
new file mode 100644 (file)
index 0000000..1f269fc
--- /dev/null
@@ -0,0 +1,29024 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Encoder FW binary file
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+// note that order of defines has to match the structure declaration!
+
+osa_char *ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_define_names_array[] = {
+       "TOPAZHP_NUM_PIPES",
+       "TOPAZHP_MAX_BU_SUPPORT",
+       "MAX_REF_B_LEVELS_FW",
+       "SEI_INSERTION",
+       "TOPAZHP_MAX_NUM_STREAMS",
+};
+uint32 ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_define_values_array[] = {
+       2,
+       (TOPAZHP_MAX_BU_SUPPORT_HD),
+       0,
+       1,
+       8,
+};
+
+uint32 ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_text[] = {
+       0x9040c001,
+       0xc80993fe,
+       0xc0000e42,
+       0xc8290e00,
+       0xcc428426,
+       0xc8298440,
+       0xcef48622,
+       0x9e838600,
+       0xc8099e43,
+       0xcde40d46,
+       0xc8090d60,
+       0xcde60946,
+       0xc8090920,
+       0xc00a0e42,
+       0xc8090e40,
+       0xc00e87c2,
+       0x9c1887c0,
+       0x0c020802,
+       0x09820d82,
+       0x09020d02,
+       0x08820c82,
+       0x9320fffe,
+       0xa401c838,
+       0x0dc6c809,
+       0x0da0cde4,
+       0x0e42c809,
+       0x0c66b080,
+       0x0882a992,
+       0x9ff3a48d,
+       0x93e0ffff,
+       0x80819d13,
+       0xa205f839,
+       0x03070707,
+       0x9e970685,
+       0xc8090383,
+       0xcde60ac6,
+       0xc8090ac0,
+       0xcde61ac4,
+       0x060f1aa0,
+       0x07fac101,
+       0x018d058d,
+       0x9c62008f,
+       0x9320ffff,
+       0xc101060b,
+       0x9c6206da,
+       0x9380ffff,
+       0x018d058d,
+       0x460cb700,
+       0x4594b780,
+       0xa6059c01,
+       0xc8090687,
+       0xcde60ac6,
+       0xc8090ac0,
+       0xcde61ac4,
+       0x060b1aa0,
+       0x06dac101,
+       0xffff9c62,
+       0xf9f89380,
+       0xf9f8aa9d,
+       0x9c22aa1d,
+       0x420cb700,
+       0xc000587c,
+       0xe0003800,
+       0xc0003800,
+       0x9c22901a,
+       0x9c8fc127,
+       0x080a9c22,
+       0x9c81c017,
+       0x9c80c071,
+       0x9c80c017,
+       0x0d849c22,
+       0x9e5a5db0,
+       0x4018b960,
+       0x0900c021,
+       0x0940c00e,
+       0xaa45f031,
+       0xf0009dad,
+       0x0910a261,
+       0x9341ffff,
+       0xc3fe9e5c,
+       0xc02129c0,
+       0xc0010a00,
+       0xc00e3988,
+       0x9dcd0a30,
+       0xa1e1f000,
+       0xc0219c22,
+       0xd1100d80,
+       0x9d3d05b7,
+       0x2244aa61,
+       0xffff7115,
+       0x9c229384,
+       0xd011a605,
+       0xc3fe0eb2,
+       0xc28029c0,
+       0x020b5ab0,
+       0x0a00c021,
+       0x398cc001,
+       0xc00e0685,
+       0x9dcd0a30,
+       0xa1e1f000,
+       0xc00e9eab,
+       0x0d020992,
+       0x0902cff0,
+       0x0a80c021,
+       0x9bdbfff4,
+       0x0ac0c00e,
+       0x4018b960,
+       0xaa619d5d,
+       0xa225f231,
+       0xffff0a90,
+       0xb79f9361,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xfffd9c22,
+       0xf0129040,
+       0x9e582d36,
+       0xc0009e5a,
+       0xc18093a4,
+       0x9e515a0b,
+       0xd2247500,
+       0x9e825988,
+       0x9c83c810,
+       0x0106c101,
+       0x4418b313,
+       0x9080c000,
+       0xa0c5f031,
+       0x93c1ffff,
+       0x11b6c101,
+       0x90c0c000,
+       0xa146d029,
+       0x9120c000,
+       0x9e540d02,
+       0xb33474c0,
+       0xc8104436,
+       0xffff9c83,
+       0x9c2292a1,
+       0xa285f839,
+       0xc00272d7,
+       0x70d79022,
+       0xc0009e59,
+       0x0a8690a6,
+       0x9100c000,
+       0xd0101d04,
+       0xc10104b4,
+       0x0aff01b4,
+       0xc0017c46,
+       0xf0139124,
+       0xc0012936,
+       0xd12290a4,
+       0x9e885e0b,
+       0x5808c200,
+       0x9e99610b,
+       0x00947500,
+       0xc81001b4,
+       0xc2809c83,
+       0xb3235908,
+       0xc0004c18,
+       0x9e9590e0,
+       0xaa29e059,
+       0xa209e059,
+       0x9361ffff,
+       0x1520c101,
+       0x9100c000,
+       0xa966c059,
+       0xa126c059,
+       0x9100c000,
+       0x0a029e52,
+       0x7088d012,
+       0x9c83c810,
+       0x9281ffff,
+       0xf9f89e58,
+       0x9c22aa9d,
+       0x59300904,
+       0x9d299da9,
+       0x9e919e90,
+       0x76c00005,
+       0x8700c021,
+       0x0da2c020,
+       0x8500c021,
+       0x0800c021,
+       0x0c00c021,
+       0x0c80c021,
+       0x1db0d021,
+       0x08820d08,
+       0x8730c00e,
+       0x8540c00e,
+       0x0850c00e,
+       0x0c60c00e,
+       0x0cf0c00e,
+       0x92a0c001,
+       0xaa41d9d0,
+       0xa95dd990,
+       0x5a40c200,
+       0x9e2e3244,
+       0xa261f000,
+       0xaa49d9d0,
+       0xa945d9d0,
+       0x5a40c200,
+       0x9d8d3244,
+       0xa261f000,
+       0xaa51d9d0,
+       0xa94dd9d0,
+       0x5a40c200,
+       0x9d8e3244,
+       0xa261f000,
+       0xaa59d9d0,
+       0xa955d9d0,
+       0x5a40c200,
+       0x9d9e3244,
+       0xa261f000,
+       0x5e10d1a2,
+       0xc3fe08a0,
+       0xc0012a40,
+       0x83853a08,
+       0xa261f000,
+       0x70460d84,
+       0xfffe0d40,
+       0x9c229166,
+       0x8420a61d,
+       0x0b820307,
+       0xc001a19a,
+       0xf04892a0,
+       0xa91aaac6,
+       0x9e6b7740,
+       0xc001672b,
+       0xf0489162,
+       0x05d6a9ce,
+       0xc3b41d84,
+       0xc1019966,
+       0xf208628b,
+       0x018ba34a,
+       0xc3b4058d,
+       0x628b995e,
+       0x6979d031,
+       0x16ebd110,
+       0xa041f208,
+       0xa2c5f208,
+       0x430cb780,
+       0x0679d110,
+       0xaa09f248,
+       0xf2086009,
+       0xb780a041,
+       0x0128430c,
+       0xa945f008,
+       0x000a6005,
+       0xa049f208,
+       0x0b300b84,
+       0x430cb780,
+       0x5b90d3a4,
+       0x0579d110,
+       0xaa15f288,
+       0xfffe71c8,
+       0xb79f9086,
+       0xb7bf7dee,
+       0xb7df7e6e,
+       0xb7ff7eee,
+       0xc0027f6e,
+       0x9c228c20,
+       0xb7a0a60d,
+       0x9e5e430c,
+       0xf2489e9e,
+       0xf248a9ae,
+       0xd120aaa5,
+       0x018b01d7,
+       0xc3b41d84,
+       0x9e85991c,
+       0xc101636b,
+       0x9eb366db,
+       0xf2109e6b,
+       0xc3b4a349,
+       0xd1329912,
+       0xf210628b,
+       0xc101a041,
+       0xf210136a,
+       0xb780a345,
+       0xf248430c,
+       0x6009aa09,
+       0xa041f210,
+       0x430cb780,
+       0xaa05f208,
+       0x000c6009,
+       0xa049f210,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0x5db00d84,
+       0xc0219e5c,
+       0xc0100a00,
+       0x9dcd0a00,
+       0xa162f000,
+       0x592809bc,
+       0xcff05990,
+       0xc00f2980,
+       0xc021297c,
+       0x31260d80,
+       0x0d80c00e,
+       0xf0009dbe,
+       0x9c22a161,
+       0x5db00d84,
+       0x0992c00e,
+       0xcff00d02,
+       0xfff20902,
+       0xaa1d91c0,
+       0x09bc0405,
+       0xd0117500,
+       0xd0120e32,
+       0xd0a2299e,
+       0xc0015cc0,
+       0xd2249004,
+       0x9e545930,
+       0x0a00c021,
+       0x0a00c010,
+       0xf0009dcd,
+       0xc100a062,
+       0x9e525a18,
+       0x2a00cffc,
+       0x0900c021,
+       0x0930c010,
+       0xf0009dad,
+       0xc180a261,
+       0xcff05a10,
+       0xc0112a00,
+       0xc0003a00,
+       0xd22492e0,
+       0x9e545930,
+       0x0a00c021,
+       0x0a10c010,
+       0xf0009dcd,
+       0x5958a062,
+       0x9dcd0a20,
+       0xa161f000,
+       0x5a10c180,
+       0x2a00cff0,
+       0x3a00c031,
+       0xc00f9e5a,
+       0x324428fc,
+       0x0d00c021,
+       0xc00e3242,
+       0x9dae0d00,
+       0xa261f000,
+       0xa61d9c22,
+       0x8400c00a,
+       0x430cb7c0,
+       0x0802c004,
+       0xb55fa011,
+       0x74807dec,
+       0xa945f208,
+       0x7decb79f,
+       0x7d74b57f,
+       0x5b99c100,
+       0x4422b340,
+       0x5a18c380,
+       0xa0117104,
+       0x7c74b55f,
+       0x7cecb53f,
+       0xf248000d,
+       0xf248a94d,
+       0x9e4dab46,
+       0xb7809e9f,
+       0xb7a040cd,
+       0xd0125eb4,
+       0xc006136c,
+       0xd0209244,
+       0x9e7311a8,
+       0x9853c3b4,
+       0x701b9e6c,
+       0x4434b304,
+       0xb347711f,
+       0xf2084454,
+       0xf208a9c1,
+       0x657daa29,
+       0xb740008d,
+       0xd0f2572b,
+       0xd0200eae,
+       0xb77f0138,
+       0x74887468,
+       0x2e81cffc,
+       0x293ed3f1,
+       0x9172c000,
+       0x9e93a892,
+       0x0a029e6b,
+       0x0892010f,
+       0xc000a21d,
+       0xa8929120,
+       0x9e6b0a02,
+       0xa21d9e93,
+       0x0896010f,
+       0x9b57fff4,
+       0x7468b79f,
+       0x29ced3f2,
+       0x9b48fff4,
+       0xaa25f208,
+       0x0659d110,
+       0xa225f208,
+       0xa94df248,
+       0xc0007104,
+       0x0a029186,
+       0xa225f208,
+       0xa949f248,
+       0xaa21f208,
+       0xf2080244,
+       0xb740a221,
+       0xf208430c,
+       0xf208aa21,
+       0xf008a926,
+       0x6129a945,
+       0x0124c101,
+       0xa129f208,
+       0x4314b700,
+       0x574ab780,
+       0xc0007506,
+       0x750a90a2,
+       0x9144c000,
+       0xaa11a911,
+       0x0a08090c,
+       0x00899e91,
+       0x9100c000,
+       0xa911aa11,
+       0x090c0a08,
+       0x00859ea1,
+       0x7decb71f,
+       0x5dccb780,
+       0x7c6cb77f,
+       0xa8110100,
+       0x6679d131,
+       0xcffe9e83,
+       0xcffe28fc,
+       0xd0202cfc,
+       0xd0200334,
+       0xd0101110,
+       0xda101516,
+       0x5d18a241,
+       0xcffe5930,
+       0xc2002a7c,
+       0xc1015a48,
+       0xd1100524,
+       0xb79f0729,
+       0x71887cec,
+       0x9322c001,
+       0x8c80f292,
+       0x8c84f271,
+       0x0c029e68,
+       0x91a0c000,
+       0x7c6ab77f,
+       0xa1b1da31,
+       0x7eb2b57f,
+       0x7f32b55f,
+       0xa231da29,
+       0x9e44a111,
+       0xa9c1da10,
+       0xcffea911,
+       0xd0202a7c,
+       0x09100142,
+       0x0242c101,
+       0xcffe7217,
+       0xcffe2a7c,
+       0xcffe2d7c,
+       0x0c10297c,
+       0xc0200820,
+       0xc0103a00,
+       0xd0123d00,
+       0xfffe19a6,
+       0xb77f9366,
+       0xb75f7df4,
+       0xe2927d6c,
+       0xfff48d00,
+       0x000d99b3,
+       0x746eb79f,
+       0x74eeb7bf,
+       0x756eb7df,
+       0x75eeb7ff,
+       0x8c00c00c,
+       0xa61d9c22,
+       0x8400c00c,
+       0x430cb7c0,
+       0x40d5b700,
+       0x000d9e4f,
+       0x5732b720,
+       0xaa4df248,
+       0xaac5f248,
+       0x76400f86,
+       0x79f4b57f,
+       0x11c1d120,
+       0xd002040f,
+       0x9e9d0c72,
+       0xb51f018b,
+       0xb55f7874,
+       0xb55f7d6c,
+       0xb53f78f4,
+       0xb51f796c,
+       0xc3947b74,
+       0x9eb09b56,
+       0xa946f208,
+       0x5eccb780,
+       0xa941f208,
+       0x7d6cb77f,
+       0xb3047008,
+       0x711b4434,
+       0x4454b345,
+       0x9e695d19,
+       0x7bf4b5bf,
+       0xaa69f208,
+       0xb71f629b,
+       0xd0326670,
+       0x74c00ade,
+       0xb55f0128,
+       0xc0047af4,
+       0xb3300802,
+       0x9e924422,
+       0x7a6cb55f,
+       0xb75f2ec1,
+       0xc00e7aec,
+       0x9e6b2c7c,
+       0x9e799e81,
+       0x05810a02,
+       0xa015a21d,
+       0xfff4a012,
+       0xa9929a54,
+       0x5a8dc280,
+       0x9a46fff4,
+       0xaa49f248,
+       0xc0017510,
+       0xf2089114,
+       0xf248aa61,
+       0x0a20a951,
+       0xc0017104,
+       0xa8159008,
+       0x4314b740,
+       0x7a74b71f,
+       0xf010020a,
+       0x9ea6a946,
+       0x7aecb75f,
+       0xcffea992,
+       0x9e792f7c,
+       0x5d0c9e6b,
+       0x05200a02,
+       0xa21d048d,
+       0x9a2bfff4,
+       0xfff4a992,
+       0xb5df9a1f,
+       0xc0007df4,
+       0xab1690a0,
+       0x7df4b5df,
+       0xaa65f208,
+       0x0659d110,
+       0xa265f208,
+       0xa94df248,
+       0xc0007104,
+       0x0a029186,
+       0xa265f208,
+       0xa949f248,
+       0xaa61f208,
+       0xf2080244,
+       0xb780a261,
+       0xf208430c,
+       0xf208a961,
+       0xf208a966,
+       0x6245aa05,
+       0x0244c101,
+       0xa269f208,
+       0x4314b7e0,
+       0xa971f210,
+       0x5819d124,
+       0xb51f9e44,
+       0xc2007cf4,
+       0x71045a18,
+       0x90e2c000,
+       0xb53f0882,
+       0xc00a7c6c,
+       0xf2509140,
+       0xb77faa75,
+       0xd0327bec,
+       0xd1100af8,
+       0x6239056b,
+       0xa92af210,
+       0xa9edf210,
+       0xd0319e96,
+       0xb75f0b4e,
+       0xa9927cec,
+       0x7b6cb73f,
+       0xd1202b41,
+       0xcffe0135,
+       0x0a062f7c,
+       0x048d018d,
+       0xfff4a21d,
+       0xf21099cc,
+       0x0268aa25,
+       0xa225f210,
+       0xa97df250,
+       0xc0007104,
+       0x0a029186,
+       0xa225f210,
+       0xa979f250,
+       0xaa21f210,
+       0xf2100244,
+       0xb720a221,
+       0xf210430c,
+       0xf210aa21,
+       0xb740a926,
+       0x6129422d,
+       0x0124c101,
+       0xa129f210,
+       0x572bb780,
+       0xc0007502,
+       0xd0119144,
+       0x040d0e62,
+       0xcffe9ea1,
+       0xc0022cfc,
+       0x750491a0,
+       0x9144c000,
+       0x0e62d011,
+       0x9ea0048d,
+       0x2c7ccffe,
+       0x9040c002,
+       0x0af0d072,
+       0x5a0dc300,
+       0x0669d110,
+       0x432db7a0,
+       0xa929f210,
+       0x0389a992,
+       0xcffe02d4,
+       0xfff42bfc,
+       0xb75f9979,
+       0xb73f7cec,
+       0xa9927b6c,
+       0x9eb99eaa,
+       0x018d8506,
+       0xfff4a11f,
+       0xf2109976,
+       0x0268aa25,
+       0xa225f210,
+       0xa97df250,
+       0xc0007104,
+       0x0a029186,
+       0xa225f210,
+       0xa979f250,
+       0xaa21f210,
+       0xf2100244,
+       0xb740a221,
+       0xf210430c,
+       0xf210aa21,
+       0xf008a926,
+       0x9eb9a95d,
+       0x6129040d,
+       0x0124c101,
+       0xa129f210,
+       0x7d6cb71f,
+       0x78ecb75f,
+       0x430cb720,
+       0x02a80200,
+       0x5dadb720,
+       0x7becb79f,
+       0x7df4b77f,
+       0xd01060c3,
+       0xda081516,
+       0x0203a0a1,
+       0xcffea815,
+       0xc2002a7c,
+       0x9e595a48,
+       0x12401506,
+       0x797cb75f,
+       0x02425d18,
+       0x0244c101,
+       0x02445930,
+       0xb59f7135,
+       0xc0007c6c,
+       0xb71f9182,
+       0xb740706a,
+       0x0d824304,
+       0x287ccffe,
+       0xc0029d8d,
+       0xa9929020,
+       0x9914fff4,
+       0x9320c003,
+       0x7d6ab75f,
+       0x0d34d012,
+       0x0624d010,
+       0xa121da10,
+       0xa041da08,
+       0xa949f040,
+       0xcffe9d4d,
+       0xe31328fc,
+       0x74908d00,
+       0xf010a095,
+       0xc0008026,
+       0xb71f9254,
+       0xd0127b6a,
+       0xda080d38,
+       0xda10a001,
+       0xcffea1c1,
+       0xd01129fc,
+       0xcffe0a32,
+       0xb59f2a7c,
+       0xd0107dec,
+       0xd0110524,
+       0x9d2d0e22,
+       0xe3130248,
+       0xe0108d00,
+       0x9d4d8126,
+       0xa3c1d808,
+       0x8026f010,
+       0x0da4d012,
+       0xa382da08,
+       0x0536d010,
+       0x0e32d011,
+       0xe3139d2d,
+       0x02488d00,
+       0x7decb75f,
+       0x80a6f020,
+       0xd0119d4d,
+       0x09040e36,
+       0xf0100248,
+       0x01858126,
+       0xda089d4d,
+       0xd010a922,
+       0xd0100607,
+       0xa8150517,
+       0x9e47a895,
+       0x9ea00783,
+       0x72c49e91,
+       0xf0200804,
+       0x08888126,
+       0x3b80c010,
+       0x3f80c020,
+       0x2c7ccffe,
+       0x2cfccffe,
+       0x9306fffc,
+       0xfff4a992,
+       0xb77f98a5,
+       0xda087d74,
+       0xb75fa9a1,
+       0xe31279ec,
+       0xffd48d00,
+       0xb71f9b9d,
+       0xb79f7c6c,
+       0xb7bf726e,
+       0xb7df72ee,
+       0xb7ff736e,
+       0xc00e73ee,
+       0x9c228c00,
+       0xa6059c22,
+       0x4c8cb7a0,
+       0x6d82c146,
+       0x06bbd110,
+       0x008b099a,
+       0x6031b76d,
+       0xc3940d84,
+       0x008b99a3,
+       0x60a9b78d,
+       0x287cc00e,
+       0x08027100,
+       0x0802d001,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0xb7409e5c,
+       0xc1464c8c,
+       0x02446a02,
+       0x0902c021,
+       0x430cb580,
+       0x4490b560,
+       0x0920c030,
+       0xaa619d2d,
+       0xc0015dc0,
+       0x9e5b2dbc,
+       0x2a42cfff,
+       0x9dad3246,
+       0xa261f000,
+       0xb7209c22,
+       0x9e58430c,
+       0x4829b78a,
+       0x71172208,
+       0x90c4c000,
+       0x48a9b78a,
+       0x9c222008,
+       0x4588b780,
+       0x9c222008,
+       0xb720a60d,
+       0x0b06430c,
+       0x4731b7aa,
+       0x46a9b7aa,
+       0x90e0c000,
+       0x0a52d011,
+       0xc00e0289,
+       0xd2242afc,
+       0x715b51d4,
+       0x2dfcc00e,
+       0x90e8c000,
+       0x9bd9fff4,
+       0xffff7400,
+       0x000b9224,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0x430cb720,
+       0x4cadb782,
+       0x5b2db743,
+       0xb5823244,
+       0xb7204cad,
+       0xb782430c,
+       0xc0104cad,
+       0xb5822a04,
+       0xb7204cad,
+       0xb782430c,
+       0xc0204cad,
+       0xb3407d00,
+       0x3a0448a2,
+       0x4cadb582,
+       0x0d849c22,
+       0x9e5c5db0,
+       0x0a00c021,
+       0x0a00c010,
+       0xf0009dcd,
+       0x09bca162,
+       0x59285990,
+       0x2980cff0,
+       0x297cc00f,
+       0x3980c011,
+       0x0d80c021,
+       0xc00e31b4,
+       0x9dbe0d80,
+       0xa1e1f000,
+       0xa61d9c22,
+       0x8400c002,
+       0x0abed031,
+       0x2ac19e9f,
+       0xa119a192,
+       0xc001a116,
+       0xc1fc9300,
+       0xc0fc7562,
+       0xb3560f02,
+       0xa9164446,
+       0x9e73a992,
+       0xfff40902,
+       0xa9929bce,
+       0x068d0b82,
+       0x9bcaffd4,
+       0x010fab19,
+       0x92e0c000,
+       0xc0007dde,
+       0xa9929144,
+       0x8d00e092,
+       0xffd4018f,
+       0xe0919a1d,
+       0x77c08d00,
+       0xc0000b84,
+       0xd02990e2,
+       0x1f84aa45,
+       0xa241d208,
+       0x1e840b04,
+       0xffff777f,
+       0xa91a9124,
+       0x12dcc101,
+       0xa11a052c,
+       0x052ca916,
+       0x7540a116,
+       0x9124fffe,
+       0x7c6eb79f,
+       0x7ceeb7bf,
+       0x7d6eb7df,
+       0x7deeb7ff,
+       0x8c00c004,
+       0xa61d9c22,
+       0x8400c002,
+       0x9e9f9e5c,
+       0x5a30c200,
+       0x0a00c021,
+       0xc110a19a,
+       0x09820a30,
+       0xf0009dcd,
+       0xd032a1e1,
+       0x2ec10efe,
+       0xa115a112,
+       0x9180c002,
+       0x7762c1fc,
+       0x0f02c0fc,
+       0x4846b356,
+       0x9e760d02,
+       0x7df4b55f,
+       0x7d74b55f,
+       0x7cf4b55f,
+       0x7c74b55f,
+       0xe0920b82,
+       0x77c08d80,
+       0x0534d010,
+       0x9162c000,
+       0x1f84a991,
+       0xaa65d029,
+       0xd008a191,
+       0xc000a241,
+       0xd0089080,
+       0x0b84a3c2,
+       0x2afef031,
+       0xc0000d04,
+       0xa99a9244,
+       0x8d00e092,
+       0x19f0d051,
+       0x9987ffd4,
+       0xb5bf9eaa,
+       0xb5bf7dec,
+       0xb5bf7d6c,
+       0xb5bf7cec,
+       0xe0007c6c,
+       0xfffe1b04,
+       0xa91692c4,
+       0x9e73a99a,
+       0xffd4010d,
+       0xa99a9b23,
+       0xffd416dc,
+       0xa9969b39,
+       0xa19605bc,
+       0xfffd7740,
+       0xb79f92a4,
+       0xb7bf7c6e,
+       0xb7df7cee,
+       0xb7ff7d6e,
+       0xc0047dee,
+       0x9c228c00,
+       0x430cb720,
+       0x09f2c142,
+       0x5badb743,
+       0x6c31b76d,
+       0xfffc9e8a,
+       0xf8399100,
+       0x9e90a285,
+       0xaa4df008,
+       0x0caed091,
+       0xa949f008,
+       0x5815c080,
+       0x0244c101,
+       0x76400120,
+       0x41ccb580,
+       0x414cb540,
+       0x9202c000,
+       0x40ccb780,
+       0x404cb740,
+       0x4254b740,
+       0x0a061128,
+       0x5208c200,
+       0x35229ea1,
+       0x4254b540,
+       0x5e30d1a2,
+       0x08fec00f,
+       0xcff19ea3,
+       0xc0210d02,
+       0xc0100d80,
+       0xc1409c83,
+       0xc00e0de0,
+       0xcff008fc,
+       0xc0000d00,
+       0xf0299200,
+       0x9e55aa65,
+       0x2242214a,
+       0xc2005921,
+       0x32445a20,
+       0x4006ba24,
+       0xf0009dbe,
+       0xffffa261,
+       0xb7809241,
+       0x0a04404c,
+       0x404cb580,
+       0xaa9df9f8,
+       0xa6859c22,
+       0x87029e91,
+       0x85220685,
+       0x0b7ec00e,
+       0x882bf210,
+       0xc2007640,
+       0xc0025153,
+       0xf0089182,
+       0x9e69aa61,
+       0x2a1ce000,
+       0xc28022a2,
+       0xb4235920,
+       0xf0084442,
+       0xd010aa61,
+       0x2a1ca962,
+       0x8821f310,
+       0x1242c101,
+       0x400aba0c,
+       0x52411003,
+       0x5921c200,
+       0xc00e9e95,
+       0xd0312a7c,
+       0xc2000910,
+       0x3454520b,
+       0x2aced3f2,
+       0x92eac000,
+       0x5224c200,
+       0x32429e51,
+       0xa261d010,
+       0xa961f008,
+       0x2a2ed011,
+       0x0619d110,
+       0xd110750e,
+       0xd0090615,
+       0xf0080db2,
+       0xc000a261,
+       0xd0109240,
+       0xf008a062,
+       0xd110aa61,
+       0x9e810619,
+       0xf0080242,
+       0xcffea261,
+       0xd0322cfc,
+       0xfffda164,
+       0x9e589220,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c40,
+       0x9e58a60d,
+       0x9e569e9e,
+       0x709b0ee2,
+       0x923cc000,
+       0x9eb39e6d,
+       0x2afccffe,
+       0x112a5575,
+       0x9e739e83,
+       0x297ccffe,
+       0x2d7cc00e,
+       0x9b8dfff4,
+       0x1ea0010b,
+       0xffff7771,
+       0xb79f9184,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0xa60d9c22,
+       0x9e589e56,
+       0x09069e9e,
+       0xc0000d02,
+       0x13649080,
+       0xd0110124,
+       0x710c1a22,
+       0x2eaed3f2,
+       0xffff0d04,
+       0x9e6d9306,
+       0x9080c000,
+       0x9b69fff4,
+       0x0a52d011,
+       0x9e837510,
+       0x0d029e73,
+       0x1aa00922,
+       0x92d2ffff,
+       0x294ed3f1,
+       0xfff40d04,
+       0xc0009b5a,
+       0xd3f291e0,
+       0x9e6c2ace,
+       0x52d1c200,
+       0x295ed3f2,
+       0x9b4ffff4,
+       0xc2009e6c,
+       0x136a52b0,
+       0xd0317750,
+       0x9e831e50,
+       0x09229e73,
+       0x91b2ffff,
+       0x296ed3f2,
+       0xb79f9e6a,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0x92e0fff9,
+       0x1d20f011,
+       0xd01d9e9a,
+       0xd00d0224,
+       0xc0001a42,
+       0x1205909a,
+       0x9e531244,
+       0xfffd9ea2,
+       0x02079140,
+       0xa1c1d010,
+       0x9ea29e53,
+       0xfff60c82,
+       0xa6059240,
+       0x02870d0a,
+       0x9b9dfff4,
+       0x430cb720,
+       0x7ea9b785,
+       0xc0007500,
+       0x02039122,
+       0x0a00c098,
+       0xaa01d208,
+       0x3a040248,
+       0x9ea29e83,
+       0xb79f018b,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0x90a0fffc,
+       0xb720a605,
+       0xf011430c,
+       0xc0020ea0,
+       0xb7450a02,
+       0xb3547ea9,
+       0x02894424,
+       0x9e9d7480,
+       0x90a2c000,
+       0xba2c0248,
+       0x75404000,
+       0x9116c000,
+       0x0d02120b,
+       0x4000ba2c,
+       0x9060c000,
+       0xfff40d06,
+       0x9e839b66,
+       0xd0129e6b,
+       0xb79f1952,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0x9360fffa,
+       0x8460a60d,
+       0x8c88e051,
+       0xa2190a02,
+       0xa211a215,
+       0x7d6cb59f,
+       0x402db580,
+       0xa9e1f008,
+       0x07059e5e,
+       0xc004198c,
+       0xd01274c4,
+       0xc0020a92,
+       0xd1a691b2,
+       0x8520590c,
+       0x8044e050,
+       0x9120c002,
+       0x91c0c002,
+       0x9360c002,
+       0x9140c003,
+       0x91e0c003,
+       0x9300c003,
+       0x90c0c017,
+       0x9280c016,
+       0x93a0c015,
+       0x9280c001,
+       0x9120c011,
+       0x9220c011,
+       0x9320c011,
+       0x9060c013,
+       0x91a0c013,
+       0x93c0c013,
+       0x90c0c014,
+       0x9340c011,
+       0x9020c019,
+       0x9280c018,
+       0x9000c017,
+       0x9180c017,
+       0x9300c017,
+       0x90e0c003,
+       0x92a0c003,
+       0x9360c006,
+       0x9120c007,
+       0x93c0c007,
+       0x9200c00d,
+       0x9180c000,
+       0x9140c000,
+       0x9240c018,
+       0x9240c01a,
+       0x9320c01a,
+       0x92e0c01b,
+       0xc01d0802,
+       0xd0729000,
+       0xe0711924,
+       0x058b8d80,
+       0x91a0c000,
+       0x430cb780,
+       0x8d80e071,
+       0xc09c058b,
+       0xd2080a1c,
+       0xd120a902,
+       0xfff41125,
+       0xc01c9b2b,
+       0xd3f19020,
+       0xe0712aae,
+       0x9eaa8d80,
+       0x0916058b,
+       0x9a55fff4,
+       0x430cb780,
+       0x0a1cc09c,
+       0xa281d208,
+       0x9200c01b,
+       0x292ed3f2,
+       0x8d80e071,
+       0xc016058b,
+       0xf01091a0,
+       0x0d06aacd,
+       0x8d80e071,
+       0x9e524afd,
+       0x2a9c058b,
+       0x93e0c013,
+       0xaacdf010,
+       0x8d80e071,
+       0x0d02058b,
+       0xfff40906,
+       0x4afd9a32,
+       0x9e832a9c,
+       0x8d80e071,
+       0xc00e010b,
+       0xc01a0d7e,
+       0xb7809120,
+       0x0d02430c,
+       0x8d80e071,
+       0x0a40c09a,
+       0xaa01d208,
+       0x090a058b,
+       0xd0027500,
+       0xc0190d22,
+       0xb7209320,
+       0x7640430c,
+       0xb7840a82,
+       0xd002752d,
+       0x75000ad2,
+       0x9204c000,
+       0xc0007540,
+       0xb74491a2,
+       0xb78475ad,
+       0xe0716fad,
+       0x058b8d80,
+       0x090a7104,
+       0x9060c013,
+       0x6fadb744,
+       0x75adb784,
+       0xc0027088,
+       0x0d069004,
+       0x8d80e071,
+       0x058b9e52,
+       0x99f1fff4,
+       0xc0007540,
+       0xb72093a2,
+       0xb785430c,
+       0x75007ea9,
+       0x91c2c000,
+       0x6cadb784,
+       0xc0007502,
+       0x9e839122,
+       0x8d80e071,
+       0x0d2ec002,
+       0x90e0c000,
+       0xe0719e83,
+       0xc0028d80,
+       0x09220d2a,
+       0x99d3fff4,
+       0xe0719e83,
+       0x09168d80,
+       0xfff40d1e,
+       0xb78099cc,
+       0x9e83430c,
+       0x8d80e071,
+       0x0a04c098,
+       0xa902d208,
+       0x9a43fff4,
+       0x9e830d06,
+       0x8d80e071,
+       0xc0169e52,
+       0x02039360,
+       0x0a40c09a,
+       0xaa01d208,
+       0xc0167500,
+       0xc00992a2,
+       0xb7809180,
+       0x0d02430c,
+       0x8d80e071,
+       0x0a14c098,
+       0xaa01d208,
+       0x0906058b,
+       0xd0017500,
+       0xc0160d22,
+       0xb7809020,
+       0xc098430c,
+       0xd2080a10,
+       0x7500aa01,
+       0x9122c000,
+       0x8d80e071,
+       0x0d2a058b,
+       0xc0150912,
+       0x9ea29220,
+       0x8d80e071,
+       0x0906058b,
+       0x9140c015,
+       0x4314b720,
+       0x6ccdb784,
+       0xd0227504,
+       0xc0011524,
+       0x9e4c93a4,
+       0xc0969e4a,
+       0xd2080a54,
+       0xb744aa01,
+       0xc09875d5,
+       0xc2000910,
+       0xc1015a08,
+       0xb76400c2,
+       0xd008722d,
+       0xd011a941,
+       0x72990a32,
+       0xd0020d02,
+       0x74800d22,
+       0x9042c001,
+       0x7ec9b785,
+       0xd0127500,
+       0xc0001124,
+       0x9e4c9244,
+       0xc0960902,
+       0xd2080a58,
+       0xc200aa01,
+       0xc1015a08,
+       0xb72400c2,
+       0x0884722d,
+       0xd00270c2,
+       0x9e4c0922,
+       0xc0989e51,
+       0xd2080a0c,
+       0x3218aa01,
+       0x3144d020,
+       0x9e529e4c,
+       0x0a08c098,
+       0xaa01d208,
+       0x3228e000,
+       0x91a2fffd,
+       0xe0710d06,
+       0x9e528d80,
+       0xfff4058b,
+       0xb7209934,
+       0x0203430c,
+       0x0a08c098,
+       0xaa01d208,
+       0xc0007500,
+       0x9e839122,
+       0x8d80e071,
+       0x9a07fff4,
+       0x92e0c000,
+       0xc0960203,
+       0xd2080a54,
+       0xb744aa01,
+       0x9e8375b5,
+       0x5a08c200,
+       0xb72400c2,
+       0xe071722d,
+       0xd1208d80,
+       0xba121115,
+       0xfff44001,
+       0xb7209a0d,
+       0x0203430c,
+       0x0a10c098,
+       0xaa01d208,
+       0xc0037500,
+       0x02039342,
+       0x0a0cc098,
+       0xaa01d208,
+       0xc0027500,
+       0x020392c4,
+       0x0a08c098,
+       0xaa01d208,
+       0xc0960103,
+       0x75000958,
+       0x90c2c000,
+       0xaa41d008,
+       0x9260c002,
+       0xc0960203,
+       0xd2080a54,
+       0xd008aa01,
+       0x9e83a941,
+       0x5a08c200,
+       0x00c2d020,
+       0x00a25908,
+       0x722db724,
+       0x7255b724,
+       0x8d80e071,
+       0x1113d120,
+       0x90e0c002,
+       0x430cb720,
+       0xc0980203,
+       0xd2080a0c,
+       0x7500aa01,
+       0x9284c000,
+       0x6f2db784,
+       0xc0027500,
+       0x02039044,
+       0x0a54c096,
+       0xaa01d208,
+       0x5a08c200,
+       0xb78400c2,
+       0x7500722d,
+       0x92a4c001,
+       0xe0710d06,
+       0x9e528d80,
+       0xfff4058b,
+       0xb72098b2,
+       0x0203430c,
+       0x0a0cc098,
+       0xaa01d208,
+       0xc0007500,
+       0x9e839122,
+       0x8d80e071,
+       0x9985fff4,
+       0x92e0c000,
+       0xc0960203,
+       0xd2080a58,
+       0xc200aa01,
+       0xb7445a08,
+       0x00c275b5,
+       0x722db724,
+       0xe0719e83,
+       0xd1208d80,
+       0xba121115,
+       0xfff44001,
+       0x9e83998b,
+       0x8d80e071,
+       0xc0020d0e,
+       0xe0719200,
+       0x058b8d80,
+       0xfff70d02,
+       0xb72092c0,
+       0xe071430c,
+       0x058b8d80,
+       0x75b5b744,
+       0xc0060916,
+       0xb72091a0,
+       0xe071430c,
+       0x058b8d80,
+       0x75b5b744,
+       0xc0060922,
+       0xb7209060,
+       0xe071430c,
+       0x058b8d80,
+       0x75b5b744,
+       0x5d21090a,
+       0x9300c005,
+       0x430cb720,
+       0x67adb784,
+       0xd01a7502,
+       0xc0001248,
+       0xb7619174,
+       0x9ea34d2d,
+       0x9853c374,
+       0x0a027400,
+       0x0a42d001,
+       0x09c0f012,
+       0x04850d0a,
+       0x1ca2d001,
+       0x76c09e4a,
+       0x8d80e071,
+       0x4842b332,
+       0xc00b058b,
+       0xb7209020,
+       0xe071430c,
+       0x058b8d80,
+       0x6d35b744,
+       0xfff42d04,
+       0xc00a98b8,
+       0xb72092e0,
+       0x7640430c,
+       0xb7240d02,
+       0xd001752d,
+       0xe0710d22,
+       0x00928d80,
+       0x0522c101,
+       0xc00e058b,
+       0x091a2d7c,
+       0x9040c00a,
+       0x430cb720,
+       0x8d80e071,
+       0xb744058b,
+       0x090a7535,
+       0x91c0c003,
+       0x430cb720,
+       0x4d2db761,
+       0x67b5b764,
+       0xc00074c0,
+       0x0a8690a4,
+       0x9220c000,
+       0xc0029e9a,
+       0xc0000902,
+       0xd0119100,
+       0x01091a22,
+       0xc00e0524,
+       0x7680297c,
+       0x9336ffff,
+       0xc3540285,
+       0x9e829bfa,
+       0x8d80e071,
+       0xc00e058b,
+       0xd3f12d7c,
+       0xc008295e,
+       0xb7209220,
+       0xe071430c,
+       0x058b8d80,
+       0x75adb7a4,
+       0xc03e090a,
+       0xd2a42afc,
+       0xffd45921,
+       0x9e839be2,
+       0x8d80e071,
+       0x295ed3f2,
+       0x91e0c000,
+       0x8d80e071,
+       0xc00e058b,
+       0x09220d7e,
+       0x9bd3ffd4,
+       0xe0719e83,
+       0xc00e8d80,
+       0x09220d7e,
+       0x9180c007,
+       0xaa4df010,
+       0xd0114a7d,
+       0x754e2ace,
+       0x90c2c007,
+       0x8d80e071,
+       0x0d02058b,
+       0xffd40906,
+       0x9e839bbc,
+       0x8d80e071,
+       0x0d02010b,
+       0x92c0c006,
+       0x5614b740,
+       0x8d80e071,
+       0x9e54058b,
+       0xc2400922,
+       0x0d04a946,
+       0x2d7cc00e,
+       0x9100c006,
+       0x430cb720,
+       0x8d80e071,
+       0xb784058b,
+       0x09066cad,
+       0x0d027502,
+       0x0d22d001,
+       0x9340c005,
+       0x430cb720,
+       0x7ea9b785,
+       0xd0017500,
+       0xc0000a46,
+       0xb78590e2,
+       0x9e497f29,
+       0x0a044242,
+       0x294ed3f2,
+       0x8d80e071,
+       0x090a058b,
+       0x9080c005,
+       0x5614b740,
+       0x8d80e071,
+       0x9e52058b,
+       0xa946c220,
+       0xc0040916,
+       0xb7209320,
+       0xe071430c,
+       0x058b8d80,
+       0x7f31b745,
+       0x45220906,
+       0x91c0c004,
+       0x430cb720,
+       0x67adb780,
+       0xc0007500,
+       0xb78690c4,
+       0xc000502d,
+       0xb7819380,
+       0x75045dad,
+       0x9164c000,
+       0xb7860902,
+       0xd0126aad,
+       0xc8127088,
+       0xb5407088,
+       0xb72067ad,
+       0xb781430c,
+       0x75045dad,
+       0x9122c000,
+       0xb7460a02,
+       0xd0126cad,
+       0xb5807104,
+       0xb7a067ad,
+       0x0d82430c,
+       0xb760008b,
+       0xfa0867ad,
+       0xc354a921,
+       0x008b9aa6,
+       0x67b5b500,
+       0x430cb720,
+       0x8d80e071,
+       0xb740058b,
+       0xb72067b5,
+       0x095e682d,
+       0x1115d120,
+       0x90e0c001,
+       0x430cb720,
+       0x8d80e071,
+       0xb740058b,
+       0xc00067b5,
+       0xb78093a0,
+       0xb720558c,
+       0xc240430c,
+       0x0103aa45,
+       0x4ab5b746,
+       0xc0c47500,
+       0xc0000960,
+       0xd00890c2,
+       0xc000aa41,
+       0xd00890c0,
+       0xc101aa41,
+       0xe0710244,
+       0xb5868d80,
+       0x058b4aad,
+       0xffd4095e,
+       0xc0019b63,
+       0xb72090a0,
+       0xb784430c,
+       0x75066cad,
+       0x1124d011,
+       0x9282c000,
+       0x67adb784,
+       0xc0c40103,
+       0x75000960,
+       0x9142c000,
+       0x4badb781,
+       0xa941d008,
+       0x61290a04,
+       0x9080c000,
+       0xa941d008,
+       0x8d80e071,
+       0x292ed3f2,
+       0x091e058b,
+       0x9adfffd4,
+       0x7d6cb77f,
+       0x9e729eb3,
+       0x8d08e052,
+       0x9bb1ffd4,
+       0xb79f0806,
+       0xb7bf7d6e,
+       0xb7df7dee,
+       0xc0027e6e,
+       0x9c228c40,
+       0xc002a61d,
+       0x9e5f8440,
+       0xabc6f031,
+       0x0a72d011,
+       0x5a30c200,
+       0x0d829ea6,
+       0x0a00c040,
+       0x0f00c021,
+       0xa191a215,
+       0x7decb55f,
+       0x7d74b53f,
+       0xb57fa099,
+       0x9e567c74,
+       0x7a74b57f,
+       0x7af4b57f,
+       0x7b74b57f,
+       0x7bf4b57f,
+       0x0f50c040,
+       0x0a02c801,
+       0xf0009dee,
+       0x0687a261,
+       0xc002a19e,
+       0xf2089200,
+       0x028daa41,
+       0x75000b10,
+       0x9102c000,
+       0xc0007504,
+       0x750290a2,
+       0x9284c000,
+       0x09d8d011,
+       0xa962d008,
+       0x0c827504,
+       0xe0d19ebb,
+       0xd0028d00,
+       0xffd40c92,
+       0x58089a38,
+       0x08060360,
+       0x9200c000,
+       0x7decb75f,
+       0x7d74b73f,
+       0xe0d29ebb,
+       0x018b8d00,
+       0x9ba0ffd4,
+       0x1e72d011,
+       0x03c0d020,
+       0xa9a1f208,
+       0xc00074c0,
+       0xa19d90a4,
+       0x91e0c000,
+       0xc00074d8,
+       0xa9199124,
+       0x0e860d06,
+       0xa142d808,
+       0x9220c000,
+       0xc0007740,
+       0xa91d9144,
+       0x02200e82,
+       0x2a7cc00e,
+       0xc000a21d,
+       0xd11090c0,
+       0xd3f20651,
+       0xb79f2ace,
+       0x711f7a6c,
+       0x91e6fffd,
+       0xc0007740,
+       0xa91d9322,
+       0x1e52d011,
+       0xc1f05920,
+       0x2a7c2900,
+       0xa9113244,
+       0x32445940,
+       0xc021a915,
+       0xc0080900,
+       0x9dad0900,
+       0xa261f000,
+       0x0a06a91a,
+       0xa241d810,
+       0xd808a919,
+       0x7500aa41,
+       0x9284c000,
+       0xb79fa915,
+       0xc0217c6c,
+       0x09700900,
+       0x2a7ec7ff,
+       0xf0009dad,
+       0xb79fa261,
+       0xd1107aec,
+       0x9dee1679,
+       0xa261f000,
+       0x7becb71f,
+       0x7b6eb79f,
+       0x7beeb7bf,
+       0x7c6eb7df,
+       0x7ceeb7ff,
+       0x8c40c004,
+       0xa61d9c22,
+       0xc1800d84,
+       0x9e745f30,
+       0xc0409e76,
+       0x9ea50a00,
+       0xc021078d,
+       0xc0210b00,
+       0x02870f80,
+       0x0e80c021,
+       0x0b82c008,
+       0xc0400b40,
+       0xc0000fd0,
+       0xc03c93e0,
+       0xc01e757e,
+       0xb3540a7e,
+       0xc2004434,
+       0x12d85914,
+       0x2900c3fe,
+       0xf0009dfe,
+       0x9d5ea161,
+       0x9dedaa61,
+       0xa3e1f000,
+       0x9dde3a40,
+       0xa261f000,
+       0x09929eba,
+       0x010f058d,
+       0x9afbff94,
+       0xffff7540,
+       0xc0089044,
+       0x9ded0a02,
+       0xa261f000,
+       0x7e6eb79f,
+       0x7eeeb7bf,
+       0x7f6eb7df,
+       0x7feeb7ff,
+       0x8c00c002,
+       0xa6059c22,
+       0x5db00d84,
+       0xc0089e5d,
+       0xc0210e82,
+       0x0ac00a80,
+       0xf0009ddd,
+       0x9e5aa2e2,
+       0x0900c021,
+       0x0900c040,
+       0xa9629d2d,
+       0xd05174c0,
+       0xc0003e20,
+       0xd0d19082,
+       0x9dad3e20,
+       0xa261f000,
+       0x09929e6a,
+       0xff94050b,
+       0x9ddd9ac6,
+       0xa2e2f000,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0xc008a61d,
+       0xf2128420,
+       0x9e5e8c88,
+       0x03850705,
+       0x9e6a9e9a,
+       0xc0080a82,
+       0xb5bf0982,
+       0xffd45e6a,
+       0x9eb39872,
+       0x9eb99e72,
+       0x8c80e231,
+       0x050b018b,
+       0x9ab6fff4,
+       0x018b9eb3,
+       0x9bb9fff4,
+       0x75eeb79f,
+       0x766eb7bf,
+       0x76eeb7df,
+       0x776eb7ff,
+       0x8c20c00a,
+       0xb7209c22,
+       0x09824f0c,
+       0xb9600c96,
+       0x9e8a4038,
+       0x01030203,
+       0x0a39cfca,
+       0x0929cfdc,
+       0x0d09cfac,
+       0x40a9b57f,
+       0x4129b57f,
+       0x4029b560,
+       0x64a9b575,
+       0xa082f208,
+       0xa0c2f008,
+       0xa1c1f010,
+       0x0880c146,
+       0x90e1ffff,
+       0x0c7f9e99,
+       0x4608b560,
+       0x91c0c000,
+       0x430cb740,
+       0x04a5d110,
+       0x6eadb789,
+       0x02446a32,
+       0x0a00c138,
+       0xa012d208,
+       0x2e1ed3f1,
+       0x71170c84,
+       0x5908d224,
+       0x91d8ffff,
+       0x588cb740,
+       0xb9600a02,
+       0x9ea24058,
+       0xa106c220,
+       0xffff0a04,
+       0x9c229381,
+       0x588cb720,
+       0x09029e5b,
+       0x0d34d012,
+       0x4038b960,
+       0xd2080222,
+       0x7115aa09,
+       0x90c4c000,
+       0x297cc00e,
+       0x90c0c000,
+       0xffff0904,
+       0x090292a1,
+       0x588cb780,
+       0x01280904,
+       0x0a049ea2,
+       0x11a8d000,
+       0x90e0c000,
+       0xaa41d008,
+       0xa245d008,
+       0xffff1904,
+       0xd0119361,
+       0xd0100a34,
+       0x9c22a249,
+       0xc912a61d,
+       0xc9129cc4,
+       0xb7a09cce,
+       0xb7a05814,
+       0xf010478c,
+       0x0507a1ed,
+       0x1fd6d032,
+       0xd0510b86,
+       0x0f020b50,
+       0x167ad010,
+       0x4a7d9e6a,
+       0x9c83c810,
+       0xaa5dd1e9,
+       0xd0206a52,
+       0xf01001ca,
+       0x7500aa6d,
+       0x93a4c000,
+       0x0e20d051,
+       0xa003f208,
+       0xa3edf010,
+       0x0e38d011,
+       0xa803f208,
+       0xaa61d050,
+       0xa961f010,
+       0x4508b580,
+       0x9c629e94,
+       0xa843f208,
+       0xb5c09eaa,
+       0xf2084510,
+       0xfffea3ad,
+       0x750292e0,
+       0x91c4c000,
+       0x0e20d051,
+       0xa003f208,
+       0x0e30d051,
+       0xa803f208,
+       0xaa61d050,
+       0x9240c000,
+       0x9181fffe,
+       0x9200c003,
+       0x0e20d051,
+       0xa003f208,
+       0x4b8cb780,
+       0xa803f208,
+       0x478cb780,
+       0xaa01d248,
+       0x4508b580,
+       0x9120c003,
+       0x0a02c021,
+       0x9d4d0a10,
+       0xdfe0aa61,
+       0xc0007d00,
+       0xc10090c2,
+       0xc0010a82,
+       0xb7609120,
+       0x0b0a4688,
+       0x74c0010d,
+       0x0a02c021,
+       0x0a00c030,
+       0x1962d001,
+       0xa9629d4d,
+       0x9e512d71,
+       0x3122290c,
+       0xf0009dcd,
+       0xc100a161,
+       0xc017080a,
+       0x74c09c81,
+       0x90a4c000,
+       0xff949e9b,
+       0xc171996d,
+       0xc8179c81,
+       0x9eb39c84,
+       0x2afccffe,
+       0x9964ff94,
+       0xff940d8a,
+       0xc0219961,
+       0xc0300902,
+       0x9d2d0900,
+       0x3a0caa61,
+       0xf0009dad,
+       0xb740a261,
+       0x018b4a8c,
+       0x2954d012,
+       0x2980c100,
+       0xb9600d86,
+       0xf0084050,
+       0x7506aa41,
+       0x90a4c000,
+       0xc00074c0,
+       0x750490c0,
+       0x90a4c000,
+       0xb41a7680,
+       0x19504a24,
+       0x9221ffff,
+       0x9160c000,
+       0x478cb780,
+       0xaa0df208,
+       0xfffc7502,
+       0xfffc93a4,
+       0xb79f9160,
+       0xb7bf7e6e,
+       0xb7df7eee,
+       0xb7ff7f6e,
+       0xc0027fee,
+       0x9c228c00,
+       0xb780a605,
+       0x9e5b4508,
+       0x4794b760,
+       0xb7a06a52,
+       0xd1204488,
+       0xfff401c7,
+       0x9eab9b23,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0xffb38c40,
+       0xa60592e0,
+       0x9080c000,
+       0x9be8fff4,
+       0x430cb720,
+       0x47a9b7aa,
+       0xffb49eab,
+       0x700a9a86,
+       0xffff0d92,
+       0xb79f92a2,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0x9180ffb4,
+       0xc002a61d,
+       0x9e5e8400,
+       0xa116a199,
+       0xc000a111,
+       0xfff49080,
+       0xb7809bcb,
+       0x0d924408,
+       0x7d3ec01c,
+       0x9324ffff,
+       0x4408b780,
+       0x0d02c021,
+       0x0d10c010,
+       0xb5800a04,
+       0x9d2e4408,
+       0xc021ab62,
+       0xc0100902,
+       0xd0720920,
+       0x9d2d2eee,
+       0x9e55aa61,
+       0x29ced071,
+       0xc0000385,
+       0xfff49180,
+       0x9d5d9ba9,
+       0xd072ab62,
+       0x9d7d2eee,
+       0xd071aa61,
+       0xd01229ce,
+       0xd0710fd2,
+       0x0d8a2e7e,
+       0xffff7106,
+       0x0a029202,
+       0x7c6cb59f,
+       0x7cecb59f,
+       0x7d6cb59f,
+       0x7decb59f,
+       0xb9600389,
+       0xaa154078,
+       0xe0939d7d,
+       0xc2708d00,
+       0xf010a905,
+       0x0b848026,
+       0xa101d208,
+       0x92a1ffff,
+       0x9eb39dcb,
+       0xff940982,
+       0x9eb398aa,
+       0x8d00e092,
+       0xff940982,
+       0xaa9198cd,
+       0x4c8cb780,
+       0x5e88c280,
+       0x6a82c146,
+       0x02d89eb3,
+       0x0aa0c050,
+       0xa922f208,
+       0x7decb79f,
+       0xe050018f,
+       0x0902a94a,
+       0xff94a21d,
+       0x9eb39a3d,
+       0x2f01cffe,
+       0x9a52ff94,
+       0x9eb3aa1d,
+       0x8d00e092,
+       0x09824a7d,
+       0x7decb59f,
+       0x987fff94,
+       0xaaa1f208,
+       0x9eb39e6c,
+       0xa926e240,
+       0x0902018f,
+       0x9a3dffb4,
+       0xff949eb3,
+       0xc0049a3b,
+       0x0a0277c0,
+       0x4824b374,
+       0x2a7c9e72,
+       0xc0213244,
+       0xc0100902,
+       0x9dad0910,
+       0xa261f000,
+       0xe0929eb3,
+       0x09828d00,
+       0x9886ff94,
+       0xb79fa91f,
+       0x71357dec,
+       0x92c4ffff,
+       0x4408b780,
+       0x1a04a919,
+       0xb5807480,
+       0xc0004408,
+       0xb7809164,
+       0xc0a4430c,
+       0xd2080a10,
+       0x7500aa01,
+       0x9102c000,
+       0xff940d8e,
+       0x0d8a9837,
+       0x9834ff94,
+       0x7c6eb79f,
+       0x7ceeb7bf,
+       0x7d6eb7df,
+       0x7deeb7ff,
+       0x8c00c004,
+       0xf8399c22,
+       0x8440a205,
+       0x9e9b9e5a,
+       0x5a20c100,
+       0xc7f09e53,
+       0xe0522a00,
+       0xc0018d00,
+       0xa2113a04,
+       0xfff4a096,
+       0xf9f89b1f,
+       0x9c22aa15,
+       0xa205f839,
+       0x0a028440,
+       0x0a00c146,
+       0x4c8cb720,
+       0x00c26229,
+       0x5aadb783,
+       0x5ca0c180,
+       0x5b35b703,
+       0x2a7cc006,
+       0xb7039ea3,
+       0xc7f05bad,
+       0xb7232c80,
+       0x34965c2d,
+       0x9e539e9b,
+       0x8d00e052,
+       0xa019a016,
+       0xa092a09d,
+       0x9af8fff4,
+       0xaa15f9f8,
+       0xa6059c22,
+       0x0d80c021,
+       0x06b7d110,
+       0xc0000685,
+       0xb78091c0,
+       0x0a044688,
+       0x4688b580,
+       0x9abafff4,
+       0x4688b780,
+       0xb5801a04,
+       0x9d5d4688,
+       0x791baa61,
+       0xffff0d8e,
+       0xb79f9202,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa6059c22,
+       0xc4019e5c,
+       0xc0210902,
+       0x9e5d0a00,
+       0x0900c008,
+       0x9dcd0a20,
+       0xa161f000,
+       0xc0080992,
+       0xc0210d02,
+       0xfff40a80,
+       0x0ac09bce,
+       0x0a02c008,
+       0xf0009ddd,
+       0xb79fa261,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa61d9c22,
+       0xb7208440,
+       0xd132430c,
+       0x06876f31,
+       0x46b1b76a,
+       0x04e3d110,
+       0x05d60b02,
+       0x4294b560,
+       0x4c2bb5c1,
+       0x430cb780,
+       0xd0120c06,
+       0xd1100d32,
+       0x5d300669,
+       0x0a48c012,
+       0xa301da08,
+       0x430cb720,
+       0xd1109e52,
+       0xc02104e3,
+       0xb5c00900,
+       0xb78066ad,
+       0xc01a430c,
+       0xd1100920,
+       0xc0120669,
+       0xf2080a60,
+       0xb720a301,
+       0xd110430c,
+       0xb50004e3,
+       0xb78065b5,
+       0xd110430c,
+       0xc0120669,
+       0xd2080a20,
+       0x9dada301,
+       0xa361f000,
+       0xc0089e54,
+       0xc0210902,
+       0x0a400a00,
+       0xf0009dcd,
+       0xb7a0a161,
+       0x9e51430c,
+       0x0d00c040,
+       0x046ac101,
+       0x0d80d3f1,
+       0x604cb780,
+       0xa965f008,
+       0x0880c021,
+       0x08c0c046,
+       0x9d9d0244,
+       0xa261f000,
+       0x0d00c021,
+       0xf0009dae,
+       0xb702a361,
+       0xd0105450,
+       0xe0530636,
+       0xc1018d00,
+       0xc2000240,
+       0x9d4d5a08,
+       0xf010008b,
+       0x050d81a6,
+       0x5cadb700,
+       0xa9e1f008,
+       0xa8e1f208,
+       0x00ddd120,
+       0x0d40c012,
+       0x0155d120,
+       0xc0109e42,
+       0x9e840c90,
+       0xb7209c62,
+       0x7740430c,
+       0x04e3d110,
+       0x67adb5c0,
+       0x4314b720,
+       0x04e2d010,
+       0x714db780,
+       0x5f2db720,
+       0xb5800242,
+       0xc000714d,
+       0x9eb790e4,
+       0xa061f208,
+       0x9240c008,
+       0x4294b760,
+       0xd0110d7f,
+       0xc2000e32,
+       0x01095a30,
+       0x0900c021,
+       0x0940c00e,
+       0xf0009dad,
+       0x0910a162,
+       0xf0009dad,
+       0x0910a361,
+       0xf0009dad,
+       0xc021a361,
+       0xc00e0a00,
+       0x9dcd0a70,
+       0xa361f000,
+       0x430cb720,
+       0x2dfcc00e,
+       0xd110010d,
+       0x09c204e3,
+       0x5fadb720,
+       0x1910d052,
+       0x7d6eb79f,
+       0x7deeb7bf,
+       0x7e6eb7df,
+       0x7eeeb7ff,
+       0x8c40c002,
+       0x9280ff84,
+       0x4729b7ea,
+       0xc380070f,
+       0x02895a30,
+       0x0a80c021,
+       0x0a80c116,
+       0x9100c002,
+       0x5f4db780,
+       0xc0027500,
+       0xb7809002,
+       0x750067cd,
+       0x9162c000,
+       0xb5e09eab,
+       0xcfdf67d5,
+       0xcfea0dfc,
+       0xfff40d80,
+       0xb7409af0,
+       0xd0914314,
+       0xc1016e59,
+       0xb74200e4,
+       0x02445429,
+       0x74800248,
+       0x00c5d120,
+       0x91e2c000,
+       0x4c4bb781,
+       0x0902c201,
+       0x0900c004,
+       0x5a40c200,
+       0x2a7cc00f,
+       0xc0003244,
+       0xb7819140,
+       0xc2004c2b,
+       0xc00f5a40,
+       0xc2012a7c,
+       0xb5803a00,
+       0xb78066ad,
+       0xd131430c,
+       0x00986cd1,
+       0x66adb720,
+       0xf0009ddd,
+       0x0f04a0e1,
+       0x0a81cf00,
+       0x430cb720,
+       0x117cc101,
+       0x46a9b78a,
+       0x12a8d020,
+       0xd1317088,
+       0xd0206f51,
+       0xfffd00e2,
+       0xb7ca91b6,
+       0xc0034729,
+       0xd0209200,
+       0xd1321368,
+       0xd0916ee1,
+       0xd0106d69,
+       0x9ea806d2,
+       0x5f4cb780,
+       0xc0037500,
+       0xb7229022,
+       0xb7605448,
+       0x00a25e4d,
+       0xc1010092,
+       0xb7610092,
+       0xc3344c33,
+       0x008b9906,
+       0x67adb500,
+       0x430cb720,
+       0x04d3d110,
+       0x0910d3f1,
+       0xaa41f008,
+       0x67adb720,
+       0xf0081242,
+       0xb720a241,
+       0xd0104314,
+       0xb78004d2,
+       0xb720714d,
+       0x124267ad,
+       0x714db580,
+       0x430cb780,
+       0x0659d110,
+       0xc0120089,
+       0xb78008a0,
+       0x75004029,
+       0x90c2c000,
+       0x4031b5e0,
+       0x90a0c000,
+       0xb5400906,
+       0xb7004029,
+       0xd1324314,
+       0xd0106d61,
+       0xb76004a0,
+       0x74c05f2d,
+       0x9382c000,
+       0x5429b742,
+       0xe053026c,
+       0x02448d00,
+       0x5a08c200,
+       0xb7009d4d,
+       0xf0105ccc,
+       0x048480a6,
+       0xa8a1f208,
+       0x0d40c012,
+       0xc0109eb3,
+       0x05040c90,
+       0x9c629e84,
+       0xa021f208,
+       0xb7201b04,
+       0xb78a4314,
+       0x718846c9,
+       0x91b6fffc,
+       0x430cb720,
+       0x712db740,
+       0xfff97480,
+       0xb78a9024,
+       0x028546a9,
+       0x9220c000,
+       0x67adb780,
+       0xc0007500,
+       0xd0129122,
+       0xb5a009a2,
+       0x5db067ad,
+       0x9a1dfff4,
+       0x428cb780,
+       0xb7200a04,
+       0xb580430c,
+       0xb740428c,
+       0xb78a428c,
+       0xb74a4729,
+       0x708846b1,
+       0x2e2ed3f1,
+       0xc0041228,
+       0x00c26a22,
+       0x9014ffff,
+       0x2e2ed3f1,
+       0x0f8ec001,
+       0xc0020b02,
+       0xc0010bc2,
+       0xce000f0a,
+       0xb5800f80,
+       0xc005428c,
+       0xb78a93a0,
+       0x122846a9,
+       0x6ac1d132,
+       0x04d3d110,
+       0x65adb780,
+       0xc0057500,
+       0xd0129182,
+       0xb5c009a2,
+       0x5db067ad,
+       0xc0219e5c,
+       0xc0400a00,
+       0x9dcd0a00,
+       0xa3e1f000,
+       0x99ddfff4,
+       0x428cb7a0,
+       0x0952d011,
+       0x02055930,
+       0x0a00c021,
+       0x0a20c040,
+       0xaa619d4d,
+       0x430cb720,
+       0x9e929e7b,
+       0x04d3d110,
+       0x0d00c021,
+       0x65adb580,
+       0x430cb720,
+       0x0d40c046,
+       0x04d3d110,
+       0x65adb780,
+       0xc2002246,
+       0xb5805a35,
+       0x9d2e672d,
+       0xb720a962,
+       0x9e91430c,
+       0x04d3d110,
+       0x0c80c021,
+       0x65b5b540,
+       0x430cb720,
+       0x0cc0c00e,
+       0x04d3d110,
+       0xb7409e8b,
+       0xc01065b5,
+       0xf0100d80,
+       0xb760aa61,
+       0xb720672d,
+       0xc1015fad,
+       0x12460244,
+       0xf0101242,
+       0xb720a261,
+       0xd110430c,
+       0xb78004d3,
+       0x9d9e602d,
+       0xa261f000,
+       0xc0210205,
+       0xc00e0a00,
+       0x9dcd0a50,
+       0xa361f000,
+       0x9dcd0a10,
+       0xa361f000,
+       0x9dcd0a10,
+       0xa361f000,
+       0x0900c021,
+       0x0930c00e,
+       0xf0009dad,
+       0xb720a362,
+       0xc00e5fad,
+       0x9eab2afc,
+       0x1910d052,
+       0x010d09c2,
+       0x9af2ff74,
+       0xff749eab,
+       0xb7809b09,
+       0xd110430c,
+       0xc0100659,
+       0xf2080a00,
+       0xb780a301,
+       0xd110430c,
+       0xc00e0659,
+       0xf2080a60,
+       0xb780a305,
+       0xd110430c,
+       0xc00e0659,
+       0xf2080a60,
+       0xb720a301,
+       0xd110430c,
+       0xb5c004d3,
+       0xb72067ad,
+       0xb5c0430c,
+       0xb720712d,
+       0xd110430c,
+       0xb5c004d3,
+       0xb78065ad,
+       0x0a04428c,
+       0x428cb580,
+       0x430cb720,
+       0x428cb740,
+       0x4729b78a,
+       0xfff97088,
+       0xb79f93d4,
+       0xb7bf7d6e,
+       0xb7df7dee,
+       0xb7ff7e6e,
+       0xc0027eee,
+       0x9c228c40,
+       0xb720a605,
+       0x9e5d430c,
+       0x4829b78a,
+       0x22d8d020,
+       0xc0007346,
+       0xc0009244,
+       0xffd49080,
+       0xb7209bc1,
+       0x0d92430c,
+       0x48a9b78a,
+       0xffff7b59,
+       0xc0009304,
+       0xffd49380,
+       0xb7209bb5,
+       0xb740430c,
+       0x0d924588,
+       0x4829b78a,
+       0x22444a7d,
+       0xffff790a,
+       0x322a9284,
+       0x4588b580,
+       0x4829b78a,
+       0xb58a3258,
+       0xb7204829,
+       0xb78a430c,
+       0x325848a9,
+       0x0d82c021,
+       0x48a9b58a,
+       0x0da0c030,
+       0xa9629d3e,
+       0x4488b740,
+       0x59080a3e,
+       0x5208c200,
+       0x51a8c200,
+       0x4a7d21b8,
+       0x25229ea1,
+       0x35229e99,
+       0xf0009dbe,
+       0xb79fa162,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa6059c22,
+       0x478cb780,
+       0xb7400906,
+       0xf2084c14,
+       0xf010a10d,
+       0x0a10a043,
+       0xa803f208,
+       0x4a8cb7a0,
+       0xb5800a02,
+       0xd3724508,
+       0x010b1ad8,
+       0xaa4df1e9,
+       0xc000750c,
+       0x0d9290e2,
+       0x9b60ffd4,
+       0x92e0ffff,
+       0xffff709b,
+       0xb78092a4,
+       0xf2084c0c,
+       0xb79fa803,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xb7409c22,
+       0x0d064b0c,
+       0x4058b960,
+       0xaa41f008,
+       0xb4127508,
+       0x09504a22,
+       0x9341ffff,
+       0xb7209c22,
+       0xb785430c,
+       0x750044ab,
+       0x9142c000,
+       0x48a9b78a,
+       0x42289e5a,
+       0x48a9b58a,
+       0x9300c000,
+       0xb74a9e5c,
+       0x4a7d4829,
+       0x4000ba24,
+       0xb54a2144,
+       0xb7204829,
+       0xb74a430c,
+       0x224448a9,
+       0x48a9b58a,
+       0x4588b780,
+       0x42289e5a,
+       0x4588b580,
+       0x0982c021,
+       0x09a0c030,
+       0xa9629d3d,
+       0x4488b740,
+       0x2e3ed031,
+       0xc2005908,
+       0x4a7d5208,
+       0x25269ea3,
+       0xf0009dbd,
+       0xfffda162,
+       0xf8399340,
+       0xb720a205,
+       0xb783430c,
+       0xb58a5b2d,
+       0xb72047a9,
+       0xb783430c,
+       0xc2005b2d,
+       0xb58a5a21,
+       0xb7204729,
+       0xb786430c,
+       0xb58a76ab,
+       0xb72046a9,
+       0xb78d430c,
+       0xb58a6da9,
+       0xb7204629,
+       0xb76a430c,
+       0xfff447b1,
+       0xb7209b19,
+       0x0982430c,
+       0xb74a0dff,
+       0xba1246b1,
+       0xc0004001,
+       0xb7899140,
+       0x6a326ecd,
+       0xc1380242,
+       0xd2080a00,
+       0xb720a192,
+       0xc101430c,
+       0xc2000234,
+       0xd0205908,
+       0xb74a00a2,
+       0x09844729,
+       0xffff7104,
+       0xb76a919c,
+       0xf9f847b1,
+       0xfffcaa1d,
+       0xa60d9000,
+       0x8400c004,
+       0xc0210705,
+       0x03070d02,
+       0xc0309e95,
+       0x9d2e0d00,
+       0x0205a961,
+       0x2a70c03e,
+       0xcfc00a10,
+       0xc03e290d,
+       0x32442a70,
+       0xf0009dae,
+       0xc021a261,
+       0xc0300902,
+       0x9d2d0920,
+       0xc180aa61,
+       0x9e515d60,
+       0x2a7ec00f,
+       0x9dad3242,
+       0xa261f000,
+       0x76d6097f,
+       0xa121d210,
+       0x90a4c002,
+       0x2a3ed3f1,
+       0xd1a4750c,
+       0xc0105921,
+       0xd2269312,
+       0xb720590c,
+       0x8520430c,
+       0x8044e050,
+       0x91c0c000,
+       0x91a0c010,
+       0x91c0c000,
+       0x9340c000,
+       0x9380c000,
+       0x90a0c010,
+       0x9380c000,
+       0x4835b545,
+       0x93e0c00f,
+       0x0a060103,
+       0x0970c0a2,
+       0xa241d008,
+       0x430cb780,
+       0x0a74c0a2,
+       0xa102d208,
+       0x9220c00f,
+       0x6735b544,
+       0x91a0c00f,
+       0x68b5b544,
+       0x9120c00f,
+       0x5e30d122,
+       0x2d7cc03e,
+       0x5d18d122,
+       0x2a00cffd,
+       0xb5813244,
+       0xc00e482d,
+       0x76d89380,
+       0x9084c002,
+       0x430cb720,
+       0x5e2db781,
+       0xc0017500,
+       0xd3f191a2,
+       0xc01c2a3e,
+       0xb59f753e,
+       0xc0006268,
+       0xc18091c2,
+       0xc2005a21,
+       0xb59f5a0c,
+       0xb55f786c,
+       0xb55f6368,
+       0xc00062e8,
+       0xd1a491e0,
+       0x09025941,
+       0x5a21c180,
+       0x62e8b59f,
+       0x6370b55f,
+       0x6268b55f,
+       0x786cb55f,
+       0x430cb720,
+       0x8d80e112,
+       0x6badb729,
+       0x9c629e8c,
+       0x90e0c00d,
+       0x67a9b566,
+       0x430cb720,
+       0x5a21c180,
+       0x5941c180,
+       0x6829b586,
+       0x430cb720,
+       0x68a9b546,
+       0x92e0c00c,
+       0xc00476da,
+       0xffd49124,
+       0x9e839a1c,
+       0x9eaa0a86,
+       0x2dfcc00e,
+       0xd21055cc,
+       0xc00ea021,
+       0xfff42dfc,
+       0xd2109a2d,
+       0xe111a9a2,
+       0x050d8d00,
+       0x09a2c002,
+       0x9905ff94,
+       0xaa21d210,
+       0x52b0c200,
+       0x29ded3f2,
+       0x9aa9fff4,
+       0x8c80e111,
+       0x430cb780,
+       0x50a9b740,
+       0xb75f0244,
+       0xc0987068,
+       0xd2080a60,
+       0xb780a115,
+       0xb72050a9,
+       0xc200430c,
+       0x00c25a08,
+       0x796cb79f,
+       0x63adb582,
+       0x8c80e111,
+       0x50a9b780,
+       0x430cb720,
+       0x5a08c200,
+       0xb79f00c2,
+       0xb58279ec,
+       0xe111682d,
+       0xb7808c80,
+       0xb72050a9,
+       0xc200430c,
+       0x00c25a08,
+       0x7a6cb79f,
+       0x6cadb582,
+       0x8c80e111,
+       0x50a9b780,
+       0x430cb720,
+       0x5a08c200,
+       0xb79f00c2,
+       0xb5827aec,
+       0xe111712d,
+       0xb7808c80,
+       0xb72050a9,
+       0xc200430c,
+       0x00c25a08,
+       0x7b6cb79f,
+       0x75adb582,
+       0x8c80e111,
+       0x50a9b780,
+       0x430cb720,
+       0x5a08c200,
+       0xb79f00c2,
+       0xb5827bec,
+       0xe1117a2d,
+       0xb75f8c80,
+       0xb7807c6e,
+       0xb72050a9,
+       0xc200430c,
+       0x00c25a0c,
+       0x61afb541,
+       0x91a0c008,
+       0xc00176dc,
+       0xd3f192e4,
+       0x75022a3e,
+       0x90c2c001,
+       0xc0007502,
+       0x750492e6,
+       0x93e4c007,
+       0x430cb720,
+       0x5a21c180,
+       0x5941c180,
+       0x4535b5c2,
+       0x430cb720,
+       0x6c29b588,
+       0x430cb720,
+       0x6ca9b548,
+       0x91a0c007,
+       0x430cb720,
+       0x5a41c180,
+       0x45b5b5c2,
+       0x430cb720,
+       0x6d29b588,
+       0x9020c007,
+       0x430cb720,
+       0x5a41c180,
+       0x4635b5c2,
+       0x430cb720,
+       0x6da9b588,
+       0x92a0c006,
+       0xc00376de,
+       0xffd49164,
+       0x9e85995a,
+       0xc00e0a86,
+       0x9e6b2efc,
+       0x52acc200,
+       0x2afcc00e,
+       0xfff49eab,
+       0xe111996b,
+       0x050d8d00,
+       0x0982c004,
+       0xff94058b,
+       0x058b9844,
+       0x9826ff74,
+       0xfff49eab,
+       0xb78099ea,
+       0xd032430c,
+       0x0982296e,
+       0x0629d110,
+       0xc1369e9b,
+       0xd2080a00,
+       0xb720a18d,
+       0xc300430c,
+       0xcfc05a18,
+       0xb5822a01,
+       0xb7807ead,
+       0xd031430c,
+       0x00986ca9,
+       0x78ecb79f,
+       0x702db589,
+       0x0624d010,
+       0x796cb75f,
+       0x0045d120,
+       0x430cb780,
+       0x2900c01e,
+       0xc1365915,
+       0xd2080a08,
+       0xc000a101,
+       0xb78090c0,
+       0xb589404d,
+       0xd3f16fad,
+       0xb7602d3e,
+       0xc100430c,
+       0x9d4d5a08,
+       0xc1360207,
+       0xd2080a08,
+       0xd110a902,
+       0xe1130605,
+       0xc2008d00,
+       0x72955a08,
+       0x80a6e020,
+       0x0d8400c6,
+       0x90b2ffff,
+       0x9120c003,
+       0xc00176ea,
+       0xf01190a4,
+       0xc0002a32,
+       0xffd49362,
+       0x9e8398ea,
+       0x9eaa0a86,
+       0x2dfcc00e,
+       0xc00e55cc,
+       0xd2102dfc,
+       0xfff4a021,
+       0xb74098fb,
+       0xd210430c,
+       0x050da9a2,
+       0x0920c046,
+       0x09d2c002,
+       0x9040c001,
+       0x430cb720,
+       0x4f2db582,
+       0x9060c002,
+       0xc00176ec,
+       0xffd490a4,
+       0x9e8398c8,
+       0x9eaa0a86,
+       0x2dfcc00e,
+       0xc00e55cc,
+       0xd2102dfc,
+       0xfff4a021,
+       0xb74098d9,
+       0xd210430c,
+       0x050da9a2,
+       0x0970c048,
+       0x0982c002,
+       0x9bafff74,
+       0xaa21d210,
+       0x52b0c200,
+       0x29ded3f2,
+       0x9953fff4,
+       0x93a0c000,
+       0xc00076e0,
+       0xb7809164,
+       0x0906430c,
+       0x0a10c0a4,
+       0xa101d208,
+       0x9220c000,
+       0xc00076c6,
+       0xc2d490c4,
+       0xc0009a61,
+       0xb7409140,
+       0xd1a2598c,
+       0xe2205e08,
+       0x9ea4aa05,
+       0xb7209c62,
+       0x0203430c,
+       0x0a10c0a4,
+       0xaa01d208,
+       0xc0007500,
+       0x0a029222,
+       0x44abb585,
+       0x430cb720,
+       0x4829b78a,
+       0x48b1b76a,
+       0x45b49ea2,
+       0x2dfcc00e,
+       0x991dfff4,
+       0x7aeeb79f,
+       0x7b6eb7bf,
+       0x7beeb7df,
+       0x8c60c004,
+       0xa61d9c22,
+       0x8400c002,
+       0xd050a19a,
+       0xb740aa61,
+       0x08824c8c,
+       0x02891a08,
+       0xc00e0a02,
+       0xc1462afc,
+       0x62590a00,
+       0x4794b7e0,
+       0x0898c014,
+       0x60d303c4,
+       0xa0919ebb,
+       0x008f020f,
+       0xc06c0d02,
+       0xc06c0d80,
+       0xc06e0a60,
+       0x9ebd0880,
+       0xa196a11e,
+       0x7decb59f,
+       0x7d6cb53f,
+       0xff749eab,
+       0xb7809ab3,
+       0xc0a2430c,
+       0xd2080a38,
+       0xc000ab01,
+       0x0d9290a0,
+       0x981effd4,
+       0x008fa896,
+       0x60a9b78d,
+       0x4049b740,
+       0x4c94b7c0,
+       0xffff7088,
+       0x75809282,
+       0x9164c000,
+       0x430cb720,
+       0x47b1b76a,
+       0x9aafff74,
+       0xffff7400,
+       0x9eab9104,
+       0x9a8eff74,
+       0x048ba915,
+       0x60c9b76d,
+       0xaa41d008,
+       0xc0017106,
+       0xa8919102,
+       0x7df4b73f,
+       0x09b2d012,
+       0xc2000216,
+       0xc1015a10,
+       0xb78300cc,
+       0xb7434cad,
+       0xb7434db5,
+       0xb7234c2d,
+       0xb5804d2d,
+       0x048b404d,
+       0x5bcdb523,
+       0x7d6cb79f,
+       0xb543099a,
+       0xf2085acd,
+       0xc006a102,
+       0xa11d297c,
+       0x9bf4c2f4,
+       0xb50d9e69,
+       0x9eab60a9,
+       0x9a5cff74,
+       0x430cb720,
+       0xe091a99e,
+       0xb7438d00,
+       0xb7635bb5,
+       0xfff45b2d,
+       0xb79f9908,
+       0xc01c7068,
+       0xc000753e,
+       0xff7490c4,
+       0xb51f9a75,
+       0xb77f7068,
+       0x0c867070,
+       0xc00e55ac,
+       0xffd42dfc,
+       0xb7609be7,
+       0xb7404490,
+       0xb77f4c8c,
+       0x9e5c7068,
+       0x6a02c146,
+       0xb74300c4,
+       0x9e5a5ab5,
+       0x2d045d3d,
+       0x98b6ffd4,
+       0x7070b77f,
+       0x55cc0d06,
+       0x2dfcc00e,
+       0x985bfff4,
+       0xaa61f250,
+       0xc0007508,
+       0x0d8690a4,
+       0xa1e2f250,
+       0x430cb720,
+       0x4914b740,
+       0x4e8cb760,
+       0xaa41f010,
+       0xc0007508,
+       0xb78a91c4,
+       0xd00847a9,
+       0x2244a961,
+       0x7d3ec01c,
+       0x90a2c000,
+       0xf0100a06,
+       0xb720a241,
+       0x0d504894,
+       0x0980c146,
+       0xffff7282,
+       0xa91d9124,
+       0xfffa7482,
+       0xb74090e4,
+       0xf0504794,
+       0xb780a141,
+       0xa99a4608,
+       0xb5800a04,
+       0x0a1a4608,
+       0xa26df010,
+       0x7c6eb79f,
+       0x7ceeb7bf,
+       0x7d6eb7df,
+       0x7deeb7ff,
+       0x8c00c004,
+       0xa61d9c22,
+       0x8440c006,
+       0x430cb720,
+       0x8d00f1d2,
+       0x5c2db783,
+       0x5b2db7c3,
+       0xb783a215,
+       0xa2195bad,
+       0xc2000a06,
+       0x9ea55218,
+       0x5aadb723,
+       0x2efcc00e,
+       0xa091058b,
+       0x9b70ffd4,
+       0x4314b720,
+       0x8d00e1d1,
+       0x4028b960,
+       0x6049b7ed,
+       0x60d1b7ed,
+       0xb7839e49,
+       0xf0084c2d,
+       0xb783a241,
+       0xf0084cad,
+       0xb783a245,
+       0xf0084d2d,
+       0xb783a249,
+       0x08c04dad,
+       0xa24df008,
+       0xffff0940,
+       0x0a8291c1,
+       0x4849b5aa,
+       0x430cb720,
+       0x29eed3f2,
+       0x0992c006,
+       0x48a9b5aa,
+       0xb740a91a,
+       0xff74430c,
+       0xb7209a22,
+       0x058b430c,
+       0x4831b5aa,
+       0x430cb720,
+       0x48b1b5aa,
+       0x430cb780,
+       0x0a10c0a4,
+       0xa281d208,
+       0x430cb720,
+       0x44abb5a5,
+       0x9bb9ffd4,
+       0x430cb720,
+       0xb9609eaa,
+       0xb5ed4028,
+       0xb7206029,
+       0xb5ed430c,
+       0xb72060b1,
+       0xf210430c,
+       0xc100aa41,
+       0xd1105c90,
+       0x0d040493,
+       0x4c2db583,
+       0x430cb720,
+       0xaa45f210,
+       0x0493d110,
+       0x4cadb583,
+       0x430cb720,
+       0xaa49f210,
+       0x0493d110,
+       0x4d2db583,
+       0x430cb780,
+       0xa94df210,
+       0xc1010f40,
+       0xb5430498,
+       0xfffe4dcd,
+       0xb7209381,
+       0xaa11430c,
+       0x5aadb583,
+       0x430cb720,
+       0x5b2db5c3,
+       0x430cb720,
+       0xb583aa19,
+       0xb7205bad,
+       0xaa15430c,
+       0x5c2db583,
+       0x430cb720,
+       0x70a9b780,
+       0x47a9b58a,
+       0x430cb720,
+       0x7029b780,
+       0x4729b58a,
+       0x430cb720,
+       0x6fa9b780,
+       0x46a9b58a,
+       0x430cb720,
+       0x6f29b780,
+       0x4629b58a,
+       0x430cb720,
+       0x572bb780,
+       0xc0017504,
+       0xc80991d2,
+       0xc0ec0a42,
+       0xb5800a30,
+       0xb7205cad,
+       0xc809430c,
+       0xc06c0a42,
+       0xb5800a40,
+       0xb7205d2d,
+       0xb760430c,
+       0xb74044b5,
+       0xb74046b5,
+       0xb780452d,
+       0xb760472d,
+       0xc101572b,
+       0xc1016127,
+       0x74c06245,
+       0x02c4d020,
+       0x9024c001,
+       0x48adb740,
+       0x492db780,
+       0xc1016245,
+       0xc00006d8,
+       0xc8099300,
+       0xc0aa0a42,
+       0xb5800a30,
+       0xb7205cad,
+       0xc809430c,
+       0xc0800a42,
+       0xb5800a40,
+       0xb7805d2d,
+       0xf248430c,
+       0xf248a905,
+       0xd032aa09,
+       0xb72062c4,
+       0xc100430c,
+       0x9e6b0a02,
+       0x5eadb580,
+       0x430cb7a0,
+       0xb760008b,
+       0xc2f45eb5,
+       0x008b9a16,
+       0x5eadb500,
+       0x430cb7a0,
+       0xaa35f248,
+       0xc0007500,
+       0x008b9242,
+       0x5eb5b760,
+       0xd1320189,
+       0xcffc61c7,
+       0xc2f42d81,
+       0x74009a02,
+       0x90a2c000,
+       0xb500008b,
+       0xb7205ead,
+       0xd2a2430c,
+       0xb5805e19,
+       0xb7405dad,
+       0xf0504314,
+       0xf050aa4d,
+       0x0244a945,
+       0xf0501a04,
+       0xb7a0a24d,
+       0xf248430c,
+       0xf248aaa6,
+       0x9e6ba9ae,
+       0x99e3c2f4,
+       0x600bc101,
+       0xa02df248,
+       0x430cb720,
+       0x46b5b720,
+       0x472db780,
+       0x4535b740,
+       0x44b5b760,
+       0x492db740,
+       0x48adb760,
+       0x6243c101,
+       0x61276527,
+       0x0244c101,
+       0xc2000244,
+       0xb5805a19,
+       0xb7405e2d,
+       0xf008430c,
+       0xc004aa45,
+       0xc0017d3e,
+       0xf00890e4,
+       0xe002aa51,
+       0xc0012a7c,
+       0x9ea29024,
+       0xc0000189,
+       0xb56091c0,
+       0xb7205f4d,
+       0x00a2430c,
+       0x67adb560,
+       0x430cb720,
+       0xb56000a2,
+       0xb72065ad,
+       0xd131430c,
+       0xb78a6d21,
+       0xd0204629,
+       0x729900a2,
+       0xffff0d04,
+       0x0a029146,
+       0x712db580,
+       0x776eb79f,
+       0x77eeb7bf,
+       0x786eb7df,
+       0x78eeb7ff,
+       0x8c40c008,
+       0xa6059c22,
+       0x430cb7a0,
+       0x008b0e86,
+       0x5b35b763,
+       0x5badb7a3,
+       0x55acc200,
+       0x2dfcc00e,
+       0x99e2ffd4,
+       0x430cb720,
+       0xc0089eaa,
+       0xb76d0982,
+       0xd1916c31,
+       0xff740918,
+       0xb72098b8,
+       0xb743430c,
+       0xc2005b35,
+       0xd3f256a8,
+       0xffd42dde,
+       0xb7209a5a,
+       0xd191430c,
+       0xb5820a18,
+       0xb79f612d,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa6059c22,
+       0x430cb7a0,
+       0x008b0e86,
+       0x5b35b763,
+       0x5badb7a3,
+       0x55acc200,
+       0x2dfcc00e,
+       0x99b2ffd4,
+       0x430cb720,
+       0xc0089eaa,
+       0xb76d0982,
+       0x01036c31,
+       0x0930c018,
+       0x9887ff74,
+       0x430cb720,
+       0x5b35b743,
+       0x56a8c200,
+       0x2dded3f2,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0xffd18c40,
+       0xa60d9080,
+       0x4994b7a0,
+       0x4c8cb720,
+       0x050b0902,
+       0x01850d96,
+       0x4038b960,
+       0xc1460a02,
+       0x62290a00,
+       0xc1420242,
+       0xf2080a78,
+       0x0904a182,
+       0xa1d5f031,
+       0x9281ffff,
+       0x478cb740,
+       0x0a46c809,
+       0x0a10cbec,
+       0xa1c1f048,
+       0xa255f008,
+       0x0b060287,
+       0x99c3ffd4,
+       0xaa35f231,
+       0x295ed3f1,
+       0x75000d82,
+       0x0a849eb2,
+       0x90e2c000,
+       0xb5c09e5b,
+       0xffb44508,
+       0x75509a41,
+       0x9204ffff,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0xc0215db0,
+       0xc1020d80,
+       0x9d3e0da0,
+       0x59b8aa61,
+       0x2980c400,
+       0x2a7dcbfe,
+       0x9dbe3246,
+       0xa261f000,
+       0xb7209c22,
+       0x0926430c,
+       0xb7449e5b,
+       0x08026735,
+       0x1e22d011,
+       0xb3227510,
+       0xc0104826,
+       0xc0009c8b,
+       0xd2089160,
+       0x7106aa01,
+       0x90a4c000,
+       0x287cc00e,
+       0x08049c22,
+       0xc0980203,
+       0x08840a74,
+       0x9261ffff,
+       0x087ec00e,
+       0xa6059c22,
+       0x430cb740,
+       0x5e88d1a2,
+       0xb78900d4,
+       0x6a326ead,
+       0xc1380244,
+       0xd2080a00,
+       0x0904a911,
+       0xa111d208,
+       0x430cb740,
+       0xb78900d4,
+       0x6a326ead,
+       0xc1380244,
+       0xd2080a00,
+       0x7502aa11,
+       0x90d4c000,
+       0x087ec00e,
+       0x92c0c001,
+       0x00a6c101,
+       0xb54c0902,
+       0xb7204829,
+       0xd1a2430c,
+       0xc0045e18,
+       0xd1100982,
+       0xb76004b3,
+       0xb54c5914,
+       0xd1204929,
+       0xb78001c7,
+       0x0258430c,
+       0x0a60c05e,
+       0xa101f208,
+       0x430cb720,
+       0x402db543,
+       0x430cb720,
+       0xb54300d2,
+       0xb72040ad,
+       0xb543430c,
+       0xff3441ad,
+       0xb7409a2c,
+       0x00d4430c,
+       0x6eadb789,
+       0x02446a32,
+       0x0a00c138,
+       0xa811d208,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0x430cb760,
+       0xb9600d02,
+       0xc1014078,
+       0x02050134,
+       0x0a0cc136,
+       0xaa01d208,
+       0xc0007500,
+       0xc13692a4,
+       0x0a040900,
+       0xa24dd008,
+       0x430cb740,
+       0x6e29d031,
+       0x2d7cc00e,
+       0xc1380244,
+       0x097f0a00,
+       0xa111d208,
+       0x90e0c000,
+       0xffff0d04,
+       0xc00e9041,
+       0x9e500d7e,
+       0xa61d9c22,
+       0x430cb720,
+       0x02039e5f,
+       0x0a10c0a4,
+       0xaa01d208,
+       0x4729b7ca,
+       0xc0057500,
+       0xc30093a4,
+       0xd0205a88,
+       0x9e6902d2,
+       0x6eadb789,
+       0x753ec01c,
+       0x9004c001,
+       0x9eae9eb3,
+       0x9bbcfff4,
+       0xc0009e69,
+       0xffb49180,
+       0xb7a09849,
+       0x9eb3430c,
+       0x06ebd110,
+       0x9bb0fff4,
+       0xb509008b,
+       0xb7206ead,
+       0x0d92430c,
+       0x04e3d110,
+       0x6eadb789,
+       0x753ec01c,
+       0x9162ffff,
+       0x430cb720,
+       0x5908c300,
+       0x00a2d020,
+       0xb7899e8a,
+       0xc09c6ecd,
+       0x6a320d10,
+       0xb72900c2,
+       0xb780702d,
+       0x9e8b568c,
+       0xa1c6e040,
+       0xaa41d010,
+       0xc0037500,
+       0x9eb39284,
+       0x91c0c000,
+       0x9816ffb4,
+       0x430cb780,
+       0xc0a49eb3,
+       0xd2080a10,
+       0x7500aa01,
+       0x9184c003,
+       0x9b1bfff4,
+       0x743ec01c,
+       0xffff0d92,
+       0x75c091e2,
+       0x9062c001,
+       0x430cb720,
+       0x9e9a0982,
+       0x46b1b76a,
+       0x4729b72a,
+       0x5e30d1a2,
+       0xc0210109,
+       0xc1400900,
+       0xc0000930,
+       0x9dad91a0,
+       0xa162f000,
+       0x0a28d011,
+       0xf0009dcd,
+       0x0984a162,
+       0x0900c100,
+       0x0236c101,
+       0xffff7102,
+       0xb720925c,
+       0xd3244314,
+       0xc3005988,
+       0xd01059b0,
+       0xc02104b2,
+       0xb7490980,
+       0xc1466eb5,
+       0xd03109c0,
+       0xd0106d29,
+       0xc1010624,
+       0xc1380122,
+       0xd0080900,
+       0xc101a951,
+       0x02440244,
+       0x5a08c200,
+       0x00c2c101,
+       0x4f8cb780,
+       0x6fadb729,
+       0xe0209ea2,
+       0x9dbda0e9,
+       0xa0e1f000,
+       0x40c9b786,
+       0xc0007500,
+       0xb78c9184,
+       0x750053cb,
+       0x90e2c000,
+       0x4a4db766,
+       0xff949eb3,
+       0xb78099c8,
+       0x0906430c,
+       0x0a10c09c,
+       0xa101d208,
+       0x7e6eb79f,
+       0x7eeeb7bf,
+       0x7f6eb7df,
+       0x7feeb7ff,
+       0x8c00c002,
+       0xa6059c22,
+       0x430cb720,
+       0xb7449e5d,
+       0x7ca063ad,
+       0x9202c001,
+       0x5dadb781,
+       0xc0007504,
+       0xc10090e4,
+       0x2a045a21,
+       0x7e2bb584,
+       0x430cb720,
+       0x5dadb781,
+       0x75021a10,
+       0x90b2c000,
+       0xb5840a06,
+       0xb7207f2b,
+       0xb788430c,
+       0x01836e29,
+       0xb7419e8b,
+       0xb7495333,
+       0xc02669ad,
+       0x01b8098c,
+       0x0df0c04a,
+       0x9c629e94,
+       0x430cb720,
+       0x63adb784,
+       0x2a3dcffe,
+       0x63adb584,
+       0x430cb720,
+       0x532bb78c,
+       0xc0017500,
+       0xb7449222,
+       0x74846cad,
+       0x9124c000,
+       0x4badb781,
+       0xc0017500,
+       0xc0009084,
+       0x74829140,
+       0x90e4c000,
+       0x4b2db781,
+       0xc0007502,
+       0x02039344,
+       0x0a14c09c,
+       0xaa01d208,
+       0xc0007500,
+       0x74869244,
+       0x9144c000,
+       0xc09a0203,
+       0xd2080a40,
+       0x7500aa01,
+       0x90e4c000,
+       0x5dadb781,
+       0xc000750a,
+       0x0a0290a4,
+       0x532bb58c,
+       0x430cb720,
+       0xc0a40203,
+       0xd2080a18,
+       0xb764aa01,
+       0x75006cb5,
+       0x93e2c000,
+       0x53abb741,
+       0x6b2db709,
+       0x532bb76c,
+       0x9e849eaa,
+       0xb7209c62,
+       0xb781430c,
+       0x1a105dad,
+       0xc0007502,
+       0xb78c90f2,
+       0x7500532b,
+       0x9064c001,
+       0xc09c0203,
+       0xd2080a20,
+       0xc000a001,
+       0x76c49380,
+       0x9164c000,
+       0x75a9b749,
+       0xc09c0203,
+       0xd2080a20,
+       0xc000a101,
+       0x01039200,
+       0xc09c76c6,
+       0xc0000920,
+       0xb78990c4,
+       0xc0007629,
+       0xb7899080,
+       0xd0087529,
+       0xb720a241,
+       0xb781430c,
+       0x1a105dad,
+       0xc0007502,
+       0xb78c90f2,
+       0x7500532b,
+       0x9344c000,
+       0x46a9b74a,
+       0x5514b760,
+       0xc09c0183,
+       0xc00009a0,
+       0xd0089140,
+       0x9e91aa61,
+       0xc0309e52,
+       0xc00ea229,
+       0xb78a297c,
+       0xd0124729,
+       0x71040922,
+       0x9268ffff,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0x4314b720,
+       0xc0980596,
+       0xd0100da0,
+       0xb704a8ed,
+       0xba096e4d,
+       0x747f4000,
+       0x1802d001,
+       0x48a2b340,
+       0xc1010092,
+       0xb7890092,
+       0xc00e532b,
+       0xc2002a60,
+       0x00405a0f,
+       0xa61d9c22,
+       0x430cb7a0,
+       0x9e9e0687,
+       0xc096020b,
+       0xd2080a58,
+       0x9e57a982,
+       0x9bdafff4,
+       0xc096020b,
+       0xd2080a54,
+       0x0301a982,
+       0x9bd2fff4,
+       0xc096020b,
+       0xd2080a50,
+       0x9ea8aa01,
+       0x02589e81,
+       0x0a20c098,
+       0xaa0dd208,
+       0x6e4cb744,
+       0x4000ba24,
+       0xd001753f,
+       0xc00019a2,
+       0x020b9202,
+       0x0a30c096,
+       0xa881d208,
+       0x009a0092,
+       0x532bb789,
+       0x2a60c00e,
+       0x5a0fc200,
+       0x778001c4,
+       0x9102c000,
+       0x0d829eaa,
+       0x0d50c026,
+       0x9320c001,
+       0xc00075c6,
+       0x718691e2,
+       0x1266d01d,
+       0x123cd01e,
+       0x19c2d012,
+       0x6e39d031,
+       0x0a00c028,
+       0x90e0c001,
+       0xc098020b,
+       0xd2080a08,
+       0x7500aa01,
+       0x9222c000,
+       0xc4099e69,
+       0xb5800a02,
+       0xc001622d,
+       0xc0100a42,
+       0xb5c00a00,
+       0xb5806335,
+       0xc00162ad,
+       0x70d39220,
+       0xd11e0c02,
+       0xd11d1617,
+       0xd0121233,
+       0xcc121942,
+       0xd0317280,
+       0xc09c6e39,
+       0xd0200a60,
+       0xf0100158,
+       0x9e69aa49,
+       0xb58076c0,
+       0xf010622d,
+       0xb580aa45,
+       0xf01062ad,
+       0xb580aa41,
+       0xc000632d,
+       0xd0a29236,
+       0xd3f15d60,
+       0xc2002a6e,
+       0x32445a20,
+       0x293ed3f1,
+       0x3a7cc00e,
+       0x32445940,
+       0x622db580,
+       0x7e6eb79f,
+       0x7eeeb7bf,
+       0x7f6eb7df,
+       0x7feeb7ff,
+       0x8c00c002,
+       0xa6059c22,
+       0xb7208420,
+       0x0a82430c,
+       0x7e6ab5bf,
+       0x46a9b72a,
+       0x5514b720,
+       0x9e8b0407,
+       0xc0100207,
+       0x9e43a969,
+       0xe0310485,
+       0x9ea28c80,
+       0x9b48ff74,
+       0x430cb720,
+       0xb76a018b,
+       0xff9446b1,
+       0xb79f9848,
+       0xb7bf7eee,
+       0x8c607f6e,
+       0xb7209c22,
+       0xd1a24314,
+       0x9e9a5cb0,
+       0x7ec9b785,
+       0x0880c140,
+       0x0880c021,
+       0x5a24c200,
+       0x2a00c020,
+       0x9d9d3a04,
+       0xa261f000,
+       0x09060185,
+       0x92c0ff82,
+       0xa205f839,
+       0xb7208420,
+       0x0a02430c,
+       0x7e6ab59f,
+       0x5f2bb741,
+       0xc09c0203,
+       0x74800a20,
+       0xa981d208,
+       0x9104c000,
+       0x6eadb740,
+       0x8d00e032,
+       0x9bd3fff4,
+       0xaa19f9f8,
+       0xf8399c22,
+       0x8420a205,
+       0x430cb720,
+       0xb59f0a02,
+       0xb7417e6a,
+       0x9ea25f2b,
+       0xc0007480,
+       0x02039204,
+       0x0a14c0a4,
+       0xa102d208,
+       0x430cb720,
+       0x8d00e032,
+       0xb74009ea,
+       0xfff46cad,
+       0xf9f89bb4,
+       0x9c22aa19,
+       0xb720a605,
+       0x0687430c,
+       0x5dadb781,
+       0xc0007504,
+       0xb78093c4,
+       0x9e5a558c,
+       0xaa45c040,
+       0xc0007500,
+       0xd3f19142,
+       0x9eab2ebe,
+       0x9bb2fff4,
+       0xc0009eab,
+       0x02039180,
+       0x0a14c0a4,
+       0xaa01d208,
+       0xc0007500,
+       0xc00e90c2,
+       0xfff42dfc,
+       0xb7209bbe,
+       0x0203430c,
+       0x0a18c09c,
+       0xaa01d208,
+       0xc0017500,
+       0xb7819162,
+       0x75045dad,
+       0x90c4c001,
+       0x4129b786,
+       0xc0017500,
+       0xb7809022,
+       0x9e6a558c,
+       0xaa45c040,
+       0xc0007500,
+       0xb7609142,
+       0xd3f268ad,
+       0x0d022dde,
+       0xff740906,
+       0xb7209bd3,
+       0xd3f2430c,
+       0x0d022dde,
+       0x692db760,
+       0xb79f0906,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0x9080ff7e,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0xb740a61d,
+       0xb720558c,
+       0x0a024314,
+       0x06879e92,
+       0xa269c020,
+       0x5dcdb741,
+       0x1a28d011,
+       0xc0007502,
+       0xb78c9172,
+       0x7500534b,
+       0x90c2c000,
+       0x6e55b740,
+       0x9140c000,
+       0x6ccdb784,
+       0x5a08c200,
+       0x00c2c101,
+       0x6cb5b740,
+       0xc000748a,
+       0x090690a2,
+       0x90e0c000,
+       0x500cb780,
+       0xc0409e6b,
+       0xb76aa965,
+       0x9e5346d1,
+       0x5514b740,
+       0xa96ac020,
+       0x9b88ff74,
+       0x4314b720,
+       0x5dcdb781,
+       0x75021a10,
+       0x91b2c003,
+       0x534bb78c,
+       0xc0037500,
+       0xd0119102,
+       0xc0080ed2,
+       0xc2800b02,
+       0x9eae5ab0,
+       0x0f00c021,
+       0x9dee0f40,
+       0xa361f000,
+       0xc040010b,
+       0xc0210900,
+       0x9d2d0900,
+       0xc002aa61,
+       0x9dad3a40,
+       0xa261f000,
+       0x5c88d2a2,
+       0xc1019ead,
+       0xb7490092,
+       0xc0216eb5,
+       0x0ea00e80,
+       0x6d29d031,
+       0x0624d010,
+       0x0122c101,
+       0x0900c138,
+       0xa951d008,
+       0x0244c101,
+       0xc2000244,
+       0xc1015a08,
+       0xc40100c2,
+       0xb7e90a02,
+       0xc0086fad,
+       0x9dde0a00,
+       0xa261f000,
+       0x9eb29eab,
+       0x010d0992,
+       0x99f3ff14,
+       0x9dde0a02,
+       0xa261f000,
+       0xf0009dee,
+       0x020ba361,
+       0x0a00c021,
+       0x0a20c040,
+       0xa9629d4d,
+       0x9d4d1a10,
+       0xc021aa61,
+       0xc0460a80,
+       0x9d5d0ac0,
+       0x7480a961,
+       0x90e2c000,
+       0x5e35d122,
+       0x2a7c112e,
+       0xb7201128,
+       0xb544430c,
+       0xb79f76ad,
+       0xb7bf7e6e,
+       0xb7df7eee,
+       0xb7ff7f6e,
+       0xc0027fee,
+       0x9c228c00,
+       0x74c0a605,
+       0xc0000687,
+       0xb7809324,
+       0x9e5a500c,
+       0xaa45c040,
+       0xc0007500,
+       0xb7209222,
+       0x0203430c,
+       0x0a10c09c,
+       0xaa01d208,
+       0xc0007500,
+       0xb78a90e2,
+       0x71174729,
+       0x9302c001,
+       0x430cb720,
+       0xc0a20203,
+       0xd2080a38,
+       0x7500aa01,
+       0x93c4c000,
+       0xb78a0103,
+       0xc0a44729,
+       0xd008091c,
+       0xb76aa941,
+       0xc1014629,
+       0x6245124a,
+       0x19b2d012,
+       0x029ac101,
+       0x0ac0c0a2,
+       0x05b8c101,
+       0xaaa5d208,
+       0x980ec2d4,
+       0x71400804,
+       0x9244c000,
+       0x4f94b740,
+       0x5e30d2a2,
+       0x5d08d2a2,
+       0xc0219e53,
+       0xe0300a00,
+       0xc146a945,
+       0x9dcd0a40,
+       0xa161f000,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0x74c6a60d,
+       0x9e5d0307,
+       0x90a2c000,
+       0xc00074c4,
+       0x9eb690a4,
+       0x92c0c000,
+       0x430cb740,
+       0xc09c0205,
+       0xd2080a14,
+       0x7500aa01,
+       0x90a4c000,
+       0xc0000f06,
+       0x02059120,
+       0x0a10c06e,
+       0x0f027148,
+       0x0f62d002,
+       0xaa31f208,
+       0x4314b720,
+       0xc0007399,
+       0xb7839344,
+       0xf20858cd,
+       0xb720a221,
+       0xb723430c,
+       0xf208592d,
+       0xb720a0a5,
+       0xb723430c,
+       0xf20859ad,
+       0xb720a0a9,
+       0xb723430c,
+       0xf2085a2d,
+       0xc001a0ad,
+       0xd32290e0,
+       0xb76a5c88,
+       0xc10146d1,
+       0xb7400092,
+       0xc0106a35,
+       0x010b09c2,
+       0x9ae7ff34,
+       0x430cb720,
+       0xaa21f208,
+       0x58adb583,
+       0x430cb720,
+       0xaa25f208,
+       0x592db583,
+       0x430cb720,
+       0xaa29f208,
+       0x59adb583,
+       0x430cb720,
+       0xaa2df208,
+       0x5a2db583,
+       0x4314b720,
+       0x0ad8d052,
+       0x6c49b788,
+       0x4008ba0c,
+       0x922ac000,
+       0xc1015888,
+       0xb76a0092,
+       0xb74246d1,
+       0x9e6a46b5,
+       0x09f2c00e,
+       0x9ab9ff34,
+       0xf2080a16,
+       0xd210a231,
+       0xc400aa21,
+       0xc2000982,
+       0xf2100902,
+       0xf208a221,
+       0xc9fea92e,
+       0xf2082d7d,
+       0xb720a12e,
+       0xb784430c,
+       0x7500752d,
+       0x4422b343,
+       0xb3427500,
+       0x31264422,
+       0x31269e53,
+       0xa12df208,
+       0x430cb720,
+       0x6cadb784,
+       0xc0007502,
+       0xc02090c2,
+       0xf2083900,
+       0xf208a12d,
+       0xc010aa2d,
+       0xf2083a00,
+       0xb720a22d,
+       0xb784430c,
+       0x75066cad,
+       0x91c4c000,
+       0xaa21f208,
+       0x7d00c080,
+       0x91c2c000,
+       0xc0980103,
+       0x0a020914,
+       0x90c0c000,
+       0xc0980103,
+       0x0a0a0914,
+       0xa241d008,
+       0xaa21f208,
+       0x7d00c040,
+       0x93a2c002,
+       0x430cb720,
+       0x6cadb784,
+       0xc0027504,
+       0x018392c4,
+       0x0990c098,
+       0xa961d008,
+       0xc0027480,
+       0xb78491c4,
+       0xdffd702d,
+       0xc0007d3e,
+       0x020392c2,
+       0x0a08c098,
+       0xaa01d208,
+       0xc0017500,
+       0x02039082,
+       0x0a0cc098,
+       0xaa01d208,
+       0xc0007500,
+       0xd0089382,
+       0xc001a161,
+       0x020390a0,
+       0xc0960103,
+       0xc0960a58,
+       0xd2080954,
+       0xd008a902,
+       0x7299aa41,
+       0x9164c000,
+       0x7ea9b785,
+       0xc0007500,
+       0xd00890c4,
+       0xc000a261,
+       0x010391e0,
+       0x0910c098,
+       0xd0080a06,
+       0xb780a241,
+       0x0902430c,
+       0x0a14c098,
+       0xa101d208,
+       0x430cb780,
+       0x0a10c098,
+       0xaa01d208,
+       0xc0007500,
+       0xf2089102,
+       0xcfbeaa2d,
+       0xf2082a7d,
+       0xb720a22d,
+       0xb781430c,
+       0x75045dad,
+       0x9102c000,
+       0xaa2df208,
+       0x2a7dcfde,
+       0xa22df208,
+       0x430cb720,
+       0x5dadb781,
+       0xc0017504,
+       0xf2089304,
+       0xcfffa92d,
+       0xc7fe0a5e,
+       0xd0200a7c,
+       0xf2082128,
+       0xb720a12e,
+       0x0203430c,
+       0x0a40c09a,
+       0xaa01d208,
+       0xc0007500,
+       0xb78190e2,
+       0x75024b2d,
+       0x90e4c000,
+       0x4029b786,
+       0xc0007500,
+       0x9e539142,
+       0x2900c800,
+       0xc0013226,
+       0xf2083a20,
+       0xb720a22d,
+       0xb781430c,
+       0x75024b2d,
+       0x9164c000,
+       0xaa2df208,
+       0x0962cfff,
+       0x097cc8fe,
+       0xf2082244,
+       0xb780a22d,
+       0xf208430c,
+       0xc011a9ad,
+       0xc0980d02,
+       0xd2080a08,
+       0x5964a901,
+       0x2900c021,
+       0xf2083126,
+       0xb780a12d,
+       0xc098430c,
+       0xd2080a0c,
+       0xc200aa01,
+       0xc0415a68,
+       0x31282a00,
+       0xa12df208,
+       0x430cb780,
+       0x297ecfef,
+       0x0a14c098,
+       0xaa01d208,
+       0x0a027500,
+       0x4444b342,
+       0x31449e54,
+       0xa12df208,
+       0x430cb720,
+       0x612db781,
+       0xc0007500,
+       0xc00190c2,
+       0xf2083940,
+       0xb720a12d,
+       0xb781430c,
+       0x75085e2d,
+       0x91a4c000,
+       0x5dadb781,
+       0xc0007504,
+       0xf2089104,
+       0xc201aa2d,
+       0xf2083a00,
+       0x7780a22d,
+       0x9eb29eab,
+       0xd0010982,
+       0xb79f09b2,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0x9320ffdd,
+       0xa285f839,
+       0x040704b6,
+       0x5114b760,
+       0xb7809e48,
+       0xc030518c,
+       0xb760a8aa,
+       0x59c05094,
+       0x29fcc00f,
+       0xaa05c840,
+       0xa98ac030,
+       0xc2009e9d,
+       0x349a5a20,
+       0x9e4876c0,
+       0x8d80e032,
+       0x2a00cff0,
+       0xd9d03208,
+       0xc000a9f9,
+       0xc20190c2,
+       0xc0003a00,
+       0x768090e0,
+       0x9082c000,
+       0x3a00c101,
+       0xc0007480,
+       0xc0119082,
+       0x74403a00,
+       0x9122c000,
+       0xc02174c0,
+       0xc0003a00,
+       0xc0419082,
+       0xd0283a00,
+       0xb7405d08,
+       0x9e2d549c,
+       0xa26de020,
+       0xaa9df9f8,
+       0xa61d9c22,
+       0xb7808420,
+       0x9e5e558c,
+       0x4314b7c0,
+       0xaa45c240,
+       0x9e73a199,
+       0xe0b19e8f,
+       0xc09a8c80,
+       0x750009c4,
+       0xd0089e93,
+       0xb7bfabe1,
+       0xb7bf7e29,
+       0xb73f7e33,
+       0xc0007d33,
+       0x9e719244,
+       0x752db784,
+       0xc0007500,
+       0xb78490e4,
+       0x75026cad,
+       0x90e2c000,
+       0xb7049e71,
+       0xc0006cad,
+       0x08029060,
+       0xc0007740,
+       0x9e719142,
+       0x6c2db784,
+       0x0639d110,
+       0xcffe9ea3,
+       0x9e742dfc,
+       0x0a18c09c,
+       0xa901d208,
+       0xc0007480,
+       0x9e9090a4,
+       0x9100c001,
+       0xc0a29e74,
+       0xd2080a38,
+       0x7500aa01,
+       0x90a2c000,
+       0xc0000c06,
+       0x9e7193a0,
+       0x01ecc101,
+       0x4729b78a,
+       0xc000710c,
+       0x02079124,
+       0x0a20c0a2,
+       0xa812d208,
+       0x91c0c000,
+       0x02070107,
+       0x0924c0a2,
+       0x0a20c0a2,
+       0xaa11d208,
+       0xa951d008,
+       0x1044d020,
+       0xc0007542,
+       0xc10190d2,
+       0xb56a00ec,
+       0x76404a31,
+       0x9104c000,
+       0xb7869e71,
+       0x75006729,
+       0x9062c006,
+       0x4314b720,
+       0xc3805d18,
+       0xd1105908,
+       0xb784049d,
+       0xb76a684d,
+       0xc03c4a31,
+       0xc2002d00,
+       0xcc005a38,
+       0xb76a2a00,
+       0xc0024b29,
+       0x9e512970,
+       0x5de03128,
+       0x534bb78c,
+       0x9e593122,
+       0x312259c0,
+       0x75003126,
+       0x2a06d011,
+       0x31a8d020,
+       0x9082c000,
+       0x3d80c080,
+       0xc09c9e4c,
+       0xd2080a18,
+       0x7500aa01,
+       0x9082c000,
+       0x3d80c040,
+       0xc00077c0,
+       0xc1009082,
+       0xb7803d80,
+       0xd324570c,
+       0xd0225938,
+       0xc2405d40,
+       0xcc00aa45,
+       0x9e512d00,
+       0x5a08c200,
+       0x59e0c280,
+       0x32463242,
+       0x297cc00f,
+       0x3144d020,
+       0x77409e4c,
+       0x0a50c096,
+       0xaa01d208,
+       0x590cb740,
+       0x3d24d002,
+       0x5a08c200,
+       0x024cc101,
+       0xaa11f208,
+       0x588cc380,
+       0x0092c101,
+       0xc3007500,
+       0x02445a18,
+       0xd002a919,
+       0x02893d22,
+       0xa109f208,
+       0x61afb721,
+       0x0e82c124,
+       0xa18ef208,
+       0xa112f208,
+       0xa081fa08,
+       0x9eaa9e6b,
+       0x0ec09eb3,
+       0x9a4ffef4,
+       0x7740c250,
+       0xffff0ac0,
+       0xb78092e4,
+       0xd324568c,
+       0x9eb35a88,
+       0x06d9d110,
+       0x0982c004,
+       0xa922f208,
+       0x0902c124,
+       0x9beafef4,
+       0xff149eb3,
+       0x9e719801,
+       0x6729b786,
+       0xc0007500,
+       0xb74092c2,
+       0xaa194f8c,
+       0xa922f208,
+       0x0555d110,
+       0xf0080a3c,
+       0xc004a9c1,
+       0xf2080d00,
+       0x0246a122,
+       0xf0082a41,
+       0xc000a241,
+       0xf2089300,
+       0x9eb3a922,
+       0x0982c004,
+       0x0902c124,
+       0x9bddff14,
+       0xb79f9eb3,
+       0xb7bf7dee,
+       0xb7df7e6e,
+       0xb7ff7eee,
+       0xc0027f6e,
+       0xfefe8c20,
+       0xb79f9220,
+       0xb7bf7dee,
+       0xb7df7e6e,
+       0xb7ff7eee,
+       0xc0027f6e,
+       0x9c228c20,
+       0x430cb720,
+       0x02039e5a,
+       0x0a38c0a2,
+       0xaa01d208,
+       0xc0007500,
+       0x9e8a9222,
+       0xc0a40203,
+       0xc0a20d20,
+       0xd2080a40,
+       0xd010a901,
+       0x0802aa41,
+       0xd0037088,
+       0x9c220802,
+       0x7ea9b785,
+       0xc0007500,
+       0xb7809162,
+       0xc040500c,
+       0x7500aa45,
+       0x9082c000,
+       0x9c220806,
+       0x01090222,
+       0x0920c0a2,
+       0x0a40c0a2,
+       0xaa05d208,
+       0xa951d008,
+       0x71040802,
+       0x0802d003,
+       0xb7209c22,
+       0x0c06430c,
+       0xc1360203,
+       0xd2080a00,
+       0xb76aa902,
+       0xd22846b1,
+       0x9e52a886,
+       0x70971904,
+       0x9096c000,
+       0x4729b74a,
+       0xd3f19e40,
+       0x520c29ae,
+       0xc0007913,
+       0x709590a4,
+       0x9244ffff,
+       0x0a24d031,
+       0xb7406a52,
+       0x0244478c,
+       0x0948d031,
+       0xaa41f008,
+       0x02037508,
+       0x0a00c136,
+       0x4a22b402,
+       0xa181d208,
+       0xb7409c22,
+       0x0205430c,
+       0x0a04c136,
+       0xaa01d208,
+       0xc0007500,
+       0x020590e4,
+       0x0a00c136,
+       0xa182d208,
+       0x0a069e5a,
+       0x5208c200,
+       0x430cb740,
+       0x0904c136,
+       0xa942d008,
+       0x32469e53,
+       0xa241d008,
+       0xa6059c22,
+       0xc0009e5d,
+       0xff749080,
+       0xb7809843,
+       0x0d92430c,
+       0x0a00c136,
+       0xaa01d208,
+       0xffff710a,
+       0xb79f92c4,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xb7809c22,
+       0x9e5a550c,
+       0x430cb720,
+       0xaa45c040,
+       0xb7415db0,
+       0xc00267ad,
+       0xc0212a7c,
+       0x32440d80,
+       0x0df0c116,
+       0xf0009dbe,
+       0x9c22a261,
+       0xb7a0a60d,
+       0x008b430c,
+       0x6135b741,
+       0xc0027680,
+       0xb7849202,
+       0x750067ad,
+       0x9162c002,
+       0x46b1b7aa,
+       0x4729b7ca,
+       0x9e6a0d82,
+       0x91e0c000,
+       0xf0009dad,
+       0xc021a162,
+       0xc0340a00,
+       0x9d4d0a00,
+       0xc101aa61,
+       0xd3f105b8,
+       0xd011293e,
+       0xc18009a2,
+       0x708c5a30,
+       0xc0210109,
+       0xc0320900,
+       0xffff0960,
+       0xf2089134,
+       0xf208aa2d,
+       0x61c7a9a9,
+       0x9bb7c294,
+       0xb781008b,
+       0xc00e61ad,
+       0x0982287c,
+       0xc0003008,
+       0x9dad91c0,
+       0xa061f000,
+       0x0a00c021,
+       0x0a00c034,
+       0xf0009dcd,
+       0xd3f2a1e1,
+       0xd0122eae,
+       0xd1220d52,
+       0x735d5e30,
+       0xc0210109,
+       0xc0320900,
+       0xffff0970,
+       0xb79f9154,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0xa60d9c22,
+       0x430cb720,
+       0x02039e5e,
+       0x0a30c096,
+       0xaa01d208,
+       0xc0047500,
+       0xb7a49344,
+       0xb76468ad,
+       0x7540672d,
+       0x9222c000,
+       0x67b5b744,
+       0xc000729b,
+       0x02039188,
+       0x0a34c096,
+       0xa901d208,
+       0x1254c101,
+       0xc0007104,
+       0x74c090c6,
+       0x9022c004,
+       0x01030287,
+       0x67adb784,
+       0x0934c096,
+       0xa941d008,
+       0x71041258,
+       0x92a8c003,
+       0x46b1b76a,
+       0xc2000e86,
+       0xc00e55ac,
+       0xff742dfc,
+       0xb7209bb7,
+       0xc004430c,
+       0xb78409d2,
+       0xc09667ad,
+       0x125808b4,
+       0x4029b580,
+       0x430cb720,
+       0xc0960203,
+       0xd2080a34,
+       0x1a04aa01,
+       0x4badb581,
+       0x430cb720,
+       0xc0960203,
+       0xb7410a34,
+       0xd2085c35,
+       0xb76aaa01,
+       0x010346b1,
+       0x5a1cc200,
+       0x0d01cff0,
+       0x0528c101,
+       0x0960c09c,
+       0x9a6dff14,
+       0x430cb720,
+       0x46b1b76a,
+       0x55acc200,
+       0x2dfcc00e,
+       0x980fff94,
+       0x478cb740,
+       0xaa41f048,
+       0xc0007508,
+       0xf0489084,
+       0xb720a2c2,
+       0x0203430c,
+       0x0a34c096,
+       0xaa01d208,
+       0x532bb749,
+       0xc2001a04,
+       0xcff05a0c,
+       0xc00e291d,
+       0x32442a60,
+       0x532bb589,
+       0x430cb740,
+       0xc09c0205,
+       0xd2080a14,
+       0x7500aa01,
+       0x9224c000,
+       0xc0960205,
+       0xd2080a30,
+       0x0092a881,
+       0xb7890094,
+       0xc00e532b,
+       0xc2002a60,
+       0xd2085a0f,
+       0xb720a241,
+       0xd208430c,
+       0xb744aa41,
+       0xba246e2d,
+       0x02444000,
+       0x752db584,
+       0x430cb720,
+       0x752db784,
+       0x08f0c098,
+       0x4029b580,
+       0x430cb720,
+       0x752db784,
+       0x6d2db744,
+       0xb5841244,
+       0xb79f752d,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0xa61d9c22,
+       0x8460c010,
+       0x4314b7a0,
+       0x9e699e6c,
+       0x0a10c0a4,
+       0xa902d208,
+       0x5e35b7e1,
+       0xc0317680,
+       0x0a069324,
+       0x44abb585,
+       0x430cb780,
+       0x0585096a,
+       0x0a1cc09c,
+       0xa101d208,
+       0x430cb720,
+       0xb5440405,
+       0xb72079b5,
+       0xb76a430c,
+       0xba1b46a9,
+       0xc0004000,
+       0xb5049080,
+       0xb7207a55,
+       0xd110430c,
+       0x0d840637,
+       0x4731b74a,
+       0x5908c200,
+       0x00a2d020,
+       0xffff7115,
+       0x0203925c,
+       0x0a40c09a,
+       0xaa01d208,
+       0xc0007500,
+       0xb78490e2,
+       0x0a0475ad,
+       0x75adb584,
+       0x430cb740,
+       0x0930c096,
+       0xaa41d008,
+       0xd0080a04,
+       0xb780a241,
+       0x9ea2430c,
+       0xc0960109,
+       0xc0960d30,
+       0xd0100934,
+       0xd008aa41,
+       0x7104a941,
+       0x1248d011,
+       0x4442b422,
+       0x430cb720,
+       0x692db784,
+       0xb5841a04,
+       0xb740692d,
+       0x0205430c,
+       0x0a30c096,
+       0xa881d208,
+       0x00929e92,
+       0xb7890094,
+       0xc09a532b,
+       0x2a100d40,
+       0x5a0bc200,
+       0xa241d010,
+       0x4314b720,
+       0xc0969e4c,
+       0xd2080a30,
+       0x0092a881,
+       0x0092c101,
+       0x532bb789,
+       0xc0f00109,
+       0xd1242900,
+       0xc2005821,
+       0x9e435831,
+       0x70c0c812,
+       0xb5842a0c,
+       0xb7206ccd,
+       0x09044314,
+       0x9e4a0385,
+       0x0930c096,
+       0xa8c1d008,
+       0xc1010092,
+       0xb7890092,
+       0xc00e532b,
+       0xc2002a60,
+       0xb59d5a0f,
+       0xd0087468,
+       0x7500aa41,
+       0x9084c006,
+       0x67cdb784,
+       0x6e4db584,
+       0x430cb720,
+       0x4835b745,
+       0xc0027684,
+       0xb7449182,
+       0x748067ad,
+       0x9242c000,
+       0x4b2db781,
+       0xc0007500,
+       0xb78490e2,
+       0x7500692d,
+       0x911cc000,
+       0xc0007682,
+       0x768090a2,
+       0x92e4c001,
+       0x6d2db784,
+       0x1128e000,
+       0x9142c000,
+       0x4aadb781,
+       0xc0007088,
+       0x768090a8,
+       0x93c4c000,
+       0xc09c0103,
+       0x0a060914,
+       0xa241d008,
+       0x430cb720,
+       0xb5440902,
+       0xb72075ad,
+       0xb544430c,
+       0xb720752d,
+       0xb784430c,
+       0xb58467ad,
+       0xb7206d2d,
+       0x0a7f430c,
+       0x7468b55d,
+       0x6fadb584,
+       0x430cb720,
+       0xb5840a06,
+       0xb7206cad,
+       0xb781430c,
+       0xb5844b2d,
+       0xb720692d,
+       0xc00e430c,
+       0xb5850a7e,
+       0xb720482d,
+       0xb781430c,
+       0x75065dad,
+       0x9144c000,
+       0xc09c0203,
+       0xd2080a18,
+       0x7500aa01,
+       0x9342c002,
+       0xc0980103,
+       0xd008091c,
+       0x0d86aa41,
+       0xd0080a04,
+       0xb780a241,
+       0x9ea2430c,
+       0xc0980109,
+       0xc0980d1c,
+       0xd0100918,
+       0xd008aa41,
+       0x7104a941,
+       0x1244d014,
+       0x4448b422,
+       0x93a0c000,
+       0xaa41d010,
+       0x0639d110,
+       0xa25dd008,
+       0x430cb780,
+       0x0146c101,
+       0xc0980185,
+       0xc0980a18,
+       0xd2080980,
+       0xd008a901,
+       0x0d84aa7d,
+       0xd0207104,
+       0xc0001144,
+       0xd0089086,
+       0xb720a17e,
+       0xc101430c,
+       0x01090216,
+       0xc0980203,
+       0xd2080a18,
+       0x9e8aaa01,
+       0x0900c098,
+       0x0d1cc098,
+       0xfffe72d9,
+       0xb78892b8,
+       0x02186e29,
+       0x0a00c098,
+       0xaa1dd208,
+       0xc0980218,
+       0xd2080a20,
+       0x1904a90d,
+       0xa10dd208,
+       0x4314b740,
+       0xc09a9e54,
+       0xd2080a40,
+       0x7500aa01,
+       0x91c2c001,
+       0x2bfcc00e,
+       0x062fd110,
+       0xc0989e52,
+       0xd2080a00,
+       0xc096aa1d,
+       0xd0080950,
+       0xb780a241,
+       0x0109430c,
+       0x0950c096,
+       0xa942d008,
+       0xa941d1e8,
+       0x0244c101,
+       0x0a20c098,
+       0xa10dd208,
+       0x430cb720,
+       0xc0960203,
+       0xd2080a50,
+       0xb744aa01,
+       0xc20075ad,
+       0x00c25a08,
+       0x722db544,
+       0x92a0c001,
+       0xc0989e54,
+       0xd2080a18,
+       0xd110a901,
+       0xc0980525,
+       0xd0080900,
+       0x0a04aa5d,
+       0xa25dd008,
+       0x430cb780,
+       0xc0980109,
+       0xd0080918,
+       0x0228a941,
+       0x09089ea2,
+       0x0d00c098,
+       0xaa5dd010,
+       0xc0007104,
+       0x1a0890b8,
+       0xa25dd010,
+       0x430cb780,
+       0xc0980109,
+       0xd0080918,
+       0x9ea2a941,
+       0xc0980244,
+       0xd2080a00,
+       0xc096aa1d,
+       0xd0100d50,
+       0xb740a241,
+       0xc101430c,
+       0xc0980220,
+       0xd2080a00,
+       0xc096aa1d,
+       0xd0080954,
+       0xb720a241,
+       0xb748430c,
+       0xb7846e29,
+       0x9e8a75ad,
+       0xc0967104,
+       0xc0000d58,
+       0x02109134,
+       0x0a00c098,
+       0xaa1dd208,
+       0x90e0c000,
+       0xc0960203,
+       0xd2080a54,
+       0xd010aa01,
+       0xb740a241,
+       0x9e69430c,
+       0xc0980d02,
+       0xb7850910,
+       0xd0087e29,
+       0xb720a142,
+       0x75004314,
+       0x6ccdb764,
+       0x90c2c000,
+       0x6acdb781,
+       0x9080c000,
+       0x6b4db781,
+       0xb58474c6,
+       0xc00063cd,
+       0x74c29182,
+       0x9222c000,
+       0x430cb720,
+       0x63adb784,
+       0xc0003a04,
+       0xb7209100,
+       0xb784430c,
+       0xc00863ad,
+       0xb5843a00,
+       0xb78063ad,
+       0xc096430c,
+       0xd2080a50,
+       0xc200aa01,
+       0xc1015a08,
+       0xf2080242,
+       0x7480a911,
+       0x9222c000,
+       0xa111f248,
+       0x430cb780,
+       0xc0960902,
+       0xd2080a50,
+       0xc200aa01,
+       0xc1015a08,
+       0xf2080242,
+       0xb742a111,
+       0x76804555,
+       0x9102c002,
+       0x430cb780,
+       0x6cc9b748,
+       0x0a50c096,
+       0xaa01d208,
+       0xc2007480,
+       0xc1015a08,
+       0xf2480242,
+       0xf208a911,
+       0xb780a111,
+       0x0902430c,
+       0x454db542,
+       0x0a50c096,
+       0xaa01d208,
+       0x5a08c200,
+       0x0242c101,
+       0xa112f248,
+       0x90c2c001,
+       0x430cb720,
+       0x7ea9b785,
+       0xc0007500,
+       0x74c29202,
+       0x91a2c000,
+       0xc0980203,
+       0xd2080a00,
+       0x0103aa01,
+       0x0904c098,
+       0xc0004a04,
+       0x010390c0,
+       0x0904c098,
+       0xd0080a02,
+       0xb720a241,
+       0x0a02430c,
+       0x6cc9b588,
+       0x75adb784,
+       0x6fadb584,
+       0x430cb720,
+       0x45cdb742,
+       0xc0960203,
+       0xd2080a50,
+       0x7480aa01,
+       0x5a08c200,
+       0x0242c101,
+       0xaa11f248,
+       0x642db584,
+       0x430cb720,
+       0x9262c000,
+       0xb5440a02,
+       0xb582652d,
+       0xb74045cd,
+       0xb748430c,
+       0xb5886d51,
+       0xc0986d49,
+       0xd0080908,
+       0xc001a142,
+       0x020390c0,
+       0x0a54c096,
+       0xaa01d208,
+       0x5a08c200,
+       0x0242c101,
+       0xaa11f248,
+       0x652db584,
+       0x430cb720,
+       0xc0960203,
+       0xd2080a54,
+       0xb744aa01,
+       0x9e8a6f2d,
+       0x5a08c200,
+       0xb72400c2,
+       0x0a02722d,
+       0x0d08c098,
+       0xd0017082,
+       0xd0100a42,
+       0xb742a241,
+       0xb720464d,
+       0x7480430c,
+       0x9262c000,
+       0xb5440a02,
+       0xb582662d,
+       0xb740464d,
+       0xb748430c,
+       0xb5886dd1,
+       0xc0986dc9,
+       0xd008090c,
+       0xc001a142,
+       0x020390c0,
+       0x0a58c096,
+       0xaa01d208,
+       0x5a08c200,
+       0x0242c101,
+       0xaa11f248,
+       0x662db584,
+       0x430cb720,
+       0xc0960203,
+       0xd2080a58,
+       0xb744aa01,
+       0x9e8a6f2d,
+       0x5a08c200,
+       0xb72400c2,
+       0x0a02722d,
+       0x0d0cc098,
+       0xd0017082,
+       0xd0100a42,
+       0xb720a241,
+       0xb740430c,
+       0x048b4155,
+       0x6badb744,
+       0xb7845d10,
+       0x5910642d,
+       0xcffe097c,
+       0xc1012901,
+       0xb7426125,
+       0x02285b53,
+       0x64adb584,
+       0x430cb720,
+       0x5bcbb762,
+       0x652db784,
+       0x61b4c101,
+       0x193ed012,
+       0xb5840228,
+       0xb72065ad,
+       0x769c430c,
+       0x662db784,
+       0xb5440128,
+       0xc00066ad,
+       0x0d3a90bc,
+       0x90a0c000,
+       0xc8120d82,
+       0xb7207286,
+       0xb780430c,
+       0xd031500c,
+       0xb70a2dae,
+       0x0b0246a9,
+       0xba000f06,
+       0x02884000,
+       0x5a30c000,
+       0xc0219ea3,
+       0xc1c80d80,
+       0xc0050d90,
+       0x9e699140,
+       0xa322d208,
+       0x4f35b702,
+       0xc0037600,
+       0xb7429022,
+       0xd2114dad,
+       0x9dcd1e38,
+       0xa161f000,
+       0x4e2db742,
+       0x1e38d1f1,
+       0xf0009dcd,
+       0xb742a161,
+       0xd2114ead,
+       0x9dcd1e30,
+       0xa161f000,
+       0x4018b960,
+       0xd152048b,
+       0xb7821d38,
+       0x9dae4fad,
+       0xa261f000,
+       0x0d20d051,
+       0xf0009dad,
+       0xb742a261,
+       0xd09151ad,
+       0x9dcd1e20,
+       0xa161f000,
+       0x1e20d051,
+       0xf0009dcd,
+       0x0890a161,
+       0xffff0d10,
+       0x9e699101,
+       0x1e38d071,
+       0x4d2db742,
+       0xf0009dcd,
+       0x7e04a161,
+       0x9042c001,
+       0x1d30d072,
+       0x53cdb782,
+       0xf0009dae,
+       0xb742a261,
+       0xd011564d,
+       0x9dcd0e28,
+       0xa161f000,
+       0x72860d20,
+       0xffff0c90,
+       0x048b9224,
+       0x554db782,
+       0xf0009dbe,
+       0xb742a261,
+       0xd01155cd,
+       0x9dcd0e38,
+       0xa161f000,
+       0x1e30d091,
+       0xf0009dcd,
+       0xb720a062,
+       0xf210430c,
+       0x0507a929,
+       0x6badb724,
+       0xc00e1904,
+       0xd011297c,
+       0xc2001a12,
+       0xc00f5a40,
+       0xcf4a2a7c,
+       0x32440d01,
+       0xf0009dae,
+       0x9e69a261,
+       0xb7419e5c,
+       0xcf8068ad,
+       0x9dcd0a01,
+       0xa161f000,
+       0x692db741,
+       0x9dcd0a20,
+       0xa161f000,
+       0x682db741,
+       0x1a30c008,
+       0xf0009dcd,
+       0xb781a161,
+       0x1a0c5dad,
+       0xc0007504,
+       0x9e5c9112,
+       0x0a41cf6a,
+       0xf0009dcd,
+       0x0b04a1e1,
+       0xc1000a84,
+       0xb7200d80,
+       0x0260430c,
+       0x4729b72a,
+       0xfffa7102,
+       0x77c0925c,
+       0x9182c000,
+       0xb785048b,
+       0x75007e49,
+       0x9024c001,
+       0x59cdb582,
+       0x93a0c000,
+       0x048b9e69,
+       0x67a9b786,
+       0x6829b746,
+       0x68b1b746,
+       0x7529b589,
+       0x75a9b549,
+       0x7631b549,
+       0x430cb720,
+       0x5bcbb782,
+       0x5b4bb742,
+       0x6c2db724,
+       0xb5246244,
+       0xb582714b,
+       0xb740584d,
+       0xf048478c,
+       0x7508aa41,
+       0x90a4c000,
+       0xf0481a0c,
+       0xb720a241,
+       0x9d8f430c,
+       0x68b5b7c4,
+       0x672db7c4,
+       0x0da1cfee,
+       0x9360c000,
+       0x9aa6ff34,
+       0x430cb720,
+       0x02039d8f,
+       0x0a10c0a4,
+       0xaa01d208,
+       0x0da1cfee,
+       0xc00f7500,
+       0xb7849164,
+       0x7188672d,
+       0x90e4c000,
+       0x68adb784,
+       0xc0007399,
+       0xffd49082,
+       0xb7809ad0,
+       0xc098430c,
+       0xd2080a70,
+       0xff94a982,
+       0xc01c9974,
+       0x0281743e,
+       0xfffe0d92,
+       0xb7809322,
+       0x0906430c,
+       0x0a18c09c,
+       0xa101d208,
+       0x430cb720,
+       0xc0a20203,
+       0xd2080a70,
+       0x7500aa01,
+       0x9082c000,
+       0x532bb54c,
+       0x430cb720,
+       0x2bfcc00e,
+       0x6e29b728,
+       0xd01210f2,
+       0xcffe1992,
+       0xff942dfc,
+       0x9e699aca,
+       0x7e29b785,
+       0xc0007500,
+       0xb7209162,
+       0x0a16430c,
+       0x5eadb583,
+       0x430cb720,
+       0x422db584,
+       0x048b0d02,
+       0x7e51b545,
+       0x430cb720,
+       0x532bb78c,
+       0xc0007500,
+       0x010392e2,
+       0x0970c0a2,
+       0xaa41d008,
+       0xc0007500,
+       0xd00891e2,
+       0xb740a142,
+       0x0205430c,
+       0x0a74c0a2,
+       0xaa01d208,
+       0x0918c09c,
+       0xa241d008,
+       0x430cb720,
+       0x532bb78c,
+       0xc0007500,
+       0xb78191a2,
+       0x75065dad,
+       0x9104c000,
+       0xc09c0103,
+       0x1a0c0918,
+       0xa241d008,
+       0x430cb780,
+       0x0a18c09c,
+       0xaa01d208,
+       0xc0007500,
+       0xffd49082,
+       0xb72099f7,
+       0x0a02430c,
+       0xb5849ea3,
+       0xb72079ad,
+       0x9ea1430c,
+       0x46a9b76a,
+       0x4000ba1b,
+       0x9080c000,
+       0xa0c2f008,
+       0x430cb720,
+       0x0637d110,
+       0xb74a0d84,
+       0xc2004731,
+       0x01225908,
+       0x0940c09c,
+       0xffff7115,
+       0xb76a923c,
+       0xff5447b1,
+       0x9e699a21,
+       0x430cb780,
+       0x572bb743,
+       0x0a44c09a,
+       0xd2087480,
+       0xc008a281,
+       0xb7c09262,
+       0x9e744314,
+       0x0a18c09c,
+       0xaa01d208,
+       0xc0077500,
+       0x9e749182,
+       0xc09a048d,
+       0xd2080a44,
+       0x9d17aa01,
+       0x46d1b76a,
+       0x5a08c200,
+       0x00ccc101,
+       0x7035b740,
+       0x0ab1cfee,
+       0x0986c010,
+       0xfef4010b,
+       0xb78098d6,
+       0xd208430c,
+       0x030ba921,
+       0x0a1cc0a4,
+       0xa101d208,
+       0x430cb720,
+       0xa945d229,
+       0x7ea9b785,
+       0x08a0c0a4,
+       0x0a027500,
+       0x0a42d002,
+       0xb5405150,
+       0xb7204029,
+       0xb762430c,
+       0xb760582d,
+       0xc2744135,
+       0x09829972,
+       0x9e9b9ea8,
+       0x287cc00e,
+       0x93c0c001,
+       0xaac1d208,
+       0x00da7480,
+       0x0092c101,
+       0x532bb56a,
+       0xa90ad030,
+       0x430cb720,
+       0x9164c000,
+       0x52abb78a,
+       0x4002ba24,
+       0xd1106209,
+       0xc0000629,
+       0x02039240,
+       0x0a1cc0a4,
+       0xaa01d208,
+       0x70881a04,
+       0x9184c000,
+       0x52abb78a,
+       0x4002ba24,
+       0xd1106209,
+       0x9ea21629,
+       0x2d7cc00e,
+       0xb7809e71,
+       0xb742430c,
+       0xcffe5bab,
+       0x00da29fc,
+       0xd1100098,
+       0xc1010627,
+       0xb54b6124,
+       0x0189532b,
+       0x0b080d84,
+       0x4314b720,
+       0x2d3ed3f1,
+       0xc0a49e4c,
+       0xd2080a1c,
+       0x7104aa01,
+       0x9352fffd,
+       0x5bcbb782,
+       0x5c53b742,
+       0x72956146,
+       0x9188c000,
+       0xc10100da,
+       0xb78b0092,
+       0xc101532b,
+       0x12441124,
+       0x532bb58b,
+       0xb781048b,
+       0x75085dcd,
+       0x90a2c000,
+       0xc000750a,
+       0xb72091e4,
+       0xb78c430c,
+       0x7500532b,
+       0x9102c000,
+       0x098e9e8b,
+       0x0d90c06e,
+       0x9120c000,
+       0x430cb720,
+       0xb7649e8b,
+       0xc06e6cad,
+       0xffb40d90,
+       0x9e699905,
+       0x7ea9b785,
+       0xc0017500,
+       0xb7209082,
+       0x0203430c,
+       0x0a14c09c,
+       0xaa01d208,
+       0x75009e8b,
+       0x0d80c080,
+       0x9102c000,
+       0x6cadb764,
+       0x98eeffb4,
+       0x9220c000,
+       0x01099e8a,
+       0x0d10c06e,
+       0x48d8b960,
+       0x9e919e53,
+       0xaa65c020,
+       0xc0100904,
+       0xffffa269,
+       0xb7209321,
+       0x0a7f430c,
+       0xb5880902,
+       0xb7806c29,
+       0xc0a2430c,
+       0xd2080a3c,
+       0xb720a101,
+       0xb76a430c,
+       0xff5447b1,
+       0xb72099a8,
+       0x0902430c,
+       0x4729b78a,
+       0x0880c136,
+       0x4029b580,
+       0x430cb780,
+       0x0a04c136,
+       0xa101d208,
+       0x430cb780,
+       0x0a38c0a2,
+       0xa101d208,
+       0x9080c001,
+       0xb9609e92,
+       0xb7204030,
+       0xc100430c,
+       0x0d045c8c,
+       0x0493d110,
+       0x7babb543,
+       0x430cb720,
+       0x0493d110,
+       0x7c2bb543,
+       0x430cb720,
+       0x0493d110,
+       0x7cabb543,
+       0x430cb780,
+       0x0498c101,
+       0x7d4bb543,
+       0x90a1ffff,
+       0x91e0fff6,
+       0x6ceeb79f,
+       0x6d6eb7bf,
+       0x6deeb7df,
+       0x6e6eb7ff,
+       0x8421cfec,
+       0xf8399c22,
+       0xb720a205,
+       0x0902430c,
+       0xb7880d86,
+       0xc0986e29,
+       0x0a080898,
+       0x4029b580,
+       0x430cb780,
+       0x0a1cc098,
+       0xa101d208,
+       0x9320c000,
+       0xa1ded008,
+       0x430cb780,
+       0x0146c101,
+       0xc0980185,
+       0xc0980a18,
+       0xd2080980,
+       0xd008a901,
+       0x0d84aa7d,
+       0xd0207104,
+       0xc0001144,
+       0xd0089086,
+       0xb720a17e,
+       0xc101430c,
+       0x01090216,
+       0xc0980203,
+       0xd2080a18,
+       0xc098aa01,
+       0x72d90900,
+       0x9398fffe,
+       0x4badb781,
+       0xc0960103,
+       0x0a040934,
+       0xa241d008,
+       0x430cb780,
+       0x09c2097f,
+       0x0a30c096,
+       0xa101d208,
+       0x430cb720,
+       0x46b1b76a,
+       0x74b5b740,
+       0xc0940103,
+       0xfed40930,
+       0xb7209b62,
+       0xb781430c,
+       0xb7494bad,
+       0xc200532b,
+       0xcff05a0c,
+       0xc00e291d,
+       0x32442a60,
+       0x532bb589,
+       0x430cb720,
+       0xb5840a02,
+       0xf9f868ad,
+       0x9c22aa1d,
+       0xc006a61d,
+       0xb7208420,
+       0x0902430c,
+       0xb54a0a06,
+       0xb7204829,
+       0xb7034314,
+       0xb7a35ab5,
+       0xa01a5b35,
+       0x48c9b54a,
+       0x4314b720,
+       0xb7e39e6b,
+       0xb5455bb5,
+       0xc20044cb,
+       0x0389520c,
+       0x430cb780,
+       0x5c2db723,
+       0x2bfcc00e,
+       0x0a10c0a4,
+       0xd2089ebb,
+       0xa09da101,
+       0x9840ff54,
+       0x4314b720,
+       0xc0a49e4c,
+       0xd2080a10,
+       0x7500aa01,
+       0x92a4c015,
+       0x8c80f1b1,
+       0x6049b7cd,
+       0x60d1b7cd,
+       0x010b9e49,
+       0x4028b960,
+       0x4c2db783,
+       0xa241f008,
+       0x4cadb783,
+       0xa245f008,
+       0x4d2db783,
+       0xa249f008,
+       0x4dadb783,
+       0xf00808c0,
+       0x0940a24d,
+       0x91c1ffff,
+       0x5bd5b743,
+       0xd3f29e4a,
+       0xc1422dde,
+       0xfed409f2,
+       0xb7209af0,
+       0x0d02430c,
+       0x4028b960,
+       0x6029b5cd,
+       0x430cb720,
+       0x60b1b5cd,
+       0x430cb720,
+       0xaa21f208,
+       0x5c90c100,
+       0x0493d110,
+       0xb5830d04,
+       0xb7204c2d,
+       0xf208430c,
+       0xd110aa25,
+       0xb5830493,
+       0xb7204cad,
+       0xf208430c,
+       0xd110aa29,
+       0xb5830493,
+       0xb7804d2d,
+       0xf208430c,
+       0x0ac0a92d,
+       0x0498c101,
+       0x4dcdb543,
+       0x9381fffe,
+       0x430cb720,
+       0xb700aa19,
+       0xb7005a0c,
+       0xb5835a94,
+       0xb7205aad,
+       0xc021430c,
+       0xc0210c82,
+       0xb5a30d82,
+       0xb7205b35,
+       0xc014430c,
+       0xc0140c80,
+       0xb5e30d90,
+       0xb7205bb5,
+       0xa99d430c,
+       0x4038b960,
+       0x5c2db563,
+       0x4314b7a0,
+       0xd2f19e69,
+       0xb7880dd8,
+       0xb7487029,
+       0xb7486fa9,
+       0xb58a6f31,
+       0xb7a047a9,
+       0xb788430c,
+       0x008b6ea9,
+       0x4729b54a,
+       0x430cb720,
+       0x46b1b54a,
+       0x430cb720,
+       0x4629b58a,
+       0x430cb720,
+       0x612db562,
+       0x430cb720,
+       0xaa1dd9e9,
+       0xf0009d9e,
+       0xd9f1a261,
+       0x9dbeaa1d,
+       0xa261f000,
+       0x92c1ffff,
+       0xb785048b,
+       0x75007e49,
+       0x91c2c006,
+       0x0a7ec00e,
+       0x482db585,
+       0x430cb720,
+       0x09060a82,
+       0x67adb5a4,
+       0x430cb720,
+       0x682db5a4,
+       0x430cb720,
+       0x692db5a4,
+       0x430cb720,
+       0x6cadb544,
+       0x430cb720,
+       0x6d2db5a4,
+       0x430cb780,
+       0x0a10c09c,
+       0xa281d208,
+       0x430cb780,
+       0x0a18c09c,
+       0xa101d208,
+       0x9a8dfff4,
+       0x430cb780,
+       0xc0980109,
+       0xd0080918,
+       0x0244a941,
+       0x0a00c098,
+       0xa11dd208,
+       0x430cb720,
+       0x4badb781,
+       0xc0007500,
+       0xb7419262,
+       0xb76a5c35,
+       0xc20046b1,
+       0xc0085a1c,
+       0x01031d00,
+       0x0528c101,
+       0x0960c09c,
+       0x09d2c004,
+       0x9a1ffed4,
+       0x430cb780,
+       0xf210090a,
+       0xc09aa9ae,
+       0xd2080a40,
+       0xb720a281,
+       0x040b430c,
+       0x5b4ab762,
+       0x4aadb5a6,
+       0x430cb780,
+       0x5bd2b742,
+       0xa8aaf210,
+       0x0a60c0c4,
+       0xa101d208,
+       0x430cb720,
+       0x65a7d111,
+       0x6bb5b564,
+       0x430cb7a0,
+       0xb764008b,
+       0x65b36bb5,
+       0x9ab3c254,
+       0xb781048b,
+       0x9ea85f4b,
+       0xb5047500,
+       0xb7406c4c,
+       0xc0004314,
+       0x9e529142,
+       0xc09c0a6a,
+       0xd008091c,
+       0xc000a241,
+       0x9e699140,
+       0xb7469e54,
+       0xc09c67a9,
+       0xd2080a1c,
+       0xb720a101,
+       0x0d82430c,
+       0xb786087f,
+       0xc09c67a9,
+       0xc00e08a0,
+       0xb5800c7e,
+       0xb7204029,
+       0xb74a430c,
+       0xba1246b1,
+       0xc0004001,
+       0xb78991e0,
+       0x6a326ecd,
+       0xc1380242,
+       0xd2080a00,
+       0xb720a011,
+       0x00b2430c,
+       0x6eb5b509,
+       0x430cb720,
+       0x0534d010,
+       0xb78a0d84,
+       0xc1004729,
+       0xd0205988,
+       0x708800b2,
+       0x90fcffff,
+       0x0d7f0902,
+       0x4040b960,
+       0x430cb780,
+       0xc0980228,
+       0xd2080a60,
+       0x0904a116,
+       0x9301ffff,
+       0xb741048b,
+       0xb7805e55,
+       0x0902430c,
+       0xc0a47680,
+       0xd0020a18,
+       0xd2080922,
+       0xb720a101,
+       0x0a02430c,
+       0xb58a7686,
+       0xc00952ab,
+       0x76849102,
+       0x9304c001,
+       0x5dcdb781,
+       0x75041a0c,
+       0x9252c001,
+       0x430cb720,
+       0x0a42c809,
+       0x0a20ccf0,
+       0x69adb589,
+       0x430cb720,
+       0x0a46c809,
+       0x0a40c9ce,
+       0x6a2db589,
+       0x430cb720,
+       0x0a42c809,
+       0x0a50ccf8,
+       0x692db589,
+       0x430cb720,
+       0x0a46c809,
+       0x0a70c604,
+       0x6b2db589,
+       0x430cb720,
+       0x0a46c809,
+       0x0a50c418,
+       0x6aadb589,
+       0x430cb720,
+       0x0a42c809,
+       0x0a10cd0a,
+       0x6badb589,
+       0xb781040b,
+       0x75045dcc,
+       0x92e4c001,
+       0x5e4cb781,
+       0xc0017504,
+       0xb7209244,
+       0xc809430c,
+       0xcf1a0a42,
+       0xb5890a70,
+       0xb72069ad,
+       0xc809430c,
+       0xcad60a46,
+       0xb5890a10,
+       0xb7206a2d,
+       0xc809430c,
+       0xcd0c0a42,
+       0xb5890a70,
+       0xb720692d,
+       0xc809430c,
+       0xcba20a46,
+       0xb5890a10,
+       0xb7206b2d,
+       0xc809430c,
+       0xcca40a46,
+       0xb5890a70,
+       0xb7206aad,
+       0xc809430c,
+       0xcd2e0a42,
+       0xb5890a20,
+       0x9e696bad,
+       0x5e2db781,
+       0xc0017502,
+       0xb78192e4,
+       0x75045dad,
+       0x9244c001,
+       0x430cb720,
+       0x0a42c809,
+       0x0a70cf1a,
+       0x69adb589,
+       0x430cb720,
+       0x0a46c809,
+       0x0a60cb44,
+       0x6a2db589,
+       0x430cb720,
+       0x0a46c809,
+       0x0a70c9ea,
+       0x692db589,
+       0x430cb720,
+       0x0a46c809,
+       0x0a10cb1a,
+       0x6b2db589,
+       0x430cb720,
+       0x0a46c809,
+       0x0a70cca4,
+       0x6aadb589,
+       0x430cb720,
+       0x0a42c809,
+       0x0a20cd2e,
+       0x6badb589,
+       0xb781048b,
+       0x75085e4d,
+       0x92e4c001,
+       0x5dcdb781,
+       0xc0017504,
+       0xb7209244,
+       0xc809430c,
+       0xcada0a46,
+       0xb5890a20,
+       0xb72069ad,
+       0xc809430c,
+       0xcb440a46,
+       0xb5890a60,
+       0xb7206a2d,
+       0xc809430c,
+       0xc9ea0a46,
+       0xb5890a70,
+       0xb720692d,
+       0xc809430c,
+       0xcb1a0a46,
+       0xb5890a10,
+       0xb7206b2d,
+       0xc809430c,
+       0xcca40a46,
+       0xb5890a70,
+       0xb7206aad,
+       0xc809430c,
+       0xcac80a46,
+       0xb5890a50,
+       0x040b6bad,
+       0x5e4cb781,
+       0xc0017502,
+       0xb7819304,
+       0x1a0c5dcc,
+       0xc0017504,
+       0xb7209252,
+       0xc809430c,
+       0xc0500a46,
+       0xb5890a30,
+       0xb72069ad,
+       0xc809430c,
+       0xc9d80a46,
+       0xb5890a30,
+       0xb7206a2d,
+       0xc809430c,
+       0xcd380a42,
+       0xb5890a10,
+       0xb720692d,
+       0xc809430c,
+       0xc1a00a46,
+       0xb5890a60,
+       0xb7206b2d,
+       0xc809430c,
+       0xc0aa0a46,
+       0xb5890a00,
+       0xb7206aad,
+       0xc809430c,
+       0xcd680a42,
+       0xb5890a20,
+       0xb7206bad,
+       0x9ebb430c,
+       0x4829b5ea,
+       0x430cb720,
+       0x48a9b5ea,
+       0x77eeb79f,
+       0x786eb7bf,
+       0x78eeb7df,
+       0x796eb7ff,
+       0x8c20c008,
+       0x9360ff2f,
+       0x8440a60d,
+       0x430cb720,
+       0xc0a40203,
+       0xd2080a10,
+       0x7500aa01,
+       0x9324c00e,
+       0xc09c0203,
+       0xd2080a18,
+       0x7500aa01,
+       0x90c2c001,
+       0x46a9b7aa,
+       0x478cb7c0,
+       0x9320c000,
+       0x0a54d031,
+       0x2a7cc00e,
+       0x024c6a52,
+       0x0ac8d032,
+       0x9080c000,
+       0x9916ff14,
+       0xaa21f210,
+       0x750c0d92,
+       0x9344ffff,
+       0x0a52d011,
+       0xc00e0289,
+       0xb7202afc,
+       0xb78a430c,
+       0x710a4729,
+       0x9088ffff,
+       0x430cb720,
+       0xc09c0203,
+       0xd2080a18,
+       0x7500aa01,
+       0x9304c002,
+       0xb7ca9ea3,
+       0xff744731,
+       0xb780988c,
+       0xc0a4430c,
+       0xd2080a10,
+       0x7580ab01,
+       0x92a4c00c,
+       0x9eaa0a86,
+       0xc00e56d8,
+       0x058b2efc,
+       0x9916ff34,
+       0x9eb19eb2,
+       0x008b018d,
+       0x058d010d,
+       0xa319a31d,
+       0xff94a295,
+       0xb7009ac8,
+       0xd3224314,
+       0xb7605e88,
+       0xc1014490,
+       0xb72900d0,
+       0xb74d6eb5,
+       0x9e736c50,
+       0x6d19d031,
+       0x2cfcc00e,
+       0x0120c101,
+       0x0900c138,
+       0xa951d008,
+       0xff141b04,
+       0xb74099bc,
+       0x058b430c,
+       0xb78900d4,
+       0x6a326ead,
+       0xc1380244,
+       0xd2080a00,
+       0xb780a311,
+       0x02d8430c,
+       0xc00e008b,
+       0xb5890a7e,
+       0xff346ead,
+       0xb7809968,
+       0x9ea2560c,
+       0xa349c220,
+       0x430cb720,
+       0xc0a40203,
+       0xd2080a18,
+       0x7500aa01,
+       0x91a2c000,
+       0x6aadb789,
+       0x79b5b764,
+       0xc0c40183,
+       0x9ea409b0,
+       0xc0009c62,
+       0xb58c9080,
+       0xb720532b,
+       0x0a82430c,
+       0x67adb784,
+       0xb5840a04,
+       0xb72067ad,
+       0xb5a5430c,
+       0xb72044ab,
+       0xb76a430c,
+       0xff344831,
+       0xb720993a,
+       0x0203430c,
+       0x0a18c09c,
+       0xaa01d208,
+       0xc0027500,
+       0xb7849162,
+       0x0a04682d,
+       0x682db584,
+       0x430cb740,
+       0x0914c09c,
+       0xaa41d008,
+       0xc0007500,
+       0xd0089322,
+       0xb720a2c1,
+       0x097f430c,
+       0x6e29b788,
+       0xc0980218,
+       0xd2080a04,
+       0x0098aa1d,
+       0x08a0c098,
+       0x41a9b5a0,
+       0x430cb780,
+       0x0a30c096,
+       0xa101d208,
+       0x430cb720,
+       0x6cadb784,
+       0xc0007506,
+       0xb7849182,
+       0xb584782d,
+       0xb720772d,
+       0xb784430c,
+       0xb58477ad,
+       0xb720782d,
+       0xb784430c,
+       0xb5846fad,
+       0xb7406f2d,
+       0x0205430c,
+       0x0a04c098,
+       0xaa01d208,
+       0x0900c098,
+       0xa241d008,
+       0x9180c000,
+       0xc0c40203,
+       0xd2080a60,
+       0xb786a901,
+       0x02444aad,
+       0x4aadb586,
+       0x430cb780,
+       0xc09c0a82,
+       0xd2080a10,
+       0xb720a281,
+       0xb744430c,
+       0x748068ad,
+       0x91a2c000,
+       0x67adb784,
+       0xc0007088,
+       0xffd49104,
+       0xb7209b66,
+       0xb5a5430c,
+       0xb720482d,
+       0xb743430c,
+       0x76805733,
+       0x93c4c004,
+       0x5eadb783,
+       0x09020e82,
+       0xd00a7502,
+       0x75040ed2,
+       0x0922d001,
+       0x0a027508,
+       0x0a42d001,
+       0x31287740,
+       0x90a2c000,
+       0xc0009e55,
+       0x748090c0,
+       0xd0010a86,
+       0x08020ad2,
+       0x5b14b7c0,
+       0x49049e83,
+       0x0b7ec03e,
+       0x4018b960,
+       0x9000c004,
+       0xaa49c060,
+       0x430cb760,
+       0x5c88c100,
+       0x4000ba24,
+       0x0058d020,
+       0xd0220496,
+       0x04925c88,
+       0x0096c101,
+       0x0496c101,
+       0xb7830092,
+       0x00967bcb,
+       0x57abb723,
+       0x4002ba24,
+       0x0242e000,
+       0x90acc000,
+       0xc0000201,
+       0xd0109080,
+       0xd022710c,
+       0xc1015c88,
+       0x00920096,
+       0xb5830096,
+       0xd12257ab,
+       0xb7805c88,
+       0xc101430c,
+       0x00920096,
+       0x00980d04,
+       0xb5037688,
+       0xfffe7bab,
+       0x77409124,
+       0x9364c001,
+       0xaa49c060,
+       0x430cb760,
+       0x5c88c100,
+       0x4000ba24,
+       0x0028d020,
+       0xd0220496,
+       0x04925c88,
+       0x0096c101,
+       0x0496c101,
+       0xb7830092,
+       0x00967bcb,
+       0x57abb723,
+       0x4002ba24,
+       0x0242e000,
+       0x90acc000,
+       0xc0000201,
+       0xd0109080,
+       0xd022710c,
+       0xc1015c88,
+       0x00920096,
+       0xb5830096,
+       0xd12257ab,
+       0xb7805c88,
+       0xc101430c,
+       0x00920096,
+       0x00980d04,
+       0xb503768e,
+       0xfffe7bab,
+       0x0d849124,
+       0x9101c000,
+       0x4490b760,
+       0x9a60fef4,
+       0x90a0c000,
+       0xfffc9e82,
+       0xb79f9020,
+       0xb7bf7dee,
+       0xb7df7e6e,
+       0xc0027eee,
+       0x9c228c20,
+       0x430cb720,
+       0x5dadb781,
+       0x7eadb742,
+       0xc1007504,
+       0xc000580c,
+       0xcd8e90a4,
+       0x9c220841,
+       0x0850cfff,
+       0x0800c480,
+       0x9e589c22,
+       0xe0000c86,
+       0xd0054030,
+       0x9e511c94,
+       0x72c0c814,
+       0x70c0c814,
+       0x7480c008,
+       0x483cb323,
+       0x445cb323,
+       0x927cc000,
+       0x5a1be100,
+       0x90ccc000,
+       0x0a02c002,
+       0x90e0c000,
+       0x7100d002,
+       0xba240a04,
+       0x9e504000,
+       0x51d3d024,
+       0xc0055193,
+       0xc00074c0,
+       0xe180923c,
+       0xc0005a57,
+       0xc00290cc,
+       0xc0000a02,
+       0xd00290e0,
+       0x0a047100,
+       0x4000ba24,
+       0x51f30098,
+       0x470cb740,
+       0xd0109e58,
+       0xc0200636,
+       0xb740a906,
+       0x7293468c,
+       0xaa05ca20,
+       0xd11d6039,
+       0xd11e1623,
+       0xd01a1215,
+       0xd01c5013,
+       0xc1015010,
+       0x9c226003,
+       0xb7a0a60d,
+       0x0707430c,
+       0xb781008b,
+       0x75045dad,
+       0x93c4c007,
+       0x9b94fff4,
+       0x5c88d322,
+       0x009a0d06,
+       0x7f2db722,
+       0x10029e52,
+       0x7080d812,
+       0xb781008b,
+       0x9eb55e2d,
+       0xc0007502,
+       0x750890a2,
+       0x93a4c000,
+       0xb787008b,
+       0x75004d2d,
+       0x92e2c000,
+       0x402db743,
+       0xb3207104,
+       0xc0004834,
+       0x008b9154,
+       0x4629b76a,
+       0x11c4d020,
+       0xfff40d02,
+       0x0a069b7e,
+       0x7100d012,
+       0x7188c810,
+       0xb7209e95,
+       0xb7804314,
+       0x0b1e448c,
+       0x75009e4a,
+       0x0938c0a2,
+       0xa941d008,
+       0x4422b346,
+       0xc0007480,
+       0xb7809282,
+       0xb764414d,
+       0xb7436bd5,
+       0xb76a41cd,
+       0xc1014649,
+       0x0d0265b9,
+       0x15b4c101,
+       0x9b59fff4,
+       0xc0009e82,
+       0xd3229180,
+       0xc1015c88,
+       0xb7830092,
+       0xb72540ad,
+       0x109846ad,
+       0xcffe9e8a,
+       0x76802d7c,
+       0x9382c004,
+       0x7740c080,
+       0x9094c000,
+       0x0e81cfc0,
+       0x4314b720,
+       0x5e4db781,
+       0xc0007508,
+       0xb78192c4,
+       0x1a045ecd,
+       0xc0007502,
+       0xb7449192,
+       0x0a1a6ccd,
+       0x74829e69,
+       0x1a46d009,
+       0xc00052b1,
+       0xd2a29140,
+       0xc0005e85,
+       0xd2a290c0,
+       0xd1105e0d,
+       0x9e5316d9,
+       0x15dac101,
+       0xfff40d02,
+       0x09869b1c,
+       0x70c0c812,
+       0x4314b700,
+       0x5c88d322,
+       0x5e4cb781,
+       0x0090c101,
+       0x7f35b742,
+       0xd0127508,
+       0xc0001248,
+       0xc10090c4,
+       0xd0125a05,
+       0xc03e70c8,
+       0xc41009fe,
+       0x0a067106,
+       0x9ea39e89,
+       0x7246c412,
+       0x7086cc10,
+       0x70c8cc12,
+       0x0a7ec00f,
+       0x0a7ccffe,
+       0x0155d120,
+       0xc8109ea3,
+       0x0d827286,
+       0x7286c812,
+       0x5c88d322,
+       0x5918c300,
+       0x0090c101,
+       0x40adb723,
+       0x9e4c5cd8,
+       0x2900c01c,
+       0x04877440,
+       0xd0013904,
+       0x31280cb4,
+       0xc0037440,
+       0xcf000a7e,
+       0xd0010a00,
+       0x59b00db8,
+       0x9e5c21b8,
+       0xd0113126,
+       0x31280de2,
+       0x59b09e4c,
+       0x02073128,
+       0x0a00c021,
+       0x0a40c01e,
+       0xf0009dcd,
+       0xc0ffa161,
+       0xcffe0a7e,
+       0x9ea30a40,
+       0x0a0a7440,
+       0x1a44d002,
+       0x25265d10,
+       0x3d049ea3,
+       0x0980c021,
+       0xc01e3526,
+       0x9dbd09d0,
+       0xa162f000,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0x8440a61d,
+       0x0a32d011,
+       0x5b30c200,
+       0x6931d0d1,
+       0x540cb780,
+       0xa1969e9e,
+       0x03a8d020,
+       0xc021010d,
+       0xa1120900,
+       0x0930c03c,
+       0xa9619d2d,
+       0xda109e92,
+       0xcff0aa61,
+       0x5d212d00,
+       0x0629d110,
+       0x5e88d322,
+       0xa261da10,
+       0x430cb720,
+       0x297cc00e,
+       0x00d2018d,
+       0x40adb783,
+       0x0980c021,
+       0x0980c03a,
+       0x0629d110,
+       0x40adb583,
+       0x430cb720,
+       0x41adb783,
+       0x0244c101,
+       0x41adb583,
+       0xaa65da10,
+       0xda100228,
+       0xb720a265,
+       0x00d2430c,
+       0x40adb783,
+       0xb5830228,
+       0xb72040ad,
+       0xb783430c,
+       0x024441ad,
+       0x41adb583,
+       0xa9e19d3d,
+       0xaa65f210,
+       0x29fec7ff,
+       0x0246010d,
+       0x0900c021,
+       0x0920c03a,
+       0xa265f210,
+       0xa9619d2d,
+       0xaa69f210,
+       0xc7ff9eb2,
+       0x0244297e,
+       0x0d00c021,
+       0x0d10c03a,
+       0xa269f210,
+       0xa9629d2e,
+       0xaa61f250,
+       0xc021010d,
+       0xc1010900,
+       0xc03a0244,
+       0xf2500930,
+       0x9d2da261,
+       0xf250a961,
+       0x9eb3aa65,
+       0xc040000d,
+       0x02440800,
+       0x0d80c021,
+       0xc042a019,
+       0xf2500dc0,
+       0x9d3ea265,
+       0xf210a9e2,
+       0xc00faa71,
+       0x018d2dfe,
+       0x0246c101,
+       0x0980c021,
+       0x09d0c042,
+       0xa271f210,
+       0xa9e19d3d,
+       0xaa75f210,
+       0x29fec00f,
+       0x0246038d,
+       0x0b80c021,
+       0x0ba0c042,
+       0xa275f210,
+       0xa8e19d7d,
+       0xaa7df210,
+       0x28fccffe,
+       0x0242010d,
+       0x0900c021,
+       0x0930c042,
+       0xa27df210,
+       0xa9619d2d,
+       0xaa79f210,
+       0xc00f9eb2,
+       0x0244297e,
+       0x0d00c021,
+       0x0d40c048,
+       0xa279f210,
+       0xa9629d2e,
+       0x01b6c101,
+       0x020d01b2,
+       0xc00f01b4,
+       0xc0212d7e,
+       0xc1010a00,
+       0xc04601b4,
+       0x9d4d0a60,
+       0x9ea2aa61,
+       0xa979da10,
+       0x2d7cc3ff,
+       0xda105d41,
+       0xc101a9fe,
+       0xb7400524,
+       0xc3fe430c,
+       0xc1012a7c,
+       0x01540246,
+       0xa17ada10,
+       0xa27dda10,
+       0x0960c05e,
+       0xaa41f008,
+       0x0238058d,
+       0xa241f008,
+       0x430cb720,
+       0x402db783,
+       0xb5830246,
+       0xb7a0402d,
+       0xfff44314,
+       0xc1019999,
+       0xc05e02da,
+       0xf2080ae0,
+       0x7140aaa1,
+       0x90e6c000,
+       0x04dcd010,
+       0xb58c0a06,
+       0xb7204829,
+       0xb747430c,
+       0x74804d2d,
+       0x9222c000,
+       0x402db783,
+       0xc0007104,
+       0xb78c9186,
+       0x750064ab,
+       0x90e4c000,
+       0x009cc101,
+       0xb58c0a04,
+       0xb7204929,
+       0xb781430c,
+       0x75045dad,
+       0x92c4c002,
+       0xc021020d,
+       0xc01e0a00,
+       0x9d4d0a60,
+       0x9e79aa61,
+       0xb7009e78,
+       0x9ea25431,
+       0x54b1b760,
+       0x55b0b720,
+       0x5529b720,
+       0xc2000109,
+       0xcff059e1,
+       0xc1012900,
+       0xc00f0240,
+       0xb5802d7c,
+       0x59215428,
+       0x5d41020d,
+       0x0126c101,
+       0x0522c101,
+       0x01b2c101,
+       0x0a00c021,
+       0x54a8b540,
+       0x5530b540,
+       0x55a8b560,
+       0x0a70c01e,
+       0xaa619d4d,
+       0xb7009ea2,
+       0xb7605630,
+       0xb72056b0,
+       0xb7205728,
+       0x010957b0,
+       0x2900cff0,
+       0x2d7cc00f,
+       0x59e1c200,
+       0x5d415921,
+       0x0126c101,
+       0x0522c101,
+       0x01b2c101,
+       0x0240c101,
+       0x5628b580,
+       0x56a8b540,
+       0x5730b540,
+       0x57a8b560,
+       0x2deed3f2,
+       0x9978fff4,
+       0x7600a812,
+       0x9322c005,
+       0xb780a919,
+       0xc300590c,
+       0xc0215d18,
+       0xc0020900,
+       0xd1300910,
+       0x9d2d0529,
+       0x9e92a961,
+       0xa9cad858,
+       0xa8cdd858,
+       0xa8d2d858,
+       0xa856d858,
+       0xcff00205,
+       0xc00f2a00,
+       0xc1002d7c,
+       0xc20059e1,
+       0x5d415a21,
+       0x297cc00e,
+       0x0246c101,
+       0x05220122,
+       0x01b0c101,
+       0xa249d858,
+       0xa14dd858,
+       0xa152d858,
+       0xa1d5d858,
+       0xaa619d7d,
+       0xabf9da10,
+       0xa87ef210,
+       0xa941f058,
+       0xa879f210,
+       0xaaf1f210,
+       0xaaf6f210,
+       0xab7dda10,
+       0xa9dbd858,
+       0xa946f058,
+       0xa9c9f058,
+       0xa9cef058,
+       0xa8d5f058,
+       0xa8d2f058,
+       0xc101a39d,
+       0xf0580120,
+       0xa81eabd9,
+       0xa964f212,
+       0x5a61c200,
+       0x9eb80490,
+       0x0246c301,
+       0xc1014c7d,
+       0x01ba0520,
+       0x009c05ba,
+       0xd8587205,
+       0xf058a259,
+       0xf058a141,
+       0xf058a146,
+       0xf058a1c9,
+       0xf058a1ce,
+       0xf058a0d5,
+       0xc000a0d2,
+       0xd0d891b2,
+       0xe010aa59,
+       0x0a048b21,
+       0xa159f058,
+       0xa259d0d8,
+       0x90c0c000,
+       0x0274c001,
+       0xa259f058,
+       0xaa5df058,
+       0xa969f210,
+       0x4d7d9ea2,
+       0xc0007295,
+       0xd0d891b2,
+       0xc101aa5d,
+       0xf0581124,
+       0x0a04a15d,
+       0xa25dd0d8,
+       0x90a0c000,
+       0xf0580244,
+       0xb720a25d,
+       0x0203430c,
+       0x0a18c0a4,
+       0xaa01d208,
+       0xc0007500,
+       0xb7899122,
+       0xa996692d,
+       0x050f9e73,
+       0x9c629ea4,
+       0xc002058f,
+       0xb79f09c2,
+       0xb7bf7d6e,
+       0xb7df7dee,
+       0xb7ff7e6e,
+       0xc0027eee,
+       0xfe698c40,
+       0xb79f9200,
+       0xb7bf7d6e,
+       0xb7df7dee,
+       0xb7ff7e6e,
+       0xc0027eee,
+       0x9c228c40,
+       0x430cb740,
+       0x0d020487,
+       0xc0c40185,
+       0xb96009f0,
+       0xc0204258,
+       0x9e9baa29,
+       0xa269c020,
+       0xffff0d04,
+       0xc0d29341,
+       0x0a060940,
+       0xa241d008,
+       0x430cb720,
+       0x0a70c002,
+       0x772bb58c,
+       0x5749b780,
+       0x430cb720,
+       0x48abb58d,
+       0xb7209c22,
+       0x9e53430c,
+       0xa95df010,
+       0xa956f010,
+       0x702db786,
+       0x0124c101,
+       0xb5860244,
+       0xb720702d,
+       0xf008430c,
+       0xf008a972,
+       0xb786a979,
+       0xc1016fad,
+       0x02440124,
+       0x6fadb586,
+       0x430cb720,
+       0xa966f008,
+       0xa969f008,
+       0x70adb786,
+       0x0124c101,
+       0xb5860244,
+       0xb72070ad,
+       0xd808430c,
+       0xd808a961,
+       0xb786a966,
+       0xc1016f2d,
+       0x02440124,
+       0x6f2db586,
+       0x430cb720,
+       0x63adb786,
+       0xb3407502,
+       0xd80848a4,
+       0xb786a965,
+       0x02446ead,
+       0x6eadb586,
+       0xf0109c22,
+       0xb720a9e2,
+       0x0906430c,
+       0x6335b566,
+       0x430cb780,
+       0x0a50c0d0,
+       0xa101d208,
+       0xa6059c22,
+       0x430cb7a0,
+       0xaa41d810,
+       0xa945d810,
+       0x0685008b,
+       0x5e35b741,
+       0x00890244,
+       0xf2107684,
+       0xcffea9b1,
+       0xc00028fc,
+       0x9ea99224,
+       0x584bb78d,
+       0x6ccdb746,
+       0xb58d0238,
+       0xf210584b,
+       0x0128aa35,
+       0x6ccdb546,
+       0x9120c000,
+       0xb56d9ea9,
+       0xf210584b,
+       0xb586aa35,
+       0x9ea96ccd,
+       0xa9a1f250,
+       0x6ecdb786,
+       0x6f4db746,
+       0x6dd5b746,
+       0xb5860246,
+       0xf2506ecd,
+       0xb786a9a5,
+       0xb7666e4d,
+       0x012659d5,
+       0x6f4db546,
+       0xa925da10,
+       0xb5860242,
+       0xc1016e4d,
+       0xb5460524,
+       0xf2106dd5,
+       0xf210a931,
+       0xd0a4aa35,
+       0x01835905,
+       0xc1010244,
+       0xb56605b8,
+       0xda1059d5,
+       0xda10aa39,
+       0xc101a9be,
+       0x05b405b8,
+       0x9aa0c214,
+       0xb786008b,
+       0xb74c68ad,
+       0x02406b2b,
+       0xb5860904,
+       0xb54c68ad,
+       0xb7806b2b,
+       0x7500448c,
+       0x90a4c000,
+       0xc0000109,
+       0x9e699180,
+       0xb9600902,
+       0xb7804030,
+       0x088454a9,
+       0xffff0128,
+       0x9ea99381,
+       0x5f4bb54d,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0xaa61f010,
+       0xb7209e5a,
+       0x7500430c,
+       0x9082c000,
+       0x75adb586,
+       0xa956d008,
+       0x76bec01c,
+       0x90e2c000,
+       0xc0da0203,
+       0xd2080a44,
+       0xd008a102,
+       0xc01ca959,
+       0xc00074be,
+       0x020390e2,
+       0x0a48c0da,
+       0xa101d208,
+       0xc0da0103,
+       0x0a060920,
+       0xa241d008,
+       0xa6059c22,
+       0xf0109e55,
+       0xf010a955,
+       0xf010aa51,
+       0xf208a95a,
+       0xb720a9bd,
+       0x0244430c,
+       0x0244c101,
+       0xb5860246,
+       0xf208742d,
+       0xf208a929,
+       0xda08a9a6,
+       0xda08aa25,
+       0xb7a0a9a1,
+       0xd1204314,
+       0x01c601a7,
+       0xffd40d02,
+       0x9e699b22,
+       0x702db506,
+       0x430cb720,
+       0xa935f208,
+       0x6f2db786,
+       0xb5860244,
+       0xb7206f2d,
+       0xf208430c,
+       0xb786a935,
+       0x0244712d,
+       0x712db586,
+       0x430cb720,
+       0xa925f208,
+       0x6eadb786,
+       0xb5860244,
+       0xb7206ead,
+       0xda08430c,
+       0xb78da939,
+       0x02445f2b,
+       0x5f2bb58d,
+       0x430cb720,
+       0xa921da08,
+       0x5fabb78d,
+       0xb58d0244,
+       0xb7205fab,
+       0xf208430c,
+       0xb786a929,
+       0x0244722d,
+       0x722db586,
+       0x430cb720,
+       0xa93dda08,
+       0x632bb78d,
+       0xb58d0244,
+       0xb720632b,
+       0xda08430c,
+       0xb78da925,
+       0x024463ab,
+       0x63abb58d,
+       0x430cb720,
+       0xaa25f208,
+       0xa92af208,
+       0x72adb746,
+       0xc1010244,
+       0xb5860244,
+       0xb72072ad,
+       0xf208430c,
+       0xb786a939,
+       0x0244732d,
+       0x732db586,
+       0x430cb720,
+       0xa93df208,
+       0x73adb786,
+       0xb5860244,
+       0xb72073ad,
+       0xda08430c,
+       0xda08a93a,
+       0xb786a93d,
+       0xc10174ad,
+       0x02440124,
+       0x74adb586,
+       0x430cb720,
+       0xaa21da08,
+       0xa926da08,
+       0x612bb74d,
+       0xc1010244,
+       0xb58d0244,
+       0xb720612b,
+       0xb787430c,
+       0xb746452d,
+       0x0244742d,
+       0x452db587,
+       0x430cb720,
+       0xa939da08,
+       0xaabdda08,
+       0x482db787,
+       0x024a02d4,
+       0x482db587,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0xa9e2f010,
+       0x430cb720,
+       0xb5660906,
+       0xb7806335,
+       0xc0d0430c,
+       0xd2080a50,
+       0x9c22a101,
+       0x430cb720,
+       0xb78e9e58,
+       0x110959ab,
+       0x9060c000,
+       0x70080004,
+       0x93d6ffff,
+       0x9060c000,
+       0x74000008,
+       0x93d8ffff,
+       0x287ccffe,
+       0xa6059c22,
+       0x430cb7a0,
+       0xb78e008b,
+       0xc200592b,
+       0x009a5888,
+       0x7db5b7a6,
+       0x7db5b566,
+       0x09c2d012,
+       0x9bdcfff4,
+       0xb50e008b,
+       0x9e68592b,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0x430cb720,
+       0x5e2db781,
+       0xc0007502,
+       0xb78691c4,
+       0x750040a9,
+       0x9122c000,
+       0x59abb78c,
+       0x75020802,
+       0x0802d002,
+       0x08029c22,
+       0xa60d9c22,
+       0x4314b7a0,
+       0xb7669e69,
+       0xfff459b5,
+       0x03019bca,
+       0x9be2fff4,
+       0xc0007400,
+       0x9e6991c2,
+       0x6badb786,
+       0x59adb746,
+       0x4db5b746,
+       0xc1010128,
+       0xb5461124,
+       0xb7a06bad,
+       0x008b430c,
+       0x74adb786,
+       0xc0017500,
+       0xfff49264,
+       0x74009bc9,
+       0x91a2c000,
+       0xb78e008b,
+       0xb74459ab,
+       0x708867ad,
+       0xd0040a02,
+       0xc0000a42,
+       0x008b9360,
+       0x5e2db781,
+       0xc0007502,
+       0x750890a2,
+       0x9204c000,
+       0xb784008b,
+       0xb74667ad,
+       0xb7464dad,
+       0x62455035,
+       0x0a027115,
+       0x0a42d00b,
+       0x9080c000,
+       0x008b0a06,
+       0x74adb586,
+       0xb706008b,
+       0x740074ad,
+       0x93a2c000,
+       0x9b98fff4,
+       0xc0007400,
+       0x9e6992a2,
+       0x52adb786,
+       0x7188c010,
+       0x592bb78e,
+       0x5a08c200,
+       0x00cac101,
+       0x7dadb786,
+       0x12400268,
+       0x7dadb586,
+       0x90a0c000,
+       0xb7069e69,
+       0xb79f4dad,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0xf8399c22,
+       0xfff4a205,
+       0x74009b73,
+       0x430cb700,
+       0x91e2c000,
+       0x592ab78e,
+       0x52acb746,
+       0x5a08c200,
+       0xb78600c0,
+       0xc0107dad,
+       0xc0017104,
+       0xb74192a0,
+       0x74885e2c,
+       0x9164c000,
+       0x592ab78e,
+       0x5a08c200,
+       0xb70600c0,
+       0xc0017dad,
+       0xb78690e0,
+       0x750074ac,
+       0x9004c001,
+       0xc0007482,
+       0x748890a2,
+       0x91e4c000,
+       0x67acb784,
+       0x4dacb746,
+       0x5034b746,
+       0x71156245,
+       0xd00b0a02,
+       0xc0000a42,
+       0x0a069060,
+       0x74acb586,
+       0x74acb786,
+       0xc0007500,
+       0x000990a4,
+       0x9080c000,
+       0x4dacb706,
+       0xaa1df9f8,
+       0xf0109c22,
+       0xf010a966,
+       0x9e5ca9e2,
+       0x7100c814,
+       0x7080c802,
+       0x0e22d011,
+       0x753c0244,
+       0x915cc000,
+       0x087ec7ff,
+       0xcffe76c0,
+       0xd00e087c,
+       0x9c220804,
+       0xc0007680,
+       0xd02290bc,
+       0x9c225468,
+       0xc1019e5a,
+       0x50531205,
+       0x76e69c22,
+       0x1000d01e,
+       0x48bcb340,
+       0x76c0c380,
+       0x1524d02e,
+       0x913cc000,
+       0x084ec002,
+       0xd0119c22,
+       0xd2240e32,
+       0x9e525987,
+       0x76c8c004,
+       0x4002ba12,
+       0xffff0d04,
+       0xb78092da,
+       0x9e5b5d8c,
+       0xc040691a,
+       0x0244aa65,
+       0xba000009,
+       0x9c224002,
+       0xa205f839,
+       0x1cb0f011,
+       0x9e539e99,
+       0x90d6c000,
+       0x0902c002,
+       0x9100c000,
+       0x7040d002,
+       0x01090a04,
+       0x4000ba12,
+       0x19400d02,
+       0xc8129e50,
+       0x0a067004,
+       0xcc1251eb,
+       0xc00270c8,
+       0xcc100dce,
+       0xcc127246,
+       0xba1b72c4,
+       0xb7804003,
+       0x05b65d0c,
+       0x512b9e58,
+       0xa986c840,
+       0x4003ba1b,
+       0x65b5c101,
+       0x9806c214,
+       0xfff49e83,
+       0xf9f89baa,
+       0x9c22aa1d,
+       0x0e30f011,
+       0x4314b760,
+       0x92e2c000,
+       0xc10100c8,
+       0xb74c0096,
+       0x750271b3,
+       0xba120912,
+       0xd0024003,
+       0xd0311926,
+       0xd0100e20,
+       0xc10170c8,
+       0xd0120124,
+       0xba1c7104,
+       0x9e5c4002,
+       0x0a38c0c8,
+       0xa801d208,
+       0x70c0c010,
+       0xaa1dd3e8,
+       0x7008c012,
+       0x287ccffe,
+       0xf8399c22,
+       0xb720a205,
+       0x0a02430c,
+       0x9e8b0992,
+       0x6e2bb58c,
+       0x0d90c0d4,
+       0x6b2bb58c,
+       0x59adb586,
+       0x522bb58d,
+       0x662db586,
+       0x66adb586,
+       0x682db586,
+       0x63adb586,
+       0x996ffe54,
+       0x4314b760,
+       0x0982c002,
+       0x0d80c0d6,
+       0xaa1df9f8,
+       0x90a0fe4b,
+       0x430cb780,
+       0xd11005b6,
+       0xb78c04b9,
+       0x01b87aab,
+       0x4002ba1b,
+       0x70c0d014,
+       0x753ec7fc,
+       0x48bab340,
+       0x7aabb56c,
+       0xa6059c22,
+       0x430cb7a0,
+       0xb781008b,
+       0xb7a65e2d,
+       0x75026ab5,
+       0x9184c000,
+       0x9a40fff4,
+       0xc0007400,
+       0x008b90e4,
+       0x502db706,
+       0x9060c000,
+       0xd1100802,
+       0xb79f1451,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa6059c22,
+       0x430cb7a0,
+       0xb766008b,
+       0xfff459b5,
+       0x008b9a0c,
+       0x6badb746,
+       0x59adb786,
+       0x12400244,
+       0x6badb586,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0xb7a0a60d,
+       0x097a430c,
+       0xb786008b,
+       0xd0104fad,
+       0x196c7104,
+       0x7104cc12,
+       0x4dadb786,
+       0xb76c9e9d,
+       0x9ea3592b,
+       0x6a7ac006,
+       0x59b3b5ae,
+       0x0d025988,
+       0x5b1fc200,
+       0x983fffd4,
+       0x7740008b,
+       0x4e2db506,
+       0x9c87c820,
+       0x9116c000,
+       0x4000b960,
+       0x9080c000,
+       0x7d2db5c6,
+       0xffff0890,
+       0x008b93a1,
+       0x4dadb786,
+       0x655dd131,
+       0x6659d131,
+       0x6badb546,
+       0x4f2db586,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0x8420a61d,
+       0x430cb7a0,
+       0x0787a199,
+       0xb7869ea8,
+       0x7502704c,
+       0x1092d019,
+       0x9132c000,
+       0x08829ea8,
+       0x614ab78d,
+       0xd00a7502,
+       0x9ea80892,
+       0xb786a09d,
+       0x7504554c,
+       0x9364c001,
+       0x5e4cb781,
+       0x714ab7cc,
+       0x584cb7e6,
+       0xc0007502,
+       0xfff49284,
+       0x740099b1,
+       0x91e4c000,
+       0xb786008b,
+       0xb746502d,
+       0xc2006aad,
+       0x70885a08,
+       0x90bcc000,
+       0xc0000f32,
+       0x0f129060,
+       0xb7819ea8,
+       0x75025e4c,
+       0x9104c006,
+       0x4dccb786,
+       0x4f4cb746,
+       0x70886a1e,
+       0x9016c006,
+       0x5e05d322,
+       0x9ea50268,
+       0x2efccffe,
+       0x9180c001,
+       0xc0c8020b,
+       0xd2080a28,
+       0xc001aa82,
+       0x77c090a0,
+       0x91e4c000,
+       0xb78c008b,
+       0x75006c2b,
+       0x9122c000,
+       0xc0c8020b,
+       0xd2080a28,
+       0xc003ab01,
+       0xd01092e0,
+       0x9ea804fe,
+       0xc380009a,
+       0xb78c5c88,
+       0xb7cc644a,
+       0xc101722b,
+       0xb7e6049a,
+       0x752a5a4d,
+       0x9eb50f0e,
+       0x1f62d009,
+       0x7440a89d,
+       0x9004c003,
+       0xc00075c0,
+       0x020b9124,
+       0x0a38c0c8,
+       0xa902d208,
+       0x9100c004,
+       0x9ebba91a,
+       0x4002ba1e,
+       0x9a6afff4,
+       0x430cb720,
+       0xb7819e82,
+       0xcffe5e2d,
+       0x75042d7c,
+       0x9304c003,
+       0xb7869ea8,
+       0x7504554c,
+       0x9242c003,
+       0x5c88d3a2,
+       0xb746009a,
+       0xb7865e2d,
+       0xb7265f2d,
+       0xb7666035,
+       0xe0006135,
+       0xc0030244,
+       0xc2009062,
+       0x01a85905,
+       0x6525d131,
+       0xc18005b2,
+       0xc1015a05,
+       0xc10105b8,
+       0xc1f405b4,
+       0x9e829a6c,
+       0x2d7ccffe,
+       0x9200c002,
+       0x5eadb781,
+       0x75021a04,
+       0x9192c000,
+       0x066cd010,
+       0xc1019e51,
+       0xd010024a,
+       0x9e6a7048,
+       0x9120c000,
+       0x066ad010,
+       0xd0109e51,
+       0xd0107048,
+       0xd012155c,
+       0x03097104,
+       0x2b7ccffe,
+       0x4314b7a0,
+       0xb781040b,
+       0x75025e4c,
+       0x92a4c001,
+       0x98f4fff4,
+       0xc0017400,
+       0x008b9204,
+       0x552db786,
+       0xc0017504,
+       0x040b9144,
+       0x62cab78d,
+       0x7510c004,
+       0x9074c001,
+       0x502db786,
+       0x6aadb746,
+       0x5a08c200,
+       0xc0007088,
+       0x020b9356,
+       0x0a28c0c8,
+       0xab01d208,
+       0x9260c000,
+       0xb7ac008b,
+       0x774071b3,
+       0x9204fffb,
+       0x9080fffa,
+       0x430cb720,
+       0x5e2db781,
+       0xfffd7508,
+       0xfffd93a4,
+       0x058f9160,
+       0x4002ba1e,
+       0x9a12fff4,
+       0x7deeb79f,
+       0x7e6eb7bf,
+       0x7eeeb7df,
+       0x7f6eb7ff,
+       0x8c20c002,
+       0xa60d9c22,
+       0x430cb7a0,
+       0xb786008b,
+       0x750074ad,
+       0x9264c001,
+       0x98a8fff4,
+       0xc0007400,
+       0x008b91a2,
+       0x59abb78e,
+       0x67adb744,
+       0x0a027088,
+       0x0a42d004,
+       0x9360c000,
+       0xb781008b,
+       0x75025e2d,
+       0x90a2c000,
+       0xc0007508,
+       0x008b9204,
+       0x67adb784,
+       0x4dadb746,
+       0x5035b746,
+       0x71156245,
+       0xd00b0a02,
+       0xc0000a42,
+       0x0a069080,
+       0xb586008b,
+       0x008b74ad,
+       0x74adb786,
+       0xc0037500,
+       0x008b9042,
+       0x5e2db781,
+       0xc0027508,
+       0x75029382,
+       0x9224c000,
+       0x986efff4,
+       0x0a80f012,
+       0x9164c000,
+       0xb786008b,
+       0xb7464dad,
+       0x6a1e4f2d,
+       0xc0017088,
+       0x008b93f6,
+       0x53abb78c,
+       0xc0027500,
+       0x008b9082,
+       0x7233b7ac,
+       0x6aadb786,
+       0xd8120906,
+       0xb7817104,
+       0x75025e2d,
+       0x9184c000,
+       0x984cfff4,
+       0xc0007400,
+       0x008b90e4,
+       0x502db786,
+       0x9060c000,
+       0xba2d0a02,
+       0x9ea24003,
+       0x9eb39e6b,
+       0x995afff4,
+       0x15d1d110,
+       0x59870a0e,
+       0x70c8cc10,
+       0xcc121a08,
+       0x008b70c8,
+       0x6bb3b76c,
+       0xba1b1187,
+       0xb79f4002,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0x90c0ffee,
+       0x99d7fff4,
+       0x9e6c1001,
+       0x7008c012,
+       0xfffe7400,
+       0xfffd905a,
+       0xb79f9340,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0xa6059c22,
+       0x4314b7a0,
+       0xb78c9e69,
+       0x750259ab,
+       0x1a42d001,
+       0x90c2c000,
+       0xb78c9e69,
+       0x0a045a2b,
+       0x632bb58d,
+       0xb74c9e69,
+       0xd01159ab,
+       0xcffe1a22,
+       0xc07c2a7c,
+       0xc000753e,
+       0x097f91f4,
+       0x0a7ecffe,
+       0x61abb54d,
+       0x722db586,
+       0x622bb54d,
+       0x62abb54d,
+       0x9120c001,
+       0x9e939e69,
+       0x5a2bb7ac,
+       0x09d2d011,
+       0x9932c1f4,
+       0x75401804,
+       0x09029e69,
+       0x287ccffe,
+       0x0922d002,
+       0xb50d0104,
+       0x0a06622b,
+       0x7088c812,
+       0x632bb78d,
+       0x4db5b746,
+       0x62400a84,
+       0xb5ad02d8,
+       0xcffe62ab,
+       0xc1012afc,
+       0xb54d62d5,
+       0xb5a661ab,
+       0x9e69722d,
+       0x632bb78d,
+       0x4dadb746,
+       0xb5866245,
+       0xb79f72ad,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa61d9c22,
+       0xb7c08440,
+       0x008d430c,
+       0x5e2db781,
+       0x75adb726,
+       0xc0087508,
+       0x744092e4,
+       0x90c2c006,
+       0x0d029eb1,
+       0x634bb76d,
+       0x62cbb78d,
+       0x4dcdb746,
+       0x5985d1a4,
+       0xc1011094,
+       0xa09905b8,
+       0x99d7ffb4,
+       0x008da015,
+       0x632bb7ed,
+       0x66abb78d,
+       0x75b5b7c6,
+       0x6133b7ed,
+       0x1a041278,
+       0x7780c005,
+       0xc0009ea5,
+       0xb7669152,
+       0xc0054dad,
+       0xd31474c0,
+       0xc0005da8,
+       0x9eb190f4,
+       0xb766058d,
+       0x59ab4dcd,
+       0x98c1c1f4,
+       0xcffea916,
+       0xa9992efc,
+       0x162ed010,
+       0xba249e6a,
+       0x624f4002,
+       0x0659d110,
+       0xb766008d,
+       0xb74669b5,
+       0xba246a35,
+       0xba124002,
+       0x62474002,
+       0xb76c6127,
+       0xc101592b,
+       0xc10105b8,
+       0xb5660524,
+       0xb54669b5,
+       0xb5c66a35,
+       0x058d4db5,
+       0x02815988,
+       0x989ec1f4,
+       0xb786008d,
+       0xb50652ad,
+       0xc0054e2d,
+       0xc0007500,
+       0xc20090f4,
+       0x61595a2b,
+       0x90a0c000,
+       0xc2006259,
+       0x9eb15929,
+       0x4f4db786,
+       0x52cdb546,
+       0x7500c005,
+       0x90f4c000,
+       0x5a2bc200,
+       0xc0006159,
+       0x625990a0,
+       0x5929c200,
+       0xb786008d,
+       0xb5466aad,
+       0xc0054f2d,
+       0xc0007500,
+       0xc20090f4,
+       0x62595a2b,
+       0x90a0c000,
+       0xc2006259,
+       0x9eb15a29,
+       0x6bcdb706,
+       0x6acdb586,
+       0x7400c005,
+       0x90f4c000,
+       0x5a2bc000,
+       0xc0006059,
+       0x625190a0,
+       0x5829c200,
+       0xb7a6008d,
+       0xb7a64dad,
+       0xb5064f35,
+       0xd2a46bad,
+       0xd01059fd,
+       0xc101065a,
+       0xc10105ba,
+       0xc200024a,
+       0x5d875a13,
+       0x01c7d120,
+       0x502db586,
+       0xc1f4018b,
+       0x600b9841,
+       0xb5069eb1,
+       0xc012504d,
+       0x0a02700a,
+       0x16d0c101,
+       0x50d5b5a6,
+       0x75cdb586,
+       0x504db506,
+       0xc0da9eb2,
+       0xd0100d40,
+       0x7480a941,
+       0x9142c000,
+       0xc0c8020d,
+       0xd2080a28,
+       0x0a02a101,
+       0xa241d010,
+       0xc0da9eb2,
+       0xd0100d48,
+       0xc01ca941,
+       0xc00074be,
+       0xc0029222,
+       0xd0100a4e,
+       0x09027088,
+       0x7104d012,
+       0xc0c8010d,
+       0xd0080938,
+       0x0a7fa241,
+       0xa241d010,
+       0xc0da9eb2,
+       0xd0100d44,
+       0xc01ca941,
+       0xc00074be,
+       0xc0029222,
+       0xd0100a4e,
+       0x09027088,
+       0x7104d012,
+       0xc0c8010d,
+       0xd0080934,
+       0x0a7fa241,
+       0xa241d010,
+       0x9a8ffff4,
+       0x7d6eb79f,
+       0x7deeb7bf,
+       0x7e6eb7df,
+       0x7eeeb7ff,
+       0x8c40c002,
+       0x9380ffe3,
+       0xc0067440,
+       0x9eb190c2,
+       0xb76d0d02,
+       0xb78d634b,
+       0xb74662cb,
+       0xd1a44dcd,
+       0x10945985,
+       0x05b8c101,
+       0xffb4a09d,
+       0xa01198c2,
+       0xb7ed008d,
+       0xb78d632b,
+       0xb7c666ab,
+       0xb7ed75b5,
+       0x12786133,
+       0xc0051a04,
+       0x9ea57780,
+       0x9152c000,
+       0x4dadb766,
+       0x74c0c005,
+       0x5da8d314,
+       0x90f4c000,
+       0x058d9eb1,
+       0x4dcdb766,
+       0xc1d459ab,
+       0xa9129bac,
+       0x2efccffe,
+       0xd010a99d,
+       0x9e6a162e,
+       0x4002ba24,
+       0xd110624f,
+       0x008d0659,
+       0x69b5b766,
+       0x6a35b746,
+       0x4002ba24,
+       0x4002ba12,
+       0x61276247,
+       0x592bb76c,
+       0x05b8c101,
+       0x0524c101,
+       0x69b5b566,
+       0x6a35b546,
+       0x4db5b5c6,
+       0x5988058d,
+       0xc1d40281,
+       0x008d9b89,
+       0x52adb786,
+       0x4e2db506,
+       0x7500c005,
+       0x90f4c000,
+       0x5a2bc200,
+       0xc0006159,
+       0x625990a0,
+       0x5929c200,
+       0xb7869eb1,
+       0xb5464f4d,
+       0xc00552cd,
+       0xc0007500,
+       0xc20090f4,
+       0x61595a2b,
+       0x90a0c000,
+       0xc2006259,
+       0x008d5929,
+       0x6aadb786,
+       0x4f2db546,
+       0x7500c005,
+       0x90f4c000,
+       0x5a2bc200,
+       0xc0006259,
+       0x625990a0,
+       0x5a29c200,
+       0xb7069eb1,
+       0xb5866bcd,
+       0xc0056acd,
+       0xc0007400,
+       0xc00090f4,
+       0x60595a2b,
+       0x90a0c000,
+       0xc2006251,
+       0x008d5829,
+       0x4dadb7a6,
+       0x4f35b7a6,
+       0x6badb506,
+       0x59fdd2a4,
+       0x065ad010,
+       0x05bac101,
+       0x024ac101,
+       0x5a13c200,
+       0xd1205d87,
+       0xb58601c7,
+       0x018b502d,
+       0x9b2cc1d4,
+       0x9eb1600b,
+       0x504db506,
+       0x700ac012,
+       0xc1010a02,
+       0xb5a616d0,
+       0xb58650d5,
+       0xb50675cd,
+       0x9eb2504d,
+       0x0d40c0da,
+       0xa941d010,
+       0xc0007480,
+       0x020d9142,
+       0x0a28c0c8,
+       0xa101d208,
+       0xd0100a02,
+       0x9eb2a241,
+       0x0d48c0da,
+       0xa941d010,
+       0x74bec01c,
+       0x9222c000,
+       0x0a4ec002,
+       0x7088d010,
+       0xd0120902,
+       0x010d7104,
+       0x0938c0c8,
+       0xa241d008,
+       0xd0100a7f,
+       0x9eb2a241,
+       0x0d44c0da,
+       0xa941d010,
+       0x74bec01c,
+       0x9222c000,
+       0x0a4ec002,
+       0x7088d010,
+       0xd0120902,
+       0x010d7104,
+       0x0934c0c8,
+       0xa241d008,
+       0xd0100a7f,
+       0xb79fa241,
+       0xb7bf7d6e,
+       0xb7df7dee,
+       0xb7ff7e6e,
+       0xc0027eee,
+       0xffeb8c40,
+       0x9e5a9200,
+       0x70c0d014,
+       0x1a0476c0,
+       0x0244d01b,
+       0x1228d01c,
+       0xff9d9ea3,
+       0xa60d92c0,
+       0x4314b7a0,
+       0x03079e5d,
+       0xc0d8058b,
+       0xc00e0d80,
+       0xfe3409b2,
+       0xb760986c,
+       0xc00a4314,
+       0xc0ca0992,
+       0xfe340da0,
+       0xb7609864,
+       0xc0024314,
+       0xc0d60982,
+       0xfe340d80,
+       0xb760985c,
+       0x09d24314,
+       0x0db0c0d4,
+       0x9855fe34,
+       0x4314b760,
+       0x09f2c04c,
+       0x0db0c0e6,
+       0x984dfe34,
+       0x018b058b,
+       0x0df0c0c4,
+       0x0d32c004,
+       0x9870fe34,
+       0x9e699e68,
+       0x4f2cb786,
+       0x040b097f,
+       0x7520c001,
+       0xc0c89e6c,
+       0xc0da0c28,
+       0xc0de0a44,
+       0xd2080880,
+       0x0a22a101,
+       0x4029b580,
+       0x4050b760,
+       0xd00d9e6b,
+       0x0c821a48,
+       0xb421050b,
+       0x9e69443a,
+       0x09c8c0da,
+       0x0d40c0da,
+       0xd0089e4d,
+       0x9d0aa161,
+       0xb56c018d,
+       0xd0107132,
+       0xb526a0c2,
+       0x040b75b4,
+       0x08c0c12a,
+       0x0b02c010,
+       0xa961d008,
+       0x9e689e44,
+       0x0a4cc0da,
+       0xa101d208,
+       0xaa61d008,
+       0x6db2b74d,
+       0xa9c2d018,
+       0x0a027500,
+       0x0a42d002,
+       0x0244c101,
+       0x6daab58d,
+       0x7e7edffc,
+       0x0d38d012,
+       0x430cb740,
+       0x05a2d022,
+       0xc0c80205,
+       0xd2080a38,
+       0x9e58aa01,
+       0x7008d010,
+       0x0934c0c8,
+       0xa941d008,
+       0x7104d012,
+       0x76440c84,
+       0x462bb59a,
+       0x402bb5c0,
+       0x412bb5a0,
+       0x0c040984,
+       0xfffe0888,
+       0xb7209124,
+       0xb78c430c,
+       0x752a642b,
+       0x9112c000,
+       0x0a169e69,
+       0x792bb58d,
+       0x90a0c000,
+       0xb52d9e68,
+       0x9e697932,
+       0xb7660d02,
+       0xb7665035,
+       0xfff44dad,
+       0xcffe9b40,
+       0x0a7a287c,
+       0x7008c010,
+       0xc0121a74,
+       0x9e697008,
+       0x59abb50e,
+       0x98a1fff4,
+       0xb78c9e68,
+       0x750064aa,
+       0xd0010a02,
+       0xb5800a42,
+       0xb79f448c,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0xb7209c22,
+       0x0a02430c,
+       0x48abb72d,
+       0xa271f010,
+       0xa269f010,
+       0xa0e1f010,
+       0xa265f010,
+       0xa27dd810,
+       0xa279d810,
+       0xa279f010,
+       0xa271f050,
+       0xa261f050,
+       0xa27dd850,
+       0xa279d850,
+       0xa269d850,
+       0xa26df050,
+       0xa269f050,
+       0xa265f050,
+       0xa275f050,
+       0x430cb720,
+       0x48abb74d,
+       0x6e2db546,
+       0x430cb720,
+       0x702db586,
+       0x430cb720,
+       0x6f2db586,
+       0x430cb720,
+       0x6eadb586,
+       0x430cb720,
+       0x5fabb58d,
+       0x430cb720,
+       0x5f2bb58d,
+       0x430cb720,
+       0x712db586,
+       0x430cb720,
+       0x722db586,
+       0x430cb720,
+       0x63abb58d,
+       0x430cb720,
+       0x632bb58d,
+       0x430cb720,
+       0x612bb58d,
+       0x430cb720,
+       0x73adb586,
+       0x430cb720,
+       0x732db586,
+       0x430cb720,
+       0x72adb586,
+       0x430cb720,
+       0x74adb586,
+       0x430cb720,
+       0x742db586,
+       0x74c29c22,
+       0xc0019e98,
+       0xb78091a4,
+       0x0902430c,
+       0x0a60c0e0,
+       0xa101d208,
+       0x4314b720,
+       0x674bb78c,
+       0xc0017500,
+       0xb7269104,
+       0xb74d544d,
+       0xb7876153,
+       0xb766454d,
+       0xb7466ccd,
+       0xb76650cd,
+       0xc1015055,
+       0x02466523,
+       0x1244c101,
+       0x1126c101,
+       0xc0007104,
+       0x9e4c925c,
+       0x0a60c0e0,
+       0xa002d208,
+       0x9160c000,
+       0xc00074c0,
+       0xf0109104,
+       0xb720aa61,
+       0xb58d430c,
+       0xb78048ab,
+       0xc0e0430c,
+       0xd2080a60,
+       0x9c22a801,
+       0x8420a61d,
+       0xa1199e57,
+       0x9e4a9e9f,
+       0xcc120d02,
+       0xd0317286,
+       0xaa1966be,
+       0x7540d001,
+       0x020b134e,
+       0x4828b334,
+       0xc0007580,
+       0x9ea3935c,
+       0xff94018d,
+       0xaa199a22,
+       0xc2009e86,
+       0x71885a0b,
+       0x931ac000,
+       0x5990d3a4,
+       0x01fec101,
+       0xff940d02,
+       0xc1019a14,
+       0xd024600d,
+       0xc0005b13,
+       0xb7209160,
+       0x0d02430c,
+       0x4badb726,
+       0xff941194,
+       0x9e869a06,
+       0x77400e82,
+       0x913ac000,
+       0xc0007740,
+       0xcfff90e4,
+       0xc000757e,
+       0x676f9074,
+       0xb79f9e70,
+       0xb7bf7dee,
+       0xb7df7e6e,
+       0xb7ff7eee,
+       0xc0027f6e,
+       0x9c228c20,
+       0xb720a61d,
+       0x0d02430c,
+       0x4badb766,
+       0x44b5b767,
+       0x59b3b7cc,
+       0x612bb7ad,
+       0x702db7e6,
+       0x72b5b7e6,
+       0x99dbff94,
+       0x430cb720,
+       0xb7860301,
+       0xb70763ad,
+       0x7504452d,
+       0x9264c001,
+       0x44adb787,
+       0xd0207540,
+       0xc00012c0,
+       0xb7669282,
+       0x018b73b5,
+       0xff940d02,
+       0xb72099c4,
+       0x0a02430c,
+       0x4badb726,
+       0x6003109a,
+       0x1451d110,
+       0x7100c812,
+       0xb7209e95,
+       0xb786430c,
+       0x750264ad,
+       0x91b4c000,
+       0xc00077ba,
+       0x9ea99152,
+       0x48adb747,
+       0x4003ba09,
+       0xc001058b,
+       0xb76690c0,
+       0x058b4bad,
+       0xc0010d02,
+       0xb7879120,
+       0x754043ad,
+       0x11c0d020,
+       0x9142c000,
+       0x4badb786,
+       0x49adb747,
+       0x6245124a,
+       0x15b8c101,
+       0x64adb786,
+       0xc0007502,
+       0xb78d90f2,
+       0x7500482b,
+       0x91a2c000,
+       0xb7479ea9,
+       0xba09492d,
+       0x018f4003,
+       0xfff4050f,
+       0xc0009b45,
+       0xb7669100,
+       0x9ea24bad,
+       0xff9411ba,
+       0x0a029976,
+       0x7100d012,
+       0x000c006c,
+       0x7008c010,
+       0x7e6eb79f,
+       0x7eeeb7bf,
+       0x7f6eb7df,
+       0x7feeb7ff,
+       0x8c00c002,
+       0xf8399c22,
+       0xb740a205,
+       0xd0105c8c,
+       0x02440624,
+       0xaa1ddbc8,
+       0x9e5b0107,
+       0x70886a0c,
+       0x4834b320,
+       0x91b4c001,
+       0xc00076c0,
+       0xb760927c,
+       0xc18040d5,
+       0x0d025a07,
+       0x61a7d132,
+       0xc1015d99,
+       0xff9405b8,
+       0x582b9944,
+       0x4002ba00,
+       0x90c0c000,
+       0x0e22d011,
+       0x4002ba04,
+       0x430cb740,
+       0xc0e20205,
+       0xd2080a74,
+       0x7008aa01,
+       0x443ab340,
+       0x913ac000,
+       0xc0e20205,
+       0xd2080a70,
+       0xc012aa01,
+       0xf9f87008,
+       0x9c22aa1d,
+       0xa205f839,
+       0x430cb720,
+       0x63adb786,
+       0xc0007504,
+       0xc0e490c4,
+       0xc00008f0,
+       0xc0e69080,
+       0xb78008b0,
+       0xdffc43ab,
+       0xc0007d3e,
+       0x9e5090a4,
+       0x90a0c000,
+       0xfff49e89,
+       0xb7209ba8,
+       0xb78d430c,
+       0x75024bab,
+       0x91c4c000,
+       0xc0c80203,
+       0xd2080a50,
+       0x7500aa01,
+       0x90c4c000,
+       0x0a04d011,
+       0x4002ba04,
+       0xc0d20203,
+       0xd2080a40,
+       0x7502aa01,
+       0x90c4c000,
+       0x0a02d011,
+       0x4002ba04,
+       0x502bb74d,
+       0x0a28d011,
+       0xc0007008,
+       0xd01190fa,
+       0x70081a28,
+       0x9096c000,
+       0x4002ba04,
+       0xc0e20203,
+       0xd2080a6c,
+       0x097ba902,
+       0xc1010183,
+       0xba241204,
+       0xd0124002,
+       0x09107104,
+       0x7104d010,
+       0x09f4c0e2,
+       0x0528c101,
+       0xa961d008,
+       0xba009e50,
+       0x70044002,
+       0x443ab320,
+       0x913ac000,
+       0xc0e20203,
+       0xd2080a70,
+       0xc012aa01,
+       0xf9f87008,
+       0x9c22aa1d,
+       0x76c0a61d,
+       0x430cb720,
+       0x9264c000,
+       0x63abb74d,
+       0x5fabb78d,
+       0xb7a69e8d,
+       0xb7666f2d,
+       0xb72d6ead,
+       0xd0205f33,
+       0xc0e60128,
+       0xc0000eb0,
+       0x9e8d91a0,
+       0x63b3b74d,
+       0x712db7a6,
+       0x722db766,
+       0x6333b72d,
+       0x0ef0c0e4,
+       0x7680c008,
+       0x92bcc000,
+       0x5e1bf122,
+       0x90ccc000,
+       0x0a02c002,
+       0x90e0c000,
+       0x7100d002,
+       0xba240a04,
+       0x9ea34000,
+       0x52b3c200,
+       0x554f54af,
+       0x768051f3,
+       0x93a2c002,
+       0x468cb780,
+       0x0524d010,
+       0xc8409e51,
+       0xb780ab46,
+       0xda10470c,
+       0xc100a931,
+       0xc0405d87,
+       0xd131aba5,
+       0x09046667,
+       0xda109e53,
+       0xc200a131,
+       0x05b2531f,
+       0xff940d02,
+       0xc00c985e,
+       0x9e877588,
+       0xa935da10,
+       0x937cc001,
+       0x4002ba12,
+       0x12440a6e,
+       0x65ebc101,
+       0x02899eba,
+       0x4002ba2d,
+       0xc07e55eb,
+       0xcc100d7e,
+       0x9eaa72c4,
+       0x5a07c300,
+       0xc10155e8,
+       0x018d05b8,
+       0xff940d02,
+       0x9e83983e,
+       0xaa21f210,
+       0xa9b1da10,
+       0xc10165bf,
+       0xf21005b8,
+       0xba1ba1a2,
+       0x0d024002,
+       0x982fff94,
+       0xf210755e,
+       0xd04da025,
+       0xd01a1a50,
+       0xc0005213,
+       0x0a4290ba,
+       0x5210124a,
+       0xa225f210,
+       0xda100a06,
+       0xb79fa23d,
+       0xb7bf7e6e,
+       0xb7df7eee,
+       0xb7ff7f6e,
+       0xc0027fee,
+       0x9c228c00,
+       0x76c2a605,
+       0x91e4c001,
+       0x430cb720,
+       0x63adb786,
+       0xd0227504,
+       0xfff415b6,
+       0xb7209b53,
+       0xb74d430c,
+       0xb786612b,
+       0x70884bad,
+       0x93a2c000,
+       0x702db7a6,
+       0x9a0efff4,
+       0x430cb780,
+       0x018b9e83,
+       0xc0c80109,
+       0xd0080928,
+       0xc0e2a941,
+       0x9e920a6c,
+       0xa101d208,
+       0xfff40916,
+       0xb7809ac5,
+       0xc0c8430c,
+       0xd2080a28,
+       0xb780a001,
+       0xc0c8430c,
+       0xd2080a28,
+       0xb79fa801,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa6059c22,
+       0x4314b720,
+       0x05839e5b,
+       0x0de8c0e0,
+       0xa961d010,
+       0x4555b747,
+       0x6ccdb786,
+       0xd1107480,
+       0xc0000529,
+       0xb7869102,
+       0x02484dcd,
+       0xc00110c4,
+       0xb7809060,
+       0xc101440c,
+       0xb5400528,
+       0xb7864414,
+       0x7299504d,
+       0x91b8c000,
+       0xd0100a06,
+       0xb720a261,
+       0xb726430c,
+       0x00924dad,
+       0xc0001094,
+       0xb78d91a0,
+       0xb746484b,
+       0x0a084dcd,
+       0x729360c5,
+       0x9216c000,
+       0x1094c101,
+       0xc0007440,
+       0xd071917c,
+       0xc2000a1e,
+       0xf0085a17,
+       0x0a06a265,
+       0x90a0c000,
+       0xf0080a02,
+       0xd808a265,
+       0xb7a0a265,
+       0x0d02430c,
+       0xb78d008b,
+       0xb76d63ab,
+       0xb7475fab,
+       0x01b8482d,
+       0x5985d1a4,
+       0x05b4c101,
+       0x9b7bff74,
+       0xb50c008b,
+       0xb720692b,
+       0xb78c430c,
+       0xc0c8692b,
+       0xb58008a8,
+       0xb7204029,
+       0xb787430c,
+       0xb587442d,
+       0xb72043ad,
+       0xb786430c,
+       0x750463ad,
+       0x9024c001,
+       0x64adb786,
+       0xc0007502,
+       0xb7879284,
+       0x09964a2d,
+       0xc2000d02,
+       0xb5875a0b,
+       0xb7a04aad,
+       0x008b430c,
+       0x7c35b766,
+       0x9b4fff74,
+       0xb506008b,
+       0xb7207c2d,
+       0xb786430c,
+       0xb58772ad,
+       0xc00148ad,
+       0xb7869040,
+       0xb587732d,
+       0xb7204aad,
+       0xb786430c,
+       0xb58772ad,
+       0xb720492d,
+       0xb787430c,
+       0xb58643ad,
+       0xb7207c2d,
+       0xb78d430c,
+       0xb74c50ab,
+       0x0244692b,
+       0x50abb58d,
+       0x430cb720,
+       0x482bb78d,
+       0xb58d0a04,
+       0xb79f482b,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0x9e9a9c22,
+       0xd1220906,
+       0x52445c87,
+       0x72d91a04,
+       0x933cc000,
+       0x1a32d011,
+       0x19045250,
+       0x9160c000,
+       0xc0007917,
+       0xd11090c2,
+       0xc0001627,
+       0xc2009360,
+       0xba1a5a07,
+       0x70c24002,
+       0xffff0904,
+       0x08029278,
+       0xd0119c22,
+       0x75001a12,
+       0xc8100d02,
+       0x51509c83,
+       0x4818b323,
+       0x9160c000,
+       0xc0007897,
+       0x121890e2,
+       0xba000009,
+       0x9c224002,
+       0x9e545907,
+       0xba240d04,
+       0xffff4002,
+       0x08069261,
+       0xa6059c22,
+       0x430cb7a0,
+       0x09020687,
+       0xb9609eaa,
+       0xc0c44258,
+       0x9e690d70,
+       0xc0209e93,
+       0x0904aa25,
+       0xa249c030,
+       0x9321ffff,
+       0xc0020d82,
+       0xfff40982,
+       0x74009bae,
+       0x0a02010b,
+       0x0a42d002,
+       0x0954c0c8,
+       0xa241d008,
+       0x430cb7a0,
+       0x008b09ba,
+       0x4bb5b766,
+       0x9b9dfff4,
+       0xb50e008b,
+       0xb72059ab,
+       0x0902430c,
+       0x59abb78e,
+       0x5dabb58e,
+       0x430cb720,
+       0x0a06c001,
+       0x5aabb54e,
+       0x430cb720,
+       0x5eabb54e,
+       0x430cb720,
+       0x4c2db587,
+       0x430cb720,
+       0x4dadb786,
+       0x6d2db586,
+       0xb7809e69,
+       0xb7205729,
+       0xb58d430c,
+       0xb79f48ab,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0x0a029c22,
+       0xa261d810,
+       0x430cb720,
+       0x622bb78c,
+       0xb3407500,
+       0xb74648a4,
+       0xb7664dad,
+       0xb7464f2d,
+       0x02246cb5,
+       0xc1010244,
+       0xc20011b4,
+       0xb7465a07,
+       0xd0126d2d,
+       0xb7477104,
+       0xb74c45b5,
+       0x70c859ab,
+       0x1124c101,
+       0xc0001904,
+       0x0a0690b6,
+       0xa261d810,
+       0x430cb720,
+       0x5f35b746,
+       0xc0007680,
+       0x748691e2,
+       0x919ac000,
+       0x4dadb786,
+       0x02466229,
+       0xc0007115,
+       0x0a0690b6,
+       0xa261d810,
+       0x430cb720,
+       0x4dadb786,
+       0x6cadb746,
+       0x70880248,
+       0x1248d01c,
+       0x4459b423,
+       0xa6059c22,
+       0x430cb720,
+       0xb7870687,
+       0x1a04462d,
+       0x462db587,
+       0xa961d810,
+       0x430cb720,
+       0xc0007482,
+       0x0a029164,
+       0x43adb587,
+       0x430cb720,
+       0x4babb54d,
+       0x9160c000,
+       0xb58d0a02,
+       0xb7204bab,
+       0xb787430c,
+       0xb58745ad,
+       0xb72046ad,
+       0x9e8b430c,
+       0x4db5b746,
+       0x0de4c0e0,
+       0xa9e1d010,
+       0xc00074c0,
+       0x058590a2,
+       0x9280c000,
+       0x67adb784,
+       0x502db746,
+       0x6629d131,
+       0xb3337104,
+       0xc0004458,
+       0x0a069138,
+       0xa261d010,
+       0x430cb720,
+       0x4db5b766,
+       0x430cb720,
+       0x0d02091e,
+       0x6cadb766,
+       0x452db787,
+       0xc1010246,
+       0xb5861246,
+       0xb7206cad,
+       0xb786430c,
+       0xb76775ad,
+       0x1246452d,
+       0x75adb586,
+       0x430cb720,
+       0x4db5b726,
+       0x452db787,
+       0x5dafb763,
+       0x1419d110,
+       0x587fd024,
+       0x01b0e000,
+       0xd00305b0,
+       0xb5630db2,
+       0xb7205daf,
+       0xb787430c,
+       0xb726452d,
+       0xb7634db5,
+       0xd1105caf,
+       0xd0241419,
+       0xe000587f,
+       0x05b001b0,
+       0x0db2d003,
+       0x5cafb563,
+       0x430cb7a0,
+       0xb763008b,
+       0xc1b45caf,
+       0xd0229890,
+       0x01015e74,
+       0x3144590d,
+       0x597fd124,
+       0xb543008b,
+       0xb7205d2f,
+       0xb786430c,
+       0xb74763ad,
+       0x75044535,
+       0x9344c000,
+       0x5f35b546,
+       0x430cb720,
+       0xb7860d02,
+       0xb5866cad,
+       0xb7a0752d,
+       0x008b430c,
+       0x59abb76c,
+       0x6cb5b766,
+       0xff741984,
+       0x008b999a,
+       0x4b2db507,
+       0x9180c000,
+       0x6d2db746,
+       0x02440224,
+       0x0244c101,
+       0x5a09c200,
+       0x6d2db586,
+       0xfff4058b,
+       0xb7209afc,
+       0x0a02430c,
+       0x452db587,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0xb7a0a60d,
+       0x0687430c,
+       0x03070d86,
+       0x9964fff4,
+       0xb506008b,
+       0xb7606e2d,
+       0x09864314,
+       0x0dc0c0d6,
+       0x9af3ffd4,
+       0x430cb720,
+       0x4535b5a7,
+       0xaa41da08,
+       0xc0007500,
+       0x9eb390a4,
+       0x998bfff4,
+       0x4314b700,
+       0xc0d09e44,
+       0xd2080a50,
+       0x7502aa01,
+       0x9044c002,
+       0x6354b746,
+       0x4dd4b726,
+       0x59cab74c,
+       0x4dd4b546,
+       0x430cb720,
+       0x4852b76d,
+       0xb7661522,
+       0xb78c632d,
+       0x190459ab,
+       0x1126c101,
+       0xc1016247,
+       0xb5866125,
+       0xb720532d,
+       0xb786430c,
+       0x024475ad,
+       0x75adb586,
+       0x430cb7a0,
+       0xb76c008b,
+       0xb766592b,
+       0x59884db5,
+       0x983ac1b4,
+       0xb506008b,
+       0xb7a04e2d,
+       0x008b430c,
+       0x4e35b766,
+       0x4c2db766,
+       0x9829c1b4,
+       0xb506008b,
+       0xb780542d,
+       0x0902430c,
+       0x0a50c0d0,
+       0xa101d208,
+       0xb79f9eb3,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0x90e0fff6,
+       0x6e3bd331,
+       0xd2249e5a,
+       0xd0115921,
+       0x72991a26,
+       0x90bcc000,
+       0xba129ea2,
+       0xd0114003,
+       0x0d8a09a6,
+       0xc8120124,
+       0x70867286,
+       0x9096c000,
+       0x4002ba13,
+       0xd0100a7e,
+       0xb7407088,
+       0xc0e2430c,
+       0xd0080974,
+       0xb780a241,
+       0xc0e2430c,
+       0xd2080a70,
+       0x9c22a102,
+       0xb720a60d,
+       0x76c2430c,
+       0x45adb787,
+       0xb5870a04,
+       0xb72045ad,
+       0xb566430c,
+       0xc00a63b5,
+       0xb7209364,
+       0x0d02430c,
+       0xb7860a82,
+       0xb747752d,
+       0xb7674b2d,
+       0xb76745b5,
+       0x124446ad,
+       0x752db586,
+       0x4314b720,
+       0x1737d110,
+       0x4ab5b7a7,
+       0x464db767,
+       0x75d5b766,
+       0x98b9ff74,
+       0x430cb720,
+       0x6cadb746,
+       0x7535b746,
+       0x4dadb786,
+       0x1124c101,
+       0x12445907,
+       0x7148d012,
+       0x08040008,
+       0xb5075807,
+       0xb72044ad,
+       0xb787430c,
+       0xb74644ad,
+       0xd0127b2d,
+       0xb5877104,
+       0xb72044ad,
+       0xb747430c,
+       0xb78644ad,
+       0xc8107a2d,
+       0x75827088,
+       0x44adb547,
+       0x93dcc000,
+       0x430cb720,
+       0x058b9eaa,
+       0x4badb766,
+       0x9887ff74,
+       0x430cb720,
+       0x02030936,
+       0x0a54c0c8,
+       0xa902d208,
+       0x4badb726,
+       0xc1011d04,
+       0x02401264,
+       0x7104d010,
+       0x0244c101,
+       0x62c2d032,
+       0x430cb720,
+       0x44adb787,
+       0x124ac101,
+       0x43adb587,
+       0x430cb720,
+       0x4a2db787,
+       0x43adb747,
+       0x5a1bc200,
+       0xc0007088,
+       0xb5879096,
+       0xb72043ad,
+       0x9eaa430c,
+       0x4badb786,
+       0x5a05c200,
+       0x0659d110,
+       0x49adb587,
+       0x430cb7a0,
+       0xb767008b,
+       0xb76649b5,
+       0xff744bad,
+       0x008b984a,
+       0x49adb507,
+       0x430cb720,
+       0x43adb787,
+       0x0659d110,
+       0x44adb587,
+       0x430cb720,
+       0x64adb786,
+       0xc0007502,
+       0xb78d90f2,
+       0x7500482b,
+       0x92a2c001,
+       0x4b2bb74d,
+       0x692bb70c,
+       0xd0027480,
+       0xc0010a02,
+       0xb7869264,
+       0xcffe7c2d,
+       0x7500287c,
+       0x919cc000,
+       0x43adb767,
+       0x9e926209,
+       0x5987d1a4,
+       0x01c7d120,
+       0x9819ff74,
+       0x430cb720,
+       0x6933b74c,
+       0x1204c101,
+       0x7100d014,
+       0xc0007504,
+       0xb50c90da,
+       0xc000692b,
+       0x729192a0,
+       0x0a7acffe,
+       0xb324090a,
+       0xc101443c,
+       0xc0000244,
+       0xb74c9120,
+       0xb78c692b,
+       0x024469ab,
+       0x5a07c200,
+       0x692bb58c,
+       0x430cb720,
+       0x4b2bb78d,
+       0xc0007500,
+       0xb78c9204,
+       0x753e692b,
+       0x90b4c000,
+       0xc0000a7e,
+       0x750090c0,
+       0x90a4c000,
+       0xb58c0a04,
+       0xb720692b,
+       0xb786430c,
+       0x750264ad,
+       0x90f2c000,
+       0x482bb78d,
+       0xc0007500,
+       0xb78d91e2,
+       0x75004b2b,
+       0x92e4c000,
+       0x6933b76c,
+       0x2dfcc00e,
+       0x9ac2fff4,
+       0x91e0c000,
+       0xc0e20103,
+       0x0a0a0970,
+       0xa241d008,
+       0x430cb780,
+       0xc0e2097e,
+       0xd2080a74,
+       0xb720a101,
+       0xb78e430c,
+       0x75024e2b,
+       0x91e4c000,
+       0xc0c80203,
+       0xd2080a50,
+       0x7500aa01,
+       0x90e4c000,
+       0x692bb78c,
+       0xb58c0a08,
+       0xb720692b,
+       0xb78c430c,
+       0xc0c8692b,
+       0x0a0408a8,
+       0x4029b580,
+       0x430cb740,
+       0x02059e92,
+       0x0d28c0c8,
+       0x0a74c0e2,
+       0xaa01d208,
+       0xa9c1d010,
+       0xc00070c8,
+       0x02059152,
+       0x0a70c0e2,
+       0xaa01d208,
+       0xc00070c8,
+       0xd0109088,
+       0xb740a241,
+       0x0205430c,
+       0x0a28c0c8,
+       0xaa01d208,
+       0x096cc0e2,
+       0xa241d008,
+       0x430cb720,
+       0xb5870a02,
+       0xb7204bad,
+       0xb58e430c,
+       0xb720592b,
+       0xb58e430c,
+       0xb7205a2b,
+       0xb587430c,
+       0xb7204dad,
+       0xb58e430c,
+       0xb7205d2b,
+       0xb58e430c,
+       0xb7205e2b,
+       0xb587430c,
+       0xb720452d,
+       0xb587430c,
+       0xb720442d,
+       0xb587430c,
+       0xb720482d,
+       0x0203430c,
+       0x0a6cc0e2,
+       0xaa01d208,
+       0x502bb58d,
+       0x430cb720,
+       0xc0c80203,
+       0xd2080a28,
+       0xb58daa01,
+       0xb79f48ab,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0xa6059c22,
+       0x430cb720,
+       0xb7860d02,
+       0x0a0464ad,
+       0x64adb586,
+       0x430cb720,
+       0x45b5b547,
+       0x430cb720,
+       0x59abb78c,
+       0x462db587,
+       0x430cb720,
+       0x4e33b54e,
+       0x430cb780,
+       0x59abb76c,
+       0x0a40c0d2,
+       0xa102d208,
+       0x430cb720,
+       0x64adb786,
+       0xc0007502,
+       0xb5469184,
+       0xb72075b5,
+       0xb78c430c,
+       0xb58d69ab,
+       0xc00050ab,
+       0xb7869120,
+       0xb746502d,
+       0x12446cad,
+       0x75adb586,
+       0x430cb720,
+       0x75adb746,
+       0x4dadb786,
+       0xd1240144,
+       0xb543597f,
+       0xb7205daf,
+       0xb746430c,
+       0xb78675ad,
+       0x014450ad,
+       0x597fd124,
+       0x5cafb543,
+       0x430cb720,
+       0x5cafb743,
+       0x5d2fb543,
+       0x430cb720,
+       0x75adb786,
+       0x532db746,
+       0xb5860244,
+       0xb72075ad,
+       0xb786430c,
+       0xb746532d,
+       0xc20075ad,
+       0x70885a07,
+       0x93f6c000,
+       0xc0d20203,
+       0x0d060a40,
+       0xa102d208,
+       0x430cb720,
+       0x532db786,
+       0x75adb746,
+       0xc2006a16,
+       0x70885a13,
+       0x91b6c000,
+       0x4e33b54e,
+       0x430cb720,
+       0x532db786,
+       0xc2006a16,
+       0xb5865a13,
+       0xb7a075ad,
+       0x0990430c,
+       0x9ea80d02,
+       0x75d4b766,
+       0x9aafff54,
+       0xb507008b,
+       0xb7204a2d,
+       0xb787430c,
+       0x6a164a2d,
+       0x44adb587,
+       0x430cb720,
+       0x75adb786,
+       0xc0007500,
+       0x0a0290b6,
+       0x44adb587,
+       0x430cb7a0,
+       0x094ec002,
+       0x9ea80d02,
+       0x4eccb766,
+       0x59ffd1a4,
+       0x995fc194,
+       0xb767008b,
+       0xd02244ad,
+       0xc0005e64,
+       0x30c2589d,
+       0xc00070c2,
+       0x9ea890bc,
+       0x44ccb527,
+       0x430cb720,
+       0x44adb787,
+       0x7b2db746,
+       0x7104d012,
+       0x44adb587,
+       0x430cb720,
+       0x44adb787,
+       0x7a2db746,
+       0x7104d010,
+       0x44adb587,
+       0x430cb720,
+       0x44adb787,
+       0x43adb587,
+       0x430cb7a0,
+       0xb76d008b,
+       0x74c0482b,
+       0x9142c000,
+       0x50b3b76d,
+       0xff540d02,
+       0x9ea89a5a,
+       0x50cab50d,
+       0x430cb720,
+       0x64adb786,
+       0xc0007502,
+       0x018393b4,
+       0x09d0c0c8,
+       0xa962d008,
+       0xc0007680,
+       0xb78d92a2,
+       0x753050ab,
+       0x9212c000,
+       0x532db786,
+       0x75adb746,
+       0xc2006a1e,
+       0x70885a0f,
+       0x90dcc000,
+       0x1e22d011,
+       0xa261d008,
+       0x430cb720,
+       0x692bb78c,
+       0xd0097506,
+       0xd3e91a44,
+       0xc0002ace,
+       0x0a8a9072,
+       0x64adb786,
+       0xc0007502,
+       0x757a9194,
+       0xb3540a72,
+       0x9ea34426,
+       0xfff40289,
+       0xc0009913,
+       0x010391e0,
+       0x0970c0e2,
+       0xd0080a0a,
+       0xb780a241,
+       0x097e430c,
+       0x0a74c0e2,
+       0xa101d208,
+       0x430cb720,
+       0x4e2bb78e,
+       0xc0007502,
+       0x020391c4,
+       0x0a50c0c8,
+       0xaa01d208,
+       0xd0017500,
+       0xd3e10a54,
+       0xc000294e,
+       0x010b9062,
+       0xc0d20203,
+       0xd2080a40,
+       0x7502aa01,
+       0x0a24d001,
+       0x294ed3e1,
+       0xc0e20203,
+       0xd2080a74,
+       0x7097a982,
+       0x4832b332,
+       0x91f2c000,
+       0xc0e20203,
+       0xd2080a70,
+       0x9e92a981,
+       0x2a3ed3f1,
+       0xb3327088,
+       0xd3f14446,
+       0xb78c2d2e,
+       0xd020692b,
+       0x76bd1128,
+       0x1a44d00c,
+       0x90d8c000,
+       0xc0007684,
+       0x0a0890bc,
+       0x294ed3f1,
+       0xc0007097,
+       0x020391f2,
+       0x0a70c0e2,
+       0xa981d208,
+       0xd3f19e92,
+       0x70882a3e,
+       0x4446b332,
+       0x2daed3f2,
+       0xc0e20203,
+       0xd2080a6c,
+       0xb780a182,
+       0x0902430c,
+       0x0a28c0c8,
+       0xa182d208,
+       0x430cb720,
+       0x482bb54d,
+       0x430cb720,
+       0x50abb54d,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0xa205f839,
+       0x430cb720,
+       0xb56d76c2,
+       0xc0004b2b,
+       0xb72091f2,
+       0x0982430c,
+       0xb72c9e9a,
+       0xd01259ab,
+       0xfff41992,
+       0x0d8a9a52,
+       0x90c0c000,
+       0xc00076c4,
+       0x0d8690a4,
+       0x98a2fff4,
+       0x4314b760,
+       0x0dc0c0d6,
+       0x9a9dffb4,
+       0x430cb700,
+       0x6e2cb706,
+       0xaa1df9f8,
+       0xa60d9c22,
+       0x4314b740,
+       0x09769e5e,
+       0x0d38c0c8,
+       0xaa41d010,
+       0x7104d010,
+       0xa241d010,
+       0x430cb720,
+       0xd0110a02,
+       0xb5860932,
+       0xb72057ad,
+       0xd011430c,
+       0x61290a62,
+       0x76adb546,
+       0x430cb720,
+       0x692db786,
+       0x5c2db586,
+       0x430cb720,
+       0x5a2bb56c,
+       0x430cb720,
+       0x64adb786,
+       0xc0007500,
+       0xb78690e2,
+       0xb7466cad,
+       0x1244502d,
+       0x58adb586,
+       0x430cb720,
+       0x75adb786,
+       0x50adb746,
+       0xd1240128,
+       0xb543597f,
+       0xb7205caf,
+       0xb786430c,
+       0xc20064ad,
+       0x749c5908,
+       0x90f2c000,
+       0xc0ca0103,
+       0xc000092c,
+       0x02489260,
+       0xc000751c,
+       0x01039112,
+       0x092cc0ca,
+       0xc0000a0e,
+       0xc00491a0,
+       0x01037498,
+       0x092cc0ca,
+       0x90b2c000,
+       0xc0000a0a,
+       0x0a069060,
+       0xa241d008,
+       0x430cb720,
+       0x4eb5b766,
+       0xc0ca0203,
+       0xd2080a2c,
+       0xc101a902,
+       0xb7661207,
+       0xd13158ad,
+       0xc1806629,
+       0x70885910,
+       0x91f6c000,
+       0xc0ca0203,
+       0xd2080a30,
+       0x7500aa01,
+       0x90e4c000,
+       0x772bb78c,
+       0xc0000a04,
+       0xd0319280,
+       0xc1806526,
+       0x71045a0c,
+       0x931cc000,
+       0xc0ca0203,
+       0xd2080a30,
+       0x7500aa01,
+       0x9204c000,
+       0x772bb78c,
+       0xb58c1a04,
+       0xb780772b,
+       0x0906430c,
+       0x0a30c0ca,
+       0xa101d208,
+       0x9100c000,
+       0xc0ca0103,
+       0x0a020930,
+       0xa241d008,
+       0x430cb720,
+       0x772bb78c,
+       0x4002ba24,
+       0x752ac004,
+       0x90dac000,
+       0x0a5ac002,
+       0x9100c000,
+       0x7502c008,
+       0x90dcc000,
+       0x0a06c004,
+       0x772bb58c,
+       0x430cb720,
+       0xb78c0902,
+       0xb546772b,
+       0xb74675ad,
+       0xb7204dad,
+       0xba244314,
+       0xb7264002,
+       0x624576ad,
+       0x7ecbb74d,
+       0x74826243,
+       0x0a00c002,
+       0x5999c200,
+       0x9184c000,
+       0x75cdb746,
+       0x58cdb786,
+       0xd2187480,
+       0x12285a07,
+       0x93e0c000,
+       0x58d5b746,
+       0x4ecdb786,
+       0x5d10d122,
+       0x70881209,
+       0x90b8c000,
+       0xc0007680,
+       0xd010921c,
+       0xb7460624,
+       0xc10175cd,
+       0xc2000244,
+       0x11285a13,
+       0xb5460126,
+       0xc00075cd,
+       0xb78690e0,
+       0x024675cd,
+       0x75cdb586,
+       0x430cb720,
+       0x762db5c6,
+       0x430cb720,
+       0x64adb786,
+       0xc000751c,
+       0x0a0490b2,
+       0x64adb586,
+       0x430cb720,
+       0x64adb786,
+       0xc0007502,
+       0x02039224,
+       0x0a28c0c8,
+       0xaa01d208,
+       0x69abb58c,
+       0x430cb720,
+       0x69abb78c,
+       0x4f2bb58d,
+       0x9300c009,
+       0x4eabb78d,
+       0xc0007500,
+       0xb78d9184,
+       0x75007eab,
+       0x9142c000,
+       0x512bb78d,
+       0xc0007504,
+       0x0a0690b4,
+       0x9060c000,
+       0xb58d0a02,
+       0xb7204d2b,
+       0x0e82430c,
+       0x652db746,
+       0x482bb76d,
+       0xc0c80203,
+       0x11b40a3c,
+       0xa902d208,
+       0x5eadb726,
+       0x5987d1a4,
+       0xc1010524,
+       0x55eb05b2,
+       0x9825ff54,
+       0x430cb720,
+       0x5eb5b5a6,
+       0x430cb720,
+       0x5cb5b746,
+       0x64adb786,
+       0x1944d011,
+       0x6125c101,
+       0xc2001a04,
+       0x02445a05,
+       0xb5860240,
+       0xb7a05cad,
+       0x020b430c,
+       0x0a3cc0c8,
+       0xaa01d208,
+       0xb766008b,
+       0xb7665cb5,
+       0x9ea264ad,
+       0x55eb1984,
+       0x9bffff34,
+       0xb5069ea9,
+       0xb7205ccd,
+       0xb78d430c,
+       0x75004eab,
+       0x9122c001,
+       0x4fabb74d,
+       0xc0007480,
+       0xb76d90e2,
+       0x74c0512b,
+       0x90c4c000,
+       0x48abb78d,
+       0x92e0c000,
+       0x5a05c180,
+       0xb58c0228,
+       0xb7a0692b,
+       0x050b430c,
+       0xb76c008b,
+       0xff346933,
+       0x9ea99bda,
+       0x694bb50c,
+       0x430cb720,
+       0x692bb78c,
+       0xb58c1a04,
+       0xc000692b,
+       0xb76d92c0,
+       0xb74e482b,
+       0x9ea2402b,
+       0x5a05c180,
+       0xb58c0244,
+       0xb7a0692b,
+       0x008b430c,
+       0x6933b76c,
+       0x9bbdff34,
+       0xb50c9ea9,
+       0xb720694b,
+       0xb786430c,
+       0x750464ad,
+       0x9094c001,
+       0x6933b74c,
+       0x4f2bb74d,
+       0x0e24d011,
+       0xc0007088,
+       0xb76c913a,
+       0xd0116d2b,
+       0x70c81a24,
+       0x90d6c000,
+       0x1e22d011,
+       0x91c0c000,
+       0x1e24d011,
+       0xc0007088,
+       0xd01190f8,
+       0x70c80a24,
+       0x90dcc000,
+       0x0e22d011,
+       0x692bb58c,
+       0x430cb720,
+       0x0a62d031,
+       0x5a13c200,
+       0x692bb74c,
+       0x0a027502,
+       0x0a42d00d,
+       0xb54c1128,
+       0xb720692b,
+       0xb74c430c,
+       0x7496692b,
+       0x929cc000,
+       0x6d33b74c,
+       0x1e24d011,
+       0xd00e7088,
+       0xc0000a22,
+       0xd011913c,
+       0x70880e24,
+       0x90dcc000,
+       0x1a22d011,
+       0x692bb58c,
+       0x430cb720,
+       0x64adb786,
+       0xc0007504,
+       0xb78c93b4,
+       0x752c642b,
+       0x9312c000,
+       0x6d33b74c,
+       0x50abb78d,
+       0x1d28d011,
+       0x4002ba24,
+       0xc0007104,
+       0xb74c91b6,
+       0xd011692b,
+       0x70881e24,
+       0x90dcc000,
+       0x1a24d011,
+       0x692bb58c,
+       0x430cb720,
+       0xc0c80203,
+       0xd2080a38,
+       0xb74caa01,
+       0xd010692b,
+       0xb58c7104,
+       0xb720692b,
+       0x0203430c,
+       0x0a34c0c8,
+       0xaa01d208,
+       0x692bb74c,
+       0x7104d012,
+       0x692bb58c,
+       0x430cb720,
+       0x692bb78c,
+       0x69abb58c,
+       0x430cb720,
+       0x69abb78c,
+       0x4f2bb58d,
+       0x430cb720,
+       0x692bb78c,
+       0x48abb58d,
+       0x430cb720,
+       0xb78c0902,
+       0xb58d69ab,
+       0xb72050ab,
+       0xb546430c,
+       0xb720652d,
+       0xb78c430c,
+       0xc0d25a2b,
+       0x0a0408c0,
+       0x4029b580,
+       0x430cb720,
+       0x69abb78c,
+       0x57abb58d,
+       0x430cb720,
+       0x69abb78c,
+       0x572bb58d,
+       0x430cb720,
+       0x7eabb54d,
+       0x430cb720,
+       0x4e2bb54d,
+       0x430cb720,
+       0x7e2bb54d,
+       0x430cb720,
+       0x4eabb54d,
+       0x430cb720,
+       0x402bb54e,
+       0x430cb720,
+       0x482bb54d,
+       0x430cb720,
+       0x4fabb54d,
+       0x430cb720,
+       0x512bb54d,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0xb720a605,
+       0xb566430c,
+       0xb72063b5,
+       0xb786430c,
+       0x750263ad,
+       0x9004c006,
+       0xb5460902,
+       0xb7206ead,
+       0xb786430c,
+       0xc00476ad,
+       0xc0037510,
+       0xb7669092,
+       0xb76658b5,
+       0x9e9257ad,
+       0xff3405b6,
+       0x0a229ab4,
+       0x7008c010,
+       0xcc121a40,
+       0xb7207008,
+       0xb78d430c,
+       0x7500482b,
+       0x92e2c000,
+       0x57adb786,
+       0x6aadb586,
+       0x430cb720,
+       0x4db5b746,
+       0x6aadb746,
+       0x02246d7e,
+       0x0a080244,
+       0xc1015d17,
+       0xc2000244,
+       0xb5865a0b,
+       0xb7206aad,
+       0xb746430c,
+       0xb74657ad,
+       0x02246ab5,
+       0xc2000244,
+       0x9e525a0b,
+       0x7104d012,
+       0x6aadb586,
+       0x430cb720,
+       0x4eabb78d,
+       0xc0007500,
+       0xb78d91c2,
+       0x75007eab,
+       0x9124c000,
+       0x6aadb786,
+       0xc2006a26,
+       0xb5865a0f,
+       0xb7206aad,
+       0xb746430c,
+       0x62356aad,
+       0x5a17c200,
+       0xb5461128,
+       0xb7206aad,
+       0xb786430c,
+       0xb7466aad,
+       0xd0107a2d,
+       0xb5867104,
+       0xc0006aad,
+       0xb7469280,
+       0xb786502d,
+       0x12446cad,
+       0x58adb586,
+       0x430cb720,
+       0x58adb786,
+       0x4dadb746,
+       0x5a17c200,
+       0xb5461128,
+       0xb7206aad,
+       0xb78c430c,
+       0x75005a2b,
+       0x9342c001,
+       0x77adb786,
+       0xc0007500,
+       0xb7669302,
+       0x74c0782d,
+       0x9262c000,
+       0x0d029ea3,
+       0x9a33ff34,
+       0x9e857420,
+       0x90b4c000,
+       0xc0000ec2,
+       0x74029120,
+       0x90d2c000,
+       0xc0000e8a,
+       0x0e969060,
+       0x430cb7a0,
+       0x008b0d02,
+       0x6ab5b766,
+       0x5a2bb76c,
+       0xd11065d7,
+       0xff3405d7,
+       0x008b9a18,
+       0x6aadb506,
+       0x430cb7a0,
+       0x0d029e6b,
+       0xb766008b,
+       0xff346ab5,
+       0x008b9a0c,
+       0x6b2db506,
+       0x430cb720,
+       0xb5860a02,
+       0xb7206fad,
+       0xb586430c,
+       0xb720702d,
+       0xb586430c,
+       0xb7206ead,
+       0xb586430c,
+       0xb720702d,
+       0xb586430c,
+       0xb7206fad,
+       0xb586430c,
+       0xb79f7d2d,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa6059c22,
+       0xaa61d810,
+       0x430cb720,
+       0xb58d0687,
+       0xb7204bab,
+       0xb786430c,
+       0xb74675ad,
+       0x12447d2d,
+       0x75adb586,
+       0x430cb720,
+       0xb7469e8b,
+       0xc0e04db5,
+       0xd0100de4,
+       0x74c0a9e1,
+       0x9284c000,
+       0x67adb784,
+       0x502db746,
+       0x6629d131,
+       0xb3327104,
+       0xc0004458,
+       0x0a069138,
+       0xa261d010,
+       0x430cb720,
+       0x4db5b746,
+       0x430cb720,
+       0x6cadb746,
+       0x7d2db786,
+       0xc1010244,
+       0xb5861244,
+       0xb7206cad,
+       0xb746430c,
+       0xb78658b5,
+       0xb7467d2d,
+       0xc1014dad,
+       0x12440244,
+       0x58adb586,
+       0x430cb720,
+       0x58adb786,
+       0x7500de01,
+       0x90d6c000,
+       0x0a02cf01,
+       0x58adb586,
+       0x430cb720,
+       0x0d02091e,
+       0x7d2db786,
+       0x4db5b726,
+       0x5cafb763,
+       0x1419d110,
+       0x587fd024,
+       0x01b0e000,
+       0xd00305b0,
+       0xb5630db2,
+       0xb7a05caf,
+       0x008b430c,
+       0x5cafb763,
+       0x984bc174,
+       0x5e74d022,
+       0x590d0101,
+       0xd1243144,
+       0x008b597f,
+       0x5d2fb543,
+       0x430cb720,
+       0x63adb786,
+       0xc0027504,
+       0xb7869124,
+       0xc00476ad,
+       0xc0017510,
+       0xb74693b2,
+       0x768075b5,
+       0x909cc001,
+       0x762db786,
+       0xc0c80103,
+       0xd008093c,
+       0xc200a941,
+       0xc1015a05,
+       0xc2000244,
+       0xb5865209,
+       0xb7a057ad,
+       0x020b430c,
+       0xc0c8008b,
+       0xb7660a3c,
+       0xb76657b5,
+       0xd208762d,
+       0xff34a902,
+       0x008b9942,
+       0x57adb506,
+       0x9100c000,
+       0x4dadb786,
+       0x5a0bc200,
+       0x57adb586,
+       0x430cb720,
+       0x4dadb786,
+       0x57adb746,
+       0x5a0bc200,
+       0x7088c812,
+       0x57adb546,
+       0x9300c001,
+       0x4dadb786,
+       0x57adb586,
+       0x9240c001,
+       0xb58d0a02,
+       0xb7204cab,
+       0xb746430c,
+       0x768263b5,
+       0x9024c001,
+       0x762db786,
+       0xb5861a04,
+       0xb720762d,
+       0xb74c430c,
+       0xb78659ab,
+       0x7104762d,
+       0x9094c000,
+       0x7635b546,
+       0x430cb720,
+       0x482bb78d,
+       0xb58d0a04,
+       0xb720482b,
+       0xb786430c,
+       0xb5867d2d,
+       0xc00077ad,
+       0x76809120,
+       0x90c4c000,
+       0x7d2db786,
+       0x782db586,
+       0x430cb720,
+       0x6cadb746,
+       0xc0007480,
+       0xb7869196,
+       0x024475ad,
+       0x75adb586,
+       0x430cb720,
+       0xb5860a02,
+       0xb7206cad,
+       0xb78c430c,
+       0x7500622b,
+       0x9184c001,
+       0x6cadb746,
+       0x4f2db786,
+       0xc0017088,
+       0x0203905c,
+       0x0a38c0c8,
+       0x48abb74d,
+       0xaa01d208,
+       0xc0007088,
+       0x0a069306,
+       0xa221da10,
+       0x430cb720,
+       0x762db786,
+       0xc0007500,
+       0x02039222,
+       0x0a38c0c8,
+       0x402bb74e,
+       0xaa01d208,
+       0xb58e0244,
+       0xc000402b,
+       0x0a0290a0,
+       0xa221da10,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0x430cb720,
+       0x63adb786,
+       0xc0087502,
+       0xb78d9284,
+       0x7500482b,
+       0x90e2c000,
+       0x4cb3b76d,
+       0xc00076c0,
+       0xb7869102,
+       0xb5866ead,
+       0xc0015b2d,
+       0xb74691c0,
+       0xb7664bb5,
+       0xd0106ead,
+       0xd0110624,
+       0xc101693b,
+       0x70880244,
+       0x9154c000,
+       0x5b2db786,
+       0x5908c180,
+       0x70886a16,
+       0x9132c000,
+       0x6e27d3f1,
+       0x5a21c200,
+       0xc00070c8,
+       0x0a069214,
+       0x7e2bb58d,
+       0x430cb720,
+       0x5a2bb78c,
+       0x08c0c0d2,
+       0xb5800a0c,
+       0xc0004029,
+       0xb56d9080,
+       0xb7207e33,
+       0xb786430c,
+       0xc00476ad,
+       0xc0047510,
+       0xb78693b2,
+       0x750264ad,
+       0x9364c000,
+       0x482bb74d,
+       0xc0007480,
+       0xb54d92c4,
+       0xb7204dab,
+       0xb786430c,
+       0xb5867d2d,
+       0xb720592d,
+       0xb786430c,
+       0xb5866ead,
+       0xb720572d,
+       0xb54d430c,
+       0xc0034e2b,
+       0xb76d93e0,
+       0xb7464e2b,
+       0x74c06eb5,
+       0x93e2c000,
+       0x572db746,
+       0x0624d010,
+       0x0244c101,
+       0xc2000244,
+       0xb5865a09,
+       0xb720572d,
+       0xb786430c,
+       0xb5867d2d,
+       0xb720592d,
+       0x0a02430c,
+       0x4e2bb58d,
+       0x430cb720,
+       0xb58d0a04,
+       0xc0024dab,
+       0xb7869360,
+       0xd0314bad,
+       0x6a266d25,
+       0xc0017088,
+       0xb78691f4,
+       0xb746592d,
+       0x01487d35,
+       0x05240128,
+       0xc0017295,
+       0x0d0690bc,
+       0x4e33b54d,
+       0x430cb720,
+       0x4eb3b54d,
+       0x430cb720,
+       0x4fabb56d,
+       0x430cb720,
+       0x512bb56d,
+       0x430cb720,
+       0x59abb78c,
+       0x482bb74d,
+       0xc2006a14,
+       0x70885a0f,
+       0x90dac000,
+       0x7eabb56d,
+       0x9140c001,
+       0x7eb3b54d,
+       0x90c0c001,
+       0xb58d0a02,
+       0xb7204e2b,
+       0xb78d430c,
+       0x75007e2b,
+       0x9384c000,
+       0x572db746,
+       0x6eb5b746,
+       0x02440224,
+       0x0244c101,
+       0x5a09c200,
+       0x572db586,
+       0x430cb720,
+       0x592db746,
+       0x7d35b746,
+       0x02440224,
+       0x0244c101,
+       0x5a0bc200,
+       0x592db586,
+       0x430cb720,
+       0x6eadb786,
+       0x5b2db586,
+       0x430cb720,
+       0x4eabb78d,
+       0xc0007500,
+       0xb78d9382,
+       0x75004e2b,
+       0x91e2c000,
+       0x7eabb78d,
+       0xc0007500,
+       0xb78c9144,
+       0x01035a2b,
+       0x0940c0d2,
+       0xc0000a0c,
+       0xb78c9100,
+       0x01035a2b,
+       0x0940c0d2,
+       0xd0080a08,
+       0xb720a241,
+       0xb78d430c,
+       0x7500482b,
+       0x48a4b340,
+       0x6fadb786,
+       0x5dadb586,
+       0x75049c22,
+       0x48a4b340,
+       0x7d2db766,
+       0x5a4be180,
+       0x90ccc000,
+       0x0d82c002,
+       0x9100c000,
+       0x7100d002,
+       0x9ea30a04,
+       0x4001ba1b,
+       0x69abb78c,
+       0xba24097e,
+       0xd0104002,
+       0x0c867104,
+       0xd0129e48,
+       0xba247100,
+       0x9e584002,
+       0x5a18c200,
+       0x64b5b746,
+       0xba245163,
+       0x62454002,
+       0xc1010936,
+       0x76841126,
+       0x518bc200,
+       0x9054c006,
+       0xb58d0a02,
+       0xb7204cab,
+       0xb78d430c,
+       0x75004d2b,
+       0x92c4c005,
+       0x582db746,
+       0x590cd1a4,
+       0x6a2bd031,
+       0xc0007299,
+       0xd01190f6,
+       0x72996a2b,
+       0x911ac005,
+       0x4cb3b52d,
+       0x430cb720,
+       0x582db746,
+       0x022470c4,
+       0x921cc002,
+       0xc00070c8,
+       0x023690d6,
+       0xc0017104,
+       0xb78c90ba,
+       0x0a18772b,
+       0x772bb58c,
+       0x430cb720,
+       0x76b5b746,
+       0x4dadb786,
+       0x75adb746,
+       0x6245c101,
+       0xc2000a20,
+       0x01285a11,
+       0x75adb546,
+       0x430cb780,
+       0xc0d2091a,
+       0xd2080a40,
+       0xb780a101,
+       0x190c430c,
+       0x0a28c0ca,
+       0x9240c003,
+       0x772bb78c,
+       0xb58c0a08,
+       0xb720772b,
+       0xb746430c,
+       0xb78676b5,
+       0xb7464dad,
+       0xc10175ad,
+       0x0a406245,
+       0x5a15c200,
+       0xb5460128,
+       0xb78075ad,
+       0x090e430c,
+       0x0a40c0d2,
+       0xa101d208,
+       0x430cb780,
+       0x0a28c0ca,
+       0xa082d208,
+       0x9200c002,
+       0xc00070c8,
+       0x023690d6,
+       0xc0017104,
+       0xb78c90ba,
+       0x1a08772b,
+       0x772bb58c,
+       0x430cb720,
+       0x76b5b746,
+       0x4dadb786,
+       0x75adb746,
+       0x6245c101,
+       0xc2000a40,
+       0x11285a15,
+       0x75adb546,
+       0x430cb780,
+       0xc0d2091a,
+       0xd2080a40,
+       0xb780a101,
+       0x1920430c,
+       0x0a28c0ca,
+       0x9080c001,
+       0x772bb78c,
+       0xb58c1a04,
+       0xb720772b,
+       0xb746430c,
+       0xb78676b5,
+       0xb7464dad,
+       0xc10175ad,
+       0xc0026245,
+       0xc2000a00,
+       0x11285a19,
+       0x75adb546,
+       0x430cb780,
+       0xc0d2090e,
+       0xd2080a40,
+       0xb780a101,
+       0x1910430c,
+       0x0a28c0ca,
+       0xa101d208,
+       0x430cb720,
+       0x582db566,
+       0x430cb720,
+       0x4cabb78d,
+       0x4eabb58d,
+       0xa60d9c22,
+       0x430cb720,
+       0xb7460307,
+       0x768463b5,
+       0x90c4c000,
+       0x69b3b74c,
+       0x9020c00a,
+       0xc0077682,
+       0xb78d9364,
+       0x7500482b,
+       0x9224c000,
+       0x4cabb78d,
+       0xc0007500,
+       0xb78c9184,
+       0xb74e69ab,
+       0x9ea2402b,
+       0xb58e0244,
+       0xc009402b,
+       0xb78d9140,
+       0x75004cab,
+       0x90c2c001,
+       0x01030203,
+       0x0a28c0ca,
+       0xaa01d208,
+       0x0928c0c8,
+       0xa942d008,
+       0x4000ba24,
+       0xc1010910,
+       0xd0080244,
+       0xd010a941,
+       0x01037104,
+       0x0934c0c8,
+       0xa941d008,
+       0x7104c812,
+       0x4babb78d,
+       0x4033b74e,
+       0xd0027500,
+       0x75000922,
+       0x9000c001,
+       0x4e2bb78d,
+       0xc0017500,
+       0x020392c2,
+       0x0a28c0c8,
+       0xaa01d208,
+       0xc0c80103,
+       0xd0080938,
+       0x0a04a941,
+       0x7104d010,
+       0xc0c80103,
+       0xd0080934,
+       0xc812a941,
+       0xb78d7104,
+       0xb74e4bab,
+       0x75004033,
+       0x0a28d002,
+       0x4422b324,
+       0x2a7ccffe,
+       0x0244c101,
+       0x402bb58e,
+       0x430cb720,
+       0xb78d9e92,
+       0x02284fab,
+       0x4fabb58d,
+       0x430cb720,
+       0x512bb78d,
+       0xb58d0a04,
+       0xc006512b,
+       0xb7869100,
+       0xb5865e2d,
+       0xb7a05d2d,
+       0x9e694314,
+       0x6aadb746,
+       0xc0007480,
+       0xb78d9316,
+       0x75007eab,
+       0x09e2d002,
+       0x9104c000,
+       0xc0d29e6c,
+       0xd2080a40,
+       0x01e8aa01,
+       0xc0c89e6c,
+       0xd2080a38,
+       0xcc10aa01,
+       0xc00170c8,
+       0x9e6990e0,
+       0x5d2db766,
+       0x4dadb786,
+       0x6935b746,
+       0xc20011a6,
+       0xcc125a0b,
+       0x9e6c70c8,
+       0xc0c89e6a,
+       0xd2080a3c,
+       0xc0d2aa01,
+       0xd0080940,
+       0x0a14aac1,
+       0x554c9ea3,
+       0x5987d1a4,
+       0xc15405b4,
+       0x581998dc,
+       0xc010026a,
+       0x12ea7008,
+       0x700acc12,
+       0xb78d9e69,
+       0x9e694bab,
+       0xb74e7500,
+       0xd002402b,
+       0x750009b2,
+       0x0a38d002,
+       0x4422b334,
+       0xcffe9e69,
+       0x02442a7c,
+       0x402bb58e,
+       0x430cb720,
+       0x4eabb78d,
+       0xc0007500,
+       0xb78d91c2,
+       0x02384fab,
+       0x4fabb58d,
+       0x430cb720,
+       0x512bb78d,
+       0xb58d0a04,
+       0xb720512b,
+       0x0203430c,
+       0x0a38c0c8,
+       0xaa01d208,
+       0x70c8d010,
+       0xc0c80103,
+       0xd0080934,
+       0xd012a941,
+       0x9ea27104,
+       0x6d2bb58c,
+       0x90a0c002,
+       0xc0007680,
+       0x000790a2,
+       0x93c0c001,
+       0x6b2db766,
+       0x59adb746,
+       0x4dadb786,
+       0xc20011b4,
+       0xcc125a0b,
+       0x020370c8,
+       0x0a3cc0c8,
+       0xaa01d208,
+       0x69adb746,
+       0x5a05c200,
+       0x515051f3,
+       0x5987d1a4,
+       0xc1015914,
+       0xff1405b4,
+       0xb720996c,
+       0x5819430c,
+       0xb74d0810,
+       0xb78d57ab,
+       0x0244572b,
+       0x5a07c200,
+       0x094ed011,
+       0x7004c010,
+       0xc0120a04,
+       0x02037008,
+       0x0a38c0c8,
+       0xaa01d208,
+       0x7008c010,
+       0x08b4c0c8,
+       0x4029b780,
+       0x7008c012,
+       0x9e509e82,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0xb720a605,
+       0x0687430c,
+       0x63adb786,
+       0xc00a7502,
+       0xb7469144,
+       0xb76d702d,
+       0xe1004833,
+       0xc0005a4b,
+       0xc00290cc,
+       0xc0000982,
+       0xd0029100,
+       0x0a047100,
+       0xba1b0189,
+       0x9e6c4000,
+       0x514fd024,
+       0x4002ba24,
+       0xd010097e,
+       0x19787104,
+       0x7104d012,
+       0xc0c80103,
+       0xba24093c,
+       0xd0084002,
+       0xc200a941,
+       0xba245a18,
+       0xc1014002,
+       0x09146245,
+       0x76c01126,
+       0x510bd224,
+       0x90e2c000,
+       0x4cabb78d,
+       0xc0007500,
+       0xb78693c2,
+       0xc1015ead,
+       0xb5860244,
+       0xb7205ead,
+       0xb546430c,
+       0xb7206935,
+       0xb546430c,
+       0xb72069b5,
+       0xb786430c,
+       0xb5866fad,
+       0xb7205dad,
+       0xb786430c,
+       0xb5865dad,
+       0xc0065e2d,
+       0xb78d9260,
+       0x75004e2b,
+       0x9124c006,
+       0x7e2bb78d,
+       0xc0067500,
+       0xb7869084,
+       0xc1015ead,
+       0xb5860244,
+       0xb7205ead,
+       0xb78d430c,
+       0xb7664dab,
+       0x75006fad,
+       0x90c2c000,
+       0x5dadb566,
+       0x9180c000,
+       0x5dadb746,
+       0x02460236,
+       0x02446916,
+       0x5a0dc200,
+       0x5dadb586,
+       0x430cb720,
+       0x5dadb786,
+       0x5e2db586,
+       0x430cb720,
+       0x4dabb78d,
+       0xc0007500,
+       0xb54690c2,
+       0xc0016935,
+       0xb78d91e0,
+       0xb7464eab,
+       0x7500692d,
+       0x9182c001,
+       0x512bb78d,
+       0x62451a04,
+       0x0629d110,
+       0x692db586,
+       0x430cb720,
+       0x512bb78d,
+       0x692db746,
+       0x5a05c200,
+       0xb5460128,
+       0xb7a0692d,
+       0x020b430c,
+       0x0a3cc0c8,
+       0xaa01d208,
+       0xb766008b,
+       0x9ea26935,
+       0x512bb76d,
+       0xff1455eb,
+       0x9ea99886,
+       0x694db506,
+       0x430cb720,
+       0x9100c001,
+       0x652db786,
+       0x482bb76d,
+       0xd01111b8,
+       0x62451a32,
+       0x0629d110,
+       0x5907c180,
+       0x692db586,
+       0x430cb720,
+       0x692db786,
+       0xb5860244,
+       0xb7a0692d,
+       0x008b430c,
+       0x6935b766,
+       0x9b72c134,
+       0xb5069ea9,
+       0xb720694d,
+       0xb786430c,
+       0x750264ad,
+       0x90c4c000,
+       0x692db786,
+       0x9280c000,
+       0x4833b74d,
+       0x59abb74c,
+       0x6935b766,
+       0x0624d010,
+       0x71041904,
+       0x5c2db766,
+       0x9156c000,
+       0x0236c101,
+       0x5a07c200,
+       0x69adb586,
+       0x9140c001,
+       0x1224c101,
+       0x6526d031,
+       0x02446247,
+       0x69adb586,
+       0x430cb720,
+       0x59abb78c,
+       0x69adb746,
+       0xc2001a04,
+       0x01285a07,
+       0x69adb546,
+       0x430cb7a0,
+       0xb76c008b,
+       0xb76659ab,
+       0x198469b5,
+       0x9b30c134,
+       0xb5069ea9,
+       0xc00069cd,
+       0xb78690e0,
+       0x0a04652d,
+       0x652db586,
+       0x430cb720,
+       0x69b5b746,
+       0x5cadb746,
+       0x6a35b546,
+       0x430cb720,
+       0x64adb786,
+       0xc0007502,
+       0x022491d4,
+       0xb7460244,
+       0xc10169ad,
+       0xc2000244,
+       0xc8105a0b,
+       0xb5467088,
+       0xb72069ad,
+       0xb78d430c,
+       0xb58d572b,
+       0xb72057ab,
+       0xb5ad430c,
+       0xb7205733,
+       0xb786430c,
+       0x750063ad,
+       0x90c4c000,
+       0x6fadb786,
+       0x59adb586,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0x430cb720,
+       0x6335b746,
+       0x4dadb746,
+       0x59abb78c,
+       0x4db5b546,
+       0x4314b720,
+       0x482bb72d,
+       0x1524c101,
+       0xb7461a04,
+       0x124275cd,
+       0x6245c101,
+       0xb5460128,
+       0xb78075cd,
+       0x0902430c,
+       0x0a50c0d0,
+       0xa101d208,
+       0xa6059c22,
+       0x430cb720,
+       0xb5660287,
+       0xd8087d35,
+       0x7500aa61,
+       0x9144c000,
+       0x430cb720,
+       0x6e35b766,
+       0x9a6efff4,
+       0x9b04ffd4,
+       0x430cb780,
+       0x0a50c0d0,
+       0xaa01d208,
+       0xc0007502,
+       0xfff49084,
+       0x9eab9bc3,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0xffcd8c40,
+       0x01079240,
+       0xa9e1f010,
+       0x70c0d014,
+       0x753ec03f,
+       0x90dcc000,
+       0x4226e000,
+       0x48acb340,
+       0xf0100226,
+       0x9c22a261,
+       0xb7c0a60d,
+       0x008d430c,
+       0x5933b7ae,
+       0x1dd2d012,
+       0x990cff34,
+       0x028c5808,
+       0xd0129ea9,
+       0xb7a61dd4,
+       0xff347dcd,
+       0x58089903,
+       0xb726008c,
+       0x9eb17dad,
+       0xc2000252,
+       0xb7665a05,
+       0x9ea259d5,
+       0x72c4cc12,
+       0x4dcdb766,
+       0x0d025d9c,
+       0x9b63fef4,
+       0xc0dc020d,
+       0xd2080a30,
+       0xc006a901,
+       0x11c00a7a,
+       0xc0007480,
+       0x9e9390a4,
+       0x90e0c000,
+       0xb786008d,
+       0xd020792d,
+       0x9eb111b8,
+       0xb7460a02,
+       0x592778cd,
+       0x7088c810,
+       0xc0dc020d,
+       0xd2080a40,
+       0xc180aa01,
+       0x9eb25a8f,
+       0xd01102d8,
+       0x9eb36e3f,
+       0x0d30c0dc,
+       0x02d40e86,
+       0x5a23c200,
+       0xa2c2d010,
+       0x794db566,
+       0x0d90c0dc,
+       0xfff402d8,
+       0xc0089b96,
+       0xd4100a02,
+       0x9e6c7148,
+       0x7148d412,
+       0x2afcc00e,
+       0xb79f000b,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0xa60d9c22,
+       0x430cb7a0,
+       0xb786008b,
+       0xb741552d,
+       0x75045e2d,
+       0x92a4c005,
+       0xc0007488,
+       0xb78190e4,
+       0x75045ead,
+       0x9322c005,
+       0xb746008b,
+       0xb7464f2d,
+       0xb7616ab5,
+       0xd1205e2d,
+       0xc02111a5,
+       0xc00076c0,
+       0x74c29354,
+       0x93e4c009,
+       0x4dadb786,
+       0x70886a1e,
+       0x9336c009,
+       0x5e15d1a2,
+       0x6ac5d072,
+       0x9060c001,
+       0xc00074c2,
+       0xd1a293e2,
+       0xd0325e15,
+       0xc0006acd,
+       0x74c29340,
+       0x9184c009,
+       0xb786008b,
+       0x6a1e4dad,
+       0xc0097088,
+       0xd07190b6,
+       0xc0006e35,
+       0x74c290e0,
+       0x9102c000,
+       0x6e3dd031,
+       0x5a97d224,
+       0x9060c000,
+       0x008b0e82,
+       0x59b3b7cc,
+       0xc0027782,
+       0xff3491c4,
+       0x008b9a36,
+       0x4db5b7a6,
+       0xc0109e6b,
+       0xc1017006,
+       0xd812120b,
+       0xb7867008,
+       0x750074ad,
+       0x92e4c001,
+       0x9870ff34,
+       0xc0007400,
+       0x008b91a2,
+       0x59abb78e,
+       0x67adb744,
+       0x0a027088,
+       0x0a42d004,
+       0x92c0c000,
+       0xb781008b,
+       0x75025e2d,
+       0x90a2c000,
+       0xc0007508,
+       0x008b9224,
+       0x67adb784,
+       0x502db746,
+       0x6659d131,
+       0x0a027104,
+       0x0a42d00b,
+       0x74adb586,
+       0x90a0c000,
+       0xb5c6008b,
+       0x008b74b5,
+       0x74adb786,
+       0xc0007500,
+       0xc81290c4,
+       0xc000710c,
+       0x010d9060,
+       0xb786008b,
+       0xd0204dad,
+       0x008b12c4,
+       0x5e2db781,
+       0xc0007502,
+       0xff349264,
+       0x7400982f,
+       0x91c4c000,
+       0xb786008b,
+       0xb746502d,
+       0xc2006aad,
+       0x70885a08,
+       0x909cc000,
+       0x72b5b7a6,
+       0xd4120d06,
+       0xc0047344,
+       0x748291e0,
+       0x92c2c001,
+       0xc0047488,
+       0x008b9024,
+       0x5eadb781,
+       0xc0007500,
+       0xb7a690c2,
+       0xc0034db5,
+       0x008b93e0,
+       0x64abb78c,
+       0x75009ead,
+       0xd0010a02,
+       0xb5800a42,
+       0xb78c448c,
+       0xc0dc6fab,
+       0x75000ec0,
+       0x90c2c000,
+       0xa922d210,
+       0x90e0c000,
+       0x9ab0fff4,
+       0xd2109e82,
+       0x008ba021,
+       0x4dadb786,
+       0xd131092a,
+       0xc2006629,
+       0xcc125a1f,
+       0x9e9d7104,
+       0x9300c002,
+       0xb78c008b,
+       0xc2006bab,
+       0x00ca5a08,
+       0x5bb5b7a6,
+       0x9bdaff14,
+       0x0b00f011,
+       0x90e4c001,
+       0xb786008b,
+       0x750074ad,
+       0x9244c000,
+       0x67adb784,
+       0x4dadb746,
+       0x5035b746,
+       0x61450802,
+       0xd00b7095,
+       0x74000802,
+       0x74adb506,
+       0x9122c000,
+       0x9973ff34,
+       0xc0121001,
+       0xc000700c,
+       0x008b9100,
+       0x6aadb786,
+       0xc0121228,
+       0xc1017100,
+       0x008b06d0,
+       0x5e2db781,
+       0xc0007502,
+       0xff1493e4,
+       0x74009ba9,
+       0x9344c000,
+       0xb78d008b,
+       0xc00462ab,
+       0xc0007510,
+       0xb7869274,
+       0xc2004dad,
+       0x9ea25a0f,
+       0x7344d412,
+       0x9140c000,
+       0xb78c008b,
+       0xc2006bab,
+       0x00ca5a08,
+       0x5bb5b7a6,
+       0x430cb720,
+       0x5e2db781,
+       0xc0007508,
+       0x750290a2,
+       0x92e4c000,
+       0xb787008b,
+       0x75004d2d,
+       0x9222c000,
+       0xd4109ea2,
+       0xc0007344,
+       0x72959180,
+       0x9238fff6,
+       0x9180fff6,
+       0xfff77295,
+       0xfff69078,
+       0x9e6893c0,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0xb7a0a60d,
+       0x9e5e430c,
+       0xb781008b,
+       0x75025e2d,
+       0x91a6c004,
+       0xc0007504,
+       0x750890f4,
+       0x90e4c004,
+       0x93a0c001,
+       0x76c2008b,
+       0x5535b566,
+       0x6bb3b7ac,
+       0x9084c000,
+       0x9a99ff34,
+       0x9a71fff4,
+       0xb506008b,
+       0x01815cad,
+       0xff34058b,
+       0x9e82996b,
+       0x0902008b,
+       0x9100c000,
+       0x7a2bb78c,
+       0x4002ba24,
+       0x0528c101,
+       0x0888709b,
+       0xffff0904,
+       0xb74092fc,
+       0x9e53430c,
+       0xc0c80205,
+       0xd2080a38,
+       0xd010aa01,
+       0xc0c870c8,
+       0xd0080934,
+       0xc412a941,
+       0x9e8d7104,
+       0xb5ac008b,
+       0xff347a33,
+       0xc0029898,
+       0x008b9140,
+       0xb56676c2,
+       0xb7ac5535,
+       0xc0006bb3,
+       0xff349084,
+       0xfff49a5e,
+       0x008b9a36,
+       0x5cadb506,
+       0x058b0181,
+       0x9930ff34,
+       0x008b9e82,
+       0xc0000902,
+       0xb78c9100,
+       0xba247a2b,
+       0xc1014002,
+       0x709b0528,
+       0x09040888,
+       0x92fcffff,
+       0x430cb740,
+       0x02059e53,
+       0x0a38c0c8,
+       0xaa01d208,
+       0x70c8d010,
+       0x0934c0c8,
+       0xa941d008,
+       0x7104c412,
+       0x008b9e8d,
+       0x7a33b5ac,
+       0x985dff34,
+       0xc0007584,
+       0xb72091c4,
+       0xb781430c,
+       0x75045ead,
+       0x90e2c000,
+       0xc0c80203,
+       0xd2080a28,
+       0x9e68aa82,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0x8420a61d,
+       0x4314b7a0,
+       0x1236c101,
+       0x9e699e6a,
+       0x0900c0de,
+       0xab41d008,
+       0x6f2bb7ec,
+       0x72adb726,
+       0x5198d224,
+       0xc134a09d,
+       0x9e6c9805,
+       0xc0dc9e86,
+       0xd2080a70,
+       0x7500aa01,
+       0x90a4c000,
+       0xc000a219,
+       0x9e6990e0,
+       0x7b2db786,
+       0xa1191108,
+       0x75809e69,
+       0x702db746,
+       0xb3640a22,
+       0x74824424,
+       0xb7e60309,
+       0xb7ac7ab5,
+       0xc0036c2b,
+       0xb78d9392,
+       0x7502612b,
+       0x92f2c003,
+       0x93a0c001,
+       0x315ee000,
+       0x9324c001,
+       0xb7869e69,
+       0x750074ad,
+       0x9124c002,
+       0x9a80ff14,
+       0xc0007400,
+       0x9e6991a2,
+       0x59abb78e,
+       0x67adb744,
+       0x0a027088,
+       0x0a42d004,
+       0x9360c000,
+       0xb7819e69,
+       0x75025e2d,
+       0x90a2c000,
+       0xc0007508,
+       0x9e699204,
+       0x67adb784,
+       0x4dadb746,
+       0x5035b746,
+       0x71156245,
+       0xd00b0a02,
+       0xc0000a42,
+       0x9e699080,
+       0xb5860a06,
+       0x9e6974ad,
+       0x74adb786,
+       0xc0007500,
+       0x75409304,
+       0x9104c000,
+       0xb78d9e69,
+       0x7500612b,
+       0x9104c000,
+       0x0a029e6a,
+       0x0970c0dc,
+       0xa241d008,
+       0x75c0a91d,
+       0xb3200802,
+       0xc0014422,
+       0x9e6c9180,
+       0xc0dc9e69,
+       0x0a860a70,
+       0x9e73058b,
+       0xa281d208,
+       0x7b35b5c6,
+       0x0dd0c0dc,
+       0x98d7fff4,
+       0xd3a2a91a,
+       0xd3225e17,
+       0xc2005d07,
+       0x012852b8,
+       0x6e2bd011,
+       0x5a0fc200,
+       0xaa1d0128,
+       0x6129012a,
+       0xc000505b,
+       0x9e699140,
+       0x612bb78d,
+       0xfffe7500,
+       0xfffc9082,
+       0xb79f90e0,
+       0xb7bf7dee,
+       0xb7df7e6e,
+       0xb7ff7eee,
+       0xc0027f6e,
+       0x9c228c20,
+       0xb7a0a60d,
+       0x008b430c,
+       0x5e2db781,
+       0xc0047502,
+       0xff149124,
+       0xf01199fb,
+       0xc0000880,
+       0x9ea99184,
+       0x4dd5b766,
+       0x4f4db746,
+       0x6e3fd011,
+       0xc0017088,
+       0x9ea992f6,
+       0xb7467440,
+       0xc00072d5,
+       0xb74690c2,
+       0xc0006bcd,
+       0x9ea990a0,
+       0x6acdb746,
+       0xb7819ea9,
+       0x75025e4d,
+       0x9124c000,
+       0xc0007440,
+       0xb78690c4,
+       0xc000504d,
+       0x0a029060,
+       0x9e521228,
+       0x7104d010,
+       0x1105c101,
+       0x7104d012,
+       0xb747008b,
+       0xc2004d2d,
+       0xd1105a07,
+       0x74801429,
+       0x9082c002,
+       0x6a2fd031,
+       0x5a11c200,
+       0x7008c010,
+       0x9380c001,
+       0xb78d9ea9,
+       0xb7c662cb,
+       0xb7a66acd,
+       0xc0045055,
+       0xc0017510,
+       0xb7069012,
+       0xb74d584d,
+       0xb74d61cb,
+       0x70176153,
+       0xd1190185,
+       0xd1201007,
+       0xb31011a5,
+       0xba1b4434,
+       0x1d844003,
+       0x4002ba1b,
+       0x6187d132,
+       0x5a07c180,
+       0x05b8c101,
+       0xfed40d02,
+       0xc1019bd4,
+       0x008b06d0,
+       0x6cabb78c,
+       0xc0007500,
+       0xd0109122,
+       0xc101065a,
+       0x024c024a,
+       0x5a8bd224,
+       0x9e6b9eb3,
+       0x9ab8fff4,
+       0xd0120a02,
+       0x9ea97100,
+       0x6a4db586,
+       0x90a0c001,
+       0xb78d008b,
+       0xb74d62ab,
+       0xb74d61b3,
+       0xc004612b,
+       0xb7067510,
+       0xc00069ad,
+       0xb70690d4,
+       0xc00072ad,
+       0xd1109220,
+       0x01891625,
+       0x4002ba1b,
+       0xc00074c2,
+       0xd1a4913c,
+       0x0d025987,
+       0x05b0c101,
+       0x9b99fed4,
+       0xb5069ea9,
+       0xb7a06a4d,
+       0x0902430c,
+       0xb78d008b,
+       0xb746612b,
+       0xb54d7035,
+       0x0a0466ab,
+       0xb58d7682,
+       0xb74c612b,
+       0xc0055a2b,
+       0xcffe9192,
+       0x75022a7c,
+       0x90f2c005,
+       0x6633b74d,
+       0xc0057680,
+       0x74809144,
+       0x93c2c001,
+       0x6a2db786,
+       0xc2007482,
+       0xb5465907,
+       0xc0005bad,
+       0x02249104,
+       0xc2000244,
+       0xb5865a07,
+       0x9ea95bad,
+       0xb7660e86,
+       0xb7866a55,
+       0xb76d5bcd,
+       0xc1016dcb,
+       0x198415b8,
+       0x9b5bfed4,
+       0xc0000301,
+       0xd0089200,
+       0xfed4a9cd,
+       0xd0119b54,
+       0xd2a20e52,
+       0x9ea55c88,
+       0xb506009a,
+       0xcffe5bad,
+       0xc1012efc,
+       0x008b025a,
+       0xb78d0109,
+       0xc0da6dab,
+       0x9eb30940,
+       0x0d02711b,
+       0x90f2ffff,
+       0x9160c003,
+       0x9e929ea9,
+       0x62cbb76d,
+       0x69cdb786,
+       0xcffe1984,
+       0xd1a429fc,
+       0xc1015985,
+       0xfed405b8,
+       0x008b9b2c,
+       0x5badb506,
+       0x92e0c002,
+       0xb78d9ea9,
+       0xc00462cb,
+       0xc0007510,
+       0xb7869194,
+       0x09044dcd,
+       0x6b55b746,
+       0xc1016129,
+       0xb5461124,
+       0x008b6a4d,
+       0xb7860902,
+       0xd8126a2d,
+       0xb7ac7088,
+       0x77405a33,
+       0x91c2c001,
+       0x5a2db786,
+       0xc0007500,
+       0xb7669262,
+       0x74c05aad,
+       0x91c2c000,
+       0x9e929ea3,
+       0x9afdfed4,
+       0xc0100a42,
+       0x1a387008,
+       0x7008cc12,
+       0x9060c000,
+       0xd0320996,
+       0x0d0261bc,
+       0x01bac101,
+       0x9aedfed4,
+       0xd0209ea9,
+       0x9e6b11e0,
+       0x5bcdb506,
+       0xfed40d02,
+       0x008b9ae4,
+       0x5c2db506,
+       0x91e0c000,
+       0xb5c69ea9,
+       0xc0005bcd,
+       0x008b9140,
+       0x5e2db781,
+       0xfffe7508,
+       0xfffd9004,
+       0xb79f91a0,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0xa6059c22,
+       0x430cb7a0,
+       0xb766008b,
+       0x74c0742d,
+       0x91c2c000,
+       0xb786008b,
+       0xd1a473ad,
+       0xc1015985,
+       0xc11405b8,
+       0x018199c2,
+       0x29fccffe,
+       0xb781008b,
+       0xb56c5e2d,
+       0x750471ab,
+       0x9142c000,
+       0xc0017508,
+       0x75029302,
+       0x93c4c004,
+       0x9260c001,
+       0x9860ff14,
+       0x008b7400,
+       0x7235b746,
+       0x90c2c000,
+       0x6badb746,
+       0x90a0c000,
+       0xb746008b,
+       0x008b6aad,
+       0x5e2db781,
+       0xc0007502,
+       0x74009124,
+       0x90c4c000,
+       0x502db786,
+       0x9060c000,
+       0x12280a02,
+       0xd0109e52,
+       0xc1017104,
+       0xd0121105,
+       0xc2007104,
+       0xd1105a07,
+       0x008b1629,
+       0x69adb586,
+       0xb58d0a0a,
+       0xc003792b,
+       0xff149160,
+       0x7400982f,
+       0xb746008b,
+       0xc0007235,
+       0xb7869222,
+       0x9e526bad,
+       0x7104d010,
+       0x1105c101,
+       0x7104d012,
+       0x5a07c200,
+       0x1429d110,
+       0x92e0c001,
+       0xb781008b,
+       0x75025e2d,
+       0x90a4c000,
+       0xb706008b,
+       0x008b502d,
+       0x702db786,
+       0x6aadb746,
+       0xc0007500,
+       0xb78690e4,
+       0x1040502d,
+       0x93e0c000,
+       0xb78d008b,
+       0x102062ab,
+       0x7510c004,
+       0x92f2c000,
+       0xd0187400,
+       0xc0005807,
+       0x008b9258,
+       0x4f2db786,
+       0x5a07c200,
+       0xd01e7088,
+       0xc0001000,
+       0x008b911c,
+       0x53adb786,
+       0xc2006209,
+       0xd1105833,
+       0x008b1421,
+       0x5e2db781,
+       0xc0007502,
+       0x1a0490a4,
+       0x4d2db587,
+       0xb781008b,
+       0x75085e2d,
+       0x9144c000,
+       0x5eadb781,
+       0xc0007504,
+       0x0a0290a2,
+       0x4d2db587,
+       0xd0120a02,
+       0x008b7100,
+       0x69adb586,
+       0xb786008b,
+       0x9eab702d,
+       0x0a0409b2,
+       0x702db586,
+       0x0dc0c0ca,
+       0x9ac1fd54,
+       0x09929eab,
+       0x0df0c0ca,
+       0x9abbfd54,
+       0x09929eab,
+       0x0da8c0ce,
+       0x9ab5fd54,
+       0x09a29eab,
+       0x0df0c0d8,
+       0x9aaffd54,
+       0x008b0a02,
+       0x66abb58d,
+       0x612bb58d,
+       0x662bb58d,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0xffec8c40,
+       0x9e5292e0,
+       0x70c0d014,
+       0x7100d002,
+       0x0942f012,
+       0x90a4c000,
+       0xc0009e52,
+       0x0a7a9120,
+       0x1244c101,
+       0x7104d010,
+       0x51f01128,
+       0xa165f010,
+       0xa1e1f010,
+       0xf0109c22,
+       0xf010aa65,
+       0x9e50a961,
+       0x7100c412,
+       0x1115d120,
+       0x51531218,
+       0x9e8a9e54,
+       0x11a651f3,
+       0x9320fffe,
+       0xffff0d02,
+       0xf00891c0,
+       0xf008a966,
+       0xffffa9e1,
+       0xf0109100,
+       0xf010aa65,
+       0x9ea0a8e1,
+       0x7204c412,
+       0x1619d110,
+       0x50b31514,
+       0x51f39e54,
+       0x7040c814,
+       0x7080c802,
+       0x70c0d014,
+       0x7100d002,
+       0x0a040904,
+       0x7088c812,
+       0x0d021974,
+       0xc8129e90,
+       0x0d047280,
+       0x9e545d07,
+       0x50b30524,
+       0x01b251f3,
+       0xfffd0522,
+       0x0d029100,
+       0x92e0fffe,
+       0xaa65f010,
+       0xa8e1f010,
+       0xc4129ea0,
+       0xd1107204,
+       0x15141619,
+       0x9e5450b3,
+       0xc81451f3,
+       0xc8027040,
+       0xd0147080,
+       0xd00270c0,
+       0x01287100,
+       0x0d02196c,
+       0xc8129e90,
+       0x0d047280,
+       0x9e545d07,
+       0x50b30524,
+       0x61b351f3,
+       0xfffc0522,
+       0xf0089000,
+       0xf008a966,
+       0xfffea9e1,
+       0x0d0292e0,
+       0x9280fffe,
+       0xf010a60d,
+       0x0685aae5,
+       0x71559e5e,
+       0xa962f010,
+       0x165bd11c,
+       0xb3430107,
+       0xb3554458,
+       0xd0184838,
+       0x0986554f,
+       0x70c4d012,
+       0xcc129ea3,
+       0x5d8770c4,
+       0xc11405b4,
+       0x9eb39847,
+       0x115bd120,
+       0xb79f0181,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0x91e0fffa,
+       0xa966f008,
+       0xa9e1f008,
+       0x9280fffe,
+       0xfffe0d02,
+       0xf0109220,
+       0xf010a966,
+       0x9e51aa61,
+       0x7046c810,
+       0xc20011b4,
+       0xc101518f,
+       0xfff91524,
+       0xa61d9300,
+       0x8420c002,
+       0x6e35d171,
+       0x430cb7c0,
+       0xd0100246,
+       0xc20006b6,
+       0xa1995a08,
+       0x02dc00cc,
+       0x4f2db7e7,
+       0x0aa0c12a,
+       0xaab1da08,
+       0x5e88c180,
+       0x06dcc101,
+       0x07079e69,
+       0x2bfec00f,
+       0x8d80e0b2,
+       0xba2d0902,
+       0x018f4002,
+       0x6735b7a6,
+       0x7becb55f,
+       0x7b6cb5bf,
+       0x9b95fff4,
+       0x8d80e0b2,
+       0xfff409a2,
+       0xd0119bc4,
+       0xf0920e62,
+       0xc2008d80,
+       0x01e85a0c,
+       0xc0d0a21d,
+       0x0a0209e0,
+       0xf210058f,
+       0xb59fa2e1,
+       0xfff47cec,
+       0x058f9b78,
+       0xfff409a2,
+       0x008d9bae,
+       0x5cadb786,
+       0x8c80f051,
+       0x9eab9e6b,
+       0xf2080902,
+       0xa115a221,
+       0x9b6dfff4,
+       0xb78c008d,
+       0xb76c592b,
+       0x9eab6b2b,
+       0xfff411c6,
+       0x9eab9b95,
+       0xfff409a2,
+       0xb79f9b94,
+       0x75007b6c,
+       0x90fcc000,
+       0xaa61f210,
+       0xc0007500,
+       0xaa1d923a,
+       0xb55f0902,
+       0x00cc7bec,
+       0x7b6cb5ff,
+       0x63adb786,
+       0x632db726,
+       0x7cecb59f,
+       0xa0e1f210,
+       0x7b6cb79f,
+       0xc0007500,
+       0xf092913c,
+       0xf2108c80,
+       0x7500aa21,
+       0x919ac000,
+       0xb746008d,
+       0x0a064e2d,
+       0x7decb59f,
+       0x7d6cb55f,
+       0x9340c000,
+       0xb786008d,
+       0xf0715cad,
+       0xe0518c80,
+       0x9eab8d80,
+       0xa221f208,
+       0xb59f0a02,
+       0xfff47dec,
+       0x9eab9ac6,
+       0x8d80e0b1,
+       0x9b17fff4,
+       0x9e6b9eab,
+       0x9b44fff4,
+       0xd171a919,
+       0xd0106e65,
+       0x024404ec,
+       0x024c0248,
+       0x0a00c114,
+       0xda08009c,
+       0xb72ea991,
+       0x70465d2b,
+       0x01b6d02a,
+       0x0192d029,
+       0x0a32d009,
+       0x0a12d00a,
+       0x01c7d120,
+       0xc0f4098e,
+       0xe0b29b5a,
+       0x01818d80,
+       0x9af7fff4,
+       0x8d80e071,
+       0x8d80e0b2,
+       0x9b1cfff4,
+       0x8d80e0b2,
+       0x9ad5fef4,
+       0xfef49e83,
+       0xb79f9af4,
+       0xb7bf7bee,
+       0xb7df7c6e,
+       0xb7ff7cee,
+       0xc0047d6e,
+       0x9c228c20,
+       0xb720a605,
+       0x9e5d430c,
+       0xb76d0d82,
+       0xffb448ab,
+       0xf2089994,
+       0xb720a021,
+       0xb786430c,
+       0x750063ad,
+       0x9082c000,
+       0x48abb50d,
+       0xf2080a02,
+       0xf208a225,
+       0xf208a22d,
+       0xf208a231,
+       0xf208a235,
+       0xb79fa229,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa6059c22,
+       0x430cb720,
+       0x9e5c76c2,
+       0x4b2bb56d,
+       0x9292c000,
+       0x430cb720,
+       0x5a2bb7ac,
+       0x59b3b76c,
+       0x09d2d011,
+       0x9b0ac0f4,
+       0x018b9e83,
+       0xff741d84,
+       0x0d8a9a82,
+       0x9160c000,
+       0xd02176c6,
+       0xc00015b6,
+       0x750490c2,
+       0x90a4c000,
+       0xff940d86,
+       0xb7609917,
+       0xc0d64314,
+       0xfff40dc0,
+       0xb7009bb1,
+       0xb706430c,
+       0xb79f6e2c,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa60d9c22,
+       0xb7208420,
+       0x0a06430c,
+       0x44abb585,
+       0x430cb720,
+       0x47b1b76a,
+       0x9b38fdd4,
+       0x430cb720,
+       0xb76a0982,
+       0xb74a46b1,
+       0xd1a24731,
+       0x9e5a5e30,
+       0x0a00c021,
+       0x0a10c112,
+       0x90e0c000,
+       0xf0009dcd,
+       0xc100a1e1,
+       0x70950a00,
+       0xffff0904,
+       0xb7c39334,
+       0xe0315bad,
+       0x09a28d00,
+       0xfd749eb2,
+       0xaa1999f8,
+       0x4314b720,
+       0xd0110902,
+       0xd1312ac6,
+       0xb7aa68d1,
+       0xc10146d1,
+       0xb5400092,
+       0xb720602d,
+       0x9d29430c,
+       0x9e899e88,
+       0x46b1b76a,
+       0x4729b70a,
+       0x0c30c018,
+       0x0cb0c01c,
+       0x9020c001,
+       0x5e30d1a2,
+       0x01899dcb,
+       0x0980c021,
+       0x0980c128,
+       0xaa09e020,
+       0xf0009dbd,
+       0xe020a261,
+       0xd111a929,
+       0x9dcd0a30,
+       0xa161f000,
+       0xc0080d10,
+       0x09907680,
+       0x9204ffff,
+       0x0e32d011,
+       0xc00e9ea3,
+       0x72d12dfc,
+       0x9014ffff,
+       0x7d02aa1d,
+       0x9342c001,
+       0x69d1d131,
+       0xb780a99a,
+       0x01965d2d,
+       0xc0105d89,
+       0x9ea40990,
+       0xc1019c62,
+       0x0a04025a,
+       0x5a30c200,
+       0xc0210109,
+       0x0d020900,
+       0x0970c026,
+       0xf0009dad,
+       0xc021a162,
+       0xc0260a00,
+       0x9dcd0a60,
+       0xa162f000,
+       0x430cb720,
+       0xb74a098e,
+       0xb74a46a9,
+       0xc1004731,
+       0xc0215a30,
+       0xc1140a00,
+       0xc0000a50,
+       0x9dcd90e0,
+       0xa1e1f000,
+       0x0a00c100,
+       0x09047095,
+       0x9334ffff,
+       0x430cb720,
+       0x68d1d132,
+       0x0a60d051,
+       0x0493d110,
+       0xb5809eab,
+       0xb7805fad,
+       0xc101430c,
+       0xaa1d0498,
+       0x5a05c200,
+       0x5f4db580,
+       0x9bcdfdb4,
+       0xc0007540,
+       0xb72090c4,
+       0xb5a5430c,
+       0xb72044ab,
+       0xb76a430c,
+       0xfdd447b1,
+       0x0d8e9b06,
+       0x9b68fd34,
+       0xfd340d8a,
+       0xb79f9b65,
+       0xb7bf7e6e,
+       0xb7df7eee,
+       0xc0027f6e,
+       0x9c228c00,
+       0xb720a60d,
+       0x0203430c,
+       0x0a10c0a4,
+       0xaa82d208,
+       0x4729b7ca,
+       0xc0027740,
+       0x0a8692a4,
+       0x44abb5a5,
+       0x430cb720,
+       0x47b1b76a,
+       0x9a54fdd4,
+       0xfe149eab,
+       0xb72099b6,
+       0xb781430c,
+       0x1a085dad,
+       0xb3537506,
+       0xc0004832,
+       0xd22692d2,
+       0x85205908,
+       0x8044e050,
+       0x940a9408,
+       0x9401940c,
+       0x0982c101,
+       0x9120c000,
+       0xc0000986,
+       0x098e90c0,
+       0x9060c000,
+       0xb745098a,
+       0xc0207eb1,
+       0xc3000a02,
+       0x76805930,
+       0x4822b324,
+       0x0900c140,
+       0xc0213246,
+       0x9dad0900,
+       0xa261f000,
+       0xc09c0203,
+       0xb7630a20,
+       0xd2085bad,
+       0x9eb3a902,
+       0xfdb40906,
+       0xb7209877,
+       0xb76a430c,
+       0xb79f47b1,
+       0xb7bf7eee,
+       0xb7df7f6e,
+       0x8c607fee,
+       0x92e0fdd4,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0xc016a61d,
+       0xb57f8420,
+       0xd0506ef4,
+       0xd050aa61,
+       0x1a28a9e6,
+       0x1d880309,
+       0x2b7cc00e,
+       0x2dfcc00e,
+       0x9848fd74,
+       0x6869d031,
+       0x0a62d011,
+       0x5b30d224,
+       0xc0140201,
+       0xd3240a20,
+       0xc0215808,
+       0xb59f0a00,
+       0xb7806a6c,
+       0xb51f568c,
+       0x01016dec,
+       0x01ec9e40,
+       0xb59f0208,
+       0xb78057ec,
+       0xc0144f8c,
+       0xc0210930,
+       0x02080900,
+       0x6aecb59f,
+       0x558cb780,
+       0x69ecb55f,
+       0x02689e71,
+       0x576cb59f,
+       0x500cb780,
+       0x6961d0d1,
+       0xb59f0268,
+       0xb7807c6c,
+       0xc040518c,
+       0xb53f0880,
+       0x023859ec,
+       0x726cb59f,
+       0x540cb780,
+       0x7b74b51f,
+       0x430cb720,
+       0xb55f0128,
+       0xb71f596c,
+       0x090659f4,
+       0x570cb780,
+       0xb57f9e91,
+       0x00e27bec,
+       0xa0c6c240,
+       0x0c00c021,
+       0x9e720a02,
+       0x7974b51f,
+       0xb58a9e73,
+       0x9e704c29,
+       0x9e719e74,
+       0x0900c021,
+       0x058d050d,
+       0x040d078d,
+       0xc01e048d,
+       0xc0210900,
+       0xc0210d00,
+       0xc0210980,
+       0xc0210d80,
+       0xc0210a00,
+       0xc0210f80,
+       0xc0210800,
+       0xc0210c00,
+       0xc0210880,
+       0xb55f0c80,
+       0xc01e756c,
+       0xc01e0d10,
+       0xc01409a0,
+       0xc0100df0,
+       0xc0100a00,
+       0xc0100f90,
+       0xc0100820,
+       0xc0040c30,
+       0xc0120880,
+       0xc00a0ca0,
+       0xb55f1950,
+       0xb57f7674,
+       0xb57f77ec,
+       0xb59f5a74,
+       0xb5ff5cec,
+       0xb51f5c74,
+       0xb51f5b6c,
+       0xb53f5af4,
+       0xb53f61ec,
+       0xb55f6174,
+       0xc00c60ec,
+       0xc00c1d50,
+       0xc00419d0,
+       0x0a701d90,
+       0x0f90c008,
+       0x0830c002,
+       0x0c30c002,
+       0x08f0c00e,
+       0x09500cf0,
+       0x72f4b55f,
+       0x71ecb57f,
+       0x7174b57f,
+       0x70ecb59f,
+       0x6074b5ff,
+       0x0d60c002,
+       0x5fecb51f,
+       0xb51f09f0,
+       0xb53f6ff4,
+       0xb53f706c,
+       0xb55f5f74,
+       0xc0345eec,
+       0xc0040db0,
+       0x1fd00a50,
+       0x0810c004,
+       0x0c20c00c,
+       0x08d0c024,
+       0x1cd0c00e,
+       0x0900c012,
+       0x5e74b55f,
+       0x5decb57f,
+       0x7374b57f,
+       0x73ecb59f,
+       0x6974b5ff,
+       0x68ecb51f,
+       0x6874b51f,
+       0x746cb53f,
+       0x67f4b53f,
+       0x74ecb55f,
+       0x0d50c030,
+       0x09c0c032,
+       0x0da1cfd0,
+       0x0a40c01e,
+       0xc06a1ff0,
+       0xc0260850,
+       0xcfe00c50,
+       0xc01408e1,
+       0xcfee0cf0,
+       0xb55f0931,
+       0xb57f6774,
+       0xb57f66ec,
+       0xb59f6674,
+       0xb5ff65ec,
+       0xb51f6574,
+       0xb51f64ec,
+       0xb53f6474,
+       0xb53f63ec,
+       0xb55f75f4,
+       0xcfd076ec,
+       0xcfce0d31,
+       0x1de009c1,
+       0x0a01cfe2,
+       0x0fe1cfea,
+       0x0871cf7c,
+       0xc01e0c20,
+       0xc02408d0,
+       0xc0320cf0,
+       0xb55f0910,
+       0xb57f7874,
+       0xb57f776c,
+       0xb59f62f4,
+       0xb5ff626c,
+       0xb51f7a74,
+       0xb51f79ec,
+       0xb53f6d74,
+       0xb53f6cec,
+       0xb55f6c74,
+       0xc0596bec,
+       0x9eb39260,
+       0xfdf40982,
+       0xb7409b5f,
+       0x9e504314,
+       0x7af4b55f,
+       0x572ab743,
+       0xc0037480,
+       0xb7849364,
+       0x0b826cac,
+       0x75020e82,
+       0x0bf2d00a,
+       0xd0017504,
+       0x75c00ed2,
+       0x90c4c000,
+       0x09067740,
+       0x0922d001,
+       0x7aecb73f,
+       0x5a0cc100,
+       0xd0206963,
+       0x08020118,
+       0x0abec001,
+       0xd0200405,
+       0x9d0903a8,
+       0x0a80cfc0,
+       0x0c78c034,
+       0x4018b960,
+       0x4e52d011,
+       0x7aecb75f,
+       0x5a08c200,
+       0x04f0d010,
+       0x02480240,
+       0x00c4d020,
+       0x5a2bb780,
+       0x502bb740,
+       0xba2475c0,
+       0xc2004002,
+       0x224a5a28,
+       0x297cc03e,
+       0x31c49dcb,
+       0x4052b760,
+       0x462bb720,
+       0x92a4c000,
+       0x6dcbb783,
+       0x77cbb743,
+       0x63d3b743,
+       0x4002ba24,
+       0x5a28c200,
+       0x5950224a,
+       0xc3ff9ea1,
+       0xc03e2940,
+       0x31b42d7c,
+       0xd3f13514,
+       0x75062a0e,
+       0x90e2c000,
+       0x756cb75f,
+       0xf0009dad,
+       0xba21a1e1,
+       0xc03e4002,
+       0x9e5b2dfc,
+       0x5a28c200,
+       0x3246224a,
+       0x7674b77f,
+       0xf0009dbe,
+       0xb79fa261,
+       0x9dcd77ec,
+       0xa162f000,
+       0x0c080804,
+       0x91c1fffd,
+       0xfe349eb3,
+       0xb7209bb4,
+       0xb742430c,
+       0xc0204cad,
+       0xc0007c80,
+       0xb78090e2,
+       0x5158438c,
+       0x91e0c000,
+       0xb7407c82,
+       0xc000438c,
+       0xc01091a2,
+       0xc2000a02,
+       0x4a7d5218,
+       0x09062244,
+       0x32445158,
+       0x9100c000,
+       0x0a06c010,
+       0x5218c200,
+       0x22284a7d,
+       0x438cb580,
+       0x0a02c021,
+       0x438cb740,
+       0x0a00c020,
+       0xf0009dcd,
+       0xb780a161,
+       0xb71f430c,
+       0x02887b6c,
+       0xb7899ea8,
+       0xc01c6ecc,
+       0xc001753e,
+       0x9eb39164,
+       0x9b2cfdf4,
+       0xb509008b,
+       0xc0006ead,
+       0xfd9491e0,
+       0x9eb39bb7,
+       0x430cb7a0,
+       0x9b20fdf4,
+       0x7b6cb75f,
+       0x9ea802aa,
+       0x6eccb509,
+       0x430cb780,
+       0x7b6cb75f,
+       0x00a80d92,
+       0x6eadb729,
+       0x747ec01c,
+       0x9122ffff,
+       0xb75f68b2,
+       0x009857f4,
+       0x702db729,
+       0xa0c1f010,
+       0x430cb740,
+       0x7b6cb77f,
+       0xb78900b4,
+       0x6a326ead,
+       0xc1380244,
+       0xd2080a00,
+       0xc01caa11,
+       0xc001753e,
+       0x9eb39084,
+       0x9a95fdf4,
+       0x4314b720,
+       0x7b74b77f,
+       0x04b2d010,
+       0x6eb5b749,
+       0x6d29d031,
+       0x0624d010,
+       0x0122c101,
+       0x0900c138,
+       0xa951d008,
+       0x0244c101,
+       0xc2000244,
+       0xd1205a08,
+       0xb79f00c3,
+       0xb7296aec,
+       0xf2086fd5,
+       0x9eb3a082,
+       0x9a96fe34,
+       0xc0007400,
+       0xc00e90c4,
+       0xc004097e,
+       0xb7409020,
+       0x0205430c,
+       0x0a38c0a2,
+       0xa902d208,
+       0xc0017680,
+       0x9e9390e2,
+       0xc0a20185,
+       0xc0a409c0,
+       0xd0080d9c,
+       0xd010a962,
+       0x7115aa61,
+       0x91f2c000,
+       0x7c74b7ff,
+       0xd2100a02,
+       0xd008a261,
+       0xd010aa61,
+       0x1244a961,
+       0xc00e9ea2,
+       0xb7402d7c,
+       0xc0a2430c,
+       0xd0080940,
+       0x0a04aa41,
+       0xa241d008,
+       0x9380c001,
+       0x010300ac,
+       0xc0a20203,
+       0xc0a20940,
+       0xd0080a20,
+       0xd208a945,
+       0x7088aa11,
+       0x9064c001,
+       0x7c6cb71f,
+       0x4030b540,
+       0x4c31b54a,
+       0x430cb7a0,
+       0x020b9ea8,
+       0x0a1cc0a4,
+       0x4750b76a,
+       0xaa01d208,
+       0x4648b76a,
+       0x15bcc101,
+       0xc10102dc,
+       0xd01165b9,
+       0xd1201a32,
+       0xc0a201c7,
+       0xc0d40ac0,
+       0xd2089ad3,
+       0xb780a025,
+       0x024c430c,
+       0x0a40c0a2,
+       0xa906d208,
+       0x0d22d011,
+       0xa105d208,
+       0x430cb780,
+       0x0a14c09c,
+       0xaa01d208,
+       0xc0007500,
+       0xb73f9142,
+       0xb7807c6c,
+       0x75004029,
+       0xd0020a02,
+       0xb73f0a42,
+       0x9e525774,
+       0x4049b580,
+       0x430cb780,
+       0x297cc00e,
+       0x560cb760,
+       0x00cc9e93,
+       0xa1c6c230,
+       0x4c29b78a,
+       0xc0007500,
+       0xb54a9304,
+       0xb7ff4b29,
+       0xd2107c74,
+       0x7500aa61,
+       0x91e4c000,
+       0x430cb720,
+       0xc0a40103,
+       0x009c091c,
+       0x4b29b78a,
+       0xa941d008,
+       0xb58a0244,
+       0xb7004b29,
+       0xc200560c,
+       0x7500aa45,
+       0x90a4c000,
+       0xfe149eb3,
+       0xb71f9925,
+       0xb7a07c74,
+       0xb780430c,
+       0x75004048,
+       0x90e2c000,
+       0xc06e9eaf,
+       0xc0000f90,
+       0x9eaf90a0,
+       0x0f80c080,
+       0xfe949eb3,
+       0xb73f9bad,
+       0xf2107aec,
+       0xb741a9e1,
+       0x7cc26835,
+       0xc0002d4d,
+       0xb7809202,
+       0x3d10430c,
+       0x0a10c098,
+       0xaa01d208,
+       0xc0007500,
+       0xc20092c2,
+       0xc0003d00,
+       0xc0109240,
+       0xc0007cc0,
+       0xb78091c2,
+       0x3d20430c,
+       0x0a14c098,
+       0xaa01d208,
+       0xc0007500,
+       0xc1009084,
+       0xb7203d00,
+       0xb781430c,
+       0x750a5dad,
+       0x9084c001,
+       0x7ea9b785,
+       0xc0007500,
+       0xb78593e2,
+       0x75007f29,
+       0x9202c000,
+       0x7c74b73f,
+       0x0902c800,
+       0x4049b780,
+       0x0a027500,
+       0x4424b342,
+       0x35269e93,
+       0x9180c000,
+       0x7c6cb71f,
+       0x4028b780,
+       0x5a3cc200,
+       0x2a00c800,
+       0x35209ea0,
+       0x796cb73f,
+       0xf0009d9d,
+       0xb740a162,
+       0xc010560c,
+       0xb7807cc2,
+       0x0164508c,
+       0x636cb55f,
+       0xaac2d008,
+       0xd0010902,
+       0x9e920922,
+       0x7aecb71f,
+       0xa146c240,
+       0x430cb780,
+       0xb74206da,
+       0xc1015baa,
+       0x040b06d8,
+       0x5352b74a,
+       0x5b2ab782,
+       0x412cb720,
+       0x510cb7a0,
+       0xc1016244,
+       0x9ebb63c5,
+       0xb53f0183,
+       0xc0d46f6c,
+       0xb73f99e6,
+       0xb77f7274,
+       0x9ebb6f6c,
+       0x404bb500,
+       0x7becb75f,
+       0xc0d402aa,
+       0xda089a36,
+       0x9e68a021,
+       0x7becb73f,
+       0x532ab74b,
+       0x520cb780,
+       0x9e910d02,
+       0x538cb740,
+       0xa0a6c840,
+       0x528cb780,
+       0x5974b77f,
+       0xc8400114,
+       0xb7aaa126,
+       0xb7805332,
+       0xc002530c,
+       0xd80809c2,
+       0xc840a142,
+       0xfd14a2a6,
+       0xb7209b70,
+       0x9e4c4314,
+       0x0a18c0a4,
+       0xaa01d208,
+       0xc0017500,
+       0xb75f9202,
+       0xb75f636c,
+       0xd0087c74,
+       0xd010a8c1,
+       0x0092aa41,
+       0x0092c101,
+       0xb74a7500,
+       0xc000532b,
+       0xb7849104,
+       0x02286c4d,
+       0xcffe0109,
+       0xb709297c,
+       0x9e936a4d,
+       0x9e84018d,
+       0xb7209c62,
+       0xb781430c,
+       0x1a105dad,
+       0xc0007502,
+       0xb78c90f2,
+       0x7500532b,
+       0x90e4c000,
+       0x550cb780,
+       0xc2409e83,
+       0xb71fa1c6,
+       0xb7817aec,
+       0x75065dac,
+       0x9204c000,
+       0x430cb720,
+       0xb78c00e2,
+       0x75004829,
+       0x9102c000,
+       0xb780097e,
+       0x9e90550c,
+       0xa046c240,
+       0x7aecb73f,
+       0x5dadb781,
+       0x75061a08,
+       0x91f2c003,
+       0x590cd226,
+       0xe0508520,
+       0xc0008044,
+       0xc0029100,
+       0xc0019240,
+       0xc0019260,
+       0xb73f9280,
+       0xb7867af4,
+       0x75004149,
+       0x9202c000,
+       0x560cb740,
+       0xaa45c220,
+       0xc0007500,
+       0xb75f9124,
+       0xd0107c74,
+       0x7500aa41,
+       0x90c4c000,
+       0x018f9eb3,
+       0x98f8fe14,
+       0x7c6cb77f,
+       0x550cb740,
+       0xd0089d07,
+       0xc220a8e2,
+       0x9eb3a945,
+       0x018f0a02,
+       0x0d78d052,
+       0x08e1cfe8,
+       0x666ab59e,
+       0x9abafd74,
+       0x9260c001,
+       0xc0010d82,
+       0xb7009080,
+       0xc200560c,
+       0x7500aa45,
+       0x90a4c000,
+       0xfe149ea3,
+       0xb7209821,
+       0x018f430c,
+       0x46b1b76a,
+       0x98cefe14,
+       0x7c74b71f,
+       0xd0519ebb,
+       0xb7400df8,
+       0xc0004050,
+       0xb7209280,
+       0xc210560c,
+       0x7500aa45,
+       0x90e4c000,
+       0xfe149ea3,
+       0xc0009807,
+       0xb7609140,
+       0x0d82430c,
+       0xc06e0d06,
+       0xfdf409e0,
+       0x9eb39b2a,
+       0x98f3fe34,
+       0x430cb7a0,
+       0x550cb780,
+       0xc2409ea9,
+       0xb744aa45,
+       0xc00270c9,
+       0x59202a7c,
+       0x2900c030,
+       0xb75f3244,
+       0x9dad5a6c,
+       0xa261f000,
+       0x7c74b75f,
+       0xb741020b,
+       0xd0105dc5,
+       0xc09aabc1,
+       0x75c00a44,
+       0x91e2c000,
+       0xaa01d208,
+       0x5a08c200,
+       0xb74200ca,
+       0xb7426cb5,
+       0xb78263ad,
+       0xc000682d,
+       0xd20891a0,
+       0xc200aa01,
+       0x00ca5a08,
+       0x7a35b742,
+       0x712db742,
+       0x75adb782,
+       0x5cecb77f,
+       0xf0009dbd,
+       0xb77fa161,
+       0x9dbe5c74,
+       0xa261f000,
+       0x5b6cb79f,
+       0xf0009dcd,
+       0x000ba162,
+       0x482cb781,
+       0x5af4b71f,
+       0xf0009d8e,
+       0xf208a261,
+       0x75c0a8a9,
+       0x6e6cb53f,
+       0x573ab749,
+       0xc2000203,
+       0x9d4b5a10,
+       0x0a7cc002,
+       0x2a01cffc,
+       0xd0205910,
+       0x097c0148,
+       0x2901cffe,
+       0x0528c101,
+       0xc1010203,
+       0x0a0c6525,
+       0xc2002a71,
+       0x5d055890,
+       0x91a2c000,
+       0x5e2cb783,
+       0x048b0e82,
+       0x2a00e003,
+       0x4442b315,
+       0xc0000583,
+       0x9ea992e0,
+       0x6115c301,
+       0x41cdb784,
+       0x08aed0f2,
+       0x7d00c005,
+       0x2c81cffc,
+       0x90a2c000,
+       0xc0000683,
+       0xc1019080,
+       0xc1010692,
+       0x05850092,
+       0xc098020b,
+       0x9ea80a10,
+       0xa801d208,
+       0x4b4cb781,
+       0x740009c2,
+       0x09b8d021,
+       0xd0117502,
+       0xc0001124,
+       0x02079102,
+       0x5920c180,
+       0x3a20c081,
+       0xb77f3144,
+       0x9dbd61ec,
+       0xa161f000,
+       0xb7859ea8,
+       0xb7647ec8,
+       0xb744664c,
+       0x750066cc,
+       0x92e2c000,
+       0xc0007400,
+       0x75c09282,
+       0x9102c000,
+       0x654cb764,
+       0x65ccb744,
+       0x9100c000,
+       0x9eba9ea8,
+       0x644cb764,
+       0x64ccb744,
+       0xc0008586,
+       0x85829080,
+       0x9ea80507,
+       0x644cb784,
+       0x6174b71f,
+       0x0639d110,
+       0xf0009d8e,
+       0x9ea8a261,
+       0x64ccb784,
+       0x60f4b71f,
+       0x0639d110,
+       0xf0009d8e,
+       0x9ea8a261,
+       0x654cb784,
+       0x72f4b71f,
+       0x0639d110,
+       0xf0009d8e,
+       0x9ea8a261,
+       0x65ccb784,
+       0x0639d110,
+       0x71f4b77f,
+       0xf0009dbe,
+       0xd110a261,
+       0xb71f0627,
+       0x9d8e7174,
+       0xa261f000,
+       0x0625d110,
+       0x70ecb75f,
+       0xf0009dad,
+       0x9ea8a261,
+       0xb78575c0,
+       0xc0007f48,
+       0xc01c9102,
+       0xc0007d3e,
+       0xc0009104,
+       0xc01c9140,
+       0xc0007d3e,
+       0x0d0290c4,
+       0xc0000a06,
+       0x0d0a9080,
+       0x9d6b0a02,
+       0xc0007480,
+       0x75009102,
+       0x90a2c000,
+       0xc0000906,
+       0x9d6f9100,
+       0xe0000902,
+       0xd00131c6,
+       0x9e530922,
+       0x32384a04,
+       0x32445908,
+       0x6074b77f,
+       0xf0009dbe,
+       0x020ba261,
+       0x0a58c096,
+       0xa901d208,
+       0x5ff4b71f,
+       0x5a08c100,
+       0xf288024a,
+       0xd110aa11,
+       0x9d8e0619,
+       0xa261f000,
+       0x012a590c,
+       0xa951f0c8,
+       0xb73f0114,
+       0x9d9d6fec,
+       0xa161f000,
+       0x7074b75f,
+       0xf0009dae,
+       0x020ba161,
+       0x0a50c096,
+       0xa901d208,
+       0x5f6cb77f,
+       0x0124d020,
+       0x5e08d122,
+       0xf2c8024a,
+       0xd110aa11,
+       0x9dbd0659,
+       0xa261f000,
+       0x012a5908,
+       0xa951f088,
+       0x5ef4b77f,
+       0x0515d110,
+       0xf0009dbe,
+       0x0d04a161,
+       0xc1015d08,
+       0xf0d0052a,
+       0xb79fa952,
+       0x05545e6c,
+       0xf0009dcd,
+       0xb75fa162,
+       0xb75f7b6c,
+       0x00aa5df4,
+       0x48adb721,
+       0xf0009dae,
+       0x9ea8a0e1,
+       0x63ccb784,
+       0x28c0f211,
+       0x9004c001,
+       0xc0007400,
+       0xb73f93a4,
+       0x9d1e72f4,
+       0xb75faa61,
+       0x9dad716c,
+       0xa261f000,
+       0x71f4b75f,
+       0xaa619d2e,
+       0x70ecb77f,
+       0xf0009dbd,
+       0xb77fa261,
+       0x9d3e6ff4,
+       0xb71faa61,
+       0x9d8d706c,
+       0xa261f000,
+       0x7aecb71f,
+       0x7becb75f,
+       0x510cb780,
+       0x5b32b722,
+       0xb701000b,
+       0xc840622c,
+       0xb780a9c7,
+       0x9dc0520c,
+       0x566cb51f,
+       0xb75f7604,
+       0xc8407274,
+       0xf210a846,
+       0xd810a965,
+       0xb55faac2,
+       0xc00156ec,
+       0xb7609104,
+       0xb7405b8c,
+       0x09025c14,
+       0x4018b960,
+       0xaa45e030,
+       0x6a74b77f,
+       0xf0009dbe,
+       0x9e50a261,
+       0x69f4b77f,
+       0xaa45e000,
+       0xf0009dbe,
+       0x0910a261,
+       0x9201ffff,
+       0x6decb79f,
+       0x0976c074,
+       0x0a40c014,
+       0x0a00c021,
+       0xf0009dcd,
+       0xc001a161,
+       0x9d509060,
+       0xc0007506,
+       0xc00193e4,
+       0xc0210906,
+       0xc4d00a02,
+       0xc0140900,
+       0x9dcd0a20,
+       0xa161f000,
+       0x0932c02c,
+       0x9dcd0a10,
+       0xa161f000,
+       0x097ec002,
+       0x9dcd0a10,
+       0xa161f000,
+       0xb71f0a02,
+       0x9d8d736c,
+       0xa261f000,
+       0x8e28f011,
+       0xc0017502,
+       0xc0019072,
+       0xc0210906,
+       0xcca00a02,
+       0xc0140900,
+       0x9dcd0a20,
+       0xa161f000,
+       0x091ac040,
+       0x9dcd0a10,
+       0xa161f000,
+       0x097ec002,
+       0x9dcd0a10,
+       0xa161f000,
+       0xb781000b,
+       0xb75f60ac,
+       0x1a04736c,
+       0x9dad2a1c,
+       0xa261f000,
+       0xb75f9e78,
+       0xb74073f4,
+       0x0205622c,
+       0x3a00c101,
+       0xf0009dae,
+       0x9daea261,
+       0xa161f000,
+       0x62acb780,
+       0x696cb77f,
+       0xf0009dbd,
+       0xb780a261,
+       0xb77f632c,
+       0x9dbe68f4,
+       0xa261f000,
+       0xaa69f210,
+       0x686cb71f,
+       0xf0009d8d,
+       0x020ba261,
+       0x0a0cc098,
+       0xaa01d208,
+       0xc0007500,
+       0x74409222,
+       0x91c2c000,
+       0xb781008b,
+       0xb75f62ad,
+       0xc020746c,
+       0x9dad3a00,
+       0xa261f000,
+       0x9140c000,
+       0xb781000b,
+       0xb73f62ac,
+       0x9d9d746c,
+       0xa261f000,
+       0xb781000b,
+       0xb73f632c,
+       0x9d9d67ec,
+       0xa261f000,
+       0x532ab78c,
+       0x63acb741,
+       0xc0017500,
+       0xc00190c2,
+       0xc0007c82,
+       0x097e90c4,
+       0xc0009e92,
+       0xd3f29220,
+       0x0a7e292e,
+       0xcff09ea3,
+       0x76be2900,
+       0xb3235921,
+       0x74be4846,
+       0x4426b324,
+       0x01090507,
+       0x3d04c001,
+       0xc1009e50,
+       0x32085a20,
+       0x74ecb73f,
+       0xf0009d9d,
+       0xc000a261,
+       0xb75f90e0,
+       0x9dae74f4,
+       0xa161f000,
+       0xb781000b,
+       0xb73f652c,
+       0x9d9d676c,
+       0xa261f000,
+       0x65acb781,
+       0x66ecb75f,
+       0xf0009dad,
+       0xd011a261,
+       0xe0126602,
+       0xb77f8db2,
+       0xc1016f6c,
+       0xb55f05b8,
+       0xb55f7d7c,
+       0xc0b47de4,
+       0xd1109a24,
+       0xb77f0451,
+       0x5820566c,
+       0x2800cff0,
+       0xb77f3006,
+       0x9dbe6674,
+       0xa061f000,
+       0xb781000b,
+       0xb71f662c,
+       0x9d8e65f4,
+       0xa261f000,
+       0x5e20d2a2,
+       0x56ecb73f,
+       0x2a00cff0,
+       0x6574b73f,
+       0x9d9e3242,
+       0xa261f000,
+       0x672cb781,
+       0x64ecb75f,
+       0xf0009dad,
+       0xb783a261,
+       0xb75f532a,
+       0x9dae6474,
+       0xa261f000,
+       0x0902c021,
+       0x0950c012,
+       0xf0009dad,
+       0xb77fa261,
+       0xb75f7dec,
+       0x74c47d7c,
+       0x9004c001,
+       0x642cb781,
+       0x63f4b77f,
+       0xf0009dbe,
+       0xb784a261,
+       0x75026cac,
+       0x9162c000,
+       0x64acb781,
+       0x75ecb71f,
+       0xf0009d8d,
+       0xc000a261,
+       0xc0019160,
+       0xcffe0a0e,
+       0xb71f0a7c,
+       0x9d8e75f4,
+       0xa261f000,
+       0x75c0020b,
+       0x0a44c09a,
+       0x93c2c000,
+       0xaa01d208,
+       0x76f4b73f,
+       0x5a08c200,
+       0xb78000ca,
+       0x9d9e7aad,
+       0xa261f000,
+       0x7f2db780,
+       0x786cb75f,
+       0xf0009dad,
+       0xb721a261,
+       0xb75f43ad,
+       0x9dae7774,
+       0xa0e1f000,
+       0x9380c001,
+       0xa902d208,
+       0x7868b77e,
+       0x76f4b77f,
+       0xd3f15d08,
+       0xc100293e,
+       0xd1105a0c,
+       0xc00204ab,
+       0xb7400a7c,
+       0xcffc7ab5,
+       0xc3012a01,
+       0xc1016245,
+       0x9dbe0244,
+       0xa261f000,
+       0x692bd012,
+       0x0d0c9d53,
+       0xb7605d0b,
+       0xc2007f2d,
+       0xc1015a18,
+       0xb71f6245,
+       0x0246786c,
+       0xf0009d8d,
+       0xc301a261,
+       0xb7216125,
+       0x012443ad,
+       0x097cc002,
+       0x2901cffc,
+       0xb71f0122,
+       0x9d8e7774,
+       0xa161f000,
+       0xa96df210,
+       0x62ecb73f,
+       0xf0009d9d,
+       0x9ea9a161,
+       0x6274b75f,
+       0x66cdb781,
+       0xf0009dae,
+       0xb71fa261,
+       0xb7857aec,
+       0x75007fa8,
+       0x9164c000,
+       0x4649b78a,
+       0xc0007502,
+       0xc08090c4,
+       0xf2103900,
+       0xc7fea16d,
+       0xb71f0a7e,
+       0x9d8e7a74,
+       0xa261f000,
+       0x0a02c401,
+       0x0a00c500,
+       0x79ecb73f,
+       0xf0009d9d,
+       0xfe14a261,
+       0xb75f98d8,
+       0xb7807bec,
+       0xb77f528c,
+       0x02287b6c,
+       0x78ecb59f,
+       0x520cb780,
+       0xb59f0228,
+       0xb7805bec,
+       0xd020510c,
+       0xb78003a8,
+       0x0238548c,
+       0x586cb59f,
+       0x538cb780,
+       0xb78003a8,
+       0x0268560c,
+       0x5d6cb59f,
+       0x9380c009,
+       0x1a047480,
+       0xd0010802,
+       0x0c020802,
+       0xd0017088,
+       0x74000c02,
+       0x6b6cb51f,
+       0x9142c000,
+       0xb762008b,
+       0xb74c5b2b,
+       0x09065333,
+       0x9080c002,
+       0x5d74b73f,
+       0xc0a4020b,
+       0xd2080a1c,
+       0xb780a901,
+       0x71044049,
+       0x93c8c001,
+       0xb78c00dc,
+       0xc0604929,
+       0x750008c0,
+       0x9204c000,
+       0x4029b780,
+       0xc0007500,
+       0x000b9164,
+       0x532ab78c,
+       0x75000d02,
+       0x0d22d002,
+       0x9060c000,
+       0x008b0d06,
+       0xaa61da10,
+       0x5b2bb742,
+       0xda100244,
+       0xc000a261,
+       0xb73f9160,
+       0xda107274,
+       0xb780a1e1,
+       0x0a04404b,
+       0x404bb580,
+       0xa929f208,
+       0xaa61da10,
+       0x11c47104,
+       0x9228ffff,
+       0xb762000b,
+       0x09025b2a,
+       0x9e919eb3,
+       0xa01e9e41,
+       0x9a98fdf4,
+       0x5874b71f,
+       0xc0219e74,
+       0xb7400a00,
+       0xc016404c,
+       0x9dcd0a00,
+       0xa161f000,
+       0xfe149eb3,
+       0x058d9898,
+       0xc4000992,
+       0xfd740d02,
+       0xc4009a12,
+       0xb73f0a02,
+       0x9d9d7a6c,
+       0xa261f000,
+       0x78f4b73f,
+       0xaa61da08,
+       0xb740000b,
+       0x0a04404b,
+       0xa261da08,
+       0xb5400904,
+       0xb742404b,
+       0xcffe5baa,
+       0x70882a7c,
+       0x91e4c000,
+       0xda080a02,
+       0xb73fa261,
+       0xb7407bec,
+       0x0114530c,
+       0xaa41d808,
+       0xd8080a04,
+       0xb73fa241,
+       0xb7807c74,
+       0xb75f530c,
+       0xb7607bec,
+       0xc8404051,
+       0x76c0aa45,
+       0x90a2c000,
+       0xc0009ea5,
+       0xb7209100,
+       0xb724430c,
+       0xd0206c2d,
+       0xb75f02c2,
+       0x76806b74,
+       0x9024c001,
+       0xa961da08,
+       0xb762000b,
+       0x74825baa,
+       0xd0010d02,
+       0x74c20d22,
+       0x1a44d001,
+       0x4442b332,
+       0x90a2c000,
+       0xd00a7482,
+       0x76c01a42,
+       0x90e4c000,
+       0x430cb720,
+       0x6c2db724,
+       0x9ea30242,
+       0xfe74018d,
+       0xb7209a99,
+       0x0203430c,
+       0x0a18c0a4,
+       0xaa01d208,
+       0xc0017500,
+       0xb71f9322,
+       0x02035d74,
+       0x0a1cc0a4,
+       0xa901d208,
+       0x4048b780,
+       0xc0027104,
+       0xb73f91e8,
+       0xb75f78f4,
+       0xb7405bf4,
+       0xd810404b,
+       0x7088aa41,
+       0x9088c002,
+       0xaa61da08,
+       0xc0017500,
+       0xb70993e4,
+       0x058b6a2d,
+       0x9e84018d,
+       0xb7209c62,
+       0xb781430c,
+       0x1a105dad,
+       0xc0007502,
+       0xb78c90f2,
+       0x7500532b,
+       0x9184c001,
+       0x550cb780,
+       0x9eb39e80,
+       0xa046c240,
+       0x9040c001,
+       0xb78c009c,
+       0x75004829,
+       0x93c2c000,
+       0xb781008b,
+       0xb7405dad,
+       0x7504550c,
+       0x9124c000,
+       0x0a44c002,
+       0xc2209ea1,
+       0xc000a0c6,
+       0x02649180,
+       0xa901d208,
+       0x09080d7e,
+       0xc8109e93,
+       0xd2087286,
+       0x9eb3a102,
+       0x9be3fdf4,
+       0x9b7dfdf4,
+       0x78ecb79f,
+       0x5becb71f,
+       0x430cb7a0,
+       0xa901da08,
+       0x402ab780,
+       0xfff57088,
+       0x020b9366,
+       0x0a38c0a2,
+       0xaa01d208,
+       0xc0007500,
+       0x0a0690a2,
+       0x9200c000,
+       0x0109025c,
+       0x0920c0a2,
+       0x0a40c0a2,
+       0xaa05d208,
+       0xa951d008,
+       0x0a027104,
+       0x0a42d001,
+       0x03899eb3,
+       0x9ba1fdf4,
+       0x0992058d,
+       0x0d02c100,
+       0x991bfd74,
+       0x2bfccffe,
+       0x0a02c100,
+       0x7a74b71f,
+       0xf0009d8e,
+       0x0a86a261,
+       0x6d6cb73f,
+       0xf0009d9d,
+       0xb73fa2e1,
+       0x9d9e6cf4,
+       0xa2e1f000,
+       0x59f4b77f,
+       0x09f2c006,
+       0x010b0d02,
+       0x9913fcf4,
+       0x09f2c038,
+       0x010b0d02,
+       0xfcf4058d,
+       0xb75f990c,
+       0xb7807c74,
+       0xb77f530c,
+       0xd0107bec,
+       0xc840a941,
+       0x7480aa65,
+       0xc0001a04,
+       0xb7209144,
+       0xcffe430c,
+       0xb7242a7c,
+       0x00c26c2d,
+       0xcffe0203,
+       0x9ea32a7c,
+       0x018d9eaa,
+       0x99c4fe74,
+       0xc00075c0,
+       0x010f90a4,
+       0x9280c000,
+       0x430cb720,
+       0x7ea9b785,
+       0xc0007500,
+       0x010b90a4,
+       0x9140c000,
+       0x7c74b77f,
+       0xd0100902,
+       0x7500aa61,
+       0x0922d001,
+       0x75c09e95,
+       0x2efccffe,
+       0x9124c000,
+       0x430cb720,
+       0x6729b786,
+       0xc0027500,
+       0xc0089042,
+       0xb79f0a82,
+       0x9dcd7a6c,
+       0xa2e1f000,
+       0x7974b7ff,
+       0xaa619d7e,
+       0x3a40c002,
+       0xf0009dfe,
+       0xc401a261,
+       0xc0080a02,
+       0xb71f0a00,
+       0x9d8d79ec,
+       0xa261f000,
+       0x09929eaa,
+       0xfd74058d,
+       0x0a029898,
+       0x79f4b71f,
+       0xf0009d8e,
+       0xb73fa261,
+       0x9d9d7a6c,
+       0xa2e1f000,
+       0x6c74b73f,
+       0xaa619d1e,
+       0x6becb75f,
+       0xa9629d2d,
+       0xc0007680,
+       0xb77f91c2,
+       0xc2006aec,
+       0x2a7c5a35,
+       0xa961f008,
+       0x1525d110,
+       0xc00012a8,
+       0x0a829060,
+       0x430cb740,
+       0x09869eb3,
+       0x093cc0a2,
+       0xaa41d008,
+       0xd0080a04,
+       0xb740a241,
+       0x012c430c,
+       0x0960c050,
+       0xaa41d008,
+       0xd0080a04,
+       0xfdb4a241,
+       0x75c09a03,
+       0x9322c000,
+       0x430cb720,
+       0x590cd2a4,
+       0x79adb784,
+       0x0244c101,
+       0x79adb584,
+       0x430cb780,
+       0x7b6cb71f,
+       0xc09c0208,
+       0xf2080a40,
+       0xc101a901,
+       0xf2080524,
+       0x7740a102,
+       0x9242c000,
+       0x430cb780,
+       0xc0a29ea2,
+       0xc0a40a3c,
+       0xd2080d20,
+       0xd010a901,
+       0x7088aa41,
+       0xb3540a02,
+       0x9ea54828,
+       0x4314b700,
+       0x5dccb781,
+       0x75021a10,
+       0x9132c000,
+       0x534ab78c,
+       0xc0007500,
+       0xb7a49082,
+       0xb74076cc,
+       0xb75f560c,
+       0xb77f7bf4,
+       0xc2207c6c,
+       0x9e44a8c5,
+       0x5314b720,
+       0xc0960092,
+       0xc1010a50,
+       0xb72a0090,
+       0xc810532b,
+       0xd208a8ca,
+       0xd008a902,
+       0xc101aa61,
+       0xb70a040c,
+       0x75004c50,
+       0x1492c101,
+       0x9eb30103,
+       0x0a029e69,
+       0x0a42d001,
+       0x2cfccffe,
+       0xa01e018b,
+       0xa395a219,
+       0x98abfdf4,
+       0xc00175c0,
+       0xb7209042,
+       0xb7ff4314,
+       0x9d0b7b74,
+       0xd0109eb3,
+       0x099204f2,
+       0x6eadb729,
+       0x0971cfe8,
+       0x6919d032,
+       0x05220212,
+       0x0d00c138,
+       0xa952d010,
+       0xc1010242,
+       0xc2000244,
+       0xd1205a08,
+       0xb74900c3,
+       0xfd146fd5,
+       0xb72099ac,
+       0xb743430c,
+       0x76805733,
+       0x9184c006,
+       0x5eadb783,
+       0x09028782,
+       0xe00a7502,
+       0x9d6087b2,
+       0xd0017504,
+       0x75080922,
+       0xd0010a02,
+       0x74000a42,
+       0x3128d040,
+       0x90a2c000,
+       0xc0009e54,
+       0x9dc090e0,
+       0x76000a06,
+       0x0a42d001,
+       0x853ec001,
+       0x5a08c200,
+       0xcfc00e82,
+       0xb59f8500,
+       0xb96058ec,
+       0xd3f14018,
+       0x75062e5e,
+       0x12dad011,
+       0x90c2c000,
+       0x756cb73f,
+       0xaae19d1d,
+       0x7674b73f,
+       0xa9e19d1e,
+       0x77ecb75f,
+       0xa9e29d2d,
+       0x58f4b75f,
+       0x4314b720,
+       0x045ad010,
+       0x0400042a,
+       0x0482d010,
+       0x0083d120,
+       0x57abb723,
+       0x7bcbb783,
+       0x9d489e9a,
+       0x2d7cc03e,
+       0xc1011242,
+       0xb5830244,
+       0xb7207bcb,
+       0x49044314,
+       0xd0105908,
+       0xd1200482,
+       0xc1010083,
+       0xb783012a,
+       0xb7237dcb,
+       0xd0205dab,
+       0x9d4b0124,
+       0x21b41242,
+       0x024659a9,
+       0x7dcbb583,
+       0x4314b720,
+       0xc03e010b,
+       0xd010297c,
+       0xd1200482,
+       0xb7230083,
+       0xb78367ab,
+       0x07877fcb,
+       0x2ffcc03e,
+       0x02441242,
+       0x7fcbb583,
+       0x430cb720,
+       0x9d7e9d4f,
+       0x0402c101,
+       0x9ddf0082,
+       0x41abb784,
+       0x71d2b703,
+       0x25be2156,
+       0x59299dfc,
+       0x1240c101,
+       0x2ac0c3ff,
+       0x77c00244,
+       0x0e845da9,
+       0x59d1c280,
+       0x41abb584,
+       0x91c4c001,
+       0x4314b720,
+       0x04a2d010,
+       0x0083d120,
+       0x63abb723,
+       0x43cbb784,
+       0xc3011242,
+       0xb5840246,
+       0xb72043cb,
+       0xd0104314,
+       0xd12004a2,
+       0xb7230083,
+       0xb7846dab,
+       0x124245cb,
+       0x0246c101,
+       0x45cbb584,
+       0x4314b720,
+       0x04a2d010,
+       0x0083d120,
+       0x77abb723,
+       0x47cbb784,
+       0x02461242,
+       0x47cbb584,
+       0x93e1fffa,
+       0x4314b700,
+       0xc0a29e44,
+       0xd2080a38,
+       0x7500aa01,
+       0x9204c000,
+       0x060dd110,
+       0x560cb700,
+       0x0a20c0a2,
+       0xaa11d208,
+       0xa945c200,
+       0x70881a04,
+       0x9038c002,
+       0xc00175c0,
+       0xb73f9202,
+       0xb74d7b74,
+       0xb7606c50,
+       0xd0104490,
+       0x018d0490,
+       0x6eb5b729,
+       0x6d19d031,
+       0x2cfcc00e,
+       0x0120c101,
+       0x0900c138,
+       0xa951d008,
+       0x9a93fd54,
+       0x430cb740,
+       0x7b6cb77f,
+       0xb78900b4,
+       0x6a326ead,
+       0xc1380244,
+       0x097f0a00,
+       0xa111d208,
+       0x430cb720,
+       0x0a7ec00e,
+       0xb58900b2,
+       0xc0006ead,
+       0xb77f9200,
+       0x097f7b74,
+       0x04b0d010,
+       0x6eadb789,
+       0xc1016a32,
+       0xc1380240,
+       0xd2080a00,
+       0xb740a111,
+       0x0a7f430c,
+       0x560cb700,
+       0x02059ea0,
+       0xa046c200,
+       0x0a38c0a2,
+       0xaa01d208,
+       0xc0007500,
+       0x9e9292a4,
+       0xc0a20205,
+       0xc0a40a3c,
+       0xd2080d20,
+       0xd010a901,
+       0x7088aa41,
+       0x9108c000,
+       0xfdf49eb3,
+       0x74009885,
+       0x9164ffa6,
+       0x6eecb73f,
+       0xb5800a1a,
+       0xb72041ad,
+       0x0203430c,
+       0x0a38c0a2,
+       0xaa01d208,
+       0xc0017500,
+       0xb76a9044,
+       0xb74a4729,
+       0xb72046a9,
+       0x9ea34794,
+       0xc0000d06,
+       0xb7809120,
+       0x07875aad,
+       0xb327750c,
+       0x050f4842,
+       0x6a29d051,
+       0xc1017086,
+       0xd01100c2,
+       0x01090a22,
+       0x297cc00e,
+       0x91f4ffff,
+       0xc0007680,
+       0xb7809162,
+       0xb7404488,
+       0x6a52478c,
+       0x09060244,
+       0xa115f248,
+       0xc0029e72,
+       0xc0210a02,
+       0x9dad0900,
+       0xa261f000,
+       0x1a00c002,
+       0xf0009dad,
+       0xb740a261,
+       0x0a86430c,
+       0x52b8c200,
+       0x0904c136,
+       0xa942d008,
+       0x424a0a7f,
+       0x22409e50,
+       0xa241d008,
+       0x9863fdf4,
+       0x29ded3f2,
+       0x99b3fd74,
+       0x67eeb79f,
+       0x686eb7bf,
+       0x68eeb7df,
+       0x696eb7ff,
+       0x8461cfe6,
+       0xa6059c22,
+       0x9a00fcd4,
+       0x0a02c021,
+       0xc0100906,
+       0x9dcd0a00,
+       0xa161f000,
+       0xfcf40d82,
+       0x0d8a9b65,
+       0x99fcfcd4,
+       0xc0210902,
+       0xb5400a02,
+       0xc020438c,
+       0x9dcd0a00,
+       0xa161f000,
+       0x0a40c01c,
+       0xaa619d4d,
+       0x0a82c021,
+       0x2a7ec00f,
+       0x450cb580,
+       0x0ae0c004,
+       0xaae19d5d,
+       0x9eab2afc,
+       0x9b77fd34,
+       0x4e0cb780,
+       0x4038b960,
+       0xa281d208,
+       0x0a00c146,
+       0x9381ffff,
+       0x0a02c021,
+       0x0a50c006,
+       0xaa619d4d,
+       0xc0007d1e,
+       0xc02192c2,
+       0xc0060a02,
+       0x9d4d0a40,
+       0x090aa962,
+       0x0a40c008,
+       0xf0009dcd,
+       0x76bfa161,
+       0x90e2c000,
+       0x1a70c00c,
+       0xf0009dcd,
+       0xc401a162,
+       0xc0210a02,
+       0xcff00902,
+       0x09200a00,
+       0xf0009dad,
+       0xb720a261,
+       0x0a02578c,
+       0x4a14b740,
+       0xb5809ea3,
+       0xb5804588,
+       0x28e14688,
+       0x851a0189,
+       0x0ac2c03c,
+       0x0802c058,
+       0x0c02c01c,
+       0x0c82c014,
+       0x4058b960,
+       0x2d3ed3f1,
+       0xa147f010,
+       0xd0107480,
+       0xc000a141,
+       0x9e4b90e4,
+       0xa0ddf1d0,
+       0x9240c000,
+       0xaa49f1d0,
+       0x0a1c7482,
+       0x2a610246,
+       0xa25df1d0,
+       0x4822b303,
+       0x90c2c000,
+       0x018b7492,
+       0x4432b303,
+       0x0d500d84,
+       0x9001ffff,
+       0x0a02c021,
+       0xc0100a82,
+       0x9dcd0a10,
+       0xa2e1f000,
+       0x9dcd0a10,
+       0xa2e1f000,
+       0x0952c123,
+       0x0960c566,
+       0x9dcd1a20,
+       0xa161f000,
+       0x99c1fcd4,
+       0x0926c829,
+       0x0920cc42,
+       0xaa41f008,
+       0xc0007500,
+       0x0a0490a2,
+       0xa241f008,
+       0x9acbfd94,
+       0xfcd49eab,
+       0x000b994f,
+       0x7f6eb79f,
+       0x7feeb7bf,
+       0x9c228c40,
+       0x4314b720,
+       0xd0109e9a,
+       0xb78c0494,
+       0x75004829,
+       0x9342c000,
+       0x6e4db746,
+       0xc0c89e4c,
+       0xd2080a38,
+       0x0908aa01,
+       0x7104d010,
+       0x6e4db586,
+       0x430cb720,
+       0x550cb780,
+       0x6e2db746,
+       0xaa65c040,
+       0x7104d012,
+       0x6e2db586,
+       0x430cb700,
+       0x6e2cb706,
+       0xa6059c22,
+       0x430cb7a0,
+       0x9e9d0d86,
+       0x98aafed4,
+       0xb506008b,
+       0xb7206e2d,
+       0xd0104314,
+       0xb78c049a,
+       0x75004829,
+       0x9082c001,
+       0x6e4db786,
+       0xc0c89e4a,
+       0xd0080938,
+       0x0a08a941,
+       0x7104d010,
+       0x6e4db586,
+       0x430cb720,
+       0x550cb740,
+       0xb7869e6b,
+       0xc0206e2d,
+       0xd012a965,
+       0xb5867088,
+       0xb7206e2d,
+       0x0908430c,
+       0x6e2db786,
+       0x7104d010,
+       0x6e2db586,
+       0x4314b760,
+       0xc0d60986,
+       0xfeb40dc0,
+       0xb7209a0e,
+       0xb786430c,
+       0xb58d6e2d,
+       0xb70048ab,
+       0xb706430c,
+       0xb79f6e2c,
+       0xb7bf7f6e,
+       0x8c407fee,
+       0xa61d9c22,
+       0x8420c002,
+       0x430cb7e0,
+       0xaa41d810,
+       0xa945d810,
+       0x9eb9008f,
+       0xb7419e55,
+       0xb57f5e35,
+       0xb7267c6c,
+       0x024468d5,
+       0x00897684,
+       0x7d74b53f,
+       0xcffe9e5e,
+       0xf20828fc,
+       0xc000a932,
+       0x9eb99244,
+       0x584bb78d,
+       0x6ccdb746,
+       0x0629d110,
+       0x584bb58d,
+       0xaa35f208,
+       0xb5460128,
+       0xc0006ccd,
+       0x9eb99120,
+       0x5853b54d,
+       0xaa35f208,
+       0x6ccdb586,
+       0xf2489eb9,
+       0xb786a9a1,
+       0xb7466ecd,
+       0xb7466f4d,
+       0x02466dd5,
+       0x6ecdb586,
+       0xa9a5f248,
+       0x6e4db786,
+       0x59d5b766,
+       0xb5460126,
+       0xda086f4d,
+       0x0242a925,
+       0x6e4db586,
+       0x0524c101,
+       0x6dd5b546,
+       0xa931f208,
+       0xaa35f208,
+       0x5905d0a4,
+       0x02440183,
+       0x05b8c101,
+       0x59d5b566,
+       0xaa39da08,
+       0xa9beda08,
+       0x05b8c101,
+       0xc07405b4,
+       0x008f9b1d,
+       0x68adb786,
+       0x6b2bb74c,
+       0x09040240,
+       0x68adb586,
+       0x6b2bb54c,
+       0x448cb780,
+       0x4314b720,
+       0xc0007500,
+       0x010990a4,
+       0x9180c000,
+       0x0902008b,
+       0x4030b960,
+       0x54a9b780,
+       0x01280884,
+       0x9381ffff,
+       0x5f4bb54d,
+       0xf2089eb9,
+       0xb786a935,
+       0xf2085ccd,
+       0xb766a932,
+       0x1244554d,
+       0x1244c101,
+       0x5ccdb586,
+       0x68d5b726,
+       0xb53f74c4,
+       0xc0167cf4,
+       0x008f91e2,
+       0x6fabb78c,
+       0xc0167500,
+       0xb7a09124,
+       0xf2084314,
+       0xf208a925,
+       0x048baa29,
+       0x4c4db766,
+       0x6bd3b7cc,
+       0xd1a40244,
+       0x9eb75985,
+       0x01c7d120,
+       0x2ffccffe,
+       0x9ac7c074,
+       0x6e65d171,
+       0x5c88d322,
+       0x024ec101,
+       0x5a08c200,
+       0x024ac101,
+       0xc101a01d,
+       0xc0e6009a,
+       0xd2480a40,
+       0xb746ab0d,
+       0x048b672d,
+       0x584bb76d,
+       0x5a53b74d,
+       0x6b53b72c,
+       0xba12112c,
+       0xa0924003,
+       0x672db546,
+       0x9e69a892,
+       0x066cd010,
+       0xa11a1514,
+       0xb72d9e9b,
+       0xc1015f2b,
+       0xba1b024a,
+       0xc12a4003,
+       0x76c00a20,
+       0xaa99da08,
+       0x7decb53f,
+       0x917cc001,
+       0xb786048b,
+       0x75006ccd,
+       0x90bcc001,
+       0x05b9d110,
+       0xc0745da0,
+       0x75409a8b,
+       0x90a4c000,
+       0xc0000101,
+       0x025a90e0,
+       0x0240024a,
+       0x590bc200,
+       0x066cd010,
+       0xc1017580,
+       0xc12a024a,
+       0xda080a20,
+       0xc000a119,
+       0x028190a4,
+       0x90e0c000,
+       0x02400200,
+       0xc200024c,
+       0xc00e5a8b,
+       0xc810097e,
+       0xd1717144,
+       0x9e696e65,
+       0x01cec101,
+       0x5a08c180,
+       0x024ac101,
+       0x0a40c0e6,
+       0xa10dd248,
+       0x7df4b73f,
+       0x5233b74d,
+       0x76400a02,
+       0x0a42d002,
+       0x682db746,
+       0x0244c101,
+       0x012aa91e,
+       0x682db546,
+       0xb58d7680,
+       0xc000522b,
+       0xb7869122,
+       0x9e494c2d,
+       0x70481a04,
+       0x9326c000,
+       0x04ecd010,
+       0xb74d048b,
+       0xc1015a4b,
+       0xb72e009a,
+       0x02365d2b,
+       0x024ac101,
+       0xc1140904,
+       0x0d060a00,
+       0xda08a116,
+       0xb54da091,
+       0xc0045a4b,
+       0x9e6990e0,
+       0x6cadb746,
+       0xc0007480,
+       0x0a169204,
+       0x7b6cb59f,
+       0x7becb55f,
+       0x5a2bb78d,
+       0xa0960c86,
+       0xb58d0a04,
+       0xc0005a2b,
+       0x0a029100,
+       0x7b6cb55f,
+       0x7becb59f,
+       0xb79fa215,
+       0xb75f7d6c,
+       0x11a87cec,
+       0x4002ba1b,
+       0x0a4ec002,
+       0x70c8cc10,
+       0x1a4cc002,
+       0x70c8cc12,
+       0x5d0cb780,
+       0x4002ba1b,
+       0xc84001b6,
+       0xe0b2a9e5,
+       0xba1b8d80,
+       0xff744002,
+       0xa99d9990,
+       0x8d80e0b2,
+       0x99bcff74,
+       0x8d80e0b2,
+       0x996ffe74,
+       0xc0120a16,
+       0xd1717008,
+       0xcffe6e65,
+       0xc101287c,
+       0x0248024e,
+       0x024ac101,
+       0xc1140289,
+       0xda080a80,
+       0x7580ab31,
+       0x9142c000,
+       0x01ecd020,
+       0x0d88098e,
+       0x05b0c101,
+       0x99cec074,
+       0x6de5d172,
+       0x5c88d322,
+       0x05b605be,
+       0xda0805ba,
+       0xc101a031,
+       0xc114009a,
+       0xd8100d80,
+       0xb787a9f2,
+       0x048b4dad,
+       0x594bb76c,
+       0x05b8c101,
+       0x15bcc101,
+       0xcc129e9a,
+       0xd01072c4,
+       0xc18006ec,
+       0xb5675a05,
+       0xc1014db5,
+       0xc10102da,
+       0xc07405b8,
+       0x008b99a2,
+       0x5d2bb50e,
+       0x6e65d171,
+       0x5d8cc300,
+       0x024ec101,
+       0x5a08c200,
+       0x00cac101,
+       0x4f2db7a7,
+       0xc0d205d6,
+       0xc00f0d80,
+       0x018b2afe,
+       0x98ceff74,
+       0x7640a896,
+       0x93e4c000,
+       0x6e69d091,
+       0x4038b960,
+       0x0659d110,
+       0xc12c9ea2,
+       0xf0100d50,
+       0xf090aa41,
+       0xf010a949,
+       0xf090a245,
+       0x1d10a14d,
+       0x92e1ffff,
+       0x6ce9d091,
+       0x009ac101,
+       0x602db5a9,
+       0xb549a91d,
+       0xd171572d,
+       0xa91d6e65,
+       0x024ec101,
+       0x5a08c200,
+       0x00cac101,
+       0x4f2db787,
+       0x297ec00f,
+       0xcff1a99d,
+       0x32442a00,
+       0xb587058b,
+       0xc0d24f2d,
+       0xff740dc0,
+       0xa91a98c6,
+       0xc0027680,
+       0x9e69917c,
+       0x662bb74d,
+       0x592bb78c,
+       0xa9116244,
+       0x75080244,
+       0x901cc002,
+       0x0a040205,
+       0x75062a0c,
+       0x9344c001,
+       0x9e510a18,
+       0x7102d010,
+       0x6d69d091,
+       0x4002ba24,
+       0x0555d110,
+       0x75020982,
+       0xd0109e92,
+       0x9e9b19c2,
+       0x0d10c130,
+       0x4418b333,
+       0x9140c000,
+       0xaa41f010,
+       0xa959f150,
+       0x01b80d10,
+       0x05b4c101,
+       0x9301ffff,
+       0xd01074c0,
+       0xc00004ec,
+       0xc1019184,
+       0xc12a021a,
+       0xc0100a20,
+       0xda080902,
+       0xc000a111,
+       0xc1019160,
+       0x5da0029a,
+       0x0aa0c12a,
+       0x9907c074,
+       0xa031da08,
+       0xb7869eb9,
+       0x7502554d,
+       0x9184c007,
+       0x430cb7a0,
+       0xb7cc0a10,
+       0x008b6b4b,
+       0x642bb74c,
+       0x6e2db726,
+       0xd00374ae,
+       0x61441a44,
+       0xd0137044,
+       0xc0001124,
+       0x9ea99146,
+       0x4c4db786,
+       0x70480228,
+       0xd0030902,
+       0x9ea90922,
+       0x664bb78c,
+       0x6bd3b7ac,
+       0xc0067500,
+       0x74809124,
+       0x9222c003,
+       0x6d53b76c,
+       0xc00276c0,
+       0xb7669324,
+       0xb7466f4d,
+       0xb7866ed5,
+       0xd110634d,
+       0x02480527,
+       0xc0027104,
+       0xd05191a8,
+       0x70c86e29,
+       0x9114c002,
+       0x6dcdb786,
+       0x6917d051,
+       0x71046a52,
+       0x9006c002,
+       0x7a4bb78c,
+       0xc0c8010b,
+       0xd0080928,
+       0x0a08a941,
+       0x19149ea2,
+       0x2d7ccffe,
+       0x72950a06,
+       0x6ccbb58c,
+       0x6e4bb58c,
+       0x90f6c000,
+       0x0e28d011,
+       0xcffe9ea2,
+       0xb79f2d7c,
+       0x9e52786a,
+       0x2a7ccffe,
+       0x00ca0248,
+       0x7a2bb72d,
+       0x0992d011,
+       0x7086cc12,
+       0x430cb740,
+       0xc0c80205,
+       0xd2080a38,
+       0xcc10aa01,
+       0xc0c870c8,
+       0xd0080934,
+       0xcc12aa41,
+       0xba1b70c8,
+       0xfe744002,
+       0x008b9889,
+       0x452bb50d,
+       0x7a2bb50c,
+       0xb7469ea9,
+       0xb7866355,
+       0xb7666ecd,
+       0xd0106f4d,
+       0x02460524,
+       0x0124c101,
+       0xc2000244,
+       0xb5865a09,
+       0xc002634d,
+       0x008b92e0,
+       0x6e2bb78c,
+       0xc0027500,
+       0xd2a29222,
+       0x9ea95c88,
+       0xb766009a,
+       0xb76c5bb5,
+       0xc074594b,
+       0x008b985f,
+       0xb766600d,
+       0xc00059ad,
+       0xb74d5a08,
+       0x70c84533,
+       0x91fcc000,
+       0x04dad010,
+       0xb72c009a,
+       0x08a0722b,
+       0xc0017293,
+       0xd0119036,
+       0xc0000e22,
+       0x02009340,
+       0xc00070c8,
+       0x9ea99336,
+       0x6acdb786,
+       0x50cdb746,
+       0x71040238,
+       0x9216c000,
+       0x04dad010,
+       0xb72c009a,
+       0x1890722b,
+       0xc0007293,
+       0xd01190fc,
+       0x9ea21e22,
+       0x2d7ccffe,
+       0xc0c8020b,
+       0xd2080a38,
+       0x9e52aa01,
+       0x7088d010,
+       0xc0c8010b,
+       0xd0080934,
+       0xd012a941,
+       0x008b7104,
+       0x452bb58d,
+       0x7beeb79f,
+       0x7c6eb7bf,
+       0x7ceeb7df,
+       0x7d6eb7ff,
+       0x8c20c004,
+       0xf0109c22,
+       0x9e5baa61,
+       0x430cb720,
+       0xc0007500,
+       0xb5869082,
+       0xd00875ad,
+       0xc01ca975,
+       0xc00074be,
+       0x020390e2,
+       0x0a44c0da,
+       0xa101d208,
+       0xa979d008,
+       0x74bec01c,
+       0x90e2c000,
+       0xc0da0203,
+       0xd2080a48,
+       0x0103a101,
+       0xc0da9e8a,
+       0x0a060920,
+       0xa241d008,
+       0x0d30c0dc,
+       0xd0101a04,
+       0xd008a241,
+       0x0203a971,
+       0x0a40c0da,
+       0xa101d208,
+       0xb7209c22,
+       0xd1104314,
+       0xb70c0497,
+       0xb78c7a4b,
+       0x75004829,
+       0x48a2b340,
+       0xc0c89e4c,
+       0xd2080a38,
+       0x9c22a801,
+       0xb7a0a60d,
+       0x9e5d4314,
+       0x058b0307,
+       0x0d80c0d8,
+       0x09b2c00e,
+       0x9971fcb4,
+       0x4314b760,
+       0x0992c00a,
+       0x0da0c0ca,
+       0x9969fcb4,
+       0x4314b760,
+       0x0982c002,
+       0x0d80c0d6,
+       0x9961fcb4,
+       0x4314b760,
+       0xc0d409d2,
+       0xfcb40db0,
+       0xb760995a,
+       0xc04c4314,
+       0xc0e609f2,
+       0xfcb40db0,
+       0x058b9952,
+       0xc0c4018b,
+       0xc0040df0,
+       0xfcb40d32,
+       0x9e689975,
+       0xb7869e69,
+       0x097f4f2c,
+       0xc001040b,
+       0x9e6c7520,
+       0x0c28c0c8,
+       0x0a44c0da,
+       0x0880c0de,
+       0xa101d208,
+       0xb5800a22,
+       0xb7604029,
+       0x9e6b4050,
+       0x1a48d00d,
+       0x050b0c82,
+       0x443ab421,
+       0xc0da9e69,
+       0xc0da09c8,
+       0x9e4d0d40,
+       0xa161d008,
+       0x018d9d0a,
+       0x7132b56c,
+       0xa0c2d010,
+       0x75b4b526,
+       0xc12a040b,
+       0xc01008c0,
+       0xd0080b02,
+       0x9e44a961,
+       0xc0da9e68,
+       0xd2080a4c,
+       0xd008a101,
+       0xb74daa61,
+       0xd0186db2,
+       0x7500a9c2,
+       0xd0020a02,
+       0xc1010a42,
+       0xb58d0244,
+       0xdffc6daa,
+       0xd0127e7e,
+       0xb7400d38,
+       0xd022430c,
+       0x020505a2,
+       0x0a38c0c8,
+       0xaa01d208,
+       0xd0109e58,
+       0xc0c87008,
+       0xd0080934,
+       0xd012a941,
+       0x0c847104,
+       0xb59a7644,
+       0xb5c0462b,
+       0xb5a0402b,
+       0x0984412b,
+       0x08880c04,
+       0x9124fffe,
+       0x430cb720,
+       0x642bb78c,
+       0xc000752a,
+       0x9e699112,
+       0xb58d0a16,
+       0xc000792b,
+       0x9e6890a0,
+       0x7932b52d,
+       0x0d029e69,
+       0x5035b766,
+       0x4dadb766,
+       0x9845fe94,
+       0x287ccffe,
+       0xc0100a7a,
+       0x1a747008,
+       0x7008c012,
+       0xb50e9e69,
+       0xfe7459ab,
+       0x9e6899a6,
+       0xb78c9e6a,
+       0xc0dc64aa,
+       0x75000940,
+       0xd0010a02,
+       0xb5800a42,
+       0xc006448c,
+       0xd0080a02,
+       0xb720a241,
+       0xb781430c,
+       0x75045ead,
+       0x93c4c000,
+       0x5f35b761,
+       0x4dacb7a6,
+       0x0992c006,
+       0xd1320d02,
+       0xb5a761d7,
+       0xc0024d2c,
+       0xfe140dc8,
+       0x9e699bd2,
+       0xb746000a,
+       0xb5074dad,
+       0x02244d2d,
+       0x7100d010,
+       0x7088c812,
+       0x4d2db547,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0xfe5b8c60,
+       0xa60d9060,
+       0x430cb7a0,
+       0x07079e9d,
+       0x030b008b,
+       0x6f2bb78c,
+       0x0b20c0da,
+       0xa941d208,
+       0x31c6e000,
+       0xd0020a02,
+       0x74800a42,
+       0x6bb3b54c,
+       0x6f2bb58c,
+       0x6fb3b5ac,
+       0x90e2c000,
+       0x99abfe74,
+       0xd2080a02,
+       0x7786a241,
+       0x92d2c001,
+       0x5d08d326,
+       0xe0508520,
+       0x94298044,
+       0x94059428,
+       0x0d829401,
+       0x90e0c001,
+       0xb78c008b,
+       0xb5ac5a2b,
+       0x75006f33,
+       0x9162c000,
+       0x430cb720,
+       0x67adb784,
+       0xc0007502,
+       0xc0009204,
+       0x9ea99100,
+       0x664bb78d,
+       0xc0007500,
+       0x008b9104,
+       0x612bb78d,
+       0xb58d1a04,
+       0xff34612b,
+       0x0d869b27,
+       0x90a0c000,
+       0x98a1ff54,
+       0xff340d8a,
+       0x9e8599bf,
+       0x430cb720,
+       0x02039e6a,
+       0x0a38c0c8,
+       0xaa01d208,
+       0x7088d010,
+       0xc0c80103,
+       0xd0080934,
+       0xcc12a941,
+       0x9ea97104,
+       0xb74c0207,
+       0xcffe684b,
+       0x9e9a2a7c,
+       0xb58d7480,
+       0xb58d7acb,
+       0xc0017a4b,
+       0x020b91a2,
+       0x0a0cc0ca,
+       0xaa01d208,
+       0xc0017299,
+       0x020390bc,
+       0x0a1cc0a4,
+       0xa901d208,
+       0xc0007482,
+       0xb78a93b4,
+       0x71044629,
+       0x9304c000,
+       0x52abb78a,
+       0xc0ca010b,
+       0x0a040908,
+       0x52abb58a,
+       0x430cb720,
+       0xa941d008,
+       0x52abb78a,
+       0x4002ba24,
+       0xc0007104,
+       0x1205911c,
+       0x9060c000,
+       0xb58a0a02,
+       0x9e5052ab,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0x8420a61d,
+       0x4314b7a0,
+       0x00b6a19d,
+       0xb78c040b,
+       0xc1016fca,
+       0x9e5b009a,
+       0xb7cd7500,
+       0xb76c7a2b,
+       0xb72c6bd2,
+       0xc000594a,
+       0xb7869184,
+       0x7502704c,
+       0x91b2c000,
+       0x614ab78d,
+       0xc0007502,
+       0x048b9112,
+       0x554db786,
+       0xc0087504,
+       0x040b92a4,
+       0x554cb786,
+       0xc0007502,
+       0x750490f4,
+       0x9184c008,
+       0x9360c005,
+       0xc00074c0,
+       0x9e6991c4,
+       0x5cadb786,
+       0x7a2bb7cc,
+       0xd00e7500,
+       0xc0070a62,
+       0xc007935c,
+       0x048b9360,
+       0x6e4bb78c,
+       0xc0007500,
+       0xb7cd90c2,
+       0xc0014553,
+       0x040b93e0,
+       0x5cccb786,
+       0xd00e7500,
+       0xc0010a62,
+       0xba1b929c,
+       0xff544003,
+       0xb72099a8,
+       0x9e82430c,
+       0x5e2db781,
+       0xc0007508,
+       0xb7819344,
+       0x1a045ead,
+       0xc0007502,
+       0xcffe9292,
+       0xd0d12d7c,
+       0x9e510964,
+       0x7044c810,
+       0xb78d048b,
+       0xba24794b,
+       0x12684002,
+       0x7088c812,
+       0xc0009e96,
+       0x040b9220,
+       0x794ab74d,
+       0x2d7ccffe,
+       0xba129e51,
+       0x02644002,
+       0x7048d010,
+       0xd0121164,
+       0x9ea67104,
+       0x2f7ccffe,
+       0x430cb720,
+       0xb78c048b,
+       0xb741644b,
+       0x0b9a5e2d,
+       0xd009752a,
+       0x74881bf6,
+       0x92c4c000,
+       0x5eadb781,
+       0x75021a04,
+       0x9212c000,
+       0x7a4bb78c,
+       0x03fed020,
+       0xd019753c,
+       0xb374027e,
+       0xd0194434,
+       0x0389024e,
+       0x9060c000,
+       0x040b9ebf,
+       0x4d4cb7a7,
+       0xc0017540,
+       0xb72c9222,
+       0xa09a5952,
+       0x6b4ab76c,
+       0xc2009e4c,
+       0x70c85a0d,
+       0x90d4c001,
+       0x402db743,
+       0x5a0cc100,
+       0xc000710a,
+       0xd1a493f4,
+       0xc1015985,
+       0xc05405b4,
+       0xa9199952,
+       0x700a6005,
+       0x9286c000,
+       0xb74c040b,
+       0xd0117a4a,
+       0x9ea60e68,
+       0xcffe7184,
+       0xc0002f7c,
+       0xc00290d2,
+       0xc0000fca,
+       0x126490a0,
+       0x0bc4d0d2,
+       0x9e739e69,
+       0x7a2bb74c,
+       0x0675d110,
+       0x70c8d010,
+       0xc002112e,
+       0x040b9180,
+       0x5e4cb781,
+       0xc0027508,
+       0xb78d9162,
+       0xb746584a,
+       0xb74c6ccc,
+       0xba246b52,
+       0xe0004002,
+       0xc10103c4,
+       0xc0011194,
+       0x74c093a2,
+       0x9342c001,
+       0x5cd4b766,
+       0xcc120f06,
+       0xc18072cc,
+       0xc1015a05,
+       0xc05405b8,
+       0x9e82990e,
+       0x4002ba2e,
+       0x018b9ebb,
+       0x98d8fe54,
+       0x6a67d011,
+       0xc2000208,
+       0x9ea25a0b,
+       0x2d7ccffe,
+       0xc000729d,
+       0x700c91e4,
+       0x9182c000,
+       0x0a7ecffe,
+       0xb346700c,
+       0xd110444a,
+       0x9ea2066d,
+       0x2d7ccffe,
+       0x9e539e69,
+       0x7a2bb74c,
+       0x0a26d011,
+       0x70c8d010,
+       0xd012190c,
+       0x03097104,
+       0x2b7ccffe,
+       0x430cb760,
+       0xc0c80207,
+       0xd2080a38,
+       0xd010aa01,
+       0x01077188,
+       0x0934c0c8,
+       0xa941d008,
+       0x7104d012,
+       0x040baa9d,
+       0x63ccb746,
+       0x00bad020,
+       0xb74c0009,
+       0xcffe4851,
+       0x00da287c,
+       0x009ac101,
+       0x76800120,
+       0x63ccb546,
+       0x7a2bb50d,
+       0x90e4c000,
+       0x4949b78c,
+       0xc0007500,
+       0x020790e2,
+       0x0a38c0c8,
+       0xa801d208,
+       0x7deeb79f,
+       0x7e6eb7bf,
+       0x7eeeb7df,
+       0x7f6eb7ff,
+       0x8c20c002,
+       0xa61d9c22,
+       0x4314b7c0,
+       0x07850287,
+       0x9e769e71,
+       0x6f2bb78c,
+       0x0b20c0da,
+       0x04a4d010,
+       0xa941d208,
+       0x009cc101,
+       0x3246e000,
+       0x722bb7ec,
+       0x9e710a02,
+       0x0a42d002,
+       0xb58c7480,
+       0x06876f2b,
+       0x6fabb56c,
+       0x6bb3b54c,
+       0x90e2c000,
+       0x9b83fe54,
+       0xd2080a02,
+       0x7746a241,
+       0x92d2c001,
+       0x5d08d2a6,
+       0xe0508520,
+       0x94298044,
+       0x94059428,
+       0x0d829401,
+       0x90e0c001,
+       0xb78c9e71,
+       0xb5ac5a2b,
+       0x75006f2b,
+       0x9162c000,
+       0x430cb720,
+       0x67adb784,
+       0xc0007502,
+       0xc0009204,
+       0x9e719100,
+       0x662bb78d,
+       0xc0007500,
+       0x9e719104,
+       0x612bb78d,
+       0xb58d1a04,
+       0xff34612b,
+       0x0d8698ff,
+       0x90a0c000,
+       0x9a79ff34,
+       0xff140d8a,
+       0x02819b97,
+       0x4314b7a0,
+       0xc0c89e6c,
+       0xd2080a38,
+       0xd010aa01,
+       0x9e6a7148,
+       0x0934c0c8,
+       0xa941d008,
+       0x7104d012,
+       0xba349e69,
+       0xb7464002,
+       0x7482702d,
+       0x9172c003,
+       0x612bb78d,
+       0xc0037502,
+       0xc00390d2,
+       0x9e6992c0,
+       0x6badb766,
+       0x90a0c000,
+       0xb7669e69,
+       0x9e696aad,
+       0x5e2db781,
+       0xc0007502,
+       0x76809124,
+       0x90c4c000,
+       0x502db746,
+       0x9060c000,
+       0x11340902,
+       0xcc120a02,
+       0x9e697088,
+       0xb78c9e9b,
+       0xb7466bab,
+       0xb766552d,
+       0xc2004f2d,
+       0xc1015a08,
+       0x748200ca,
+       0x5a35b746,
+       0x9172c002,
+       0xb7869e69,
+       0x75005cad,
+       0x92dac000,
+       0x4dadb746,
+       0xc0007295,
+       0x7540923a,
+       0x90e2c000,
+       0x5a07c180,
+       0xc00072d9,
+       0xc10090fc,
+       0x71485a07,
+       0x9094c000,
+       0x4002ba37,
+       0xb78c9e69,
+       0x752a642b,
+       0x9152c000,
+       0x0a78d011,
+       0x7188d010,
+       0x1978d011,
+       0x9160c000,
+       0xb74d9e69,
+       0xba12792b,
+       0x02744002,
+       0x7188d010,
+       0xd0121174,
+       0xba347104,
+       0xc0004002,
+       0x9e699280,
+       0xb7860902,
+       0xb7466b2d,
+       0xc1016ab5,
+       0xd4121244,
+       0xfe347088,
+       0xf0129a6d,
+       0xfffc0900,
+       0xfffc9204,
+       0x9e6c9260,
+       0x0a38c0c8,
+       0xaa81d208,
+       0x718ad410,
+       0xaa1dd3e8,
+       0x7148d412,
+       0x4002ba2d,
+       0x058f018b,
+       0x9baafe34,
+       0x0a029e71,
+       0x6cadb586,
+       0x582bb58d,
+       0x7a2bb50c,
+       0x430cb740,
+       0x2afccffe,
+       0xc0c80205,
+       0xd2080a38,
+       0xd410aa01,
+       0xc0c87148,
+       0xd0080934,
+       0xd412aa41,
+       0x000b7148,
+       0x7e6eb79f,
+       0x7eeeb7bf,
+       0x7f6eb7df,
+       0x7feeb7ff,
+       0x8c00c002,
+       0xa61d9c22,
+       0xb7808460,
+       0x09024d8c,
+       0x4038b960,
+       0xa101d208,
+       0xa105d208,
+       0x0a00c146,
+       0x9341ffff,
+       0x0882c021,
+       0x08d0c006,
+       0xaa619d1d,
+       0x2a7cc00e,
+       0xc0007506,
+       0x0d8a90f2,
+       0x9b92fcf4,
+       0x9240ffff,
+       0x0902c021,
+       0x0940c006,
+       0xab629d2d,
+       0xabe29d2d,
+       0xa9629d2d,
+       0x9d2da11a,
+       0x9e74a9e2,
+       0x478cb720,
+       0x2a00c7f0,
+       0x5aa1d224,
+       0xd011a196,
+       0x6a520e54,
+       0xd0310242,
+       0xf2080b48,
+       0x750caa41,
+       0x9204c000,
+       0x6e59d051,
+       0x498cb740,
+       0x0dc2c809,
+       0x02440d02,
+       0x0db0c5c2,
+       0xa10ef208,
+       0xa182f208,
+       0x7f80c010,
+       0x9322c003,
+       0xfcb4058b,
+       0xa91a99e5,
+       0xe0719e7b,
+       0xd1f28d00,
+       0xfd342dee,
+       0xb79f9894,
+       0xc01c7468,
+       0xc000753e,
+       0xfcf490c4,
+       0xb51f9b60,
+       0xb77f7468,
+       0x0d067470,
+       0xc00e55cc,
+       0xfd142dfc,
+       0x9e6c9b73,
+       0x4c8cb720,
+       0x6a02c146,
+       0x7468b77f,
+       0x008b02c2,
+       0x5aadb723,
+       0x9ead058b,
+       0xc06ca091,
+       0x008b0ee0,
+       0x5ab5b5c3,
+       0xaba1f210,
+       0xa3a2f210,
+       0xc300a919,
+       0xb7c35d3d,
+       0xb5435bb5,
+       0xaa155bad,
+       0xc06e030b,
+       0x9e5a0b00,
+       0xabc2f208,
+       0xf2082d04,
+       0xfd14a241,
+       0x008b9829,
+       0x7470b77f,
+       0xa3a1f210,
+       0x5bb5b5c3,
+       0xa3c2f208,
+       0x0d06aa11,
+       0xc00e55cc,
+       0xb5832dfc,
+       0xfd145aad,
+       0xb7409bc4,
+       0xb740490c,
+       0xf0084d14,
+       0x7508aa41,
+       0x9142c000,
+       0xc0007504,
+       0xd0109144,
+       0x7500aa41,
+       0x90a2c000,
+       0xf0080886,
+       0xb760a0c1,
+       0x09504894,
+       0x0d00c146,
+       0xfffa7097,
+       0xffff9162,
+       0x058b9100,
+       0x9951fcb4,
+       0xc0017400,
+       0x9e6d90c4,
+       0x4c8cb780,
+       0x6a82c146,
+       0x4c8cb740,
+       0xc06c02d8,
+       0x9e6c0a80,
+       0xa9a2d208,
+       0x6a1ac014,
+       0xc101a916,
+       0xc2000246,
+       0x00c45a10,
+       0x4db5b543,
+       0x4c35b5c3,
+       0x4cb5b5e3,
+       0x0d84aa19,
+       0xb583099a,
+       0xc0344d2d,
+       0xd2089adb,
+       0xf208a021,
+       0x7508aa41,
+       0x9124c000,
+       0xf2080886,
+       0xc000a0c1,
+       0xfcf49080,
+       0x058b9ab1,
+       0x991bfcb4,
+       0x0d927400,
+       0x9324ffff,
+       0x9140fff8,
+       0xb740a60d,
+       0x0205430c,
+       0x0a10c0a4,
+       0xaa01d208,
+       0xc0037500,
+       0x9e9292a4,
+       0x0d38c0a2,
+       0xa941d010,
+       0xc0007480,
+       0x0a0492e4,
+       0xa241d010,
+       0x430cb780,
+       0xc0a29e93,
+       0xd2080a40,
+       0xfd54a101,
+       0xb7809a20,
+       0xc0a4430c,
+       0xd2080a10,
+       0x7500aa01,
+       0x9304c002,
+       0x430cb720,
+       0xc09c0203,
+       0xd2080a18,
+       0x7500aa01,
+       0x91c2c002,
+       0x4729b7aa,
+       0x4814b7c0,
+       0x9220c001,
+       0xaa2df210,
+       0xc000750c,
+       0x9eaa93e4,
+       0x55e80d86,
+       0x2dfcc00e,
+       0x9a96fd14,
+       0x478cb720,
+       0x4508b780,
+       0x29ded3f2,
+       0xb58100e2,
+       0xfd9468a9,
+       0x0a0299f4,
+       0xa22df210,
+       0x0a46c809,
+       0x0a00c664,
+       0xa221f210,
+       0x90c0c001,
+       0x46a9b78a,
+       0x02857148,
+       0x9124c000,
+       0xfcf40d92,
+       0xb7209a45,
+       0xb7aa430c,
+       0xb7204729,
+       0xba2d430c,
+       0xd0514000,
+       0x02036b59,
+       0xc0a20103,
+       0xc0a40a40,
+       0xd2080920,
+       0xd008a902,
+       0xd120aa41,
+       0xd01102ed,
+       0x72991952,
+       0x9386fffd,
+       0x7eeeb79f,
+       0x7f6eb7bf,
+       0x7feeb7df,
+       0x9c228c60,
+       0x8440a61d,
+       0x430cb780,
+       0x0a10c0a4,
+       0xaa01d208,
+       0xc00a7500,
+       0xfd9490a4,
+       0xb7209b20,
+       0x0203430c,
+       0x0a10c0a4,
+       0xa901d208,
+       0xc0097480,
+       0xc0069324,
+       0xd2081a78,
+       0x7500aa01,
+       0x91a2c005,
+       0xc0a40203,
+       0xb7ca0a1c,
+       0xd2084629,
+       0x9e97ab81,
+       0x1962d011,
+       0xd020627d,
+       0x068f0328,
+       0xba26110f,
+       0xa1194000,
+       0xc002a211,
+       0xb78a9000,
+       0xc10146a9,
+       0x02d8029a,
+       0x99bcc034,
+       0x0e72d011,
+       0x0aa0c0a2,
+       0x75889ea7,
+       0x4001ba3f,
+       0xa031d208,
+       0x9324c000,
+       0xba249e6c,
+       0x75044000,
+       0x9264c000,
+       0xc00075c4,
+       0xb7209204,
+       0xb78a430c,
+       0xd11046a9,
+       0x02420659,
+       0x0a20c0a2,
+       0xa911d208,
+       0xd2080904,
+       0xb720a111,
+       0xb78a430c,
+       0xf11046a9,
+       0x0e840659,
+       0x9ea20242,
+       0xc0a20109,
+       0xc0a20d20,
+       0xc000093c,
+       0xd01090c2,
+       0xd008aa51,
+       0xa911a245,
+       0x058da91a,
+       0x73d5018d,
+       0xb7200764,
+       0xfffd430c,
+       0xb78a9344,
+       0x09024729,
+       0x02189e93,
+       0x0a40c0a2,
+       0x9c8bc810,
+       0xd2080005,
+       0xc002a105,
+       0xb7209000,
+       0xb78a430c,
+       0xd11046a9,
+       0xc2000639,
+       0x00c25a08,
+       0x46adb505,
+       0x430cb720,
+       0x46a9b78a,
+       0x0096c101,
+       0xc0a20098,
+       0xb76008c0,
+       0xc00040a9,
+       0xb78b91a0,
+       0xb742534a,
+       0xb7455b2b,
+       0x624446d5,
+       0x0244c101,
+       0x46cdb585,
+       0x430cb720,
+       0xd0120136,
+       0xb78a0932,
+       0xd02046a9,
+       0xd1100022,
+       0xc2000639,
+       0x02425908,
+       0x0a20c0a2,
+       0xaa11d208,
+       0x00a2d020,
+       0x9e537106,
+       0x29fcc00e,
+       0x93b2fffe,
+       0xfffe0d84,
+       0x0d829041,
+       0x98edfd54,
+       0x430cb720,
+       0xc0a40203,
+       0xd2080a10,
+       0x7680a902,
+       0x9344c003,
+       0x1a78c006,
+       0xaa01d208,
+       0xc0037500,
+       0x020390e2,
+       0x0a1cc0a4,
+       0xaa01d208,
+       0x4629b74a,
+       0x4731b7aa,
+       0x71040705,
+       0x4001ba2d,
+       0x0d7ecfff,
+       0xcffe0189,
+       0xd0510d30,
+       0xb3236e59,
+       0x65554432,
+       0x478cb740,
+       0x0528c101,
+       0x01449e6e,
+       0x1fa2d031,
+       0x29fcc00e,
+       0x0aa2d351,
+       0x0fa6d012,
+       0xc000a195,
+       0xfd149360,
+       0xb780994d,
+       0xd3f24508,
+       0xd20829ee,
+       0xfd94a221,
+       0xc80998ae,
+       0xc6640d46,
+       0x9e7a0d00,
+       0xa166e250,
+       0x1a62d011,
+       0xe0500d02,
+       0xba34a146,
+       0x1ad04000,
+       0x430cb720,
+       0x165cd010,
+       0xd0240906,
+       0xb72a51d0,
+       0xa9154729,
+       0x2dfcc00e,
+       0x10940f04,
+       0xfffe7102,
+       0xc000931a,
+       0xfcf49080,
+       0xb78098ef,
+       0x0d92430c,
+       0xc0a29ea2,
+       0xc0a40a3c,
+       0xd2080d1c,
+       0xd010a901,
+       0x7088aa41,
+       0x9226ffff,
+       0x7d6eb79f,
+       0x7deeb7bf,
+       0x7e6eb7df,
+       0x7eeeb7ff,
+       0x8c40c002,
+       0x9340fddc,
+       0x7d6eb79f,
+       0x7deeb7bf,
+       0x7e6eb7df,
+       0x7eeeb7ff,
+       0x8c40c002,
+       0xa61d9c22,
+       0xb7c08460,
+       0xa1954314,
+       0xaae1d808,
+       0xb706040d,
+       0x9e715554,
+       0xa012048d,
+       0x6babb72c,
+       0x7540068d,
+       0xb72da099,
+       0x9e5e5253,
+       0x0eb8c0c8,
+       0x7d74b53f,
+       0x9102c000,
+       0xaaa2d210,
+       0x7df4b5bf,
+       0x9380c000,
+       0xb76c040d,
+       0xb7866b4a,
+       0xb75f68cc,
+       0xd1a47d6c,
+       0x59085985,
+       0x05b8c101,
+       0x05b4c101,
+       0x9867c034,
+       0xaa21d210,
+       0x7008c010,
+       0x700ac012,
+       0x287ccffe,
+       0x7decb51f,
+       0xb5c69e71,
+       0xb72059ad,
+       0xb781430c,
+       0x75025e2d,
+       0x90c4c000,
+       0x9b19fe14,
+       0x90e0c000,
+       0xc0007508,
+       0xfe3490e4,
+       0x9e8398d0,
+       0x90a0c000,
+       0xb766048d,
+       0x040d4dd5,
+       0x59ccb746,
+       0x69ccb786,
+       0x6a54b746,
+       0x6accb766,
+       0xc1011244,
+       0x01261524,
+       0x69ccb586,
+       0x6a54b546,
+       0x1126c101,
+       0x6b4cb566,
+       0x0a02c201,
+       0x7088c810,
+       0x0a02ce01,
+       0x7088c812,
+       0x6accb546,
+       0xb740a895,
+       0x7480402b,
+       0x92a4c009,
+       0x430cb7e0,
+       0xb7869eb9,
+       0x7502554d,
+       0x9024c005,
+       0x6c4bb78c,
+       0x6c4bb54c,
+       0x7d3edffc,
+       0x6d4bb58c,
+       0x9144c004,
+       0x664bb78c,
+       0xc0047500,
+       0xb76690a4,
+       0xb78c59cd,
+       0xd1a4724b,
+       0xc8025949,
+       0x0d047280,
+       0x4002ba24,
+       0x094cc002,
+       0x7104d010,
+       0x194cc002,
+       0x7104d012,
+       0x5d0cb740,
+       0x4002ba24,
+       0xca200248,
+       0xba12aa05,
+       0x9e524001,
+       0x6e53b76c,
+       0xba2451e9,
+       0x62474002,
+       0xc1010936,
+       0x76c01124,
+       0x5389d224,
+       0x9084c001,
+       0x6dcbb78c,
+       0xc0027506,
+       0xb74692d4,
+       0xb7666ed5,
+       0xd0516f4d,
+       0x70c86e27,
+       0x90f4c000,
+       0x5b4db786,
+       0xc00073d9,
+       0x9eb89232,
+       0x5e05d3a2,
+       0x5b4cb746,
+       0xc0027104,
+       0xd0109014,
+       0xc1010624,
+       0x70c80244,
+       0x9334c001,
+       0x430cb7c0,
+       0xc0020a06,
+       0x008d09b2,
+       0x6cabb58c,
+       0x6c2bb58c,
+       0x430cb7a0,
+       0xc0de9eab,
+       0xc0da0a80,
+       0xd2080de0,
+       0xfc74aaa2,
+       0x9eb1995e,
+       0xb7869eb3,
+       0xb74c59cd,
+       0xd208724b,
+       0xb586a2a2,
+       0x0a02584d,
+       0x6dcbb58c,
+       0x714bb54c,
+       0x0df0c0d8,
+       0xfc7409a2,
+       0xb720994a,
+       0xb781430c,
+       0x75045e2d,
+       0x9124c000,
+       0x0a049eb0,
+       0x794ab58d,
+       0x9060c000,
+       0x008f0f82,
+       0x5b2db786,
+       0x6d7bd012,
+       0x01280148,
+       0x0524c101,
+       0xb5465d0d,
+       0xa9195b35,
+       0x9e9b0982,
+       0xd1100224,
+       0x00870669,
+       0xc0ce9ea2,
+       0xc0000d28,
+       0xd8109120,
+       0xd831aa41,
+       0xba24a0c5,
+       0x01b84002,
+       0x040da89a,
+       0x6dcab74d,
+       0x0632d010,
+       0x71040d84,
+       0x9238ffff,
+       0xc0007640,
+       0x05839142,
+       0xcffe1d84,
+       0xba1b2dfc,
+       0xfe144002,
+       0x040d9ba5,
+       0x6c4ab78c,
+       0xc0037500,
+       0xa8919002,
+       0xc0027442,
+       0xfe149384,
+       0x740099f7,
+       0x430cb720,
+       0x90c2c000,
+       0x6badb746,
+       0x9080c000,
+       0x6aadb746,
+       0x5e2db781,
+       0xc0007502,
+       0x74009124,
+       0x90c4c000,
+       0x502db786,
+       0x9060c000,
+       0x12440a02,
+       0xd0120a82,
+       0x7500710a,
+       0x93fcc001,
+       0xb766048d,
+       0xb7664f4d,
+       0xb78d6ad5,
+       0xb746634b,
+       0xd1204dd5,
+       0xb74d11b7,
+       0xc101614b,
+       0xb78d65b9,
+       0x65b561cb,
+       0x12449eaa,
+       0x65b9c101,
+       0x9803fdf4,
+       0xb786040d,
+       0x9e8369cc,
+       0xc0007500,
+       0xb5a69096,
+       0x9e7169cc,
+       0x69adb786,
+       0x612bb74d,
+       0x6a35b746,
+       0x59adb766,
+       0x0246c101,
+       0xc1011904,
+       0xb5861526,
+       0xb54d69ad,
+       0xb546612b,
+       0xfef46a35,
+       0xc0009b9d,
+       0xa89290c0,
+       0xc0017640,
+       0x040d90c2,
+       0xb77fa891,
+       0xb7867dec,
+       0xb74673cc,
+       0x7442744c,
+       0x09040246,
+       0x73ccb586,
+       0x744cb546,
+       0x9142c000,
+       0xc0007442,
+       0x74449246,
+       0x9184c007,
+       0x9300c004,
+       0xb78d040d,
+       0xb74c664a,
+       0x0a046dca,
+       0xb58d0904,
+       0xb54c664a,
+       0xaa196dca,
+       0x048d9e71,
+       0x66adb746,
+       0x6635b746,
+       0xc2000a04,
+       0xc1015a0c,
+       0xb54600cc,
+       0xb54663ad,
+       0xaa196335,
+       0x684db746,
+       0xc200040d,
+       0xd1205a08,
+       0x0a0200cd,
+       0x674db546,
+       0x684cb586,
+       0x664cb586,
+       0x66ccb586,
+       0xb780a895,
+       0x7500402b,
+       0x9344c002,
+       0x59ccb746,
+       0xb546a999,
+       0xb79f5a4d,
+       0x00b67b6a,
+       0x009cc101,
+       0x722bb58c,
+       0x430cb720,
+       0x5e2db781,
+       0xc0027504,
+       0xb76690e4,
+       0x74c05ccc,
+       0x90c4c000,
+       0x0d82c010,
+       0x9080c001,
+       0xc1807086,
+       0xc0005a07,
+       0xd02091bc,
+       0x5da811a6,
+       0x05b8c101,
+       0x9a7ac014,
+       0x0800c040,
+       0x9180c000,
+       0x11b4d020,
+       0xc1015da8,
+       0xc01405b8,
+       0xc0409a6f,
+       0x10400a02,
+       0x0a02c100,
+       0x7008d010,
+       0xc4120902,
+       0x9e8b7104,
+       0xb71fa89a,
+       0x05127df4,
+       0xc0d0052c,
+       0xd8100d40,
+       0x9e49a941,
+       0x65b0d031,
+       0x02420224,
+       0x5a08c200,
+       0xc1010904,
+       0x290400cc,
+       0x602db566,
+       0xa141d810,
+       0x5e35b566,
+       0x7640a892,
+       0x9384c002,
+       0xb78d040d,
+       0x0a0466ca,
+       0x66cab58d,
+       0x9280c002,
+       0x7d6cb73f,
+       0xc0007440,
+       0xb7209282,
+       0xb781430c,
+       0x75025e2d,
+       0x91a4c000,
+       0xb746048d,
+       0xc10059cd,
+       0x02445a7d,
+       0x5a07c200,
+       0xb5860244,
+       0x040d59cd,
+       0x7b6ab73f,
+       0x59d4b7a6,
+       0x714ab52c,
+       0x5854b5a6,
+       0x430cb7a0,
+       0xb7819ea9,
+       0x75025e4d,
+       0x92a4c000,
+       0x98c2fe14,
+       0xc0007400,
+       0x9ea89204,
+       0x62cab78d,
+       0x7510c004,
+       0x9134c000,
+       0xb5a69e71,
+       0xb73f5a35,
+       0xb52c7b72,
+       0x040d7233,
+       0x704cb786,
+       0xc0007502,
+       0xb7669264,
+       0xb76659d4,
+       0xc0144dcc,
+       0x741099f7,
+       0x915cc000,
+       0x1980d031,
+       0x5987a99a,
+       0x4002ba1b,
+       0x9a3cfe14,
+       0x430cb720,
+       0x5e2db781,
+       0xc0017508,
+       0x9e719302,
+       0x702db786,
+       0xc0017502,
+       0xb7869244,
+       0x7504552d,
+       0x91a2c001,
+       0x522bb78d,
+       0xc0007500,
+       0xa89992a4,
+       0xb746048d,
+       0x588859cd,
+       0x009cc101,
+       0x5badb726,
+       0x02125908,
+       0x70880242,
+       0x90d6c000,
+       0x09ffa99a,
+       0x9260c000,
+       0x040da899,
+       0x59ccb746,
+       0xc1015888,
+       0xb726009c,
+       0x01245bad,
+       0x02420212,
+       0xc0007088,
+       0xa99a90dc,
+       0xfe140986,
+       0xa89599ff,
+       0xb5800a02,
+       0xb58040ab,
+       0xb7a040ad,
+       0x9ea9430c,
+       0x5e55b7a1,
+       0xc0037744,
+       0x774893a2,
+       0x9342c003,
+       0x74cdb786,
+       0xc0017500,
+       0xfe149284,
+       0x74009845,
+       0x91e2c000,
+       0xb78e9ea8,
+       0xb74459ca,
+       0x708867cc,
+       0xd0040a02,
+       0xb5860a42,
+       0xc00074cc,
+       0x77429380,
+       0x90a2c000,
+       0xc0007748,
+       0x008b9244,
+       0x67adb784,
+       0x4dadb746,
+       0x5035b746,
+       0x71156245,
+       0xd00b0a02,
+       0xb5860a42,
+       0xc00074ad,
+       0x9ea990c0,
+       0xb5860a06,
+       0x9ea874cd,
+       0x74ccb786,
+       0xc0027500,
+       0xb7209062,
+       0xb781430c,
+       0x75025e2d,
+       0x91a4c008,
+       0x4db5b746,
+       0x4f2db746,
+       0x6e2fd011,
+       0xc0087088,
+       0xd0119096,
+       0x76800e2e,
+       0x4458b342,
+       0x5d0fd122,
+       0x9140c000,
+       0x5a2bb78c,
+       0xc0007500,
+       0x02249082,
+       0x59070144,
+       0x502db786,
+       0x5a07c200,
+       0x7088c810,
+       0x6aadb786,
+       0xc0007104,
+       0xa89590d6,
+       0xb5801228,
+       0xa89640ad,
+       0x40cdb740,
+       0xc0007480,
+       0x0a0691a2,
+       0x40cbb580,
+       0xd0121a04,
+       0x0a7c7088,
+       0x5a17c200,
+       0x40cdb580,
+       0x0902a916,
+       0x4314b7c0,
+       0xa141d810,
+       0x4314b7a0,
+       0xb721040b,
+       0xb7cc5e54,
+       0x76486bca,
+       0x9084c002,
+       0x5eccb781,
+       0x75021a04,
+       0x9032c001,
+       0x4dccb7a6,
+       0xc0069e92,
+       0xb5a70992,
+       0xb7204d4c,
+       0xb721430c,
+       0x60d35f2d,
+       0x0994d0d2,
+       0x99f1fdd4,
+       0x000a9e69,
+       0x4dadb746,
+       0x4d2db507,
+       0xd0100224,
+       0xc8127100,
+       0xb5477088,
+       0xc0044d2d,
+       0x048b9100,
+       0x6bcdb786,
+       0x4f4db7a6,
+       0xfe1412d8,
+       0x000a9822,
+       0x0a02c040,
+       0x7008c012,
+       0xb786040b,
+       0xb5074dcc,
+       0xc2004d4c,
+       0x70085a07,
+       0x9228c003,
+       0x0a06a895,
+       0x402bb580,
+       0x9160c003,
+       0xb746040b,
+       0xb74c4dd4,
+       0xba2e6c4a,
+       0xd0104002,
+       0x74800624,
+       0x0244c101,
+       0x5987c200,
+       0x9144c000,
+       0x5888c280,
+       0x009ac101,
+       0x5a2db786,
+       0x70c8cc12,
+       0x76429e69,
+       0x4f35b766,
+       0x6aadb786,
+       0x1539d110,
+       0x92e4c000,
+       0x6e2fd011,
+       0xc00072d9,
+       0xd0119136,
+       0x76800e26,
+       0x4458b342,
+       0x5d8bd122,
+       0x0a02c040,
+       0x7088d012,
+       0xb587048b,
+       0xc0004d4d,
+       0xc1019080,
+       0x70860124,
+       0x91d6c000,
+       0x448cb780,
+       0xc0007500,
+       0x748090a2,
+       0x90dac000,
+       0x0a06a915,
+       0xa241d808,
+       0x98edfe14,
+       0x10010d02,
+       0xc0129e53,
+       0x74007006,
+       0x92dac000,
+       0x430cb720,
+       0x5e2db781,
+       0xc0007504,
+       0x9e6c9244,
+       0xc10100da,
+       0xc0c8009a,
+       0xb74c0a38,
+       0xd208722b,
+       0x7088aa01,
+       0x90a8c000,
+       0xda08aa15,
+       0xa816a102,
+       0x404ab780,
+       0xc0007500,
+       0x9eb390c2,
+       0xfe140992,
+       0x9e7198b1,
+       0x622bb78c,
+       0xc0007500,
+       0xa8969222,
+       0xb5800a02,
+       0xc000404b,
+       0xb7869160,
+       0xb746552d,
+       0x75024dad,
+       0x9124fff8,
+       0x9000fff8,
+       0x7ceeb79f,
+       0x7d6eb7bf,
+       0x7deeb7df,
+       0x7e6eb7ff,
+       0x8c60c002,
+       0xa68d9c22,
+       0x02059e9d,
+       0x29fccffe,
+       0x2a7ccffe,
+       0xd1240705,
+       0xd0325941,
+       0x07876046,
+       0x5dc1c280,
+       0xd1310285,
+       0xc1016527,
+       0xd02260c7,
+       0x01145e41,
+       0x704601a8,
+       0x6426d031,
+       0x9094c000,
+       0x0804c001,
+       0x665cd031,
+       0x615fd132,
+       0x5941c180,
+       0xc1010104,
+       0xcffe0244,
+       0xcffe29fc,
+       0x02442c7c,
+       0xc10159c0,
+       0x9ea001b0,
+       0xb7bf0007,
+       0xb7df7eee,
+       0xb7ff7f6e,
+       0x8c607fee,
+       0x9e989c22,
+       0x09020802,
+       0x9140c000,
+       0x08029e98,
+       0x4530d010,
+       0x72c0cc14,
+       0x7200c014,
+       0xc18072c0,
+       0xe0095d09,
+       0xf0127204,
+       0xc0005d04,
+       0x72c49254,
+       0x0804d004,
+       0x15b4d024,
+       0xd00472c0,
+       0xd0240802,
+       0xe00015b0,
+       0x11813124,
+       0x442ab330,
+       0x72c09c22,
+       0xffff0886,
+       0xc40293a6,
+       0xd06572c0,
+       0xd0652c9e,
+       0xc8023c9e,
+       0xd0657200,
+       0xd0652d2e,
+       0xe0003d2e,
+       0x9e531514,
+       0x5408d01a,
+       0x50acd01a,
+       0xd01472c0,
+       0xd0240002,
+       0xe08015b0,
+       0x5c055885,
+       0x9304ffff,
+       0x3124e000,
+       0xb3301181,
+       0x9c22442a,
+       0x9d3a9e64,
+       0x0e46c809,
+       0x2646b09b,
+       0x9dc39ea4,
+       0xe0009e58,
+       0x15873400,
+       0x482ab330,
+       0x9e649c22,
+       0x0e46c809,
+       0x25a6b09b,
+       0x9e589ea4,
+       0x00009c22,
+       0x87c2c809,
+       0x0e60b060,
+       0x87c2c809,
+       0x0b80b060,
+       0x87c2c809,
+       0x0ac0b060,
+};
+uint32 ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_data[] = {
+       0x00000000,
+       0x00000000,
+       0x0000ff00,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x809000b0,
+       0x809199dc,
+       0x8288f112,
+       0x8288f194,
+       0x8288f268,
+       0x8288f330,
+       0x8288f33c,
+       0x8288f29c,
+       0x8288f290,
+       0x8288f270,
+       0x8288f350,
+       0x8288f274,
+       0x8288f278,
+       0x8288f358,
+       0x8288f360,
+       0x8288fda4,
+       0x8288fa20,
+       0x8288f86c,
+       0x8288f86f,
+       0x8288fda6,
+       0x82899660,
+       0x82899668,
+       0x8289966c,
+       0x8289966e,
+       0x82899672,
+       0x82899676,
+       0x8289967a,
+       0x8289967e,
+       0x82899682,
+       0x82899688,
+       0x828996e8,
+       0x828996f0,
+       0x828996f4,
+       0x828996f8,
+       0x828996fc,
+       0x82899704,
+       0x8289970f,
+       0x8289c3a3,
+       0x8289c398,
+       0x8289c3a8,
+       0x8288f030,
+       0x8288f09a,
+       0x8288f0aa,
+       0x8288f0ac,
+       0x8288f0b4,
+       0x8288f0c4,
+       0x8288f0d4,
+       0x8288f1d6,
+       0x8288f240,
+       0x80901728,
+       0x80901728,
+       0x809164a0,
+       0x8091c4f8,
+       0x809091a4,
+       0x8091c2e0,
+       0x8090b890,
+       0x8090aca0,
+       0x80901cc0,
+       0x8090515c,
+       0x809018e0,
+       0x80901728,
+       0x80901728,
+       0x80901728,
+       0x80901728,
+       0x80901728,
+       0x80901728,
+       0x80906744,
+       0x80906684,
+       0x80916134,
+       0x8090601c,
+       0x80901728,
+       0x80901728,
+       0x01030004,
+       0x01010102,
+       0x02010101,
+       0x04000301,
+       0x01030004,
+       0x01010102,
+       0x02010101,
+       0x04000301,
+       0x0d080300,
+       0x00100b06,
+       0x00584aaf,
+       0x007f1410,
+       0x005030c6,
+       0x007f500c,
+       0x00027dac,
+       0x000021f5,
+       0x000308d1,
+       0x0000057a,
+       0x00260019,
+       0x003f0032,
+       0x0058004b,
+       0x00710064,
+       0x008a007d,
+       0x00a30096,
+       0x00bc00af,
+       0x00d500c8,
+       0x00ee00e1,
+       0x010700fa,
+       0x01070107,
+       0x01070107,
+       0x01070107,
+       0x01070107,
+       0x01070107,
+       0x00000107,
+       0x00200040,
+       0x001002ab,
+       0x015500cd,
+       0x00080249,
+       0x00cd01c7,
+       0x0155005d,
+       0x0249013b,
+       0x00040111,
+       0x01c700f1,
+       0x00cd01af,
+       0x005d00c3,
+       0x01550059,
+       0x013b0029,
+       0x0249025f,
+       0x01110235,
+       0x00020021,
+       0x00f1001f,
+       0x01c70075,
+       0x01af006f,
+       0x00cd0069,
+       0x00c30019,
+       0x005d017d,
+       0x0059005b,
+       0x015502b9,
+       0x002900a7,
+       0x013b0283,
+       0x025f0135,
+       0x02490095,
+       0x0235023f,
+       0x0111008b,
+       0x00210219,
+       0x00010041,
+       0x0b060600,
+       0x0c0b0a06,
+       0x0a0b0c06,
+       0x0c0d0c0c,
+       0x0d0d0c06,
+       0x0b0b0c0c,
+       0x0e0d0a0d,
+       0x0a0d0e0e,
+       0x0c0d0a06,
+       0x0c0e0c0e,
+       0x0e0d0a0d,
+       0x0f0c0c0c,
+       0x0f0b0d0e,
+       0x0d0f0e0e,
+       0x0d0f0f0f,
+       0x0c0b0f0e,
+       0x00140006,
+       0x001a0016,
+       0x0020001c,
+       0x00280024,
+       0x0034002c,
+       0x00400038,
+       0x00500048,
+       0x00680058,
+       0x00800070,
+       0x00a00090,
+       0x00d000b0,
+       0x010000e0,
+       0x01400120,
+       0x01a00160,
+       0x020001c0,
+       0x02800240,
+       0x034002c0,
+       0x04000380,
+       0x05000480,
+       0x06800580,
+       0x08000700,
+       0x0a000900,
+       0x0d000b00,
+       0x10000e00,
+       0x14001200,
+       0x1a001600,
+       0x00001c00,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x01010000,
+       0x02020201,
+       0x04030303,
+       0x05040404,
+       0x00000005,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x1234baac,
+};
+uint32 ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_textReloc[] = {
+       0x00000000,
+};
+uint32 ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_dataReloc[] = {
+       0x00000000,
+};
+uint32 ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_textRelocFullAddr[] = {
+       0x00000000,
+};
+uint32 ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_textRelocType[] = {
+       0x00000000,
+};
+
+struct IMG_COMPILED_FW_BIN_RECORD sIMG_COMPILED_ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1 = {
+    /* uint32 text_size, data_size; */
+    15311, 13627,
+    /* uint32 data_origin, text_origin; */
+    0x8288ef40, 0x80900000,
+    /* uint32 text_reloc_size, data_reloc_size; */
+    0, 0,
+
+    /*
+    uint32 pipes;
+    osa_char   *fmt, *rc_mode;
+    uint32 formats_mask, hw_config;
+    */
+    2, "ALL_CODECS", "ALL", 31, 1,
+
+    /* uint32 int_define_cnt; */
+    5,
+    /* osa_char   **int_define_names; */
+    ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_define_names_array,
+    /* uint32 *int_defines; */
+    ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_define_values_array,
+
+    /*
+    uint32 *text, *data;
+    uint32 *text_reloc, *data_reloc;
+    uint32 *text_reloc_full_addr, *text_reloc_type;
+
+    */
+
+    ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_text, ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_data,
+    ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_textReloc, ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_dataReloc,
+    ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_textRelocFullAddr, ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_textRelocType,
+};
+
+/* Py_Return sIMG_COMPILED_ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1 */
diff --git a/driver/encoder/fw_binaries/include_all_fw_variants.h b/driver/encoder/fw_binaries/include_all_fw_variants.h
new file mode 100644 (file)
index 0000000..05a1f15
--- /dev/null
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __INCLUDE_ALL_VARIANTS_INC_INCLUDED__
+#define __INCLUDE_ALL_VARIANTS_INC_INCLUDED__
+
+#define INCLUDE_ALL_VARIANTS_TEMPLATE_VERSION (1)
+
+#define FW_BIN_FORMAT_VERSION (2)
+
+struct IMG_COMPILED_FW_BIN_RECORD {
+
+       uint32 text_size, data_size;
+       uint32 data_origin, text_origin;
+       uint32 text_reloc_size, data_reloc_size;
+
+       uint32 pipes;
+       osa_char *fmt, *rc_mode;
+       uint32 formats_mask, hw_config;
+
+       uint32 int_define_cnt;
+       osa_char **int_define_names;
+       uint32 *int_defines;
+
+       uint32 *text, *data;
+       uint32 *text_reloc, *data_reloc;
+       uint32 *text_reloc_full_addr, *text_reloc_type;
+};
+
+#include "ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1_bin.c"
+
+uint32 all_fw_binaries_cnt = 1;
+struct IMG_COMPILED_FW_BIN_RECORD *all_fw_binaries[] = {
+       &sIMG_COMPILED_ALL_CODECS_FW_ALL_pipes_2_contexts_8_hwconfig_1,
+};
+
+#endif
diff --git a/driver/encoder/fw_headers/coreflags.h b/driver/encoder/fw_headers/coreflags.h
new file mode 100644 (file)
index 0000000..890e725
--- /dev/null
@@ -0,0 +1,60 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _COREFLAGS_H_
+#define _COREFLAGS_H_
+
+#define SERIALIZED_PIPES (1)
+
+/* The number of TOPAZ cores present in the system */
+#define TOPAZHP_MAX_NUM_PIPES  (4)
+
+#define TOPAZHP_MAX_POSSIBLE_STREAMS (8)
+#define TOPAZHP_MAX_BU_SUPPORT_HD      90
+#define TOPAZHP_MAX_BU_SUPPORT_4K      128
+
+#define USE_VCM_HW_SUPPORT (1)
+
+#define INPUT_SCALER_SUPPORTED (1)     /* controls the firmwares ability to support the optional hardware input scaler */
+
+#define SECURE_MODE_POSSIBLE (1)               /* controls the firmwares ability to support secure mode firmware upload */
+
+
+
+#define SECURE_IO_PORTS (1)            /* controls the firmwares ability to support secure input/output ports */
+
+/* Line counter feature is not ready for Onyx yet (comment the define to remove the feature from builds) */
+#define LINE_COUNTER_SUPPORTED (1)
+
+
+//#define FW_LOGGING (1)
+
+#if defined(TOPAZ_MTX_HW)
+#      if defined(ENABLE_FORCED_INLINE)
+/*
+       __attribute__((always_inline)) should be only used when all C code is compiled by
+       GCC to a blob object with `-combine` swithch.
+*/
+#              define MTX_INLINE  inline __attribute__((always_inline))
+#else
+#              define MTX_INLINE  inline
+#endif
+#else
+#      define MTX_INLINE
+#endif
+
+#endif
diff --git a/driver/encoder/fw_headers/defs.h b/driver/encoder/fw_headers/defs.h
new file mode 100644 (file)
index 0000000..2512d52
--- /dev/null
@@ -0,0 +1,67 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#if !defined DEFS_H_
+#define DEFS_H_
+
+#include "osal/inc/osa_types.h"
+
+/*
+ * MACROS to insert values into fields within a word. The basename of the
+ * field must have MASK_BASENAME and SHIFT_BASENAME constants.
+ */
+#define F_MASK(basename)  (MASK_##basename)
+#define F_SHIFT(basename) (SHIFT_##basename)
+/*
+ * Extract a value from an instruction word.
+ */
+#define F_EXTRACT(val,basename) (((val)&(F_MASK(basename)))>>(F_SHIFT(basename)))
+
+/*
+ * Mask and shift a value to the position of a particular field.
+ */
+#define F_ENCODE(val,basename)  (((val)<<(F_SHIFT(basename)))&(F_MASK(basename)))
+#define F_DECODE(val,basename)  (((val)&(F_MASK(basename)))>>(F_SHIFT(basename)))
+
+/*
+ * Insert a value into a word.
+ */
+#define F_INSERT(word,val,basename) (((word)&~(F_MASK(basename))) | (F_ENCODE((val),basename)))
+
+/*
+ * Extract a 2s complement value from an word, and make it the correct sign
+ * Works by testing the top bit to see if the value is negative
+ */
+#define F_EXTRACT_2S_COMPLEMENT( value, field ) ((int32)(((((((F_MASK( field ) >> F_SHIFT( field )) >> 1) + 1) & (value >> F_SHIFT( field ))) == 0) ? F_EXTRACT( value, field ) : (-(int32)(((~value & F_MASK( field )) >> F_SHIFT( field )) + 1)))))
+
+/*
+ * B stands for 'bitfield', defines should be in the form
+ * #define FIELD_NAME 10:8             (i.e. upper : lower, both inclusive)
+ */
+#define B_EXTRACT( data, bits ) (((data) & ((uint32)0xffffffff >> (31 - (1 ? bits)))) >> (0 ? bits))
+#define B_MASK( bits ) ((((uint32)0xffffffff >> (31 - (1 ? bits))) >> (0 ? bits)) << (0 ? bits))
+#define B_ENCODE( data, bits ) (((data) << (0 ? bits)) & (B_MASK( bits )))
+#define B_INSERT( word, data, bits ) (((word) & ~(B_MASK( bits ))) | (B_ENCODE( data, bits )))
+
+/*
+ * B_BIT returns boolean true if the corresponding bit is set
+ * defines must be in the form FIELD_NAME 10:8 as above, except
+ * that the bitfield must obviously be only 1 bit wide
+*/
+#define B_BIT( word, bits ) ((((word) >> (0 ?bits)) & 1) == 1)
+
+#endif
diff --git a/driver/encoder/fw_headers/mtx_fwif.h b/driver/encoder/fw_headers/mtx_fwif.h
new file mode 100644 (file)
index 0000000..2353375
--- /dev/null
@@ -0,0 +1,209 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _MTX_FWIF_H_
+#define _MTX_FWIF_H_
+
+#include "vxe_common.h"
+#include "topazscfwif.h"
+
+//#define VXE_MEASURE_MTX_CLK_FREQ
+
+/*
+ * enum describing the MTX load method
+ */
+ enum mtx_load_method {
+       MTX_LOADMETHOD_NONE = 0,        /* don't load MTX code */
+       MTX_LOADMETHOD_BACKDOOR,        /* backdoor - writes MTX load data direct to out.res */
+       MTX_LOADMETHOD_REGIF,           /* load mtx code via register interface */
+       MTX_LOADMETHOD_DMA,             /* load mtx code via DMA */
+
+};
+
+/*
+ * defines that should come from auto generated headers
+ */
+#define MTX_DMA_MEMORY_BASE (0x82880000)
+#define PC_START_ADDRESS    (0x80900000)
+
+#define MTX_CORE_CODE_MEM   (0x10)
+#define MTX_CORE_DATA_MEM   (0x18)
+
+#define MTX_PC              (0x05)
+
+
+/*
+ * MTX Firmware Context Structure
+ */
+
+/*
+ * struct img_fw_int_defines_table - contains info for the fw int defines
+ *
+ * @length: lenth of the table
+ * @names: array of names of entries
+ * @values: array of values of entries
+ */
+struct img_fw_int_defines_table {
+       uint32 length;
+       osa_char** names;
+       uint32 * values;
+};
+
+/*
+ * struct img_fw_context - contains info for the context of the loaded firmware
+ *
+ * @initialized: osa_true if MTX core is initialized
+ * @populated: osa_true if MTX firmware context had been populated with data
+ * @active_ctx_mask: A bit mask of active encode contexts in the firmware
+ * @dev_ctx: Pointer to the device context
+ * @load_method: method used to load this MTX
+ * @supported_codecs: Codec mask
+ * @mtx_debug_val: Value in MTX Debug register (for RAM config)
+ * @mtx_ram_size: Size of MTX RAM
+ * @mtx_bank_size: Size of MTX RAM banks
+ * @mtx_reg_mem_space_addr: Memspace ID for MTX registers
+ * @topaz_reg_mem_space_addr: Memspace ID for TOPAZ registers
+ * @topaz_multicore_reg_addr: Memspace ID for TOPAZ multicore control registers
+ * @core_rev: Hardware core revision ID
+ * @core_des1: Hardware core designer (feature bits)
+ * @drv_has_mtx_ctrl: osa_true if driver (not DASH) has control of MTX
+ * @access_control: Use to get read/write access to MTX
+ * @hw_num_pipes: Number of pipes available in hardware
+ * @num_pipes: Number of pipes supported by firmware
+ * @num_contexts: Number of contexts supported by firmware
+ * @mtx_context_data_copy: Copy of MTX Context Data during hibernate
+ * @mtx_reg_copy: Copy of MTX Register block during hibernate
+ * @mtx_topaz_fw_text_size: Size of MTX Firmware Text Section in words
+ * @mtx_topaz_fw_text: Pointer to MTX Firmware Text Section
+ * @mtx_topaz_fw_data_size: Size of MTX Firmware Data Section in words
+ * @mtx_topaz_fw_data: Pointer to MTX Firmware Data Section
+ * @mtx_topaz_fw_data_origin: Offset to location of Data section
+ * @int_defines: table of int defines
+ */
+struct img_fw_context {
+       uint16 initialized;
+       uint16 populated;
+       uint8  active_ctx_mask;
+
+       void *dev_ctx;
+
+       enum mtx_load_method load_method;
+
+       uint32 supported_codecs;
+
+       uint32 mtx_debug_val;
+       uint32 mtx_ram_size;
+       uint32 mtx_bank_size;
+
+       void * mtx_reg_mem_space_addr;
+       void * topaz_reg_mem_space_addr[TOPAZHP_MAX_NUM_PIPES];
+       void * topaz_multicore_reg_addr;
+       uint32 core_rev;
+       uint32 core_des1;
+
+       uint16 drv_has_mtx_ctrl;
+       uint32 access_control;
+
+       uint32 hw_num_pipes;
+       uint32 num_pipes;
+       uint32 num_contexts;
+
+       struct vidio_ddbufinfo *mtx_context_data_copy[TOPAZHP_MAX_POSSIBLE_STREAMS];
+       uint32 *mtx_reg_copy;
+
+       uint32 mtx_topaz_fw_text_size;
+       uint32 *mtx_topaz_fw_text;
+
+       uint32 mtx_topaz_fw_data_size;
+       uint32 *mtx_topaz_fw_data;
+
+       uint32 mtx_topaz_fw_data_origin;
+
+       struct img_fw_int_defines_table int_defines;
+};
+
+
+/*
+ * Populates MTX context structure
+ * @param    codec         : version of codec specific firmware to associate with this MTX
+ * @param    fw_ctx       : Output context
+ * @return   int32 : Standard IMG_ERRORCODE
+ */
+int32 mtx_populate_fw_ctx(enum img_codec codec,
+                         struct img_fw_context * fw_ctx);
+
+/*
+ * Initialise the hardware using given (populated) MTX context structure
+ * @param    fw_ctx       : Pointer to the context of the target MTX
+ * @return   None
+ */
+void mtx_initialize(void * dev_ctx, struct img_fw_context * fw_ctx);
+
+/*
+ * Return the integer define used to compile given version of firmware.
+ * @param    fw_ctx       : Pointer to the context of the target MTX
+ * @param    name       : Name of a define (string)
+ * @return   Value of define or -1 if not found.
+ */
+int32 mtx_get_fw_config_int(struct img_fw_context const * const fw_ctx,
+                           osa_char const * const name);
+
+/*
+ * Load text and data sections onto an MTX.
+ * @param    fw_ctx         : Pointer to the context of the target MTX
+ * @param    load_method      : Method to use for loading code
+ * @return   None
+ */
+void mtx_load(void * dev_ctx, struct img_fw_context *fw_ctx,
+             enum mtx_load_method load_method);
+
+/*
+ * Deinitialises MTX and MTX control structure
+ */
+void mtx_deinitialize(struct img_fw_context *fw_ctx);
+
+/*
+ * Saves MTX State -- Registers and Data Memory
+ */
+void mtx_save_state(struct img_fw_context *fw_ctx);
+
+/*
+ * Restores MTX State -- Registers and Data Memory
+ */
+void mtx_restore_state(void * ctx, struct img_fw_context *fw_ctx);
+
+/*
+ * mtx_start
+ */
+void mtx_start(struct img_fw_context *fw_ctx);
+
+/*
+ * mtx_stop
+ */
+void mtx_stop(struct img_fw_context * fw_ctx);
+
+/*
+ * Kicks MTX
+ */
+void mtx_kick(struct img_fw_context *fw_ctx, uint32 kick_count);
+
+/*
+ * Waits for MTX to halt
+ */
+void mtx_wait_for_completion(struct img_fw_context *fw_ctx);
+
+#endif
diff --git a/driver/encoder/fw_headers/topazscfwif.h b/driver/encoder/fw_headers/topazscfwif.h
new file mode 100644 (file)
index 0000000..e4ed6f5
--- /dev/null
@@ -0,0 +1,1245 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _TOPAZSCFWIF_H_
+#define _TOPAZSCFWIF_H_
+
+#include "coreflags.h"
+#include "osal/inc/osa_types.h"
+
+#define MAX_QP_H264                    (51)
+#define WRONG_QP                       (255)
+
+/*
+ * The number of bytes used by each MVEA MV param & above param region
+ */
+#define MVEA_MV_PARAM_REGION_SIZE 16
+#define MVEA_ABOVE_PARAM_REGION_SIZE 96
+
+/*
+ * Macros to align to the correct number of bytes
+ */
+#define ALIGN_4(X)  (((X)+3) &~3)
+#define ALIGN_8(X)  (((X)+7) &~7)
+#define ALIGN_16(X)  (((X)+15) &~15)
+#define ALIGN_32(X)  (((X)+31) &~31)
+#define ALIGN_64(X)  (((X)+63) &~63)
+#define ALIGN_128(X)  (((X)+127) &~127)
+#define ALIGN_256(X)  (((X)+255) &~255)
+#define ALIGN_1024(X)  (((X)+1023) &~1023)
+
+/*
+ * Minimum number of bytes required in a buffer
+ */
+#define CODED_BUFFER_MARGIN_H264 10000
+#define CODED_BUFFER_MARGIN_H263 768000
+
+/*
+ * Context size allocated from host application
+ */
+#define MTX_CONTEXT_SIZE (13 * 1024)
+
+/*
+ * SEI (Buffering Period and Picture Timing) Constants shared
+ * between host and firmware
+ */
+#define BPH_SEI_NAL_INITIAL_CPB_REMOVAL_DELAY_SIZE 23
+#define PTH_SEI_NAL_CPB_REMOVAL_DELAY_SIZE 23
+#define PTH_SEI_NAL_DPB_OUTPUT_DELAY_SIZE 7
+
+/*
+ * Size of Inter/Intra & Coded/Skipped tables
+ */
+#define SCALE_TBL_SZ                    (8)
+
+/*
+ * Size of the header in output coded buffer. This varies based on
+ *              whether data logging is enabled/disabled
+ */
+#if defined (INCLUDE_CRC_REGISTER_CHECKS)
+#define CRC_REGISTER_FEEDBACK_SIZE     (80*4)
+#else
+#define CRC_REGISTER_FEEDBACK_SIZE     0
+#endif
+
+#define CODED_BUFFER_HEADER_SIZE    64 // MUST be aligned to the DMA 64 byte boundary condition (CRC data is DMA'd after the coded buffer header)
+#define CODED_BUFFER_INFO_SECTION_SIZE (CODED_BUFFER_HEADER_SIZE + CRC_REGISTER_FEEDBACK_SIZE)
+
+/*
+ * Mask defines for the -ui8EnableSelStatsFlags variable
+ */
+#define ESF_FIRST_STAGE_STATS 1
+#define ESF_MP_BEST_MB_DECISION_STATS 2
+#define ESF_MP_BEST_MOTION_VECTOR_STATS 4
+
+
+#define CUSTOM_QUANT_PARAMSIZE_8x8 2
+
+#define CUSTOM_QUANT_TABLESIZE_8x8 (6+CUSTOM_QUANT_PARAMSIZE_8x8)
+
+/*
+ * Combined size of H.264 quantization lists (6 * 16 + {2 or 6} * 64)
+ */
+#define QUANT_LISTS_SIZE               (6 * 16 + CUSTOM_QUANT_PARAMSIZE_8x8 * 64)
+
+/*
+ * JPEG input quantization table size
+ */
+#define QUANT_TABLE_SIZE_BYTES (64)
+
+/*
+ * JPEG input parameter sizes
+ */
+#define MTX_MAX_COMPONENTS             (3)
+
+/*
+ * Size in bytes and words of memory to transfer partially coded header data
+ */
+#define MAX_HEADERSIZEBYTES            (128)
+#define MAX_HEADERSIZEWORDS            (32)
+
+/*
+ * Maximum number of slices per field
+ */
+#define MAX_SLICESPERPIC               (128)
+
+/*
+ * Picture parameter flags used in the PIC_PARAM structure
+ */
+#define ISINTERP_FLAGS                                 (0x00000001)
+#define ISRC_FLAGS                                             (0x00000010)
+#define ISRC_I16BIAS                                   (0x00000020)
+#define ISINTERB_FLAGS                                 (0x00000080)
+#define ISSCENE_DISABLED                               (0x00000100)
+#define ISMULTIREF_FLAGS                               (0x00000200)
+#define SPATIALDIRECT_FLAGS                            (0x00000400)
+
+/*
+ * Enum describing contents of scratch registers
+ */
+enum mtx_scratch_regdata {
+       MTX_SCRATCHREG_BOOTSTATUS = 0,
+       MTX_SCRATCHREG_UNUSED = 0,
+       MTX_SCRATCHREG_TOHOST,                  //!< Reg for MTX->Host data
+       MTX_SCRATCHREG_TOMTX,                   //!< Reg for Host->MTX data
+
+       MTX_SCRATCHREG_SIZE                             //!< End marker for enum
+
+};
+
+/*
+       `MTX_SCRATCHREG_IDLE` register that is used for synchronous communication and debug.
+
+       Current register usage:
+       <bits, inclusive boundaries> : <usage>
+       2-10 : Number of executed commands (mod 255)
+       0-1 : FW idle status
+*/
+#define MTX_SCRATCHREG_IDLE                    TOPAZHP_TOP_CR_FIRMWARE_REG_4 //!< Reg for firmware IDLE status
+
+/*
+       `FW_LINE_COUNTER` register that is used for low-latency encoding
+
+       Current register usage:
+       <bits, inclusive boundaries> : <usage>
+       31-16   : Frame counter
+       11-0    : Line counter
+*/
+#define FW_LINE_COUNTER                                TOPAZHP_TOP_CR_FIRMWARE_REG_5 //!< Reg for firmware line counter
+
+/* Flags relating to MTX_SCRATCHREG_IDLE */
+#define SHIFT_FW_IDLE_REG_LINE_REQUESTED       (10)                                                                            /* Bits [10-22] are used for the line information */
+#define MASK_FW_IDLE_REG_LINE_REQUESTED                (0xFFF << SHIFT_FW_IDLE_REG_LINE_REQUESTED)     /* TOPAZHP_LINE_COUNTER (see TRM 8.1.1) uses 12 bits for the line count */
+#define SHIFT_FW_IDLE_REG_RECEIVED_COMMANDS    (2)
+#define MASK_FW_IDLE_REG_RECEIVED_COMMANDS     (0x3FC)
+#define SHIFT_FW_IDLE_REG_STATUS                       (0)
+#define MASK_FW_IDLE_REG_STATUS                                (3)
+
+#define FW_IDLE_STATUS_LINE_COUNTER            (0)                             /* New line counter information */
+#define FW_IDLE_STATUS_IDLE                            (1)
+#define FW_IDLE_STATUS_HW_ACTIVE               (2)
+#define FW_IDLE_STATUS_BUSY                            (3)
+
+
+#define FW_DEBUG_TRACKING              TOPAZHP_TOP_CR_FIRMWARE_REG_6  //!< Reg for fw debug
+
+/* Flags relating to MTX_SCRATCHREG_FWTRACE */
+#define SHIFT_FW_DEBUG_TRACKING_PIPE(x)                ((x)*4)
+#define MASK_FW_DEBUG_TRACKING_PIPE(x)         (0xf << SHIFT_FW_DEBUG_TRACKING_PIPE(x))
+#define SHIFT_FW_DEBUG_TRACKING_PIPE0          (0)
+#define MASK_FW_DEBUG_TRACKING_PIPE0           (0xf << MASK_FW_DEBUG_TRACKING_PIPE0)
+#define SHIFT_FW_DEBUG_TRACKING_PIPE1          (4)
+#define MASK_FW_DEBUG_TRACKING_PIPE1           (0xf << MASK_FW_DEBUG_TRACKING_PIPE1)
+#define SHIFT_FW_DEBUG_TRACKING_CMD_CTXT       (16)
+#define MASK_FW_DEBUG_TRACKING_CMD_CTXT                (0xf << SHIFT_FW_DEBUG_TRACKING_CMD_CTXT)
+#define SHIFT_FW_DEBUG_TRACKING_CMD_ID         (24)
+#define MASK_FW_DEBUG_TRACKING_CMD_ID          (0xff << SHIFT_FW_DEBUG_TRACKING_CMD_ID)
+
+
+#define MTX_SCRATCHREG_FWTRACE         TOPAZHP_TOP_CR_FIRMWARE_REG_7  //!< Reg for fw debug trace
+
+/*
+ * In secure FW mode the first value written to the command FIFO is copied to MMU_CONTROL_0 by the firmware.
+ * When we don't want that to happen we can write this value instead.  The firmware will know to ignore it as
+ * long as it is written BEFORE the firmware starts up
+ */
+ #define TOPAZHP_NON_SECURE_FW_MARKER  (0xffffffff)
+
+/*
+ * This value is an arbitrary value that the firmware will write to TOPAZHP_TOP_CR_FIRMWARE_REG_1 (MTX_SCRATCHREG_BOOTSTATUS)
+ * when it has completed the boot process to indicate that it is ready
+ */
+ #define TOPAZHP_FW_BOOT_SIGNAL                (0x12345678)
+
+/*
+ * Sizes for arrays that depend on reference usage pattern
+ */
+#define MAX_REF_B_LEVELS               3
+#define MAX_REF_SPACING                        1
+#define MAX_REF_I_OR_P_LEVELS  (MAX_REF_SPACING + 2)
+#define MAX_REF_LEVELS                 (MAX_REF_B_LEVELS + MAX_REF_I_OR_P_LEVELS)
+#define MAX_PIC_NODES                  (MAX_REF_LEVELS + 2)
+#define MAX_MV                                 (MAX_PIC_NODES * 2)
+
+#define MAX_BFRAMES                            7                    //B-frame count limit for Hierarchical mode
+#define MAX_BFRAMES_FLAT_MODE   3                    //B-frame count limit for Flat mode
+#define MAX_GOP_SIZE                   (MAX_BFRAMES + 1)
+#define MAX_SOURCE_SLOTS_SL            (MAX_GOP_SIZE + 1)
+
+#define MV_ROW_STRIDE (ALIGN_64(sizeof(struct img_mv_settings) * MAX_BFRAMES))
+
+/*
+ * Enable the firmware to patch reference and reconstructed buffers
+ */
+#define FORCED_REFERENCE 1
+#define LTREFHEADER 1
+
+/*
+ * MTX -> host message FIFO
+ */
+#define LOG2_WB_FIFO_SIZE      ( 5 )
+
+#define WB_FIFO_SIZE           ( 1 << (LOG2_WB_FIFO_SIZE) )
+
+#define SHIFT_WB_PRODUCER      ( 0 )
+#define MASK_WB_PRODUCER       ( ((1 << LOG2_WB_FIFO_SIZE) - 1) << SHIFT_WB_PRODUCER )
+
+#define SHIFT_WB_CONSUMER      ( 0 )
+#define MASK_WB_CONSUMER       ( ((1 << LOG2_WB_FIFO_SIZE) - 1) << SHIFT_WB_CONSUMER )
+
+/*
+ * Number of buffers per encode task (default: 2 - double bufferring)
+ */
+#define CODED_BUFFERING_CNT 2 //default to double-buffering
+
+/*
+ * Calculates the ideal minimun coded buffers for a frame level encode
+ */
+#define CALC_OPTIMAL_CODED_PACKAGES_FRAME_ENCODE(numcores, isinterlaced) ((((isinterlaced) ? 2 : 1) * (numcores)) * CODED_BUFFERING_CNT)
+
+/*
+ * Calculates the ideal minimum coded buffers for a slice level encode
+ */
+#define CALC_OPTIMAL_CODED_PACKAGES_SLICE_ENCODE(slicesperpic) (slicesperpic * CODED_BUFFERING_CNT)
+
+/*
+ * Calculates the ideal minimum coded buffers for an encode
+ */
+#define CALC_OPTIMAL_CODED_PACKAGES_ENCODE(bisSliceLevel, slicesperpic, numcores, isinterlaced) \
+       (bisSliceLevel ? CALC_OPTIMAL_CODED_PACKAGES_SLICE_ENCODE(slicesperpic) : CALC_OPTIMAL_CODED_PACKAGES_FRAME_ENCODE(numcores, isinterlaced))
+
+/*
+ * Calculates the actual number of coded buffers that can be used for an encode
+ */
+#define CALC_NUM_CODED_PACKAGES_ENCODE(bisSliceLevel, slicesperpic, numcores, isinterlaced) \
+       (CALC_OPTIMAL_CODED_PACKAGES_ENCODE(bisSliceLevel, slicesperpic, numcores, isinterlaced))
+
+/*
+ * Maximum number of coded packages
+ */
+#define MAX_CODED_PACKAGES     CALC_NUM_CODED_PACKAGES_ENCODE(0,0, TOPAZHP_MAX_NUM_PIPES, 1)
+
+/*
+ * DMA configuration parameters
+ */
+#define MTX_DMA_BURSTSIZE_BYTES 32
+#define MTX_DMA_ALIGNMENT_BYTES 64
+
+/*
+ * types that should be in DMAC header file
+ */
+enum dmac_acc_del {
+       DMAC_ACC_DEL_0 = 0x0,                   //!< Access delay zero clock cycles
+       DMAC_ACC_DEL_256 = 0x1,                 //!< Access delay 256 clock cycles
+       DMAC_ACC_DEL_512 = 0x2,                 //!< Access delay 512 clock cycles
+       DMAC_ACC_DEL_768 = 0x3,                 //!< Access delay 768 clock cycles
+       DMAC_ACC_DEL_1024 = 0x4,                //!< Access delay 1024 clock cycles
+       DMAC_ACC_DEL_1280 = 0x5,                //!< Access delay 1280 clock cycles
+       DMAC_ACC_DEL_1536 = 0x6,                //!< Access delay 1536 clock cycles
+       DMAC_ACC_DEL_1792 = 0x7,                //!< Access delay 1792 clock cycles
+};
+
+enum dmac_bswap {
+       DMAC_BSWAP_NO_SWAP = 0x0,               //!< No byte swapping will be performed.
+       DMAC_BSWAP_REVERSE = 0x1,               //!< Byte order will be reversed.
+};
+
+enum dmac_burst {
+       DMAC_BURST_0 = 0x0,                             //!< burst size of 0
+       DMAC_BURST_1 = 0x1,                             //!< burst size of 1
+       DMAC_BURST_2 = 0x2,                             //!< burst size of 2
+       DMAC_BURST_3 = 0x3,                             //!< burst size of 3
+       DMAC_BURST_4 = 0x4,                             //!< burst size of 4
+       DMAC_BURST_5 = 0x5,                             //!< burst size of 5
+       DMAC_BURST_6 = 0x6,                             //!< burst size of 6
+       DMAC_BURST_7 = 0x7,                             //!< burst size of 7
+};
+
+enum dmac_dir {
+       DMAC_DIR_MEM_TO_PERIPH = 0x0,   //!< Data from memory to peripheral.
+       DMAC_DIR_PERIPH_TO_MEM = 0x1,   //!< Data from peripheral to memory.
+};
+
+#define DMAC_VALUE_COUNT(BSWAP,PW,DIR,PERIPH_INCR,COUNT)                        \
+    (((BSWAP)          << SHIFT_IMG_SOC_BSWAP) & MASK_IMG_SOC_BSWAP)   |\
+       (((PW)                  << SHIFT_IMG_SOC_PW)    & MASK_IMG_SOC_PW)              |\
+       (((DIR)                 << SHIFT_IMG_SOC_DIR)   & MASK_IMG_SOC_DIR)             |\
+       (((PERIPH_INCR) << SHIFT_IMG_SOC_PI)    & MASK_IMG_SOC_PI)              |\
+       (((COUNT)               << SHIFT_IMG_SOC_CNT)   & MASK_IMG_SOC_CNT)
+#define DMAC_VALUE_PERIPH_PARAM(ACC_DEL,INCR,BURST)                                     \
+       (((ACC_DEL)     << SHIFT_IMG_SOC_ACC_DEL)       & MASK_IMG_SOC_ACC_DEL) |\
+       (((INCR)        << SHIFT_IMG_SOC_INCR)          & MASK_IMG_SOC_INCR)    |\
+       (((BURST)       << SHIFT_IMG_SOC_BURST)         & MASK_IMG_SOC_BURST)
+
+enum dmac_pw {
+       DMAC_PWIDTH_32_BIT = 0x0,               //!< Peripheral width 32-bit.
+       DMAC_PWIDTH_16_BIT = 0x1,               //!< Peripheral width 16-bit.
+       DMAC_PWIDTH_8_BIT = 0x2,                //!< Peripheral width 8-bit.
+};
+
+/*
+ * Enum describing Command IDs.  Some commands require data to be DMA'd in
+ * from the Host, with the base address of the data specified in the Command
+ * Data Address word of the command.  The data required is specific to each
+ * command type.
+ */
+enum mtx_cmd_id {
+       // Common Commands
+       MTX_CMDID_NULL,                                         //!< (no data)\n Null command does nothing\n
+       MTX_CMDID_SHUTDOWN,                                     //!< (no data)\n shutdown the MTX\n
+
+       // Video Commands
+       MTX_CMDID_DO_HEADER,                            //!< (extra data: #MTX_HEADER_PARAMS)\n Command for Sequence, Picture and Slice headers\n
+       MTX_CMDID_ENCODE_FRAME,                         //!< (data: low latency encode activation, HBI usage)\n Encode frame data\n
+       MTX_CMDID_START_FRAME,                          //!< (no data)\n Prepare to encode frame\n
+       MTX_CMDID_ENCODE_SLICE,                         //!< (no data)\n Encode slice data\n
+       MTX_CMDID_END_FRAME,                            //!< (no data)\n Complete frame encoding\n
+       MTX_CMDID_SETVIDEO,                                     //!< (data: pipe number, extra data: #IMG_MTX_VIDEO_CONTEXT)\n Set MTX Video Context\n
+       MTX_CMDID_GETVIDEO,                                     //!< (data: pipe number, extra data: #IMG_MTX_VIDEO_CONTEXT)\n Get MTX Video Context\n
+       MTX_CMDID_DO_CHANGE_PIPEWORK,           //!< (data: new pipe allocations for the context)\n Change pipe allocation for a Video Context\n
+#if SECURE_IO_PORTS
+       MTX_CMDID_SECUREIO,                                     //!< (data: )\n Change IO security\n
+#endif
+       MTX_CMDID_PICMGMT,                                      //!< (data: subtype and parameters, extra data: #IMG_PICMGMT_CUSTOM_QUANT_DATA (optional))\n Change encoding parameters\n
+       MTX_CMDID_RC_UPDATE,                            //!< (data: QP and bitrate)\n Change encoding parameters\n
+       MTX_CMDID_PROVIDE_SOURCE_BUFFER,        //!< (extra data: #IMG_SOURCE_BUFFER_PARAMS)\n Transfer source buffer from host\n
+       MTX_CMDID_PROVIDE_REF_BUFFER,           //!< (data: buffer parameters, extra data: reference buffer)\n Transfer reference buffer from host\n
+       MTX_CMDID_PROVIDE_CODEDPACKAGE_BUFFER,  //!< (data: slot and size, extra data: coded package)\n Transfer coded package from host (coded package contains addresses of header and coded output buffers/1st linked list node)\n
+       MTX_CMDID_ABORT,                                        //!< (no data)\n Stop encoding and release all buffers\n
+
+       // JPEG commands
+       MTX_CMDID_SETQUANT,                                     //!< (extra data: #JPEG_MTX_QUANT_TABLE)\n
+       MTX_CMDID_SETUP_INTERFACE,                      //!< (extra data: #JPEG WRITEBACK POINTERS)\n
+       MTX_CMDID_ISSUEBUFF,                            //!< (extra data: #MTX_ISSUE_BUFFERS)\n
+       MTX_CMDID_SETUP,                                        //!< (extra data: #JPEG_MTX_DMA_SETUP)\n\n
+
+       MTX_CMDID_UPDATE_SOURCE_FORMAT,         //!< (extra data: #IMG_VXE_SCALER_SETUP)\nChange source pixel format after context creation\n
+       MTX_CMDID_UPDATE_CSC,                           //!< (extra data: #IMG_VXE_CSC_SETUP)\nChange Colour Space Conversion setup dynamically\n
+
+       MTX_CMDID_ENDMARKER                                     //!< end marker for enum
+};
+
+/*
+ * Priority for the command.
+ * Each Command ID will only work with the correct priority.
+ */
+#define MTX_CMDID_PRIORITY 0x80
+
+/*
+ * Indicates whether or not to issue an interrupt when the firmware sends the
+ * command's writeback message.
+ */
+#define MTX_CMDID_WB_INTERRUPT 0x8000
+
+/*
+ * Enum describing response IDs
+ */
+enum mtx_message_id {
+       MTX_MESSAGE_ACK,
+       MTX_MESSAGE_CODED,
+};
+
+/*
+ * Mask and shift values for command word
+ */
+#define SHIFT_MTX_MSG_CMD_ID           (0)
+#define MASK_MTX_MSG_CMD_ID                    (0x7f << SHIFT_MTX_MSG_CMD_ID)
+#define SHIFT_MTX_MSG_PRIORITY         (7)
+#define MASK_MTX_MSG_PRIORITY          (0x1 << SHIFT_MTX_MSG_PRIORITY)
+#define SHIFT_MTX_MSG_CORE                     (8)
+#define MASK_MTX_MSG_CORE                      (0x7f << SHIFT_MTX_MSG_CORE)
+#define SHIFT_MTX_MSG_WB_INTERRUPT     (15)
+#define MASK_MTX_MSG_WB_INTERRUPT      (0x1 << SHIFT_MTX_MSG_WB_INTERRUPT)
+#define SHIFT_MTX_MSG_COUNT                    (16)
+#define MASK_MTX_MSG_COUNT                     (0xffff << SHIFT_MTX_MSG_COUNT)
+#define SHIFT_MTX_MSG_MESSAGE_ID       (16)
+#define MASK_MTX_MSG_MESSAGE_ID                (0xff << SHIFT_MTX_MSG_MESSAGE_ID)
+
+/*
+ * Mask and shift values for data word
+ */
+#define SHIFT_MTX_MSG_ENCODE_CODED_INTERRUPT           (0)
+#define MASK_MTX_MSG_ENCODE_CODED_INTERRUPT                    (0xff << SHIFT_MTX_MSG_ENCODE_CODED_INTERRUPT)
+#define SHIFT_MTX_MSG_ENCODE_USE_LINE_COUNTER          (20)
+#define MASK_MTX_MSG_ENCODE_USE_LINE_COUNTER           (0x1 << SHIFT_MTX_MSG_ENCODE_USE_LINE_COUNTER)
+
+#define SHIFT_MTX_MSG_PICMGMT_SUBTYPE                          (0)
+#define MASK_MTX_MSG_PICMGMT_SUBTYPE                           (0xff << SHIFT_MTX_MSG_PICMGMT_SUBTYPE)
+#define SHIFT_MTX_MSG_PICMGMT_DATA                                     (8)
+#define MASK_MTX_MSG_PICMGMT_DATA                                      (0xffffff << SHIFT_MTX_MSG_PICMGMT_DATA)
+#define SHIFT_MTX_MSG_PICMGMT_STRIDE_Y                         (0)
+#define MASK_MTX_MSG_PICMGMT_STRIDE_Y                          (0x3ff << SHIFT_MTX_MSG_PICMGMT_STRIDE_Y)
+#define SHIFT_MTX_MSG_PICMGMT_STRIDE_UV                                (10)
+#define MASK_MTX_MSG_PICMGMT_STRIDE_UV                         (0x3ff << SHIFT_MTX_MSG_PICMGMT_STRIDE_UV)
+
+/*Values for updating bitrate when Rate Control is enabled*/
+#define SHIFT_MTX_MSG_RC_UPDATE_QP                                     (0)
+#define MASK_MTX_MSG_RC_UPDATE_QP                                      (0xff << SHIFT_MTX_MSG_RC_UPDATE_QP)
+#define SHIFT_MTX_MSG_RC_UPDATE_BITRATE                                (8)
+#define MASK_MTX_MSG_RC_UPDATE_BITRATE                         (0x00ffffff << SHIFT_MTX_MSG_RC_UPDATE_BITRATE)
+#define UPDATE_BITRATE_MULTIPLIER                                      (3)
+
+/* New message for updating min/max qp. using the same mesage as above*/
+#define SHIFT_MTX_MSG_RC_UPDATE_MINQP                          (8)
+#define MASK_MTX_MSG_RC_UPDATE_MINQP                           (0xff << SHIFT_MTX_MSG_RC_UPDATE_MINQP)
+#define SHIFT_MTX_MSG_RC_UPDATE_MAXQP                          (16)
+#define MASK_MTX_MSG_RC_UPDATE_MAXQP                           (0xff << SHIFT_MTX_MSG_RC_UPDATE_MAXQP)
+
+/*Values for updating static Qp values when Rate Control is disabled*/
+#define SHIFT_MTX_MSG_STATIC_UPDATE_QPI                                (0)
+#define MASK_MTX_MSG_STATIC_UPDATE_QPI                         (0xff << SHIFT_MTX_MSG_STATIC_UPDATE_QPI)
+#define SHIFT_MTX_MSG_STATIC_UPDATE_QPP                                (8)
+#define MASK_MTX_MSG_STATIC_UPDATE_QPP                         (0xff << SHIFT_MTX_MSG_STATIC_UPDATE_QPP)
+#define SHIFT_MTX_MSG_STATIC_UPDATE_QPB                                (16)
+#define MASK_MTX_MSG_STATIC_UPDATE_QPB                         (0xff << SHIFT_MTX_MSG_STATIC_UPDATE_QPB)
+
+#define SHIFT_MTX_MSG_PROVIDE_REF_BUFFER_USE           (0)
+#define MASK_MTX_MSG_PROVIDE_REF_BUFFER_USE                    (0xff << SHIFT_MTX_MSG_PROVIDE_REF_BUFFER_USE)
+#define SHIFT_MTX_MSG_PROVIDE_REF_BUFFER_SLOT          (8)
+#define MASK_MTX_MSG_PROVIDE_REF_BUFFER_SLOT           (0xff << SHIFT_MTX_MSG_PROVIDE_REF_BUFFER_SLOT)
+#define SHIFT_MTX_MSG_PROVIDE_REF_BUFFER_LT                    (16)
+#define MASK_MTX_MSG_PROVIDE_REF_BUFFER_LT                     (0xff << SHIFT_MTX_MSG_PROVIDE_REF_BUFFER_LT)
+
+#define SHIFT_MTX_MSG_NUM_CODED_BUFFERS_PER_HEADER                     (5)
+#define MASK_MTX_MSG_NUM_CODED_BUFFERS_PER_HEADER                      (0xf << SHIFT_MTX_MSG_NUM_CODED_BUFFERS_PER_HEADER)
+#define SHIFT_MTX_MSG_PROVIDE_LIST_SEGMENT_SIZE                                (10)
+#define MASK_MTX_MSG_PROVIDE_LIST_SEGMENT_SIZE                         (0x3fffff << SHIFT_MTX_MSG_PROVIDE_LIST_SEGMENT_SIZE)
+
+#define SHIFT_MTX_MSG_PROVIDE_CODEDPACKAGE_BUFFER_SLOT (0)
+#define MASK_MTX_MSG_PROVIDE_CODEDPACKAGE_BUFFER_SLOT          (0x0f << SHIFT_MTX_MSG_PROVIDE_CODEDPACKAGE_BUFFER_SLOT)
+#define SHIFT_MTX_MSG_PROVIDE_CODED_BUFFER_SIZE                (4)
+#define MASK_MTX_MSG_PROVIDE_CODED_BUFFER_SIZE         (0x3fffff << SHIFT_MTX_MSG_PROVIDE_CODED_BUFFER_SIZE)
+
+/*
+ * Mask and shift values for Source format data word
+ */
+#define SHIFT_MTX_UPDATE_SOURCE_FORMAT_SC_ENABLE (0)
+#define MASK_MTX_UPDATE_SOURCE_FORMAT_SC_ENABLE        (0x1 << SHIFT_MTX_UPDATE_SOURCE_FORMAT_SC_ENABLE)
+
+#if SECURE_IO_PORTS
+#define SHIFT_MTX_MSG_SECUREIO_OUTPUT                          (0)
+#define MASK_MTX_MSG_SECUREIO_OUTPUT                           (0x1 << SHIFT_MTX_MSG_SECUREIO_OUTPUT)
+#define SHIFT_MTX_MSG_SECUREIO_INPUT                           (8)
+#define MASK_MTX_MSG_SECUREIO_INPUT                            (0x1 << SHIFT_MTX_MSG_SECUREIO_INPUT)
+#endif
+
+/*
+ * Enum describing partially coded header element types
+ */
+enum header_element_type {
+       ELEMENT_STARTCODE_RAWDATA = 0,                                  //!< Raw data that includes a start code
+       ELEMENT_STARTCODE_MIDHDR,                                               //!< Raw data that includes a start code in the middle of the header
+       ELEMENT_RAWDATA,                                                                //!< Raw data
+       ELEMENT_QP,                                                                             //!< Insert the H264 Picture Header QP parameter
+       ELEMENT_SQP,                                                                    //!< Insert the H264 Slice Header QP parameter
+       ELEMENT_FRAMEQSCALE,                                                    //!< Insert the H263/MPEG4 Frame Q_scale parameter (vob_quant field)
+       ELEMENT_SLICEQSCALE,                                                    //!< Insert the H263/MPEG4 Slice Q_scale parameter (quant_scale field)
+       ELEMENT_INSERTBYTEALIGN_H264,                                   //!< Insert the byte alignment bits for H264
+       ELEMENT_INSERTBYTEALIGN_MPG4,                                   //!< Insert the byte alignment bits for MPEG4
+       ELEMENT_INSERTBYTEALIGN_MPG2,                                   //!< Insert the byte alignment bits for MPEG2
+       ELEMENT_VBV_MPG2,
+       ELEMENT_TEMPORAL_REF_MPG2,
+       ELEMENT_CURRMBNR,                                                               //!< Insert the current macrloblock number for a slice.
+
+       ELEMENT_FRAME_NUM,                                                              //!< Insert frame_num field (used as ID for ref. pictures in H264)
+       ELEMENT_TEMPORAL_REFERENCE,                                             //!< Insert Temporal Reference field (used as ID for ref. pictures in H263)
+       ELEMENT_EXTENDED_TR,                                                    //!< Insert Extended Temporal Reference field
+       ELEMENT_IDR_PIC_ID,                                                             //!< Insert idr_pic_id field (used to distinguish consecutive IDR frames)
+       ELEMENT_PIC_ORDER_CNT,                                                  //!< Insert pic_order_cnt_lsb field (used for display ordering in H264)
+       ELEMENT_GOB_FRAME_ID,                                                   //!< Insert gob_frame_id field (used for display ordering in H263)
+       ELEMENT_VOP_TIME_INCREMENT,                                             //!< Insert vop_time_increment field (used for display ordering in MPEG4)
+
+       ELEMENT_MODULO_TIME_BASE,                                               //!< Insert modulo_time_base used in MPEG4 (depends on vop_time_increment_resolution)
+
+       ELEMENT_BOTTOM_FIELD,                                                   //!< Insert bottom_field flag
+       ELEMENT_SLICE_NUM,                                                              //!< Insert slice num (used for GOB headers in H263)
+       ELEMENT_MPEG2_SLICE_VERTICAL_POS,                               //!< Insert slice vertical pos (MPEG2 slice header)
+       ELEMENT_MPEG2_IS_INTRA_SLICE,                                   //!< Insert 1 bit flag indicating if slice is Intra or not (MPEG2 slice header)
+       ELEMENT_MPEG2_PICTURE_STRUCTURE,                                //!< Insert 2 bit field indicating if the current header is for a frame picture (11), top field (01) or bottom field (10) - (MPEG2 picture header)
+       ELEMENT_REFERENCE,                                                              //!< Insert flag indicating whether or not this picture is a reference
+       ELEMENT_ADAPTIVE,                                                               //!< Insert reference picture marking
+       ELEMENT_DIRECT_SPATIAL_MV_FLAG,                                 //!< Insert spatial direct mode flag
+       ELEMENT_NUM_REF_IDX_ACTIVE,                                             //!< Insert number of active references
+       ELEMENT_REORDER_L0,                                                             //!< Insert reference list 0 reordering
+       ELEMENT_REORDER_L1,                                                             //!< Insert reference list 1 reordering
+       ELEMENT_TEMPORAL_ID,                                                    //!< Insert temporal ID of the picture, used for MVC header
+       ELEMENT_ANCHOR_PIC_FLAG,                                                //!< Insert flag indicating whether or not this picture is an anchor picture
+
+       BPH_SEI_NAL_INITIAL_CPB_REMOVAL_DELAY,                  //!< Insert nal_initial_cpb_removal_delay
+       BPH_SEI_NAL_INITIAL_CPB_REMOVAL_DELAY_OFFSET,   //!< Insert nal_initial_cpb_removal_delay_offset
+       PTH_SEI_NAL_CPB_REMOVAL_DELAY,                                  //!< Insert cpb_removal_delay
+       PTH_SEI_NAL_DPB_OUTPUT_DELAY,                                   //!< Insert dpb_output_delay
+
+       ELEMENT_SLICEWEIGHTEDPREDICTIONSTRUCT,                  //!< Insert weighted prediciton parameters
+       ELEMENT_CUSTOM_QUANT                                                    //!< Insert custom quantization values
+};
+
+/*
+ * Struct describing a partially coded header element
+ */
+struct mtx_header_element {
+       enum header_element_type element_type;  //!< Element type
+       uint8                   size;           //!< Number of bits of coded data to be inserted
+       uint8                   bits;           //!< Raw data to be inserted.
+};
+
+/*
+ * Struct describing partially coded header parameters
+ */
+struct mtx_header_params {
+       uint32                  elements;                               //!< Number of header elements
+       struct mtx_header_element element_stream[MAX_HEADERSIZEWORDS - 1];      //!< array of element data
+};
+
+/*
+ * Enum describing threshold values for skipped MB biasing
+ */
+enum th_skip_scale {
+       TH_SKIP_0 = 0,          //!< Bias threshold for QP 0 to 12
+       TH_SKIP_12 = 1,         //!< Bias threshold for QP 12 to 24
+       TH_SKIP_24 = 2          //!< Bias threshold for QP 24 and above
+};
+
+/*
+ * Struct describing rate control input parameters
+ */
+struct in_rc_params {
+       uint32  mb_per_frm;             //!< Number of MBs Per Frame
+       uint32  mb_per_bu;              //!< Number of MBs Per BU
+       uint16  bu_per_frm;             //!< Number of BUs Per Frame
+
+       uint16  intra_period;   //!< Intra frame frequency
+       uint16  bframes;                //!< B frame frequency
+
+       int32   bits_per_frm;           //!< Bits Per Frame
+       int32   bits_per_bu;            //!< Bits Per BU
+
+       int32   bit_rate;                       //!< Bit Rate (bps)
+       int32   buffer_size;            //!< Size of Buffer in bits
+       int32   buffer_size_frames;//!< Size of Buffer in frames, to be used in VCM
+       int32   initial_level;  //!< Initial Level of Buffer
+       int32   initial_delay;  //!< Initial Delay of Buffer
+
+       uint16  frm_skip_disable;       //!< Disable Frame skipping
+
+       uint8   se_init_qp_i;           //!< Initial QP for sequence (I frames)
+       uint8   se_init_qp_p;           //!< Initial QP for sequence (P frames)
+       uint8   se_init_qp_b;           //!< Initial QP for sequence (B frames)
+
+       uint8   min_qp;         //!< Minimum QP value to use
+       uint8   max_qp;         //!< Maximum QP value to use
+
+       uint8   scale_factor;           //!< Scale Factor used to limit the range of arithmetic with high resolutions and bitrates
+       uint16  mb_per_row;             //!< Number of MBs Per Row
+
+       uint16  disable_vcm_hardware; //!< Disable using vcm hardware in RC modes.
+
+       union
+       {
+               struct
+               {
+                       int32   transfer_rate;  //!< Rate at which bits are sent from encoder to the output after each frame finished encoding
+                       uint16  sc_detect_disable;      //!< Disable Scene Change detection
+                       uint16  hierarchical_mode;      //!< Flag indicating Hierarchical B Pic or Flat mode rate control
+                       uint32  rc_scale_factor;        //!< Constant used in rate control = (GopSize/(BufferSize-InitialLevel))*256
+                       uint16  enable_slice_bob;       //!< Enable movement of slice boundary when Qp is high
+                       uint8  max_slice_bob;     //!< Maximum number of rows the slice boundary can be moved
+                       uint8  slice_bob_qp;            //!< Minimum Qp at which slice bobbing should take place
+               } h264;
+               struct
+               {
+                       uint8   half_framerate; //!< Half Frame Rate (MP4 only)
+                       uint8   f_code;                 //!< F Code (MP4 only)
+                       int32   bits_pergop;            //!< Bits Per GOP (MP4 only)
+                       uint16  bu_skip_disable;                //!< Disable BU skipping
+                       int32   bits_per_mb;            //!< Bits Per MB
+                       uint16  avg_qp_val;             //!< Average QP in Current Picture
+                       uint16  initial_qp;             //!< Initial Quantizer
+               } other;
+       } mode;
+};
+
+/*
+ * Enum describing MTX firmware version (codec and rate control)
+ */
+enum img_codec {
+       IMG_CODEC_NONE = 0,                     //!< There is no FW in MTX memory
+       IMG_CODEC_JPEG,                         //!< JPEG
+       IMG_CODEC_H264_NO_RC,           //!< H264 with no rate control
+       IMG_CODEC_H264_VBR,                     //!< H264 variable bitrate
+       IMG_CODEC_H264_CBR,                     //!< H264 constant bitrate
+       IMG_CODEC_H264_VCM,                     //!< H264 video conferance mode
+       IMG_CODEC_H263_NO_RC,           //!< H263 with no rate control
+       IMG_CODEC_H263_VBR,                     //!< H263 variable bitrate
+       IMG_CODEC_H263_CBR,                     //!< H263 constant bitrate
+       IMG_CODEC_MPEG4_NO_RC,          //!< MPEG4 with no rate control
+       IMG_CODEC_MPEG4_VBR,            //!< MPEG4 variable bitrate
+       IMG_CODEC_MPEG4_CBR,            //!< MPEG4 constant bitrate
+       IMG_CODEC_MPEG2_NO_RC,          //!< MPEG2 with no rate control
+       IMG_CODEC_MPEG2_VBR,            //!< MPEG2 variable bitrate
+       IMG_CODEC_MPEG2_CBR,            //!< MPEG2 constant bitrate
+       IMG_CODEC_H264_ERC,                     //!< H264 example rate control
+       IMG_CODEC_H263_ERC,                     //!< H263 example rate control
+       IMG_CODEC_MPEG4_ERC,            //!< MPEG4 example rate control
+       IMG_CODEC_MPEG2_ERC,            //!< MPEG2 example rate control
+       IMG_CODEC_H264MVC_NO_RC,        //!< MVC H264 with no rate control
+       IMG_CODEC_H264MVC_CBR,          //!< MVC H264 constant bitrate
+       IMG_CODEC_H264MVC_VBR,          //!< MVC H264 variable bitrate
+       IMG_CODEC_H264MVC_ERC,          //!< MVC H264 example rate control
+       IMG_CODEC_H264_ALL_RC,          //!< H264 with multiple rate control modes
+};
+
+/*
+ * Enum describing encoding standard (codec)
+ */
+enum img_standard {
+       IMG_STANDARD_NONE = 0,  //!< There is no FW in MTX memory
+       IMG_STANDARD_JPEG,              //!< JPEG
+       IMG_STANDARD_H264,              //!< H264 with no rate control
+       IMG_STANDARD_H263,              //!< H263 with no rate control
+       IMG_STANDARD_MPEG4,             //!< MPEG4 with no rate control
+       IMG_STANDARD_MPEG2,             //!< MPEG2 with no rate control
+};
+
+/*
+ * Enum describing image surface format types
+ */
+enum img_format {
+       IMG_CODEC_420_YUV=100,                  //!< Planar Y U V
+       IMG_CODEC_420_YV12=44,                  //!< YV12 format Data
+       IMG_CODEC_420_IMC2=36,                  //!< IMC2 format Data
+       IMG_CODEC_420_PL8=47,                   //!< PL8 format YUV data
+       IMG_CODEC_420_PL12=101,                 //!< PL12 format YUV data
+       IMG_CODEC_420_PL12_PACKED=25,   //|< PL12 format packed into a single plane (not currently supported by JPEG)
+       IMG_CODEC_420_PL21_PACKED=26,   //!< PL21 format packed into a single plane (not currently supported by JPEG)
+       IMG_CODEC_422_YUV=102,          //!< YUV format 4:2:2 data  // start the incrementing auto enumeration values after the last ones we have used.
+       IMG_CODEC_422_YV12,                     //!< YV12 format 4:2:2 data
+       IMG_CODEC_422_PL8,                      //!< PL8 format 4:2:2 data
+       IMG_CODEC_422_IMC2,                     //!< IMC2 format 4:2:2 data
+       IMG_CODEC_422_PL12,                     //!< PL12 format 4:2:2 data
+       IMG_CODEC_Y0UY1V_8888,          //!< 4:2:2 YUYV data
+       IMG_CODEC_Y0VY1U_8888,          //!< 4:2:2 YVYU data
+       IMG_CODEC_UY0VY1_8888,          //!< 4:2:2 UYVY data
+       IMG_CODEC_VY0UY1_8888,          //!< 4:2:2 VYUY data
+       IMG_CODEC_444_YUV,              //!< YUV format 4:4:4 data (not currently supported by JPEG)
+       IMG_CODEC_444_YV12,             //!< YV12 format 4:4:4 data (not currently supported by JPEG)
+       IMG_CODEC_444_PL8,              //!< PL8 format 4:4:4 data (not currently supported by JPEG)
+       IMG_CODEC_444_IMC2,             //!< PL8 format 4:4:4 data (not currently supported by JPEG)
+       IMG_CODEC_444_PL12,             //!< PL12 format 4:4:4 data (not currently supported by JPEG)
+       IMG_CODEC_ABCX,                 //!< Interleaved 4:4:4 data (not currently supported by JPEG)
+       IMG_CODEC_XBCA,                 //!< Interleaved 4:4:4 data (not currently supported by JPEG)
+       IMG_CODEC_ABC565,               //!< Packed 4:4:4 data (not currently supported by JPEG)
+
+       IMG_CODEC_420_PL21,                             //!< PL21 format YUV data
+       IMG_CODEC_422_PL21,                     //!< 4:2:2 PL21 format YUV data
+       IMG_CODEC_444_PL21,                             //!< 4:4:4 PL21 format YUV data (not currently supported by JPEG)
+
+       PVR_SURF_UNSPECIFIED            //!< End of the enum
+};
+
+/*
+ * Enum describing presets for source image colour space conversion
+ */
+enum img_csc_preset {
+       IMG_CSC_NONE,                   //!< No colour space conversion
+       IMG_CSC_709_TO_601,             //!< ITU BT.709 YUV to be converted to ITU BT.601 YUV
+       IMG_CSC_601_TO_709,             //!< ITU BT.601 YUV to be converted to ITU BT.709 YUV
+       IMG_CSC_RGB_TO_601_ANALOG,      //!< RGB to be converted to ITU BT.601 YUV
+       IMG_CSC_RGB_TO_601_DIGITAL,     //!< RGB to be converted to ITU BT.601 YCbCr for SDTV (reduced scale - 16-235)
+       IMG_CSC_RGB_TO_601_DIGITAL_FS,  //!< RGB to be converted to ITU BT.601 YCbCr for HDTV (full range - 0-255)
+       IMG_CSC_RGB_TO_709,             //!< RGB to be converted to ITU BT.709 YUV
+       IMG_CSC_YIQ_TO_601,             //!< YIQ to be converted to ITU BT.601 YUV
+       IMG_CSC_YIQ_TO_709,             //!< YIQ to be converted to ITU BT.709 YUV
+       IMG_CSC_BRG_TO_601,             //!< BRG to be converted to ITU BT.601 YUV (for XRGB format)
+       IMG_CSC_RBG_TO_601,             //!< RBG to be converted to ITU BT.601 YUV (for XBGR format)
+       IMG_CSC_BGR_TO_601,     //!< BGR to be converted to ITU BT.601 YUV (for BGRX format)
+       IMG_CSC_UYV_TO_YUV,     //!< UYV to be converted to YUV (BT.601 or BT.709)
+       IMG_CSC_PRESETS                 //!< End of the enum
+};
+
+/*
+ * GOP structure information
+ */
+#define SHIFT_GOP_FRAMETYPE            (0)
+#define MASK_GOP_FRAMETYPE             (0x3 << SHIFT_GOP_FRAMETYPE)
+#define SHIFT_GOP_REFERENCE            (2)
+#define MASK_GOP_REFERENCE             (0x1 << SHIFT_GOP_REFERENCE)
+#define SHIFT_GOP_POS                  (3)
+#define MASK_GOP_POS                   (0x1f << SHIFT_GOP_POS)
+#define SHIFT_GOP_LEVEL                        (4)
+#define MASK_GOP_LEVEL                 (0xF << SHIFT_GOP_LEVEL)
+#define SHIFT_GOP_REF0                 (0 + 8)
+#define MASK_GOP_REF0                  (0xf << SHIFT_GOP_REF0)
+#define SHIFT_GOP_REF1                 (4 + 8)
+#define MASK_GOP_REF1                  (0xf << SHIFT_GOP_REF1)
+
+/*
+ * Frame types
+ */
+enum img_frame_type {
+       IMG_INTRA_IDR = 0,
+       IMG_INTRA_FRAME,
+       IMG_INTER_P,
+       IMG_INTER_B,
+};
+
+/*
+ * Motion vector calculation register settings
+ */
+struct img_mv_settings {
+       uint32  mv_calc_below;
+       uint32  mv_calc_colocated;
+       uint32  mv_calc_config;
+};
+
+/*
+ * Frame template types
+ */
+enum img_frame_template_type {
+       IMG_FRAME_IDR = 0,
+       IMG_FRAME_INTRA,
+       IMG_FRAME_INTER_P,
+       IMG_FRAME_INTER_B,
+       IMG_FRAME_INTER_P_IDR,
+       IMG_FRAME_UNDEFINED
+};
+
+/*
+ * Rate control modes
+ */
+enum img_rcmode {
+       IMG_RCMODE_NONE = 0,
+       IMG_RCMODE_CBR,
+       IMG_RCMODE_VBR,
+       IMG_RCMODE_ERC,                 // Example Rate Control
+       IMG_RCMODE_VCM
+};
+
+/*
+ * Video Conferencing Mode (VCM) rate control method's sub modes
+ */
+enum img_rc_vcm_mode {
+       IMG_RC_VCM_MODE_DEFAULT = 0,
+       IMG_RC_VCM_MODE_CFS_NONIFRAMES,
+       IMG_RC_VCM_MODE_CFS_ALLFRAMES,
+};
+
+/*
+ * Weighted prediction values
+ */
+struct weighted_prediction_values {
+       uint8                   frameType;
+       osa_bool                weighted_pred_flag;                     // Corresponds to field in the pps
+       uint8                   weighted_bipred_idc;
+       uint32                  luma_log2_weight_denom;
+       uint32                  chroma_log2_weight_denom;
+       osa_bool                weight_flag[3][2];                      // Y, Cb, Cr Support for 2 ref pictures on P, or 1 pic in each direction on B.
+       int32                   weight[3][2];
+       int32                   offset[3][2];
+};
+
+enum weighted_bipred_idc {
+       WBI_NONE = 0x0,
+       WBI_EXPLICIT,
+       WBI_IMPLICIT
+};
+
+/*
+ * Registers required to configure input scaler
+ */
+struct img_vxe_scaler_setup {
+       uint32          input_scaler_control;
+       uint32          scaler_input_size_reg;
+       uint32          scaler_crop_reg;
+       uint32          scaler_pitch_reg;
+       uint32          scaler_control;
+       uint32          hor_scaler_coeff_regs[4];
+       uint32          ver_scaler_coeff_regs[4];
+};
+
+/*
+ * Registers required to configure input Colour Space conversion
+ */
+struct img_vxe_csc_setup {
+       uint32          csc_source_y[3];
+       uint32          csc_output_clip[2];
+       uint32          csc_source_cbcr[3];
+};
+
+/*
+ * SETVIDEO & GETVIDEO - Video encode context
+ */
+struct img_mtx_video_context {
+       uint64          clock_div_bitrate; // keep this at the top as it has alignment issues
+
+       uint32          width_in_mbs;                                                   //!< target output width
+       uint32          picture_height_in_mbs;                                  //!< target output height
+
+       uint32          tmp_reconstructed[MAX_PIC_NODES];
+       uint32          reconstructed[MAX_PIC_NODES];
+       uint32          colocated[MAX_PIC_NODES];
+       uint32          mv[MAX_MV];
+       uint32          inter_view_mv[2];
+
+       uint32          debug_crcs;                                                     //!< Send debug information from Register CRCs to Host with the coded buffer
+
+       uint32          writeback_regions[WB_FIFO_SIZE];                //!< Data section
+
+       uint32          initial_cpb_removal_delayoffset;
+       uint32          max_buffer_mult_clock_div_bitrate;
+       uint32          sei_buffering_period_template;
+       uint32          sei_picture_timing_template;
+
+       uint16          enable_mvc;
+       uint16          mvc_view_idx;
+       uint32          slice_params_templates[5];
+       uint32          pichdr_templates[4];
+
+       uint32          seq_header;
+       uint32          subset_seq_header;
+       uint16          no_sequence_headers;
+
+       uint32          slice_map[MAX_SOURCE_SLOTS_SL];         //!< Slice map of the source picture
+
+       uint32          flat_gop_struct;                                                //!< Address of Flat MiniGop structure
+
+       osa_bool        weighted_prediction_enabled;
+       uint8           mtx_weighted_implicit_bi_pred;
+       uint32          weighted_prediction_virt_addr[MAX_SOURCE_SLOTS_SL];
+
+       uint32          hierar_gop_struct;                                      //!< Address of hierarchical MiniGop structure
+
+       uint32          firstpass_out_param_addr[MAX_SOURCE_SLOTS_SL];                          //!< Output Parameters of the First Pass
+
+       uint32          firstpass_out_best_multipass_param_addr[MAX_SOURCE_SLOTS_SL];   //!< Selectable Output Best MV Parameters data of the First Pass
+
+       uint32          mb_ctrl_in_params_addr[MAX_SOURCE_SLOTS_SL];                                    //!< Input Parameters to the second pass
+
+       uint32          pic_row_stride_bytes;                                           //!< Strides of source Y data and chroma data
+
+       uint32          above_params[TOPAZHP_MAX_NUM_PIPES];            //!< Picture level parameters (supplied by driver)
+
+
+       uint32          idr_period;
+       uint32          intra_loop_cnt;
+       uint32          bframe_count;
+       osa_bool        hierarchical;
+       uint8           mpeg2_intra_dc_precision;                               //!< Only used in MPEG2, 2 bit field (0 = 8 bit, 1 = 9 bit, 2 = 10 bit and 3=11 bit precision). Set to zero for other encode standards.
+       uint8           pic_on_level[MAX_REF_LEVELS];
+
+       uint32          vop_time_resolution;
+
+       uint16          kick_size;                                                      //!< Number of Macroblocks per kick
+       uint16          kicks_per_bu;                                                   //!< Number of kicks per BU
+       uint16          kicks_per_picture;                                      //!< Number of kicks per picture
+
+       struct img_mv_settings mv_settings_idr;
+
+       struct img_mv_settings mv_settings_non_b[MAX_BFRAMES + 1];
+
+       uint32          mv_settings_b_table;
+       uint32          mv_settings_hierarchical;
+
+       enum img_format format;                                                         //!< Pixel format of the source surface
+       enum img_standard standard;                                                             //!< Encoder standard (H264 / H263 / MPEG4 / JPEG)
+       enum img_rcmode rc_mode;                                                                //!< RC flavour
+       enum img_rc_vcm_mode rc_vcm_mode;                                                               //!< RC VCM flavour
+       uint32          rc_cfs_max_margin_perc;                                 //!< RC VCM maximum frame size percentage allowed to exceed in CFS
+
+       osa_bool                first_pic;
+       osa_bool                is_interlaced;
+       osa_bool                top_field_first;
+       osa_bool                arbitrary_so;
+       osa_bool                output_reconstructed;
+
+       osa_bool                disable_bit_stuffing;
+
+       osa_bool                insert_hrd_params;
+
+       uint8           max_slices_per_picture;
+
+       uint32          f_code;
+
+       /* Contents Adaptive Rate Control parameters*/
+       uint32          jmcomp_rc_reg0;
+       uint32          jmcomp_rc_reg1;
+
+       uint32          mv_clip_config;                                         //!< Value to use for MVClip_Config  register
+       uint32          pred_comb_control;                                      //!< Value to use for Predictor combiner register
+       uint32          lritc_cache_chunk_config;                       //!< Value to use for LRITC_Cache_Chunk_Config register
+       uint32          ipe_vector_clipping;                                    //!< Value to use for IPEVectorClipping register
+       uint32          h264_comp_control;                                      //!< Value to use for H264CompControl register
+       uint32          h264_comp_intra_pred_modes;                             //!< Value to use for H264CompIntraPredMode register
+       uint32          ipcm_0_config;                                          //!< Value to use for IPCM_0 Config register
+       uint32          ipcm_1_config;                                          //!< Value to use for IPCM_1 Config register
+       uint32          spe_mvd_clip_range;                                     //!< Value to use for SPEMvdClipRange register
+       uint32          mb_host_ctrl;                                                   //!< Value to use for MB_HOST_CONTROL register
+       uint32          deblock_ctrl;                                           //!< Value for the CR_DB_DISABLE_DEBLOCK_IDC register
+       uint32          skip_coded_inter_intra;                         //!< Value for the CR_DB_DISABLE_DEBLOCK_IDC register
+
+       uint32          vlc_control;
+       uint32          vlc_slice_control;                                      //!< Slice control register value. Configures the size of a slice
+       uint32          vlc_slice_mb_control;                                   //!< Slice control register value. Configures the size of a slice
+       uint16          cqp_offset;                                                     //!< Chroma QP offset to use (when PPS id = 0)
+
+       osa_bool        coded_header_per_slice;
+
+       uint8           initial_qp_i;                                                   //!< Initial QP I frames
+       uint8           initial_qp_p;                                                   //!< Initial QP P frames
+       uint8           initial_qp_b;                                                   //!< Initial QP B frames
+
+       uint32          first_pic_flags;
+       uint32          non_first_pic_flags;
+
+       osa_bool        mc_adaptive_rounding_disable;
+
+#define AR_REG_SIZE    18
+#define AR_DELTA_SIZE 7
+       uint16          mc_adaptive_rounding_offsets[AR_REG_SIZE][4];
+       int16           mc_adaptive_rounding_offsets_delta[AR_DELTA_SIZE][4];
+
+       uint32          patched_recon_address;                          //!< Reconstructed address to allow host picture management
+       uint32          patched_ref0_address;                                   //!< Reference 0 address to allow host picture management
+       uint32          patched_ref1_address;                                   //!< Reference 1 address to allow host picture management
+
+       uint32          ltref_header[MAX_SOURCE_SLOTS_SL];
+       int8            slice_header_slot_num;
+       osa_bool        recon_is_longterm;
+       osa_bool        ref0_is_longterm;
+       osa_bool        ref1_is_longterm;
+       uint8           ref_spacing;
+
+       uint8           fw_num_pipes;
+       uint8           fw_first_pipe;
+       uint8           fw_last_pipe;
+       uint8           fw_pipes_to_use_flags;
+
+#if SECURE_IO_PORTS
+       uint32  secure_io_control;
+#endif
+       struct img_vxe_scaler_setup scaler_setup;
+       struct img_vxe_csc_setup csc_setup;
+
+       struct in_rc_params in_params;
+};
+
+/*
+ * PICMGMT - Command sub-type
+ */
+enum img_picmgmt_type {
+       IMG_PICMGMT_REF_TYPE = 0,
+       IMG_PICMGMT_GOP_STRUCT,
+       IMG_PICMGMT_SKIP_FRAME,
+       IMG_PICMGMT_EOS,
+       IMG_PICMGMT_FLUSH,
+       IMG_PICMGMT_QUANT,
+       IMG_PICMGMT_STRIDE,
+};
+
+/*
+ * PROVIDE_REF_BUFFER - Purpose of the reference buffer
+ */
+enum img_ref_buffer_type {
+       IMG_BUFFER_REF0 = 0,
+       IMG_BUFFER_REF1,
+       IMG_BUFFER_RECON,
+};
+
+/*
+ * RC_UPDATE - IMG_V_RCUpdate parameters
+ */
+struct img_picmgmt_rc_update_data {
+       uint32          bits_per_frame;         //!< Number of bits in a frame
+       uint8           vcm_i_frame_qp;                 //!< VCM I frame QP
+       uint8           min_qp;                         //!< Min QP
+       uint8           max_qp;                         //!< Max QP
+};
+
+/*
+ * PIC_MGMT - IMG_V_SetCustomScalingValues parameters
+ */
+struct img_picmgmt_custom_quant_data {
+       uint32  values;                 //!< Address of custom quantization values
+       uint32  regs_4x4_sp;            //!< Address of custom quantization register values for 4x4 Sp
+       uint32  regs_8x8_sp;            //!< Address of custom quantization register values for 8x8 Sp
+       uint32  regs_4x4_q;             //!< Address of custom quantization register values for 4x4 Q
+       uint32  regs_8x8_q;             //!< Address of custom quantization register values for 8x8 Q
+};
+
+/*
+ * MTX- > host message structure
+ */
+struct img_writeback_msg {
+       uint32 cmd_word;
+       union
+       {
+               struct
+               {
+                       uint32  data;
+                       uint32  extra_data;
+                       uint32  writeback_val;
+               };
+               uint32  coded_package_consumed_idx;
+       };
+};
+
+/*
+ * PROVIDE_SOURCE_BUFFER - Details of the source picture buffer
+ */
+struct img_source_buffer_params {
+       uint64  host_context;                   //!< Host context value. Keep at start for alignment.
+       uint32  phys_addr_y_plane_field_0;      //!< Source pic phys addr (Y plane, Field 0)
+       uint32  phys_addr_u_plane_field_0;      //!< Source pic phys addr (U plane, Field 0)
+       uint32  phys_addr_v_plane_field_0;      //!< Source pic phys addr (V plane, Field 0)
+       uint32  phys_addr_y_plane_field_1;      //!< Source pic phys addr (Y plane, Field 1)
+       uint32  phys_addr_u_plane_field_1;      //!< Source pic phys addr (U plane, Field 1)
+       uint32  phys_addr_v_plane_field_1;      //!< Source pic phys addr (V plane, Field 1)
+       uint8   display_order_num;                      //!< Number of frames in the stream (incl. skipped)
+       uint8   slot_num;                                       //!< Source slot number
+       uint8   reserved1;
+       uint8   reserved2;
+};
+
+/*
+ * Struct describing input parameters to encode a video slice
+ */
+struct slice_params {
+       uint32  flags;                                  //!< Flags for slice encode
+
+       // Config registers. These are passed straight through from drivers to hardware.
+       uint32  slice_config;                   //!< Value to use for Slice Config register
+       uint32  ipe_control;                            //!< Value to use for IPEControl register
+       uint32  seq_config;                             //!< Value to use for Sequencer Config register
+
+       enum img_frame_template_type template_type;     //!< Slice header template type
+       struct mtx_header_params slice_hdr_tmpl;                //!< Template of corresponding slice header
+};
+
+/*
+ * Struct describing Minimum Coded Unit information for a single JPEG component plane.
+ * Details the size of blocks to be taken from the plane and the maximum block positions.
+ * Send to firmware in the MTX_CMDID_SETUP command as part of the JPEG_MTX_DMA_SETUP structure
+ */
+struct mcu_component {
+       uint32  width_blocks;   //!< Width in pixels, shall be a multiple of 8
+       uint32  height_blocks;  //!< Height in pixels, shall be a multiple of 8
+       uint32  x_limit;                        //!< Blocks will not be encoded beyond this
+       uint32  y_limit;                        //!< Blocks will not be encoded beyond this
+};
+
+/*
+ * Struct describing essential information about a single JPEG component plane, defines the
+ * Physical address of the colour plane, its stride and its height.
+ * Send to firmware in the MTX_CMDID_SETUP command as part of the JPEG_MTX_DMA_SETUP structure.
+ */
+struct component_plane {
+       uint32  phys_addr;      //!< Physical address Component plane in shared memory
+       uint32  stride;         //!< Stride of source plane */
+       uint32  height;         //!< Height of avaliable data in plane.  shall be a minumum of one MCU high
+};
+
+/*
+ * Struct sent with the MTX_CMDID_ISSUEBUFF command detailing
+ * where a scan encode should begin (calculated from the total count of MCUs)
+ * and how many MCU's should be processed in this scan.
+ */
+struct mtx_issue_buffers {
+       uint32  mcu_position_of_scan_and_index; //!< Scan start position in MCUs
+       uint32  mcu_cnt_and_reset_flag;                 //!< [32:2] Number of MCU's to encode or decode, [1] Reset predictors (1=Reset, 0=No Reset)
+};
+
+/*
+ * Struct describing JPEG encode output header
+ */
+struct buffer_header {
+       uint32  bytes_used;             //!<
+       uint32  bytes_encoded;          //!<
+       uint32  bytes_to_encode;        //!<
+       uint32  reserved3;              //!<
+};
+
+/*
+ * Structure describing coded header data returned by the firmware.
+ *             The size of the structure should not be more than 64 bytes (needs to have 64 byte alignment)
+ *              (i.e. CODED_BUFFER_HEADER_SIZE)
+ */
+struct coded_data_hdr {
+       uint64  host_ctx;               //!< Host context value. Keep at top for alignment.
+       uint32  bytes_written;  //!< Bytes in this coded buffer excluding this header
+       uint32  feedback;               //!< Feedback word for this coded buffers
+       uint32  extra_feedback; //!< Extra feedback word for this coded buffers
+
+       uint16  i_mb_cnt;               //!< Number of MBs coded as I-macroblocks in this slice
+       uint16  p_mb_cnt;               //!< Number of MBs coded as P-macroblocks in this slice
+
+       uint16  b_mb_cnt;               //!< Number of MBs coded as B-macroblocks in this slice
+       uint16  skip_mb_cnt;    //!< Number of MBs coded as skipped in this slice
+
+       uint16  ipcm_mb_cnt;    //!< Number of macroblocks coded as IPCM in this slice
+       uint8   inter_sum_satd_hi;      //!< High 8 bits for the inter sum satd
+       uint8   intra_sum_satd_hi;      //!< High 8 bits for the intra sum satd
+
+       uint32  dc_bits;                //!< Number of bits use for coding DC coefficients in this slice
+       uint32  mv_bits;                //!< Number of bits used for coding all Motion vector data in this slice
+       uint32  symbols_bits;   //!< Number of bits used for coding all MB level symbols in this slice
+       uint32  residual_bits;  //!< Number of bits used for coding residual data in all MBs in this slice
+
+       uint32  qpy_inter;              //!< Sum of QPy/Qscale for all Inter-MBs in the slice
+       uint32  qpy_intra;              //!< Sum of QPy/Qscale for all Intra-MBs in the slice
+       uint32  inter_sum_satd; //!< Sum of SATD for all Inter-MBs in the slice
+       uint32  intra_sum_satd; //!< Sum of SATD for all Intra-MBs in the slice
+};
+
+#define MAX_CODED_BUFFERS_PER_PACKAGE_FW 1
+#define MAX_CODED_BUFFERS_PER_PACKAGE 1
+
+// This structure is temporarily used during the 64 byte minimum DMA transfer from driver to FW
+struct coded_package_dma_info {
+       uint32 coded_mem_addr[MAX_CODED_BUFFERS_PER_PACKAGE_FW];
+       //////////////////
+       // 2 Info words //
+       //////////////////
+       uint32 coded_header_addr;
+       uint32 coded_buffer_info; // Combined field Host->MTX = IsLinkedList, list segment (CB memory) size, number of list segments per coded buffer
+
+       // PAD TO 64 BYTES
+       uint32 padding[16 - MAX_CODED_BUFFERS_PER_PACKAGE_FW - 2];
+};
+
+#define SHIFT_JPEG_ISSUEBUFF_MPSP_SCANSTARTPOS         (2)
+#define MASK_JPEG_ISSUEBUFF_MPSP_SCANSTARTPOS          (0xFFFFFFFC)
+#define SHIFT_JPEG_ISSUEBUFF_MPSP_PIPENO                               (0)
+#define MASK_JPEG_ISSUEBUFF_MPSP_PIPENO                                (0x3)
+
+/*
+ * Contents of the coded data buffer header feedback word
+ */
+#define SHIFT_CODED_FIRST_BU                   (24)
+#define MASK_CODED_FIRST_BU                            (0xFF << SHIFT_CODED_FIRST_BU)
+#define SHIFT_CODED_SLICE_NUM                  (16)
+#define MASK_CODED_SLICE_NUM                   (0xFF << SHIFT_CODED_SLICE_NUM)
+#define SHIFT_CODED_STORAGE_FRAME_NUM  (14)
+#define MASK_CODED_STORAGE_FRAME_NUM   (0x03 << SHIFT_CODED_STORAGE_FRAME_NUM)
+#define SHIFT_CODED_LL_DISCARDED_FRAME (13)
+#define MASK_CODED_LL_DISCARDED_FRAME  (0x01 << SHIFT_CODED_LL_DISCARDED_FRAME)
+#define SHIFT_CODED_ENTIRE_FRAME               (12)
+#define MASK_CODED_ENTIRE_FRAME                        (0x01 << SHIFT_CODED_ENTIRE_FRAME)
+#define SHIFT_CODED_IS_SKIPPED                 (11)
+#define MASK_CODED_IS_SKIPPED                  (0x01 << SHIFT_CODED_IS_SKIPPED)
+#define SHIFT_CODED_IS_CODED                   (10)
+#define MASK_CODED_IS_CODED                            (0x01 << SHIFT_CODED_IS_CODED)
+#define SHIFT_CODED_RECON_IDX                  (6)
+#define MASK_CODED_RECON_IDX                   (0x0F << SHIFT_CODED_RECON_IDX)
+#define SHIFT_CODED_SOURCE_SLOT                        (2)
+#define MASK_CODED_SOURCE_SLOT                 (0x0F << SHIFT_CODED_SOURCE_SLOT)
+#define SHIFT_CODED_FRAME_TYPE                 (0)
+#define MASK_CODED_FRAME_TYPE                  (0x03 << SHIFT_CODED_FRAME_TYPE)
+
+/*
+ * Contents of the coded data buffer header extra feedback word
+ */
+#define SHIFT_CODED_SLICES_SO_FAR                                      (24)
+#define MASK_CODED_SLICES_SO_FAR                                       (0xFF << SHIFT_CODED_SLICES_SO_FAR)
+
+#define SHIFT_CODED_SLICES_IN_BUFFER                           (16)
+#define MASK_CODED_SLICES_IN_BUFFER                                    (0xFF << SHIFT_CODED_SLICES_IN_BUFFER)
+
+#define SHIFT_CODED_BUFFER_PIPE                                                (14)
+#define MASK_CODED_BUFFER_PIPE                                         (0x03 << SHIFT_CODED_BUFFER_PIPE)
+
+#define SHIFT_CODED_BUFFER_NUMBER_USED                         (2)
+#define MASK_CODED_BUFFER_NUMBER_USED                          (0xFF << SHIFT_CODED_BUFFER_NUMBER_USED)
+
+#define SHIFT_CODED_FIELD                                                      (1)
+#define MASK_CODED_FIELD                                                       (0x01 << SHIFT_CODED_FIELD)
+
+#define SHIFT_CODED_PATCHED_RECON                                      (0)
+#define MASK_CODED_PATCHED_RECON                                       (0x01 << SHIFT_CODED_PATCHED_RECON)
+
+#define SHIFT_INTER_INTRA_SCALE_TAB_INDEX     (4) //Starting Bit for indicating the index of intra/intra scale table to be used
+#define SHIFT_SKIPPED_CODED_SCALE_TAB_INDEX   (7) //Starting Bit for indicating the index of skipped/coded scale table to be used
+#define SHIFT_INPUT_QP                        (10)//Starting Bit for requested QP for the particular macroblock
+
+#define BIAS_CONFIG_INTRA_FOUR_INTER_ZERO     (0) // Force intra by scaling its cost by 0
+#define BIAS_CONFIG_INTRA_THREE_INTER_ONE     (1) // favour intra by a factor 3
+#define BIAS_CONFIG_INTRA_TWO_INTER_ONE       (2) // favour intra by a factor 2
+#define BIAS_CONFIG_INTRA_ONE_INTER_ONE       (3) // no bias
+#define BIAS_CONFIG_INTRA_ONE_INTER_ONE_DUP   (4) // no bias
+#define BIAS_CONFIG_INTRA_ONE_INTER_TWO       (5) // favour inter by a factor 2
+#define BIAS_CONFIG_INTRA_ONE_INTER_THREE     (6) // favour inter by a factor 3
+#define BIAS_CONFIG_INTRA_ZERO_INTER_FOUR     (7) // Force inter by scaling it's cost by 0
+
+#define BIAS_CONFIG_CODED_FOUR_SKIPPED_ZERO   (0) // Force coded by scaling its cost by 0
+#define BIAS_CONFIG_CODED_THREE_SKIPPED_ONE   (1) // favour coded by a factor 3
+#define BIAS_CONFIG_CODED_TWO_SKIPPED_ONE     (2) // favour coded by a factor 2
+#define BIAS_CONFIG_CODED_ONE_SKIPPED_ONE     (3) // no bias
+#define BIAS_CONFIG_CODED_ONE_SKIPPED_ONE_DUP (4) // no bias
+#define BIAS_CONFIG_CODED_ONE_SKIPPED_TWO     (5) // favour skipped by a factor 2
+#define BIAS_CONFIG_CODED_ONE_SKIPPED_THREE   (6) // favour skipped by a factor 3
+#define BIAS_CONFIG_CODED_ZERO_SKIPPED_FOUR   (7) // Force skipped by scaling it's cost by 0
+
+/*
+ * Mask and Shift Values for software copy of line counter register
+ */
+// Bits [0:11] hold the line count
+#define SHIFT_SW_LINE_COUNT            (0)
+#define MASK_SW_LINE_COUNT             (0x00000FFF << SHIFT_SW_LINE_COUNT)
+// Bits [16:31] hold the frame count
+#define SHIFT_SW_FRAME_COUNT   (16)
+#define MASK_SW_FRAME_COUNT            (0x0000FFFF << SHIFT_SW_FRAME_COUNT)
+
+#endif /* _TOPAZSCFWIF_H_ */
diff --git a/driver/encoder/fw_headers/vxe_common.h b/driver/encoder/fw_headers/vxe_common.h
new file mode 100644 (file)
index 0000000..6f0749b
--- /dev/null
@@ -0,0 +1,169 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _VXECOMMON_H_
+#define _VXECOMMON_H_
+
+#include "topazscfwif.h"
+#include "../common/vid_buf.h"
+
+/*
+ * Enum describing buffer lock status
+ */
+enum lock_status {
+       BUFFER_FREE     = 1,  //!< Buffer is not locked
+       HW_LOCK,          //!< Buffer is locked by hardware
+       SW_LOCK,          //!< Buffer is locked by software
+       NOTDEVICEMEMORY,  //!< Buffer is not a device memory buffer
+};
+
+/*
+ * Struct describing a data buffer
+ */
+struct img_buffer {
+       struct vidio_ddbufinfo mem_info;                                //!< Pointer to the memory handle for the buffer
+       enum lock_status lock;                  //!< Lock status for the buffer
+       uint32  size;               //!< Size in bytes of the buffer
+       uint32  bytes_written;       //!< Number of bytes written into buffer
+};
+
+/*
+ * Struct describing a coded data buffer
+ */
+struct img_coded_buffer {
+       struct vidio_ddbufinfo mem_info;                                //!< Pointer to the memory handle for the buffer
+       enum lock_status lock;                  //!< Lock status for the buffer
+       uint32  size;               //!< Size in bytes of the buffer
+       uint32  bytes_written;       //!< Number of bytes written into buffer
+};
+
+struct coded_info {
+       struct img_buffer *code_package_fw_buffer;
+       struct coded_package_dma_info *coded_package_fw;
+};
+
+// This structure is used by the Drivers
+struct coded_package_host {
+       struct coded_info mtx_info;
+       struct img_coded_buffer *coded_buffer[MAX_CODED_BUFFERS_PER_PACKAGE]; // Array of pointers to buffers
+       struct img_buffer *header_buffer;
+       uint8 num_coded_buffers;
+       uint8 busy;
+};
+
+/*
+ * Struct describing surface component info
+ */
+struct img_surf_component_info {
+       uint32  step;
+       uint32  width;
+       uint32  height;
+       uint32  phys_width;
+       uint32  phys_height;
+};
+
+/*
+ * Struct describing a frame
+ */
+struct img_frame {
+       struct img_buffer *y_plane_buffer;                                              //!< pointer to the image buffer
+       struct img_buffer *u_plane_buffer;                                              //!< pointer to the image buffer
+       struct img_buffer *v_plane_buffer;                                              //!< pointer to the image buffer
+       uint32          width_bytes;                                                    //!< stride of pBuffer
+       uint32          height;                                                 //!< height of picture in pBuffer
+
+       uint32          component_count;                                        //!< number of colour components used
+       enum img_format format;
+
+       uint32          component_offset[3];
+       uint32          bottom_component_offset[3];
+       struct img_surf_component_info  component_info[3];
+
+       int32           y_component_offset;
+       int32           u_component_offset;
+       int32           v_component_offset;
+
+       int32           field0_y_offset, field1_y_offset;
+       int32           field0_u_offset, field1_u_offset;
+       int32           field0_v_offset, field1_v_offset;
+
+       uint16          src_y_stride_bytes, src_uv_stride_bytes;
+       osa_bool        imported;
+};
+
+/*
+ * Struct describing an array of frames
+ */
+struct img_frame_array {
+       uint32 array_size;   //!< Number of frames in array
+       struct img_frame *frame;          //!< Pointer to start of frame array
+};
+
+/*
+ * Struct describing list items
+ */
+struct list_item {
+       struct list_item *next;         //!< Next item in the list
+       void *data;                             //!< pointer to list item data
+};
+
+/*
+ * Struct describing rate control params
+ */
+struct img_rc_params {
+       uint32  bits_per_second;                        //!< Bit rate
+       uint32  transfer_bits_per_second;       //!< Transfer rate of encoded data from encoder to the output
+       uint32  initial_qp_i;                           //!< Initial QP I frames (only field used by JPEG)
+       uint32  initial_qp_p;                           //!< Initial QP P frames (only field used by JPEG)
+       uint32  initial_qp_b;                           //!< Initial QP B frames (only field used by JPEG)
+       uint32  bu_size;                                        //!< Basic unit size
+       uint32  frame_rate;
+       uint32  buffer_size;
+       uint32  intra_freq;
+       int16   min_qp;
+       int16   max_qp;
+       osa_bool rc_enable;
+       int32   initial_level;
+       int32   initial_delay;
+       uint16  bframes;
+       osa_bool        hierarchical;
+
+       osa_bool  enable_slice_bob;     //!< Enable movement of slice boundary when Qp is high
+       uint8  max_slice_bob;     //!< Maximum number of rows the slice boundary can be moved
+       uint8  slice_bob_qp;            //!< Minimum Qp at which slice bobbing should take place
+
+       int8    qcp_offset;
+       osa_bool        sc_detect_disable;
+       uint32  slice_byte_limit;
+       uint32  slice_mb_limit;
+       enum img_rcmode rc_mode;
+       enum img_rc_vcm_mode rc_vcm_mode;
+       uint32  rc_cfs_max_margin_perc;
+       osa_bool        disable_frame_skipping;
+       osa_bool        disable_vcm_hardware;
+};
+
+/*
+ * Bit fields for ui32MmuFlags
+ */
+#define MMU_USE_MMU_FLAG               0x00000001
+#define MMU_TILED_FLAG                 0x00000002
+#define MMU_EXTENDED_ADDR_FLAG 0x00000004
+#define MMU_SECURE_FW_UPLOAD   0x00000008
+#define MMU_TILED_INTERLEAVED  0x00000010
+
+#endif
diff --git a/driver/encoder/header_gen.c b/driver/encoder/header_gen.c
new file mode 100644 (file)
index 0000000..a043a17
--- /dev/null
@@ -0,0 +1,1478 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Encoder coded header generation function implementations
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "fw_headers/topazscfwif.h"
+#include "fw_headers/defs.h"
+#include "header_gen.h"
+#include "img_errors.h"
+#include "osal/inc/osa_types.h"
+#include "reg_headers/topazhp_core_regs.h"
+#include "topaz_api.h"
+
+#define ELEMENTS_EMPTY 9999
+#define MAXNUMBERELEMENTS 32
+#define _1080P_30FPS (((1920 * 1088) / 256) * 30)
+
+#ifndef MIN
+#define MIN(a,b) (((a)>(b))?(b):(a))
+#endif
+
+#ifndef MAX
+#define MAX(x,y) (((x)>(y))?(x):(y))
+#endif
+
+void insert_element_token(struct mtx_header_params *mtx_header,
+                         struct mtx_header_element **element_pointers,
+                         enum header_element_type token)
+{
+       uint8 offset;
+       uint8 *p;
+       if (mtx_header->elements != ELEMENTS_EMPTY) {
+               if (element_pointers[mtx_header->elements]->element_type == ELEMENT_STARTCODE_RAWDATA ||
+                   element_pointers[mtx_header->elements]->element_type == ELEMENT_RAWDATA ||
+                   element_pointers[mtx_header->elements]->element_type == ELEMENT_STARTCODE_MIDHDR) {
+                       /*
+                        * Add a new element aligned to word boundary
+                        * Find RAWBit size in bytes (rounded to word boundary))
+                        */
+                       offset = element_pointers[mtx_header->elements]->size + 8 + 31; /* NumberofRawbits (excluding size of bit count field)+ size of the bitcount field */
+                       offset /= 32; /*Now contains rawbits size in words */
+                       offset += 1; /*Now contains rawbits+element_type size in words */
+                       offset *= 4; /*Convert to number of bytes (total size of structure in bytes, aligned to word boundary). */
+               } else {
+                       offset=4;
+               }
+
+               mtx_header->elements++;
+               p = (uint8 *)element_pointers[mtx_header->elements - 1];
+               p += offset;
+               element_pointers[mtx_header->elements] = (struct mtx_header_element *)p;
+       } else {
+               mtx_header->elements = 0;
+       }
+
+       element_pointers[mtx_header->elements]->element_type = token;
+       element_pointers[mtx_header->elements]->size = 0;
+}
+
+uint32 write_upto_8bits_to_elements(struct mtx_header_params *mtx_header,
+                                   struct mtx_header_element **element_pointers,
+                                   uint32 write_bits, uint16 bit_cnt)
+{
+       /* This is the core function to write bits/bytes to a header stream, it writes them directly to ELEMENT structures. */
+       uint8 *write_bytes;
+       uint8 *size_bits;
+       union input_value {
+               uint32  input16;
+               uint8   input8[2];
+       }input_val;
+
+       uint8 out_byte_index;
+       int16 shift;
+
+       if (bit_cnt == 0)
+               return 0;
+
+       /* First ensure that unused bits in ui32WriteBits are zeroed */
+       write_bits &= (0x00ff >> (8 - bit_cnt));
+       input_val.input16 = 0;
+       size_bits = &(element_pointers[mtx_header->elements]->size); /*Pointer to the bit count field */
+       write_bytes = &(element_pointers[mtx_header->elements]->bits); /*Pointer to the space where header bits are to be written */
+       out_byte_index = (size_bits[0] / 8);
+
+       if (!(size_bits[0] & 7)) {
+               if (size_bits[0] >= 120) {
+                       /*Element maximum bits send to element, time to start a new one */
+                       mtx_header->elements++; /* Increment element index */
+                       element_pointers[mtx_header->elements] = (struct mtx_header_element *)&write_bytes[15]; /*Element pointer set to position of next element (120/8 = 15 bytes) */
+                       element_pointers[mtx_header->elements]->element_type = ELEMENT_RAWDATA; /*Write ELEMENT_TYPE */
+                       element_pointers[mtx_header->elements]->size = 0; /* Set new element size (bits) to zero */
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, write_bits, bit_cnt); /* Begin writing to the new element */
+                       return (uint32) bit_cnt;
+               }
+               write_bytes[out_byte_index] = 0; /* Beginning a new byte, clear byte */
+       }
+
+       shift = (int16) ((8 - bit_cnt) - (size_bits[0] & 7));
+
+       if (shift >= 0) {
+               write_bits <<= shift;
+               write_bytes[out_byte_index] |= write_bits;
+               size_bits[0] = size_bits[0] + bit_cnt;
+       } else {
+               input_val.input8[1] = (uint8)write_bits + 256;
+               input_val.input16 >>= -shift;
+               write_bytes[out_byte_index] |= input_val.input8[1];
+
+               size_bits[0] = size_bits[0] + bit_cnt;
+               size_bits[0] = size_bits[0] - ((uint8)-shift);
+               input_val.input8[0] = input_val.input8[0] >> (8 + shift);
+               write_upto_8bits_to_elements(mtx_header, element_pointers, input_val.input8[0], (uint16)-shift);
+       }
+
+       return (uint32) bit_cnt;
+}
+
+uint32 write_upto_32bits_to_elements(struct mtx_header_params *mtx_header,
+                                    struct mtx_header_element **element_pointers,
+                                    uint32 write_bits, uint32 bit_cnt)
+{
+       uint32 bit_lp;
+       uint32 end_byte;
+       uint8 bytes[4];
+
+       for (bit_lp = 0; bit_lp < 4; bit_lp++) {
+               bytes[bit_lp] = (uint8) (write_bits & 255);
+               write_bits = write_bits >> 8;
+       }
+
+       end_byte = ((bit_cnt + 7) / 8);
+       if ((bit_cnt) % 8)
+               write_upto_8bits_to_elements(mtx_header, element_pointers, bytes[end_byte - 1], (uint8) ((bit_cnt) % 8));
+       else
+               write_upto_8bits_to_elements(mtx_header, element_pointers, bytes[end_byte - 1], 8);
+
+       if (end_byte > 1)
+               for (bit_lp = end_byte - 1; bit_lp > 0; bit_lp--)
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, bytes[bit_lp - 1], 8);
+
+       return bit_cnt;
+}
+
+void h264_write_bits_startcode_prefix_element(struct mtx_header_params *mtx_header,
+                                             struct mtx_header_element **element_pointers,
+                                             uint32 byte_size)
+{
+       /* GENERATES THE FIRST ELEMENT OF THE H264_SEQUENCE_HEADER() STRUCTURE */
+       uint32 lp;
+       /*
+        * Byte aligned (bit 0)
+        * (3 bytes in slice header when slice is first in a picture without sequence/picture_header before picture
+        */
+       for (lp = 0; lp < byte_size - 1; lp++)
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8);
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 8);
+       /* Byte aligned (bit 32 or 24) */
+       return;
+}
+
+uint32 generate_ue(struct mtx_header_params *mtx_header, struct mtx_header_element **element_pointers, uint32 val)
+{
+       uint32 lp;
+       uint8 zeros;
+       uint32 chunk;
+       uint32 bit_cnter = 0;
+
+       for (lp = 1, zeros = 0;  (lp - 1) < val; lp = lp + lp, zeros++)
+               val = val - lp;
+
+       /*
+        * zeros = number of preceding zeros required
+        * Val = value to append after zeros and 1 bit
+        * Write preceding zeros
+        */
+       for (lp = (uint32)zeros; lp + 1 > 8; lp -= 8)
+               bit_cnter += write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8);
+
+       /* Write zeros and 1 bit set */
+       bit_cnter += write_upto_8bits_to_elements(mtx_header, element_pointers, (uint8)1, (uint8)(lp + 1));
+
+       /* Write Numeric part  */
+       while (zeros > 8) {
+               zeros -= 8;
+               chunk = (val >> zeros);
+               bit_cnter += write_upto_8bits_to_elements(mtx_header, element_pointers, (uint8)chunk, 8);
+               val = val - (chunk << zeros);
+       }
+
+       bit_cnter += write_upto_8bits_to_elements(mtx_header, element_pointers, (uint8)val, zeros);
+
+       return bit_cnter;
+}
+
+uint32 generate_se(struct mtx_header_params *mtx_header, struct mtx_header_element **element_pointers, int val)
+{
+       uint32 bit_cnter;
+       uint32 code_num;
+
+       bit_cnter=0;
+
+       if (val > 0)
+               code_num = (uint32)(val + val - 1);
+       else
+               code_num = (uint32) (-val - val);
+
+       bit_cnter = generate_ue(mtx_header, element_pointers, code_num);
+
+       return bit_cnter;
+}
+
+void h264_write_bits_scaling_lists(struct mtx_header_params *mtx_header,
+                                  struct mtx_header_element **element_pointers,
+                                  struct h264_scaling_matrix_params *scaling_matrix, osa_bool write_8x8)
+{
+       /* Used by H264_WriteBits_SequenceHeader and H264_WriteBits_PictureHeader */
+       uint32  list, index;
+       int32   cur_scale, delta_scale;
+
+       if (!scaling_matrix) {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_CUSTOM_QUANT);
+               return;
+       }
+
+       for (list = 0; list < 6; list++) {
+               if (scaling_matrix->list_mask & (1 << list)) {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* seq_scaling_list_present_flag[ui32List] = 1 */
+
+                       cur_scale = 8;
+                       for (index = 0; index < 16; index++) {
+                               delta_scale = ((int32)scaling_matrix->scaling_lists4x4[list][index]) - cur_scale;
+                               cur_scale += delta_scale;
+                               generate_se(mtx_header, element_pointers, delta_scale);         /* delta_scale */
+                       }
+               } else {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);       /* seq_scaling_list_present_flag[ui32List] = 0 */
+               }
+       }
+
+       if (!write_8x8)
+               return;
+
+       for (; list < 8; list++) {
+               if (scaling_matrix->list_mask & (1 << list)) {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* seq_scaling_list_present_flag[ui32List] = 1 */
+
+                       cur_scale = 8;
+                       for (index = 0; index < 64; index++) {
+                               delta_scale = ((int32)scaling_matrix->scaling_lists8x8[list - 6][index]) - cur_scale;
+                               cur_scale += delta_scale;
+                               generate_se(mtx_header, element_pointers, delta_scale);         /* delta_scale */
+                       }
+               } else {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);       /* seq_scaling_list_present_flag[ui32List] = 0 */
+               }
+       }
+}
+
+void h264_write_bits_vui_params(struct mtx_header_params *mtx_header,
+                               struct mtx_header_element **element_pointers,
+                               struct h264_vui_params *vui_params)
+{
+       /* Builds VUI Params for the Sequence Header (only present in the 1st sequence of stream) */
+
+       if (vui_params->aspect_ratio_info_present_flag == 1) {
+               /* aspect_ratio_info_present_flag = 1 in Topaz */
+               write_upto_8bits_to_elements(mtx_header, element_pointers, vui_params->aspect_ratio_info_present_flag, 1);
+               /* aspect_ratio_idc (8 bits) = vui_params->aspect_ratio_idc in Topaz */
+               write_upto_8bits_to_elements(mtx_header, element_pointers, vui_params->aspect_ratio_idc, 8);
+
+               if (vui_params->aspect_ratio_idc == 255) {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers,(vui_params->sar_width >> 8), 8);
+                       write_upto_8bits_to_elements(mtx_header, element_pointers,vui_params->sar_width, 8);
+                       write_upto_8bits_to_elements(mtx_header, element_pointers,(vui_params->sar_height >> 8), 8);
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, vui_params->sar_height, 8);
+               }
+       } else {
+               /* aspect_ratio_info_present_flag = 0 in Topaz */
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);
+       }
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    (0 << 3) | /* overscan_info_present_flag (1 bit) = 0 in Topaz */
+                                    (0 << 2) | /* video_signal_type_present_flag (1 bit) = 0 in Topaz */
+                                    (0 << 1) | /* chroma_loc_info_present_flag (1 bit) = 0 in Topaz */
+                                    (1),               /* timing_info_present_flag (1 bit) = 1 in Topaz */
+                                    4);                /* num_units_in_tick (32 bits) = 1 in Topaz */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8);
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8);
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8);
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 8);
+
+       /* time_scale (32 bits) = frame rate */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8);
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8);
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8);
+       write_upto_8bits_to_elements(mtx_header, element_pointers,(uint8)vui_params->time_scale, 8);
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* fixed_frame_rate_flag (1 bit) = 1 in Topaz */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* nal_hrd_parameters_present_flag (1 bit) = 1 in Topaz */
+       /*** Definitions for nal_hrd_parameters() contained in VUI structure for Topaz */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* cpb_cnt_minus1 ue(v) = 0 in Topaz = 1b */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 4);       /* bit_rate_scale (4 bits) = 0 in Topaz */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 2, 4);       /* cpb_size_scale (4 bits) = 2 in Topaz */
+
+       generate_ue(mtx_header, element_pointers, vui_params->bit_rate_value_minus1); /* bit_rate_value_minus1[0] ue(v) = (Bitrate/64)-1 [RANGE:0 to (2^32)-2] */
+       generate_ue(mtx_header, element_pointers, vui_params->cbp_size_value_minus1); /* cpb_size_value_minus1[0] ue(v) = (CPB_Bits_Size/16)-1   where                                                                                                  CPB_Bits_Size = 1.5 * Bitrate  [RANGE:0 to (2^32)-2] */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, vui_params->cbr, 1);         /* cbr_flag[0] (1 bit) = 0 for VBR, 1 for CBR */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+       vui_params->initial_cpb_removal_delay_length_minus1, 5); /*initial_cpb_removal_delay_length_minus1 (5 bits) */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+       vui_params->cpb_removal_delay_length_minus1, 5); /* cpb_removal_delay_length_minus1 (5 bits) */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+       vui_params->dpb_output_delay_length_minus1, 5); /* dpb_output_delay_length_minus1 (5 bits) */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, vui_params->time_offset_length, 5); /* time_offst_length (5 bits) */
+
+       /* End of nal_hrd_parameters() */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);       /* low_delay_hrd_flag */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);       /* pic_struct_present_flag (1 bit) = 0 in Topaz */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    (1 << 1) | /* bitstream_restriction_flag (1 bit) = 1 in Topaz */
+                                    (1 << 0),  /* motion_vectors_over_pic_boundaries_flag (1 bit) = 1 in Topaz; */
+                                    2);
+
+       generate_ue(mtx_header, element_pointers, 0);   /* max_bytes_per_pic_denom ue(v) = 0 */
+       generate_ue(mtx_header, element_pointers, 0);   /* max_bits_per_mb_denom ue(v) = 0 */
+       generate_ue(mtx_header, element_pointers, 9);   /* log2_max_mv_length_horizontal ue(v) = 9 (max horizontal vector is 128 integer samples) */
+       generate_ue(mtx_header, element_pointers, 9);   /* log2_max_mv_length_vertical ue(v) = 9 (max vertical vecotr is 103 integer samples) */
+       generate_ue(mtx_header, element_pointers, vui_params->num_reorder_frames);      /* num_reorder_frames ue(v) = 0 */
+       generate_ue(mtx_header, element_pointers, vui_params->max_dec_frame_buffering); /* max_dec_frame_buffering ue(v) = 0 */
+}
+
+void h264_write_bits_sequence_header(struct mtx_header_params *mtx_header,
+                                    struct mtx_header_element **element_pointers,
+                                    struct h264_sequence_header_params *sh_params,
+                                    struct h264_crop_params *crop,
+                                    struct h264_scaling_matrix_params *scaling_matrix, osa_bool aso)
+{
+       /* calculate some of the VUI parameters here */
+       if (sh_params->profile == SH_PROFILE_BP) {
+               /* for Baseline profile we never re-roder frames */
+               sh_params->vui_params.num_reorder_frames = 0;
+               sh_params->vui_params.max_dec_frame_buffering = sh_params->max_num_ref_frames;
+       } else {
+               /* in higher profiles we can do up to 3 level hierarchical B frames */
+               if (!sh_params->vui_params.num_reorder_frames)
+                       sh_params->vui_params.num_reorder_frames = sh_params->max_num_ref_frames;
+               sh_params->vui_params.max_dec_frame_buffering = MAX (sh_params->max_num_ref_frames, sh_params->vui_params.num_reorder_frames);
+       }
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_STARTCODE_RAWDATA);
+       h264_write_bits_startcode_prefix_element(mtx_header, element_pointers, 4);
+
+       /* GENERATES THE FIRST ELEMENT OF THE H264_SEQUENCE_HEADER() STRUCTURE */
+       /*
+        * 4 Byte StartCodePrefix Pregenerated in: H264_WriteBits_StartCodePrefix_Element()
+        * Byte aligned (bit 32)
+        */
+       write_upto_8bits_to_elements(mtx_header, element_pointers,(0 << 7) |                    /* forbidden_zero_bit=0 */
+                                    (0x3 << 5) |                                               /* nal_ref_idc=01 (may be 11) */
+                                    (7),                                                       /* nal_unit_type=00111 */
+                                    8);
+
+       /* Byte aligned (bit 40) */
+       switch (sh_params->profile) {
+               case SH_PROFILE_BP:
+                       /* profile_idc = 8 bits = 66 for BP (PROFILE_IDC_BP) */
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 66, 8);
+
+                       /* Byte aligned (bit 48) */
+                       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                                    (1 << 7) |                 /* constraint_set0_flag = 1 for BP constra      ints */
+                                                    ((aso ? 0 : 1) << 6) |     /* constraint_set1_flag = 1 for MP constraints   */
+                                                    (1 << 5) |                 /* constraint_set2_flag = 1 for EP constra      ints */
+                                                    ((sh_params->level == SH_LEVEL_1B ? 1 : 0) << 4), /* constraint_set3_flag = 1 for level 1b, 0 for others */
+                                                    /* reserved_zero_4bits = 0 */
+                                                    8);
+               break;
+
+               case SH_PROFILE_MP:
+                       /* profile_idc = 8 bits = 77 for MP (PROFILE_IDC_MP) */
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 77, 8);
+
+                       /* Byte aligned (bit 48) */
+                       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                                    (0 << 7) |         /* constraint_set0_flag = 0 for no BP constraints */
+                                                    (1 << 6) |         /* constraint_set1_flag = 1 for MP constraints */
+                                                    (1 << 5) |         /* constraint_set2_flag = 1 for EP constraints */
+                                                    ((sh_params->level == SH_LEVEL_1B ? 1 : 0) << 4),  /* constraint_set3_flag = 1 for level 1b, 0 for others */
+                                                    /* reserved_zero_4bits = 0 */
+                                                    8);
+               break;
+
+               case SH_PROFILE_HP:
+                       /* profile_idc = 8 bits = 100 for HP (PROFILE_IDC_HP) */
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 100, 8);
+
+                       /* Byte aligned (bit 48) */
+                       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                                    (0 << 7) |         /* constraint_set0_flag = 0 for no BP constraints */
+                                                    (0 << 6) |         /* constraint_set1_flag = 0 for no MP constraints */
+                                                    (0 << 5) |         /* constraint_set2_flag = 0 for no EP constraints */
+                                                    (0 << 4),          /* constraint_set3_flag = 0 */
+                                                       /* reserved_zero_4bits = 0 */
+                                                    8);
+               break;
+
+               case SH_PROFILE_H444P:
+                       /* profile_idc = 8 bits = 244 for H444P (PROFILE_IDC_H444P) */
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 244, 8);
+
+                       /* Byte aligned (bit 48) */
+                       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                                    (0 << 7) |         /* constraint_set0_flag = 0 for no BP constraints */
+                                                    (0 << 6) |         /* constraint_set1_flag = 0 for no MP constraints */
+                                                    (0 << 5) |         /* constraint_set2_flag = 0 for no EP constraints */
+                                                    (0 << 4),          /* constraint_set3_flag = 0 */
+                                                       /* reserved_zero_4bits = 0 */
+                                                    8);
+               break;
+
+               default:
+               break;
+       }
+
+       /*
+        * Byte aligned (bit 56)
+        * level_idc should be set to 9 in the sps in case of level is Level 1B and the profile is High or High 4:4:4 Profile
+        */
+       if ((sh_params->profile == SH_PROFILE_HP) || (sh_params->profile == SH_PROFILE_H444P))
+               /* level_idc (8 bits) = 9 for 1b, 10xlevel for others */
+               write_upto_8bits_to_elements(mtx_header, element_pointers, (sh_params->level == SH_LEVEL_1B) ? 9 : (uint8)sh_params->level, 8);
+
+       else
+               /* level_idc (8 bits) = 11 for 1b, 10xlevel for others */
+               write_upto_8bits_to_elements(mtx_header, element_pointers, (sh_params->level == SH_LEVEL_1B) ? 11 : (uint8)sh_params->level, 8);
+
+       generate_ue(mtx_header, element_pointers, 0);           /* seq_parameter_set_id = 0 */
+
+       if ((sh_params->profile == SH_PROFILE_HP) || (sh_params->profile == SH_PROFILE_H444P)) {
+               generate_ue(mtx_header, element_pointers, 1);           /* chroma_format_idc = 1 */
+               generate_ue(mtx_header, element_pointers, 0);           /* bit_depth_luma_minus8 = 0 */
+               generate_ue(mtx_header, element_pointers, 0);           /* bit_depth_chroma_minus8 = 0 */
+
+               write_upto_8bits_to_elements(mtx_header, element_pointers, sh_params->is_lossless ? 1 : 0, 1); /* qpprime_y_zero_transform_bypass_flag = 1 if lossless */
+
+               if (sh_params->use_default_scaling_list || sh_params->seq_scaling_matrix_present_flag) {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* seq_scaling_matrix_present_flag */
+                       if (!sh_params->use_default_scaling_list) {
+                               h264_write_bits_scaling_lists(mtx_header, element_pointers, scaling_matrix, osa_true);
+                               insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+                       } else {
+                               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8);       /* seq_scaling_list_present_flag[i] = 0; 0 < i < 8 */
+                       }
+               } else {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);       /* seq_scaling_matrix_present_flag */
+               }
+       }
+
+       generate_ue(mtx_header, element_pointers, 1);           /* log2_max_frame_num_minus4 = 1 */
+       generate_ue(mtx_header, element_pointers, 0);           /* pic_order_cnt_type = 0 */
+       generate_ue(mtx_header, element_pointers, sh_params->log2_max_pic_order_cnt - 4);               /* log2_max_pic_order_cnt_Isb_minus4 = 2 */
+
+       generate_ue(mtx_header, element_pointers, sh_params->max_num_ref_frames); /*num_ref_frames ue(2), typically 2 */
+
+       /* Bytes aligned (bit 72) */
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    (sh_params->gaps_in_frame_num_value), /* gaps_in_frame_num_value_allowed_Flag      - (1 bit) */
+                                    1);
+
+       /*
+        * GENERATES THE SECOND, VARIABLE LENGTH, ELEMENT OF THE H264_SEQUENCE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: xx
+        */
+       generate_ue(mtx_header, element_pointers, sh_params->width_in_mbs_minus1);                      /*pic_width_in_mbs_minus1: ue(v) from 10 to 44 (176 to 720 pixel per row) */
+       generate_ue(mtx_header, element_pointers, sh_params->height_in_maps_units_minus1);              /*pic_height_in_maps_units_minus1: ue(v) Value from 8 to 35 (144 to 576 pixels per column) */
+       /* We don't know the alignment at this point, so will have to use bit writing functions */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, sh_params->frame_mbs_only_flag, 1); /* frame_mb_only_flag 1=frame encoding, 0=field encoding */
+
+       if (!sh_params->frame_mbs_only_flag) /* in the case of interlaced encoding */
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1); /* mb_adaptive_frame_field_flag = 0 in Topaz(field encoding at the sequence level) */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1); /* direct_8x8_inference_flag=1 in Topaz */
+
+       if (crop->clip) {
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);
+               generate_ue(mtx_header, element_pointers, crop->left_crop_offset);
+               generate_ue(mtx_header, element_pointers, crop->right_crop_offset);
+               generate_ue(mtx_header, element_pointers, crop->top_crop_offset);
+               generate_ue(mtx_header, element_pointers, crop->bottom_crop_offset);
+       } else {
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);
+       }
+
+       /*
+        * GENERATES THE THIRD ELEMENT OF THE H264_SEQUENCE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: xx
+        */
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    (sh_params->vui_params_present),   /* vui_parameters_present_flag (VUI only in 1st sequence of stream) */
+                                    1);
+       if (sh_params->vui_params_present > 0)
+               h264_write_bits_vui_params(mtx_header, element_pointers, &(sh_params->vui_params));
+
+       /* Finally we need to align to the next byte */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_INSERTBYTEALIGN_H264); /* Tell MTX to insert the byte align field (we don't know final stream size for alignment at this point) */
+}
+
+/*
+ * Prepare an H264 SPS in a form for the MTX to encode into a bitstream.
+ */
+void h264_prepare_sequence_header(struct mtx_header_params *mtx_header, uint32 pic_width_in_mbs,
+                                 uint32 pic_height_in_mbs, osa_bool vui_params_present, struct h264_vui_params *params,
+                                 struct h264_crop_params *crop,
+                                 struct h264_sequence_header_params *sh_params,
+                                 osa_bool aso)
+{
+       struct mtx_header_element *this_element;
+       struct mtx_header_element *element_pointers[MAXNUMBERELEMENTS];
+
+       /*
+        * Builds a sequence, picture and slice header with from the given inputs parameters (start of new frame)
+        * Essential we initialise our header structures before building
+        */
+       mtx_header->elements = ELEMENTS_EMPTY;
+       this_element = (struct mtx_header_element *)mtx_header->element_stream;
+       element_pointers[0] = this_element;
+
+       h264_write_bits_sequence_header(mtx_header, element_pointers, sh_params, crop, NULL, aso);
+       mtx_header->elements++; /*Has been used as an index, so need to add 1 for a valid element count */
+}
+
+void h264_write_bits_picture_header(struct mtx_header_params *mtx_header,
+                                   struct mtx_header_element **element_pointers,
+                                   struct h264_picture_header_params *ph_params,
+                                   struct h264_scaling_matrix_params *scaling_matrix)
+{
+       /* Begin building the picture header element */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_STARTCODE_RAWDATA);
+
+       h264_write_bits_startcode_prefix_element(mtx_header, element_pointers, 4);
+
+       /* GENERATES THE FIRST (STATIC) ELEMENT OF THE H264_PICTURE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: 18
+        * 4 Byte StartCodePrefix Pregenerated in: H264_WriteBits_StartCodePrefix_Element()
+        * Byte aligned (bit 32)
+        */
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    (0 << 7) | /* forbidden_zero_bit */
+                                    (1 << 5) | /* nal_ref_idc (2 bits) = 1 */
+                                    (8),               /* nal_unit_tpye (5 bits) = 8 */
+                                    8);
+
+       /* Byte aligned (bit 40) */
+       generate_ue(mtx_header, element_pointers, ph_params->pic_parameter_set_id); /* pic_parameter_set_id ue(v) */
+       generate_ue(mtx_header, element_pointers, ph_params->seq_parameter_set_id); /* seq_parameter_set_id ue(v) */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    (ph_params->entropy_coding_mode_flag << 4) |       /* entropy_coding_mode_flag (1 bit) 0 for CAVLC */
+                                    (0 << 3) |                                 /* pic_order_present_flag (1 bit) = 0 */
+                                    (1 << 2) |                                 /* num_slice_group_minus1 ue(v) = 0 in Topaz */
+                                    (1 << 1) |                                 /* num_ref_idx_l0_active_minus1 ue(v) = 0 in Topaz */
+                                    (1),                                               /* num_ref_idx_l1_active_minus1 ue(v) = 0 in Topaz */
+                                    5);
+
+       /* WEIGHTED PREDICTION */
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    (ph_params->weighted_pred_flag << 2) |     /* weighted_pred_flag (1 bit) */
+                                    (ph_params->weighted_bipred_idc),  /* weighted_bipred_flag (2 bits) */
+                                    3);
+
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_QP); /*MTX fills this value in */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       /*
+        * GENERATES THE SECOND ELEMENT OF THE H264_PICTURE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: 5
+        * The following field will be generated as a special case by MTX - so not here
+        * Generate_se(mtx_header, ph_params->pic_init_qp_minus26); pic_int_qp_minus26 se(v) = -26 to 25 in Topaz
+        */
+       generate_se(mtx_header, element_pointers, 0); /* pic_int_qs_minus26 se(v) = 0 in Topaz */
+       generate_se(mtx_header, element_pointers, ph_params->chroma_qp_index_offset); /* chroma_qp_index_offset se(v) = 0 in Topaz */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, (1 << 2) |           /* deblocking_filter_control_present_flag (1 bit) = 1 in Topaz */
+                                    (ph_params->constrained_intra_pred_flag << 1) |            /* constrained_intra_pred_Flag (1 bit) = 0 in Topaz */
+                                    (0),                                                       /* redundant_pic_cnt_present_flag (1 bit) = 0 in Topaz */
+                                    3);
+
+       if (ph_params->transform_8x8_mode_flag ||
+           (ph_params->second_chroma_qp_index_offset != ph_params->chroma_qp_index_offset) ||
+           ph_params->pic_scaling_matrix_present_flag) {
+               write_upto_8bits_to_elements(mtx_header, element_pointers, ph_params->transform_8x8_mode_flag, 1);      /* 8x8 transform flag */
+               if (ph_params->pic_scaling_matrix_present_flag) {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* pic_scaling_matrix_present_flag */
+                       if (!ph_params->use_default_scaling_list) {
+                               h264_write_bits_scaling_lists(mtx_header, element_pointers,
+                                                             scaling_matrix, ph_params->transform_8x8_mode_flag);
+                               insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+                       } else {
+                               uint8 scaling_list_size = ph_params->transform_8x8_mode_flag ? 8: 6;
+                               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, scaling_list_size); /* pic_scaling_list_present_flag[i] = 0; 0 < i < 6 (+ 2 ( +4 for chroma444) for 8x8) */
+                       }
+               } else {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);       /* pic_scaling_matrix_present_flag */
+               }
+               generate_se(mtx_header, element_pointers, ph_params->second_chroma_qp_index_offset); /* second_chroma_qp_index_offset se(v) = 0 in Topaz */
+       }
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_INSERTBYTEALIGN_H264); /* Tell MTX to insert the byte align field (we don't know final stream size for alignment at this point) */
+}
+
+/*
+ * Prepare an H264 PPS in a form for the MTX to encode into a bitstream
+ */
+void h264_prepare_picture_header(struct mtx_header_params *mtx_header,
+                                osa_bool cabac_enabled,
+                                osa_bool transform_8x8,
+                                osa_bool intra_constrained,
+                                int8     cqp_offset,
+                                osa_bool weighted_prediction,
+                                uint8   weighted_bi_pred,
+                                osa_bool mvc_pps,
+                                osa_bool scaling_matrix,
+                                osa_bool scaling_lists)
+{
+       /*
+        * Builds a picture header with from the given inputs parameters (start of new frame)
+        * Essential we initialise our header structures before building
+        */
+       struct h264_picture_header_params ph_params;
+       struct mtx_header_element *this_element;
+       struct mtx_header_element *element_pointers[MAXNUMBERELEMENTS];
+       mtx_header->elements = ELEMENTS_EMPTY;
+       this_element = (struct mtx_header_element *)mtx_header->element_stream;
+       element_pointers[0] = this_element;
+
+       ph_params.pic_parameter_set_id = mvc_pps? MVC_PPS_ID : 0;
+       ph_params.seq_parameter_set_id = mvc_pps? MVC_SPS_ID : 0;
+       ph_params.entropy_coding_mode_flag = cabac_enabled ? 1 : 0;
+       ph_params.weighted_pred_flag = weighted_prediction;
+       ph_params.weighted_bipred_idc = weighted_bi_pred;
+       ph_params.chroma_qp_index_offset = cqp_offset;
+       ph_params.constrained_intra_pred_flag = intra_constrained ? 1 : 0;
+       ph_params.transform_8x8_mode_flag = transform_8x8 ? 1 : 0;
+       ph_params.pic_scaling_matrix_present_flag = scaling_matrix ? 1 : 0;
+       ph_params.use_default_scaling_list = !scaling_lists;
+       ph_params.second_chroma_qp_index_offset = cqp_offset;
+
+       h264_write_bits_picture_header(mtx_header, element_pointers, &ph_params, NULL);
+       mtx_header->elements++; /*Has been used as an index, so need to add 1 for a valid element count */
+}
+
+/* SEI_INSERTION */
+void h264_write_bits_aud_header(struct mtx_header_params *mtx_header,
+                               struct mtx_header_element **element_pointers)
+{
+       /* Essential we insert the element before we try to fill it! */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_STARTCODE_RAWDATA);
+
+       h264_write_bits_startcode_prefix_element(mtx_header, element_pointers, 4); /* 00 00 00 01 start code prefix */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 9, 8); /* AUD nal_unit_type = 09 */
+
+       /* primary_pic_type      u(3) 0=I slice, 1=P or I slice, 2=P,B or I slice */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 2, 3);
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 1 << 4, 5); /* rbsp_trailing_bits */
+
+       /* Write terminator */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0x80, 8);
+       return;
+}
+
+void h264_prepare_aud_header(struct mtx_header_params *mtx_header)
+{
+       /* Essential we initialise our header structures before building */
+       struct mtx_header_element *this_element;
+       struct mtx_header_element *element_pointers[MAXNUMBERELEMENTS];
+       mtx_header->elements = ELEMENTS_EMPTY;
+       this_element = (struct mtx_header_element *)mtx_header->element_stream;
+       element_pointers[0] = this_element;
+
+       h264_write_bits_aud_header(mtx_header, element_pointers);
+
+       mtx_header->elements++; /*Has been used as an index, so need to add 1 for a valid element count */
+}
+
+static void insert_prefix_nal_header(struct mtx_header_params *mtx_header,
+                                    struct mtx_header_element **element_pointers,
+                                    struct h264_slice_header_params *slh_params,
+                                    osa_bool cabac_enabled)
+{
+       insert_element_token(mtx_header, element_pointers, ELEMENT_STARTCODE_RAWDATA);
+
+       h264_write_bits_startcode_prefix_element(mtx_header, element_pointers, slh_params->startcode_prefix_size_bytes); /*Can be 3 or 4 bytes - always 4 bytes in our implementations */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);   /* forbidden_zero_bit */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_REFERENCE); /*MTX fills this value in */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 14, 5);    /* nal unit type */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,    0, 1);   /* SVC extension flag */
+
+       if (slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE)
+               write_upto_8bits_to_elements(mtx_header, element_pointers,    0, 1);   /* non_idr_flag flag */
+       else
+               write_upto_8bits_to_elements(mtx_header, element_pointers,    1, 1);   /* non_idr_flag flag */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,    0, 6);   /* priority_id flag */
+       write_upto_32bits_to_elements(mtx_header, element_pointers,    0, 10);   /* view_id flag */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_TEMPORAL_ID); /* temporal_id flag */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_ANCHOR_PIC_FLAG); /* anchor_pic_flag */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       if (slh_params->slice_frame_type == SLHP_B_SLICEFRAME_TYPE )
+               write_upto_8bits_to_elements(mtx_header, element_pointers,    0, 1);   /* interview flag */
+       else
+               write_upto_8bits_to_elements(mtx_header, element_pointers,    1, 1);   /* interview flag */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,    1, 1);   /* reserved one bit */
+}
+
+/* helper function to start new raw data block */
+static osa_bool start_next_rawdata_element = osa_false;
+static void check_start_rawdata_element(struct mtx_header_params *mtx_header,
+                                       struct mtx_header_element **element_pointers)
+{
+       if (start_next_rawdata_element) {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+               start_next_rawdata_element = osa_false;
+       }
+}
+
+void h264_write_bits_extension_slice_header(struct mtx_header_params *mtx_header,
+                                           struct mtx_header_element **element_pointers,
+                                           struct h264_slice_header_params *slh_params,
+                                           osa_bool cabac_enabled,
+                                           osa_bool is_idr)
+{
+       start_next_rawdata_element = osa_false;
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_STARTCODE_RAWDATA);
+
+       h264_write_bits_startcode_prefix_element(mtx_header, element_pointers, slh_params->startcode_prefix_size_bytes); /*Can be 3 or 4 bytes - always 4 bytes in our implementations */
+
+       /* GENERATES THE FIRST ELEMENT OF THE H264_SLICE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: 8
+
+        * StartCodePrefix Pregenerated in: Build_H264_4Byte_StartCodePrefix_Element() (4 or 3 bytes)
+        * (3 bytes when slice is first in a picture without sequence/picture_header before picture
+        * Byte aligned (bit 32 or 24)
+        * NOTE: Slice_Type and Frame_Type are always the same, hence slice_frame_type
+        */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);   /* forbidden_zero_bit */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_REFERENCE); /*MTX fills this value in */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 20, 5);    /* nal_unit_type for coded_slice_extension */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,    0, 1);   /* SVC extension flag */
+
+       if (slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE)
+               write_upto_8bits_to_elements(mtx_header, element_pointers,    0, 1);   /* non_idr_flag flag */
+       else if ((slh_params->slice_frame_type == SLHP_P_SLICEFRAME_TYPE) && is_idr)
+               write_upto_8bits_to_elements(mtx_header, element_pointers,    0, 1);   /* non_idr_flag flag */
+       else
+               write_upto_8bits_to_elements(mtx_header, element_pointers,    1, 1);   /* non_idr_flag flag */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,    0, 6);   /* priority_id flag */
+
+       write_upto_32bits_to_elements(mtx_header, element_pointers,    1, 10);   /* view_id = hardcoded to 1 for dependent view */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_TEMPORAL_ID); /* temporal_id flag */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_ANCHOR_PIC_FLAG); /* anchor_pic_flag */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,    0, 1);   /* interview flag is always FALSE for dependent frames */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,    1, 1);   /* reserved one bit */
+
+       /* slice header */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_CURRMBNR); /*MTX fills this value in */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       /* GENERATES THE SECOND ELEMENT OF THE H264_SLICE_HEADER() STRUCTURE */
+
+       generate_ue(mtx_header, element_pointers, (uint32) ((slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE ) ? SLHP_I_SLICEFRAME_TYPE : slh_params->slice_frame_type));                                      /*slice_type ue(v): 0 for P-slice, 1 for B-slice, 2 for I-slice */
+
+       generate_ue(mtx_header, element_pointers, 1);  /* pic_parameter_set_id = 1 for dependent view */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_FRAME_NUM); /* Insert token to tell MTX to insert frame_num */
+       start_next_rawdata_element = osa_true;
+
+       if ((slh_params->pic_interlace)||(slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE)) {
+               /* interlaced encoding */
+               if (slh_params->pic_interlace) {
+                       check_start_rawdata_element(mtx_header, element_pointers);
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* field_pic_flag = 1 */
+                       insert_element_token(mtx_header, element_pointers, ELEMENT_BOTTOM_FIELD); /* Insert token to tell MTX to insert BOTTOM_FIELD flag if required */
+                       start_next_rawdata_element = osa_true;
+               }
+       }
+
+       if ( (slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE) || (is_idr)) {
+               check_start_rawdata_element(mtx_header, element_pointers );
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* idr_pic_id ue(v) = 0 (1b) in Topaz */
+       }
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_PIC_ORDER_CNT); /* Insert token to tell MTX to insert pic_order_cnt_lsb */
+       start_next_rawdata_element = osa_true;
+
+       if (slh_params->slice_frame_type == SLHP_B_SLICEFRAME_TYPE)
+               insert_element_token(mtx_header, element_pointers, ELEMENT_DIRECT_SPATIAL_MV_FLAG); /* Insert token to tell MTX to insert direct_spatial_mv_pred_flag */
+
+       if (slh_params->slice_frame_type == SLHP_P_SLICEFRAME_TYPE) {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_NUM_REF_IDX_ACTIVE);
+               start_next_rawdata_element = osa_true;
+       } else if ( slh_params->slice_frame_type == SLHP_B_SLICEFRAME_TYPE) {
+               check_start_rawdata_element(mtx_header, element_pointers );
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);             /* num_ref_idx_active_override_flag (1 bit) = 0 in Topaz */
+       }
+
+       /* reference picture list modification */
+       if (slh_params->slice_frame_type != SLHP_I_SLICEFRAME_TYPE &&
+               slh_params->slice_frame_type != SLHP_IDR_SLICEFRAME_TYPE) {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_REORDER_L0); /* Insert token to tell MTX to insert BOTTOM_FIELD flag if required */
+               start_next_rawdata_element = osa_true;
+       }
+
+       if (slh_params->slice_frame_type == SLHP_B_SLICEFRAME_TYPE) {
+               check_start_rawdata_element(mtx_header, element_pointers );
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);       /* ref_pic_list_ordering_flag_l1 (1 bit) = 0, no reference picture ordering in Topaz */
+       }
+
+       if ((slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE) || (is_idr)) {
+               check_start_rawdata_element(mtx_header, element_pointers );
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);       /* no_output_of_prior_pics_flag (1 bit) = 0 */
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);               /* long_term_reference_flag (1 bit) = 0 */
+       } else {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_ADAPTIVE); /*MTX fills this value in */
+               start_next_rawdata_element = osa_true;
+       }
+
+       if (cabac_enabled && ((SLHP_P_SLICEFRAME_TYPE == slh_params->slice_frame_type) ||
+           (SLHP_B_SLICEFRAME_TYPE == slh_params->slice_frame_type))) {
+               check_start_rawdata_element(mtx_header, element_pointers );
+               generate_ue(mtx_header, element_pointers, 0);   /* hard code cabac_init_idc value of 0 */
+       }
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_SQP); /*MTX fills this value in */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       /* GENERATES ELEMENT OF THE H264_SLICE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: 11
+        */
+       generate_ue(mtx_header, element_pointers, slh_params->disable_deblocking_filter_idc);   /*disable_deblocking_filter_idc ue(v) = 2? */
+       if (slh_params->disable_deblocking_filter_idc != 1) {
+               generate_se(mtx_header, element_pointers, slh_params->deb_alpha_offset_div2); /*slice_alpha_c0_offset_div2 se(v) = 0 (1b) in Topaz */
+               generate_se(mtx_header, element_pointers, slh_params->deb_beta_offset_div2); /*slice_beta_offset_div2 se(v) = 0 (1b) in Topaz */
+       }
+       /*
+        * num_slice_groups_minus1 ==0 in Topaz, so no slice_group_change_cycle field here
+        * no byte alignment at end of slice headers
+        */
+}
+
+void h264_write_bits_slice_header(struct mtx_header_params *mtx_header,
+                                 struct mtx_header_element **element_pointers,
+                                 struct h264_slice_header_params *slh_params,
+                                 osa_bool cabac_enabled, osa_bool is_idr)
+{
+       start_next_rawdata_element = osa_false;
+       if (slh_params->mvc_view_idx == (uint16)(NON_MVC_VIEW)) {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_STARTCODE_RAWDATA);
+       } else if (slh_params->mvc_view_idx == MVC_BASE_VIEW_IDX) {
+               insert_prefix_nal_header(mtx_header, element_pointers, slh_params, cabac_enabled);
+               insert_element_token(mtx_header, element_pointers, ELEMENT_STARTCODE_MIDHDR);
+       } else {
+               /*Insert  */
+               h264_write_bits_extension_slice_header(mtx_header, element_pointers,
+               slh_params, cabac_enabled, is_idr);
+               return;
+       }
+
+       h264_write_bits_startcode_prefix_element(mtx_header, element_pointers, slh_params->startcode_prefix_size_bytes); /*Can be 3 or 4 bytes - always 4 bytes in our implementations */
+
+       /* GENERATES THE FIRST ELEMENT OF THE H264_SLICE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: 8
+
+        * StartCodePrefix Pregenerated in: Build_H264_4Byte_StartCodePrefix_Element() (4 or 3 bytes)
+        * (3 bytes when slice is first in a picture without sequence/picture_header before picture
+        * Byte aligned (bit 32 or 24)
+        * NOTE: Slice_Type and Frame_Type are always the same, hence slice_frame_type
+        */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);   /* forbidden_zero_bit */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_REFERENCE); /*MTX fills this value in */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, ((slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE ? 5 : 1)),                        /* nal_unit_tpye (5 bits) = I-frame IDR, and 1 for  rest */
+                                    5);
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_CURRMBNR); /*MTX fills this value in */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       /* GENERATES THE SECOND ELEMENT OF THE H264_SLICE_HEADER() STRUCTURE */
+
+       generate_ue(mtx_header, element_pointers, (uint32) ((slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE ) ?
+                   SLHP_I_SLICEFRAME_TYPE : slh_params->slice_frame_type));    /*slice_type ue(v): 0 for P-slice, 1 for B-slice, 2 for I-slice */
+
+       if (slh_params->mvc_view_idx != (uint16)(NON_MVC_VIEW))
+               generate_ue(mtx_header, element_pointers, slh_params->mvc_view_idx);  /* pic_parameter_set_id = 0 */
+       else
+               generate_ue(mtx_header, element_pointers, 0);  /* pic_parameter_set_id = 0 */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_FRAME_NUM); /* Insert token to tell MTX to insert frame_num */
+
+       if ((slh_params->pic_interlace) || (slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE)) {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+               /* interlaced encoding */
+               if (slh_params->pic_interlace) {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* field_pic_flag = 1 */
+                       insert_element_token(mtx_header, element_pointers, ELEMENT_BOTTOM_FIELD); /* Insert token to tell MTX to insert BOTTOM_FIELD flag if required */
+                       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+               }
+
+               if (slh_params->slice_frame_type == SLHP_IDR_SLICEFRAME_TYPE)
+                       insert_element_token(mtx_header, element_pointers, ELEMENT_IDR_PIC_ID); /* idr_pic_id ue(v) */
+       }
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_PIC_ORDER_CNT); /* Insert token to tell MTX to insert pic_order_cnt_lsb */
+
+       if (slh_params->slice_frame_type == SLHP_B_SLICEFRAME_TYPE)
+               insert_element_token(mtx_header, element_pointers, ELEMENT_DIRECT_SPATIAL_MV_FLAG); /* Insert token to tell MTX to insert direct_spatial_mv_pred_flag */
+
+       if (slh_params->slice_frame_type == SLHP_P_SLICEFRAME_TYPE) {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_NUM_REF_IDX_ACTIVE); /* Insert token to tell MTX to insert override for number of active references */
+       } else if (slh_params->slice_frame_type == SLHP_B_SLICEFRAME_TYPE) {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);               /* num_ref_idx_active_override_flag (1 bit) = 0 */
+       }
+
+       if (slh_params->slice_frame_type!=SLHP_I_SLICEFRAME_TYPE && slh_params->slice_frame_type != SLHP_IDR_SLICEFRAME_TYPE) {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_REORDER_L0); /* Insert token to tell MTX to insert reference list 0 reordering */
+
+               if (slh_params->slice_frame_type == SLHP_B_SLICEFRAME_TYPE)
+                       insert_element_token(mtx_header, element_pointers, ELEMENT_REORDER_L1); /* Insert token to tell MTX to insert reference list 1 reordering */
+       }
+
+       /* WEIGHTED PREDICTION */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_SLICEWEIGHTEDPREDICTIONSTRUCT);
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       if (slh_params->reference_picture && slh_params->is_longterm_ref) {
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* adaptive_ref_pic_marking_mode_flag (1 bit) = 0 */
+
+               /* Clear any existing long-term reference */
+               generate_ue(mtx_header, element_pointers, 5);                                   /* memory_management_control_operation */
+
+               /* Allow a single long-term reference */
+               generate_ue(mtx_header, element_pointers, 4);                                   /* memory_management_control_operation */
+               generate_ue(mtx_header, element_pointers, 1);                                   /* max_long_term_frame_idx_plus1 */
+
+               /* Set current picture as the long-term reference */
+               generate_ue(mtx_header, element_pointers, 6);                                   /* memory_management_control_operation */
+               generate_ue(mtx_header, element_pointers, 0);                                   /* long_term_frame_idx */
+
+               /* End */
+               generate_ue(mtx_header, element_pointers, 0);                                   /* memory_management_control_operation */
+       } else {
+               insert_element_token(mtx_header, element_pointers, ELEMENT_ADAPTIVE); /*MTX fills this value in */
+               insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+       }
+
+       if (cabac_enabled && ((SLHP_P_SLICEFRAME_TYPE == slh_params->slice_frame_type) ||
+           (SLHP_B_SLICEFRAME_TYPE == slh_params->slice_frame_type)))
+               generate_ue(mtx_header, element_pointers, 0);   /* hard code cabac_init_idc value of 0 */
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_SQP); /*MTX fills this value in */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+
+       /* GENERATES ELEMENT OF THE H264_SLICE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: 11
+        */
+       generate_ue(mtx_header, element_pointers, slh_params->disable_deblocking_filter_idc);   /*disable_deblocking_filter_idc ue(v) = 2? */
+       if (slh_params->disable_deblocking_filter_idc != 1) {
+               generate_se(mtx_header, element_pointers, slh_params->deb_alpha_offset_div2); /*slice_alpha_c0_offset_div2 se(v) = 0 (1b) in Topaz */
+               generate_se(mtx_header, element_pointers, slh_params->deb_beta_offset_div2); /*slice_beta_offset_div2 se(v) = 0 (1b) in Topaz */
+       }
+
+       /*
+        * num_slice_groups_minus1 ==0 in Topaz, so no slice_group_change_cycle field here
+        * no byte alignment at end of slice headers
+        */
+}
+
+/*
+ * Prepare an H264 slice header in a form for the MTX to encode into a
+ * bitstream.
+ */
+void h264_prepare_slice_header(struct mtx_header_params *mtx_header,
+                              osa_bool intra_slice, osa_bool inter_b_slice,
+                              uint8    disable_deblocking_filter_idc,
+                              uint32   first_mb_address, uint32 mb_skip_run,
+                              osa_bool cabac_enabled, osa_bool is_interlaced,
+                              osa_bool is_idr, uint16 mvc_view_idx, osa_bool is_longterm_ref)
+{
+       struct h264_slice_header_params slh_params;
+       struct mtx_header_element *this_element;
+       struct mtx_header_element *element_pointers[MAXNUMBERELEMENTS];
+
+       slh_params.startcode_prefix_size_bytes  = 4;
+       /* pcb -  I think that this is more correct now  -- This should also work for IDR-P frames which will be marked as SLHP_P_SLICEFRAME_TYPE */
+       slh_params.slice_frame_type = intra_slice ? (is_idr ? SLHP_IDR_SLICEFRAME_TYPE : SLHP_I_SLICEFRAME_TYPE ) : (inter_b_slice ?                                                            SLHP_B_SLICEFRAME_TYPE : SLHP_P_SLICEFRAME_TYPE);
+
+       slh_params.first_mb_address = first_mb_address;
+       slh_params.disable_deblocking_filter_idc = (uint8)disable_deblocking_filter_idc;
+       slh_params.pic_interlace = is_interlaced;
+       slh_params.deb_alpha_offset_div2 = 0;
+       slh_params.deb_beta_offset_div2 = 0;
+       /* setup the new flags used for B frame as reference */
+       slh_params.reference_picture = inter_b_slice ? 0 : 1;
+       slh_params.mvc_view_idx = mvc_view_idx;
+       slh_params.is_longterm_ref = is_longterm_ref;
+       slh_params.log2_max_pic_order_cnt = 2;
+       slh_params.longterm_ref_num = 0;
+       slh_params.ref_is_longterm_ref[0] = 0;
+       slh_params.ref_longterm_ref_num[0] = 0;
+       slh_params.ref_is_longterm_ref[1] = 0;
+       slh_params.ref_longterm_ref_num[1] = 0;
+       /*
+        * Builds a single slice header from the given parameters (mid frame)
+        * Essential we initialise our header structures before building
+        */
+       mtx_header->elements = ELEMENTS_EMPTY;
+       this_element = (struct mtx_header_element *)mtx_header->element_stream;
+       element_pointers[0] = this_element;
+
+       h264_write_bits_slice_header(mtx_header, element_pointers, &slh_params, cabac_enabled, is_idr);
+       mtx_header->elements++; /*Has been used as an index, so need to add 1 for a valid element count */
+}
+
+/*
+ * PrepareEncodeSliceParams
+ */
+uint32 prepare_encode_slice_params(void *enc_ctx, struct slice_params *slice_params,
+                                  osa_bool is_intra, uint16 current_row, uint8 deblock_idc,
+                                  uint16 slice_height, osa_bool is_bpicture, osa_bool field_mode,
+                                  int32 fine_y_search_size)
+{
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       uint32 frame_store_format;
+       uint8 swap_chromas;
+       uint32 mbs_per_kick, kicks_per_slice;
+       uint32 ipe_control;
+       enum img_ipe_minblock_size blk_sz;
+       struct img_mtx_video_context *mtx_enc_context = NULL;
+       osa_bool restrict_4x4_search_size;
+       uint32 lritc_boundary;
+
+       if (!enc_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       enc = (struct img_enc_context *)enc_ctx;
+       video = enc->video;
+
+       if (video->mtx_enc_ctx_mem.cpu_virt != NULL)
+               mtx_enc_context = (struct img_mtx_video_context *)(&video->mtx_enc_ctx_mem);
+
+       /* We want multiple ones of these so we can submit multiple slices without having to wait for the next*/
+       slice_params->flags = 0;
+       ipe_control = video->ipe_control;
+
+       /* extract block size */
+       blk_sz = F_EXTRACT(ipe_control, TOPAZHP_CR_IPE_BLOCKSIZE);
+
+       /* mask-out the block size bits from ipe_control */
+       ipe_control &= ~(F_MASK(TOPAZHP_CR_IPE_BLOCKSIZE));
+
+       switch (video->standard) {
+               case IMG_STANDARD_H264:
+                       if (blk_sz > 2)
+                               blk_sz = 2;
+                       if (is_bpicture && blk_sz > 1)
+                               blk_sz = 1;
+
+                       if (video->mbps >= _1080P_30FPS)
+                               ipe_control |= F_ENCODE(fine_y_search_size, TOPAZHP_CR_IPE_LRITC_BOUNDARY) |
+                                               F_ENCODE(fine_y_search_size, TOPAZHP_CR_IPE_Y_FINE_SEARCH);
+                       else
+                               ipe_control |= F_ENCODE(fine_y_search_size + 1, TOPAZHP_CR_IPE_LRITC_BOUNDARY) |
+                                               F_ENCODE(fine_y_search_size, TOPAZHP_CR_IPE_Y_FINE_SEARCH);
+
+                       if (video->limit_num_vectors)
+                               ipe_control |= F_ENCODE(1, TOPAZHP_CR_IPE_MV_NUMBER_RESTRICTION);
+               break;
+               default:
+               break;
+       }
+
+       if (video->mbps >= _1080P_30FPS)
+               restrict_4x4_search_size = 1;
+       else
+               restrict_4x4_search_size = 0;
+
+       ipe_control |= F_ENCODE(blk_sz, TOPAZHP_CR_IPE_BLOCKSIZE);
+
+       lritc_boundary = (blk_sz != BLK_SZ_16x16) ? (fine_y_search_size + (restrict_4x4_search_size ? 0 : 1)) : 1;
+       if (lritc_boundary > 3)
+               IMG_DBG_ASSERT(0);
+
+       /* Minium sub block size to calculate motion vectors for. 0=16x16, 1=8x8, 2=4x4 */
+       ipe_control = F_INSERT(ipe_control, blk_sz, TOPAZHP_CR_IPE_BLOCKSIZE);
+       ipe_control = F_INSERT(ipe_control, fine_y_search_size, TOPAZHP_CR_IPE_Y_FINE_SEARCH);
+       ipe_control = F_INSERT(ipe_control, video->limit_num_vectors, TOPAZHP_CR_IPE_MV_NUMBER_RESTRICTION);
+
+       ipe_control = F_INSERT(ipe_control, lritc_boundary, TOPAZHP_CR_IPE_LRITC_BOUNDARY); /* 8x8 search  */
+       ipe_control = F_INSERT(ipe_control, restrict_4x4_search_size ? 0 : 1, TOPAZHP_CR_IPE_4X4_SEARCH);
+
+       ipe_control = F_INSERT(ipe_control, video->high_latency, TOPAZHP_CR_IPE_HIGH_LATENCY);
+
+       slice_params->ipe_control = ipe_control;
+
+       if (!is_intra) {
+               if (is_bpicture)
+                       slice_params->flags |= ISINTERB_FLAGS;
+               else
+                       slice_params->flags |= ISINTERP_FLAGS;
+       }
+
+       if (video->multi_reference_p && !(is_intra || is_bpicture))
+               slice_params->flags |= ISMULTIREF_FLAGS;
+
+       if (video->spatial_direct && is_bpicture)
+               slice_params->flags |= SPATIALDIRECT_FLAGS;
+
+       if (is_intra) {
+               slice_params->slice_config = F_ENCODE(TOPAZHP_CR_SLICE_TYPE_I_SLICE,TOPAZHP_CR_SLICE_TYPE);
+       } else {
+               if (is_bpicture)
+                       slice_params->slice_config = F_ENCODE(TOPAZHP_CR_SLICE_TYPE_B_SLICE,TOPAZHP_CR_SLICE_TYPE);
+               else /* p frame */
+                       slice_params->slice_config = F_ENCODE(TOPAZHP_CR_SLICE_TYPE_P_SLICE,TOPAZHP_CR_SLICE_TYPE);
+       }
+
+       mbs_per_kick = video->kick_size;
+
+       /*
+        * we need to figure out the number of kicks and mb's per kick to use.
+        * on H.264 we will use a MB's per kick of basic unit
+        * on other rc varients we will use mb's per kick of width
+        */
+       kicks_per_slice = ((slice_height / 16) * (video->width / 16)) / mbs_per_kick;
+
+       IMG_DBG_ASSERT((kicks_per_slice * mbs_per_kick) == ((slice_height / 16) * (video->width / 16)));
+
+       /*
+        * need some sensible ones don't look to be implemented yet...
+        * change per stream
+        */
+       if ((video->format == IMG_CODEC_UY0VY1_8888) || (video->format == IMG_CODEC_VY0UY1_8888))
+               frame_store_format = 3;
+       else if ((video->format == IMG_CODEC_Y0UY1V_8888) || (video->format == IMG_CODEC_Y0VY1U_8888))
+               frame_store_format = 2;
+       else if ((video->format == IMG_CODEC_420_PL12) || (video->format == IMG_CODEC_422_PL12) ||(video->format == IMG_CODEC_420_PL12_PACKED) ||
+                (video->format == IMG_CODEC_420_PL21_PACKED)|| (video->format == IMG_CODEC_420_PL21) || (video->format == IMG_CODEC_422_PL21))
+               frame_store_format = 1;
+       else
+               frame_store_format = 0;
+
+       if ((video->format == IMG_CODEC_VY0UY1_8888) || (video->format == IMG_CODEC_Y0VY1U_8888) ||
+           (((video->format == IMG_CODEC_420_PL21) || (video->format == IMG_CODEC_420_PL21_PACKED)) && mtx_enc_context &&
+            (mtx_enc_context->scaler_setup.scaler_control == 0)))
+               swap_chromas = 1;
+       else
+               swap_chromas = 0;
+
+       switch (video->standard) {
+               case IMG_STANDARD_H264:
+                       /* H264 */
+                       slice_params->seq_config = F_ENCODE(0, TOPAZHP_CR_TEMPORAL_PIC0_BELOW_IN_VALID) |
+                                                       F_ENCODE(0, TOPAZHP_CR_TEMPORAL_PIC1_BELOW_IN_VALID) |
+                                                       F_ENCODE(0, TOPAZHP_CR_ABOVE_OUT_OF_SLICE_VALID) |
+                                                       F_ENCODE(1, TOPAZHP_CR_WRITE_TEMPORAL_PIC0_BELOW_VALID) |
+                                                       F_ENCODE(0, TOPAZHP_CR_REF_PIC0_VALID) |
+                                                       F_ENCODE(0, TOPAZHP_CR_REF_PIC1_VALID) |
+                                                       F_ENCODE(!is_bpicture, TOPAZHP_CR_REF_PIC1_EQUAL_PIC0) |
+                                                       F_ENCODE(field_mode ? 1 : 0 , TOPAZHP_CR_FIELD_MODE) |
+                                                       F_ENCODE(swap_chromas, TOPAZHP_CR_FRAME_STORE_CHROMA_SWAP) |
+                                                       F_ENCODE(frame_store_format, TOPAZHP_CR_FRAME_STORE_FORMAT) |
+                                                       F_ENCODE(TOPAZHP_CR_ENCODER_STANDARD_H264, TOPAZHP_CR_ENCODER_STANDARD) |
+                                                       F_ENCODE(deblock_idc == 1 ? 0 : 1, TOPAZHP_CR_DEBLOCK_ENABLE);
+
+                       if (video->rc_params.bframes) {
+                               slice_params->seq_config |= F_ENCODE(1, TOPAZHP_CR_WRITE_TEMPORAL_COL_VALID);
+                               if ((slice_params->flags & ISINTERB_FLAGS ) == ISINTERB_FLAGS)
+                                       slice_params->seq_config |= F_ENCODE(1, TOPAZHP_CR_TEMPORAL_COL_IN_VALID);
+                       }
+                       if (!is_bpicture)
+                               slice_params->seq_config |= F_ENCODE(1, TOPAZHP_CR_WRITE_TEMPORAL_COL_VALID);
+               break;
+
+               default:
+               break;
+       }
+
+       if (is_bpicture) {
+               slice_params->seq_config |= F_ENCODE(0, TOPAZHP_CR_TEMPORAL_PIC1_BELOW_IN_VALID) |
+                                               F_ENCODE(0, TOPAZHP_CR_WRITE_TEMPORAL_PIC1_BELOW_VALID) |
+                                               F_ENCODE(1, TOPAZHP_CR_REF_PIC1_VALID) |
+                                               F_ENCODE(1, TOPAZHP_CR_TEMPORAL_COL_IN_VALID);
+       }
+
+       if (video->enable_sel_stats_flags & ESF_FIRST_STAGE_STATS)
+               slice_params->seq_config |= F_ENCODE(1, TOPAZHP_CR_WRITE_MB_FIRST_STAGE_VALID);
+
+       if (video->enable_sel_stats_flags & ESF_MP_BEST_MB_DECISION_STATS ||
+           video->enable_sel_stats_flags & ESF_MP_BEST_MOTION_VECTOR_STATS) {
+               slice_params->seq_config |= F_ENCODE(1, TOPAZHP_CR_BEST_MULTIPASS_OUT_VALID);
+
+               if (!(video->enable_sel_stats_flags & ESF_MP_BEST_MOTION_VECTOR_STATS))
+                       slice_params->seq_config |= F_ENCODE(1, TOPAZHP_CR_BEST_MVS_OUT_DISABLE); /* 64 Byte Best Multipass Motion Vector output disabled by default */
+       }
+
+       if (video->enable_inp_ctrl)
+               slice_params->seq_config |= F_ENCODE(1, TOPAZHP_CR_MB_CONTROL_IN_VALID);
+
+       return 0;
+}
+
+/*
+ * Generates the slice params template
+ */
+void generate_slice_params_template(struct img_enc_context *enc,
+                                   struct vidio_ddbufinfo *mem_info,
+                                   enum img_frame_template_type slice_type,
+                                   osa_bool is_interlaced, int32 fine_y_search_size)
+{
+       osa_bool is_intra = ((slice_type == IMG_FRAME_IDR) || (slice_type == IMG_FRAME_INTRA));
+       osa_bool is_bframe = (slice_type == IMG_FRAME_INTER_B);
+       osa_bool is_idr = ((slice_type == IMG_FRAME_IDR) || (slice_type == IMG_FRAME_INTER_P_IDR));
+       struct img_video_context *video = enc->video;
+       uint16 mvc_view_idx = (uint16)(NON_MVC_VIEW);
+       /* Initialize Slice Params */
+       struct slice_params *slice_params_dest;
+       uint32 slice_height = video->picture_height / video->slices_per_picture;
+       slice_height &= ~15;
+
+       slice_params_dest = (struct slice_params *)(mem_info->cpu_virt);
+
+       mvc_view_idx = video->mvc_view_idx;
+
+       prepare_encode_slice_params(enc, slice_params_dest, is_intra,
+                                   0, video->deblock_idc, slice_height, is_bframe,
+                                   is_interlaced, fine_y_search_size);
+
+       slice_params_dest->template_type = slice_type;
+
+       /* Prepare Slice Header Template */
+       switch (video->standard) {
+               case IMG_STANDARD_H264:
+                       h264_prepare_slice_header(&slice_params_dest->slice_hdr_tmpl, is_intra,
+                                                 is_bframe, video->deblock_idc, 0, 0, video->cabac_enabled,
+                                                 is_interlaced, is_idr, mvc_view_idx, osa_false);
+               break;
+
+               default:
+               break;
+       }
+}
+
+void h264_write_bits_mvc_sequence_header(struct mtx_header_params *mtx_header,
+                                        struct mtx_header_element **element_pointers,
+                                        struct h264_sequence_header_params *sh_params,
+                                        struct h264_crop_params *crop,
+                                        struct h264_scaling_matrix_params *scaling_matrix)
+{
+       int view_idx = 0;
+       int num_views = MAX_MVC_VIEWS;
+
+       insert_element_token(mtx_header, element_pointers, ELEMENT_STARTCODE_RAWDATA);
+       h264_write_bits_startcode_prefix_element(mtx_header, element_pointers, 4);
+
+       /*
+        * 4 Byte StartCodePrefix Pregenerated in: H264_WriteBits_StartCodePrefix_Element()
+        * Byte aligned (bit 32)
+        */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, (0 << 7) |                                   /* forbidden_zero_bit=0 */
+                                    (0x3 << 5) |                                                                       /* nal_ref_idc=01 (may be 11) */
+                                    (15),                                                                              /* nal_unit_type=15 */
+                                    8);
+
+       /*
+        * Byte aligned (bit 40)
+        * profile_idc = 8 bits = 66 for BP (PROFILE_IDC_BP), 77 for MP (PROFILE_IDC_MP)
+        */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 118, 8);
+
+       /* Byte aligned (bit 48) */
+       write_upto_8bits_to_elements(mtx_header, element_pointers,(0 << 7) |    /* constrain_set0_flag = 1 for MP + BP constraints */
+                               (0 << 6) |                                                  /* constrain_set1_flag  = 1 for MP + BP constraints */
+                               (0 << 5) |                                                                              /* constrain_set2_flag = always 0 in BP/MP */
+                               (0 << 4),                                                           /* constrain_set3_flag = 1 for level 1b, 0 for others */
+                               /* reserved_zero_4bits = 0 */
+                               8);
+
+       /*
+        * Byte aligned (bit 56)
+        * level_idc should be set to 9 in the sps in case of level is Level 1B and the profile is Multiview High or Stereo High profiles
+        */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, (sh_params->level == SH_LEVEL_1B) ? 9 : (uint8)sh_params->level, 8);           /* level_idc (8 bits) = 9 for 1b, 10xlevel for others */
+
+       generate_ue(mtx_header, element_pointers, MVC_SPS_ID);          /* seq_parameter_Set_id = 1 FOR subset-SPS */
+       generate_ue(mtx_header, element_pointers, 1);           /* chroma_format_idc = 1 */
+       generate_ue(mtx_header, element_pointers, 0);           /* bit_depth_luma_minus8 = 0 */
+       generate_ue(mtx_header, element_pointers, 0);           /* bit_depth_chroma_minus8 = 0 */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, sh_params->is_lossless ? 1 : 0, 1); /* qpprime_y_zero_transform_bypass_flag = 0 */
+
+       if (sh_params->use_default_scaling_list || sh_params->seq_scaling_matrix_present_flag) {
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1);       /* seq_scaling_matrix_present_flag */
+               if (!sh_params->use_default_scaling_list) {
+                       h264_write_bits_scaling_lists(mtx_header, element_pointers, scaling_matrix, osa_true);
+                       insert_element_token(mtx_header, element_pointers, ELEMENT_RAWDATA);
+               } else {
+                       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 8); /* seq_scaling_list_present_flag[i] = 0; 0 < i < 8 */
+
+               }
+       } else {
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1);       /* seq_scaling_matrix_present_flag */
+       }
+
+       generate_ue(mtx_header, element_pointers, 1);           /* log2_max_frame_num_minus4 = 1 */
+       generate_ue(mtx_header, element_pointers, 0);           /* pic_order_cnt_type = 0 */
+       generate_ue(mtx_header, element_pointers, 2);           /* log2_max_pic_order_cnt_Isb_minus4 = 2 */
+
+       generate_ue(mtx_header, element_pointers, sh_params->max_num_ref_frames); /*num_ref_frames ue(2), typically 2 */
+       /* Bytes aligned (bit 72) */
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                       (sh_params->gaps_in_frame_num_value), /* gaps_in_frame_num_value_allowed_Flag   - (1 bit) */
+                                       1);
+
+       /*
+        * GENERATES THE SECOND, VARIABLE LENGTH, ELEMENT OF THE H264_SEQUENCE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: xx
+        */
+       generate_ue(mtx_header, element_pointers, sh_params->width_in_mbs_minus1);              /*pic_width_in_mbs_minus1: ue(v) from 10 to 44 (176 to 720 pixel per row) */
+       generate_ue(mtx_header, element_pointers, sh_params->height_in_maps_units_minus1);              /*pic_height_in_maps_units_minus1: ue(v) Value from 8 to 35 (144 to 576 pixels per column) */
+       /* We don't know the alignment at this point, so will have to use bit writing functions */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, sh_params->frame_mbs_only_flag, 1); /* frame_mb_only_flag 1=frame encoding, 0=field encoding */
+
+       if (!sh_params->frame_mbs_only_flag) /* in the case of interlaced encoding */
+               write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 1); /* mb_adaptive_frame_field_flag = 0 in Topaz(field encoding at the sequence level) */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1); /* direct_8x8_inference_flag=1 in Topaz */
+
+       if (crop->clip) {
+               write_upto_8bits_to_elements(mtx_header, element_pointers,1,1);
+               generate_ue(mtx_header, element_pointers, crop->left_crop_offset);
+               generate_ue(mtx_header, element_pointers, crop->right_crop_offset);
+               generate_ue(mtx_header, element_pointers, crop->top_crop_offset);
+               generate_ue(mtx_header, element_pointers, crop->bottom_crop_offset);
+
+       } else {
+               write_upto_8bits_to_elements(mtx_header, element_pointers,0,1);
+       }
+
+       /*
+        * GENERATES THE THIRD ELEMENT OF THE H264_SEQUENCE_HEADER() STRUCTURE
+        * ELEMENT BITCOUNT: xx
+        */
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    (sh_params->vui_params_present),                                   /* vui_parameters_present_flag (VUI only in 1st sequence of stream) */
+                                    1);
+       if (sh_params->vui_params_present > 0)
+               h264_write_bits_vui_params(mtx_header, element_pointers, &(sh_params->vui_params));
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 1, 1); /*bit_equal_to_one */
+
+       /* sequence parameter set MVC extension */
+       generate_ue( mtx_header, element_pointers, (num_views - 1));    /*num_views_minus1 */
+       for (view_idx = 0; view_idx <num_views; view_idx++)
+               generate_ue(mtx_header, element_pointers, view_idx);
+
+       /* anchor references */
+       for (view_idx = 1; view_idx < num_views; view_idx++) {
+               generate_ue(mtx_header, element_pointers, 1);     /* num_anchor_refs_l0  = 1; view-1 refers to view-0 */
+               generate_ue(mtx_header, element_pointers, 0);     /* anchor_ref_l0 = 0 */
+               generate_ue(mtx_header, element_pointers, 0);     /* num_anchor_refs_l1  = 0 */
+       }
+
+       /* non-anchor references */
+       for (view_idx = 1; view_idx < num_views; view_idx++) {
+               generate_ue(mtx_header, element_pointers, 1);     /* num_non_anchor_refs_l0  = 0 */
+               generate_ue(mtx_header, element_pointers, 0);     /* non_anchor_refs_l0  = 0 */
+               generate_ue(mtx_header, element_pointers, 0);     /* num_non_anchor_refs_l1  = 0 */
+       }
+
+       generate_ue(mtx_header, element_pointers, 0);/* num_level_values_signaled_minus1  = 0 */
+
+
+       /* level_idc should be set to 9 in the sps in case of level is Level 1B and the profile is Multiview High or Stereo High profiles*/
+       write_upto_8bits_to_elements(mtx_header, element_pointers, (sh_params->level == SH_LEVEL_1B) ? 9 : (uint8)sh_params->level, 8);  /* level_idc (8 bits) = 9 for 1b, 10xlevel for others */
+       generate_ue(mtx_header, element_pointers, 0);/* num_applicable_ops_minus1  = 0 */
+       write_upto_8bits_to_elements(mtx_header, element_pointers, 0, 3);/* applicable_ops_temporal_id  = 0 */
+       generate_ue(mtx_header, element_pointers, 0);                 /* applicable_op_num_target_views_minus1  = 0 */
+       generate_ue(mtx_header, element_pointers, 0);             /* applicable_op_target_view_id  = 0 */
+       generate_ue(mtx_header, element_pointers, 0);                 /* applicable_op_num_views_minus1  = 0 */
+
+       write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    0,                    /* mvc_vui_parameters_present_flag =0 */
+                                    1);
+
+        write_upto_8bits_to_elements(mtx_header, element_pointers,
+                                    0,                    /* additional_extension2_flag =0 */
+                                    1);
+
+       /* Finally we need to align to the next byte */
+       insert_element_token(mtx_header, element_pointers, ELEMENT_INSERTBYTEALIGN_H264); /* Tell MTX to insert the byte align field (we don't know final stream size for alignment at this point) */
+}
+
+/*
+ * Prepare an H264 SPS in a form for the MTX to encode into a bitstream.
+ */
+void h264_prepare_mvc_sequence_header(struct mtx_header_params *mtx_header,
+                                     uint32 pic_width_in_mbs, uint32 pic_height_in_mbs,
+                                     osa_bool vui_params_present, struct h264_vui_params *params,
+                                     struct h264_crop_params *crop,
+                                     struct h264_sequence_header_params *sh_params)
+{
+       struct mtx_header_element *this_element;
+       struct mtx_header_element *element_pointers[MAXNUMBERELEMENTS];
+
+       /*
+        * Builds a sequence, picture and slice header with from the given inputs parameters (start of new frame)
+        * Essential we initialise our header structures before building
+        */
+       mtx_header->elements = ELEMENTS_EMPTY;
+       this_element = (struct mtx_header_element *)mtx_header->element_stream;
+       element_pointers[0] = this_element;
+
+       h264_write_bits_mvc_sequence_header(mtx_header, element_pointers, sh_params, crop, NULL);
+       mtx_header->elements++; /* Has been used as an index, so need to add 1 for a valid element count */
+}
diff --git a/driver/encoder/header_gen.h b/driver/encoder/header_gen.h
new file mode 100644 (file)
index 0000000..e5cb129
--- /dev/null
@@ -0,0 +1,127 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * encoder header generation interface header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "fw_headers/topazscfwif.h"
+#include "osal/inc/osa_types.h"
+#include "topaz_api.h"
+#include "vid_buf.h"
+
+/*
+ * enum describing slice/frame type (H264)
+ */
+enum slhp_sliceframe_type {
+       SLHP_P_SLICEFRAME_TYPE,
+       SLHP_B_SLICEFRAME_TYPE,
+       SLHP_I_SLICEFRAME_TYPE,
+       SLHP_SP_SLICEFRAME_TYPE,
+       SLHP_SI_SLICEFRAME_TYPE,
+       SLHP_IDR_SLICEFRAME_TYPE
+};
+
+/*
+ * struct describing scaling lists (H264)
+ */
+struct h264_scaling_matrix_params {
+       uint8   scaling_lists4x4[6][16];
+       uint8   scaling_lists8x8[2][64];
+       uint32  list_mask;
+};
+
+/*
+ * struct describing picture parameter set (H264)
+ */
+struct h264_picture_header_params {
+       uint8   pic_parameter_set_id;
+       uint8   seq_parameter_set_id;
+       uint8   entropy_coding_mode_flag;
+       uint8   weighted_pred_flag;
+       uint8   weighted_bipred_idc;
+       int8    chroma_qp_index_offset;
+       uint8   constrained_intra_pred_flag;
+       uint8   transform_8x8_mode_flag;
+       uint8   pic_scaling_matrix_present_flag;
+       uint8   use_default_scaling_list;
+       int8    second_chroma_qp_index_offset;
+};
+
+/*
+ * struct describing slice header (H264)
+ */
+struct h264_slice_header_params {
+       uint8            startcode_prefix_size_bytes;
+       enum slhp_sliceframe_type slice_frame_type;
+       uint32           first_mb_address;
+       uint8            frame_num_do;
+       uint8            idr_pic_id;
+       uint8            log2_max_pic_order_cnt;
+       uint8            picture_num_do;
+       uint8            disable_deblocking_filter_idc;
+       osa_bool         pic_interlace;
+       osa_bool         field_type;
+       osa_bool         reference_picture;
+       int8             deb_alpha_offset_div2;
+       int8             deb_beta_offset_div2;
+       osa_bool         direct_spatial_mv_pred_flag;
+       uint8            num_ref_idx_l0_active_minus1;
+       int8             diff_ref_pic_num[2]; /*when non-zero reorders reference pic list */
+       osa_bool         weighted_pred_flag;    /* Corresponds to field in the pps */
+       uint8            weighted_bipred_idc;
+       int32            luma_log2_weight_denom;
+       int32            chroma_log2_weight_denom;
+       osa_bool         luma_weight_l0_flag[2]; /* Support for 2 ref pictures on P, or 1 pic in each direction on B. */
+       int32            luma_weight_l0[2];
+       int32            luma_offset_l0[2];
+       osa_bool         chroma_weight_l0_flag[2];
+       int32            chromaB_weight_l0[2];
+       int32            chromaB_offset_l0[2];
+       int32            chromaR_weight_l0[2];
+       int32            chromaR_offset_l0[2];
+       uint16           mvc_view_idx;
+       osa_bool         is_longterm_ref;
+       uint8            longterm_ref_num;
+       osa_bool         ref_is_longterm_ref[2]; /*Long term reference info for reference frames */
+       uint8            ref_longterm_ref_num[2];
+};
+
+void generate_slice_params_template(struct img_enc_context *enc,
+                                       struct vidio_ddbufinfo *mem_info,
+                                       enum img_frame_template_type slice_type,
+                                       osa_bool is_interlaced, int32 fine_y_search_size);
+
+void h264_prepare_sequence_header(struct mtx_header_params *mtx_header, uint32 pic_width_in_mbs,
+                               uint32 pic_height_in_mbs, osa_bool vui_params_present, struct h264_vui_params *params,
+                               struct h264_crop_params *crop,
+                               struct h264_sequence_header_params *sh_params,
+                               osa_bool aso);
+
+void h264_prepare_mvc_sequence_header(struct mtx_header_params *mtx_header,
+                                       uint32 pic_width_in_mbs, uint32 pic_height_in_mbs,
+                                       osa_bool vui_params_present, struct h264_vui_params *params,
+                                       struct h264_crop_params *crop, struct h264_sequence_header_params *sh_params);
+
+void h264_prepare_aud_header(struct mtx_header_params *mtx_header);
+
+void h264_prepare_picture_header(struct mtx_header_params *mtx_header,
+                               osa_bool cabac_enabled,
+                               osa_bool transform_8x8,
+                               osa_bool intra_constrained,
+                               int8     cqp_offset,
+                               osa_bool weighted_prediction,
+                               uint8    weighted_bi_pred,
+                               osa_bool mvc_pps,
+                               osa_bool scaling_matrix,
+                               osa_bool scaling_lists);
diff --git a/driver/encoder/mtx_fwif.c b/driver/encoder/mtx_fwif.c
new file mode 100644 (file)
index 0000000..ac3115a
--- /dev/null
@@ -0,0 +1,1009 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * MTX Firmware Interface
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "fw_headers/mtx_fwif.h"
+#include "fw_headers/defs.h"
+#include "fw_binaries/include_all_fw_variants.h"
+#include "img_errors.h"
+#include "osal/inc/osa_delay.h"
+#include "osal/inc/osa_mem.h"
+#include "osal/inc/osa_string.h"
+#include "reg_headers/mtx_regs.h"
+/* still used for DMAC regs */
+#include "reg_headers/img_soc_dmac_regs.h"
+#include "target_config.h"
+#include "topaz_device.h"
+#include "topazmmu.h"
+#include "vxe_public_regdefs.h"
+
+extern struct mem_space topaz_mem_space[];
+
+/*
+ * Static Function Decl
+ */
+static void mtx_get_mtx_ctrl_from_dash(struct img_fw_context * fw_ctx);
+
+static uint32 mtx_read_core_reg(struct img_fw_context * fw_ctx,
+                               const uint32 reg);
+
+static void mtx_write_core_reg(struct img_fw_context * fw_ctx,
+                              const uint32 reg, const uint32 val);
+
+static int32 mtx_select_fw_build(struct img_fw_context * fw_ctx,
+                                enum img_codec codec);
+
+static void mtx_reg_if_upload(struct img_fw_context * fw_ctx,
+                             const uint32 data_mem, uint32 addr,
+                             const uint32 words, const uint32 *const data);
+
+extern osa_bool use_secure_fw_upload;
+
+/*
+ * Polling Configuration for TAL
+ */
+#define TAL_REG_RD_WR_TRIES     1000 /* => try 1000 times before giving up */
+
+/*
+ * defines that should come from auto generated headers
+ */
+#define MTX_DMA_MEMORY_BASE (0x82880000)
+#define PC_START_ADDRESS    (0x80900000)
+
+#define MTX_CORE_CODE_MEM   (0x10)
+#define MTX_CORE_DATA_MEM   (0x18)
+
+#define MTX_PC              (0x05)
+
+/*
+ * Get control of the MTX.
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ * @Return   None
+ */
+static void mtx_get_mtx_ctrl_from_dash(struct img_fw_context * fw_ctx)
+{
+       uint32 reg = 0;
+
+       IMG_DBG_ASSERT(!fw_ctx->drv_has_mtx_ctrl);
+
+       /* Request the bus from the Dash...*/
+       reg = F_ENCODE(1, TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE) | F_ENCODE(0x2, TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_IN);
+       VXE_WR_REG32(fw_ctx->topaz_multicore_reg_addr,
+                    TOPAZHP_TOP_CR_MTX_DEBUG_MSTR, reg);
+
+       do {
+               reg = VXE_RD_REG32(fw_ctx->topaz_multicore_reg_addr,
+                                  TOPAZHP_TOP_CR_MTX_DEBUG_MSTR);
+
+       } while ((reg & 0x18) != 0);
+
+       /* Save the access control register...*/
+       fw_ctx->drv_has_mtx_ctrl = VXE_RD_REG32(fw_ctx->mtx_reg_mem_space_addr,
+                                               MTX_CR_MTX_RAM_ACCESS_CONTROL);
+
+       fw_ctx->drv_has_mtx_ctrl = osa_true;
+}
+
+/*
+ * Release control of the MTX.
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ * @Return   None
+ */
+static void mtx_release_mtx_ctrl_from_dash(struct img_fw_context * fw_ctx)
+{
+       uint32 reg = 0;
+
+       IMG_DBG_ASSERT(fw_ctx->drv_has_mtx_ctrl);
+
+       /* Restore the access control register...*/
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr,
+                    MTX_CR_MTX_RAM_ACCESS_CONTROL,
+                    fw_ctx->access_control);
+
+       /* Release the bus...*/
+       reg = F_ENCODE(1, TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE);
+       VXE_WR_REG32(fw_ctx->topaz_multicore_reg_addr,
+                    TOPAZHP_TOP_CR_MTX_DEBUG_MSTR,
+                    reg);
+
+       fw_ctx->drv_has_mtx_ctrl = osa_false;
+}
+
+/*
+ * Read an MTX register.
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ * @Input    reg : Offset of register to read
+ * @Return   uint32       : Register value
+ */
+static uint32 mtx_read_core_reg(struct img_fw_context * fw_ctx,
+                               const uint32 reg)
+{
+       uint32 ret = 0;
+
+       mtx_get_mtx_ctrl_from_dash(fw_ctx);
+
+       /* Issue read request */
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr,
+                    MTX_CR_MTX_REGISTER_READ_WRITE_REQUEST,
+                    MASK_MTX_MTX_RNW | (reg & ~MASK_MTX_MTX_DREADY));
+
+       /* Wait for done */
+       VXE_POLL_REG32_ISEQ(fw_ctx->mtx_reg_mem_space_addr,
+                           MTX_CR_MTX_REGISTER_READ_WRITE_REQUEST,
+                           MASK_MTX_MTX_DREADY,
+                           MASK_MTX_MTX_DREADY,
+                           TAL_REG_RD_WR_TRIES);
+
+       /* Read */
+       ret = VXE_RD_REG32(fw_ctx->mtx_reg_mem_space_addr,
+                          MTX_CR_MTX_REGISTER_READ_WRITE_DATA);
+
+       mtx_release_mtx_ctrl_from_dash(fw_ctx);
+
+       return ret;
+}
+
+/*
+ * Write an MTX register.
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ * @Input    reg : Offset of register to write
+ * @Input    val : Value to write to register
+ */
+static void mtx_write_core_reg(struct img_fw_context * fw_ctx,
+                              const uint32 reg, const uint32 val)
+{
+       mtx_get_mtx_ctrl_from_dash(fw_ctx);
+
+       /* Put data in MTX_RW_DATA */
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr,
+                    MTX_CR_MTX_REGISTER_READ_WRITE_DATA, val);
+
+       /* DREADY is set to 0 and request a write*/
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr,
+                    MTX_CR_MTX_REGISTER_READ_WRITE_REQUEST,
+                    (reg & ~MASK_MTX_MTX_DREADY));
+
+       /* Wait for DREADY to become set*/
+       VXE_POLL_REG32_ISEQ(fw_ctx->mtx_reg_mem_space_addr,
+                           MTX_CR_MTX_REGISTER_READ_WRITE_REQUEST,
+                           MASK_MTX_MTX_DREADY,
+                           MASK_MTX_MTX_DREADY,
+                           TAL_REG_RD_WR_TRIES);
+
+       mtx_release_mtx_ctrl_from_dash(fw_ctx);
+}
+
+/* ****** Utility macroses for `mtx_select_fw_build` ************** */
+
+#if FW_BIN_FORMAT_VERSION != 2
+#      error Unsupported firmware format version
+#endif
+
+/*
+ * Assign a firmware binary to an MTX.
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ * @Input    codec           : Firmware version to use
+ */
+static int32 mtx_select_fw_build(struct img_fw_context * fw_ctx,
+                                enum img_codec codec)
+{
+       osa_char *fmt, *rc_mode;
+       uint32 target_fw_pipes = 0;
+       uint32 codec_mask = 0;
+       uint32 cur_hw_config;
+       osa_bool force_specific_pipe_cnt = osa_false;
+
+#      define HW_CONFIG_ALL_FEATURES 0
+#      define HW_CONFIG_8CONTEXT         1
+
+#define CORE_REV_CONFIG_1_MIN 0x00030906
+#define CORE_REV_CONFIG_1_MAX 0x0003090a
+
+
+#      define CODEC_MASK_JPEG          0x0001
+#      define CODEC_MASK_MPEG2         0x0002
+#      define CODEC_MASK_MPEG4         0x0004
+#      define CODEC_MASK_H263          0x0008
+#      define CODEC_MASK_H264          0x0010
+#      define CODEC_MASK_H264MVC       0x0020
+#      define CODEC_MASK_VP8           0x0040
+#      define CODEC_MASK_H265          0x0080
+#      define CODEC_MASK_FAKE          0x007F
+
+#      define _ALL_CODEC_CASE(CODEC) \
+               case IMG_CODEC_ ## CODEC ## _NO_RC: \
+               case IMG_CODEC_ ## CODEC ## _VBR: \
+               case IMG_CODEC_ ## CODEC ## _CBR:
+#      define _MVC_CODEC_CASE(RC) case IMG_CODEC_H264MVC_ ## RC: fmt = "H264MVC"; rc_mode = #RC; force_specific_pipe_cnt = osa_true; codec_mask = CODEC_MASK_H264MVC; break;
+
+       switch (codec) {
+       _ALL_CODEC_CASE(H264)
+       case IMG_CODEC_H264_VCM:
+               fmt = "H264";
+               rc_mode = "ALL";
+               force_specific_pipe_cnt = osa_true;
+               codec_mask = CODEC_MASK_H264;
+       break;
+       _ALL_CODEC_CASE(H263)
+               fmt = "LEGACY_VIDEO";
+               rc_mode = "ALL";
+               codec_mask = CODEC_MASK_H263;
+       break;
+       _ALL_CODEC_CASE(MPEG2)
+               fmt = "LEGACY_VIDEO";
+               rc_mode = "ALL";
+               codec_mask = CODEC_MASK_MPEG2;
+       break;
+       _ALL_CODEC_CASE(MPEG4)
+               fmt = "LEGACY_VIDEO";
+               rc_mode = "ALL";
+               codec_mask = CODEC_MASK_MPEG4;
+       break;
+       _MVC_CODEC_CASE(NO_RC);
+       _MVC_CODEC_CASE(VBR);
+       _MVC_CODEC_CASE(CBR);
+       _MVC_CODEC_CASE(ERC);
+       case IMG_CODEC_JPEG:
+               fmt = "JPEG";
+               rc_mode = "NO_RC";
+               codec_mask = CODEC_MASK_JPEG;
+       break;
+       default:
+               OSA_PR_ERR("Failed to locate firmware for codec %d \n", codec);
+               return IMG_ERROR_UNDEFINED;
+       }
+#      undef _ALL_CODEC_CASE
+#      undef _CODEC_CASE
+
+       /* rc mode name fix */
+       if (osa_strcmp(rc_mode, "NO_RC") == 0)
+               rc_mode = "NONE";
+
+       {
+               /*
+                * Pick firmware type (done implicitly via determining number
+                * of pipes given firmware is expected to have
+                */
+               const uint32 core_id = fw_ctx->core_rev;
+#              define  IS_REV(name) ((core_id >= MIN_ ## name ## _REV) && \
+                                     (core_id <= MAX_ ## name ## _REV))
+
+               if ((core_id >= CORE_REV_CONFIG_1_MIN) &&
+                   (core_id <= CORE_REV_CONFIG_1_MAX)) {
+                       /*
+                        * For now, it is assumed that this revision ID means 8
+                        * context 2 pipe variant
+                        */
+                       cur_hw_config = HW_CONFIG_8CONTEXT;
+                       target_fw_pipes = 2;
+               }
+               else {
+                       cur_hw_config = HW_CONFIG_ALL_FEATURES;
+                       if ((fw_ctx->hw_num_pipes < 3) &&
+                           (force_specific_pipe_cnt))
+                               target_fw_pipes = 2;
+                       else
+                               target_fw_pipes = 4;
+
+               }
+#              undef IS_REV
+       }
+
+       {
+               /* Search for matching firmwares */
+
+               uint32 fmts_included = 0;
+               uint32 ii;
+               osa_bool preferred_fw_located = osa_false;
+               uint32 req_size = 0;
+               struct IMG_COMPILED_FW_BIN_RECORD *selected, *iter;
+
+               selected = NULL;
+
+               for (ii = 0; ii < all_fw_binaries_cnt; ii++) {
+                       iter = all_fw_binaries[ii];
+                       /*
+                        * With HW_3_6, we want to allow 3 pipes if it was
+                        * required, this is mainly for test purposes
+                        */
+                       if ((osa_strcmp("JPEG_H264", iter->fmt) == 0) &&
+                           (target_fw_pipes != 3)) {
+                               preferred_fw_located = osa_true;
+                               req_size = (4 * iter->data_size + (iter->data_origin - MTX_DMA_MEMORY_BASE));
+                               break;
+                       }
+               }
+
+               if (preferred_fw_located && (req_size <= fw_ctx->mtx_ram_size) &&
+                   (cur_hw_config == iter->hw_config) &&
+                   (iter->pipes >= target_fw_pipes) &&
+                   ((codec_mask == CODEC_MASK_JPEG) || (codec_mask == CODEC_MASK_H264)) &&
+                   ((iter->formats_mask & codec_mask) != 0)) {
+                       selected = iter;
+               }
+               else {
+                       for (ii = 0; ii < all_fw_binaries_cnt; ii++) {
+                               iter = all_fw_binaries[ii];
+                               /* The hardware config modes need to match */
+                               if (cur_hw_config != iter->hw_config) {
+                                       OSA_PR_ERR("cur_hw_config %x iter->hw_config %x mismatch\n",
+                                                  cur_hw_config, iter->hw_config);
+                                       continue;
+                               }
+
+                               fmts_included = iter->formats_mask;
+
+                               if (((fmts_included & codec_mask) != 0) &&
+                                   (codec_mask == CODEC_MASK_JPEG ||
+                                    osa_strcmp(rc_mode, iter->rc_mode) == 0)) { /* no need to match RC for JPEG */
+                                       /*
+                                        * This firmware matches by format/mode
+                                        * combination, now to check if it fits
+                                        * better than current best
+                                        */
+                                       if ((!selected) &&
+                                           (iter->pipes >= target_fw_pipes)) {
+                                               /*
+                                                * Select firmware ether if it
+                                                * is first matchin one we've
+                                                * encountered or if it better
+                                                * matches desired number of
+                                                * pipes.
+                                                */
+                                               selected = iter;
+                                       }
+
+                                       if (iter->pipes == target_fw_pipes) {
+                                               /* Found ideal firmware version */
+                                               selected = iter;
+                                               break;
+                                       }
+                               }
+                       }
+               }
+
+               if (!selected) {
+                       OSA_PR_ERR("Failed to locate firmware for format '%s' and RC mode '%s'.\n",
+                                  fmt, rc_mode);
+                       return IMG_ERROR_UNDEFINED;
+               }
+               else {
+                       OSA_PR_INFO("Using firmware: %s with %i pipes, hwconfig=%i (text size = %i, data size = %i) for requested codec: %s RC mode %s\n",
+                                   selected->fmt, selected->pipes,
+                                   selected->hw_config, selected->text_size,
+                                   selected->data_size, fmt, rc_mode);
+               }
+
+               /* Export selected firmware to the fw context */
+               fw_ctx->mtx_topaz_fw_text_size = selected->text_size;
+               fw_ctx->mtx_topaz_fw_data_size = selected->data_size;
+               fw_ctx->mtx_topaz_fw_text = selected->text;
+               fw_ctx->mtx_topaz_fw_data = selected->data;
+               fw_ctx->mtx_topaz_fw_data_origin = selected->data_origin;
+               fw_ctx->num_pipes = selected->pipes;
+               fw_ctx->int_defines.length = selected->int_define_cnt;
+               fw_ctx->int_defines.names = selected->int_define_names;
+               fw_ctx->int_defines.values = selected->int_defines;
+               fw_ctx->supported_codecs = selected->formats_mask;
+               fw_ctx->num_contexts = mtx_get_fw_config_int(fw_ctx, "TOPAZHP_MAX_NUM_STREAMS");
+       }
+       return IMG_SUCCESS;
+}
+
+/*
+ * Upload MTX text and data sections via register interface
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ * @Input    data_mem : RAM ID for text/data section
+ * @Input    address : Address to upload data to
+ * @Input    words : Number of words of data to upload
+ * @Input    data : Pointer to data to upload
+ */
+static void mtx_reg_if_upload(struct img_fw_context * fw_ctx, const uint32 data_mem,
+                             uint32 address, const uint32 words,
+                             const uint32 *const data)
+{
+       uint32 loop;
+       uint32 ctrl;
+       uint32 ram_id;
+       uint32 addr;
+       uint32 curr_bank = ~0;
+       uint32 uploaded = 0;
+
+       mtx_get_mtx_ctrl_from_dash(fw_ctx);
+
+       VXE_POLL_REG32_ISEQ(fw_ctx->mtx_reg_mem_space_addr,
+                           MTX_CR_MTX_RAM_ACCESS_STATUS,
+                           MASK_MTX_MTX_MTX_MCM_STAT,
+                           MASK_MTX_MTX_MTX_MCM_STAT,
+                           TAL_REG_RD_WR_TRIES);
+
+       for (loop =0; loop < words; loop++) {
+               ram_id = data_mem + (address / fw_ctx->mtx_bank_size);
+               if (ram_id != curr_bank) {
+                       addr = address >> 2;
+                       ctrl = 0;
+                       ctrl = F_ENCODE(ram_id, MTX_MTX_MCMID) |
+                               F_ENCODE(addr, MTX_MTX_MCM_ADDR) |
+                               F_ENCODE(1, MTX_MTX_MCMAI);
+                       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr,
+                                    MTX_CR_MTX_RAM_ACCESS_CONTROL,
+                                    ctrl);
+                       curr_bank = ram_id;
+               }
+               address+= 4;
+
+               if (uploaded > (1024*24)) /* should this be RAM bank size?? */
+                       break;
+               uploaded += 4;
+
+               VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr,
+                            MTX_CR_MTX_RAM_ACCESS_DATA_TRANSFER,
+                            data[loop]);
+
+               VXE_POLL_REG32_ISEQ(fw_ctx->mtx_reg_mem_space_addr,
+                                   MTX_CR_MTX_RAM_ACCESS_STATUS,
+                                   MASK_MTX_MTX_MTX_MCM_STAT,
+                                   MASK_MTX_MTX_MTX_MCM_STAT,
+                                   TAL_REG_RD_WR_TRIES);
+       }
+
+       mtx_release_mtx_ctrl_from_dash(fw_ctx);
+}
+
+/*
+ * Transfer memory between the Host and MTX via DMA.
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ * @Input    channel          : DMAC channel to use (0 for TopazSC)
+ * @Input    hHostMemTransfer : void * for the host memory
+ * @Input    hostMemOffset    : offset into the host memory
+ * @Input    mtx_addr : Address on MTX
+ * @Input    numWords         : size of transfer in 32-bit words (PW units)
+ * @Input    bRNW             : Read not Write (osa_false to write to the MTX)
+ */
+void mtx_dmac_transfer(struct img_fw_context *fw_ctx, uint32 channel,
+                      struct vidio_ddbufinfo *host_mem_transfer,
+                      uint32 host_mem_offset, uint32 mtx_addr,
+                      uint32 words, osa_bool rnw)
+{
+       uint32 irq_stat;
+       uint32 count_reg;
+       void * dmac_reg_addr;
+       void * reg_addr;
+       uint32 config_reg;
+       uint32 mmu_status = 0;
+
+       uint32 dmac_burst_size = DMAC_BURST_2; /* 2 * 128 bits = 32 bytes */
+       uint32 mtx_burst_size = 4; /* 4 * 2 * 32 bits = 32 bytes */
+
+       /* check the burst sizes */
+       IMG_DBG_ASSERT(MTX_DMA_BURSTSIZE_BYTES == dmac_burst_size * 16);
+       IMG_DBG_ASSERT(MTX_DMA_BURSTSIZE_BYTES == mtx_burst_size * 8);
+
+       /* check transfer size matches burst width */
+       IMG_DBG_ASSERT(0 == (words & ((MTX_DMA_BURSTSIZE_BYTES >> 2) - 1)));
+
+       /* check DMA channel */
+       IMG_DBG_ASSERT(channel < DMAC_MAX_CHANNELS);
+
+       /* check that no transfer is currently in progress */
+       dmac_reg_addr = (void *)topaz_mem_space[REG_DMAC].cpu_addr;
+       count_reg = VXE_RD_REG32(dmac_reg_addr, IMG_SOC_DMAC_COUNT(channel));
+       IMG_DBG_ASSERT(0 == (count_reg &
+                            (MASK_IMG_SOC_EN | MASK_IMG_SOC_LIST_EN)));
+
+       /* check we don't already have a page fault condition */
+       reg_addr = (void *)topaz_mem_space[REG_TOPAZHP_MULTICORE].cpu_addr;
+       mmu_status = VXE_RD_REG32(reg_addr, TOPAZHP_TOP_CR_MMU_STATUS);
+
+       IMG_DBG_ASSERT(0 == mmu_status);
+
+       if (mmu_status ||
+           (count_reg & (MASK_IMG_SOC_EN | MASK_IMG_SOC_LIST_EN))) {
+               /* DMA engine not idle or pre-existing page fault condition */
+               OSA_PR_ERR("DMA engine not idle or pre-existing page fault condition!\n");
+               fw_ctx->initialized = osa_false;
+               return;
+       }
+
+       /* clear status of any previous interrupts */
+       VXE_WR_REG32(dmac_reg_addr, IMG_SOC_DMAC_IRQ_STAT(channel), 0);
+
+       /* and that no interrupts are outstanding */
+       irq_stat = VXE_RD_REG32(dmac_reg_addr, IMG_SOC_DMAC_IRQ_STAT(channel));
+       IMG_DBG_ASSERT(0 == irq_stat);
+
+       /* Write MTX DMAC registers (for current MTX) */
+       /* MTX Address */
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr, MTX_CR_MTX_SYSC_CDMAA,
+                    mtx_addr);
+
+       /* MTX DMAC Config */
+       config_reg = F_ENCODE(mtx_burst_size, MTX_BURSTSIZE) |
+                       F_ENCODE((rnw ? 1 : 0), MTX_RNW) |
+                       F_ENCODE(1, MTX_ENABLE) |
+                       F_ENCODE(words, MTX_LENGTH);
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr, MTX_CR_MTX_SYSC_CDMAC,
+                    config_reg);
+
+       /* Write System DMAC registers */
+       /* per hold - allow HW to sort itself out */
+       VXE_WR_REG32(dmac_reg_addr, IMG_SOC_DMAC_PER_HOLD(channel), 16);
+
+       if (!use_secure_fw_upload) {
+               VXE_WR_REG32(dmac_reg_addr, IMG_SOC_DMAC_SETUP(channel),
+                            host_mem_transfer->dev_virt + host_mem_offset);
+       }
+       else {
+               /* Not supported */
+       }
+
+       /* count reg */
+       count_reg = DMAC_VALUE_COUNT(DMAC_BSWAP_NO_SWAP, DMAC_PWIDTH_32_BIT,
+                                    rnw, DMAC_PWIDTH_32_BIT, words);
+       count_reg |= MASK_IMG_SOC_TRANSFER_IEN; /* generate an interrupt at end of transfer */
+       VXE_WR_REG32(dmac_reg_addr, IMG_SOC_DMAC_COUNT(channel), count_reg);
+
+       /* don't inc address, set burst size */
+       VXE_WR_REG32(dmac_reg_addr, IMG_SOC_DMAC_PERIPH(channel),
+                    DMAC_VALUE_PERIPH_PARAM(DMAC_ACC_DEL_0, osa_false,
+                                            dmac_burst_size));
+
+       /* Target correct MTX DMAC port */
+       VXE_WR_REG32(dmac_reg_addr, IMG_SOC_DMAC_PERIPHERAL_ADDR(channel),
+                    MTX_CR_MTX_SYSC_CDMAT + REG_START_TOPAZ_MTX_HOST);
+
+       /*
+        * Finally, rewrite the count register with the enable bit set to kick
+        * off the transfer
+        */
+       VXE_WR_REG32(dmac_reg_addr, IMG_SOC_DMAC_COUNT(channel),
+                    (count_reg | MASK_IMG_SOC_EN));
+
+       /* Wait for it to finish */
+       VXE_POLL_REG32_ISEQ(dmac_reg_addr, IMG_SOC_DMAC_IRQ_STAT(channel),
+                           F_ENCODE(1, IMG_SOC_TRANSFER_FIN),
+                           F_ENCODE(1, IMG_SOC_TRANSFER_FIN),
+                           TAL_REG_RD_WR_TRIES);
+       count_reg = VXE_RD_REG32(dmac_reg_addr, IMG_SOC_DMAC_COUNT(channel));
+       mmu_status = VXE_RD_REG32(reg_addr, TOPAZHP_TOP_CR_MMU_STATUS);
+       if (mmu_status ||
+           (count_reg & (MASK_IMG_SOC_EN | MASK_IMG_SOC_LIST_EN))) {
+               OSA_PR_ERR("DMA has failed or page faulted\n");
+               /* DMA has failed or page faulted */
+               fw_ctx->initialized = osa_false;
+       }
+
+       /* Clear the interrupt */
+       VXE_WR_REG32(dmac_reg_addr, IMG_SOC_DMAC_IRQ_STAT(channel), 0);
+}
+
+/*
+ * Sets target MTX for DMA and register writes
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ * @Input    bTargetAll       : osa_true indicates register and DMA writes go to all MTX
+ */
+void mtx_set_target(struct img_fw_context * fw_ctx)
+{
+       uint32 reg = 0;
+       reg = F_ENCODE(0, TOPAZHP_TOP_CR_WRITES_CORE_ALL);
+       VXE_WR_REG32(fw_ctx->topaz_multicore_reg_addr,
+                    TOPAZHP_TOP_CR_MULTICORE_CORE_SEL_0,
+                    reg);
+}
+
+/*
+ * Upload text and data sections via DMA
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ */
+static void mtx_uploadfw(void *dev_ctx, struct img_fw_context *fw_ctx)
+{
+       struct topaz_dev_ctx *ctx = (struct topaz_dev_ctx *)dev_ctx;
+       struct vidio_ddbufinfo text, data;
+       void * add_lin_text, * add_lin_data;
+       uint32 text_size = fw_ctx->mtx_topaz_fw_text_size;
+       uint32 data_size = fw_ctx->mtx_topaz_fw_data_size;
+
+       void * dmac_reg_addr;
+
+       dmac_reg_addr = (void *)topaz_mem_space[REG_DMAC].cpu_addr;
+
+       if (use_secure_fw_upload) {
+               /* Do nothing. Secure firmware not supported currently */
+       }
+       else {
+               if (mmu_alloc(ctx->topaz_mmu_ctx.mmu_context_handle,
+                             ctx->vxe_arg, MMU_GENERAL_HEAP_ID, 1,
+                             (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                             text_size * 4 + MTX_DMA_BURSTSIZE_BYTES, 64, &text)) {
+                        OSA_PR_ERR("mmu_alloc for text failed!\n");
+                       fw_ctx->initialized = osa_false;
+                       return;
+                }
+               if (mmu_alloc(ctx->topaz_mmu_ctx.mmu_context_handle,
+                             ctx->vxe_arg, MMU_GENERAL_HEAP_ID, 1,
+                             (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                             data_size * 4 + MTX_DMA_BURSTSIZE_BYTES, 64, &data)) {
+                       OSA_PR_ERR("mmu_alloc for data failed!\n");
+                       mmu_free(ctx->vxe_arg, &text);
+                       fw_ctx->initialized = osa_false;
+               }
+       }
+
+       add_lin_text = text.cpu_virt;
+       osa_memcpy((void *)add_lin_text, fw_ctx->mtx_topaz_fw_text, text_size * 4);
+       add_lin_data = data.cpu_virt;
+       osa_memcpy((void *)add_lin_data, fw_ctx->mtx_topaz_fw_data, data_size * 4);
+
+       if (use_secure_fw_upload) {
+               /* Not supported */
+       }
+       else {
+               update_device_mem(ctx->vxe_arg, &text);
+               update_device_mem(ctx->vxe_arg, &data);
+       }
+
+       /* adjust transfer sizes of text and data sections to match burst size */
+       text_size = ((text_size * 4 + (MTX_DMA_BURSTSIZE_BYTES - 1)) & ~(MTX_DMA_BURSTSIZE_BYTES - 1)) / 4;
+       data_size = ((data_size*4 + (MTX_DMA_BURSTSIZE_BYTES - 1)) & ~(MTX_DMA_BURSTSIZE_BYTES - 1)) / 4;
+
+       /* ensure that data section (+stack) will not wrap in memory */
+       IMG_DBG_ASSERT(fw_ctx->mtx_ram_size >= (fw_ctx->mtx_topaz_fw_data_origin + (data_size * 4) - MTX_DMA_MEMORY_BASE));
+       if (fw_ctx->mtx_ram_size < (fw_ctx->mtx_topaz_fw_data_origin + (data_size * 4) - MTX_DMA_MEMORY_BASE))
+               fw_ctx->initialized = osa_false;
+
+       /* data section is already prepared/cached */
+       /* Transfer the text section */
+       if (fw_ctx->initialized) {
+               mtx_dmac_transfer(fw_ctx, 0, &text, 0, MTX_DMA_MEMORY_BASE,
+                                 text_size, osa_false);
+       }
+       /* Transfer the data section */
+       if (fw_ctx->initialized) {
+               mtx_dmac_transfer(fw_ctx, 0, &data, 0,
+                                 fw_ctx->mtx_topaz_fw_data_origin, data_size,
+                                 osa_false);
+       }
+
+       if (use_secure_fw_upload) {
+               /* not supported */
+       }
+       else {
+               mmu_free(ctx->vxe_arg, &text);
+               mmu_free(ctx->vxe_arg, &data);
+       }
+
+       /* Flush the MMU table cache used during code download */
+       topaz_core_mmu_flush_cache();
+       if (fw_ctx->initialized)
+               OSA_PR_INFO("mtx_uploadfw complete!");
+}
+
+/*
+ * Load text and data sections onto an MTX.
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ * @Input    load_method      : Method to use for loading code
+ * @Input    bTargetAll       : Load to one (osa_false) or all (osa_true) MTX
+ */
+void mtx_load(void *dev_ctx, struct img_fw_context *fw_ctx,
+             enum mtx_load_method load_method)
+{
+       struct topaz_dev_ctx *ctx = (struct topaz_dev_ctx *)dev_ctx;
+       uint32 reg;
+       uint16 i;
+
+       IMG_DBG_ASSERT(fw_ctx->initialized);
+       if (!fw_ctx->initialized)
+               return;
+
+       fw_ctx->load_method = load_method;
+
+       /* set target to current or all MTXs */
+       mtx_set_target(fw_ctx);
+
+       /* MTX Reset */
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr, MTX_CR_MTX_SOFT_RESET,
+                    MASK_MTX_MTX_RESET);
+       osa_ndelay(300);
+
+       switch (load_method) {
+       case MTX_LOADMETHOD_REGIF:
+               /* Code Upload */
+               mtx_reg_if_upload(fw_ctx, MTX_CORE_CODE_MEM, 0,
+                                 fw_ctx->mtx_topaz_fw_text_size,
+                                 fw_ctx->mtx_topaz_fw_text);
+
+               /* Data Upload */
+               mtx_reg_if_upload(fw_ctx, MTX_CORE_DATA_MEM,
+                                 fw_ctx->mtx_topaz_fw_data_origin - MTX_DMA_MEMORY_BASE,
+                                 fw_ctx->mtx_topaz_fw_data_size,
+                                 fw_ctx->mtx_topaz_fw_data);
+       break;
+
+       case MTX_LOADMETHOD_DMA:
+               mtx_uploadfw(ctx, fw_ctx);
+       break;
+
+       case MTX_LOADMETHOD_NONE:
+       break;
+
+       default:
+               IMG_DBG_ASSERT(osa_false);
+       }
+
+       /* if we have had any failures up to this point then return now */
+       if (!fw_ctx->initialized)
+               return;
+
+       if (load_method != MTX_LOADMETHOD_NONE) {
+               for (i = 5; i < 8; i++)
+                       mtx_write_core_reg(fw_ctx, 0x1 | (i << 4), 0);
+
+               /* Restore 8 Registers of D1 Bank */
+               /* D1Re0, D1Ar5, D1Ar3, D1Ar1, D1RtP, D1.5, D1.6 and D1.7 */
+               for (i = 5; i < 8; i++)
+                       mtx_write_core_reg(fw_ctx, 0x2 | (i << 4), 0);
+
+               /* Set Starting PC address */
+               mtx_write_core_reg(fw_ctx, MTX_PC, PC_START_ADDRESS);
+
+               /* Verify Starting PC */
+               reg = mtx_read_core_reg(fw_ctx, MTX_PC);
+
+               OSA_PR_INFO("PC_START_ADDRESS = 0x%08X\n", reg);
+               IMG_DBG_ASSERT(reg == PC_START_ADDRESS);
+       }
+}
+
+/*
+ * Deinitialise the given MTX context structure
+ * @Input    fw_ctx         : Pointer to the context of the target MTX
+ */
+void mtx_deinitialize(struct img_fw_context * fw_ctx)
+{
+       struct topaz_dev_ctx *ctx = (struct topaz_dev_ctx *)fw_ctx->dev_ctx;
+       uint32 i;
+
+       if (!fw_ctx->initialized)
+               OSA_PR_WARN("Warning detected multi de-initialiseations\n");
+
+       for (i = 0; i < TOPAZHP_MAX_POSSIBLE_STREAMS; i++) {
+               if (fw_ctx->mtx_context_data_copy[i])
+                       mmu_free(ctx->vxe_arg, fw_ctx->mtx_context_data_copy[i]);
+               fw_ctx->mtx_context_data_copy[i] = NULL;
+       }
+
+       if (fw_ctx->mtx_reg_copy) {
+               osa_free(fw_ctx->mtx_reg_copy);
+               fw_ctx->mtx_reg_copy = NULL;
+       }
+
+       fw_ctx->initialized = osa_false;
+}
+
+/*
+ * Initialise the given MTX context structure
+ * @Input    fw_ctx       : Pointer to the context of the target MTX
+ * @Input    core_num : Core number of the MTX to target
+ * @Input    codec         : version of codec specific firmware to associate with this MTX
+ */
+int32 mtx_populate_fw_ctx(enum img_codec codec, struct img_fw_context * fw_ctx)
+{
+       uint32 pipe_cnt;
+       uint32 size;
+       uint32 i;
+
+       if (fw_ctx->initialized || fw_ctx->populated)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       /* initialise Context structure */
+       fw_ctx->mtx_reg_mem_space_addr = (void *)topaz_mem_space[REG_MTX].cpu_addr;
+       fw_ctx->topaz_multicore_reg_addr = (void *)topaz_mem_space[REG_TOPAZHP_MULTICORE].cpu_addr;
+
+       fw_ctx->core_rev = VXE_RD_REG32(fw_ctx->topaz_multicore_reg_addr, TOPAZHP_TOP_CR_TOPAZHP_CORE_REV);
+       fw_ctx->core_rev &= (MASK_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV | MASK_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV | MASK_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV);
+       fw_ctx->core_des1 = VXE_RD_REG32(fw_ctx->topaz_multicore_reg_addr, TOPAZHP_TOP_CR_TOPAZHP_CORE_DES1);
+
+       /* Number of hw pipes */
+       pipe_cnt = VXE_RD_REG32(fw_ctx->topaz_multicore_reg_addr, TOPAZHP_TOP_CR_MULTICORE_HW_CFG);
+       pipe_cnt = (pipe_cnt & MASK_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED);
+       fw_ctx->hw_num_pipes = pipe_cnt;
+
+       IMG_DBG_ASSERT(fw_ctx->hw_num_pipes > 0 && fw_ctx->hw_num_pipes <= TOPAZHP_MAX_NUM_PIPES);
+
+       for (i = 0; i < fw_ctx->hw_num_pipes; i++)
+               fw_ctx->topaz_reg_mem_space_addr[i] = (void *)topaz_mem_space[REG_TOPAZHP_CORE_0 + (4 * i)].cpu_addr;
+
+       fw_ctx->mtx_debug_val = VXE_RD_REG32(fw_ctx->topaz_multicore_reg_addr, TOPAZHP_TOP_CR_MTX_DEBUG_MSTR);
+
+       /* last bank size */
+       size = 0x1 << (F_EXTRACT(fw_ctx->mtx_debug_val, TOPAZHP_TOP_CR_MTX_MSTR_LAST_RAM_BANK_SIZE ) + 2);
+       /* all other banks */
+       fw_ctx->mtx_bank_size = 0x1 << (F_EXTRACT(fw_ctx->mtx_debug_val, TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANK_SIZE ) + 2);
+       /* total RAM size */
+       fw_ctx->mtx_ram_size = size + (fw_ctx->mtx_bank_size * (F_EXTRACT(fw_ctx->mtx_debug_val, TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANKS) - 1));
+
+       fw_ctx->drv_has_mtx_ctrl = osa_false;
+       fw_ctx->access_control = 0;
+
+       fw_ctx->active_ctx_mask = 0;
+
+       if (mtx_select_fw_build(fw_ctx, codec) != IMG_SUCCESS) {
+               fw_ctx->populated = osa_false;
+               fw_ctx->initialized = osa_false;
+               return IMG_ERROR_UNDEFINED;
+       }
+
+       if (fw_ctx->mtx_topaz_fw_data_size != 0) {
+               /* check FW fits in memory */
+               /* could also add stack size estimate */
+               size = 4 * fw_ctx->mtx_topaz_fw_data_size;
+               size += (fw_ctx->mtx_topaz_fw_data_origin - MTX_DMA_MEMORY_BASE);
+               if (size > fw_ctx->mtx_ram_size) {
+                       IMG_DBG_ASSERT(fw_ctx->mtx_ram_size > size);
+                       return IMG_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       fw_ctx->populated = osa_true;
+       return IMG_SUCCESS;
+}
+
+void mtx_initialize(void *dev_ctx, struct img_fw_context * fw_ctx)
+{
+       struct topaz_dev_ctx *ctx = (struct topaz_dev_ctx *)dev_ctx;
+       uint32 i = 0;
+
+       if (fw_ctx->initialized)
+               return;
+
+       if (fw_ctx->mtx_topaz_fw_data_size != 0) {
+               fw_ctx->mtx_reg_copy = osa_malloc((53 * 4), OSA_GFP_KERNEL);
+               for (i = 0; i < TOPAZHP_MAX_POSSIBLE_STREAMS; i++) {
+                       fw_ctx->mtx_context_data_copy[i] = osa_malloc(sizeof(struct vidio_ddbufinfo), OSA_GFP_KERNEL);
+                       if (fw_ctx->mtx_context_data_copy[i] == NULL)
+                               goto alloc_failed;
+
+                       if (mmu_alloc(ctx->topaz_mmu_ctx.mmu_context_handle,
+                                     ctx->vxe_arg, MMU_GENERAL_HEAP_ID, 1,
+                                     (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                     MTX_CONTEXT_SIZE, 64,
+                                     fw_ctx->mtx_context_data_copy[i])) {
+                               OSA_PR_ERR("mmu_alloc for data copy failed!\n");
+                               osa_free(fw_ctx->mtx_context_data_copy[i]);
+                               fw_ctx->mtx_context_data_copy[i] = NULL;
+                               goto alloc_failed;
+                       }
+               }
+
+               fw_ctx->dev_ctx = dev_ctx;
+               fw_ctx->initialized = osa_true;
+       }
+
+       return;
+
+alloc_failed:
+       while (i > 0) {
+               mmu_free(ctx->vxe_arg, fw_ctx->mtx_context_data_copy[i-1]);
+               osa_free(fw_ctx->mtx_context_data_copy[i-1]);
+               fw_ctx->mtx_context_data_copy[i-1] = NULL;
+               i--;
+       }
+}
+
+int32 mtx_get_fw_config_int(struct img_fw_context const * const fw_ctx,
+                           osa_char const * const name)
+{
+       const size_t max_len = 1024;
+       unsigned int ii;
+
+       if (fw_ctx->mtx_topaz_fw_data_size == 0) {
+               IMG_DBG_ASSERT(!"FW context structure is not initialised!");
+               return -1;
+       }
+
+       for (ii = 0; ii < fw_ctx->int_defines.length; ii++) {
+               if (osa_strncmp(fw_ctx->int_defines.names[ii],
+                   name, max_len) == 0) {
+                       return fw_ctx->int_defines.values[ii];
+               }
+       }
+
+       return -1;
+}
+
+/*
+ * Start an MTX.
+ * @Input    fw_ctx       : Pointer to the context of the target MTX
+ */
+void mtx_start(struct img_fw_context * fw_ctx)
+{
+       IMG_DBG_ASSERT(fw_ctx->initialized);
+       if (!fw_ctx->initialized)
+               return;
+
+       /* target only the current MTX */
+       mtx_set_target(fw_ctx);
+
+       /* Turn on the thread */
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr, MTX_CR_MTX_ENABLE,
+                    MASK_MTX_MTX_ENABLE);
+}
+
+/*
+ * Stop an MTX.
+ * @Input    fw_ctx       : Pointer to the context of the target MTX
+ */
+void mtx_stop(struct img_fw_context * fw_ctx)
+{
+       IMG_DBG_ASSERT(fw_ctx->initialized);
+
+       /* target only the current MTX */
+       mtx_set_target(fw_ctx);
+
+       /*
+        * Turn off the thread by writing one to the MTX_TOFF field of the MTX_ENABLE
+        * register.
+        */
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr, MTX_CR_MTX_ENABLE,
+                    MASK_MTX_MTX_TOFF);
+}
+
+/*
+ * Kick an MTX.
+ * @Input    fw_ctx     : Pointer to the context of the target MTX
+ * @Input    kick_count : The number of kicks to register
+ */
+void mtx_kick(struct img_fw_context *fw_ctx, uint32 kick_count)
+{
+       IMG_DBG_ASSERT(fw_ctx->initialized);
+       if (!fw_ctx->initialized)
+               return;
+
+       /* target only the current MTX */
+       mtx_set_target(fw_ctx);
+
+       VXE_WR_REG32(fw_ctx->mtx_reg_mem_space_addr, MTX_CR_MTX_KICK,
+                    kick_count);
+}
+
+/*
+ * Wait for MTX to halt
+ * @Input    fw_ctx        : Pointer to the MTX context
+ */
+void mtx_wait_for_completion(struct img_fw_context *fw_ctx)
+{
+       IMG_DBG_ASSERT(fw_ctx->initialized);
+
+       if (MTX_LOADMETHOD_NONE != fw_ctx->load_method) {
+               /* target only the current MTX */
+               mtx_set_target(fw_ctx);
+
+               /* Wait for the Completion */
+               VXE_POLL_REG32_ISEQ(fw_ctx->mtx_reg_mem_space_addr,
+                                   MTX_CR_MTX_ENABLE, MASK_MTX_MTX_TOFF,
+                                   (MASK_MTX_MTX_TOFF | MASK_MTX_MTX_ENABLE),
+                                   TAL_REG_RD_WR_TRIES);
+       }
+}
+
+uint32 poll_hw_inactive(struct img_fw_context * fw_ctx)
+{
+       return VXE_POLL_REG32_ISEQ(fw_ctx->topaz_multicore_reg_addr,
+                                  MTX_SCRATCHREG_IDLE,
+                                  F_ENCODE(FW_IDLE_STATUS_IDLE, FW_IDLE_REG_STATUS),
+                                  MASK_FW_IDLE_REG_STATUS,
+                                  TAL_REG_RD_WR_TRIES);
+}
diff --git a/driver/encoder/reg_headers/img_soc_dmac_regs.h b/driver/encoder/reg_headers/img_soc_dmac_regs.h
new file mode 100644 (file)
index 0000000..62b7741
--- /dev/null
@@ -0,0 +1,853 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _REGCONV_H_img_soc_dmac_regs_h
+#define _REGCONV_H_img_soc_dmac_regs_h
+
+#include "osal/inc/osa_types.h"
+
+/* Register DMAC_SETUP_0 */
+#define IMG_SOC_DMAC_SETUP_0        0x0000
+#define MASK_IMG_SOC_START_ADDRESS_00 0xFFFFFFFF
+#define SHIFT_IMG_SOC_START_ADDRESS_00 0
+#define REGNUM_IMG_SOC_START_ADDRESS_00 0x0000
+#define SIGNED_IMG_SOC_START_ADDRESS_00 0
+
+/* Register DMAC_COUNT_0 */
+#define IMG_SOC_DMAC_COUNT_0        0x0004
+#define MASK_IMG_SOC_CNT_00         0x0000FFFF
+#define SHIFT_IMG_SOC_CNT_00        0
+#define REGNUM_IMG_SOC_CNT_00       0x0004
+#define SIGNED_IMG_SOC_CNT_00       0
+
+#define MASK_IMG_SOC_EN_00          0x00010000
+#define SHIFT_IMG_SOC_EN_00         16
+#define REGNUM_IMG_SOC_EN_00        0x0004
+#define SIGNED_IMG_SOC_EN_00        0
+
+#define MASK_IMG_SOC_ENABLE_2D_MODE_00 0x00020000
+#define SHIFT_IMG_SOC_ENABLE_2D_MODE_00 17
+#define REGNUM_IMG_SOC_ENABLE_2D_MODE_00 0x0004
+#define SIGNED_IMG_SOC_ENABLE_2D_MODE_00 0
+#define IMG_SOC_ENABLE_2D_MODE_00_ENABLED              0x00000001
+#define IMG_SOC_ENABLE_2D_MODE_00_DISABLED             0x00000000
+
+#define MASK_IMG_SOC_LIST_EN_00     0x00040000
+#define SHIFT_IMG_SOC_LIST_EN_00    18
+#define REGNUM_IMG_SOC_LIST_EN_00   0x0004
+#define SIGNED_IMG_SOC_LIST_EN_00   0
+
+#define MASK_IMG_SOC_SRST_00        0x00080000
+#define SHIFT_IMG_SOC_SRST_00       19
+#define REGNUM_IMG_SOC_SRST_00      0x0004
+#define SIGNED_IMG_SOC_SRST_00      0
+
+#define MASK_IMG_SOC_DREQ_00        0x00100000
+#define SHIFT_IMG_SOC_DREQ_00       20
+#define REGNUM_IMG_SOC_DREQ_00      0x0004
+#define SIGNED_IMG_SOC_DREQ_00      0
+
+#define MASK_IMG_SOC_LIST_FIN_CTL_00 0x00400000
+#define SHIFT_IMG_SOC_LIST_FIN_CTL_00 22
+#define REGNUM_IMG_SOC_LIST_FIN_CTL_00 0x0004
+#define SIGNED_IMG_SOC_LIST_FIN_CTL_00 0
+
+#define MASK_IMG_SOC_PI_00          0x03000000
+#define SHIFT_IMG_SOC_PI_00         24
+#define REGNUM_IMG_SOC_PI_00        0x0004
+#define SIGNED_IMG_SOC_PI_00        0
+#define IMG_SOC_PI_00_1                0x00000002
+#define IMG_SOC_PI_00_2                0x00000001
+#define IMG_SOC_PI_00_4                0x00000000
+
+#define MASK_IMG_SOC_DIR_00         0x04000000
+#define SHIFT_IMG_SOC_DIR_00        26
+#define REGNUM_IMG_SOC_DIR_00       0x0004
+#define SIGNED_IMG_SOC_DIR_00       0
+
+#define MASK_IMG_SOC_PW_00          0x18000000
+#define SHIFT_IMG_SOC_PW_00         27
+#define REGNUM_IMG_SOC_PW_00        0x0004
+#define SIGNED_IMG_SOC_PW_00        0
+
+#define MASK_IMG_SOC_TRANSFER_IEN_00 0x20000000
+#define SHIFT_IMG_SOC_TRANSFER_IEN_00 29
+#define REGNUM_IMG_SOC_TRANSFER_IEN_00 0x0004
+#define SIGNED_IMG_SOC_TRANSFER_IEN_00 0
+
+#define MASK_IMG_SOC_BSWAP_00       0x40000000
+#define SHIFT_IMG_SOC_BSWAP_00      30
+#define REGNUM_IMG_SOC_BSWAP_00     0x0004
+#define SIGNED_IMG_SOC_BSWAP_00     0
+
+#define MASK_IMG_SOC_LIST_IEN_00    0x80000000
+#define SHIFT_IMG_SOC_LIST_IEN_00   31
+#define REGNUM_IMG_SOC_LIST_IEN_00  0x0004
+#define SIGNED_IMG_SOC_LIST_IEN_00  0
+
+/* Register DMAC_PERIPH_0 */
+#define IMG_SOC_DMAC_PERIPH_0       0x0008
+#define MASK_IMG_SOC_EXT_SA_00      0x0000000F
+#define SHIFT_IMG_SOC_EXT_SA_00     0
+#define REGNUM_IMG_SOC_EXT_SA_00    0x0008
+#define SIGNED_IMG_SOC_EXT_SA_00    0
+
+#define MASK_IMG_SOC_BURST_00       0x07000000
+#define SHIFT_IMG_SOC_BURST_00      24
+#define REGNUM_IMG_SOC_BURST_00     0x0008
+#define SIGNED_IMG_SOC_BURST_00     0
+
+#define MASK_IMG_SOC_INCR_00        0x08000000
+#define SHIFT_IMG_SOC_INCR_00       27
+#define REGNUM_IMG_SOC_INCR_00      0x0008
+#define SIGNED_IMG_SOC_INCR_00      0
+
+#define MASK_IMG_SOC_ACC_DEL_00     0xE0000000
+#define SHIFT_IMG_SOC_ACC_DEL_00    29
+#define REGNUM_IMG_SOC_ACC_DEL_00   0x0008
+#define SIGNED_IMG_SOC_ACC_DEL_00   0
+
+/* Register DMAC_IRQ_STAT_0 */
+#define IMG_SOC_DMAC_IRQ_STAT_0     0x000C
+#define MASK_IMG_SOC_TRANSFER_FIN_00 0x00020000
+#define SHIFT_IMG_SOC_TRANSFER_FIN_00 17
+#define REGNUM_IMG_SOC_TRANSFER_FIN_00 0x000C
+#define SIGNED_IMG_SOC_TRANSFER_FIN_00 0
+
+#define MASK_IMG_SOC_LIST_INT_00    0x00100000
+#define SHIFT_IMG_SOC_LIST_INT_00   20
+#define REGNUM_IMG_SOC_LIST_INT_00  0x000C
+#define SIGNED_IMG_SOC_LIST_INT_00  0
+#define IMG_SOC_LIST_INT_00_ENABLE             0x00000001              /* The last linked-list element processed initiated an interrupt.  If LIST_IEN is set
+ for the channel, an interrupt will be generated on the IRQ line until this bit is cleared, */
+#define IMG_SOC_LIST_INT_00_DISABLE            0x00000000              /* last linked list element processed did not initiate an interrupt. */
+
+#define MASK_IMG_SOC_LIST_FIN_00    0x00200000
+#define SHIFT_IMG_SOC_LIST_FIN_00   21
+#define REGNUM_IMG_SOC_LIST_FIN_00  0x000C
+#define SIGNED_IMG_SOC_LIST_FIN_00  0
+
+/* Register DMAC_2D_MODE_0 */
+#define IMG_SOC_DMAC_2D_MODE_0      0x0010
+#define MASK_IMG_SOC_ROW_LENGTH_00  0x000003FF
+#define SHIFT_IMG_SOC_ROW_LENGTH_00 0
+#define REGNUM_IMG_SOC_ROW_LENGTH_00 0x0010
+#define SIGNED_IMG_SOC_ROW_LENGTH_00 0
+
+#define MASK_IMG_SOC_LINE_ADDR_OFFSET_00 0x000FFC00
+#define SHIFT_IMG_SOC_LINE_ADDR_OFFSET_00 10
+#define REGNUM_IMG_SOC_LINE_ADDR_OFFSET_00 0x0010
+#define SIGNED_IMG_SOC_LINE_ADDR_OFFSET_00 0
+
+#define MASK_IMG_SOC_REP_COUNT_00   0x7FF00000
+#define SHIFT_IMG_SOC_REP_COUNT_00  20
+#define REGNUM_IMG_SOC_REP_COUNT_00 0x0010
+#define SIGNED_IMG_SOC_REP_COUNT_00 0
+
+/* Register DMAC_PERIPHERAL_ADDR_0 */
+#define IMG_SOC_DMAC_PERIPHERAL_ADDR_0 0x0014
+#define MASK_IMG_SOC_ADDR_00        0x007FFFFF
+#define SHIFT_IMG_SOC_ADDR_00       0
+#define REGNUM_IMG_SOC_ADDR_00      0x0014
+#define SIGNED_IMG_SOC_ADDR_00      0
+
+/* Register DMAC_PER_HOLD_0 */
+#define IMG_SOC_DMAC_PER_HOLD_0     0x0018
+#define MASK_IMG_SOC_PER_HOLD_00    0x0000007F
+#define SHIFT_IMG_SOC_PER_HOLD_00   0
+#define REGNUM_IMG_SOC_PER_HOLD_00  0x0018
+#define SIGNED_IMG_SOC_PER_HOLD_00  0
+
+/* Register DMAC_SETUP_1 */
+#define IMG_SOC_DMAC_SETUP_1        0x0020
+#define MASK_IMG_SOC_START_ADDRESS_01 0xFFFFFFFF
+#define SHIFT_IMG_SOC_START_ADDRESS_01 0
+#define REGNUM_IMG_SOC_START_ADDRESS_01 0x0020
+#define SIGNED_IMG_SOC_START_ADDRESS_01 0
+
+/* Register DMAC_COUNT_1 */
+#define IMG_SOC_DMAC_COUNT_1        0x0024
+#define MASK_IMG_SOC_CNT_01         0x0000FFFF
+#define SHIFT_IMG_SOC_CNT_01        0
+#define REGNUM_IMG_SOC_CNT_01       0x0024
+#define SIGNED_IMG_SOC_CNT_01       0
+
+#define MASK_IMG_SOC_EN_01          0x00010000
+#define SHIFT_IMG_SOC_EN_01         16
+#define REGNUM_IMG_SOC_EN_01        0x0024
+#define SIGNED_IMG_SOC_EN_01        0
+
+#define MASK_IMG_SOC_ENABLE_2D_MODE_01 0x00020000
+#define SHIFT_IMG_SOC_ENABLE_2D_MODE_01 17
+#define REGNUM_IMG_SOC_ENABLE_2D_MODE_01 0x0024
+#define SIGNED_IMG_SOC_ENABLE_2D_MODE_01 0
+#define IMG_SOC_ENABLE_2D_MODE_01_ENABLED              0x00000001
+#define IMG_SOC_ENABLE_2D_MODE_01_DISABLED             0x00000000
+
+#define MASK_IMG_SOC_LIST_EN_01     0x00040000
+#define SHIFT_IMG_SOC_LIST_EN_01    18
+#define REGNUM_IMG_SOC_LIST_EN_01   0x0024
+#define SIGNED_IMG_SOC_LIST_EN_01   0
+
+#define MASK_IMG_SOC_SRST_01        0x00080000
+#define SHIFT_IMG_SOC_SRST_01       19
+#define REGNUM_IMG_SOC_SRST_01      0x0024
+#define SIGNED_IMG_SOC_SRST_01      0
+
+#define MASK_IMG_SOC_DREQ_01        0x00100000
+#define SHIFT_IMG_SOC_DREQ_01       20
+#define REGNUM_IMG_SOC_DREQ_01      0x0024
+#define SIGNED_IMG_SOC_DREQ_01      0
+
+#define MASK_IMG_SOC_LIST_FIN_CTL_01 0x00400000
+#define SHIFT_IMG_SOC_LIST_FIN_CTL_01 22
+#define REGNUM_IMG_SOC_LIST_FIN_CTL_01 0x0024
+#define SIGNED_IMG_SOC_LIST_FIN_CTL_01 0
+
+#define MASK_IMG_SOC_PI_01          0x03000000
+#define SHIFT_IMG_SOC_PI_01         24
+#define REGNUM_IMG_SOC_PI_01        0x0024
+#define SIGNED_IMG_SOC_PI_01        0
+#define IMG_SOC_PI_01_1                0x00000002
+#define IMG_SOC_PI_01_2                0x00000001
+#define IMG_SOC_PI_01_4                0x00000000
+
+#define MASK_IMG_SOC_DIR_01         0x04000000
+#define SHIFT_IMG_SOC_DIR_01        26
+#define REGNUM_IMG_SOC_DIR_01       0x0024
+#define SIGNED_IMG_SOC_DIR_01       0
+
+#define MASK_IMG_SOC_PW_01          0x18000000
+#define SHIFT_IMG_SOC_PW_01         27
+#define REGNUM_IMG_SOC_PW_01        0x0024
+#define SIGNED_IMG_SOC_PW_01        0
+
+#define MASK_IMG_SOC_TRANSFER_IEN_01 0x20000000
+#define SHIFT_IMG_SOC_TRANSFER_IEN_01 29
+#define REGNUM_IMG_SOC_TRANSFER_IEN_01 0x0024
+#define SIGNED_IMG_SOC_TRANSFER_IEN_01 0
+
+#define MASK_IMG_SOC_BSWAP_01       0x40000000
+#define SHIFT_IMG_SOC_BSWAP_01      30
+#define REGNUM_IMG_SOC_BSWAP_01     0x0024
+#define SIGNED_IMG_SOC_BSWAP_01     0
+
+#define MASK_IMG_SOC_LIST_IEN_01    0x80000000
+#define SHIFT_IMG_SOC_LIST_IEN_01   31
+#define REGNUM_IMG_SOC_LIST_IEN_01  0x0024
+#define SIGNED_IMG_SOC_LIST_IEN_01  0
+
+/* Register DMAC_PERIPH_1 */
+#define IMG_SOC_DMAC_PERIPH_1       0x0028
+#define MASK_IMG_SOC_EXT_SA_01      0x0000000F
+#define SHIFT_IMG_SOC_EXT_SA_01     0
+#define REGNUM_IMG_SOC_EXT_SA_01    0x0028
+#define SIGNED_IMG_SOC_EXT_SA_01    0
+
+#define MASK_IMG_SOC_BURST_01       0x07000000
+#define SHIFT_IMG_SOC_BURST_01      24
+#define REGNUM_IMG_SOC_BURST_01     0x0028
+#define SIGNED_IMG_SOC_BURST_01     0
+
+#define MASK_IMG_SOC_INCR_01        0x08000000
+#define SHIFT_IMG_SOC_INCR_01       27
+#define REGNUM_IMG_SOC_INCR_01      0x0028
+#define SIGNED_IMG_SOC_INCR_01      0
+
+#define MASK_IMG_SOC_ACC_DEL_01     0xE0000000
+#define SHIFT_IMG_SOC_ACC_DEL_01    29
+#define REGNUM_IMG_SOC_ACC_DEL_01   0x0028
+#define SIGNED_IMG_SOC_ACC_DEL_01   0
+
+/* Register DMAC_IRQ_STAT_1 */
+#define IMG_SOC_DMAC_IRQ_STAT_1     0x002C
+#define MASK_IMG_SOC_TRANSFER_FIN_01 0x00020000
+#define SHIFT_IMG_SOC_TRANSFER_FIN_01 17
+#define REGNUM_IMG_SOC_TRANSFER_FIN_01 0x002C
+#define SIGNED_IMG_SOC_TRANSFER_FIN_01 0
+
+#define MASK_IMG_SOC_LIST_INT_01    0x00100000
+#define SHIFT_IMG_SOC_LIST_INT_01   20
+#define REGNUM_IMG_SOC_LIST_INT_01  0x002C
+#define SIGNED_IMG_SOC_LIST_INT_01  0
+#define IMG_SOC_LIST_INT_01_ENABLE             0x00000001              /* The last linked-list element processed initiated an interrupt.  If LIST_IEN is set
+ for the channel, an interrupt will be generated on the IRQ line until this bit is cleared, */
+#define IMG_SOC_LIST_INT_01_DISABLE            0x00000000              /* last linked list element processed did not initiate an interrupt. */
+
+#define MASK_IMG_SOC_LIST_FIN_01    0x00200000
+#define SHIFT_IMG_SOC_LIST_FIN_01   21
+#define REGNUM_IMG_SOC_LIST_FIN_01  0x002C
+#define SIGNED_IMG_SOC_LIST_FIN_01  0
+
+/* Register DMAC_2D_MODE_1 */
+#define IMG_SOC_DMAC_2D_MODE_1      0x0030
+#define MASK_IMG_SOC_ROW_LENGTH_01  0x000003FF
+#define SHIFT_IMG_SOC_ROW_LENGTH_01 0
+#define REGNUM_IMG_SOC_ROW_LENGTH_01 0x0030
+#define SIGNED_IMG_SOC_ROW_LENGTH_01 0
+
+#define MASK_IMG_SOC_LINE_ADDR_OFFSET_01 0x000FFC00
+#define SHIFT_IMG_SOC_LINE_ADDR_OFFSET_01 10
+#define REGNUM_IMG_SOC_LINE_ADDR_OFFSET_01 0x0030
+#define SIGNED_IMG_SOC_LINE_ADDR_OFFSET_01 0
+
+#define MASK_IMG_SOC_REP_COUNT_01   0x7FF00000
+#define SHIFT_IMG_SOC_REP_COUNT_01  20
+#define REGNUM_IMG_SOC_REP_COUNT_01 0x0030
+#define SIGNED_IMG_SOC_REP_COUNT_01 0
+
+/* Register DMAC_PERIPHERAL_ADDR_1 */
+#define IMG_SOC_DMAC_PERIPHERAL_ADDR_1 0x0034
+#define MASK_IMG_SOC_ADDR_01        0x007FFFFF
+#define SHIFT_IMG_SOC_ADDR_01       0
+#define REGNUM_IMG_SOC_ADDR_01      0x0034
+#define SIGNED_IMG_SOC_ADDR_01      0
+
+/* Register DMAC_PER_HOLD_1 */
+#define IMG_SOC_DMAC_PER_HOLD_1     0x0038
+#define MASK_IMG_SOC_PER_HOLD_01    0x0000007F
+#define SHIFT_IMG_SOC_PER_HOLD_01   0
+#define REGNUM_IMG_SOC_PER_HOLD_01  0x0038
+#define SIGNED_IMG_SOC_PER_HOLD_01  0
+
+/* Register DMAC_SETUP_2 */
+#define IMG_SOC_DMAC_SETUP_2        0x0040
+#define MASK_IMG_SOC_START_ADDRESS_02 0xFFFFFFFF
+#define SHIFT_IMG_SOC_START_ADDRESS_02 0
+#define REGNUM_IMG_SOC_START_ADDRESS_02 0x0040
+#define SIGNED_IMG_SOC_START_ADDRESS_02 0
+
+/* Register DMAC_COUNT_2 */
+#define IMG_SOC_DMAC_COUNT_2        0x0044
+#define MASK_IMG_SOC_CNT_02         0x0000FFFF
+#define SHIFT_IMG_SOC_CNT_02        0
+#define REGNUM_IMG_SOC_CNT_02       0x0044
+#define SIGNED_IMG_SOC_CNT_02       0
+
+#define MASK_IMG_SOC_EN_02          0x00010000
+#define SHIFT_IMG_SOC_EN_02         16
+#define REGNUM_IMG_SOC_EN_02        0x0044
+#define SIGNED_IMG_SOC_EN_02        0
+
+#define MASK_IMG_SOC_ENABLE_2D_MODE_02 0x00020000
+#define SHIFT_IMG_SOC_ENABLE_2D_MODE_02 17
+#define REGNUM_IMG_SOC_ENABLE_2D_MODE_02 0x0044
+#define SIGNED_IMG_SOC_ENABLE_2D_MODE_02 0
+#define IMG_SOC_ENABLE_2D_MODE_02_ENABLED              0x00000001
+#define IMG_SOC_ENABLE_2D_MODE_02_DISABLED             0x00000000
+
+#define MASK_IMG_SOC_LIST_EN_02     0x00040000
+#define SHIFT_IMG_SOC_LIST_EN_02    18
+#define REGNUM_IMG_SOC_LIST_EN_02   0x0044
+#define SIGNED_IMG_SOC_LIST_EN_02   0
+
+#define MASK_IMG_SOC_SRST_02        0x00080000
+#define SHIFT_IMG_SOC_SRST_02       19
+#define REGNUM_IMG_SOC_SRST_02      0x0044
+#define SIGNED_IMG_SOC_SRST_02      0
+
+#define MASK_IMG_SOC_DREQ_02        0x00100000
+#define SHIFT_IMG_SOC_DREQ_02       20
+#define REGNUM_IMG_SOC_DREQ_02      0x0044
+#define SIGNED_IMG_SOC_DREQ_02      0
+
+#define MASK_IMG_SOC_LIST_FIN_CTL_02 0x00400000
+#define SHIFT_IMG_SOC_LIST_FIN_CTL_02 22
+#define REGNUM_IMG_SOC_LIST_FIN_CTL_02 0x0044
+#define SIGNED_IMG_SOC_LIST_FIN_CTL_02 0
+
+#define MASK_IMG_SOC_PI_02          0x03000000
+#define SHIFT_IMG_SOC_PI_02         24
+#define REGNUM_IMG_SOC_PI_02        0x0044
+#define SIGNED_IMG_SOC_PI_02        0
+#define IMG_SOC_PI_02_1                0x00000002
+#define IMG_SOC_PI_02_2                0x00000001
+#define IMG_SOC_PI_02_4                0x00000000
+
+#define MASK_IMG_SOC_DIR_02         0x04000000
+#define SHIFT_IMG_SOC_DIR_02        26
+#define REGNUM_IMG_SOC_DIR_02       0x0044
+#define SIGNED_IMG_SOC_DIR_02       0
+
+#define MASK_IMG_SOC_PW_02          0x18000000
+#define SHIFT_IMG_SOC_PW_02         27
+#define REGNUM_IMG_SOC_PW_02        0x0044
+#define SIGNED_IMG_SOC_PW_02        0
+
+#define MASK_IMG_SOC_TRANSFER_IEN_02 0x20000000
+#define SHIFT_IMG_SOC_TRANSFER_IEN_02 29
+#define REGNUM_IMG_SOC_TRANSFER_IEN_02 0x0044
+#define SIGNED_IMG_SOC_TRANSFER_IEN_02 0
+
+#define MASK_IMG_SOC_BSWAP_02       0x40000000
+#define SHIFT_IMG_SOC_BSWAP_02      30
+#define REGNUM_IMG_SOC_BSWAP_02     0x0044
+#define SIGNED_IMG_SOC_BSWAP_02     0
+
+#define MASK_IMG_SOC_LIST_IEN_02    0x80000000
+#define SHIFT_IMG_SOC_LIST_IEN_02   31
+#define REGNUM_IMG_SOC_LIST_IEN_02  0x0044
+#define SIGNED_IMG_SOC_LIST_IEN_02  0
+
+/* Register DMAC_PERIPH_2 */
+#define IMG_SOC_DMAC_PERIPH_2       0x0048
+#define MASK_IMG_SOC_EXT_SA_02      0x0000000F
+#define SHIFT_IMG_SOC_EXT_SA_02     0
+#define REGNUM_IMG_SOC_EXT_SA_02    0x0048
+#define SIGNED_IMG_SOC_EXT_SA_02    0
+
+#define MASK_IMG_SOC_BURST_02       0x07000000
+#define SHIFT_IMG_SOC_BURST_02      24
+#define REGNUM_IMG_SOC_BURST_02     0x0048
+#define SIGNED_IMG_SOC_BURST_02     0
+
+#define MASK_IMG_SOC_INCR_02        0x08000000
+#define SHIFT_IMG_SOC_INCR_02       27
+#define REGNUM_IMG_SOC_INCR_02      0x0048
+#define SIGNED_IMG_SOC_INCR_02      0
+
+#define MASK_IMG_SOC_ACC_DEL_02     0xE0000000
+#define SHIFT_IMG_SOC_ACC_DEL_02    29
+#define REGNUM_IMG_SOC_ACC_DEL_02   0x0048
+#define SIGNED_IMG_SOC_ACC_DEL_02   0
+
+/* Register DMAC_IRQ_STAT_2 */
+#define IMG_SOC_DMAC_IRQ_STAT_2     0x004C
+#define MASK_IMG_SOC_TRANSFER_FIN_02 0x00020000
+#define SHIFT_IMG_SOC_TRANSFER_FIN_02 17
+#define REGNUM_IMG_SOC_TRANSFER_FIN_02 0x004C
+#define SIGNED_IMG_SOC_TRANSFER_FIN_02 0
+
+#define MASK_IMG_SOC_LIST_INT_02    0x00100000
+#define SHIFT_IMG_SOC_LIST_INT_02   20
+#define REGNUM_IMG_SOC_LIST_INT_02  0x004C
+#define SIGNED_IMG_SOC_LIST_INT_02  0
+#define IMG_SOC_LIST_INT_02_ENABLE             0x00000001              /* The last linked-list element processed initiated an interrupt.  If LIST_IEN is set
+ for the channel, an interrupt will be generated on the IRQ line until this bit is cleared, */
+#define IMG_SOC_LIST_INT_02_DISABLE            0x00000000              /* last linked list element processed did not initiate an interrupt. */
+
+#define MASK_IMG_SOC_LIST_FIN_02    0x00200000
+#define SHIFT_IMG_SOC_LIST_FIN_02   21
+#define REGNUM_IMG_SOC_LIST_FIN_02  0x004C
+#define SIGNED_IMG_SOC_LIST_FIN_02  0
+
+/* Register DMAC_2D_MODE_2 */
+#define IMG_SOC_DMAC_2D_MODE_2      0x0050
+#define MASK_IMG_SOC_ROW_LENGTH_02  0x000003FF
+#define SHIFT_IMG_SOC_ROW_LENGTH_02 0
+#define REGNUM_IMG_SOC_ROW_LENGTH_02 0x0050
+#define SIGNED_IMG_SOC_ROW_LENGTH_02 0
+
+#define MASK_IMG_SOC_LINE_ADDR_OFFSET_02 0x000FFC00
+#define SHIFT_IMG_SOC_LINE_ADDR_OFFSET_02 10
+#define REGNUM_IMG_SOC_LINE_ADDR_OFFSET_02 0x0050
+#define SIGNED_IMG_SOC_LINE_ADDR_OFFSET_02 0
+
+#define MASK_IMG_SOC_REP_COUNT_02   0x7FF00000
+#define SHIFT_IMG_SOC_REP_COUNT_02  20
+#define REGNUM_IMG_SOC_REP_COUNT_02 0x0050
+#define SIGNED_IMG_SOC_REP_COUNT_02 0
+
+/* Register DMAC_PERIPHERAL_ADDR_2 */
+#define IMG_SOC_DMAC_PERIPHERAL_ADDR_2 0x0054
+#define MASK_IMG_SOC_ADDR_02        0x007FFFFF
+#define SHIFT_IMG_SOC_ADDR_02       0
+#define REGNUM_IMG_SOC_ADDR_02      0x0054
+#define SIGNED_IMG_SOC_ADDR_02      0
+
+/* Register DMAC_PER_HOLD_2 */
+#define IMG_SOC_DMAC_PER_HOLD_2     0x0058
+#define MASK_IMG_SOC_PER_HOLD_02    0x0000007F
+#define SHIFT_IMG_SOC_PER_HOLD_02   0
+#define REGNUM_IMG_SOC_PER_HOLD_02  0x0058
+#define SIGNED_IMG_SOC_PER_HOLD_02  0
+
+/* Register DMAC_SETUP_3 */
+#define IMG_SOC_DMAC_SETUP_3        0x0060
+#define MASK_IMG_SOC_START_ADDRESS_03 0xFFFFFFFF
+#define SHIFT_IMG_SOC_START_ADDRESS_03 0
+#define REGNUM_IMG_SOC_START_ADDRESS_03 0x0060
+#define SIGNED_IMG_SOC_START_ADDRESS_03 0
+
+/* Register DMAC_COUNT_3 */
+#define IMG_SOC_DMAC_COUNT_3        0x0064
+#define MASK_IMG_SOC_CNT_03         0x0000FFFF
+#define SHIFT_IMG_SOC_CNT_03        0
+#define REGNUM_IMG_SOC_CNT_03       0x0064
+#define SIGNED_IMG_SOC_CNT_03       0
+
+#define MASK_IMG_SOC_EN_03          0x00010000
+#define SHIFT_IMG_SOC_EN_03         16
+#define REGNUM_IMG_SOC_EN_03        0x0064
+#define SIGNED_IMG_SOC_EN_03        0
+
+#define MASK_IMG_SOC_ENABLE_2D_MODE_03 0x00020000
+#define SHIFT_IMG_SOC_ENABLE_2D_MODE_03 17
+#define REGNUM_IMG_SOC_ENABLE_2D_MODE_03 0x0064
+#define SIGNED_IMG_SOC_ENABLE_2D_MODE_03 0
+#define IMG_SOC_ENABLE_2D_MODE_03_ENABLED              0x00000001
+#define IMG_SOC_ENABLE_2D_MODE_03_DISABLED             0x00000000
+
+#define MASK_IMG_SOC_LIST_EN_03     0x00040000
+#define SHIFT_IMG_SOC_LIST_EN_03    18
+#define REGNUM_IMG_SOC_LIST_EN_03   0x0064
+#define SIGNED_IMG_SOC_LIST_EN_03   0
+
+#define MASK_IMG_SOC_SRST_03        0x00080000
+#define SHIFT_IMG_SOC_SRST_03       19
+#define REGNUM_IMG_SOC_SRST_03      0x0064
+#define SIGNED_IMG_SOC_SRST_03      0
+
+#define MASK_IMG_SOC_DREQ_03        0x00100000
+#define SHIFT_IMG_SOC_DREQ_03       20
+#define REGNUM_IMG_SOC_DREQ_03      0x0064
+#define SIGNED_IMG_SOC_DREQ_03      0
+
+#define MASK_IMG_SOC_LIST_FIN_CTL_03 0x00400000
+#define SHIFT_IMG_SOC_LIST_FIN_CTL_03 22
+#define REGNUM_IMG_SOC_LIST_FIN_CTL_03 0x0064
+#define SIGNED_IMG_SOC_LIST_FIN_CTL_03 0
+
+#define MASK_IMG_SOC_PI_03          0x03000000
+#define SHIFT_IMG_SOC_PI_03         24
+#define REGNUM_IMG_SOC_PI_03        0x0064
+#define SIGNED_IMG_SOC_PI_03        0
+#define IMG_SOC_PI_03_1                0x00000002
+#define IMG_SOC_PI_03_2                0x00000001
+#define IMG_SOC_PI_03_4                0x00000000
+
+#define MASK_IMG_SOC_DIR_03         0x04000000
+#define SHIFT_IMG_SOC_DIR_03        26
+#define REGNUM_IMG_SOC_DIR_03       0x0064
+#define SIGNED_IMG_SOC_DIR_03       0
+
+#define MASK_IMG_SOC_PW_03          0x18000000
+#define SHIFT_IMG_SOC_PW_03         27
+#define REGNUM_IMG_SOC_PW_03        0x0064
+#define SIGNED_IMG_SOC_PW_03        0
+
+#define MASK_IMG_SOC_TRANSFER_IEN_03 0x20000000
+#define SHIFT_IMG_SOC_TRANSFER_IEN_03 29
+#define REGNUM_IMG_SOC_TRANSFER_IEN_03 0x0064
+#define SIGNED_IMG_SOC_TRANSFER_IEN_03 0
+
+#define MASK_IMG_SOC_BSWAP_03       0x40000000
+#define SHIFT_IMG_SOC_BSWAP_03      30
+#define REGNUM_IMG_SOC_BSWAP_03     0x0064
+#define SIGNED_IMG_SOC_BSWAP_03     0
+
+#define MASK_IMG_SOC_LIST_IEN_03    0x80000000
+#define SHIFT_IMG_SOC_LIST_IEN_03   31
+#define REGNUM_IMG_SOC_LIST_IEN_03  0x0064
+#define SIGNED_IMG_SOC_LIST_IEN_03  0
+
+/* Register DMAC_PERIPH_3 */
+#define IMG_SOC_DMAC_PERIPH_3       0x0068
+#define MASK_IMG_SOC_EXT_SA_03      0x0000000F
+#define SHIFT_IMG_SOC_EXT_SA_03     0
+#define REGNUM_IMG_SOC_EXT_SA_03    0x0068
+#define SIGNED_IMG_SOC_EXT_SA_03    0
+
+#define MASK_IMG_SOC_BURST_03       0x07000000
+#define SHIFT_IMG_SOC_BURST_03      24
+#define REGNUM_IMG_SOC_BURST_03     0x0068
+#define SIGNED_IMG_SOC_BURST_03     0
+
+#define MASK_IMG_SOC_INCR_03        0x08000000
+#define SHIFT_IMG_SOC_INCR_03       27
+#define REGNUM_IMG_SOC_INCR_03      0x0068
+#define SIGNED_IMG_SOC_INCR_03      0
+
+#define MASK_IMG_SOC_ACC_DEL_03     0xE0000000
+#define SHIFT_IMG_SOC_ACC_DEL_03    29
+#define REGNUM_IMG_SOC_ACC_DEL_03   0x0068
+#define SIGNED_IMG_SOC_ACC_DEL_03   0
+
+/* Register DMAC_IRQ_STAT_3 */
+#define IMG_SOC_DMAC_IRQ_STAT_3     0x006C
+#define MASK_IMG_SOC_TRANSFER_FIN_03 0x00020000
+#define SHIFT_IMG_SOC_TRANSFER_FIN_03 17
+#define REGNUM_IMG_SOC_TRANSFER_FIN_03 0x006C
+#define SIGNED_IMG_SOC_TRANSFER_FIN_03 0
+
+#define MASK_IMG_SOC_LIST_INT_03    0x00100000
+#define SHIFT_IMG_SOC_LIST_INT_03   20
+#define REGNUM_IMG_SOC_LIST_INT_03  0x006C
+#define SIGNED_IMG_SOC_LIST_INT_03  0
+#define IMG_SOC_LIST_INT_03_ENABLE             0x00000001              /* The last linked-list element processed initiated an interrupt.  If LIST_IEN is set
+ for the channel, an interrupt will be generated on the IRQ line until this bit is cleared, */
+#define IMG_SOC_LIST_INT_03_DISABLE            0x00000000              /* last linked list element processed did not initiate an interrupt. */
+
+#define MASK_IMG_SOC_LIST_FIN_03    0x00200000
+#define SHIFT_IMG_SOC_LIST_FIN_03   21
+#define REGNUM_IMG_SOC_LIST_FIN_03  0x006C
+#define SIGNED_IMG_SOC_LIST_FIN_03  0
+
+/* Register DMAC_2D_MODE_3 */
+#define IMG_SOC_DMAC_2D_MODE_3      0x0070
+#define MASK_IMG_SOC_ROW_LENGTH_03  0x000003FF
+#define SHIFT_IMG_SOC_ROW_LENGTH_03 0
+#define REGNUM_IMG_SOC_ROW_LENGTH_03 0x0070
+#define SIGNED_IMG_SOC_ROW_LENGTH_03 0
+
+#define MASK_IMG_SOC_LINE_ADDR_OFFSET_03 0x000FFC00
+#define SHIFT_IMG_SOC_LINE_ADDR_OFFSET_03 10
+#define REGNUM_IMG_SOC_LINE_ADDR_OFFSET_03 0x0070
+#define SIGNED_IMG_SOC_LINE_ADDR_OFFSET_03 0
+
+#define MASK_IMG_SOC_REP_COUNT_03   0x7FF00000
+#define SHIFT_IMG_SOC_REP_COUNT_03  20
+#define REGNUM_IMG_SOC_REP_COUNT_03 0x0070
+#define SIGNED_IMG_SOC_REP_COUNT_03 0
+
+/* Register DMAC_PERIPHERAL_ADDR_3 */
+#define IMG_SOC_DMAC_PERIPHERAL_ADDR_3 0x0074
+#define MASK_IMG_SOC_ADDR_03        0x007FFFFF
+#define SHIFT_IMG_SOC_ADDR_03       0
+#define REGNUM_IMG_SOC_ADDR_03      0x0074
+#define SIGNED_IMG_SOC_ADDR_03      0
+
+/* Register DMAC_PER_HOLD_3 */
+#define IMG_SOC_DMAC_PER_HOLD_3     0x0078
+#define MASK_IMG_SOC_PER_HOLD_03    0x0000007F
+#define SHIFT_IMG_SOC_PER_HOLD_03   0
+#define REGNUM_IMG_SOC_PER_HOLD_03  0x0078
+#define SIGNED_IMG_SOC_PER_HOLD_03  0
+
+/* Register DMAC_SOFT_RESET */
+#define IMG_SOC_DMAC_SOFT_RESET     0x0080
+
+/* Table DMAC */
+
+/* Register DMAC_SETUP */
+#define IMG_SOC_DMAC_SETUP(X)       (0x0000 + (32 * (X)))
+#define MASK_IMG_SOC_START_ADDRESS  0xFFFFFFFF
+#define SHIFT_IMG_SOC_START_ADDRESS 0
+#define REGNUM_IMG_SOC_START_ADDRESS 0x0000
+#define SIGNED_IMG_SOC_START_ADDRESS 0
+
+/* Register DMAC_COUNT */
+#define IMG_SOC_DMAC_COUNT(X)       (0x0004 + (32 * (X)))
+#define MASK_IMG_SOC_CNT            0x0000FFFF
+#define SHIFT_IMG_SOC_CNT           0
+#define REGNUM_IMG_SOC_CNT          0x0004
+#define SIGNED_IMG_SOC_CNT          0
+
+#define MASK_IMG_SOC_EN             0x00010000
+#define SHIFT_IMG_SOC_EN            16
+#define REGNUM_IMG_SOC_EN           0x0004
+#define SIGNED_IMG_SOC_EN           0
+
+#define MASK_IMG_SOC_ENABLE_2D_MODE 0x00020000
+#define SHIFT_IMG_SOC_ENABLE_2D_MODE 17
+#define REGNUM_IMG_SOC_ENABLE_2D_MODE 0x0004
+#define SIGNED_IMG_SOC_ENABLE_2D_MODE 0
+#define IMG_SOC_ENABLE_2D_MODE_ENABLED         0x00000001
+#define IMG_SOC_ENABLE_2D_MODE_DISABLED                0x00000000
+
+#define MASK_IMG_SOC_LIST_EN        0x00040000
+#define SHIFT_IMG_SOC_LIST_EN       18
+#define REGNUM_IMG_SOC_LIST_EN      0x0004
+#define SIGNED_IMG_SOC_LIST_EN      0
+
+#define MASK_IMG_SOC_SRST           0x00080000
+#define SHIFT_IMG_SOC_SRST          19
+#define REGNUM_IMG_SOC_SRST         0x0004
+#define SIGNED_IMG_SOC_SRST         0
+
+#define MASK_IMG_SOC_DREQ           0x00100000
+#define SHIFT_IMG_SOC_DREQ          20
+#define REGNUM_IMG_SOC_DREQ         0x0004
+#define SIGNED_IMG_SOC_DREQ         0
+
+#define MASK_IMG_SOC_LIST_FIN_CTL   0x00400000
+#define SHIFT_IMG_SOC_LIST_FIN_CTL  22
+#define REGNUM_IMG_SOC_LIST_FIN_CTL 0x0004
+#define SIGNED_IMG_SOC_LIST_FIN_CTL 0
+
+#define MASK_IMG_SOC_PI             0x03000000
+#define SHIFT_IMG_SOC_PI            24
+#define REGNUM_IMG_SOC_PI           0x0004
+#define SIGNED_IMG_SOC_PI           0
+#define IMG_SOC_PI_1           0x00000002
+#define IMG_SOC_PI_2           0x00000001
+#define IMG_SOC_PI_4           0x00000000
+
+#define MASK_IMG_SOC_DIR            0x04000000
+#define SHIFT_IMG_SOC_DIR           26
+#define REGNUM_IMG_SOC_DIR          0x0004
+#define SIGNED_IMG_SOC_DIR          0
+
+#define MASK_IMG_SOC_PW             0x18000000
+#define SHIFT_IMG_SOC_PW            27
+#define REGNUM_IMG_SOC_PW           0x0004
+#define SIGNED_IMG_SOC_PW           0
+
+#define MASK_IMG_SOC_TRANSFER_IEN   0x20000000
+#define SHIFT_IMG_SOC_TRANSFER_IEN  29
+#define REGNUM_IMG_SOC_TRANSFER_IEN 0x0004
+#define SIGNED_IMG_SOC_TRANSFER_IEN 0
+
+#define MASK_IMG_SOC_BSWAP          0x40000000
+#define SHIFT_IMG_SOC_BSWAP         30
+#define REGNUM_IMG_SOC_BSWAP        0x0004
+#define SIGNED_IMG_SOC_BSWAP        0
+
+#define MASK_IMG_SOC_LIST_IEN       0x80000000
+#define SHIFT_IMG_SOC_LIST_IEN      31
+#define REGNUM_IMG_SOC_LIST_IEN     0x0004
+#define SIGNED_IMG_SOC_LIST_IEN     0
+
+/* Register DMAC_PERIPH */
+#define IMG_SOC_DMAC_PERIPH(X)      (0x0008 + (32 * (X)))
+#define MASK_IMG_SOC_EXT_SA         0x0000000F
+#define SHIFT_IMG_SOC_EXT_SA        0
+#define REGNUM_IMG_SOC_EXT_SA       0x0008
+#define SIGNED_IMG_SOC_EXT_SA       0
+
+#define MASK_IMG_SOC_BURST          0x07000000
+#define SHIFT_IMG_SOC_BURST         24
+#define REGNUM_IMG_SOC_BURST        0x0008
+#define SIGNED_IMG_SOC_BURST        0
+
+#define MASK_IMG_SOC_INCR           0x08000000
+#define SHIFT_IMG_SOC_INCR          27
+#define REGNUM_IMG_SOC_INCR         0x0008
+#define SIGNED_IMG_SOC_INCR         0
+
+#define MASK_IMG_SOC_ACC_DEL        0xE0000000
+#define SHIFT_IMG_SOC_ACC_DEL       29
+#define REGNUM_IMG_SOC_ACC_DEL      0x0008
+#define SIGNED_IMG_SOC_ACC_DEL      0
+
+/* Register DMAC_IRQ_STAT */
+#define IMG_SOC_DMAC_IRQ_STAT(X)    (0x000C + (32 * (X)))
+#define MASK_IMG_SOC_TRANSFER_FIN   0x00020000
+#define SHIFT_IMG_SOC_TRANSFER_FIN  17
+#define REGNUM_IMG_SOC_TRANSFER_FIN 0x000C
+#define SIGNED_IMG_SOC_TRANSFER_FIN 0
+
+#define MASK_IMG_SOC_LIST_INT       0x00100000
+#define SHIFT_IMG_SOC_LIST_INT      20
+#define REGNUM_IMG_SOC_LIST_INT     0x000C
+#define SIGNED_IMG_SOC_LIST_INT     0
+#define IMG_SOC_LIST_INT_ENABLE                0x00000001              /* The last linked-list element processed initiated an interrupt.  If LIST_IEN is set for
+ the channel, an interrupt will be generated on the IRQ line until this bit is cleared, */
+#define IMG_SOC_LIST_INT_DISABLE               0x00000000              /* last linked list element processed did not initiate an interrupt. */
+
+#define MASK_IMG_SOC_LIST_FIN       0x00200000
+#define SHIFT_IMG_SOC_LIST_FIN      21
+#define REGNUM_IMG_SOC_LIST_FIN     0x000C
+#define SIGNED_IMG_SOC_LIST_FIN     0
+
+/* Register DMAC_2D_MODE */
+#define IMG_SOC_DMAC_2D_MODE(X)     (0x0010 + (32 * (X)))
+#define MASK_IMG_SOC_ROW_LENGTH     0x000003FF
+#define SHIFT_IMG_SOC_ROW_LENGTH    0
+#define REGNUM_IMG_SOC_ROW_LENGTH   0x0010
+#define SIGNED_IMG_SOC_ROW_LENGTH   0
+
+#define MASK_IMG_SOC_LINE_ADDR_OFFSET 0x000FFC00
+#define SHIFT_IMG_SOC_LINE_ADDR_OFFSET 10
+#define REGNUM_IMG_SOC_LINE_ADDR_OFFSET 0x0010
+#define SIGNED_IMG_SOC_LINE_ADDR_OFFSET 0
+
+#define MASK_IMG_SOC_REP_COUNT      0x7FF00000
+#define SHIFT_IMG_SOC_REP_COUNT     20
+#define REGNUM_IMG_SOC_REP_COUNT    0x0010
+#define SIGNED_IMG_SOC_REP_COUNT    0
+
+/* Register DMAC_PERIPHERAL_ADDR */
+#define IMG_SOC_DMAC_PERIPHERAL_ADDR(X) (0x0014 + (32 * (X)))
+#define MASK_IMG_SOC_ADDR           0x007FFFFF
+#define SHIFT_IMG_SOC_ADDR          0
+#define REGNUM_IMG_SOC_ADDR         0x0014
+#define SIGNED_IMG_SOC_ADDR         0
+
+/* Register DMAC_PER_HOLD */
+#define IMG_SOC_DMAC_PER_HOLD(X)    (0x0018 + (32 * (X)))
+#define MASK_IMG_SOC_PER_HOLD       0x0000007F
+#define SHIFT_IMG_SOC_PER_HOLD      0
+#define REGNUM_IMG_SOC_PER_HOLD     0x0018
+#define SIGNED_IMG_SOC_PER_HOLD     0
+
+/* Number of entries in table DMAC */
+
+#define IMG_SOC_DMAC_SIZE_UINT32    31
+#define IMG_SOC_DMAC_NUM_ENTRIES    4
+
+/*
+       Byte range covering the group DMAC file
+*/
+
+#define IMG_SOC_DMAC_REGISTERS_START           0x00000000
+#define IMG_SOC_DMAC_REGISTERS_END             0x00000083
+
+/*
+       Byte range covering the whole register file
+*/
+
+#define IMG_SOC_REGISTERS_START                0x00000000
+#define IMG_SOC_REGISTERS_END                  0x00000083
+#define IMG_SOC_REG_DEFAULT_TABLE struct {\
+                       uint16 uRegOffset;\
+                       uint32 uRegDefault;\
+                       uint32 uRegMask;\
+                       osa_bool bReadonly;\
+                       const osa_char* pszName;\
+               } IMG_SOC_Defaults[] = {\
+       {0x0000, 0x00000000, 0xFFFFFFFF, 0, "DMAC_SETUP_0" } ,\
+       {0x0004, 0x00000000, 0xFF5FFFFF, 0, "DMAC_COUNT_0" } ,\
+       {0x0008, 0x00000000, 0xEF00000F, 0, "DMAC_PERIPH_0" } ,\
+       {0x000C, 0x00000000, 0x00320000, 0, "DMAC_IRQ_STAT_0" } ,\
+       {0x0010, 0x00000000, 0x7FFFFFFF, 0, "DMAC_2D_MODE_0" } ,\
+       {0x0014, 0x00000000, 0x007FFFFF, 0, "DMAC_PERIPHERAL_ADDR_0" } ,\
+       {0x0018, 0x00000007, 0x0000007F, 0, "DMAC_PER_HOLD_0" } ,\
+       {0x0020, 0x00000000, 0xFFFFFFFF, 0, "DMAC_SETUP_1" } ,\
+       {0x0024, 0x00000000, 0xFF5FFFFF, 0, "DMAC_COUNT_1" } ,\
+       {0x0028, 0x00000000, 0xEF00000F, 0, "DMAC_PERIPH_1" } ,\
+       {0x002C, 0x00000000, 0x00320000, 0, "DMAC_IRQ_STAT_1" } ,\
+       {0x0030, 0x00000000, 0x7FFFFFFF, 0, "DMAC_2D_MODE_1" } ,\
+       {0x0034, 0x00000000, 0x007FFFFF, 0, "DMAC_PERIPHERAL_ADDR_1" } ,\
+       {0x0038, 0x00000007, 0x0000007F, 0, "DMAC_PER_HOLD_1" } ,\
+       {0x0040, 0x00000000, 0xFFFFFFFF, 0, "DMAC_SETUP_2" } ,\
+       {0x0044, 0x00000000, 0xFF5FFFFF, 0, "DMAC_COUNT_2" } ,\
+       {0x0048, 0x00000000, 0xEF00000F, 0, "DMAC_PERIPH_2" } ,\
+       {0x004C, 0x00000000, 0x00320000, 0, "DMAC_IRQ_STAT_2" } ,\
+       {0x0050, 0x00000000, 0x7FFFFFFF, 0, "DMAC_2D_MODE_2" } ,\
+       {0x0054, 0x00000000, 0x007FFFFF, 0, "DMAC_PERIPHERAL_ADDR_2" } ,\
+       {0x0058, 0x00000007, 0x0000007F, 0, "DMAC_PER_HOLD_2" } ,\
+       {0x0060, 0x00000000, 0xFFFFFFFF, 0, "DMAC_SETUP_3" } ,\
+       {0x0064, 0x00000000, 0xFF5FFFFF, 0, "DMAC_COUNT_3" } ,\
+       {0x0068, 0x00000000, 0xEF00000F, 0, "DMAC_PERIPH_3" } ,\
+       {0x006C, 0x00000000, 0x00320000, 0, "DMAC_IRQ_STAT_3" } ,\
+       {0x0070, 0x00000000, 0x7FFFFFFF, 0, "DMAC_2D_MODE_3" } ,\
+       {0x0074, 0x00000000, 0x007FFFFF, 0, "DMAC_PERIPHERAL_ADDR_3" } ,\
+       {0x0078, 0x00000007, 0x0000007F, 0, "DMAC_PER_HOLD_3" } ,\
+       {0x0080, 0x00000000, 0x00000000, 0, "DMAC_SOFT_RESET" } ,\
+{ 0 }}
+
+#define IMG_SOC_REGS_INIT(uBase) \
+       { \
+               uint32 n;\
+               IMG_SOC_REG_DEFAULT_TABLE;\
+               for (n = 0; n < sizeof(IMG_SOC_Defaults)/ sizeof(IMG_SOC_Defaults[0] ) -1; n++)\
+               {\
+                       RegWriteNoTrap(IMG_SOC_Defaults[n].uRegOffset + uBase, IMG_SOC_Defaults[n].uRegDefault); \
+               }\
+       }
+#endif
diff --git a/driver/encoder/reg_headers/mtx_regs.h b/driver/encoder/reg_headers/mtx_regs.h
new file mode 100644 (file)
index 0000000..eb8e2c7
--- /dev/null
@@ -0,0 +1,323 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _REGCONV_H_mtx_regs_h
+#define _REGCONV_H_mtx_regs_h
+
+#include "osal/inc/osa_types.h"
+
+/* Register CR_MTX_ENABLE */
+#define MTX_CR_MTX_ENABLE           0x0000
+#define MASK_MTX_MTX_ENABLE         0x00000001
+#define SHIFT_MTX_MTX_ENABLE        0
+#define REGNUM_MTX_MTX_ENABLE       0x0000
+#define SIGNED_MTX_MTX_ENABLE       0
+
+#define MASK_MTX_MTX_TOFF           0x00000002
+#define SHIFT_MTX_MTX_TOFF          1
+#define REGNUM_MTX_MTX_TOFF         0x0000
+#define SIGNED_MTX_MTX_TOFF         0
+
+#define MASK_MTX_MTX_TSTOPPED       0x00000004
+#define SHIFT_MTX_MTX_TSTOPPED      2
+#define REGNUM_MTX_MTX_TSTOPPED     0x0000
+#define SIGNED_MTX_MTX_TSTOPPED     0
+
+#define MASK_MTX_MTX_STEP_REC       0x000000F0
+#define SHIFT_MTX_MTX_STEP_REC      4
+#define REGNUM_MTX_MTX_STEP_REC     0x0000
+#define SIGNED_MTX_MTX_STEP_REC     0
+
+#define MASK_MTX_MTX_ARCH           0x00000800
+#define SHIFT_MTX_MTX_ARCH          11
+#define REGNUM_MTX_MTX_ARCH         0x0000
+#define SIGNED_MTX_MTX_ARCH         0
+
+#define MASK_MTX_MTX_TCAPS          0x0000F000
+#define SHIFT_MTX_MTX_TCAPS         12
+#define REGNUM_MTX_MTX_TCAPS        0x0000
+#define SIGNED_MTX_MTX_TCAPS        0
+
+#define MASK_MTX_MTX_MIN_REV        0x00FF0000
+#define SHIFT_MTX_MTX_MIN_REV       16
+#define REGNUM_MTX_MTX_MIN_REV      0x0000
+#define SIGNED_MTX_MTX_MIN_REV      0
+
+#define MASK_MTX_MTX_MAJ_REV        0xFF000000
+#define SHIFT_MTX_MTX_MAJ_REV       24
+#define REGNUM_MTX_MTX_MAJ_REV      0x0000
+#define SIGNED_MTX_MTX_MAJ_REV      0
+
+/* Register CR_MTX_STATUS */
+#define MTX_CR_MTX_STATUS           0x0008
+#define MASK_MTX_MTX_CF_C           0x00000001
+#define SHIFT_MTX_MTX_CF_C          0
+#define REGNUM_MTX_MTX_CF_C         0x0008
+#define SIGNED_MTX_MTX_CF_C         0
+
+#define MASK_MTX_MTX_CR_O           0x00000002
+#define SHIFT_MTX_MTX_CR_O          1
+#define REGNUM_MTX_MTX_CR_O         0x0008
+#define SIGNED_MTX_MTX_CR_O         0
+
+#define MASK_MTX_MTX_CF_N           0x00000004
+#define SHIFT_MTX_MTX_CF_N          2
+#define REGNUM_MTX_MTX_CF_N         0x0008
+#define SIGNED_MTX_MTX_CF_N         0
+
+#define MASK_MTX_MTX_CF_Z           0x00000008
+#define SHIFT_MTX_MTX_CF_Z          3
+#define REGNUM_MTX_MTX_CF_Z         0x0008
+#define SIGNED_MTX_MTX_CF_Z         0
+
+#define MASK_MTX_MTX_LSM_STEP       0x00000700
+#define SHIFT_MTX_MTX_LSM_STEP      8
+#define REGNUM_MTX_MTX_LSM_STEP     0x0008
+#define SIGNED_MTX_MTX_LSM_STEP     0
+
+#define MASK_MTX_MTX_HREASON        0x000C0000
+#define SHIFT_MTX_MTX_HREASON       18
+#define REGNUM_MTX_MTX_HREASON      0x0008
+#define SIGNED_MTX_MTX_HREASON      0
+
+/* Register CR_MTX_KICK */
+#define MTX_CR_MTX_KICK             0x0080
+#define MASK_MTX_MTX_KICK           0x0000FFFF
+#define SHIFT_MTX_MTX_KICK          0
+#define REGNUM_MTX_MTX_KICK         0x0080
+#define SIGNED_MTX_MTX_KICK         0
+
+/* Register CR_MTX_KICKI */
+#define MTX_CR_MTX_KICKI            0x0088
+#define MASK_MTX_MTX_KICKI          0x0000FFFF
+#define SHIFT_MTX_MTX_KICKI         0
+#define REGNUM_MTX_MTX_KICKI        0x0088
+#define SIGNED_MTX_MTX_KICKI        0
+
+/* Register CR_MTX_FAULT0 */
+#define MTX_CR_MTX_FAULT0           0x0090
+#define MASK_MTX_REQ_SB             0x000000FF
+#define SHIFT_MTX_REQ_SB            0
+#define REGNUM_MTX_REQ_SB           0x0090
+#define SIGNED_MTX_REQ_SB           0
+
+#define MASK_MTX_REQ_RN_W           0x00000100
+#define SHIFT_MTX_REQ_RN_W          8
+#define REGNUM_MTX_REQ_RN_W         0x0090
+#define SIGNED_MTX_REQ_RN_W         0
+
+#define MASK_MTX_REQ_STATE          0x00000C00
+#define SHIFT_MTX_REQ_STATE         10
+#define REGNUM_MTX_REQ_STATE        0x0090
+#define SIGNED_MTX_REQ_STATE        0
+
+#define MASK_MTX_REQ_LD_DEST        0x00FF0000
+#define SHIFT_MTX_REQ_LD_DEST       16
+#define REGNUM_MTX_REQ_LD_DEST      0x0090
+#define SIGNED_MTX_REQ_LD_DEST      0
+
+#define MASK_MTX_REQ_LD_REG         0xF8000000
+#define SHIFT_MTX_REQ_LD_REG        27
+#define REGNUM_MTX_REQ_LD_REG       0x0090
+#define SIGNED_MTX_REQ_LD_REG       0
+
+/* Register CR_MTX_REGISTER_READ_WRITE_DATA */
+#define MTX_CR_MTX_REGISTER_READ_WRITE_DATA 0x00F8
+/* Register CR_MTX_REGISTER_READ_WRITE_REQUEST */
+#define MTX_CR_MTX_REGISTER_READ_WRITE_REQUEST 0x00FC
+#define MASK_MTX_MTX_USPECIFIER     0x0000000F
+#define SHIFT_MTX_MTX_USPECIFIER    0
+#define REGNUM_MTX_MTX_USPECIFIER   0x00FC
+#define SIGNED_MTX_MTX_USPECIFIER   0
+
+#define MASK_MTX_MTX_RSPECIFIER     0x00000070
+#define SHIFT_MTX_MTX_RSPECIFIER    4
+#define REGNUM_MTX_MTX_RSPECIFIER   0x00FC
+#define SIGNED_MTX_MTX_RSPECIFIER   0
+
+#define MASK_MTX_MTX_RNW            0x00010000
+#define SHIFT_MTX_MTX_RNW           16
+#define REGNUM_MTX_MTX_RNW          0x00FC
+#define SIGNED_MTX_MTX_RNW          0
+
+#define MASK_MTX_MTX_DREADY         0x80000000
+#define SHIFT_MTX_MTX_DREADY        31
+#define REGNUM_MTX_MTX_DREADY       0x00FC
+#define SIGNED_MTX_MTX_DREADY       0
+
+/* Register CR_MTX_RAM_ACCESS_DATA_EXCHANGE */
+#define MTX_CR_MTX_RAM_ACCESS_DATA_EXCHANGE 0x0100
+/* Register CR_MTX_RAM_ACCESS_DATA_TRANSFER */
+#define MTX_CR_MTX_RAM_ACCESS_DATA_TRANSFER 0x0104
+/* Register CR_MTX_RAM_ACCESS_CONTROL */
+#define MTX_CR_MTX_RAM_ACCESS_CONTROL 0x0108
+#define MASK_MTX_MTX_MCMR           0x00000001
+#define SHIFT_MTX_MTX_MCMR          0
+#define REGNUM_MTX_MTX_MCMR         0x0108
+#define SIGNED_MTX_MTX_MCMR         0
+
+#define MASK_MTX_MTX_MCMAI          0x00000002
+#define SHIFT_MTX_MTX_MCMAI         1
+#define REGNUM_MTX_MTX_MCMAI        0x0108
+#define SIGNED_MTX_MTX_MCMAI        0
+
+#define MASK_MTX_MTX_MCM_ADDR       0x000FFFFC
+#define SHIFT_MTX_MTX_MCM_ADDR      2
+#define REGNUM_MTX_MTX_MCM_ADDR     0x0108
+#define SIGNED_MTX_MTX_MCM_ADDR     0
+
+#define MASK_MTX_MTX_MCMID          0x0FF00000
+#define SHIFT_MTX_MTX_MCMID         20
+#define REGNUM_MTX_MTX_MCMID        0x0108
+#define SIGNED_MTX_MTX_MCMID        0
+
+/* Register CR_MTX_RAM_ACCESS_STATUS */
+#define MTX_CR_MTX_RAM_ACCESS_STATUS 0x010C
+#define MASK_MTX_MTX_MTX_MCM_STAT   0x00000001
+#define SHIFT_MTX_MTX_MTX_MCM_STAT  0
+#define REGNUM_MTX_MTX_MTX_MCM_STAT 0x010C
+#define SIGNED_MTX_MTX_MTX_MCM_STAT 0
+
+/* Register CR_MTX_SOFT_RESET */
+#define MTX_CR_MTX_SOFT_RESET       0x0200
+#define MASK_MTX_MTX_RESET          0x00000001
+#define SHIFT_MTX_MTX_RESET         0
+#define REGNUM_MTX_MTX_RESET        0x0200
+#define SIGNED_MTX_MTX_RESET        0
+
+/* Register CR_MTX_SYSC_CDMAC */
+#define MTX_CR_MTX_SYSC_CDMAC       0x0340
+#define MASK_MTX_LENGTH             0x0000FFFF
+#define SHIFT_MTX_LENGTH            0
+#define REGNUM_MTX_LENGTH           0x0340
+#define SIGNED_MTX_LENGTH           0
+
+#define MASK_MTX_ENABLE             0x00010000
+#define SHIFT_MTX_ENABLE            16
+#define REGNUM_MTX_ENABLE           0x0340
+#define SIGNED_MTX_ENABLE           0
+
+#define MASK_MTX_RNW                0x00020000
+#define SHIFT_MTX_RNW               17
+#define REGNUM_MTX_RNW              0x0340
+#define SIGNED_MTX_RNW              0
+
+#define MASK_MTX_BURSTSIZE          0x07000000
+#define SHIFT_MTX_BURSTSIZE         24
+#define REGNUM_MTX_BURSTSIZE        0x0340
+#define SIGNED_MTX_BURSTSIZE        0
+
+/* Register CR_MTX_SYSC_CDMAA */
+#define MTX_CR_MTX_SYSC_CDMAA       0x0344
+#define MASK_MTX_CDMAA_ADDRESS      0x03FFFFFC
+#define SHIFT_MTX_CDMAA_ADDRESS     2
+#define REGNUM_MTX_CDMAA_ADDRESS    0x0344
+#define SIGNED_MTX_CDMAA_ADDRESS    0
+
+/* Register CR_MTX_SYSC_CDMAS0 */
+#define MTX_CR_MTX_SYSC_CDMAS0      0x0348
+#define MASK_MTX_DONOTHING          0x00000001
+#define SHIFT_MTX_DONOTHING         0
+#define REGNUM_MTX_DONOTHING        0x0348
+#define SIGNED_MTX_DONOTHING        0
+
+#define MASK_MTX_DMAREQUEST         0x00000010
+#define SHIFT_MTX_DMAREQUEST        4
+#define REGNUM_MTX_DMAREQUEST       0x0348
+#define SIGNED_MTX_DMAREQUEST       0
+
+#define MASK_MTX_RAMNUMBER          0x00000F00
+#define SHIFT_MTX_RAMNUMBER         8
+#define REGNUM_MTX_RAMNUMBER        0x0348
+#define SIGNED_MTX_RAMNUMBER        0
+
+#define MASK_MTX_COUNT              0xFFFF0000
+#define SHIFT_MTX_COUNT             16
+#define REGNUM_MTX_COUNT            0x0348
+#define SIGNED_MTX_COUNT            0
+
+/* Register CR_MTX_SYSC_CDMAS1 */
+#define MTX_CR_MTX_SYSC_CDMAS1      0x034C
+#define MASK_MTX_CDMAS1_ADDRESS     0x03FFFFFC
+#define SHIFT_MTX_CDMAS1_ADDRESS    2
+#define REGNUM_MTX_CDMAS1_ADDRESS   0x034C
+#define SIGNED_MTX_CDMAS1_ADDRESS   0
+
+/* Register CR_MTX_SYSC_CDMAT */
+#define MTX_CR_MTX_SYSC_CDMAT       0x0350
+#define MASK_MTX_TRANSFERDATA       0xFFFFFFFF
+#define SHIFT_MTX_TRANSFERDATA      0
+#define REGNUM_MTX_TRANSFERDATA     0x0350
+#define SIGNED_MTX_TRANSFERDATA     0
+
+/* Register TXTIMER */
+#define MTX_CR_MTX_TXTIMER                     0x00000010
+
+/* Register TIMER_DIV */
+#define MTX_CR_MTX_SYSC_TIMER_DIV      0x00000208
+#define MASK_MTX_TIMER_EN                      0x00010000
+#define MASK_MTX_TIMER_DIV                     0x00000FFF
+
+/*
+       Byte range covering the group MTX_CORE file
+*/
+
+#define MTX_MTX_CORE_REGISTERS_START           0x00000000
+#define MTX_MTX_CORE_REGISTERS_END             0x00000353
+
+/*
+       Byte range covering the whole register file
+*/
+
+#define MTX_REGISTERS_START            0x00000000
+#define MTX_REGISTERS_END              0x00000353
+#define MTX_REG_DEFAULT_TABLE struct {\
+                       uint16 uRegOffset;\
+                       uint32 uRegDefault;\
+                       uint32 uRegMask;\
+                       osa_bool bReadonly;\
+                       const osa_char* pszName;\
+               } MTX_Defaults[] = {\
+       {0x0000, 0x00000000, 0xFFFFF8F7, 0, "CR_MTX_ENABLE" } ,\
+       {0x0008, 0x00000000, 0x000C070F, 0, "CR_MTX_STATUS" } ,\
+       {0x0080, 0x00000000, 0x0000FFFF, 0, "CR_MTX_KICK" } ,\
+       {0x0088, 0x00000000, 0x0000FFFF, 0, "CR_MTX_KICKI" } ,\
+       {0x0090, 0x00000000, 0xF8FF0DFF, 0, "CR_MTX_FAULT0" } ,\
+       {0x00F8, 0x00000000, 0x00000000, 0, "CR_MTX_REGISTER_READ_WRITE_DATA" } ,\
+       {0x00FC, 0x00000000, 0x8001007F, 0, "CR_MTX_REGISTER_READ_WRITE_REQUEST" } ,\
+       {0x0100, 0x00000000, 0x00000000, 0, "CR_MTX_RAM_ACCESS_DATA_EXCHANGE" } ,\
+       {0x0104, 0x00000000, 0x00000000, 0, "CR_MTX_RAM_ACCESS_DATA_TRANSFER" } ,\
+       {0x0108, 0x00000000, 0x0FFFFFFF, 0, "CR_MTX_RAM_ACCESS_CONTROL" } ,\
+       {0x010C, 0x00000000, 0x00000001, 0, "CR_MTX_RAM_ACCESS_STATUS" } ,\
+       {0x0200, 0x00000000, 0x00000001, 0, "CR_MTX_SOFT_RESET" } ,\
+       {0x0340, 0x00000000, 0x0703FFFF, 0, "CR_MTX_SYSC_CDMAC" } ,\
+       {0x0344, 0x00000000, 0x03FFFFFC, 0, "CR_MTX_SYSC_CDMAA" } ,\
+       {0x0348, 0x00000001, 0xFFFF0F11, 1, "CR_MTX_SYSC_CDMAS0" } ,\
+       {0x034C, 0x00000000, 0x03FFFFFC, 1, "CR_MTX_SYSC_CDMAS1" } ,\
+       {0x0350, 0x00000000, 0xFFFFFFFF, 0, "CR_MTX_SYSC_CDMAT" } ,\
+{ 0 }}
+
+#define MTX_REGS_INIT(uBase) \
+       { \
+               uint32 n;\
+               MTX_REG_DEFAULT_TABLE;\
+               for (n = 0; n < sizeof(MTX_Defaults)/ sizeof(MTX_Defaults[0] ) -1; n++)\
+               {\
+                       RegWriteNoTrap(MTX_Defaults[n].uRegOffset + uBase, MTX_Defaults[n].uRegDefault); \
+               }\
+       }
+#endif
diff --git a/driver/encoder/reg_headers/topaz_coreext_regs.h b/driver/encoder/reg_headers/topaz_coreext_regs.h
new file mode 100644 (file)
index 0000000..26b9079
--- /dev/null
@@ -0,0 +1,614 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _REGCONV_H_topazhp_coreext_regs_h
+#define _REGCONV_H_topazhp_coreext_regs_h
+
+/* Register CR_SCALER_INPUT_SIZE */
+#define TOPAZHP_EXT_CR_SCALER_INPUT_SIZE 0x0000
+#define MASK_TOPAZHP_EXT_CR_SCALER_INPUT_WIDTH_MIN1 0x00000FFF
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_INPUT_WIDTH_MIN1 0
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_INPUT_WIDTH_MIN1 0x0000
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_INPUT_WIDTH_MIN1 0
+
+#define MASK_TOPAZHP_EXT_CR_SCALER_INPUT_HEIGHT_MIN1 0x0FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_INPUT_HEIGHT_MIN1 16
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_INPUT_HEIGHT_MIN1 0x0000
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_INPUT_HEIGHT_MIN1 0
+
+/* Register CR_SCALER_PITCH */
+#define TOPAZHP_EXT_CR_SCALER_PITCH 0x0004
+#define MASK_TOPAZHP_EXT_CR_SCALER_INPUT_HOR_PITCH 0x00007FFF
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_INPUT_HOR_PITCH 0
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_INPUT_HOR_PITCH 0x0004
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_INPUT_HOR_PITCH 0
+
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_BILINEAR_FILTER 0x00008000
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_BILINEAR_FILTER 15
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_BILINEAR_FILTER 0x0004
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_HOR_BILINEAR_FILTER 0
+
+#define MASK_TOPAZHP_EXT_CR_SCALER_INPUT_VER_PITCH 0x7FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_INPUT_VER_PITCH 16
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_INPUT_VER_PITCH 0x0004
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_INPUT_VER_PITCH 0
+
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_BILINEAR_FILTER 0x80000000
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_BILINEAR_FILTER 31
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_BILINEAR_FILTER 0x0004
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_VER_BILINEAR_FILTER 0
+
+/* Register CR_SCALER_CROP */
+#define TOPAZHP_EXT_CR_SCALER_CROP  0x0008
+#define MASK_TOPAZHP_EXT_CR_SCALER_INPUT_CROP_VER 0x000000FF
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_INPUT_CROP_VER 0
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_INPUT_CROP_VER 0x0008
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_INPUT_CROP_VER 0
+
+#define MASK_TOPAZHP_EXT_CR_SCALER_INPUT_CROP_HOR 0x0000FF00
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_INPUT_CROP_HOR 8
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_INPUT_CROP_HOR 0x0008
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_INPUT_CROP_HOR 0
+
+/* Register CR_SCALER_VER_LUMA_COEFFS_0 */
+#define TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFFS_0 0x0010
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_00(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_00(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_00(i) 0x0010
+
+/* Register CR_SCALER_VER_LUMA_COEFFS_1 */
+#define TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFFS_1 0x0014
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_01(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_01(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_01(i) 0x0014
+
+/* Register CR_SCALER_VER_LUMA_COEFFS_2 */
+#define TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFFS_2 0x0018
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_02(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_02(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_02(i) 0x0018
+
+/* Register CR_SCALER_VER_LUMA_COEFFS_3 */
+#define TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFFS_3 0x001C
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_03(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_03(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF_03(i) 0x001C
+
+/* Register CR_SCALER_VER_CHROMA_COEFFS_0 */
+#define TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFFS_0 0x0020
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_00(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_00(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_00(i) 0x0020
+
+/* Register CR_SCALER_VER_CHROMA_COEFFS_1 */
+#define TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFFS_1 0x0024
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_01(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_01(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_01(i) 0x0024
+
+/* Register CR_SCALER_VER_CHROMA_COEFFS_2 */
+#define TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFFS_2 0x0028
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_02(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_02(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_02(i) 0x0028
+
+/* Register CR_SCALER_VER_CHROMA_COEFFS_3 */
+#define TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFFS_3 0x002C
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_03(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_03(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF_03(i) 0x002C
+
+/* Register CR_SCALER_HOR_LUMA_COEFFS_0 */
+#define TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFFS_0 0x0030
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_00(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_00(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_00(i) 0x0030
+
+/* Register CR_SCALER_HOR_LUMA_COEFFS_1 */
+#define TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFFS_1 0x0034
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_01(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_01(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_01(i) 0x0034
+
+/* Register CR_SCALER_HOR_LUMA_COEFFS_2 */
+#define TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFFS_2 0x0038
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_02(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_02(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_02(i) 0x0038
+
+/* Register CR_SCALER_HOR_LUMA_COEFFS_3 */
+#define TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFFS_3 0x003C
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_03(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_03(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF_03(i) 0x003C
+
+/* Register CR_SCALER_HOR_CHROMA_COEFFS_0 */
+#define TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFFS_0 0x0040
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_00(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_00(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_00(i) 0x0040
+
+/* Register CR_SCALER_HOR_CHROMA_COEFFS_1 */
+#define TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFFS_1 0x0044
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_01(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_01(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_01(i) 0x0044
+
+/* Register CR_SCALER_HOR_CHROMA_COEFFS_2 */
+#define TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFFS_2 0x0048
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_02(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_02(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_02(i) 0x0048
+
+/* Register CR_SCALER_HOR_CHROMA_COEFFS_3 */
+#define TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFFS_3 0x004C
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_03(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_03(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF_03(i) 0x004C
+
+/* Register CR_SCALER_MEM_BURST_REQ_CRC */
+#define TOPAZHP_EXT_CR_SCALER_MEM_BURST_REQ_CRC 0x0050
+#define MASK_TOPAZHP_EXT_CR_SCALER_MEM_BURST_REQ_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_MEM_BURST_REQ_CRC 0
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_MEM_BURST_REQ_CRC 0x0050
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_MEM_BURST_REQ_CRC 0
+
+/* Register CR_SCALER_MEM_READ_DATA_CRC */
+#define TOPAZHP_EXT_CR_SCALER_MEM_READ_DATA_CRC 0x0054
+#define MASK_TOPAZHP_EXT_CR_SCALER_MEM_READ_DATA_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_MEM_READ_DATA_CRC 0
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_MEM_READ_DATA_CRC 0x0054
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_MEM_READ_DATA_CRC 0
+
+/* Register CR_CURRENT_MB_DATA_CRC */
+#define TOPAZHP_EXT_CR_CURRENT_MB_DATA_CRC 0x0058
+#define MASK_TOPAZHP_EXT_CR_CURRENT_MB_DATA_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_EXT_CR_CURRENT_MB_DATA_CRC 0
+#define REGNUM_TOPAZHP_EXT_CR_CURRENT_MB_DATA_CRC 0x0058
+#define SIGNED_TOPAZHP_EXT_CR_CURRENT_MB_DATA_CRC 0
+
+/* Register CR_HOR_BIFILTER_DATA_CRC */
+#define TOPAZHP_EXT_CR_HOR_BIFILTER_DATA_CRC 0x005C
+#define MASK_TOPAZHP_EXT_CR_HOR_BIFILTER_DATA_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_EXT_CR_HOR_BIFILTER_DATA_CRC 0
+#define REGNUM_TOPAZHP_EXT_CR_HOR_BIFILTER_DATA_CRC 0x005C
+#define SIGNED_TOPAZHP_EXT_CR_HOR_BIFILTER_DATA_CRC 0
+
+/* Register CR_EXT_TOPAZHP_CRC_CLEAR */
+#define TOPAZHP_EXT_CR_EXT_TOPAZHP_CRC_CLEAR 0x0060
+#define MASK_TOPAZHP_EXT_CR_SCALER_CRC_CLEAR 0x00000001
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_CRC_CLEAR 0
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_CRC_CLEAR 0x0060
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_CRC_CLEAR 0
+
+/* Register CR_SCALER_CONTROL */
+#define TOPAZHP_EXT_CR_SCALER_CONTROL 0x0064
+#define MASK_TOPAZHP_EXT_CR_SCALER_ENABLE 0x00000001
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_ENABLE 0
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_ENABLE 0x0064
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_ENABLE 0
+
+#define MASK_TOPAZHP_EXT_CR_ENABLE_COLOUR_SPACE_CONVERSION 0x00000002
+#define SHIFT_TOPAZHP_EXT_CR_ENABLE_COLOUR_SPACE_CONVERSION 1
+#define REGNUM_TOPAZHP_EXT_CR_ENABLE_COLOUR_SPACE_CONVERSION 0x0064
+#define SIGNED_TOPAZHP_EXT_CR_ENABLE_COLOUR_SPACE_CONVERSION 0
+
+/* Register CR_INPUT_SCALER_CONTROL */
+#define TOPAZHP_EXT_CR_INPUT_SCALER_CONTROL 0x0068
+#define MASK_TOPAZHP_EXT_CR_ENCODE_CHROMA_FORMAT 0x00000003
+#define SHIFT_TOPAZHP_EXT_CR_ENCODE_CHROMA_FORMAT 0
+#define REGNUM_TOPAZHP_EXT_CR_ENCODE_CHROMA_FORMAT 0x0068
+#define SIGNED_TOPAZHP_EXT_CR_ENCODE_CHROMA_FORMAT 0
+
+#define MASK_TOPAZHP_EXT_CR_ENCODE_BIT_DEPTH 0x00000100
+#define SHIFT_TOPAZHP_EXT_CR_ENCODE_BIT_DEPTH 8
+#define REGNUM_TOPAZHP_EXT_CR_ENCODE_BIT_DEPTH 0x0068
+#define SIGNED_TOPAZHP_EXT_CR_ENCODE_BIT_DEPTH 0
+
+#define MASK_TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT 0x007F0000
+#define SHIFT_TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT 16
+#define REGNUM_TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT 0x0068
+#define SIGNED_TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT 0
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444IL4XBCA8            0x0000007E              /* 4:4:4, Any 3 colour space components plus reserved byte (e.g.
+ RGB), 8-bit components, packed 32-bit per pixel in a single plane, 8 LSBits not used */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444IL4ABCX8            0x0000007C              /* 4:4:4, Any 3 colour space components plus reserved byte (e.g.
+ RGB), 8-bit components, packed 32-bit per pixel in a single plane, 8 MSBits not used */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444IL3ABC10            0x00000075              /* 4:4:4, Any 3 colour space components (e.g. RGB), 10-bit components,
+ packed 32-bit per pixel in a single plane */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444IL3RGB565           0x00000070              /* RGB with 5 bits for R, 6 bits for G and 5 bits for B */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL12YCBCR16         0x0000006C              /* 4:4:4, Y in 1 plane, CbCr interleaved in 2nd plane, 16-bit
+ components (only 10 MSBits used) */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL12YCRCB10         0x0000006B              /* 4:4:4, Y in 1 plane, CrCb interleaved in 2nd plane, 10-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL12YCRCB8          0x0000006A              /* 4:4:4, Y in 1 plane, CrCb interleaved in 2nd plane, 8-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL12YCBCR10         0x00000069              /* 4:4:4, Y in 1 plane, CbCr interleaved in 2nd plane, 10-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL12YCBCR8          0x00000068              /* 4:4:4, Y in 1 plane, CbCr interleaved in 2nd plane, 8-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL111YCBCR16                0x00000064              /* 4:4:4, Y Cb Cr in 3 separate planes, 16-bit components
+ (could also be ABC, but colour space conversion is not supported by input scaler) */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL111YCBCR10                0x00000061              /* 4:4:4, Y Cb Cr in 3 separate planes, 10-bit components
+ (could also be ABC, but colour space conversion is not supported by input scaler) */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL111YCBCR8         0x00000060              /* 4:4:4, Y Cb Cr in 3 separate planes, 8-bit components
+ (could also be ABC, but colour space conversion is not supported by input scaler) */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422IL3CRYCBY8          0x00000056              /* 4:2:2, CrYCbY interleaved in a single plane, 8-bit components
+ */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422IL3CBYCRY8          0x00000054              /* 4:2:2, CbYCrY interleaved in a single plane, 8-bit components
+ */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422IL3YCRYCB8          0x00000052              /* 4:2:2, YCrYCb interleaved in a single plane, 8-bit components
+ */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422IL3YCBYCR8          0x00000050              /* 4:2:2, YCbYCr interleaved in a single plane, 8-bit components
+ */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL12YCBCR16         0x0000004C              /* 4:2:2, Y in 1 plane, CbCr interleaved in 2nd plane, 16-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL12YCRCB10         0x0000004B              /* 4:2:2, Y in 1 plane, CrCb interleaved in 2nd plane, 10-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL12YCRCB8          0x0000004A              /* 4:2:2, Y in 1 plane, CrCb interleaved in 2nd plane, 8-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL12YCBCR10         0x00000049              /* 4:2:2, Y in 1 plane, CbCr interleaved in 2nd plane, 10-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL12YCBCR8          0x00000048              /* 4:2:2, Y in 1 plane, CbCr interleaved in 2nd plane, 8-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL111YCBCR10                0x00000041              /* 4:2:2, Y Cb Cr in 3 separate planes, 10-bit components
+ */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL111YCBCR8         0x00000040              /* 4:2:2, Y Cb Cr in 3 separate planes, 8-bit components
+ */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL12YCBCR16         0x0000002C              /* 4:2:0, Y in 1 plane, CbCr interleaved in 2nd plane, 16-bit
+ components (only 10 MSBits used) */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL12YCRCB10         0x0000002B              /* 4:2:0, Y in 1 plane, CrCb interleaved in 2nd plane, 10-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL12YCRCB8          0x0000002A              /* 4:2:0, Y in 1 plane, CrCb interleaved in 2nd plane, 8-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL12YCBCR10         0x00000029              /* 4:2:0, Y in 1 plane, CbCr interleaved in 2nd plane, 10-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL12YCBCR8          0x00000028              /* 4:2:0, Y in 1 plane, CbCr interleaved in 2nd plane, 8-bit
+ components */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL111YCBCR10                0x00000021              /* 4:2:0, Y Cb Cr in 3 separate planes, 10-bit components
+ */
+#define TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL111YCBCR8         0x00000020              /* 4:2:0, Y Cb Cr in 3 separate planes, 8-bit components
+ */
+
+/* Register CR_CSC_SOURCE_MOD_Y_0 */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_Y_0 0x006C
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_00 0x00000003
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_00 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_00 0x006C
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_00 0
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_00_MINUS_1_2             0x00000003              /* Subtract 1/2 maximum value from unsigned pixel component */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_00_MINUS_1_16            0x00000002              /* Subtract 1/16th maximum value from unsigned pixel component */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_00_SIGNED                0x00000001              /* Source pixel component is signed */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_00_UNSIGNED              0x00000000              /* Source pixel component is unsigned */
+
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_00 0x0FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_00 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_00 0x006C
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_00 1
+
+/* Register CR_CSC_SOURCE_CB_CR_0 */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_CB_CR_0 0x0070
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_00 0x00000FFF
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_00 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_00 0x0070
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_00 1
+
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_00 0x0FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_00 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_00 0x0070
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_00 1
+
+/* Register CR_CSC_SOURCE_MOD_Y_1 */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_Y_1 0x0074
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_01 0x00000003
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_01 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_01 0x0074
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_01 0
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_01_MINUS_1_2             0x00000003              /* Subtract 1/2 maximum value from unsigned pixel component */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_01_MINUS_1_16            0x00000002              /* Subtract 1/16th maximum value from unsigned pixel component */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_01_SIGNED                0x00000001              /* Source pixel component is signed */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_01_UNSIGNED              0x00000000              /* Source pixel component is unsigned */
+
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_01 0x0FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_01 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_01 0x0074
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_01 1
+
+/* Register CR_CSC_SOURCE_CB_CR_1 */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_CB_CR_1 0x0078
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_01 0x00000FFF
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_01 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_01 0x0078
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_01 1
+
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_01 0x0FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_01 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_01 0x0078
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_01 1
+
+/* Register CR_CSC_SOURCE_MOD_Y_2 */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_Y_2 0x007C
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_02 0x00000003
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_02 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_02 0x007C
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_MOD_02 0
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_02_MINUS_1_2             0x00000003              /* Subtract 1/2 maximum value from unsigned pixel component */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_02_MINUS_1_16            0x00000002              /* Subtract 1/16th maximum value from unsigned pixel component */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_02_SIGNED                0x00000001              /* Source pixel component is signed */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_02_UNSIGNED              0x00000000              /* Source pixel component is unsigned */
+
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_02 0x0FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_02 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_02 0x007C
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y_02 1
+
+/* Register CR_CSC_SOURCE_CB_CR_2 */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_CB_CR_2 0x0080
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_02 0x00000FFF
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_02 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_02 0x0080
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB_02 1
+
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_02 0x0FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_02 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_02 0x0080
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR_02 1
+
+/* Register CR_CSC_OUTPUT_COEFF_0 */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_COEFF_0 0x0084
+#define MASK_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP_00 0x000003FF
+#define SHIFT_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP_00 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP_00 0x0084
+#define SIGNED_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP_00 0
+
+#define MASK_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP_00 0x03FF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP_00 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP_00 0x0084
+#define SIGNED_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP_00 0
+
+#define MASK_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_00 0x30000000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_00 28
+#define REGNUM_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_00 0x0084
+#define SIGNED_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_00 0
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_00_ADD_1_2               0x00000003              /* Add 1/2 maximum value prior to applying unsigned clamping */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_00_ADD_1_16              0x00000002              /* Add 1/16th maximum value prior to applying unsigned clamping */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_00_SIGNED                0x00000001              /* Reserved */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_00_UNSIGNED              0x00000000              /* Output pixel clamping applied as unsigned */
+
+/* Register CR_CSC_OUTPUT_COEFF_1 */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_COEFF_1 0x0088
+#define MASK_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP_01 0x000003FF
+#define SHIFT_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP_01 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP_01 0x0088
+#define SIGNED_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP_01 0
+
+#define MASK_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP_01 0x03FF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP_01 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP_01 0x0088
+#define SIGNED_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP_01 0
+
+#define MASK_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_01 0x30000000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_01 28
+#define REGNUM_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_01 0x0088
+#define SIGNED_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_01 0
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_01_ADD_1_2               0x00000003              /* Add 1/2 maximum value prior to applying unsigned clamping */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_01_ADD_1_16              0x00000002              /* Add 1/16th maximum value prior to applying unsigned clamping */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_01_SIGNED                0x00000001              /* Reserved */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_01_UNSIGNED              0x00000000              /* Output pixel clamping applied as unsigned */
+
+/* Register CR_INPUT_SCALER_CRC_CLEAR */
+#define TOPAZHP_EXT_CR_INPUT_SCALER_CRC_CLEAR 0x008C
+#define MASK_TOPAZHP_EXT_CR_INPUT_SCALER_CRC_CLEAR 0x00000001
+#define SHIFT_TOPAZHP_EXT_CR_INPUT_SCALER_CRC_CLEAR 0
+#define REGNUM_TOPAZHP_EXT_CR_INPUT_SCALER_CRC_CLEAR 0x008C
+#define SIGNED_TOPAZHP_EXT_CR_INPUT_SCALER_CRC_CLEAR 0
+
+/* Register CR_SCALER_CSC_DATA_CRC */
+#define TOPAZHP_EXT_CR_SCALER_CSC_DATA_CRC 0x0090
+#define MASK_TOPAZHP_EXT_CR_SCALER_CSC_DATA_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_CSC_DATA_CRC 0
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_CSC_DATA_CRC 0x0090
+#define SIGNED_TOPAZHP_EXT_CR_SCALER_CSC_DATA_CRC 0
+
+
+/* Table CR_SCALER_VER_LUMA_COEFFS */
+
+/* Register CR_SCALER_VER_LUMA_COEFFS */
+#define TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFFS(X) (0x0010 + (4 * (X)))
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFF(X,i) (0x0010 + (4 * (X)))
+
+/* Number of entries in table CR_SCALER_VER_LUMA_COEFFS */
+
+#define TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFFS_SIZE_UINT32 4
+#define TOPAZHP_EXT_CR_SCALER_VER_LUMA_COEFFS_NUM_ENTRIES 4
+
+
+/* Table CR_SCALER_VER_CHROMA_COEFFS */
+
+/* Register CR_SCALER_VER_CHROMA_COEFFS */
+#define TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFFS(X) (0x0020 + (4 * (X)))
+#define MASK_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFF(X,i) (0x0020 + (4 * (X)))
+
+/* Number of entries in table CR_SCALER_VER_CHROMA_COEFFS */
+
+#define TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFFS_SIZE_UINT32 4
+#define TOPAZHP_EXT_CR_SCALER_VER_CHROMA_COEFFS_NUM_ENTRIES 4
+
+
+/* Table CR_SCALER_HOR_LUMA_COEFFS */
+
+/* Register CR_SCALER_HOR_LUMA_COEFFS */
+#define TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFFS(X) (0x0030 + (4 * (X)))
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFF(X,i) (0x0030 + (4 * (X)))
+
+/* Number of entries in table CR_SCALER_HOR_LUMA_COEFFS */
+
+#define TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFFS_SIZE_UINT32 4
+#define TOPAZHP_EXT_CR_SCALER_HOR_LUMA_COEFFS_NUM_ENTRIES 4
+
+
+/* Table CR_SCALER_HOR_CHROMA_COEFFS */
+
+/* Register CR_SCALER_HOR_CHROMA_COEFFS */
+#define TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFFS(X) (0x0040 + (4 * (X)))
+#define MASK_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFF(X,i) (0x0040 + (4 * (X)))
+
+/* Number of entries in table CR_SCALER_HOR_CHROMA_COEFFS */
+
+#define TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFFS_SIZE_UINT32 4
+#define TOPAZHP_EXT_CR_SCALER_HOR_CHROMA_COEFFS_NUM_ENTRIES 4
+
+
+/* Table CR_CSC_SOURCE_COEFF_TABLE */
+
+/* Register CR_CSC_SOURCE_MOD_Y */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_Y(X) (0x006C + (8 * (X)))
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_MOD 0x00000003
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_MOD 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_MOD 0x006C
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_MOD 0
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_MINUS_1_2                0x00000003              /* Subtract 1/2 maximum value from unsigned pixel component */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_MINUS_1_16               0x00000002              /* Subtract 1/16th maximum value from unsigned pixel component */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_SIGNED           0x00000001              /* Source pixel component is signed */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_MOD_UNSIGNED         0x00000000              /* Source pixel component is unsigned */
+
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y 0x0FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y 0x006C
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y 1
+
+/* Register CR_CSC_SOURCE_CB_CR */
+#define TOPAZHP_EXT_CR_CSC_SOURCE_CB_CR(X) (0x0070 + (8 * (X)))
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB 0x00000FFF
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB 0x0070
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB 1
+
+#define MASK_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR 0x0FFF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR 0x0070
+#define SIGNED_TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR 1
+
+/* Number of entries in table CR_CSC_SOURCE_COEFF_TABLE */
+
+#define TOPAZHP_EXT_CR_CSC_SOURCE_COEFF_TABLE_SIZE_UINT32 6
+#define TOPAZHP_EXT_CR_CSC_SOURCE_COEFF_TABLE_NUM_ENTRIES 3
+
+
+/* Table CR_CSC_OUTPUT_COEFF_TABLE */
+
+/* Register CR_CSC_OUTPUT_COEFF */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_COEFF(X) (0x0084 + (4 * (X)))
+#define MASK_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP 0x000003FF
+#define SHIFT_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP 0
+#define REGNUM_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP 0x0084
+#define SIGNED_TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP 0
+
+#define MASK_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP 0x03FF0000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP 16
+#define REGNUM_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP 0x0084
+#define SIGNED_TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP 0
+
+#define MASK_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD 0x30000000
+#define SHIFT_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD 28
+#define REGNUM_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD 0x0084
+#define SIGNED_TOPAZHP_EXT_CR_CSC_OUTPUT_MOD 0
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_ADD_1_2          0x00000003              /* Add 1/2 maximum value prior to applying unsigned clamping */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_ADD_1_16         0x00000002              /* Add 1/16th maximum value prior to applying unsigned clamping */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_SIGNED           0x00000001              /* Reserved */
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_UNSIGNED         0x00000000              /* Output pixel clamping applied as unsigned */
+
+/* Number of entries in table CR_CSC_OUTPUT_COEFF_TABLE */
+
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_COEFF_TABLE_SIZE_UINT32 2
+#define TOPAZHP_EXT_CR_CSC_OUTPUT_COEFF_TABLE_NUM_ENTRIES 2
+
+/*
+       Byte range covering the group TOPAZHP_COREEXT file
+*/
+
+#define TOPAZHP_EXT_TOPAZHP_COREEXT_REGISTERS_START            0x00000000
+#define TOPAZHP_EXT_TOPAZHP_COREEXT_REGISTERS_END              0x00000093
+
+/*
+       Byte range covering the whole register file
+*/
+
+#define TOPAZHP_EXT_REGISTERS_START            0x00000000
+#define TOPAZHP_EXT_REGISTERS_END              0x00000093
+#define TOPAZHP_EXT_REG_DEFAULT_TABLE struct {\
+                       IMG_UINT16 uRegOffset;\
+                       IMG_UINT32 uRegDefault;\
+                       IMG_UINT32 uRegMask;\
+                       bool bReadonly;\
+                       const char* pszName;\
+               } TOPAZHP_EXT_Defaults[] = {\
+       {0x0000, 0x00000000, 0x0FFF0FFF, 0, "CR_SCALER_INPUT_SIZE" } ,\
+       {0x0004, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_PITCH" } ,\
+       {0x0008, 0x00000000, 0x0000FFFF, 0, "CR_SCALER_CROP" } ,\
+       {0x0010, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_VER_LUMA_COEFFS_0" } ,\
+       {0x0014, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_VER_LUMA_COEFFS_1" } ,\
+       {0x0018, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_VER_LUMA_COEFFS_2" } ,\
+       {0x001C, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_VER_LUMA_COEFFS_3" } ,\
+       {0x0020, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_VER_CHROMA_COEFFS_0" } ,\
+       {0x0024, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_VER_CHROMA_COEFFS_1" } ,\
+       {0x0028, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_VER_CHROMA_COEFFS_2" } ,\
+       {0x002C, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_VER_CHROMA_COEFFS_3" } ,\
+       {0x0030, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_HOR_LUMA_COEFFS_0" } ,\
+       {0x0034, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_HOR_LUMA_COEFFS_1" } ,\
+       {0x0038, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_HOR_LUMA_COEFFS_2" } ,\
+       {0x003C, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_HOR_LUMA_COEFFS_3" } ,\
+       {0x0040, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_HOR_CHROMA_COEFFS_0" } ,\
+       {0x0044, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_HOR_CHROMA_COEFFS_1" } ,\
+       {0x0048, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_HOR_CHROMA_COEFFS_2" } ,\
+       {0x004C, 0x00000000, 0xFFFFFFFF, 0, "CR_SCALER_HOR_CHROMA_COEFFS_3" } ,\
+       {0x0050, 0x00000000, 0xFFFFFFFF, 1, "CR_SCALER_MEM_BURST_REQ_CRC" } ,\
+       {0x0054, 0x00000000, 0xFFFFFFFF, 1, "CR_SCALER_MEM_READ_DATA_CRC" } ,\
+       {0x0058, 0x00000000, 0xFFFFFFFF, 1, "CR_CURRENT_MB_DATA_CRC" } ,\
+       {0x005C, 0x00000000, 0xFFFFFFFF, 1, "CR_HOR_BIFILTER_DATA_CRC" } ,\
+       {0x0060, 0x00000000, 0x00000001, 0, "CR_EXT_TOPAZHP_CRC_CLEAR" } ,\
+       {0x0064, 0x00000000, 0x00000003, 0, "CR_SCALER_CONTROL" } ,\
+       {0x0068, 0x00200000, 0x007F0103, 0, "CR_INPUT_SCALER_CONTROL" } ,\
+       {0x006C, 0x00000000, 0x0FFF0003, 0, "CR_CSC_SOURCE_MOD_Y_0" } ,\
+       {0x0070, 0x00000000, 0x0FFF0FFF, 0, "CR_CSC_SOURCE_CB_CR_0" } ,\
+       {0x0074, 0x00000000, 0x0FFF0003, 0, "CR_CSC_SOURCE_MOD_Y_1" } ,\
+       {0x0078, 0x00000000, 0x0FFF0FFF, 0, "CR_CSC_SOURCE_CB_CR_1" } ,\
+       {0x007C, 0x00000000, 0x0FFF0003, 0, "CR_CSC_SOURCE_MOD_Y_2" } ,\
+       {0x0080, 0x00000000, 0x0FFF0FFF, 0, "CR_CSC_SOURCE_CB_CR_2" } ,\
+       {0x0084, 0x03FF0000, 0x33FF03FF, 0, "CR_CSC_OUTPUT_COEFF_0" } ,\
+       {0x0088, 0x03FF0000, 0x33FF03FF, 0, "CR_CSC_OUTPUT_COEFF_1" } ,\
+       {0x008C, 0x00000000, 0x00000001, 0, "CR_INPUT_SCALER_CRC_CLEAR" } ,\
+       {0x0090, 0x00000000, 0xFFFFFFFF, 1, "CR_SCALER_CSC_DATA_CRC" } ,\
+{ 0 }}
+
+#define TOPAZHP_EXT_REGS_INIT(uBase) \
+       { \
+               int n;\
+               TOPAZHP_EXT_REG_DEFAULT_TABLE;\
+               for (n = 0; n < sizeof(TOPAZHP_EXT_Defaults)/ sizeof(TOPAZHP_EXT_Defaults[0] ) -1; n++)\
+               {\
+                       RegWriteNoTrap(TOPAZHP_EXT_Defaults[n].uRegOffset + uBase, TOPAZHP_EXT_Defaults[n].uRegDefault); \
+               }\
+       }
+#endif
diff --git a/driver/encoder/reg_headers/topaz_db_regs.h b/driver/encoder/reg_headers/topaz_db_regs.h
new file mode 100644 (file)
index 0000000..28f8bfe
--- /dev/null
@@ -0,0 +1,204 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _REGCONV_H_topaz_db_regs_h
+#define _REGCONV_H_topaz_db_regs_h
+
+/* Register CR_DB_ALPHA_BETA_OFFSET */
+#define TOPAZ_DB_CR_DB_ALPHA_BETA_OFFSET 0x0004
+#define MASK_TOPAZ_DB_CR_H264_ALPHA_OFFSET 0x0000001F
+#define SHIFT_TOPAZ_DB_CR_H264_ALPHA_OFFSET 0
+#define REGNUM_TOPAZ_DB_CR_H264_ALPHA_OFFSET 0x0004
+#define SIGNED_TOPAZ_DB_CR_H264_ALPHA_OFFSET 0
+
+#define MASK_TOPAZ_DB_CR_H264_BETA_OFFSET 0x000003E0
+#define SHIFT_TOPAZ_DB_CR_H264_BETA_OFFSET 5
+#define REGNUM_TOPAZ_DB_CR_H264_BETA_OFFSET 0x0004
+#define SIGNED_TOPAZ_DB_CR_H264_BETA_OFFSET 0
+
+/* Register CR_DB_BUF_STATE */
+#define TOPAZ_DB_CR_DB_BUF_STATE    0x0008
+#define MASK_TOPAZ_DB_CR_BUSY       0x08000000
+#define SHIFT_TOPAZ_DB_CR_BUSY      27
+#define REGNUM_TOPAZ_DB_CR_BUSY     0x0008
+#define SIGNED_TOPAZ_DB_CR_BUSY     0
+
+/* Register CR_DB_CMD_FIFO_SIG */
+#define TOPAZ_DB_CR_DB_CMD_FIFO_SIG 0x000C
+#define MASK_TOPAZ_DB_CR_CMD_IN_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_DB_CR_CMD_IN_SIGNATURE 0
+#define REGNUM_TOPAZ_DB_CR_CMD_IN_SIGNATURE 0x000C
+#define SIGNED_TOPAZ_DB_CR_CMD_IN_SIGNATURE 0
+
+/* Register CR_DB_INPUT_SIG */
+#define TOPAZ_DB_CR_DB_INPUT_SIG    0x0010
+#define MASK_TOPAZ_DB_CR_DATA_IN_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_DB_CR_DATA_IN_SIGNATURE 0
+#define REGNUM_TOPAZ_DB_CR_DATA_IN_SIGNATURE 0x0010
+#define SIGNED_TOPAZ_DB_CR_DATA_IN_SIGNATURE 0
+
+/* Register CR_DB_OUTPUT_SIG */
+#define TOPAZ_DB_CR_DB_OUTPUT_SIG   0x0014
+#define MASK_TOPAZ_DB_CR_DATA_OUT_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_DB_CR_DATA_OUT_SIGNATURE 0
+#define REGNUM_TOPAZ_DB_CR_DATA_OUT_SIGNATURE 0x0014
+#define SIGNED_TOPAZ_DB_CR_DATA_OUT_SIGNATURE 0
+
+/* Register CR_DB_DIAG */
+#define TOPAZ_DB_CR_DB_DIAG         0x0018
+#define MASK_TOPAZ_DB_CR_DIAG       0xFFFFFFFF
+#define SHIFT_TOPAZ_DB_CR_DIAG      0
+#define REGNUM_TOPAZ_DB_CR_DIAG     0x0018
+#define SIGNED_TOPAZ_DB_CR_DIAG     0
+
+/* Register CR_DB_SIG_ADDR */
+#define TOPAZ_DB_CR_DB_SIG_ADDR     0x001C
+#define MASK_TOPAZ_DB_CR_ADDR_OUT_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_DB_CR_ADDR_OUT_SIGNATURE 0
+#define REGNUM_TOPAZ_DB_CR_ADDR_OUT_SIGNATURE 0x001C
+#define SIGNED_TOPAZ_DB_CR_ADDR_OUT_SIGNATURE 0
+
+/* Register CR_DB_START */
+#define TOPAZ_DB_CR_DB_START        0x0020
+#define MASK_TOPAZ_DB_CR_START      0x00000001
+#define SHIFT_TOPAZ_DB_CR_START     0
+#define REGNUM_TOPAZ_DB_CR_START    0x0020
+#define SIGNED_TOPAZ_DB_CR_START    0
+
+#define MASK_TOPAZ_DB_CR_FLUSH      0x00000002
+#define SHIFT_TOPAZ_DB_CR_FLUSH     1
+#define REGNUM_TOPAZ_DB_CR_FLUSH    0x0020
+#define SIGNED_TOPAZ_DB_CR_FLUSH    0
+
+/* Register CR_DB_RESET */
+#define TOPAZ_DB_CR_DB_RESET        0x0024
+#define MASK_TOPAZ_DB_CR_RESET      0x00000001
+#define SHIFT_TOPAZ_DB_CR_RESET     0
+#define REGNUM_TOPAZ_DB_CR_RESET    0x0024
+#define SIGNED_TOPAZ_DB_CR_RESET    0
+
+/* Register CR_DB_DISABLE_DEBLOCK_IDC */
+#define TOPAZ_DB_CR_DB_DISABLE_DEBLOCK_IDC 0x002C
+#define MASK_TOPAZ_DB_CR_DISABLE_DEBLOCK_IDC 0x00000003
+#define SHIFT_TOPAZ_DB_CR_DISABLE_DEBLOCK_IDC 0
+#define REGNUM_TOPAZ_DB_CR_DISABLE_DEBLOCK_IDC 0x002C
+#define SIGNED_TOPAZ_DB_CR_DISABLE_DEBLOCK_IDC 0
+
+#define MASK_TOPAZ_DB_CR_DISABLE_FILTER_SLICETOP 0x00000004
+#define SHIFT_TOPAZ_DB_CR_DISABLE_FILTER_SLICETOP 2
+#define REGNUM_TOPAZ_DB_CR_DISABLE_FILTER_SLICETOP 0x002C
+#define SIGNED_TOPAZ_DB_CR_DISABLE_FILTER_SLICETOP 0
+
+/* Register CR_DB_STATUS */
+#define TOPAZ_DB_CR_DB_STATUS       0x0030
+#define MASK_TOPAZ_DB_CR_V_PLANE_DONE 0x00000001
+#define SHIFT_TOPAZ_DB_CR_V_PLANE_DONE 0
+#define REGNUM_TOPAZ_DB_CR_V_PLANE_DONE 0x0030
+#define SIGNED_TOPAZ_DB_CR_V_PLANE_DONE 0
+
+#define MASK_TOPAZ_DB_CR_U_PLANE_DONE 0x00000002
+#define SHIFT_TOPAZ_DB_CR_U_PLANE_DONE 1
+#define REGNUM_TOPAZ_DB_CR_U_PLANE_DONE 0x0030
+#define SIGNED_TOPAZ_DB_CR_U_PLANE_DONE 0
+
+#define MASK_TOPAZ_DB_CR_Y_PLANE_DONE 0x00000004
+#define SHIFT_TOPAZ_DB_CR_Y_PLANE_DONE 2
+#define REGNUM_TOPAZ_DB_CR_Y_PLANE_DONE 0x0030
+#define SIGNED_TOPAZ_DB_CR_Y_PLANE_DONE 0
+
+#define MASK_TOPAZ_DB_CR_MODULE_BUSY 0x00000008
+#define SHIFT_TOPAZ_DB_CR_MODULE_BUSY 3
+#define REGNUM_TOPAZ_DB_CR_MODULE_BUSY 0x0030
+#define SIGNED_TOPAZ_DB_CR_MODULE_BUSY 0
+
+/* Register CR_DB_PERFORMANCE_0 */
+#define TOPAZ_DB_CR_DB_PERFORMANCE_0 0x0034
+#define MASK_TOPAZ_DB_CR_WORST_MB_CYCLES 0x0000FFFF
+#define SHIFT_TOPAZ_DB_CR_WORST_MB_CYCLES 0
+#define REGNUM_TOPAZ_DB_CR_WORST_MB_CYCLES 0x0034
+#define SIGNED_TOPAZ_DB_CR_WORST_MB_CYCLES 0
+
+#define MASK_TOPAZ_DB_CR_WORST_MB_TYPE 0x00030000
+#define SHIFT_TOPAZ_DB_CR_WORST_MB_TYPE 16
+#define REGNUM_TOPAZ_DB_CR_WORST_MB_TYPE 0x0034
+#define SIGNED_TOPAZ_DB_CR_WORST_MB_TYPE 0
+
+/* Register CR_DB_PERFORMANCE_1 */
+#define TOPAZ_DB_CR_DB_PERFORMANCE_1 0x0038
+#define MASK_TOPAZ_DB_CR_WORST_MB_NUMBER 0x003FFFFF
+#define SHIFT_TOPAZ_DB_CR_WORST_MB_NUMBER 0
+#define REGNUM_TOPAZ_DB_CR_WORST_MB_NUMBER 0x0038
+#define SIGNED_TOPAZ_DB_CR_WORST_MB_NUMBER 0
+
+/* Register CR_DB_PERFORMANCE_RESET */
+#define TOPAZ_DB_CR_DB_PERFORMANCE_RESET 0x003C
+#define MASK_TOPAZ_DB_CR_WORST_MB_RESET 0x00000001
+#define SHIFT_TOPAZ_DB_CR_WORST_MB_RESET 0
+#define REGNUM_TOPAZ_DB_CR_WORST_MB_RESET 0x003C
+#define SIGNED_TOPAZ_DB_CR_WORST_MB_RESET 0
+
+#define MASK_TOPAZ_DB_CR_DISABLE_COUNTERS 0x00000002
+#define SHIFT_TOPAZ_DB_CR_DISABLE_COUNTERS 1
+#define REGNUM_TOPAZ_DB_CR_DISABLE_COUNTERS 0x003C
+#define SIGNED_TOPAZ_DB_CR_DISABLE_COUNTERS 0
+
+/*
+       Byte range covering the group TOPAZHP_DB file
+*/
+
+#define TOPAZ_DB_TOPAZHP_DB_REGISTERS_START            0x00000004
+#define TOPAZ_DB_TOPAZHP_DB_REGISTERS_END              0x0000003F
+
+/*
+       Byte range covering the whole register file
+*/
+
+#define TOPAZ_DB_REGISTERS_START               0x00000004
+#define TOPAZ_DB_REGISTERS_END                 0x0000003F
+#define TOPAZ_DB_REG_DEFAULT_TABLE struct {\
+                       IMG_UINT16 uRegOffset;\
+                       IMG_UINT32 uRegDefault;\
+                       IMG_UINT32 uRegMask;\
+                       bool bReadonly;\
+                       const char* pszName;\
+               } TOPAZ_DB_Defaults[] = {\
+       {0x0004, 0x00000000, 0x000003FF, 0, "CR_DB_ALPHA_BETA_OFFSET" } ,\
+       {0x0008, 0x00000000, 0x08000000, 1, "CR_DB_BUF_STATE" } ,\
+       {0x000C, 0x00000000, 0xFFFFFFFF, 1, "CR_DB_CMD_FIFO_SIG" } ,\
+       {0x0010, 0x00000000, 0xFFFFFFFF, 1, "CR_DB_INPUT_SIG" } ,\
+       {0x0014, 0x00000000, 0xFFFFFFFF, 1, "CR_DB_OUTPUT_SIG" } ,\
+       {0x0018, 0x11000000, 0xFFFFFFFF, 1, "CR_DB_DIAG" } ,\
+       {0x001C, 0x00000000, 0xFFFFFFFF, 1, "CR_DB_SIG_ADDR" } ,\
+       {0x0020, 0x00000000, 0x00000003, 0, "CR_DB_START" } ,\
+       {0x0024, 0x00000000, 0x00000001, 0, "CR_DB_RESET" } ,\
+       {0x002C, 0x00000000, 0x00000007, 0, "CR_DB_DISABLE_DEBLOCK_IDC" } ,\
+       {0x0030, 0x00000000, 0x0000000F, 1, "CR_DB_STATUS" } ,\
+       {0x0034, 0x00000000, 0x0003FFFF, 1, "CR_DB_PERFORMANCE_0" } ,\
+       {0x0038, 0x00000000, 0x003FFFFF, 1, "CR_DB_PERFORMANCE_1" } ,\
+       {0x003C, 0x00000000, 0x00000003, 0, "CR_DB_PERFORMANCE_RESET" } ,\
+{ 0 }}
+
+#define TOPAZ_DB_REGS_INIT(uBase) \
+       { \
+               int n;\
+               TOPAZ_DB_REG_DEFAULT_TABLE;\
+               for (n = 0; n < sizeof(TOPAZ_DB_Defaults)/ sizeof(TOPAZ_DB_Defaults[0] ) -1; n++)\
+               {\
+                       RegWriteNoTrap(TOPAZ_DB_Defaults[n].uRegOffset + uBase, TOPAZ_DB_Defaults[n].uRegDefault); \
+               }\
+       }
+#endif
diff --git a/driver/encoder/reg_headers/topaz_vlc_regs.h b/driver/encoder/reg_headers/topaz_vlc_regs.h
new file mode 100644 (file)
index 0000000..a6d323e
--- /dev/null
@@ -0,0 +1,523 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _REGCONV_H_topaz_vlc_regs_h
+#define _REGCONV_H_topaz_vlc_regs_h
+
+/* Register CR_VLC_CONTROL */
+#define TOPAZ_VLC_CR_VLC_CONTROL    0x0000
+#define MASK_TOPAZ_VLC_CR_CODEC     0x00000003
+#define SHIFT_TOPAZ_VLC_CR_CODEC    0
+#define REGNUM_TOPAZ_VLC_CR_CODEC   0x0000
+#define SIGNED_TOPAZ_VLC_CR_CODEC   0
+
+#define MASK_TOPAZ_VLC_CR_SLICE_CODING_TYPE 0x0000000C
+#define SHIFT_TOPAZ_VLC_CR_SLICE_CODING_TYPE 2
+#define REGNUM_TOPAZ_VLC_CR_SLICE_CODING_TYPE 0x0000
+#define SIGNED_TOPAZ_VLC_CR_SLICE_CODING_TYPE 0
+
+#define MASK_TOPAZ_VLC_CR_START     0x00000010
+#define SHIFT_TOPAZ_VLC_CR_START    4
+#define REGNUM_TOPAZ_VLC_CR_START   0x0000
+#define SIGNED_TOPAZ_VLC_CR_START   0
+
+#define MASK_TOPAZ_VLC_CR_FLUSH     0x00000020
+#define SHIFT_TOPAZ_VLC_CR_FLUSH    5
+#define REGNUM_TOPAZ_VLC_CR_FLUSH   0x0000
+#define SIGNED_TOPAZ_VLC_CR_FLUSH   0
+
+#define MASK_TOPAZ_VLC_CR_FORCE_SKIP 0x00000040
+#define SHIFT_TOPAZ_VLC_CR_FORCE_SKIP 6
+#define REGNUM_TOPAZ_VLC_CR_FORCE_SKIP 0x0000
+#define SIGNED_TOPAZ_VLC_CR_FORCE_SKIP 0
+
+#define MASK_TOPAZ_VLC_CR_DISABLE_SKIP 0x00000080
+#define SHIFT_TOPAZ_VLC_CR_DISABLE_SKIP 7
+#define REGNUM_TOPAZ_VLC_CR_DISABLE_SKIP 0x0000
+#define SIGNED_TOPAZ_VLC_CR_DISABLE_SKIP 0
+
+#define MASK_TOPAZ_VLC_CR_CABAC_ENABLE 0x00000100
+#define SHIFT_TOPAZ_VLC_CR_CABAC_ENABLE 8
+#define REGNUM_TOPAZ_VLC_CR_CABAC_ENABLE 0x0000
+#define SIGNED_TOPAZ_VLC_CR_CABAC_ENABLE 0
+
+#define MASK_TOPAZ_VLC_CR_VLC_FIELD_CODED 0x00000200
+#define SHIFT_TOPAZ_VLC_CR_VLC_FIELD_CODED 9
+#define REGNUM_TOPAZ_VLC_CR_VLC_FIELD_CODED 0x0000
+#define SIGNED_TOPAZ_VLC_CR_VLC_FIELD_CODED 0
+
+#define MASK_TOPAZ_VLC_CR_VLC_8X8_TRANSFORM 0x00000400
+#define SHIFT_TOPAZ_VLC_CR_VLC_8X8_TRANSFORM 10
+#define REGNUM_TOPAZ_VLC_CR_VLC_8X8_TRANSFORM 0x0000
+#define SIGNED_TOPAZ_VLC_CR_VLC_8X8_TRANSFORM 0
+
+#define MASK_TOPAZ_VLC_CR_VLC_CONSTRAINED_INTRA 0x00000800
+#define SHIFT_TOPAZ_VLC_CR_VLC_CONSTRAINED_INTRA 11
+#define REGNUM_TOPAZ_VLC_CR_VLC_CONSTRAINED_INTRA 0x0000
+#define SIGNED_TOPAZ_VLC_CR_VLC_CONSTRAINED_INTRA 0
+
+#define MASK_TOPAZ_VLC_CR_VLC_SPATIAL_DIRECT 0x00001000
+#define SHIFT_TOPAZ_VLC_CR_VLC_SPATIAL_DIRECT 12
+#define REGNUM_TOPAZ_VLC_CR_VLC_SPATIAL_DIRECT 0x0000
+#define SIGNED_TOPAZ_VLC_CR_VLC_SPATIAL_DIRECT 0
+
+#define MASK_TOPAZ_VLC_CR_VLC_P_REF_IDX 0x00002000
+#define SHIFT_TOPAZ_VLC_CR_VLC_P_REF_IDX 13
+#define REGNUM_TOPAZ_VLC_CR_VLC_P_REF_IDX 0x0000
+#define SIGNED_TOPAZ_VLC_CR_VLC_P_REF_IDX 0
+
+#define MASK_TOPAZ_VLC_CR_DISCARD_CODED_DATA 0x00004000
+#define SHIFT_TOPAZ_VLC_CR_DISCARD_CODED_DATA 14
+#define REGNUM_TOPAZ_VLC_CR_DISCARD_CODED_DATA 0x0000
+#define SIGNED_TOPAZ_VLC_CR_DISCARD_CODED_DATA 0
+
+#define MASK_TOPAZ_VLC_CR_FIELD_SELECT 0x00008000
+#define SHIFT_TOPAZ_VLC_CR_FIELD_SELECT 15
+#define REGNUM_TOPAZ_VLC_CR_FIELD_SELECT 0x0000
+#define SIGNED_TOPAZ_VLC_CR_FIELD_SELECT 0
+
+#define MASK_TOPAZ_VLC_CR_CODEC_EXTEND 0x10000000
+#define SHIFT_TOPAZ_VLC_CR_CODEC_EXTEND 28
+#define REGNUM_TOPAZ_VLC_CR_CODEC_EXTEND 0x0000
+#define SIGNED_TOPAZ_VLC_CR_CODEC_EXTEND 0
+
+/* Register CR_VLC_STATUS */
+#define TOPAZ_VLC_CR_VLC_STATUS     0x0004
+#define MASK_TOPAZ_VLC_CR_BUSY      0x00000001
+#define SHIFT_TOPAZ_VLC_CR_BUSY     0
+#define REGNUM_TOPAZ_VLC_CR_BUSY    0x0004
+#define SIGNED_TOPAZ_VLC_CR_BUSY    0
+
+#define MASK_TOPAZ_VLC_CR_RECODE_AS_IPCM 0x00000004
+#define SHIFT_TOPAZ_VLC_CR_RECODE_AS_IPCM 2
+#define REGNUM_TOPAZ_VLC_CR_RECODE_AS_IPCM 0x0004
+#define SIGNED_TOPAZ_VLC_CR_RECODE_AS_IPCM 0
+
+/* Register CR_VLC_INFO_0 */
+#define TOPAZ_VLC_CR_VLC_INFO_0     0x0008
+#define MASK_TOPAZ_VLC_CR_FLUSH_STUFFING_BYTES 0x0003E000
+#define SHIFT_TOPAZ_VLC_CR_FLUSH_STUFFING_BYTES 13
+#define REGNUM_TOPAZ_VLC_CR_FLUSH_STUFFING_BYTES 0x0008
+#define SIGNED_TOPAZ_VLC_CR_FLUSH_STUFFING_BYTES 0
+
+/* Register CR_VLC_INFO_1 */
+#define TOPAZ_VLC_CR_VLC_INFO_1     0x000C
+#define MASK_TOPAZ_VLC_CR_SKIPPED_MBS_IN_FRAME 0x0000FFFF
+#define SHIFT_TOPAZ_VLC_CR_SKIPPED_MBS_IN_FRAME 0
+#define REGNUM_TOPAZ_VLC_CR_SKIPPED_MBS_IN_FRAME 0x000C
+#define SIGNED_TOPAZ_VLC_CR_SKIPPED_MBS_IN_FRAME 0
+
+#define MASK_TOPAZ_VLC_CR_CODED_MBS_IN_FRAME 0xFFFF0000
+#define SHIFT_TOPAZ_VLC_CR_CODED_MBS_IN_FRAME 16
+#define REGNUM_TOPAZ_VLC_CR_CODED_MBS_IN_FRAME 0x000C
+#define SIGNED_TOPAZ_VLC_CR_CODED_MBS_IN_FRAME 0
+
+/* Register CR_VLC_INFO_2 */
+#define TOPAZ_VLC_CR_VLC_INFO_2     0x0010
+#define MASK_TOPAZ_VLC_CR_INTRA_MBS_IN_FRAME 0x0000FFFF
+#define SHIFT_TOPAZ_VLC_CR_INTRA_MBS_IN_FRAME 0
+#define REGNUM_TOPAZ_VLC_CR_INTRA_MBS_IN_FRAME 0x0010
+#define SIGNED_TOPAZ_VLC_CR_INTRA_MBS_IN_FRAME 0
+
+#define MASK_TOPAZ_VLC_CR_INTER_MBS_IN_FRAME 0xFFFF0000
+#define SHIFT_TOPAZ_VLC_CR_INTER_MBS_IN_FRAME 16
+#define REGNUM_TOPAZ_VLC_CR_INTER_MBS_IN_FRAME 0x0010
+#define SIGNED_TOPAZ_VLC_CR_INTER_MBS_IN_FRAME 0
+
+/* Register CR_VLC_STUFF_HEAD_CTRL */
+#define TOPAZ_VLC_CR_VLC_STUFF_HEAD_CTRL 0x0014
+#define MASK_TOPAZ_VLC_CR_HEADER_ELEMENTS 0x0000001F
+#define SHIFT_TOPAZ_VLC_CR_HEADER_ELEMENTS 0
+#define REGNUM_TOPAZ_VLC_CR_HEADER_ELEMENTS 0x0014
+#define SIGNED_TOPAZ_VLC_CR_HEADER_ELEMENTS 0
+
+#define MASK_TOPAZ_VLC_CR_STUFFING_WORDS 0x00003FE0
+#define SHIFT_TOPAZ_VLC_CR_STUFFING_WORDS 5
+#define REGNUM_TOPAZ_VLC_CR_STUFFING_WORDS 0x0014
+#define SIGNED_TOPAZ_VLC_CR_STUFFING_WORDS 0
+
+#define MASK_TOPAZ_VLC_CR_CLEAR_HEADER_FIFO 0x80000000
+#define SHIFT_TOPAZ_VLC_CR_CLEAR_HEADER_FIFO 31
+#define REGNUM_TOPAZ_VLC_CR_CLEAR_HEADER_FIFO 0x0014
+#define SIGNED_TOPAZ_VLC_CR_CLEAR_HEADER_FIFO 0
+
+/* Register CR_VLC_HEADER_FIFO */
+#define TOPAZ_VLC_CR_VLC_HEADER_FIFO 0x0018
+#define MASK_TOPAZ_VLC_CR_HEADER_DATA 0xFFFFFFFF
+#define SHIFT_TOPAZ_VLC_CR_HEADER_DATA 0
+#define REGNUM_TOPAZ_VLC_CR_HEADER_DATA 0x0018
+#define SIGNED_TOPAZ_VLC_CR_HEADER_DATA 0
+
+/* Register CR_VLC_HEADER_CTRL */
+#define TOPAZ_VLC_CR_VLC_HEADER_CTRL 0x001C
+#define MASK_TOPAZ_VLC_CR_HEADER_PREFIX 0x7FFFFFFF
+#define SHIFT_TOPAZ_VLC_CR_HEADER_PREFIX 0
+#define REGNUM_TOPAZ_VLC_CR_HEADER_PREFIX 0x001C
+#define SIGNED_TOPAZ_VLC_CR_HEADER_PREFIX 0
+
+#define MASK_TOPAZ_VLC_CR_DISABLE_PREFIX_DETECTION 0x80000000
+#define SHIFT_TOPAZ_VLC_CR_DISABLE_PREFIX_DETECTION 31
+#define REGNUM_TOPAZ_VLC_CR_DISABLE_PREFIX_DETECTION 0x001C
+#define SIGNED_TOPAZ_VLC_CR_DISABLE_PREFIX_DETECTION 0
+
+/* Register CR_VLC_HEADER_STATUS */
+#define TOPAZ_VLC_CR_VLC_HEADER_STATUS 0x0020
+#define MASK_TOPAZ_VLC_CR_HEADER_FIFO_FULL 0x00000001
+#define SHIFT_TOPAZ_VLC_CR_HEADER_FIFO_FULL 0
+#define REGNUM_TOPAZ_VLC_CR_HEADER_FIFO_FULL 0x0020
+#define SIGNED_TOPAZ_VLC_CR_HEADER_FIFO_FULL 0
+
+/* Register CR_VLC_RATE_CTRL_MB_TYPE */
+#define TOPAZ_VLC_CR_VLC_RATE_CTRL_MB_TYPE 0x0024
+#define MASK_TOPAZ_VLC_CR_MB_CODING_TYPE_P 0x000000FF
+#define SHIFT_TOPAZ_VLC_CR_MB_CODING_TYPE_P 0
+#define REGNUM_TOPAZ_VLC_CR_MB_CODING_TYPE_P 0x0024
+#define SIGNED_TOPAZ_VLC_CR_MB_CODING_TYPE_P 0
+
+#define MASK_TOPAZ_VLC_CR_MB_CODING_TYPE_I 0x0000FF00
+#define SHIFT_TOPAZ_VLC_CR_MB_CODING_TYPE_I 8
+#define REGNUM_TOPAZ_VLC_CR_MB_CODING_TYPE_I 0x0024
+#define SIGNED_TOPAZ_VLC_CR_MB_CODING_TYPE_I 0
+
+#define MASK_TOPAZ_VLC_CR_MB_CODING_TYPE_B 0x00FF0000
+#define SHIFT_TOPAZ_VLC_CR_MB_CODING_TYPE_B 16
+#define REGNUM_TOPAZ_VLC_CR_MB_CODING_TYPE_B 0x0024
+#define SIGNED_TOPAZ_VLC_CR_MB_CODING_TYPE_B 0
+
+#define MASK_TOPAZ_VLC_CR_MB_CODING_TYPE_SKIP 0xFF000000
+#define SHIFT_TOPAZ_VLC_CR_MB_CODING_TYPE_SKIP 24
+#define REGNUM_TOPAZ_VLC_CR_MB_CODING_TYPE_SKIP 0x0024
+#define SIGNED_TOPAZ_VLC_CR_MB_CODING_TYPE_SKIP 0
+
+/* Register CR_VLC_RATE_CTRL_DCBITS */
+#define TOPAZ_VLC_CR_VLC_RATE_CTRL_DCBITS 0x0028
+#define MASK_TOPAZ_VLC_CR_DC_BITS   0x0000FFFF
+#define SHIFT_TOPAZ_VLC_CR_DC_BITS  0
+#define REGNUM_TOPAZ_VLC_CR_DC_BITS 0x0028
+#define SIGNED_TOPAZ_VLC_CR_DC_BITS 0
+
+#define MASK_TOPAZ_VLC_CR_MB_CODING_IPCM 0xFF000000
+#define SHIFT_TOPAZ_VLC_CR_MB_CODING_IPCM 24
+#define REGNUM_TOPAZ_VLC_CR_MB_CODING_IPCM 0x0028
+#define SIGNED_TOPAZ_VLC_CR_MB_CODING_IPCM 0
+
+/* Register CR_VLC_RATE_CTRL_MVBITS */
+#define TOPAZ_VLC_CR_VLC_RATE_CTRL_MVBITS 0x002C
+#define MASK_TOPAZ_VLC_CR_MV_BITS   0x00FFFFFF
+#define SHIFT_TOPAZ_VLC_CR_MV_BITS  0
+#define REGNUM_TOPAZ_VLC_CR_MV_BITS 0x002C
+#define SIGNED_TOPAZ_VLC_CR_MV_BITS 0
+
+/* Register CR_VLC_RATE_CTRL_MBSYM */
+#define TOPAZ_VLC_CR_VLC_RATE_CTRL_MBSYM 0x0030
+#define MASK_TOPAZ_VLC_CR_MB_SYMBOLS_BITS 0x00FFFFFF
+#define SHIFT_TOPAZ_VLC_CR_MB_SYMBOLS_BITS 0
+#define REGNUM_TOPAZ_VLC_CR_MB_SYMBOLS_BITS 0x0030
+#define SIGNED_TOPAZ_VLC_CR_MB_SYMBOLS_BITS 0
+
+/* Register CR_VLC_RATE_CTRL_MBRES */
+#define TOPAZ_VLC_CR_VLC_RATE_CTRL_MBRES 0x0034
+#define MASK_TOPAZ_VLC_CR_MB_RESIDUAL_BITS 0x00FFFFFF
+#define SHIFT_TOPAZ_VLC_CR_MB_RESIDUAL_BITS 0
+#define REGNUM_TOPAZ_VLC_CR_MB_RESIDUAL_BITS 0x0034
+#define SIGNED_TOPAZ_VLC_CR_MB_RESIDUAL_BITS 0
+
+/* Register CR_VLC_SIGNATURE_0 */
+#define TOPAZ_VLC_CR_VLC_SIGNATURE_0 0x0038
+#define MASK_TOPAZ_VLC_CR_MB_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_VLC_CR_MB_SIGNATURE 0
+#define REGNUM_TOPAZ_VLC_CR_MB_SIGNATURE 0x0038
+#define SIGNED_TOPAZ_VLC_CR_MB_SIGNATURE 0
+
+/* Register CR_VLC_SIGNATURE_1 */
+#define TOPAZ_VLC_CR_VLC_SIGNATURE_1 0x003C
+#define MASK_TOPAZ_VLC_CR_BLK_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_VLC_CR_BLK_SIGNATURE 0
+#define REGNUM_TOPAZ_VLC_CR_BLK_SIGNATURE 0x003C
+#define SIGNED_TOPAZ_VLC_CR_BLK_SIGNATURE 0
+
+/* Register CR_VLC_SIGNATURE_2 */
+#define TOPAZ_VLC_CR_VLC_SIGNATURE_2 0x0040
+#define MASK_TOPAZ_VLC_CR_LOOKUP_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_VLC_CR_LOOKUP_SIGNATURE 0
+#define REGNUM_TOPAZ_VLC_CR_LOOKUP_SIGNATURE 0x0040
+#define SIGNED_TOPAZ_VLC_CR_LOOKUP_SIGNATURE 0
+
+/* Register CR_VLC_SIGNATURE_3 */
+#define TOPAZ_VLC_CR_VLC_SIGNATURE_3 0x0044
+#define MASK_TOPAZ_VLC_CR_BITSTREAM_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_VLC_CR_BITSTREAM_SIGNATURE 0
+#define REGNUM_TOPAZ_VLC_CR_BITSTREAM_SIGNATURE 0x0044
+#define SIGNED_TOPAZ_VLC_CR_BITSTREAM_SIGNATURE 0
+
+/* Register CR_VLC_SIGNATURE_4 */
+#define TOPAZ_VLC_CR_VLC_SIGNATURE_4 0x0048
+#define MASK_TOPAZ_VLC_CR_HEADER_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_VLC_CR_HEADER_SIGNATURE 0
+#define REGNUM_TOPAZ_VLC_CR_HEADER_SIGNATURE 0x0048
+#define SIGNED_TOPAZ_VLC_CR_HEADER_SIGNATURE 0
+
+/* Register CR_VLC_PERFORMANCE_0 */
+#define TOPAZ_VLC_CR_VLC_PERFORMANCE_0 0x0050
+#define MASK_TOPAZ_VLC_CR_WORST_MB_CYCLES 0x0000FFFF
+#define SHIFT_TOPAZ_VLC_CR_WORST_MB_CYCLES 0
+#define REGNUM_TOPAZ_VLC_CR_WORST_MB_CYCLES 0x0050
+#define SIGNED_TOPAZ_VLC_CR_WORST_MB_CYCLES 0
+
+#define MASK_TOPAZ_VLC_CR_WORST_MB_TYPE 0x00030000
+#define SHIFT_TOPAZ_VLC_CR_WORST_MB_TYPE 16
+#define REGNUM_TOPAZ_VLC_CR_WORST_MB_TYPE 0x0050
+#define SIGNED_TOPAZ_VLC_CR_WORST_MB_TYPE 0
+
+#define MASK_TOPAZ_VLC_CR_WORST_MB_IPCM 0x00040000
+#define SHIFT_TOPAZ_VLC_CR_WORST_MB_IPCM 18
+#define REGNUM_TOPAZ_VLC_CR_WORST_MB_IPCM 0x0050
+#define SIGNED_TOPAZ_VLC_CR_WORST_MB_IPCM 0
+
+/* Register CR_VLC_PERFORMANCE_1 */
+#define TOPAZ_VLC_CR_VLC_PERFORMANCE_1 0x0054
+#define MASK_TOPAZ_VLC_CR_WORST_MB_NUM 0x003FFFFF
+#define SHIFT_TOPAZ_VLC_CR_WORST_MB_NUM 0
+#define REGNUM_TOPAZ_VLC_CR_WORST_MB_NUM 0x0054
+#define SIGNED_TOPAZ_VLC_CR_WORST_MB_NUM 0
+
+/* Register CR_VLC_PERFORMANCE_2 */
+#define TOPAZ_VLC_CR_VLC_PERFORMANCE_2 0x0058
+#define MASK_TOPAZ_VLC_CR_WORST_MB_RESET 0x00000001
+#define SHIFT_TOPAZ_VLC_CR_WORST_MB_RESET 0
+#define REGNUM_TOPAZ_VLC_CR_WORST_MB_RESET 0x0058
+#define SIGNED_TOPAZ_VLC_CR_WORST_MB_RESET 0
+
+#define MASK_TOPAZ_VLC_CR_DISABLE_COUNTERS 0x00000002
+#define SHIFT_TOPAZ_VLC_CR_DISABLE_COUNTERS 1
+#define REGNUM_TOPAZ_VLC_CR_DISABLE_COUNTERS 0x0058
+#define SIGNED_TOPAZ_VLC_CR_DISABLE_COUNTERS 0
+
+/* Register CR_VLC_IPCM_0 */
+#define TOPAZ_VLC_CR_VLC_IPCM_0     0x005C
+#define MASK_TOPAZ_VLC_CR_CABAC_DB_MARGIN 0x03FF0000
+#define SHIFT_TOPAZ_VLC_CR_CABAC_DB_MARGIN 16
+#define REGNUM_TOPAZ_VLC_CR_CABAC_DB_MARGIN 0x005C
+#define SIGNED_TOPAZ_VLC_CR_CABAC_DB_MARGIN 0
+
+#define MASK_TOPAZ_VLC_CR_CABAC_BIN_FLEX 0x00001FFF
+#define SHIFT_TOPAZ_VLC_CR_CABAC_BIN_FLEX 0
+#define REGNUM_TOPAZ_VLC_CR_CABAC_BIN_FLEX 0x005C
+#define SIGNED_TOPAZ_VLC_CR_CABAC_BIN_FLEX 0
+
+/* Register CR_VLC_IPCM_1 */
+#define TOPAZ_VLC_CR_VLC_IPCM_1     0x0060
+#define MASK_TOPAZ_VLC_CR_IPCM_THRESHOLD 0x00000FFF
+#define SHIFT_TOPAZ_VLC_CR_IPCM_THRESHOLD 0
+#define REGNUM_TOPAZ_VLC_CR_IPCM_THRESHOLD 0x0060
+#define SIGNED_TOPAZ_VLC_CR_IPCM_THRESHOLD 0
+
+#define MASK_TOPAZ_VLC_CR_CABAC_BIN_LIMIT 0x1FFF0000
+#define SHIFT_TOPAZ_VLC_CR_CABAC_BIN_LIMIT 16
+#define REGNUM_TOPAZ_VLC_CR_CABAC_BIN_LIMIT 0x0060
+#define SIGNED_TOPAZ_VLC_CR_CABAC_BIN_LIMIT 0
+
+/* Register CR_VLC_MPEG4_CFG */
+#define TOPAZ_VLC_CR_VLC_MPEG4_CFG  0x0064
+#define MASK_TOPAZ_VLC_CR_RSIZE     0x00000007
+#define SHIFT_TOPAZ_VLC_CR_RSIZE    0
+#define REGNUM_TOPAZ_VLC_CR_RSIZE   0x0064
+#define SIGNED_TOPAZ_VLC_CR_RSIZE   0
+
+/* Register CR_VLC_MB_PARAMS */
+#define TOPAZ_VLC_CR_VLC_MB_PARAMS  0x0068
+#define MASK_TOPAZ_VLC_CR_QP        0x0000003F
+#define SHIFT_TOPAZ_VLC_CR_QP       0
+#define REGNUM_TOPAZ_VLC_CR_QP      0x0068
+#define SIGNED_TOPAZ_VLC_CR_QP      0
+
+#define MASK_TOPAZ_VLC_CR_QP_CB     0x003F0000
+#define SHIFT_TOPAZ_VLC_CR_QP_CB    16
+#define REGNUM_TOPAZ_VLC_CR_QP_CB   0x0068
+#define SIGNED_TOPAZ_VLC_CR_QP_CB   0
+
+#define MASK_TOPAZ_VLC_CR_QP_CR     0x3F000000
+#define SHIFT_TOPAZ_VLC_CR_QP_CR    24
+#define REGNUM_TOPAZ_VLC_CR_QP_CR   0x0068
+#define SIGNED_TOPAZ_VLC_CR_QP_CR   0
+
+/* Register CR_VLC_RESET */
+#define TOPAZ_VLC_CR_VLC_RESET      0x006C
+#define MASK_TOPAZ_VLC_CR_RESET     0x00000001
+#define SHIFT_TOPAZ_VLC_CR_RESET    0
+#define REGNUM_TOPAZ_VLC_CR_RESET   0x006C
+#define SIGNED_TOPAZ_VLC_CR_RESET   0
+
+/* Register CR_VLC_WRITE_ADDR */
+#define TOPAZ_VLC_CR_VLC_WRITE_ADDR 0x0070
+#define MASK_TOPAZ_VLC_CR_NEXT_WRITE_ADDR 0xFFFFFFF0
+#define SHIFT_TOPAZ_VLC_CR_NEXT_WRITE_ADDR 4
+#define REGNUM_TOPAZ_VLC_CR_NEXT_WRITE_ADDR 0x0070
+#define SIGNED_TOPAZ_VLC_CR_NEXT_WRITE_ADDR 0
+
+/* Register CR_VLC_CHROMA_QP_OFFSET */
+#define TOPAZ_VLC_CR_VLC_CHROMA_QP_OFFSET 0x0074
+#define MASK_TOPAZ_VLC_CR_QPCB_OFFSET 0x0000001F
+#define SHIFT_TOPAZ_VLC_CR_QPCB_OFFSET 0
+#define REGNUM_TOPAZ_VLC_CR_QPCB_OFFSET 0x0074
+#define SIGNED_TOPAZ_VLC_CR_QPCB_OFFSET 0
+
+#define MASK_TOPAZ_VLC_CR_QPCR_OFFSET 0x00001F00
+#define SHIFT_TOPAZ_VLC_CR_QPCR_OFFSET 8
+#define REGNUM_TOPAZ_VLC_CR_QPCR_OFFSET 0x0074
+#define SIGNED_TOPAZ_VLC_CR_QPCR_OFFSET 0
+
+/* Register CR_VLC_RATE_CTRL_QP */
+#define TOPAZ_VLC_CR_VLC_RATE_CTRL_QP 0x0078
+#define MASK_TOPAZ_VLC_CR_BU_QPY_INTRA 0x00003FFF
+#define SHIFT_TOPAZ_VLC_CR_BU_QPY_INTRA 0
+#define REGNUM_TOPAZ_VLC_CR_BU_QPY_INTRA 0x0078
+#define SIGNED_TOPAZ_VLC_CR_BU_QPY_INTRA 0
+
+#define MASK_TOPAZ_VLC_CR_BU_QPY_INTER 0x3FFF0000
+#define SHIFT_TOPAZ_VLC_CR_BU_QPY_INTER 16
+#define REGNUM_TOPAZ_VLC_CR_BU_QPY_INTER 0x0078
+#define SIGNED_TOPAZ_VLC_CR_BU_QPY_INTER 0
+
+/* Register CR_VLC_BU_STAT_UPDATE */
+#define TOPAZ_VLC_CR_VLC_BU_STAT_UPDATE 0x007C
+#define MASK_TOPAZ_VLC_CR_FORCE_BU_STAT_UPDATE 0x00000001
+#define SHIFT_TOPAZ_VLC_CR_FORCE_BU_STAT_UPDATE 0
+#define REGNUM_TOPAZ_VLC_CR_FORCE_BU_STAT_UPDATE 0x007C
+#define SIGNED_TOPAZ_VLC_CR_FORCE_BU_STAT_UPDATE 0
+
+/* Register CR_VLC_SLICE_HEADER_CTRL */
+#define TOPAZ_VLC_CR_VLC_SLICE_HEADER_CTRL 0x0080
+#define MASK_TOPAZ_VLC_CR_SLICE_HEADER_ELEMENTS 0x0000001F
+#define SHIFT_TOPAZ_VLC_CR_SLICE_HEADER_ELEMENTS 0
+#define REGNUM_TOPAZ_VLC_CR_SLICE_HEADER_ELEMENTS 0x0080
+#define SIGNED_TOPAZ_VLC_CR_SLICE_HEADER_ELEMENTS 0
+
+#define MASK_TOPAZ_VLC_CR_SLICE_PREFIX_ELEMENTS 0x00001F00
+#define SHIFT_TOPAZ_VLC_CR_SLICE_PREFIX_ELEMENTS 8
+#define REGNUM_TOPAZ_VLC_CR_SLICE_PREFIX_ELEMENTS 0x0080
+#define SIGNED_TOPAZ_VLC_CR_SLICE_PREFIX_ELEMENTS 0
+
+#define MASK_TOPAZ_VLC_CR_SLICE_MB_NUM 0xFFFF0000
+#define SHIFT_TOPAZ_VLC_CR_SLICE_MB_NUM 16
+#define REGNUM_TOPAZ_VLC_CR_SLICE_MB_NUM 0x0080
+#define SIGNED_TOPAZ_VLC_CR_SLICE_MB_NUM 0
+
+/* Register CR_VLC_SLICE_CTRL_0 */
+#define TOPAZ_VLC_CR_VLC_SLICE_CTRL_0 0x0084
+#define MASK_TOPAZ_VLC_CR_SLICE_SIZE_LIMIT 0x00FFFFFF
+#define SHIFT_TOPAZ_VLC_CR_SLICE_SIZE_LIMIT 0
+#define REGNUM_TOPAZ_VLC_CR_SLICE_SIZE_LIMIT 0x0084
+#define SIGNED_TOPAZ_VLC_CR_SLICE_SIZE_LIMIT 0
+
+/* Register CR_VLC_SLICE_CTRL_1 */
+#define TOPAZ_VLC_CR_VLC_SLICE_CTRL_1 0x008C
+#define MASK_TOPAZ_VLC_CR_SLICE_MBS_LIMIT 0x00003FFF
+#define SHIFT_TOPAZ_VLC_CR_SLICE_MBS_LIMIT 0
+#define REGNUM_TOPAZ_VLC_CR_SLICE_MBS_LIMIT 0x008C
+#define SIGNED_TOPAZ_VLC_CR_SLICE_MBS_LIMIT 0
+
+/* Register CR_VLC_RATE_CTRL_HEADERS */
+#define TOPAZ_VLC_CR_VLC_RATE_CTRL_HEADERS 0x0090
+#define MASK_TOPAZ_VLC_CR_SLICE_HEADER_BITS 0x00FFFFFF
+#define SHIFT_TOPAZ_VLC_CR_SLICE_HEADER_BITS 0
+#define REGNUM_TOPAZ_VLC_CR_SLICE_HEADER_BITS 0x0090
+#define SIGNED_TOPAZ_VLC_CR_SLICE_HEADER_BITS 0
+
+/* Register CR_VLC_SIGNATURE_5 */
+#define TOPAZ_VLC_CR_VLC_SIGNATURE_5 0x0094
+#define MASK_TOPAZ_VLC_CR_CABAC_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_VLC_CR_CABAC_SIGNATURE 0
+#define REGNUM_TOPAZ_VLC_CR_CABAC_SIGNATURE 0x0094
+#define SIGNED_TOPAZ_VLC_CR_CABAC_SIGNATURE 0
+
+/* Register CR_VLC_SIGNATURE_6 */
+#define TOPAZ_VLC_CR_VLC_SIGNATURE_6 0x0098
+#define MASK_TOPAZ_VLC_CR_IPCM_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZ_VLC_CR_IPCM_SIGNATURE 0
+#define REGNUM_TOPAZ_VLC_CR_IPCM_SIGNATURE 0x0098
+#define SIGNED_TOPAZ_VLC_CR_IPCM_SIGNATURE 0
+
+/*
+       Byte range covering the group TOPAZ_VLC file
+*/
+
+#define TOPAZ_VLC_TOPAZ_VLC_REGISTERS_START            0x00000000
+#define TOPAZ_VLC_TOPAZ_VLC_REGISTERS_END              0x0000009B
+
+/*
+       Byte range covering the whole register file
+*/
+
+#define TOPAZ_VLC_REGISTERS_START              0x00000000
+#define TOPAZ_VLC_REGISTERS_END                0x0000009B
+#define TOPAZ_VLC_REG_DEFAULT_TABLE struct {\
+                       IMG_UINT16 uRegOffset;\
+                       IMG_UINT32 uRegDefault;\
+                       IMG_UINT32 uRegMask;\
+                       bool bReadonly;\
+                       const char* pszName;\
+               } TOPAZ_VLC_Defaults[] = {\
+       {0x0000, 0x00000000, 0x1000FFFF, 0, "CR_VLC_CONTROL" } ,\
+       {0x0004, 0x00000000, 0x00000005, 1, "CR_VLC_STATUS" } ,\
+       {0x0008, 0x00000000, 0x0003E000, 1, "CR_VLC_INFO_0" } ,\
+       {0x000C, 0x00000000, 0xFFFFFFFF, 0, "CR_VLC_INFO_1" } ,\
+       {0x0010, 0x00000000, 0xFFFFFFFF, 0, "CR_VLC_INFO_2" } ,\
+       {0x0014, 0x00000000, 0x80003FFF, 0, "CR_VLC_STUFF_HEAD_CTRL" } ,\
+       {0x0018, 0x00000000, 0xFFFFFFFF, 0, "CR_VLC_HEADER_FIFO" } ,\
+       {0x001C, 0x00000000, 0xFFFFFFFF, 0, "CR_VLC_HEADER_CTRL" } ,\
+       {0x0020, 0x00000000, 0x00000001, 1, "CR_VLC_HEADER_STATUS" } ,\
+       {0x0024, 0x00000000, 0xFFFFFFFF, 1, "CR_VLC_RATE_CTRL_MB_TYPE" } ,\
+       {0x0028, 0x00000000, 0xFF00FFFF, 1, "CR_VLC_RATE_CTRL_DCBITS" } ,\
+       {0x002C, 0x00000000, 0x00FFFFFF, 1, "CR_VLC_RATE_CTRL_MVBITS" } ,\
+       {0x0030, 0x00000000, 0x00FFFFFF, 1, "CR_VLC_RATE_CTRL_MBSYM" } ,\
+       {0x0034, 0x00000000, 0x00FFFFFF, 1, "CR_VLC_RATE_CTRL_MBRES" } ,\
+       {0x0038, 0x00000000, 0xFFFFFFFF, 1, "CR_VLC_SIGNATURE_0" } ,\
+       {0x003C, 0x00000000, 0xFFFFFFFF, 1, "CR_VLC_SIGNATURE_1" } ,\
+       {0x0040, 0x00000000, 0xFFFFFFFF, 1, "CR_VLC_SIGNATURE_2" } ,\
+       {0x0044, 0x00000000, 0xFFFFFFFF, 1, "CR_VLC_SIGNATURE_3" } ,\
+       {0x0048, 0x00000000, 0xFFFFFFFF, 1, "CR_VLC_SIGNATURE_4" } ,\
+       {0x0050, 0x00000000, 0x0007FFFF, 0, "CR_VLC_PERFORMANCE_0" } ,\
+       {0x0054, 0x00000000, 0x003FFFFF, 0, "CR_VLC_PERFORMANCE_1" } ,\
+       {0x0058, 0x00000000, 0x00000003, 0, "CR_VLC_PERFORMANCE_2" } ,\
+       {0x005C, 0x01900000, 0x03FF1FFF, 0, "CR_VLC_IPCM_0" } ,\
+       {0x0060, 0x00000000, 0x1FFF0FFF, 0, "CR_VLC_IPCM_1" } ,\
+       {0x0064, 0x00000000, 0x00000007, 0, "CR_VLC_MPEG4_CFG" } ,\
+       {0x0068, 0x00000000, 0x3F3F003F, 1, "CR_VLC_MB_PARAMS" } ,\
+       {0x006C, 0x00000000, 0x00000001, 0, "CR_VLC_RESET" } ,\
+       {0x0070, 0x00000000, 0xFFFFFFF0, 0, "CR_VLC_WRITE_ADDR" } ,\
+       {0x0074, 0x00000000, 0x00001F1F, 0, "CR_VLC_CHROMA_QP_OFFSET" } ,\
+       {0x0078, 0x00000000, 0x3FFF3FFF, 1, "CR_VLC_RATE_CTRL_QP" } ,\
+       {0x007C, 0x00000000, 0x00000001, 0, "CR_VLC_BU_STAT_UPDATE" } ,\
+       {0x0080, 0x00000000, 0xFFFF1F1F, 0, "CR_VLC_SLICE_HEADER_CTRL" } ,\
+       {0x0084, 0x00000000, 0x00FFFFFF, 0, "CR_VLC_SLICE_CTRL_0" } ,\
+       {0x008C, 0x00000000, 0x00003FFF, 0, "CR_VLC_SLICE_CTRL_1" } ,\
+       {0x0090, 0x00000000, 0x00FFFFFF, 1, "CR_VLC_RATE_CTRL_HEADERS" } ,\
+       {0x0094, 0x00000000, 0xFFFFFFFF, 1, "CR_VLC_SIGNATURE_5" } ,\
+       {0x0098, 0x00000000, 0xFFFFFFFF, 1, "CR_VLC_SIGNATURE_6" } ,\
+{ 0 }}
+
+#define TOPAZ_VLC_REGS_INIT(uBase) \
+       { \
+               int n;\
+               TOPAZ_VLC_REG_DEFAULT_TABLE;\
+               for (n = 0; n < sizeof(TOPAZ_VLC_Defaults)/ sizeof(TOPAZ_VLC_Defaults[0] ) -1; n++)\
+               {\
+                       RegWriteNoTrap(TOPAZ_VLC_Defaults[n].uRegOffset + uBase, TOPAZ_VLC_Defaults[n].uRegDefault); \
+               }\
+       }
+#endif
diff --git a/driver/encoder/reg_headers/topazhp_core_regs.h b/driver/encoder/reg_headers/topazhp_core_regs.h
new file mode 100644 (file)
index 0000000..4f58a84
--- /dev/null
@@ -0,0 +1,3179 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _REGCONV_H_topazhp_core_regs_h
+#define _REGCONV_H_topazhp_core_regs_h
+
+/* Register CR_TOPAZHP_SRST */
+#define TOPAZHP_CR_TOPAZHP_SRST     0x0000
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE_SOFT_RESET 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE_SOFT_RESET 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE_SOFT_RESET 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE_SOFT_RESET 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_SOFT_RESET 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_SOFT_RESET 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP_SOFT_RESET 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP_SOFT_RESET 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_JMCOMP_SOFT_RESET 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_JMCOMP_SOFT_RESET 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_JMCOMP_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_JMCOMP_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PREFETCH_SOFT_RESET 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PREFETCH_SOFT_RESET 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PREFETCH_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PREFETCH_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_VLC_SOFT_RESET 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_VLC_SOFT_RESET 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_VLC_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_VLC_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_DB_SOFT_RESET 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_DB_SOFT_RESET 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_DB_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_DB_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_LTRITC_SOFT_RESET 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_LTRITC_SOFT_RESET 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_LTRITC_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_LTRITC_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SCALER_SOFT_RESET 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SCALER_SOFT_RESET 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SCALER_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SCALER_SOFT_RESET 0
+
+/* Register CR_TOPAZHP_INTSTAT */
+#define TOPAZHP_CR_TOPAZHP_INTSTAT  0x0004
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_IPE0_DONE 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_IPE0_DONE 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_IPE0_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_IPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_IPE1_DONE 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_IPE1_DONE 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_IPE1_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_IPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_SPE0_DONE 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_SPE0_DONE 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_SPE0_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_SPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_SPE1_DONE 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_SPE1_DONE 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_SPE1_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_SPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_PC_DONE 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_PC_DONE 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_PC_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_PC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_H264COMP_DONE 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_H264COMP_DONE 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_H264COMP_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_H264COMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_JMCOMP_DONE 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_JMCOMP_DONE 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_JMCOMP_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_JMCOMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_VLC_DONE 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_VLC_DONE 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_VLC_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_VLC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_DEB_DONE 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_DEB_DONE 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_DEB_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_DEB_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_SOFTWARE0 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_SOFTWARE0 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_SOFTWARE0 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_SOFTWARE0 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_SOFTWARE1 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_SOFTWARE1 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_SOFTWARE1 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_SOFTWARE1 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_SEQ_START 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_SEQ_START 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_SEQ_START 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_SEQ_START 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_SLICE_DONE 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_SLICE_DONE 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_SLICE_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_SLICE_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_PREFETCH_DONE 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_PREFETCH_DONE 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_PREFETCH_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_PREFETCH_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_RATE_CTRL_DONE 0x00004000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_RATE_CTRL_DONE 14
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_RATE_CTRL_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_RATE_CTRL_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_DMA_DONE 0x00010000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_DMA_DONE 16
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_DMA_DONE 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_DMA_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_COMBINED 0x20000000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_COMBINED 29
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_COMBINED 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_COMBINED 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_MASTER_MTX 0x40000000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_MASTER_MTX 30
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_MASTER_MTX 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_MASTER_MTX 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTS_MASTER_HOST 0x80000000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTS_MASTER_HOST 31
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTS_MASTER_HOST 0x0004
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTS_MASTER_HOST 0
+
+/* Register CR_TOPAZHP_MTX_INTENAB */
+#define TOPAZHP_CR_TOPAZHP_MTX_INTENAB 0x0008
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_IPE0_DONE 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_IPE0_DONE 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_IPE0_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_IPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_IPE1_DONE 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_IPE1_DONE 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_IPE1_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_IPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SPE0_DONE 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SPE0_DONE 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SPE0_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SPE1_DONE 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SPE1_DONE 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SPE1_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_PC_DONE 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_PC_DONE 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_PC_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_PC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_H264COMP_DONE 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_H264COMP_DONE 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_H264COMP_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_H264COMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_JMCOMP_DONE 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_JMCOMP_DONE 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_JMCOMP_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_JMCOMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_VLC_DONE 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_VLC_DONE 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_VLC_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_VLC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_DEB_DONE 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_DEB_DONE 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_DEB_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_DEB_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SOFTWARE0 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SOFTWARE0 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SOFTWARE0 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SOFTWARE0 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SOFTWARE1 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SOFTWARE1 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SOFTWARE1 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SOFTWARE1 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SEQ_START 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SEQ_START 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SEQ_START 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SEQ_START 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SLICE_DONE 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SLICE_DONE 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SLICE_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_SLICE_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_PREFETCH_DONE 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_PREFETCH_DONE 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_PREFETCH_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_PREFETCH_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_RATE_CTRL_DONE 0x00004000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_RATE_CTRL_DONE 14
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_RATE_CTRL_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_RATE_CTRL_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_DMA_DONE 0x00010000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_DMA_DONE 16
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_DMA_DONE 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_DMA_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_COMBINED 0x20000000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_COMBINED 29
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_COMBINED 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_COMBINED 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MTX_INTEN_MASTER 0x40000000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MTX_INTEN_MASTER 30
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MTX_INTEN_MASTER 0x0008
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MTX_INTEN_MASTER 0
+
+/* Register CR_TOPAZHP_HOST_INTENAB */
+#define TOPAZHP_CR_TOPAZHP_HOST_INTENAB 0x000C
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_IPE0_DONE 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_IPE0_DONE 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_IPE0_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_IPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_IPE1_DONE 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_IPE1_DONE 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_IPE1_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_IPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SPE0_DONE 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SPE0_DONE 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SPE0_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SPE1_DONE 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SPE1_DONE 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SPE1_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_PC_DONE 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_PC_DONE 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_PC_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_PC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_H264COMP_DONE 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_H264COMP_DONE 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_H264COMP_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_H264COMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_JMCOMP_DONE 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_JMCOMP_DONE 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_JMCOMP_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_JMCOMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_VLC_DONE 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_VLC_DONE 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_VLC_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_VLC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_DEB_DONE 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_DEB_DONE 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_DEB_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_DEB_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SOFTWARE0 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SOFTWARE0 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SOFTWARE0 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SOFTWARE0 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SOFTWARE1 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SOFTWARE1 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SOFTWARE1 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SOFTWARE1 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SEQ_START 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SEQ_START 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SEQ_START 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SEQ_START 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SLICE_DONE 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SLICE_DONE 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SLICE_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_SLICE_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_PREFETCH_DONE 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_PREFETCH_DONE 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_PREFETCH_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_PREFETCH_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_RATE_CTRL_DONE 0x00004000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_RATE_CTRL_DONE 14
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_RATE_CTRL_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_RATE_CTRL_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_DMA_DONE 0x00010000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_DMA_DONE 16
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_DMA_DONE 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_DMA_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_COMBINED 0x20000000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_COMBINED 29
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_COMBINED 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_COMBINED 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_HOST_INTEN_MASTER 0x80000000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_HOST_INTEN_MASTER 31
+#define REGNUM_TOPAZHP_CR_TOPAZHP_HOST_INTEN_MASTER 0x000C
+#define SIGNED_TOPAZHP_CR_TOPAZHP_HOST_INTEN_MASTER 0
+
+/* Register CR_TOPAZHP_INTCLEAR */
+#define TOPAZHP_CR_TOPAZHP_INTCLEAR 0x0010
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_IPE0_DONE 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_IPE0_DONE 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_IPE0_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_IPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_IPE1_DONE 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_IPE1_DONE 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_IPE1_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_IPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_SPE0_DONE 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_SPE0_DONE 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_SPE0_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_SPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_SPE1_DONE 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_SPE1_DONE 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_SPE1_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_SPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_PC_DONE 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_PC_DONE 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_PC_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_PC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_H264COMP_DONE 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_H264COMP_DONE 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_H264COMP_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_H264COMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_JMCOMP_DONE 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_JMCOMP_DONE 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_JMCOMP_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_JMCOMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_VLC_DONE 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_VLC_DONE 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_VLC_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_VLC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_DEB_DONE 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_DEB_DONE 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_DEB_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_DEB_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_SOFTWARE0 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_SOFTWARE0 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_SOFTWARE0 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_SOFTWARE0 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_SOFTWARE1 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_SOFTWARE1 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_SOFTWARE1 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_SOFTWARE1 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_SEQ_START 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_SEQ_START 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_SEQ_START 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_SEQ_START 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_SLICE_DONE 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_SLICE_DONE 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_SLICE_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_SLICE_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_PREFETCH_DONE 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_PREFETCH_DONE 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_PREFETCH_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_PREFETCH_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_RATE_CTRL_DONE 0x00004000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_RATE_CTRL_DONE 14
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_RATE_CTRL_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_RATE_CTRL_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCLR_DMA_DONE 0x00010000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCLR_DMA_DONE 16
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCLR_DMA_DONE 0x0010
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCLR_DMA_DONE 0
+
+/* Register CR_TOPAZHP_INT_COMB_SEL */
+#define TOPAZHP_CR_TOPAZHP_INT_COMB_SEL 0x0014
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_IPE0_DONE 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_IPE0_DONE 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_IPE0_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_IPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_IPE1_DONE 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_IPE1_DONE 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_IPE1_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_IPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_SPE0_DONE 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_SPE0_DONE 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_SPE0_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_SPE0_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_SPE1_DONE 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_SPE1_DONE 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_SPE1_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_SPE1_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_PC_DONE 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_PC_DONE 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_PC_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_PC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_H264COMP_DONE 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_H264COMP_DONE 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_H264COMP_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_H264COMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_JMCOMP_DONE 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_JMCOMP_DONE 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_JMCOMP_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_JMCOMP_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_VLC_DONE 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_VLC_DONE 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_VLC_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_VLC_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_DEB_DONE 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_DEB_DONE 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_DEB_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_DEB_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_SOFTWARE0 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_SOFTWARE0 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_SOFTWARE0 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_SOFTWARE0 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_SOFTWARE1 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_SOFTWARE1 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_SOFTWARE1 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_SOFTWARE1 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_SEQ_START 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_SEQ_START 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_SEQ_START 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_SEQ_START 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_SLICE_DONE 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_SLICE_DONE 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_SLICE_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_SLICE_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_PREFETCH_DONE 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_PREFETCH_DONE 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_PREFETCH_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_PREFETCH_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_RATE_CTRL_DONE 0x00004000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_RATE_CTRL_DONE 14
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_RATE_CTRL_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_RATE_CTRL_DONE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INTCSEL_DMA_DONE 0x00010000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INTCSEL_DMA_DONE 16
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INTCSEL_DMA_DONE 0x0014
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INTCSEL_DMA_DONE 0
+
+/* Register CR_TOPAZHP_BUSY */
+#define TOPAZHP_CR_TOPAZHP_BUSY     0x0018
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE0_BUSY 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE0_BUSY 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE0_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE0_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE1_BUSY 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE1_BUSY 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE1_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE1_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE0_BUSY 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE0_BUSY 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE0_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE0_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE1_BUSY 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE1_BUSY 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE1_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE1_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_DIRECT_BUSY 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_DIRECT_BUSY 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_DIRECT_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_DIRECT_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_BUSY 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_BUSY 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_JMCOMP_BUSY 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_JMCOMP_BUSY 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_JMCOMP_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_JMCOMP_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_VLC_BUSY 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_VLC_BUSY 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_VLC_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_VLC_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_DEB_BUSY 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_DEB_BUSY 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_DEB_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_DEB_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_MOTION_CALC_BUSY 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_MOTION_CALC_BUSY 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_MOTION_CALC_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_MOTION_CALC_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PREFETCH_BUSY 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PREFETCH_BUSY 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PREFETCH_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PREFETCH_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP4X4_BUSY 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP4X4_BUSY 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP4X4_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP4X4_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP8X8_BUSY 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP8X8_BUSY 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP8X8_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP8X8_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP16X16_BUSY 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP16X16_BUSY 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP16X16_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP16X16_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP_BUSY 0x00004000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP_BUSY 14
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_CABAC_BUSY 0x00008000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_CABAC_BUSY 15
+#define REGNUM_TOPAZHP_CR_TOPAZHP_CABAC_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_CABAC_BUSY 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_BUSY 0x00010000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_BUSY 16
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_BUSY 0x0018
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_BUSY 0
+
+/* Register CR_TOPAZHP_AUTO_CLOCK_GATING */
+#define TOPAZHP_CR_TOPAZHP_AUTO_CLOCK_GATING 0x0024
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE0_AUTO_CLK_GATE 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE0_AUTO_CLK_GATE 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE0_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE0_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE1_AUTO_CLK_GATE 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE1_AUTO_CLK_GATE 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE1_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE1_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE0_AUTO_CLK_GATE 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE0_AUTO_CLK_GATE 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE0_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE0_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE1_AUTO_CLK_GATE 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE1_AUTO_CLK_GATE 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE1_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE1_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP4X4_AUTO_CLK_GATE 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP4X4_AUTO_CLK_GATE 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP4X4_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP4X4_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP8X8_AUTO_CLK_GATE 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP8X8_AUTO_CLK_GATE 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP8X8_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP8X8_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP16X16_AUTO_CLK_GATE 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP16X16_AUTO_CLK_GATE 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP16X16_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP16X16_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_JMCOMP_AUTO_CLK_GATE 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_JMCOMP_AUTO_CLK_GATE 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_JMCOMP_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_JMCOMP_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_VLC_AUTO_CLK_GATE 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_VLC_AUTO_CLK_GATE 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_VLC_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_VLC_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_DEB_AUTO_CLK_GATE 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_DEB_AUTO_CLK_GATE 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_DEB_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_DEB_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_DM_AUTO_CLK_GATE 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_DM_AUTO_CLK_GATE 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_DM_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_DM_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_DMS_AUTO_CLK_GATE 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_DMS_AUTO_CLK_GATE 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_DMS_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_DMS_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_CABAC_AUTO_CLK_GATE 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_CABAC_AUTO_CLK_GATE 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_CABAC_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_CABAC_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_AUTO_CLK_GATE 0x00008000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_AUTO_CLK_GATE 15
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_AUTO_CLK_GATE 0
+
+/* Register CR_TOPAZHP_MAN_CLOCK_GATING */
+#define TOPAZHP_CR_TOPAZHP_MAN_CLOCK_GATING 0x0028
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE0_MAN_CLK_GATE 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE0_MAN_CLK_GATE 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE0_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE0_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE1_MAN_CLK_GATE 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE1_MAN_CLK_GATE 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE1_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE1_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE0_MAN_CLK_GATE 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE0_MAN_CLK_GATE 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE0_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE0_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE1_MAN_CLK_GATE 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE1_MAN_CLK_GATE 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE1_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE1_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP4X4_MAN_CLK_GATE 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP4X4_MAN_CLK_GATE 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP4X4_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP4X4_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP8X8_MAN_CLK_GATE 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP8X8_MAN_CLK_GATE 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP8X8_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP8X8_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP16X16_MAN_CLK_GATE 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP16X16_MAN_CLK_GATE 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP16X16_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP16X16_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_JMCOMP_MAN_CLK_GATE 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_JMCOMP_MAN_CLK_GATE 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_JMCOMP_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_JMCOMP_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PREFETCH_MAN_CLK_GATE 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PREFETCH_MAN_CLK_GATE 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PREFETCH_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PREFETCH_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_VLC_MAN_CLK_GATE 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_VLC_MAN_CLK_GATE 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_VLC_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_VLC_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_DEB_MAN_CLK_GATE 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_DEB_MAN_CLK_GATE 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_DEB_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_DEB_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_DM_MAN_CLK_GATE 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_DM_MAN_CLK_GATE 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_DM_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_DM_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_DMS_MAN_CLK_GATE 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_DMS_MAN_CLK_GATE 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_DMS_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_DMS_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_CABAC_MAN_CLK_GATE 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_CABAC_MAN_CLK_GATE 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_CABAC_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_CABAC_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_LRITC_MAN_CLK_GATE 0x00004000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_LRITC_MAN_CLK_GATE 14
+#define REGNUM_TOPAZHP_CR_TOPAZHP_LRITC_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_LRITC_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_MAN_CLK_GATE 0x00008000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_MAN_CLK_GATE 15
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_MAN_CLK_GATE 0
+
+/* Register CR_TOPAZHP_REQ_PRIORITY */
+#define TOPAZHP_CR_TOPAZHP_REQ_PRIORITY 0x002C
+#define MASK_TOPAZHP_CR_REQ_PRIORITY_THRESH 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_REQ_PRIORITY_THRESH 0
+#define REGNUM_TOPAZHP_CR_REQ_PRIORITY_THRESH 0x002C
+#define SIGNED_TOPAZHP_CR_REQ_PRIORITY_THRESH 0
+
+#define MASK_TOPAZHP_CR_REQ_PRIORITY_DECR 0x0FFF0000
+#define SHIFT_TOPAZHP_CR_REQ_PRIORITY_DECR 16
+#define REGNUM_TOPAZHP_CR_REQ_PRIORITY_DECR 0x002C
+#define SIGNED_TOPAZHP_CR_REQ_PRIORITY_DECR 0
+
+/* Register CR_TOPAZHP_RTM */
+#define TOPAZHP_CR_TOPAZHP_RTM      0x0030
+#define MASK_TOPAZHP_CR_RTM_SELECT_A 0x00000007
+#define SHIFT_TOPAZHP_CR_RTM_SELECT_A 0
+#define REGNUM_TOPAZHP_CR_RTM_SELECT_A 0x0030
+#define SIGNED_TOPAZHP_CR_RTM_SELECT_A 0
+
+#define MASK_TOPAZHP_CR_RTM_SELECT_A_MODULE 0x00000078
+#define SHIFT_TOPAZHP_CR_RTM_SELECT_A_MODULE 3
+#define REGNUM_TOPAZHP_CR_RTM_SELECT_A_MODULE 0x0030
+#define SIGNED_TOPAZHP_CR_RTM_SELECT_A_MODULE 0
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_NONE            0x0000000F              /* Output forced to 0 */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_LRITC           0x0000000E              /* LRITC module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_PERFORMANCE             0x0000000D              /* end of mb and end of pic. */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_PC_DM           0x0000000C              /* PC decision module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_H264COMP16X16           0x0000000B              /* H264COMP 16X16 module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_H264COMP8X8             0x0000000A              /* H264COMP 8X8 module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_H264COMP4X4             0x00000009              /* H264COMP 4X4 module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_SPE1            0x00000008              /* SPE 1 module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_SPE0            0x00000007              /* SPE 0 module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_DB              0x00000006              /* Deblocker module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_CABAC           0x00000005              /* CABAC module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_VLC             0x00000004              /* VLC module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_JMCOMP          0x00000003              /* JMCOMP module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_PREFETCH                0x00000002              /* PREFETCH module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_IPE1            0x00000001              /* IPE 1 module */
+#define TOPAZHP_CR_RTM_SELECT_A_MODULE_IPE0            0x00000000              /* IPE 0 module */
+
+#define MASK_TOPAZHP_CR_RTM_SELECT_B 0x00000380
+#define SHIFT_TOPAZHP_CR_RTM_SELECT_B 7
+#define REGNUM_TOPAZHP_CR_RTM_SELECT_B 0x0030
+#define SIGNED_TOPAZHP_CR_RTM_SELECT_B 0
+
+#define MASK_TOPAZHP_CR_RTM_SELECT_B_MODULE 0x00003C00
+#define SHIFT_TOPAZHP_CR_RTM_SELECT_B_MODULE 10
+#define REGNUM_TOPAZHP_CR_RTM_SELECT_B_MODULE 0x0030
+#define SIGNED_TOPAZHP_CR_RTM_SELECT_B_MODULE 0
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_NONE            0x0000000F              /* Output forced to 0 */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_LRITC           0x0000000E              /* LRITC module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_PERFORMANCE             0x0000000D              /* end of mb and end of pic. */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_PC              0x0000000C              /* PC module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_H264COMP16X16           0x0000000B              /* H264COMP 16X16 module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_H264COMP8X8             0x0000000A              /* H264COMP 8X8 module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_H264COMP4X4             0x00000009              /* H264COMP 4X4 module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_SPE1            0x00000008              /* SPE 1 module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_SPE0            0x00000007              /* SPE 0 module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_DB              0x00000006              /* Deblocker module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_CABAC           0x00000005              /* CABAC module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_VLC             0x00000004              /* VLC module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_JMCOMP          0x00000003              /* JMCOMP module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_PREFETCH                0x00000002              /* PREFETCH module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_IPE1            0x00000001              /* IPE  1 module */
+#define TOPAZHP_CR_RTM_SELECT_B_MODULE_IPE0            0x00000000              /* IPE  0 module */
+
+/* Register CR_TOPAZHP_RTM_VALUE */
+#define TOPAZHP_CR_TOPAZHP_RTM_VALUE 0x0034
+#define MASK_TOPAZHP_CR_RTM_A       0x000000FF
+#define SHIFT_TOPAZHP_CR_RTM_A      0
+#define REGNUM_TOPAZHP_CR_RTM_A     0x0034
+#define SIGNED_TOPAZHP_CR_RTM_A     0
+
+#define MASK_TOPAZHP_CR_RTM_B       0x0000FF00
+#define SHIFT_TOPAZHP_CR_RTM_B      8
+#define REGNUM_TOPAZHP_CR_RTM_B     0x0034
+#define SIGNED_TOPAZHP_CR_RTM_B     0
+
+/* Register CR_TOPAZHP_MB_PERFORMANCE_RESULT */
+#define TOPAZHP_CR_TOPAZHP_MB_PERFORMANCE_RESULT 0x0038
+#define MASK_TOPAZHP_CR_TOPAZ_MB_PERFORMANCE_RESULT 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_TOPAZ_MB_PERFORMANCE_RESULT 0
+#define REGNUM_TOPAZHP_CR_TOPAZ_MB_PERFORMANCE_RESULT 0x0038
+#define SIGNED_TOPAZHP_CR_TOPAZ_MB_PERFORMANCE_RESULT 0
+
+/* Register CR_TOPAZHP_MB_PERFORMANCE_MB_NUMBER */
+#define TOPAZHP_CR_TOPAZHP_MB_PERFORMANCE_MB_NUMBER 0x003C
+#define MASK_TOPAZHP_CR_TOPAZ_MB_PERFORMANCE_MB_NUM 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_TOPAZ_MB_PERFORMANCE_MB_NUM 0
+#define REGNUM_TOPAZHP_CR_TOPAZ_MB_PERFORMANCE_MB_NUM 0x003C
+#define SIGNED_TOPAZHP_CR_TOPAZ_MB_PERFORMANCE_MB_NUM 0
+
+/* Register CR_LRITC_TILE_USE_CONFIG */
+#define TOPAZHP_CR_LRITC_TILE_USE_CONFIG 0x0040
+#define MASK_TOPAZHP_CR_MAX_PIC0_LUMA_TILES 0x0000003F
+#define SHIFT_TOPAZHP_CR_MAX_PIC0_LUMA_TILES 0
+#define REGNUM_TOPAZHP_CR_MAX_PIC0_LUMA_TILES 0x0040
+#define SIGNED_TOPAZHP_CR_MAX_PIC0_LUMA_TILES 0
+
+#define MASK_TOPAZHP_CR_MAX_PIC1_LUMA_TILES 0x00003F00
+#define SHIFT_TOPAZHP_CR_MAX_PIC1_LUMA_TILES 8
+#define REGNUM_TOPAZHP_CR_MAX_PIC1_LUMA_TILES 0x0040
+#define SIGNED_TOPAZHP_CR_MAX_PIC1_LUMA_TILES 0
+
+#define MASK_TOPAZHP_CR_MAX_PIC0_CHROMA_TILES 0x003F0000
+#define SHIFT_TOPAZHP_CR_MAX_PIC0_CHROMA_TILES 16
+#define REGNUM_TOPAZHP_CR_MAX_PIC0_CHROMA_TILES 0x0040
+#define SIGNED_TOPAZHP_CR_MAX_PIC0_CHROMA_TILES 0
+
+#define MASK_TOPAZHP_CR_MAX_PIC1_CHROMA_TILES 0x3F000000
+#define SHIFT_TOPAZHP_CR_MAX_PIC1_CHROMA_TILES 24
+#define REGNUM_TOPAZHP_CR_MAX_PIC1_CHROMA_TILES 0x0040
+#define SIGNED_TOPAZHP_CR_MAX_PIC1_CHROMA_TILES 0
+
+/* Register CR_LRITC_TILE_USE_STATUS */
+#define TOPAZHP_CR_LRITC_TILE_USE_STATUS 0x0048
+#define MASK_TOPAZHP_CR_PIC0_LUMA_TILES 0x0000003F
+#define SHIFT_TOPAZHP_CR_PIC0_LUMA_TILES 0
+#define REGNUM_TOPAZHP_CR_PIC0_LUMA_TILES 0x0048
+#define SIGNED_TOPAZHP_CR_PIC0_LUMA_TILES 0
+
+#define MASK_TOPAZHP_CR_PIC1_LUMA_TILES 0x00003F00
+#define SHIFT_TOPAZHP_CR_PIC1_LUMA_TILES 8
+#define REGNUM_TOPAZHP_CR_PIC1_LUMA_TILES 0x0048
+#define SIGNED_TOPAZHP_CR_PIC1_LUMA_TILES 0
+
+#define MASK_TOPAZHP_CR_PIC0_CHROMA_TILES 0x003F0000
+#define SHIFT_TOPAZHP_CR_PIC0_CHROMA_TILES 16
+#define REGNUM_TOPAZHP_CR_PIC0_CHROMA_TILES 0x0048
+#define SIGNED_TOPAZHP_CR_PIC0_CHROMA_TILES 0
+
+#define MASK_TOPAZHP_CR_PIC1_CHROMA_TILES 0x3F000000
+#define SHIFT_TOPAZHP_CR_PIC1_CHROMA_TILES 24
+#define REGNUM_TOPAZHP_CR_PIC1_CHROMA_TILES 0x0048
+#define SIGNED_TOPAZHP_CR_PIC1_CHROMA_TILES 0
+
+
+
+/* Register CR_LRITC_CACHE_CHUNK_CONFIG */
+#define TOPAZHP_CR_LRITC_CACHE_CHUNK_CONFIG 0x0050
+#define MASK_TOPAZHP_CR_CACHE_CHUNKS_PRIORITY 0x000000FF
+#define SHIFT_TOPAZHP_CR_CACHE_CHUNKS_PRIORITY 0
+#define REGNUM_TOPAZHP_CR_CACHE_CHUNKS_PRIORITY 0x0050
+#define SIGNED_TOPAZHP_CR_CACHE_CHUNKS_PRIORITY 0
+
+#define MASK_TOPAZHP_CR_CACHE_CHUNKS_MAX 0x0000FF00
+#define SHIFT_TOPAZHP_CR_CACHE_CHUNKS_MAX 8
+#define REGNUM_TOPAZHP_CR_CACHE_CHUNKS_MAX 0x0050
+#define SIGNED_TOPAZHP_CR_CACHE_CHUNKS_MAX 0
+
+#define MASK_TOPAZHP_CR_CACHE_CHUNKS_PER_MB 0x00FF0000
+#define SHIFT_TOPAZHP_CR_CACHE_CHUNKS_PER_MB 16
+#define REGNUM_TOPAZHP_CR_CACHE_CHUNKS_PER_MB 0x0050
+#define SIGNED_TOPAZHP_CR_CACHE_CHUNKS_PER_MB 0
+
+
+
+
+/* Register CR_LRITC_SIGNATURE_ADDR */
+#define TOPAZHP_CR_LRITC_SIGNATURE_ADDR 0x0058
+#define MASK_TOPAZHP_CR_LRITC_SIGNATURE_ADDR 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_LRITC_SIGNATURE_ADDR 0
+#define REGNUM_TOPAZHP_CR_LRITC_SIGNATURE_ADDR 0x0058
+#define SIGNED_TOPAZHP_CR_LRITC_SIGNATURE_ADDR 0
+
+/* Register CR_LRITC_SIGNATURE_RDATA */
+#define TOPAZHP_CR_LRITC_SIGNATURE_RDATA 0x005C
+#define MASK_TOPAZHP_CR_LRITC_SIGNATURE_RDATA 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_LRITC_SIGNATURE_RDATA 0
+#define REGNUM_TOPAZHP_CR_LRITC_SIGNATURE_RDATA 0x005C
+#define SIGNED_TOPAZHP_CR_LRITC_SIGNATURE_RDATA 0
+
+/* Register CR_MEM_SIGNATURE_CONTROL */
+#define TOPAZHP_CR_MEM_SIGNATURE_CONTROL 0x0060
+#define MASK_TOPAZHP_CR_SIGNATURE_WDATA_SEL 0x0000000F
+#define SHIFT_TOPAZHP_CR_SIGNATURE_WDATA_SEL 0
+#define REGNUM_TOPAZHP_CR_SIGNATURE_WDATA_SEL 0x0060
+#define SIGNED_TOPAZHP_CR_SIGNATURE_WDATA_SEL 0
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_ABOVE_CHROMA_WR         0x0000000B              /* Above reconstructed chroma write to host memory */
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_ABOVE_LUMA_WR           0x0000000A              /* Above reconstructed luma write to host memory */
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_RECON_CHROMA_WR         0x00000009              /* Reconstructed Chroma write to host memory */
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_RECON_LUMA_WR           0x00000008              /* Reconstructed Luma write to host memory */
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_ABOVE_SEC_B_WR          0x00000007              /* Above params section B write to host memory */
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_ABOVE_SEC_A_WR          0x00000006              /* Above params section A write to host memory */
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_TEMP_PIC1_BE_WR         0x00000004              /* Temporal picture 1 below MV write */
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_TEMP_PIC0_BE_WR         0x00000002              /* Temporal picture 0 below MV write */
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_TEMP_CO_WR              0x00000001              /* Temporal co-located MV write to host memory */
+#define TOPAZHP_CR_SIGNATURE_WDATA_SEL_DMA_2D_WR               0x00000000              /* ESB to host memory DMA engine transfers */
+
+#define MASK_TOPAZHP_CR_SIGNATURE_WDATA_INIT 0x00000010
+#define SHIFT_TOPAZHP_CR_SIGNATURE_WDATA_INIT 4
+#define REGNUM_TOPAZHP_CR_SIGNATURE_WDATA_INIT 0x0060
+#define SIGNED_TOPAZHP_CR_SIGNATURE_WDATA_INIT 0
+
+#define MASK_TOPAZHP_CR_SIGNATURE_RDATA_SEL 0x00000F00
+#define SHIFT_TOPAZHP_CR_SIGNATURE_RDATA_SEL 8
+#define REGNUM_TOPAZHP_CR_SIGNATURE_RDATA_SEL 0x0060
+#define SIGNED_TOPAZHP_CR_SIGNATURE_RDATA_SEL 0
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_ABOVE_CHROMA_RD         0x0000000B              /* Chroma read from row above in reconstructed frame */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_ABOVE_LUMA_RD           0x0000000A              /* Luma read from row above in reconstructed frame */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_CUR_CHROMA_RD           0x00000009              /* Chroma read from frame to encode */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_CUR_LUMA_RD             0x00000008              /* Luma read from frame to encode */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_ABOVE_SEC_B_RD          0x00000007              /* Above params section B read from host memory */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_ABOVE_SEC_A_RD          0x00000006              /* Above params section A read from host memory */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_TEMP_PIC1_BE2_RD                0x00000005              /* Temporal picture 1 below 2 MV read */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_TEMP_PIC1_BE1_RD                0x00000004              /* Temporal picture 1 below 1 MV read */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_TEMP_PIC0_BE2_RD                0x00000003              /* Temporal picture 0 below 2 MV read */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_TEMP_PIC0_BE1_RD                0x00000002              /* Temporal picture 0 below 1 MV read */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_TEMP_CO_RD              0x00000001              /* Temporal co-located MV read from host memory */
+#define TOPAZHP_CR_SIGNATURE_RDATA_SEL_DMA_2D_RD               0x00000000              /* Host memory to ESB DMA engine transfers */
+
+#define MASK_TOPAZHP_CR_SIGNATURE_RDATA_INIT 0x00001000
+#define SHIFT_TOPAZHP_CR_SIGNATURE_RDATA_INIT 12
+#define REGNUM_TOPAZHP_CR_SIGNATURE_RDATA_INIT 0x0060
+#define SIGNED_TOPAZHP_CR_SIGNATURE_RDATA_INIT 0
+
+#define MASK_TOPAZHP_CR_SIGNATURE_ADDR_SEL 0x001F0000
+#define SHIFT_TOPAZHP_CR_SIGNATURE_ADDR_SEL 16
+#define REGNUM_TOPAZHP_CR_SIGNATURE_ADDR_SEL 0x0060
+#define SIGNED_TOPAZHP_CR_SIGNATURE_ADDR_SEL 0
+
+#define MASK_TOPAZHP_CR_SIGNATURE_ADDR_INIT 0x00200000
+#define SHIFT_TOPAZHP_CR_SIGNATURE_ADDR_INIT 21
+#define REGNUM_TOPAZHP_CR_SIGNATURE_ADDR_INIT 0x0060
+#define SIGNED_TOPAZHP_CR_SIGNATURE_ADDR_INIT 0
+
+/* Register CR_MEM_SIGNATURE_ENC_WDATA */
+#define TOPAZHP_CR_MEM_SIGNATURE_ENC_WDATA 0x0064
+#define MASK_TOPAZHP_CR_MEM_SIGNATURE_ENC_WDATA 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_MEM_SIGNATURE_ENC_WDATA 0
+#define REGNUM_TOPAZHP_CR_MEM_SIGNATURE_ENC_WDATA 0x0064
+#define SIGNED_TOPAZHP_CR_MEM_SIGNATURE_ENC_WDATA 0
+
+/* Register CR_MEM_SIGNATURE_ENC_RDATA */
+#define TOPAZHP_CR_MEM_SIGNATURE_ENC_RDATA 0x0068
+#define MASK_TOPAZHP_CR_MEM_SIGNATURE_ENC_RDATA 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_MEM_SIGNATURE_ENC_RDATA 0
+#define REGNUM_TOPAZHP_CR_MEM_SIGNATURE_ENC_RDATA 0x0068
+#define SIGNED_TOPAZHP_CR_MEM_SIGNATURE_ENC_RDATA 0
+
+/* Register CR_MEM_SIGNATURE_ENC_ADDR */
+#define TOPAZHP_CR_MEM_SIGNATURE_ENC_ADDR 0x006C
+#define MASK_TOPAZHP_CR_MEM_SIGNATURE_ENC_ADDR 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_MEM_SIGNATURE_ENC_ADDR 0
+#define REGNUM_TOPAZHP_CR_MEM_SIGNATURE_ENC_ADDR 0x006C
+#define SIGNED_TOPAZHP_CR_MEM_SIGNATURE_ENC_ADDR 0
+
+/* Register CR_PREFETCH_LRITC_SIGNATURE */
+#define TOPAZHP_CR_PREFETCH_LRITC_SIGNATURE 0x0070
+#define MASK_TOPAZHP_CR_PREFETCH_LRITC_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PREFETCH_LRITC_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_PREFETCH_LRITC_SIGNATURE 0x0070
+#define SIGNED_TOPAZHP_CR_PREFETCH_LRITC_SIGNATURE 0
+
+/* Register CR_PROC_DMA_CONTROL */
+#define TOPAZHP_CR_PROC_DMA_CONTROL 0x00E0
+#define MASK_TOPAZHP_CR_DMA_FORMAT  0x00000007
+#define SHIFT_TOPAZHP_CR_DMA_FORMAT 0
+#define REGNUM_TOPAZHP_CR_DMA_FORMAT 0x00E0
+#define SIGNED_TOPAZHP_CR_DMA_FORMAT 0
+#define TOPAZHP_CR_DMA_FORMAT_UYVY             0x00000005              /* Interleaved luma and chroma (chroma first) */
+#define TOPAZHP_CR_DMA_FORMAT_YUYV             0x00000004              /* Interleaved luma and chroma (luma first) */
+#define TOPAZHP_CR_DMA_FORMAT_CHROMA_UV                0x00000002              /* 2-D fetch of interleaved chroma */
+#define TOPAZHP_CR_DMA_FORMAT_2D_PLANE         0x00000001              /* 2-D fetch (luma plane) */
+#define TOPAZHP_CR_DMA_FORMAT_LINEAR           0x00000000              /* 1-D fetch */
+
+#define MASK_TOPAZHP_CR_DMA_SIZE    0x0000FF00
+#define SHIFT_TOPAZHP_CR_DMA_SIZE   8
+#define REGNUM_TOPAZHP_CR_DMA_SIZE  0x00E0
+#define SIGNED_TOPAZHP_CR_DMA_SIZE  0
+
+#define MASK_TOPAZHP_CR_DMA_ESB_ADDR 0x00FF0000
+#define SHIFT_TOPAZHP_CR_DMA_ESB_ADDR 16
+#define REGNUM_TOPAZHP_CR_DMA_ESB_ADDR 0x00E0
+#define SIGNED_TOPAZHP_CR_DMA_ESB_ADDR 0
+
+#define MASK_TOPAZHP_CR_DMA_READ_NWRITE 0x01000000
+#define SHIFT_TOPAZHP_CR_DMA_READ_NWRITE 24
+#define REGNUM_TOPAZHP_CR_DMA_READ_NWRITE 0x00E0
+#define SIGNED_TOPAZHP_CR_DMA_READ_NWRITE 0
+
+#define MASK_TOPAZHP_CR_DMA_SYS_ADDR_SEL 0x02000000
+#define SHIFT_TOPAZHP_CR_DMA_SYS_ADDR_SEL 25
+#define REGNUM_TOPAZHP_CR_DMA_SYS_ADDR_SEL 0x00E0
+#define SIGNED_TOPAZHP_CR_DMA_SYS_ADDR_SEL 0
+
+/* Register CR_PROC_DMA_STATUS */
+#define TOPAZHP_CR_PROC_DMA_STATUS  0x00E4
+#define MASK_TOPAZHP_CR_DMA_FORMAT_STATUS 0x00000007
+#define SHIFT_TOPAZHP_CR_DMA_FORMAT_STATUS 0
+#define REGNUM_TOPAZHP_CR_DMA_FORMAT_STATUS 0x00E4
+#define SIGNED_TOPAZHP_CR_DMA_FORMAT_STATUS 0
+#define TOPAZHP_CR_DMA_FORMAT_STATUS_UYVY              0x00000005              /* Interleaved luma and chroma (chroma first) */
+#define TOPAZHP_CR_DMA_FORMAT_STATUS_YUYV              0x00000004              /* Interleaved luma and chroma (luma first) */
+#define TOPAZHP_CR_DMA_FORMAT_STATUS_CHROMA_UV         0x00000002              /* 2-D fetch of interleaved chroma */
+#define TOPAZHP_CR_DMA_FORMAT_STATUS_2D_PLANE          0x00000001              /* 2-D fetch (luma plane) */
+#define TOPAZHP_CR_DMA_FORMAT_STATUS_LINEAR            0x00000000              /* 1-D fetch */
+
+#define MASK_TOPAZHP_CR_DMA_SIZE_STATUS 0x0000FF00
+#define SHIFT_TOPAZHP_CR_DMA_SIZE_STATUS 8
+#define REGNUM_TOPAZHP_CR_DMA_SIZE_STATUS 0x00E4
+#define SIGNED_TOPAZHP_CR_DMA_SIZE_STATUS 0
+
+#define MASK_TOPAZHP_CR_DMA_ESB_ADDR_STATUS 0x00FF0000
+#define SHIFT_TOPAZHP_CR_DMA_ESB_ADDR_STATUS 16
+#define REGNUM_TOPAZHP_CR_DMA_ESB_ADDR_STATUS 0x00E4
+#define SIGNED_TOPAZHP_CR_DMA_ESB_ADDR_STATUS 0
+
+#define MASK_TOPAZHP_CR_DMA_READ_NWRITE_STATUS 0x01000000
+#define SHIFT_TOPAZHP_CR_DMA_READ_NWRITE_STATUS 24
+#define REGNUM_TOPAZHP_CR_DMA_READ_NWRITE_STATUS 0x00E4
+#define SIGNED_TOPAZHP_CR_DMA_READ_NWRITE_STATUS 0
+
+#define MASK_TOPAZHP_CR_DMA_SYS_ADDR_SEL_STATUS 0x02000000
+#define SHIFT_TOPAZHP_CR_DMA_SYS_ADDR_SEL_STATUS 25
+#define REGNUM_TOPAZHP_CR_DMA_SYS_ADDR_SEL_STATUS 0x00E4
+#define SIGNED_TOPAZHP_CR_DMA_SYS_ADDR_SEL_STATUS 0
+
+/* Register CR_PROC_ESB_ACCESS_CONTROL */
+#define TOPAZHP_CR_PROC_ESB_ACCESS_CONTROL 0x00EC
+#define MASK_TOPAZHP_CR_PROC_ESB_ADDR 0x00003FF0
+#define SHIFT_TOPAZHP_CR_PROC_ESB_ADDR 4
+#define REGNUM_TOPAZHP_CR_PROC_ESB_ADDR 0x00EC
+#define SIGNED_TOPAZHP_CR_PROC_ESB_ADDR 0
+
+#define MASK_TOPAZHP_CR_PROC_ESB_READ_N_WRITE 0x00010000
+#define SHIFT_TOPAZHP_CR_PROC_ESB_READ_N_WRITE 16
+#define REGNUM_TOPAZHP_CR_PROC_ESB_READ_N_WRITE 0x00EC
+#define SIGNED_TOPAZHP_CR_PROC_ESB_READ_N_WRITE 0
+
+#define MASK_TOPAZHP_CR_PROC_ESB_OP_VALID 0x00020000
+#define SHIFT_TOPAZHP_CR_PROC_ESB_OP_VALID 17
+#define REGNUM_TOPAZHP_CR_PROC_ESB_OP_VALID 0x00EC
+#define SIGNED_TOPAZHP_CR_PROC_ESB_OP_VALID 0
+
+#define MASK_TOPAZHP_CR_PROC_ACCESS_FLAG 0x03000000
+#define SHIFT_TOPAZHP_CR_PROC_ACCESS_FLAG 24
+#define REGNUM_TOPAZHP_CR_PROC_ACCESS_FLAG 0x00EC
+#define SIGNED_TOPAZHP_CR_PROC_ACCESS_FLAG 0
+
+/* Register CR_PROC_ESB_ACCESS_WORD0 */
+#define TOPAZHP_CR_PROC_ESB_ACCESS_WORD0 0x00F0
+#define MASK_TOPAZHP_CR_PROC_ESB_WORD0 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PROC_ESB_WORD0 0
+#define REGNUM_TOPAZHP_CR_PROC_ESB_WORD0 0x00F0
+#define SIGNED_TOPAZHP_CR_PROC_ESB_WORD0 0
+
+/* Register CR_PROC_ESB_ACCESS_WORD1 */
+#define TOPAZHP_CR_PROC_ESB_ACCESS_WORD1 0x00F4
+#define MASK_TOPAZHP_CR_PROC_ESB_WORD1 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PROC_ESB_WORD1 0
+#define REGNUM_TOPAZHP_CR_PROC_ESB_WORD1 0x00F4
+#define SIGNED_TOPAZHP_CR_PROC_ESB_WORD1 0
+
+/* Register CR_PROC_ESB_ACCESS_WORD2 */
+#define TOPAZHP_CR_PROC_ESB_ACCESS_WORD2 0x00F8
+#define MASK_TOPAZHP_CR_PROC_ESB_WORD2 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PROC_ESB_WORD2 0
+#define REGNUM_TOPAZHP_CR_PROC_ESB_WORD2 0x00F8
+#define SIGNED_TOPAZHP_CR_PROC_ESB_WORD2 0
+
+/* Register CR_PROC_ESB_ACCESS_WORD3 */
+#define TOPAZHP_CR_PROC_ESB_ACCESS_WORD3 0x00FC
+#define MASK_TOPAZHP_CR_PROC_ESB_WORD3 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PROC_ESB_WORD3 0
+#define REGNUM_TOPAZHP_CR_PROC_ESB_WORD3 0x00FC
+#define SIGNED_TOPAZHP_CR_PROC_ESB_WORD3 0
+
+/* Register CR_SEQ_CUR_PIC_LUMA_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_CUR_PIC_LUMA_BASE_ADDR 0x0100
+#define MASK_TOPAZHP_CR_CUR_PIC_LUMA_BASE_ADDR 0xFFFFFFF0
+#define SHIFT_TOPAZHP_CR_CUR_PIC_LUMA_BASE_ADDR 4
+#define REGNUM_TOPAZHP_CR_CUR_PIC_LUMA_BASE_ADDR 0x0100
+#define SIGNED_TOPAZHP_CR_CUR_PIC_LUMA_BASE_ADDR 0
+
+/* Register CR_SEQ_CUR_PIC_CB_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_CUR_PIC_CB_BASE_ADDR 0x0104
+#define MASK_TOPAZHP_CR_CUR_PIC_CB_BASE_ADDR 0xFFFFFFF0
+#define SHIFT_TOPAZHP_CR_CUR_PIC_CB_BASE_ADDR 4
+#define REGNUM_TOPAZHP_CR_CUR_PIC_CB_BASE_ADDR 0x0104
+#define SIGNED_TOPAZHP_CR_CUR_PIC_CB_BASE_ADDR 0
+
+/* Register CR_SEQ_CUR_PIC_CR_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_CUR_PIC_CR_BASE_ADDR 0x0108
+#define MASK_TOPAZHP_CR_CUR_PIC_CR_BASE_ADDR 0xFFFFFFF0
+#define SHIFT_TOPAZHP_CR_CUR_PIC_CR_BASE_ADDR 4
+#define REGNUM_TOPAZHP_CR_CUR_PIC_CR_BASE_ADDR 0x0108
+#define SIGNED_TOPAZHP_CR_CUR_PIC_CR_BASE_ADDR 0
+
+/* Register CR_SEQ_CUR_PIC_ROW_STRIDE */
+#define TOPAZHP_CR_SEQ_CUR_PIC_ROW_STRIDE 0x010C
+#define MASK_TOPAZHP_CR_CUR_PIC_LUMA_STRIDE 0x0000FFC0
+#define SHIFT_TOPAZHP_CR_CUR_PIC_LUMA_STRIDE 6
+#define REGNUM_TOPAZHP_CR_CUR_PIC_LUMA_STRIDE 0x010C
+#define SIGNED_TOPAZHP_CR_CUR_PIC_LUMA_STRIDE 0
+
+#define MASK_TOPAZHP_CR_CUR_PIC_CHROMA_STRIDE 0xFFC00000
+#define SHIFT_TOPAZHP_CR_CUR_PIC_CHROMA_STRIDE 22
+#define REGNUM_TOPAZHP_CR_CUR_PIC_CHROMA_STRIDE 0x010C
+#define SIGNED_TOPAZHP_CR_CUR_PIC_CHROMA_STRIDE 0
+
+/* Register CR_SEQ_REF_PIC0_LUMA_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_REF_PIC0_LUMA_BASE_ADDR 0x0110
+#define MASK_TOPAZHP_CR_REF_PIC0_LUMA_BASE_ADDR 0xFFFFFF00
+#define SHIFT_TOPAZHP_CR_REF_PIC0_LUMA_BASE_ADDR 8
+#define REGNUM_TOPAZHP_CR_REF_PIC0_LUMA_BASE_ADDR 0x0110
+#define SIGNED_TOPAZHP_CR_REF_PIC0_LUMA_BASE_ADDR 0
+
+/* Register CR_SEQ_REF_PIC0_CHROMA_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_REF_PIC0_CHROMA_BASE_ADDR 0x0114
+#define MASK_TOPAZHP_CR_REF_PIC0_CHROMA_BASE_ADDR 0xFFFFFF00
+#define SHIFT_TOPAZHP_CR_REF_PIC0_CHROMA_BASE_ADDR 8
+#define REGNUM_TOPAZHP_CR_REF_PIC0_CHROMA_BASE_ADDR 0x0114
+#define SIGNED_TOPAZHP_CR_REF_PIC0_CHROMA_BASE_ADDR 0
+
+/* Register CR_SEQ_REF_PIC1_LUMA_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_REF_PIC1_LUMA_BASE_ADDR 0x0118
+#define MASK_TOPAZHP_CR_REF_PIC1_LUMA_BASE_ADDR 0xFFFFFF00
+#define SHIFT_TOPAZHP_CR_REF_PIC1_LUMA_BASE_ADDR 8
+#define REGNUM_TOPAZHP_CR_REF_PIC1_LUMA_BASE_ADDR 0x0118
+#define SIGNED_TOPAZHP_CR_REF_PIC1_LUMA_BASE_ADDR 0
+
+/* Register CR_SEQ_REF_PIC1_CHROMA_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_REF_PIC1_CHROMA_BASE_ADDR 0x011C
+#define MASK_TOPAZHP_CR_REF_PIC1_CHROMA_BASE_ADDR 0xFFFFFF00
+#define SHIFT_TOPAZHP_CR_REF_PIC1_CHROMA_BASE_ADDR 8
+#define REGNUM_TOPAZHP_CR_REF_PIC1_CHROMA_BASE_ADDR 0x011C
+#define SIGNED_TOPAZHP_CR_REF_PIC1_CHROMA_BASE_ADDR 0
+
+/* Register CR_SEQ_CUR_PIC_CONFIG */
+#define TOPAZHP_CR_SEQ_CUR_PIC_CONFIG 0x0120
+#define MASK_TOPAZHP_CR_SEQ_CUR_PIC_EXT_FETCH 0x00000001
+#define SHIFT_TOPAZHP_CR_SEQ_CUR_PIC_EXT_FETCH 0
+#define REGNUM_TOPAZHP_CR_SEQ_CUR_PIC_EXT_FETCH 0x0120
+#define SIGNED_TOPAZHP_CR_SEQ_CUR_PIC_EXT_FETCH 0
+
+#define MASK_TOPAZHP_CR_CUR_TRANSPOSE 0x00000010
+#define SHIFT_TOPAZHP_CR_CUR_TRANSPOSE 4
+#define REGNUM_TOPAZHP_CR_CUR_TRANSPOSE 0x0120
+#define SIGNED_TOPAZHP_CR_CUR_TRANSPOSE 0
+
+#define MASK_TOPAZHP_CR_CUR_HORIZONTAL_MIRROR 0x00000020
+#define SHIFT_TOPAZHP_CR_CUR_HORIZONTAL_MIRROR 5
+#define REGNUM_TOPAZHP_CR_CUR_HORIZONTAL_MIRROR 0x0120
+#define SIGNED_TOPAZHP_CR_CUR_HORIZONTAL_MIRROR 0
+
+#define MASK_TOPAZHP_CR_CUR_VERTICAL_MIRROR 0x00000040
+#define SHIFT_TOPAZHP_CR_CUR_VERTICAL_MIRROR 6
+#define REGNUM_TOPAZHP_CR_CUR_VERTICAL_MIRROR 0x0120
+#define SIGNED_TOPAZHP_CR_CUR_VERTICAL_MIRROR 0
+
+/* Register CR_SEQ_CUR_PIC_SIZE */
+#define TOPAZHP_CR_SEQ_CUR_PIC_SIZE 0x0124
+#define MASK_TOPAZHP_CR_CUR_PIC_WIDTH_MBS_MIN1 0x000000FF
+#define SHIFT_TOPAZHP_CR_CUR_PIC_WIDTH_MBS_MIN1 0
+#define REGNUM_TOPAZHP_CR_CUR_PIC_WIDTH_MBS_MIN1 0x0124
+#define SIGNED_TOPAZHP_CR_CUR_PIC_WIDTH_MBS_MIN1 0
+
+#define MASK_TOPAZHP_CR_CUR_PIC_HEIGHT_MBS_MIN1 0x00FF0000
+#define SHIFT_TOPAZHP_CR_CUR_PIC_HEIGHT_MBS_MIN1 16
+#define REGNUM_TOPAZHP_CR_CUR_PIC_HEIGHT_MBS_MIN1 0x0124
+#define SIGNED_TOPAZHP_CR_CUR_PIC_HEIGHT_MBS_MIN1 0
+
+/* Register CR_SEQ_RECON_LUMA_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_RECON_LUMA_BASE_ADDR 0x0128
+#define MASK_TOPAZHP_CR_RECON_LUMA_BASE_ADDR 0xFFFFFF00
+#define SHIFT_TOPAZHP_CR_RECON_LUMA_BASE_ADDR 8
+#define REGNUM_TOPAZHP_CR_RECON_LUMA_BASE_ADDR 0x0128
+#define SIGNED_TOPAZHP_CR_RECON_LUMA_BASE_ADDR 0
+
+/* Register CR_SEQ_RECON_CHROMA_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_RECON_CHROMA_BASE_ADDR 0x012C
+#define MASK_TOPAZHP_CR_RECON_CHROMA_BASE_ADDR 0xFFFFFF00
+#define SHIFT_TOPAZHP_CR_RECON_CHROMA_BASE_ADDR 8
+#define REGNUM_TOPAZHP_CR_RECON_CHROMA_BASE_ADDR 0x012C
+#define SIGNED_TOPAZHP_CR_RECON_CHROMA_BASE_ADDR 0
+
+/* Register CR_SEQ_ABOVE_PARAM_BASE_ADDR */
+#define TOPAZHP_CR_SEQ_ABOVE_PARAM_BASE_ADDR 0x0130
+#define MASK_TOPAZHP_CR_ABOVE_PARAM_BASE_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_ABOVE_PARAM_BASE_ADDR 6
+#define REGNUM_TOPAZHP_CR_ABOVE_PARAM_BASE_ADDR 0x0130
+#define SIGNED_TOPAZHP_CR_ABOVE_PARAM_BASE_ADDR 0
+
+/* Register CR_SEQ_TEMPORAL_COLOCATED_IN_ADDR */
+#define TOPAZHP_CR_SEQ_TEMPORAL_COLOCATED_IN_ADDR 0x0134
+#define MASK_TOPAZHP_CR_TEMPORAL_COLOC_IN_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_TEMPORAL_COLOC_IN_ADDR 6
+#define REGNUM_TOPAZHP_CR_TEMPORAL_COLOC_IN_ADDR 0x0134
+#define SIGNED_TOPAZHP_CR_TEMPORAL_COLOC_IN_ADDR 0
+
+/* Register CR_SEQ_TEMPORAL_PIC0_MV_IN_ADDR */
+#define TOPAZHP_CR_SEQ_TEMPORAL_PIC0_MV_IN_ADDR 0x0138
+#define MASK_TOPAZHP_CR_TEMPORAL_PIC0_IN_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_TEMPORAL_PIC0_IN_ADDR 6
+#define REGNUM_TOPAZHP_CR_TEMPORAL_PIC0_IN_ADDR 0x0138
+#define SIGNED_TOPAZHP_CR_TEMPORAL_PIC0_IN_ADDR 0
+
+/* Register CR_SEQ_TEMPORAL_PIC1_MV_IN_ADDR */
+#define TOPAZHP_CR_SEQ_TEMPORAL_PIC1_MV_IN_ADDR 0x013C
+#define MASK_TOPAZHP_CR_TEMPORAL_PIC1_IN_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_TEMPORAL_PIC1_IN_ADDR 6
+#define REGNUM_TOPAZHP_CR_TEMPORAL_PIC1_IN_ADDR 0x013C
+#define SIGNED_TOPAZHP_CR_TEMPORAL_PIC1_IN_ADDR 0
+
+/* Register CR_SEQ_TEMPORAL_COLOCATED_OUT_ADDR */
+#define TOPAZHP_CR_SEQ_TEMPORAL_COLOCATED_OUT_ADDR 0x0140
+#define MASK_TOPAZHP_CR_TEMPORAL_COLOC_OUT_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_TEMPORAL_COLOC_OUT_ADDR 6
+#define REGNUM_TOPAZHP_CR_TEMPORAL_COLOC_OUT_ADDR 0x0140
+#define SIGNED_TOPAZHP_CR_TEMPORAL_COLOC_OUT_ADDR 0
+
+/* Register CR_SEQ_TEMPORAL_PIC0_MV_OUT_ADDR */
+#define TOPAZHP_CR_SEQ_TEMPORAL_PIC0_MV_OUT_ADDR 0x0144
+#define MASK_TOPAZHP_CR_TEMPORAL_PIC0_OUT_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_TEMPORAL_PIC0_OUT_ADDR 6
+#define REGNUM_TOPAZHP_CR_TEMPORAL_PIC0_OUT_ADDR 0x0144
+#define SIGNED_TOPAZHP_CR_TEMPORAL_PIC0_OUT_ADDR 0
+
+/* Register CR_SEQ_TEMPORAL_PIC1_MV_OUT_ADDR */
+#define TOPAZHP_CR_SEQ_TEMPORAL_PIC1_MV_OUT_ADDR 0x0148
+#define MASK_TOPAZHP_CR_TEMPORAL_PIC1_OUT_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_TEMPORAL_PIC1_OUT_ADDR 6
+#define REGNUM_TOPAZHP_CR_TEMPORAL_PIC1_OUT_ADDR 0x0148
+#define SIGNED_TOPAZHP_CR_TEMPORAL_PIC1_OUT_ADDR 0
+
+/* Register CR_SEQ_MB_FIRST_STAGE_OUT_ADDR */
+#define TOPAZHP_CR_SEQ_MB_FIRST_STAGE_OUT_ADDR 0x014C
+#define MASK_TOPAZHP_CR_MB_FIRST_STAGE_OUT_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_MB_FIRST_STAGE_OUT_ADDR 6
+#define REGNUM_TOPAZHP_CR_MB_FIRST_STAGE_OUT_ADDR 0x014C
+#define SIGNED_TOPAZHP_CR_MB_FIRST_STAGE_OUT_ADDR 0
+
+/* Register CR_SEQ_MB_CONTROL_IN_ADDR */
+#define TOPAZHP_CR_SEQ_MB_CONTROL_IN_ADDR 0x0150
+#define MASK_TOPAZHP_CR_MB_CONTROL_IN_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_MB_CONTROL_IN_ADDR 6
+#define REGNUM_TOPAZHP_CR_MB_CONTROL_IN_ADDR 0x0150
+#define SIGNED_TOPAZHP_CR_MB_CONTROL_IN_ADDR 0
+
+/* Register CR_SEQUENCER_CONFIG */
+#define TOPAZHP_CR_SEQUENCER_CONFIG 0x0154
+#define MASK_TOPAZHP_CR_ENCODER_STANDARD 0x00000007
+#define SHIFT_TOPAZHP_CR_ENCODER_STANDARD 0
+#define REGNUM_TOPAZHP_CR_ENCODER_STANDARD 0x0154
+#define SIGNED_TOPAZHP_CR_ENCODER_STANDARD 0
+#define TOPAZHP_CR_ENCODER_STANDARD_MPEG2              0x00000004              /* MPEG2 encode */
+#define TOPAZHP_CR_ENCODER_STANDARD_JPEG               0x00000003              /* JPEG encode */
+#define TOPAZHP_CR_ENCODER_STANDARD_H264               0x00000002              /* H264 encode */
+#define TOPAZHP_CR_ENCODER_STANDARD_MPEG4              0x00000001              /* MPEG4 encode */
+#define TOPAZHP_CR_ENCODER_STANDARD_H263               0x00000000              /* H263 encode */
+
+#define MASK_TOPAZHP_CR_FRAME_STORE_FORMAT 0x00000030
+#define SHIFT_TOPAZHP_CR_FRAME_STORE_FORMAT 4
+#define REGNUM_TOPAZHP_CR_FRAME_STORE_FORMAT 0x0154
+#define SIGNED_TOPAZHP_CR_FRAME_STORE_FORMAT 0
+#define TOPAZHP_CR_FRAME_STORE_FORMAT_UYVY             0x00000003              /* 4:2:2 frame, with Luma, Cb and Cr all interleaved (hardware will decimate
+ chroma to encode 4:2:0 chroma) */
+#define TOPAZHP_CR_FRAME_STORE_FORMAT_YUYV             0x00000002              /* 4:2:2 frame, with Luma, Cb and Cr all interleaved (hardware will decimate
+ chroma to encode 4:2:0 chroma) */
+#define TOPAZHP_CR_FRAME_STORE_FORMAT_420PL12YUV               0x00000001              /* 4:2:0 frame, with Chroma in single interleaved plane (if the frame store
+ actually contains 4:2:2 chroma, the chroma stride can be doubled so that it is read as 4:2:0) */
+#define TOPAZHP_CR_FRAME_STORE_FORMAT_420PL8YUV                0x00000000              /* 4:2:0 frame, with Luma, Cb and Cr all in separate planes (if the frame
+ store actually contains 4:2:2 chroma, the chroma stride can be doubled so that it is read as 4:2:0) */
+
+#define MASK_TOPAZHP_CR_FRAME_STORE_CHROMA_SWAP 0x00000040
+#define SHIFT_TOPAZHP_CR_FRAME_STORE_CHROMA_SWAP 6
+#define REGNUM_TOPAZHP_CR_FRAME_STORE_CHROMA_SWAP 0x0154
+#define SIGNED_TOPAZHP_CR_FRAME_STORE_CHROMA_SWAP 0
+
+#define MASK_TOPAZHP_CR_FIELD_MODE  0x00000080
+#define SHIFT_TOPAZHP_CR_FIELD_MODE 7
+#define REGNUM_TOPAZHP_CR_FIELD_MODE 0x0154
+#define SIGNED_TOPAZHP_CR_FIELD_MODE 0
+
+#define MASK_TOPAZHP_CR_REF_PIC0_VALID 0x00000100
+#define SHIFT_TOPAZHP_CR_REF_PIC0_VALID 8
+#define REGNUM_TOPAZHP_CR_REF_PIC0_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_REF_PIC0_VALID 0
+
+#define MASK_TOPAZHP_CR_REF_PIC1_VALID 0x00000200
+#define SHIFT_TOPAZHP_CR_REF_PIC1_VALID 9
+#define REGNUM_TOPAZHP_CR_REF_PIC1_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_REF_PIC1_VALID 0
+
+#define MASK_TOPAZHP_CR_REF_PIC1_EQUAL_PIC0 0x00000400
+#define SHIFT_TOPAZHP_CR_REF_PIC1_EQUAL_PIC0 10
+#define REGNUM_TOPAZHP_CR_REF_PIC1_EQUAL_PIC0 0x0154
+#define SIGNED_TOPAZHP_CR_REF_PIC1_EQUAL_PIC0 0
+
+#define MASK_TOPAZHP_CR_ABOVE_OUT_OF_SLICE_VALID 0x00000800
+#define SHIFT_TOPAZHP_CR_ABOVE_OUT_OF_SLICE_VALID 11
+#define REGNUM_TOPAZHP_CR_ABOVE_OUT_OF_SLICE_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_ABOVE_OUT_OF_SLICE_VALID 0
+
+#define MASK_TOPAZHP_CR_TEMPORAL_COL_IN_VALID 0x00001000
+#define SHIFT_TOPAZHP_CR_TEMPORAL_COL_IN_VALID 12
+#define REGNUM_TOPAZHP_CR_TEMPORAL_COL_IN_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_TEMPORAL_COL_IN_VALID 0
+
+#define MASK_TOPAZHP_CR_TEMPORAL_PIC0_BELOW_IN_VALID 0x00002000
+#define SHIFT_TOPAZHP_CR_TEMPORAL_PIC0_BELOW_IN_VALID 13
+#define REGNUM_TOPAZHP_CR_TEMPORAL_PIC0_BELOW_IN_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_TEMPORAL_PIC0_BELOW_IN_VALID 0
+
+#define MASK_TOPAZHP_CR_TEMPORAL_PIC1_BELOW_IN_VALID 0x00004000
+#define SHIFT_TOPAZHP_CR_TEMPORAL_PIC1_BELOW_IN_VALID 14
+#define REGNUM_TOPAZHP_CR_TEMPORAL_PIC1_BELOW_IN_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_TEMPORAL_PIC1_BELOW_IN_VALID 0
+
+#define MASK_TOPAZHP_CR_DEBLOCK_ENABLE 0x00008000
+#define SHIFT_TOPAZHP_CR_DEBLOCK_ENABLE 15
+#define REGNUM_TOPAZHP_CR_DEBLOCK_ENABLE 0x0154
+#define SIGNED_TOPAZHP_CR_DEBLOCK_ENABLE 0
+
+#define MASK_TOPAZHP_CR_WRITE_TEMPORAL_COL_VALID 0x00010000
+#define SHIFT_TOPAZHP_CR_WRITE_TEMPORAL_COL_VALID 16
+#define REGNUM_TOPAZHP_CR_WRITE_TEMPORAL_COL_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_WRITE_TEMPORAL_COL_VALID 0
+
+#define MASK_TOPAZHP_CR_WRITE_TEMPORAL_PIC0_BELOW_VALID 0x00020000
+#define SHIFT_TOPAZHP_CR_WRITE_TEMPORAL_PIC0_BELOW_VALID 17
+#define REGNUM_TOPAZHP_CR_WRITE_TEMPORAL_PIC0_BELOW_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_WRITE_TEMPORAL_PIC0_BELOW_VALID 0
+
+#define MASK_TOPAZHP_CR_WRITE_TEMPORAL_PIC1_BELOW_VALID 0x00040000
+#define SHIFT_TOPAZHP_CR_WRITE_TEMPORAL_PIC1_BELOW_VALID 18
+#define REGNUM_TOPAZHP_CR_WRITE_TEMPORAL_PIC1_BELOW_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_WRITE_TEMPORAL_PIC1_BELOW_VALID 0
+
+#define MASK_TOPAZHP_CR_WRITE_RECON_PIC 0x00080000
+#define SHIFT_TOPAZHP_CR_WRITE_RECON_PIC 19
+#define REGNUM_TOPAZHP_CR_WRITE_RECON_PIC 0x0154
+#define SIGNED_TOPAZHP_CR_WRITE_RECON_PIC 0
+
+#define MASK_TOPAZHP_CR_WRITE_MB_FIRST_STAGE_VALID 0x00200000
+#define SHIFT_TOPAZHP_CR_WRITE_MB_FIRST_STAGE_VALID 21
+#define REGNUM_TOPAZHP_CR_WRITE_MB_FIRST_STAGE_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_WRITE_MB_FIRST_STAGE_VALID 0
+
+#define MASK_TOPAZHP_CR_FIRST_STAGE_ONLY 0x00400000
+#define SHIFT_TOPAZHP_CR_FIRST_STAGE_ONLY 22
+#define REGNUM_TOPAZHP_CR_FIRST_STAGE_ONLY 0x0154
+#define SIGNED_TOPAZHP_CR_FIRST_STAGE_ONLY 0
+
+#define MASK_TOPAZHP_CR_MB_CONTROL_IN_VALID 0x00800000
+#define SHIFT_TOPAZHP_CR_MB_CONTROL_IN_VALID 23
+#define REGNUM_TOPAZHP_CR_MB_CONTROL_IN_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_MB_CONTROL_IN_VALID 0
+
+#define MASK_TOPAZHP_CR_SPATIAL_DIRECT 0x01000000
+#define SHIFT_TOPAZHP_CR_SPATIAL_DIRECT 24
+#define REGNUM_TOPAZHP_CR_SPATIAL_DIRECT 0x0154
+#define SIGNED_TOPAZHP_CR_SPATIAL_DIRECT 0
+
+#define MASK_TOPAZHP_CR_REF_PIC0_LONG_TERM_REF 0x02000000
+#define SHIFT_TOPAZHP_CR_REF_PIC0_LONG_TERM_REF 25
+#define REGNUM_TOPAZHP_CR_REF_PIC0_LONG_TERM_REF 0x0154
+#define SIGNED_TOPAZHP_CR_REF_PIC0_LONG_TERM_REF 0
+
+#define MASK_TOPAZHP_CR_REF_PIC1_LONG_TERM_REF 0x04000000
+#define SHIFT_TOPAZHP_CR_REF_PIC1_LONG_TERM_REF 26
+#define REGNUM_TOPAZHP_CR_REF_PIC1_LONG_TERM_REF 0x0154
+#define SIGNED_TOPAZHP_CR_REF_PIC1_LONG_TERM_REF 0
+
+#define MASK_TOPAZHP_CR_LRITC_REF_PIC1_EQUAL_PIC0 0x08000000
+#define SHIFT_TOPAZHP_CR_LRITC_REF_PIC1_EQUAL_PIC0 27
+#define REGNUM_TOPAZHP_CR_LRITC_REF_PIC1_EQUAL_PIC0 0x0154
+#define SIGNED_TOPAZHP_CR_LRITC_REF_PIC1_EQUAL_PIC0 0
+
+#define MASK_TOPAZHP_CR_BEST_MULTIPASS_OUT_VALID 0x10000000
+#define SHIFT_TOPAZHP_CR_BEST_MULTIPASS_OUT_VALID 28
+#define REGNUM_TOPAZHP_CR_BEST_MULTIPASS_OUT_VALID 0x0154
+#define SIGNED_TOPAZHP_CR_BEST_MULTIPASS_OUT_VALID 0
+
+#define MASK_TOPAZHP_CR_LIMIT_VLC_LATENCY 0x20000000
+#define SHIFT_TOPAZHP_CR_LIMIT_VLC_LATENCY 29
+#define REGNUM_TOPAZHP_CR_LIMIT_VLC_LATENCY 0x0154
+#define SIGNED_TOPAZHP_CR_LIMIT_VLC_LATENCY 0
+
+#define MASK_TOPAZHP_CR_BEST_MVS_OUT_DISABLE 0x40000000
+#define SHIFT_TOPAZHP_CR_BEST_MVS_OUT_DISABLE 30
+#define REGNUM_TOPAZHP_CR_BEST_MVS_OUT_DISABLE 0x0154
+#define SIGNED_TOPAZHP_CR_BEST_MVS_OUT_DISABLE 0
+
+/* Register CR_SLICE_CONFIG */
+#define TOPAZHP_CR_SLICE_CONFIG     0x0158
+#define MASK_TOPAZHP_CR_SLICE_START_MB_Y 0x0000FF00
+#define SHIFT_TOPAZHP_CR_SLICE_START_MB_Y 8
+#define REGNUM_TOPAZHP_CR_SLICE_START_MB_Y 0x0158
+#define SIGNED_TOPAZHP_CR_SLICE_START_MB_Y 0
+
+#define MASK_TOPAZHP_CR_SLICE_TYPE  0x00030000
+#define SHIFT_TOPAZHP_CR_SLICE_TYPE 16
+#define REGNUM_TOPAZHP_CR_SLICE_TYPE 0x0158
+#define SIGNED_TOPAZHP_CR_SLICE_TYPE 0
+#define TOPAZHP_CR_SLICE_TYPE_B_SLICE          0x00000002              /* B-slice */
+#define TOPAZHP_CR_SLICE_TYPE_P_SLICE          0x00000001              /* P-slice */
+#define TOPAZHP_CR_SLICE_TYPE_I_SLICE          0x00000000              /* I-slice */
+
+/* Register CR_SLICE_QP_CONFIG */
+#define TOPAZHP_CR_SLICE_QP_CONFIG  0x015C
+#define MASK_TOPAZHP_CR_SLICE_QPY   0x0000003F
+#define SHIFT_TOPAZHP_CR_SLICE_QPY  0
+#define REGNUM_TOPAZHP_CR_SLICE_QPY 0x015C
+#define SIGNED_TOPAZHP_CR_SLICE_QPY 0
+
+#define MASK_TOPAZHP_CR_INTRA_DC_PRECISION 0x00000300
+#define SHIFT_TOPAZHP_CR_INTRA_DC_PRECISION 8
+#define REGNUM_TOPAZHP_CR_INTRA_DC_PRECISION 0x015C
+#define SIGNED_TOPAZHP_CR_INTRA_DC_PRECISION 0
+
+/* Register CR_SEQUENCER_KICK */
+#define TOPAZHP_CR_SEQUENCER_KICK   0x0160
+#define MASK_TOPAZHP_CR_START_MB_X  0x000000FF
+#define SHIFT_TOPAZHP_CR_START_MB_X 0
+#define REGNUM_TOPAZHP_CR_START_MB_X 0x0160
+#define SIGNED_TOPAZHP_CR_START_MB_X 0
+
+#define MASK_TOPAZHP_CR_START_MB_Y  0x0000FF00
+#define SHIFT_TOPAZHP_CR_START_MB_Y 8
+#define REGNUM_TOPAZHP_CR_START_MB_Y 0x0160
+#define SIGNED_TOPAZHP_CR_START_MB_Y 0
+
+#define MASK_TOPAZHP_CR_KICK_COUNT  0x00FF0000
+#define SHIFT_TOPAZHP_CR_KICK_COUNT 16
+#define REGNUM_TOPAZHP_CR_KICK_COUNT 0x0160
+#define SIGNED_TOPAZHP_CR_KICK_COUNT 0
+
+#define MASK_TOPAZHP_CR_KICK_START_OF_SLICE 0x01000000
+#define SHIFT_TOPAZHP_CR_KICK_START_OF_SLICE 24
+#define REGNUM_TOPAZHP_CR_KICK_START_OF_SLICE 0x0160
+#define SIGNED_TOPAZHP_CR_KICK_START_OF_SLICE 0
+
+#define MASK_TOPAZHP_CR_KICK_END_OF_SLICE 0x02000000
+#define SHIFT_TOPAZHP_CR_KICK_END_OF_SLICE 25
+#define REGNUM_TOPAZHP_CR_KICK_END_OF_SLICE 0x0160
+#define SIGNED_TOPAZHP_CR_KICK_END_OF_SLICE 0
+
+#define MASK_TOPAZHP_CR_KICK_END_OF_PICTURE 0x04000000
+#define SHIFT_TOPAZHP_CR_KICK_END_OF_PICTURE 26
+#define REGNUM_TOPAZHP_CR_KICK_END_OF_PICTURE 0x0160
+#define SIGNED_TOPAZHP_CR_KICK_END_OF_PICTURE 0
+
+#define MASK_TOPAZHP_CR_FORCE_SKIP  0x10000000
+#define SHIFT_TOPAZHP_CR_FORCE_SKIP 28
+#define REGNUM_TOPAZHP_CR_FORCE_SKIP 0x0160
+#define SIGNED_TOPAZHP_CR_FORCE_SKIP 0
+
+#define MASK_TOPAZHP_CR_FORCE_INTRA 0x20000000
+#define SHIFT_TOPAZHP_CR_FORCE_INTRA 29
+#define REGNUM_TOPAZHP_CR_FORCE_INTRA 0x0160
+#define SIGNED_TOPAZHP_CR_FORCE_INTRA 0
+
+/* Register CR_SEQUENCER_STATUS */
+#define TOPAZHP_CR_SEQUENCER_STATUS 0x0164
+#define MASK_TOPAZHP_CR_CUR_MB_X_STATUS 0x000000FF
+#define SHIFT_TOPAZHP_CR_CUR_MB_X_STATUS 0
+#define REGNUM_TOPAZHP_CR_CUR_MB_X_STATUS 0x0164
+#define SIGNED_TOPAZHP_CR_CUR_MB_X_STATUS 0
+
+#define MASK_TOPAZHP_CR_CUR_MB_Y_STATUS 0x0000FF00
+#define SHIFT_TOPAZHP_CR_CUR_MB_Y_STATUS 8
+#define REGNUM_TOPAZHP_CR_CUR_MB_Y_STATUS 0x0164
+#define SIGNED_TOPAZHP_CR_CUR_MB_Y_STATUS 0
+
+#define MASK_TOPAZHP_CR_KICK_COUNT_STATUS 0x00FF0000
+#define SHIFT_TOPAZHP_CR_KICK_COUNT_STATUS 16
+#define REGNUM_TOPAZHP_CR_KICK_COUNT_STATUS 0x0164
+#define SIGNED_TOPAZHP_CR_KICK_COUNT_STATUS 0
+
+#define MASK_TOPAZHP_CR_KICK_START_OF_SLICE_STATUS 0x01000000
+#define SHIFT_TOPAZHP_CR_KICK_START_OF_SLICE_STATUS 24
+#define REGNUM_TOPAZHP_CR_KICK_START_OF_SLICE_STATUS 0x0164
+#define SIGNED_TOPAZHP_CR_KICK_START_OF_SLICE_STATUS 0
+
+#define MASK_TOPAZHP_CR_KICK_END_OF_SLICE_STATUS 0x02000000
+#define SHIFT_TOPAZHP_CR_KICK_END_OF_SLICE_STATUS 25
+#define REGNUM_TOPAZHP_CR_KICK_END_OF_SLICE_STATUS 0x0164
+#define SIGNED_TOPAZHP_CR_KICK_END_OF_SLICE_STATUS 0
+
+#define MASK_TOPAZHP_CR_KICK_END_OF_PICTURE_STATUS 0x04000000
+#define SHIFT_TOPAZHP_CR_KICK_END_OF_PICTURE_STATUS 26
+#define REGNUM_TOPAZHP_CR_KICK_END_OF_PICTURE_STATUS 0x0164
+#define SIGNED_TOPAZHP_CR_KICK_END_OF_PICTURE_STATUS 0
+
+#define MASK_TOPAZHP_CR_LRITC_CACHE_FLUSH_STATUS 0x08000000
+#define SHIFT_TOPAZHP_CR_LRITC_CACHE_FLUSH_STATUS 27
+#define REGNUM_TOPAZHP_CR_LRITC_CACHE_FLUSH_STATUS 0x0164
+#define SIGNED_TOPAZHP_CR_LRITC_CACHE_FLUSH_STATUS 0
+
+#define MASK_TOPAZHP_CR_FORCE_SKIP_STATUS 0x10000000
+#define SHIFT_TOPAZHP_CR_FORCE_SKIP_STATUS 28
+#define REGNUM_TOPAZHP_CR_FORCE_SKIP_STATUS 0x0164
+#define SIGNED_TOPAZHP_CR_FORCE_SKIP_STATUS 0
+
+#define MASK_TOPAZHP_CR_FORCE_INTRA_STATUS 0x20000000
+#define SHIFT_TOPAZHP_CR_FORCE_INTRA_STATUS 29
+#define REGNUM_TOPAZHP_CR_FORCE_INTRA_STATUS 0x0164
+#define SIGNED_TOPAZHP_CR_FORCE_INTRA_STATUS 0
+
+/* Register CR_SEQ_BEST_MULTIPASS_OUT_ADDR */
+#define TOPAZHP_CR_SEQ_BEST_MULTIPASS_OUT_ADDR 0x0168
+#define MASK_TOPAZHP_CR_BEST_MULTIPASS_OUT_ADDR 0xFFFFFFC0
+#define SHIFT_TOPAZHP_CR_BEST_MULTIPASS_OUT_ADDR 6
+#define REGNUM_TOPAZHP_CR_BEST_MULTIPASS_OUT_ADDR 0x0168
+#define SIGNED_TOPAZHP_CR_BEST_MULTIPASS_OUT_ADDR 0
+
+/* Register CR_MVCLIP_CONFIG */
+#define TOPAZHP_CR_MVCLIP_CONFIG    0x016C
+#define MASK_TOPAZHP_CR_SLICE_END_MB_Y 0x0000FF00
+#define SHIFT_TOPAZHP_CR_SLICE_END_MB_Y 8
+#define REGNUM_TOPAZHP_CR_SLICE_END_MB_Y 0x016C
+#define SIGNED_TOPAZHP_CR_SLICE_END_MB_Y 0
+
+#define MASK_TOPAZHP_CR_MVCALC_RESTRICT_PICTURE 0x00010000
+#define SHIFT_TOPAZHP_CR_MVCALC_RESTRICT_PICTURE 16
+#define REGNUM_TOPAZHP_CR_MVCALC_RESTRICT_PICTURE 0x016C
+#define SIGNED_TOPAZHP_CR_MVCALC_RESTRICT_PICTURE 0
+
+#define MASK_TOPAZHP_CR_MVCALC_RESTRICT_SLICE 0x00020000
+#define SHIFT_TOPAZHP_CR_MVCALC_RESTRICT_SLICE 17
+#define REGNUM_TOPAZHP_CR_MVCALC_RESTRICT_SLICE 0x016C
+#define SIGNED_TOPAZHP_CR_MVCALC_RESTRICT_SLICE 0
+
+/* Register CR_MVCALC_CONFIG */
+#define TOPAZHP_CR_MVCALC_CONFIG    0x0170
+#define MASK_TOPAZHP_CR_MVCALC_GRID_MB_X_STEP 0x0000000F
+#define SHIFT_TOPAZHP_CR_MVCALC_GRID_MB_X_STEP 0
+#define REGNUM_TOPAZHP_CR_MVCALC_GRID_MB_X_STEP 0x0170
+#define SIGNED_TOPAZHP_CR_MVCALC_GRID_MB_X_STEP 0
+
+#define MASK_TOPAZHP_CR_MVCALC_GRID_MB_Y_STEP 0x00000F00
+#define SHIFT_TOPAZHP_CR_MVCALC_GRID_MB_Y_STEP 8
+#define REGNUM_TOPAZHP_CR_MVCALC_GRID_MB_Y_STEP 0x0170
+#define SIGNED_TOPAZHP_CR_MVCALC_GRID_MB_Y_STEP 0
+
+#define MASK_TOPAZHP_CR_MVCALC_GRID_SUB_STEP 0x000F0000
+#define SHIFT_TOPAZHP_CR_MVCALC_GRID_SUB_STEP 16
+#define REGNUM_TOPAZHP_CR_MVCALC_GRID_SUB_STEP 0x0170
+#define SIGNED_TOPAZHP_CR_MVCALC_GRID_SUB_STEP 0
+
+#define MASK_TOPAZHP_CR_MVCALC_GRID_DISABLE 0x00800000
+#define SHIFT_TOPAZHP_CR_MVCALC_GRID_DISABLE 23
+#define REGNUM_TOPAZHP_CR_MVCALC_GRID_DISABLE 0x0170
+#define SIGNED_TOPAZHP_CR_MVCALC_GRID_DISABLE 0
+
+#define MASK_TOPAZHP_CR_MVCALC_IPE0_JITTER_FACTOR 0x03000000
+#define SHIFT_TOPAZHP_CR_MVCALC_IPE0_JITTER_FACTOR 24
+#define REGNUM_TOPAZHP_CR_MVCALC_IPE0_JITTER_FACTOR 0x0170
+#define SIGNED_TOPAZHP_CR_MVCALC_IPE0_JITTER_FACTOR 0
+
+#define MASK_TOPAZHP_CR_MVCALC_IPE1_JITTER_FACTOR 0x0C000000
+#define SHIFT_TOPAZHP_CR_MVCALC_IPE1_JITTER_FACTOR 26
+#define REGNUM_TOPAZHP_CR_MVCALC_IPE1_JITTER_FACTOR 0x0170
+#define SIGNED_TOPAZHP_CR_MVCALC_IPE1_JITTER_FACTOR 0
+
+#define MASK_TOPAZHP_CR_MVCALC_JITTER_POINTER_RST 0x10000000
+#define SHIFT_TOPAZHP_CR_MVCALC_JITTER_POINTER_RST 28
+#define REGNUM_TOPAZHP_CR_MVCALC_JITTER_POINTER_RST 0x0170
+#define SIGNED_TOPAZHP_CR_MVCALC_JITTER_POINTER_RST 0
+
+#define MASK_TOPAZHP_CR_MVCALC_NO_PSEUDO_DUPLICATES 0x20000000
+#define SHIFT_TOPAZHP_CR_MVCALC_NO_PSEUDO_DUPLICATES 29
+#define REGNUM_TOPAZHP_CR_MVCALC_NO_PSEUDO_DUPLICATES 0x0170
+#define SIGNED_TOPAZHP_CR_MVCALC_NO_PSEUDO_DUPLICATES 0
+
+#define MASK_TOPAZHP_CR_MVCALC_DUP_VEC_MARGIN 0xC0000000
+#define SHIFT_TOPAZHP_CR_MVCALC_DUP_VEC_MARGIN 30
+#define REGNUM_TOPAZHP_CR_MVCALC_DUP_VEC_MARGIN 0x0170
+#define SIGNED_TOPAZHP_CR_MVCALC_DUP_VEC_MARGIN 0
+
+/* Register CR_MVCALC_COLOCATED */
+#define TOPAZHP_CR_MVCALC_COLOCATED 0x0174
+#define MASK_TOPAZHP_CR_COL_DIST_SCALE_FACT 0x000007FF
+#define SHIFT_TOPAZHP_CR_COL_DIST_SCALE_FACT 0
+#define REGNUM_TOPAZHP_CR_COL_DIST_SCALE_FACT 0x0174
+#define SIGNED_TOPAZHP_CR_COL_DIST_SCALE_FACT 0
+
+/* Register CR_MVCALC_BELOW */
+#define TOPAZHP_CR_MVCALC_BELOW     0x0178
+#define MASK_TOPAZHP_CR_PIC0_DIST_SCALE_FACTOR 0x000007FF
+#define SHIFT_TOPAZHP_CR_PIC0_DIST_SCALE_FACTOR 0
+#define REGNUM_TOPAZHP_CR_PIC0_DIST_SCALE_FACTOR 0x0178
+#define SIGNED_TOPAZHP_CR_PIC0_DIST_SCALE_FACTOR 0
+
+#define MASK_TOPAZHP_CR_PIC1_DIST_SCALE_FACTOR 0x07FF0000
+#define SHIFT_TOPAZHP_CR_PIC1_DIST_SCALE_FACTOR 16
+#define REGNUM_TOPAZHP_CR_PIC1_DIST_SCALE_FACTOR 0x0178
+#define SIGNED_TOPAZHP_CR_PIC1_DIST_SCALE_FACTOR 0
+
+/* Register CR_PREFETCH_QP */
+#define TOPAZHP_CR_PREFETCH_QP      0x017C
+#define MASK_TOPAZHP_CR_SKIPPED_CODED_SCALE_IDX 0x00007000
+#define SHIFT_TOPAZHP_CR_SKIPPED_CODED_SCALE_IDX 12
+#define REGNUM_TOPAZHP_CR_SKIPPED_CODED_SCALE_IDX 0x017C
+#define SIGNED_TOPAZHP_CR_SKIPPED_CODED_SCALE_IDX 0
+
+#define MASK_TOPAZHP_CR_INTER_INTRA_SCALE_IDX 0x00000700
+#define SHIFT_TOPAZHP_CR_INTER_INTRA_SCALE_IDX 8
+#define REGNUM_TOPAZHP_CR_INTER_INTRA_SCALE_IDX 0x017C
+#define SIGNED_TOPAZHP_CR_INTER_INTRA_SCALE_IDX 0
+
+#define MASK_TOPAZHP_CR_REQ_QPY     0x0000003F
+#define SHIFT_TOPAZHP_CR_REQ_QPY    0
+#define REGNUM_TOPAZHP_CR_REQ_QPY   0x017C
+#define SIGNED_TOPAZHP_CR_REQ_QPY   0
+
+/* Register CR_MB_HOST_CONTROL */
+#define TOPAZHP_CR_MB_HOST_CONTROL  0x0180
+#define MASK_TOPAZHP_CR_MB_HOST_QP  0x00000001
+#define SHIFT_TOPAZHP_CR_MB_HOST_QP 0
+#define REGNUM_TOPAZHP_CR_MB_HOST_QP 0x0180
+#define SIGNED_TOPAZHP_CR_MB_HOST_QP 0
+
+#define MASK_TOPAZHP_CR_MB_HOST_SKIPPED_CODED_SCALE 0x00000002
+#define SHIFT_TOPAZHP_CR_MB_HOST_SKIPPED_CODED_SCALE 1
+#define REGNUM_TOPAZHP_CR_MB_HOST_SKIPPED_CODED_SCALE 0x0180
+#define SIGNED_TOPAZHP_CR_MB_HOST_SKIPPED_CODED_SCALE 0
+
+#define MASK_TOPAZHP_CR_MB_HOST_INTER_INTRA_SCALE 0x00000004
+#define SHIFT_TOPAZHP_CR_MB_HOST_INTER_INTRA_SCALE 2
+#define REGNUM_TOPAZHP_CR_MB_HOST_INTER_INTRA_SCALE 0x0180
+#define SIGNED_TOPAZHP_CR_MB_HOST_INTER_INTRA_SCALE 0
+
+
+
+/* Register CR_FIELD_PARITY */
+#define TOPAZHP_CR_FIELD_PARITY     0x0188
+#define MASK_TOPAZHP_CR_CUR_PIC_PARITY 0x00000001
+#define SHIFT_TOPAZHP_CR_CUR_PIC_PARITY 0
+#define REGNUM_TOPAZHP_CR_CUR_PIC_PARITY 0x0188
+#define SIGNED_TOPAZHP_CR_CUR_PIC_PARITY 0
+
+#define MASK_TOPAZHP_CR_REF_PIC0_PARITY 0x00000002
+#define SHIFT_TOPAZHP_CR_REF_PIC0_PARITY 1
+#define REGNUM_TOPAZHP_CR_REF_PIC0_PARITY 0x0188
+#define SIGNED_TOPAZHP_CR_REF_PIC0_PARITY 0
+
+#define MASK_TOPAZHP_CR_REF_PIC1_PARITY 0x00000004
+#define SHIFT_TOPAZHP_CR_REF_PIC1_PARITY 2
+#define REGNUM_TOPAZHP_CR_REF_PIC1_PARITY 0x0188
+#define SIGNED_TOPAZHP_CR_REF_PIC1_PARITY 0
+
+/* Register CR_H264COMP_CUSTOM_QUANT_SP */
+#define TOPAZHP_CR_H264COMP_CUSTOM_QUANT_SP 0x01A0
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_SP_0 0x00003FFF
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_SP_0 0
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_SP_0 0x01A0
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_SP_0 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_SP_1 0x3FFF0000
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_SP_1 16
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_SP_1 0x01A0
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_SP_1 0
+
+/* Register CR_H264COMP_CUSTOM_QUANT_Q */
+#define TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q 0x01A4
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_0 0x0000007F
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_0 0
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_0 0x01A4
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_0 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_1 0x00007F00
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_1 8
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_1 0x01A4
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_1 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_2 0x007F0000
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_2 16
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_2 0x01A4
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_2 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_3 0x7F000000
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_3 24
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_3 0x01A4
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_Q_3 0
+
+/* Register CR_H264COMP_CONTROL */
+#define TOPAZHP_CR_H264COMP_CONTROL 0x01A8
+#define MASK_TOPAZHP_CR_H264COMP_8X8_TRANSFORM 0x00000001
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_TRANSFORM 0
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_TRANSFORM 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_TRANSFORM 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CONSTRAINED_INTRA 0x00000002
+#define SHIFT_TOPAZHP_CR_H264COMP_CONSTRAINED_INTRA 1
+#define REGNUM_TOPAZHP_CR_H264COMP_CONSTRAINED_INTRA 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_CONSTRAINED_INTRA 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_CAVLC 0x00000004
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_CAVLC 2
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_CAVLC 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_CAVLC 0
+
+#define MASK_TOPAZHP_CR_H264COMP_DEFAULT_SCALING_LIST 0x00000008
+#define SHIFT_TOPAZHP_CR_H264COMP_DEFAULT_SCALING_LIST 3
+#define REGNUM_TOPAZHP_CR_H264COMP_DEFAULT_SCALING_LIST 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_DEFAULT_SCALING_LIST 0
+#define TOPAZHP_CR_H264COMP_DEFAULT_SCALING_LIST_DEFAULT               0x00000001              /* Use the default scaling list */
+#define TOPAZHP_CR_H264COMP_DEFAULT_SCALING_LIST_FLAT          0x00000000              /* Use the flat scaling list */
+
+#define MASK_TOPAZHP_CR_H264COMP_ADAPT_ROUND_ENABLE 0x00000010
+#define SHIFT_TOPAZHP_CR_H264COMP_ADAPT_ROUND_ENABLE 4
+#define REGNUM_TOPAZHP_CR_H264COMP_ADAPT_ROUND_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_ADAPT_ROUND_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_VIDEO_CONF_ENABLE 0x00000020
+#define SHIFT_TOPAZHP_CR_H264COMP_VIDEO_CONF_ENABLE 5
+#define REGNUM_TOPAZHP_CR_H264COMP_VIDEO_CONF_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_VIDEO_CONF_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTER_LUMA_ENABLE 0x00000080
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTER_LUMA_ENABLE 7
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTER_LUMA_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTER_LUMA_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CR_ENABLE 0x00000100
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CR_ENABLE 8
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CR_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CR_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CB_ENABLE 0x00000200
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CB_ENABLE 9
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CB_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CB_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_LUMA_ENABLE 0x00000400
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_LUMA_ENABLE 10
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_LUMA_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_LUMA_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTRA_LUMA_ENABLE 0x00000800
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTRA_LUMA_ENABLE 11
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTRA_LUMA_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTRA_LUMA_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CR_ENABLE 0x00001000
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CR_ENABLE 12
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CR_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CR_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CB_ENABLE 0x00002000
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CB_ENABLE 13
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CB_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CB_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_LUMA_ENABLE 0x00004000
+#define SHIFT_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_LUMA_ENABLE 14
+#define REGNUM_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_LUMA_ENABLE 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_LUMA_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_LOSSLESS 0x00010000
+#define SHIFT_TOPAZHP_CR_H264COMP_LOSSLESS 16
+#define REGNUM_TOPAZHP_CR_H264COMP_LOSSLESS 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_LOSSLESS 0
+#define TOPAZHP_CR_H264COMP_LOSSLESS_ENABLED           0x00000001              /* Lossless mode is enabled. */
+#define TOPAZHP_CR_H264COMP_LOSSLESS_DISABLED          0x00000000              /* Lossless mode is disabled - normal H.264 encode. */
+
+#define MASK_TOPAZHP_CR_H264COMP_LOSSLESS_8X8_PREFILTER 0x00020000
+#define SHIFT_TOPAZHP_CR_H264COMP_LOSSLESS_8X8_PREFILTER 17
+#define REGNUM_TOPAZHP_CR_H264COMP_LOSSLESS_8X8_PREFILTER 0x01A8
+#define SIGNED_TOPAZHP_CR_H264COMP_LOSSLESS_8X8_PREFILTER 0
+#define TOPAZHP_CR_H264COMP_LOSSLESS_8X8_PREFILTER_FILTER              0x00000001              /* The Intra8x8 Pre-filter is performed in Lossless Mode. H.264
+ standard lossless. */
+#define TOPAZHP_CR_H264COMP_LOSSLESS_8X8_PREFILTER_BYPASS              0x00000000              /* The Intra8x8 Pre-filter is bypassed in Lossless Mode. x264
+ compatibility mode for lossless. */
+
+/* Register CR_H264COMP_INTRA_PRED_MODES */
+#define TOPAZHP_CR_H264COMP_INTRA_PRED_MODES 0x01AC
+#define MASK_TOPAZHP_CR_H264COMP_4X4_VERTICAL_ENABLE 0x00000001
+#define SHIFT_TOPAZHP_CR_H264COMP_4X4_VERTICAL_ENABLE 0
+#define REGNUM_TOPAZHP_CR_H264COMP_4X4_VERTICAL_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_4X4_VERTICAL_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_4X4_HORIZONTAL_ENABLE 0x00000002
+#define SHIFT_TOPAZHP_CR_H264COMP_4X4_HORIZONTAL_ENABLE 1
+#define REGNUM_TOPAZHP_CR_H264COMP_4X4_HORIZONTAL_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_4X4_HORIZONTAL_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_4X4_DDL_ENABLE 0x00000004
+#define SHIFT_TOPAZHP_CR_H264COMP_4X4_DDL_ENABLE 2
+#define REGNUM_TOPAZHP_CR_H264COMP_4X4_DDL_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_4X4_DDL_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_4X4_DDR_ENABLE 0x00000008
+#define SHIFT_TOPAZHP_CR_H264COMP_4X4_DDR_ENABLE 3
+#define REGNUM_TOPAZHP_CR_H264COMP_4X4_DDR_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_4X4_DDR_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_4X4_VRIGHT_ENABLE 0x00000010
+#define SHIFT_TOPAZHP_CR_H264COMP_4X4_VRIGHT_ENABLE 4
+#define REGNUM_TOPAZHP_CR_H264COMP_4X4_VRIGHT_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_4X4_VRIGHT_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_4X4_HDOWN_ENABLE 0x00000020
+#define SHIFT_TOPAZHP_CR_H264COMP_4X4_HDOWN_ENABLE 5
+#define REGNUM_TOPAZHP_CR_H264COMP_4X4_HDOWN_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_4X4_HDOWN_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_4X4_VLEFT_ENABLE 0x00000040
+#define SHIFT_TOPAZHP_CR_H264COMP_4X4_VLEFT_ENABLE 6
+#define REGNUM_TOPAZHP_CR_H264COMP_4X4_VLEFT_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_4X4_VLEFT_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_4X4_HUP_ENABLE 0x00000080
+#define SHIFT_TOPAZHP_CR_H264COMP_4X4_HUP_ENABLE 7
+#define REGNUM_TOPAZHP_CR_H264COMP_4X4_HUP_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_4X4_HUP_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_VERTICAL_ENABLE 0x00000100
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_VERTICAL_ENABLE 8
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_VERTICAL_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_VERTICAL_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_HORIZONTAL_ENABLE 0x00000200
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_HORIZONTAL_ENABLE 9
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_HORIZONTAL_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_HORIZONTAL_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_DDL_ENABLE 0x00000400
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_DDL_ENABLE 10
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_DDL_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_DDL_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_DDR_ENABLE 0x00000800
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_DDR_ENABLE 11
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_DDR_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_DDR_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_VRIGHT_ENABLE 0x00001000
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_VRIGHT_ENABLE 12
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_VRIGHT_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_VRIGHT_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_HDOWN_ENABLE 0x00002000
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_HDOWN_ENABLE 13
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_HDOWN_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_HDOWN_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_VLEFT_ENABLE 0x00004000
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_VLEFT_ENABLE 14
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_VLEFT_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_VLEFT_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_HUP_ENABLE 0x00008000
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_HUP_ENABLE 15
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_HUP_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_HUP_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_16X16_PLANE_ENABLE 0x00010000
+#define SHIFT_TOPAZHP_CR_H264COMP_16X16_PLANE_ENABLE 16
+#define REGNUM_TOPAZHP_CR_H264COMP_16X16_PLANE_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_16X16_PLANE_ENABLE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CHROMA_PLANE_ENABLE 0x00020000
+#define SHIFT_TOPAZHP_CR_H264COMP_CHROMA_PLANE_ENABLE 17
+#define REGNUM_TOPAZHP_CR_H264COMP_CHROMA_PLANE_ENABLE 0x01AC
+#define SIGNED_TOPAZHP_CR_H264COMP_CHROMA_PLANE_ENABLE 0
+
+/* Register CR_H264COMP_MAX_CYCLE_COUNT */
+#define TOPAZHP_CR_H264COMP_MAX_CYCLE_COUNT 0x01B0
+#define MASK_TOPAZHP_CR_H264COMP_MAX_CYCLE_COUNT 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_H264COMP_MAX_CYCLE_COUNT 0
+#define REGNUM_TOPAZHP_CR_H264COMP_MAX_CYCLE_COUNT 0x01B0
+#define SIGNED_TOPAZHP_CR_H264COMP_MAX_CYCLE_COUNT 0
+
+/* Register CR_H264COMP_MAX_CYCLE_MB */
+#define TOPAZHP_CR_H264COMP_MAX_CYCLE_MB 0x01B4
+#define MASK_TOPAZHP_CR_H264COMP_MAX_CYCLE_MB_NUM 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_H264COMP_MAX_CYCLE_MB_NUM 0
+#define REGNUM_TOPAZHP_CR_H264COMP_MAX_CYCLE_MB_NUM 0x01B4
+#define SIGNED_TOPAZHP_CR_H264COMP_MAX_CYCLE_MB_NUM 0
+
+#define MASK_TOPAZHP_CR_H264COMP_MAX_CYCLE_MB_TYPE 0x30000000
+#define SHIFT_TOPAZHP_CR_H264COMP_MAX_CYCLE_MB_TYPE 28
+#define REGNUM_TOPAZHP_CR_H264COMP_MAX_CYCLE_MB_TYPE 0x01B4
+#define SIGNED_TOPAZHP_CR_H264COMP_MAX_CYCLE_MB_TYPE 0
+
+/* Register CR_H264COMP_MAX_CYCLE_RESET */
+#define TOPAZHP_CR_H264COMP_MAX_CYCLE_RESET 0x01B8
+#define MASK_TOPAZHP_CR_H264COMP_MAX_CYCLE_RESET 0x00000001
+#define SHIFT_TOPAZHP_CR_H264COMP_MAX_CYCLE_RESET 0
+#define REGNUM_TOPAZHP_CR_H264COMP_MAX_CYCLE_RESET 0x01B8
+#define SIGNED_TOPAZHP_CR_H264COMP_MAX_CYCLE_RESET 0
+
+#define MASK_TOPAZHP_CR_H264COMP_DISABLE_COUNTERS 0x00000002
+#define SHIFT_TOPAZHP_CR_H264COMP_DISABLE_COUNTERS 1
+#define REGNUM_TOPAZHP_CR_H264COMP_DISABLE_COUNTERS 0x01B8
+#define SIGNED_TOPAZHP_CR_H264COMP_DISABLE_COUNTERS 0
+
+/* Register CR_H264COMP4X4_PRED_CRC */
+#define TOPAZHP_CR_H264COMP4X4_PRED_CRC 0x01BC
+#define MASK_TOPAZHP_CR_H264COMP4X4_PRED_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_H264COMP4X4_PRED_CRC 0
+#define REGNUM_TOPAZHP_CR_H264COMP4X4_PRED_CRC 0x01BC
+#define SIGNED_TOPAZHP_CR_H264COMP4X4_PRED_CRC 0
+
+/* Register CR_H264COMP4X4_COEFFS_CRC */
+#define TOPAZHP_CR_H264COMP4X4_COEFFS_CRC 0x01C0
+#define MASK_TOPAZHP_CR_H264COMP4X4_COEFFS_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_H264COMP4X4_COEFFS_CRC 0
+#define REGNUM_TOPAZHP_CR_H264COMP4X4_COEFFS_CRC 0x01C0
+#define SIGNED_TOPAZHP_CR_H264COMP4X4_COEFFS_CRC 0
+
+/* Register CR_H264COMP4X4_RECON_CRC */
+#define TOPAZHP_CR_H264COMP4X4_RECON_CRC 0x01C4
+#define MASK_TOPAZHP_CR_H264COMP4X4_RECON_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_H264COMP4X4_RECON_CRC 0
+#define REGNUM_TOPAZHP_CR_H264COMP4X4_RECON_CRC 0x01C4
+#define SIGNED_TOPAZHP_CR_H264COMP4X4_RECON_CRC 0
+
+/* Register CR_H264COMP8X8_PRED_CRC */
+#define TOPAZHP_CR_H264COMP8X8_PRED_CRC 0x01C8
+#define MASK_TOPAZHP_CR_H264COMP8X8_PRED_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_H264COMP8X8_PRED_CRC 0
+#define REGNUM_TOPAZHP_CR_H264COMP8X8_PRED_CRC 0x01C8
+#define SIGNED_TOPAZHP_CR_H264COMP8X8_PRED_CRC 0
+
+/* Register CR_H264COMP8X8_COEFFS_CRC */
+#define TOPAZHP_CR_H264COMP8X8_COEFFS_CRC 0x01CC
+#define MASK_TOPAZHP_CR_H264COMP8X8_COEFFS_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_H264COMP8X8_COEFFS_CRC 0
+#define REGNUM_TOPAZHP_CR_H264COMP8X8_COEFFS_CRC 0x01CC
+#define SIGNED_TOPAZHP_CR_H264COMP8X8_COEFFS_CRC 0
+
+/* Register CR_H264COMP8X8_RECON_CRC */
+#define TOPAZHP_CR_H264COMP8X8_RECON_CRC 0x01D0
+#define MASK_TOPAZHP_CR_H264COMP8X8_RECON_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_H264COMP8X8_RECON_CRC 0
+#define REGNUM_TOPAZHP_CR_H264COMP8X8_RECON_CRC 0x01D0
+#define SIGNED_TOPAZHP_CR_H264COMP8X8_RECON_CRC 0
+
+/* Register CR_H264COMP16X16_PRED_CRC */
+#define TOPAZHP_CR_H264COMP16X16_PRED_CRC 0x01D4
+#define MASK_TOPAZHP_CR_H264COMP16X16_PRED_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_H264COMP16X16_PRED_CRC 0
+#define REGNUM_TOPAZHP_CR_H264COMP16X16_PRED_CRC 0x01D4
+#define SIGNED_TOPAZHP_CR_H264COMP16X16_PRED_CRC 0
+
+/* Register CR_H264COMP16X16_COEFFS_CRC */
+#define TOPAZHP_CR_H264COMP16X16_COEFFS_CRC 0x01D8
+#define MASK_TOPAZHP_CR_H264COMP16X16_COEFFS_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_H264COMP16X16_COEFFS_CRC 0
+#define REGNUM_TOPAZHP_CR_H264COMP16X16_COEFFS_CRC 0x01D8
+#define SIGNED_TOPAZHP_CR_H264COMP16X16_COEFFS_CRC 0
+
+/* Register CR_H264COMP16X16_RECON_CRC */
+#define TOPAZHP_CR_H264COMP16X16_RECON_CRC 0x01DC
+#define MASK_TOPAZHP_CR_H264COMP16X16_RECON_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_H264COMP16X16_RECON_CRC 0
+#define REGNUM_TOPAZHP_CR_H264COMP16X16_RECON_CRC 0x01DC
+#define SIGNED_TOPAZHP_CR_H264COMP16X16_RECON_CRC 0
+
+/* Register CR_H264COMP_ROUND_0 */
+#define TOPAZHP_CR_H264COMP_ROUND_0 0x01E0
+#define MASK_TOPAZHP_CR_H264COMP_16X16_INTRA_LUMA_ROUNDOFFSET 0x000003FF
+#define SHIFT_TOPAZHP_CR_H264COMP_16X16_INTRA_LUMA_ROUNDOFFSET 0
+#define REGNUM_TOPAZHP_CR_H264COMP_16X16_INTRA_LUMA_ROUNDOFFSET 0x01E0
+#define SIGNED_TOPAZHP_CR_H264COMP_16X16_INTRA_LUMA_ROUNDOFFSET 0
+
+#define MASK_TOPAZHP_CR_H264COMP_16X16_INTRA_CHROMA_ROUNDOFFSET 0x000FFC00
+#define SHIFT_TOPAZHP_CR_H264COMP_16X16_INTRA_CHROMA_ROUNDOFFSET 10
+#define REGNUM_TOPAZHP_CR_H264COMP_16X16_INTRA_CHROMA_ROUNDOFFSET 0x01E0
+#define SIGNED_TOPAZHP_CR_H264COMP_16X16_INTRA_CHROMA_ROUNDOFFSET 0
+
+#define MASK_TOPAZHP_CR_H264COMP_16X16_INTER_CHROMA_ROUNDOFFSET 0x3FF00000
+#define SHIFT_TOPAZHP_CR_H264COMP_16X16_INTER_CHROMA_ROUNDOFFSET 20
+#define REGNUM_TOPAZHP_CR_H264COMP_16X16_INTER_CHROMA_ROUNDOFFSET 0x01E0
+#define SIGNED_TOPAZHP_CR_H264COMP_16X16_INTER_CHROMA_ROUNDOFFSET 0
+
+/* Register CR_H264COMP_ROUND_1 */
+#define TOPAZHP_CR_H264COMP_ROUND_1 0x01E4
+#define MASK_TOPAZHP_CR_H264COMP_4X4_INTRA_LUMA_ROUNDOFFSET 0x000003FF
+#define SHIFT_TOPAZHP_CR_H264COMP_4X4_INTRA_LUMA_ROUNDOFFSET 0
+#define REGNUM_TOPAZHP_CR_H264COMP_4X4_INTRA_LUMA_ROUNDOFFSET 0x01E4
+#define SIGNED_TOPAZHP_CR_H264COMP_4X4_INTRA_LUMA_ROUNDOFFSET 0
+
+#define MASK_TOPAZHP_CR_H264COMP_8X8_INTRA_LUMA_ROUNDOFFSET 0x000FFC00
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_INTRA_LUMA_ROUNDOFFSET 10
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_INTRA_LUMA_ROUNDOFFSET 0x01E4
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_INTRA_LUMA_ROUNDOFFSET 0
+
+/* Register CR_H264COMP_ROUND_2 */
+#define TOPAZHP_CR_H264COMP_ROUND_2 0x01E8
+#define MASK_TOPAZHP_CR_H264COMP_8X8_INTER_LUMA_ROUNDOFFSET 0x000003FF
+#define SHIFT_TOPAZHP_CR_H264COMP_8X8_INTER_LUMA_ROUNDOFFSET 0
+#define REGNUM_TOPAZHP_CR_H264COMP_8X8_INTER_LUMA_ROUNDOFFSET 0x01E8
+#define SIGNED_TOPAZHP_CR_H264COMP_8X8_INTER_LUMA_ROUNDOFFSET 0
+
+#define MASK_TOPAZHP_CR_H264COMP_16X16_INTER_LUMA_ROUNDOFFSET 0x000FFC00
+#define SHIFT_TOPAZHP_CR_H264COMP_16X16_INTER_LUMA_ROUNDOFFSET 10
+#define REGNUM_TOPAZHP_CR_H264COMP_16X16_INTER_LUMA_ROUNDOFFSET 0x01E8
+#define SIGNED_TOPAZHP_CR_H264COMP_16X16_INTER_LUMA_ROUNDOFFSET 0
+
+/* Register CR_H264COMP_ROUND_INIT */
+#define TOPAZHP_CR_H264COMP_ROUND_INIT 0x01EC
+#define MASK_TOPAZHP_CR_H264COMP_ROUNDOFFSET_INITIALISE 0x00000001
+#define SHIFT_TOPAZHP_CR_H264COMP_ROUNDOFFSET_INITIALISE 0
+#define REGNUM_TOPAZHP_CR_H264COMP_ROUNDOFFSET_INITIALISE 0x01EC
+#define SIGNED_TOPAZHP_CR_H264COMP_ROUNDOFFSET_INITIALISE 0
+
+/* Register CR_H264COMP_VIDEO_CONF_CONTROL_0 */
+#define TOPAZHP_CR_H264COMP_VIDEO_CONF_CONTROL_0 0x01F0
+#define MASK_TOPAZHP_CR_H264COMP_SET_LEVEL_RANGE 0x00000001
+#define SHIFT_TOPAZHP_CR_H264COMP_SET_LEVEL_RANGE 0
+#define REGNUM_TOPAZHP_CR_H264COMP_SET_LEVEL_RANGE 0x01F0
+#define SIGNED_TOPAZHP_CR_H264COMP_SET_LEVEL_RANGE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_SET_START_LEVEL 0x00000002
+#define SHIFT_TOPAZHP_CR_H264COMP_SET_START_LEVEL 1
+#define REGNUM_TOPAZHP_CR_H264COMP_SET_START_LEVEL 0x01F0
+#define SIGNED_TOPAZHP_CR_H264COMP_SET_START_LEVEL 0
+
+#define MASK_TOPAZHP_CR_H264COMP_FLUSH_BITCOUNTS 0x00000004
+#define SHIFT_TOPAZHP_CR_H264COMP_FLUSH_BITCOUNTS 2
+#define REGNUM_TOPAZHP_CR_H264COMP_FLUSH_BITCOUNTS 0x01F0
+#define SIGNED_TOPAZHP_CR_H264COMP_FLUSH_BITCOUNTS 0
+
+#define MASK_TOPAZHP_CR_H264COMP_MIN_LIMIT_LEVEL 0x00000038
+#define SHIFT_TOPAZHP_CR_H264COMP_MIN_LIMIT_LEVEL 3
+#define REGNUM_TOPAZHP_CR_H264COMP_MIN_LIMIT_LEVEL 0x01F0
+#define SIGNED_TOPAZHP_CR_H264COMP_MIN_LIMIT_LEVEL 0
+
+#define MASK_TOPAZHP_CR_H264COMP_MAX_LIMIT_LEVEL 0x000001C0
+#define SHIFT_TOPAZHP_CR_H264COMP_MAX_LIMIT_LEVEL 6
+#define REGNUM_TOPAZHP_CR_H264COMP_MAX_LIMIT_LEVEL 0x01F0
+#define SIGNED_TOPAZHP_CR_H264COMP_MAX_LIMIT_LEVEL 0
+
+#define MASK_TOPAZHP_CR_H264COMP_START_LIMIT_LEVEL 0x00000E00
+#define SHIFT_TOPAZHP_CR_H264COMP_START_LIMIT_LEVEL 9
+#define REGNUM_TOPAZHP_CR_H264COMP_START_LIMIT_LEVEL 0x01F0
+#define SIGNED_TOPAZHP_CR_H264COMP_START_LIMIT_LEVEL 0
+
+#define MASK_TOPAZHP_CR_H264COMP_TARGET_MB_SIZE 0x003FF000
+#define SHIFT_TOPAZHP_CR_H264COMP_TARGET_MB_SIZE 12
+#define REGNUM_TOPAZHP_CR_H264COMP_TARGET_MB_SIZE 0x01F0
+#define SIGNED_TOPAZHP_CR_H264COMP_TARGET_MB_SIZE 0
+
+#define MASK_TOPAZHP_CR_H264COMP_TARGET_HYST 0xFFC00000
+#define SHIFT_TOPAZHP_CR_H264COMP_TARGET_HYST 22
+#define REGNUM_TOPAZHP_CR_H264COMP_TARGET_HYST 0x01F0
+#define SIGNED_TOPAZHP_CR_H264COMP_TARGET_HYST 0
+
+/* Register CR_H264COMP_VIDEO_CONF_CONTROL_1 */
+#define TOPAZHP_CR_H264COMP_VIDEO_CONF_CONTROL_1 0x01F4
+#define MASK_TOPAZHP_CR_H264COMP_INIT_TARGET 0x00000001
+#define SHIFT_TOPAZHP_CR_H264COMP_INIT_TARGET 0
+#define REGNUM_TOPAZHP_CR_H264COMP_INIT_TARGET 0x01F4
+#define SIGNED_TOPAZHP_CR_H264COMP_INIT_TARGET 0
+
+#define MASK_TOPAZHP_CR_H264COMP_INIT_USED 0x00000002
+#define SHIFT_TOPAZHP_CR_H264COMP_INIT_USED 1
+#define REGNUM_TOPAZHP_CR_H264COMP_INIT_USED 0x01F4
+#define SIGNED_TOPAZHP_CR_H264COMP_INIT_USED 0
+
+#define MASK_TOPAZHP_CR_H264COMP_TARGET_CONSTANT 0x0FFFFFF0
+#define SHIFT_TOPAZHP_CR_H264COMP_TARGET_CONSTANT 4
+#define REGNUM_TOPAZHP_CR_H264COMP_TARGET_CONSTANT 0x01F4
+#define SIGNED_TOPAZHP_CR_H264COMP_TARGET_CONSTANT 0
+
+/* Register CR_H264COMP_VIDEO_CONF_STATUS_0 */
+#define TOPAZHP_CR_H264COMP_VIDEO_CONF_STATUS_0 0x01F8
+#define MASK_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_0 0x000000FF
+#define SHIFT_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_0 0
+#define REGNUM_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_0 0x01F8
+#define SIGNED_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_0 0
+
+#define MASK_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_1 0x0000FF00
+#define SHIFT_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_1 8
+#define REGNUM_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_1 0x01F8
+#define SIGNED_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_1 0
+
+#define MASK_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_2 0x00FF0000
+#define SHIFT_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_2 16
+#define REGNUM_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_2 0x01F8
+#define SIGNED_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_2 0
+
+#define MASK_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_3 0xFF000000
+#define SHIFT_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_3 24
+#define REGNUM_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_3 0x01F8
+#define SIGNED_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_3 0
+
+/* Register CR_H264COMP_VIDEO_CONF_STATUS_1 */
+#define TOPAZHP_CR_H264COMP_VIDEO_CONF_STATUS_1 0x01FC
+#define MASK_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_4 0x000000FF
+#define SHIFT_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_4 0
+#define REGNUM_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_4 0x01FC
+#define SIGNED_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_4 0
+
+#define MASK_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_5 0x0000FF00
+#define SHIFT_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_5 8
+#define REGNUM_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_5 0x01FC
+#define SIGNED_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_5 0
+
+#define MASK_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_6 0x00FF0000
+#define SHIFT_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_6 16
+#define REGNUM_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_6 0x01FC
+#define SIGNED_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_6 0
+
+#define MASK_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_7 0xFF000000
+#define SHIFT_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_7 24
+#define REGNUM_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_7 0x01FC
+#define SIGNED_TOPAZHP_CR_H264COMP_MBS_LIMIT_LEVEL_7 0
+
+/* Register CR_IPE_CONTROL */
+#define TOPAZHP_CR_IPE_CONTROL      0x0200
+#define MASK_TOPAZHP_CR_IPE_BLOCKSIZE 0x00000003
+#define SHIFT_TOPAZHP_CR_IPE_BLOCKSIZE 0
+#define REGNUM_TOPAZHP_CR_IPE_BLOCKSIZE 0x0200
+#define SIGNED_TOPAZHP_CR_IPE_BLOCKSIZE 0
+
+#define MASK_TOPAZHP_CR_IPE_16X8_ENABLE 0x00000004
+#define SHIFT_TOPAZHP_CR_IPE_16X8_ENABLE 2
+#define REGNUM_TOPAZHP_CR_IPE_16X8_ENABLE 0x0200
+#define SIGNED_TOPAZHP_CR_IPE_16X8_ENABLE 0
+
+#define MASK_TOPAZHP_CR_IPE_8X16_ENABLE 0x00000008
+#define SHIFT_TOPAZHP_CR_IPE_8X16_ENABLE 3
+#define REGNUM_TOPAZHP_CR_IPE_8X16_ENABLE 0x0200
+#define SIGNED_TOPAZHP_CR_IPE_8X16_ENABLE 0
+
+#define MASK_TOPAZHP_CR_IPE_Y_FINE_SEARCH 0x00000030
+#define SHIFT_TOPAZHP_CR_IPE_Y_FINE_SEARCH 4
+#define REGNUM_TOPAZHP_CR_IPE_Y_FINE_SEARCH 0x0200
+#define SIGNED_TOPAZHP_CR_IPE_Y_FINE_SEARCH 0
+
+#define MASK_TOPAZHP_CR_IPE_4X4_SEARCH 0x00000040
+#define SHIFT_TOPAZHP_CR_IPE_4X4_SEARCH 6
+#define REGNUM_TOPAZHP_CR_IPE_4X4_SEARCH 0x0200
+#define SIGNED_TOPAZHP_CR_IPE_4X4_SEARCH 0
+
+#define MASK_TOPAZHP_CR_IPE_LRITC_BOUNDARY 0x00000300
+#define SHIFT_TOPAZHP_CR_IPE_LRITC_BOUNDARY 8
+#define REGNUM_TOPAZHP_CR_IPE_LRITC_BOUNDARY 0x0200
+#define SIGNED_TOPAZHP_CR_IPE_LRITC_BOUNDARY 0
+
+#define MASK_TOPAZHP_CR_IPE_HIGH_LATENCY 0x00001000
+#define SHIFT_TOPAZHP_CR_IPE_HIGH_LATENCY 12
+#define REGNUM_TOPAZHP_CR_IPE_HIGH_LATENCY 0x0200
+#define SIGNED_TOPAZHP_CR_IPE_HIGH_LATENCY 0
+
+#define MASK_TOPAZHP_CR_IPE_MV_NUMBER_RESTRICTION 0x00004000
+#define SHIFT_TOPAZHP_CR_IPE_MV_NUMBER_RESTRICTION 14
+#define REGNUM_TOPAZHP_CR_IPE_MV_NUMBER_RESTRICTION 0x0200
+#define SIGNED_TOPAZHP_CR_IPE_MV_NUMBER_RESTRICTION 0
+
+#define MASK_TOPAZHP_CR_IPE0_COSTS_CRC_SEL 0x00018000
+#define SHIFT_TOPAZHP_CR_IPE0_COSTS_CRC_SEL 15
+#define REGNUM_TOPAZHP_CR_IPE0_COSTS_CRC_SEL 0x0200
+#define SIGNED_TOPAZHP_CR_IPE0_COSTS_CRC_SEL 0
+#define TOPAZHP_CR_IPE0_COSTS_CRC_SEL_RESERVED         0x00000003
+#define TOPAZHP_CR_IPE0_COSTS_CRC_SEL_16X16_COSTS              0x00000002              /* cr_ipe0_costs_crc will output 16x16 crc value */
+#define TOPAZHP_CR_IPE0_COSTS_CRC_SEL_8X8_COSTS                0x00000001              /* cr_ipe0_costs_crc will output 8x8 crc value */
+#define TOPAZHP_CR_IPE0_COSTS_CRC_SEL_4X4_COSTS                0x00000000              /* cr_ipe0_costs_crc will output 4x4 crc value */
+
+#define MASK_TOPAZHP_CR_IPE1_COSTS_CRC_SEL 0x00060000
+#define SHIFT_TOPAZHP_CR_IPE1_COSTS_CRC_SEL 17
+#define REGNUM_TOPAZHP_CR_IPE1_COSTS_CRC_SEL 0x0200
+#define SIGNED_TOPAZHP_CR_IPE1_COSTS_CRC_SEL 0
+#define TOPAZHP_CR_IPE1_COSTS_CRC_SEL_RESERVED         0x00000003
+#define TOPAZHP_CR_IPE1_COSTS_CRC_SEL_16X16_COSTS              0x00000002              /* cr_ipe1_costs_crc will output 16x16 crc value */
+#define TOPAZHP_CR_IPE1_COSTS_CRC_SEL_8X8_COSTS                0x00000001              /* cr_ipe1_costs_crc will output 8x8 crc value */
+#define TOPAZHP_CR_IPE1_COSTS_CRC_SEL_4X4_COSTS                0x00000000              /* cr_ipe1_costs_crc will output 4x4 crc value */
+
+/* Register CR_IPE_SEARCH_STATUS */
+#define TOPAZHP_CR_IPE_SEARCH_STATUS 0x0204
+#define MASK_TOPAZHP_CR_IPE0_SEARCH_STATUS 0x00000007
+#define SHIFT_TOPAZHP_CR_IPE0_SEARCH_STATUS 0
+#define REGNUM_TOPAZHP_CR_IPE0_SEARCH_STATUS 0x0204
+#define SIGNED_TOPAZHP_CR_IPE0_SEARCH_STATUS 0
+
+#define MASK_TOPAZHP_CR_IPE1_SEARCH_STATUS 0x00070000
+#define SHIFT_TOPAZHP_CR_IPE1_SEARCH_STATUS 16
+#define REGNUM_TOPAZHP_CR_IPE1_SEARCH_STATUS 0x0204
+#define SIGNED_TOPAZHP_CR_IPE1_SEARCH_STATUS 0
+
+/* Register CR_IPE0_MB_COST */
+#define TOPAZHP_CR_IPE0_MB_COST     0x0208
+#define MASK_TOPAZHP_CR_IPE0_MB_SAD 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_IPE0_MB_SAD 0
+#define REGNUM_TOPAZHP_CR_IPE0_MB_SAD 0x0208
+#define SIGNED_TOPAZHP_CR_IPE0_MB_SAD 0
+
+#define MASK_TOPAZHP_CR_IPE0_INT_MVCOST 0xFFFF0000
+#define SHIFT_TOPAZHP_CR_IPE0_INT_MVCOST 16
+#define REGNUM_TOPAZHP_CR_IPE0_INT_MVCOST 0x0208
+#define SIGNED_TOPAZHP_CR_IPE0_INT_MVCOST 0
+
+/* Register CR_IPE1_MB_COST */
+#define TOPAZHP_CR_IPE1_MB_COST     0x020C
+#define MASK_TOPAZHP_CR_IPE1_MB_SAD 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_IPE1_MB_SAD 0
+#define REGNUM_TOPAZHP_CR_IPE1_MB_SAD 0x020C
+#define SIGNED_TOPAZHP_CR_IPE1_MB_SAD 0
+
+#define MASK_TOPAZHP_CR_IPE1_INT_MVCOST 0xFFFF0000
+#define SHIFT_TOPAZHP_CR_IPE1_INT_MVCOST 16
+#define REGNUM_TOPAZHP_CR_IPE1_INT_MVCOST 0x020C
+#define SIGNED_TOPAZHP_CR_IPE1_INT_MVCOST 0
+
+/* Register CR_IPE0_BESTMV_CRC */
+#define TOPAZHP_CR_IPE0_BESTMV_CRC  0x0240
+#define MASK_TOPAZHP_CR_IPE0_BESTMV_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_IPE0_BESTMV_CRC 0
+#define REGNUM_TOPAZHP_CR_IPE0_BESTMV_CRC 0x0240
+#define SIGNED_TOPAZHP_CR_IPE0_BESTMV_CRC 0
+
+/* Register CR_IPE1_BESTMV_CRC */
+#define TOPAZHP_CR_IPE1_BESTMV_CRC  0x0244
+#define MASK_TOPAZHP_CR_IPE1_BESTMV_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_IPE1_BESTMV_CRC 0
+#define REGNUM_TOPAZHP_CR_IPE1_BESTMV_CRC 0x0244
+#define SIGNED_TOPAZHP_CR_IPE1_BESTMV_CRC 0
+
+/* Register CR_IPE0_COSTS_CRC */
+#define TOPAZHP_CR_IPE0_COSTS_CRC   0x0248
+#define MASK_TOPAZHP_CR_IPE0_COSTS_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_IPE0_COSTS_CRC 0
+#define REGNUM_TOPAZHP_CR_IPE0_COSTS_CRC 0x0248
+#define SIGNED_TOPAZHP_CR_IPE0_COSTS_CRC 0
+
+/* Register CR_IPE1_COSTS_CRC */
+#define TOPAZHP_CR_IPE1_COSTS_CRC   0x024C
+#define MASK_TOPAZHP_CR_IPE1_COSTS_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_IPE1_COSTS_CRC 0
+#define REGNUM_TOPAZHP_CR_IPE1_COSTS_CRC 0x024C
+#define SIGNED_TOPAZHP_CR_IPE1_COSTS_CRC 0
+
+/* Register CR_IPE_MB_PERFORMANCE_CLEAR */
+#define TOPAZHP_CR_IPE_MB_PERFORMANCE_CLEAR 0x0250
+#define MASK_TOPAZHP_CR_IPE_MB_PERFORMANCE_CLEAR 0x00000001
+#define SHIFT_TOPAZHP_CR_IPE_MB_PERFORMANCE_CLEAR 0
+#define REGNUM_TOPAZHP_CR_IPE_MB_PERFORMANCE_CLEAR 0x0250
+#define SIGNED_TOPAZHP_CR_IPE_MB_PERFORMANCE_CLEAR 0
+
+/* Register CR_IPE_MB_PERFORMANCE_RESULT */
+#define TOPAZHP_CR_IPE_MB_PERFORMANCE_RESULT 0x0254
+#define MASK_TOPAZHP_CR_IPE_0_MB_PERFORMANCE_RESULT 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_IPE_0_MB_PERFORMANCE_RESULT 0
+#define REGNUM_TOPAZHP_CR_IPE_0_MB_PERFORMANCE_RESULT 0x0254
+#define SIGNED_TOPAZHP_CR_IPE_0_MB_PERFORMANCE_RESULT 0
+
+#define MASK_TOPAZHP_CR_IPE_1_MB_PERFORMANCE_RESULT 0xFFFF0000
+#define SHIFT_TOPAZHP_CR_IPE_1_MB_PERFORMANCE_RESULT 16
+#define REGNUM_TOPAZHP_CR_IPE_1_MB_PERFORMANCE_RESULT 0x0254
+#define SIGNED_TOPAZHP_CR_IPE_1_MB_PERFORMANCE_RESULT 0
+
+/* Register CR_IPE_MB_PERFORMANCE_MB_NUMBER */
+#define TOPAZHP_CR_IPE_MB_PERFORMANCE_MB_NUMBER 0x0258
+#define MASK_TOPAZHP_CR_IPE_0_MAX_CYCLE_MB_NUM 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_IPE_0_MAX_CYCLE_MB_NUM 0
+#define REGNUM_TOPAZHP_CR_IPE_0_MAX_CYCLE_MB_NUM 0x0258
+#define SIGNED_TOPAZHP_CR_IPE_0_MAX_CYCLE_MB_NUM 0
+
+#define MASK_TOPAZHP_CR_IPE_1_MAX_CYCLE_MB_NUM 0xFFFF0000
+#define SHIFT_TOPAZHP_CR_IPE_1_MAX_CYCLE_MB_NUM 16
+#define REGNUM_TOPAZHP_CR_IPE_1_MAX_CYCLE_MB_NUM 0x0258
+#define SIGNED_TOPAZHP_CR_IPE_1_MAX_CYCLE_MB_NUM 0
+
+/* Register CR_IPE_VECTOR_CLIPPING */
+#define TOPAZHP_CR_IPE_VECTOR_CLIPPING 0x0260
+#define MASK_TOPAZHP_CR_IPE_VECTOR_CLIPPING_X 0x000000FF
+#define SHIFT_TOPAZHP_CR_IPE_VECTOR_CLIPPING_X 0
+#define REGNUM_TOPAZHP_CR_IPE_VECTOR_CLIPPING_X 0x0260
+#define SIGNED_TOPAZHP_CR_IPE_VECTOR_CLIPPING_X 0
+
+#define MASK_TOPAZHP_CR_IPE_VECTOR_CLIPPING_Y 0x0000FF00
+#define SHIFT_TOPAZHP_CR_IPE_VECTOR_CLIPPING_Y 8
+#define REGNUM_TOPAZHP_CR_IPE_VECTOR_CLIPPING_Y 0x0260
+#define SIGNED_TOPAZHP_CR_IPE_VECTOR_CLIPPING_Y 0
+
+#define MASK_TOPAZHP_CR_IPE_VECTOR_CLIPPING_ENABLED 0x00010000
+#define SHIFT_TOPAZHP_CR_IPE_VECTOR_CLIPPING_ENABLED 16
+#define REGNUM_TOPAZHP_CR_IPE_VECTOR_CLIPPING_ENABLED 0x0260
+#define SIGNED_TOPAZHP_CR_IPE_VECTOR_CLIPPING_ENABLED 0
+
+/* Register CR_JMCOMP_CONTROL */
+#define TOPAZHP_CR_JMCOMP_CONTROL   0x0270
+#define MASK_TOPAZHP_CR_JMCOMP_AC_ENABLE 0x00008000
+#define SHIFT_TOPAZHP_CR_JMCOMP_AC_ENABLE 15
+#define REGNUM_TOPAZHP_CR_JMCOMP_AC_ENABLE 0x0270
+#define SIGNED_TOPAZHP_CR_JMCOMP_AC_ENABLE 0
+
+/* Register CR_JMCOMP_JPEG_LUMA_PRED */
+#define TOPAZHP_CR_JMCOMP_JPEG_LUMA_PRED 0x0278
+#define MASK_TOPAZHP_CR_JMCOMP_JPEG_DC_LUMA_PRED 0x00000FFF
+#define SHIFT_TOPAZHP_CR_JMCOMP_JPEG_DC_LUMA_PRED 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_JPEG_DC_LUMA_PRED 0x0278
+#define SIGNED_TOPAZHP_CR_JMCOMP_JPEG_DC_LUMA_PRED 0
+
+/* Register CR_JMCOMP_JPEG_CHROMA_PREDS */
+#define TOPAZHP_CR_JMCOMP_JPEG_CHROMA_PREDS 0x027C
+#define MASK_TOPAZHP_CR_JMCOMP_JPEG_DC_CHROMA_CB_PRED 0x00000FFF
+#define SHIFT_TOPAZHP_CR_JMCOMP_JPEG_DC_CHROMA_CB_PRED 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_JPEG_DC_CHROMA_CB_PRED 0x027C
+#define SIGNED_TOPAZHP_CR_JMCOMP_JPEG_DC_CHROMA_CB_PRED 0
+
+#define MASK_TOPAZHP_CR_JMCOMP_JPEG_DC_CHROMA_CR_PRED 0x0FFF0000
+#define SHIFT_TOPAZHP_CR_JMCOMP_JPEG_DC_CHROMA_CR_PRED 16
+#define REGNUM_TOPAZHP_CR_JMCOMP_JPEG_DC_CHROMA_CR_PRED 0x027C
+#define SIGNED_TOPAZHP_CR_JMCOMP_JPEG_DC_CHROMA_CR_PRED 0
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_0 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_0 0x0280
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_00(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_00(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_00(i) 0x0280
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_1 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_1 0x0284
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_01(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_01(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_01(i) 0x0284
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_2 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_2 0x0288
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_02(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_02(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_02(i) 0x0288
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_3 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_3 0x028C
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_03(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_03(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_03(i) 0x028C
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_4 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_4 0x0290
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_04(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_04(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_04(i) 0x0290
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_5 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_5 0x0294
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_05(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_05(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_05(i) 0x0294
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_6 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_6 0x0298
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_06(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_06(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_06(i) 0x0298
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_7 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_7 0x029C
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_07(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_07(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_07(i) 0x029C
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_8 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_8 0x02A0
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_08(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_08(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_08(i) 0x02A0
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_9 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_9 0x02A4
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_09(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_09(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_09(i) 0x02A4
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_10 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_10 0x02A8
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_10(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_10(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_10(i) 0x02A8
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_11 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_11 0x02AC
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_11(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_11(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_11(i) 0x02AC
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_12 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_12 0x02B0
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_12(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_12(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_12(i) 0x02B0
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_13 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_13 0x02B4
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_13(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_13(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_13(i) 0x02B4
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_14 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_14 0x02B8
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_14(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_14(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_14(i) 0x02B8
+
+/* Register CR_JMCOMP_LUMA_QUANTISER_15 */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_15 0x02BC
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT_15(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT_15(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT_15(i) 0x02BC
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_0 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_0 0x02C0
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_00(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_00(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_00(i) 0x02C0
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_1 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_1 0x02C4
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_01(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_01(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_01(i) 0x02C4
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_2 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_2 0x02C8
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_02(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_02(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_02(i) 0x02C8
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_3 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_3 0x02CC
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_03(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_03(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_03(i) 0x02CC
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_4 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_4 0x02D0
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_04(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_04(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_04(i) 0x02D0
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_5 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_5 0x02D4
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_05(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_05(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_05(i) 0x02D4
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_6 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_6 0x02D8
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_06(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_06(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_06(i) 0x02D8
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_7 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_7 0x02DC
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_07(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_07(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_07(i) 0x02DC
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_8 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_8 0x02E0
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_08(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_08(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_08(i) 0x02E0
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_9 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_9 0x02E4
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_09(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_09(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_09(i) 0x02E4
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_10 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_10 0x02E8
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_10(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_10(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_10(i) 0x02E8
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_11 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_11 0x02EC
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_11(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_11(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_11(i) 0x02EC
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_12 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_12 0x02F0
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_12(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_12(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_12(i) 0x02F0
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_13 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_13 0x02F4
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_13(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_13(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_13(i) 0x02F4
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_14 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_14 0x02F8
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_14(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_14(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_14(i) 0x02F8
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER_15 */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_15 0x02FC
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_15(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_15(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT_15(i) 0x02FC
+
+/* Register CR_JMCOMP_CRC */
+#define TOPAZHP_CR_JMCOMP_CRC       0x0300
+#define MASK_TOPAZHP_CR_JMCOMP_CRC_OUT 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_JMCOMP_CRC_OUT 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_CRC_OUT 0x0300
+#define SIGNED_TOPAZHP_CR_JMCOMP_CRC_OUT 0
+
+/* Register CR_JMCOMP_VLC_CRC */
+#define TOPAZHP_CR_JMCOMP_VLC_CRC   0x0304
+#define MASK_TOPAZHP_CR_JMCOMP_VLC_IF_CRC 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_JMCOMP_VLC_IF_CRC 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_VLC_IF_CRC 0x0304
+#define SIGNED_TOPAZHP_CR_JMCOMP_VLC_IF_CRC 0
+
+/* Register CR_JMCOMP_PERFORMANCE_0 */
+#define TOPAZHP_CR_JMCOMP_PERFORMANCE_0 0x0308
+#define MASK_TOPAZHP_CR_JMCOMP_WORST_MB_CYCLES 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_JMCOMP_WORST_MB_CYCLES 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_WORST_MB_CYCLES 0x0308
+#define SIGNED_TOPAZHP_CR_JMCOMP_WORST_MB_CYCLES 0
+
+#define MASK_TOPAZHP_CR_JMCOMP_WORST_MB_TYPE 0x00030000
+#define SHIFT_TOPAZHP_CR_JMCOMP_WORST_MB_TYPE 16
+#define REGNUM_TOPAZHP_CR_JMCOMP_WORST_MB_TYPE 0x0308
+#define SIGNED_TOPAZHP_CR_JMCOMP_WORST_MB_TYPE 0
+
+/* Register CR_JMCOMP_CRC_RDATA */
+#define TOPAZHP_CR_JMCOMP_CRC_RDATA 0x030C
+#define MASK_TOPAZHP_CR_JMCOMP_CRC_RDATA_OUT 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_JMCOMP_CRC_RDATA_OUT 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_CRC_RDATA_OUT 0x030C
+#define SIGNED_TOPAZHP_CR_JMCOMP_CRC_RDATA_OUT 0
+
+/* Register CR_JMCOMP_CRC_CARC */
+#define TOPAZHP_CR_JMCOMP_CRC_CARC  0x0310
+#define MASK_TOPAZHP_CR_JMCOMP_CRC_CARC_OUT 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_JMCOMP_CRC_CARC_OUT 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_CRC_CARC_OUT 0x0310
+#define SIGNED_TOPAZHP_CR_JMCOMP_CRC_CARC_OUT 0
+
+/* Register CR_JMCOMP_PERFORMANCE_1 */
+#define TOPAZHP_CR_JMCOMP_PERFORMANCE_1 0x0320
+#define MASK_TOPAZHP_CR_JMCOMP_WORST_MB_NUM 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_JMCOMP_WORST_MB_NUM 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_WORST_MB_NUM 0x0320
+#define SIGNED_TOPAZHP_CR_JMCOMP_WORST_MB_NUM 0
+
+/* Register CR_JMCOMP_PERFORMANCE_2 */
+#define TOPAZHP_CR_JMCOMP_PERFORMANCE_2 0x0324
+#define MASK_TOPAZHP_CR_JMCOMP_WORST_MB_CLEAR 0x00000001
+#define SHIFT_TOPAZHP_CR_JMCOMP_WORST_MB_CLEAR 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_WORST_MB_CLEAR 0x0324
+#define SIGNED_TOPAZHP_CR_JMCOMP_WORST_MB_CLEAR 0
+
+#define MASK_TOPAZHP_CR_JMCOMP_DISABLE_COUNTERS 0x00000002
+#define SHIFT_TOPAZHP_CR_JMCOMP_DISABLE_COUNTERS 1
+#define REGNUM_TOPAZHP_CR_JMCOMP_DISABLE_COUNTERS 0x0324
+#define SIGNED_TOPAZHP_CR_JMCOMP_DISABLE_COUNTERS 0
+
+/* Register CR_JMCOMP_QP_VALUE */
+#define TOPAZHP_CR_JMCOMP_QP_VALUE  0x0330
+#define MASK_TOPAZHP_CR_JMCOMP_REAL_QP_LUMA 0x0000003F
+#define SHIFT_TOPAZHP_CR_JMCOMP_REAL_QP_LUMA 0
+#define REGNUM_TOPAZHP_CR_JMCOMP_REAL_QP_LUMA 0x0330
+#define SIGNED_TOPAZHP_CR_JMCOMP_REAL_QP_LUMA 0
+
+#define MASK_TOPAZHP_CR_JMCOMP_REQ_QP 0x003F0000
+#define SHIFT_TOPAZHP_CR_JMCOMP_REQ_QP 16
+#define REGNUM_TOPAZHP_CR_JMCOMP_REQ_QP 0x0330
+#define SIGNED_TOPAZHP_CR_JMCOMP_REQ_QP 0
+
+#define MASK_TOPAZHP_CR_QSCALE_CHANGE_DELAY 0x0F000000
+#define SHIFT_TOPAZHP_CR_QSCALE_CHANGE_DELAY 24
+#define REGNUM_TOPAZHP_CR_QSCALE_CHANGE_DELAY 0x0330
+#define SIGNED_TOPAZHP_CR_QSCALE_CHANGE_DELAY 0
+
+/* Register CR_JMCOMP_QSCALE_CHANGE */
+#define TOPAZHP_CR_JMCOMP_QSCALE_CHANGE 0x0334
+#define MASK_TOPAZHP_CR_QSCALE_CHANGE_THRESHOLD 0x0000000F
+#define SHIFT_TOPAZHP_CR_QSCALE_CHANGE_THRESHOLD 0
+#define REGNUM_TOPAZHP_CR_QSCALE_CHANGE_THRESHOLD 0x0334
+#define SIGNED_TOPAZHP_CR_QSCALE_CHANGE_THRESHOLD 0
+
+/* Register CR_JMCOMP_CARC_CONTROL_0 */
+#define TOPAZHP_CR_JMCOMP_CARC_CONTROL_0 0x0338
+#define MASK_TOPAZHP_CR_CARC_NEG_SCALE 0x3F000000
+#define SHIFT_TOPAZHP_CR_CARC_NEG_SCALE 24
+#define REGNUM_TOPAZHP_CR_CARC_NEG_SCALE 0x0338
+#define SIGNED_TOPAZHP_CR_CARC_NEG_SCALE 0
+
+#define MASK_TOPAZHP_CR_CARC_NEG_RANGE 0x001F0000
+#define SHIFT_TOPAZHP_CR_CARC_NEG_RANGE 16
+#define REGNUM_TOPAZHP_CR_CARC_NEG_RANGE 0x0338
+#define SIGNED_TOPAZHP_CR_CARC_NEG_RANGE 0
+
+#define MASK_TOPAZHP_CR_CARC_POS_SCALE 0x00003F00
+#define SHIFT_TOPAZHP_CR_CARC_POS_SCALE 8
+#define REGNUM_TOPAZHP_CR_CARC_POS_SCALE 0x0338
+#define SIGNED_TOPAZHP_CR_CARC_POS_SCALE 0
+
+#define MASK_TOPAZHP_CR_CARC_POS_RANGE 0x0000001F
+#define SHIFT_TOPAZHP_CR_CARC_POS_RANGE 0
+#define REGNUM_TOPAZHP_CR_CARC_POS_RANGE 0x0338
+#define SIGNED_TOPAZHP_CR_CARC_POS_RANGE 0
+
+/* Register CR_JMCOMP_CARC_CONTROL_1 */
+#define TOPAZHP_CR_JMCOMP_CARC_CONTROL_1 0x033C
+#define MASK_TOPAZHP_CR_CARC_SHIFT  0x03000000
+#define SHIFT_TOPAZHP_CR_CARC_SHIFT 24
+#define REGNUM_TOPAZHP_CR_CARC_SHIFT 0x033C
+#define SIGNED_TOPAZHP_CR_CARC_SHIFT 0
+
+#define MASK_TOPAZHP_CR_CARC_CUTOFF 0x00F00000
+#define SHIFT_TOPAZHP_CR_CARC_CUTOFF 20
+#define REGNUM_TOPAZHP_CR_CARC_CUTOFF 0x033C
+#define SIGNED_TOPAZHP_CR_CARC_CUTOFF 0
+
+#define MASK_TOPAZHP_CR_CARC_THRESHOLD 0x0007FF00
+#define SHIFT_TOPAZHP_CR_CARC_THRESHOLD 8
+#define REGNUM_TOPAZHP_CR_CARC_THRESHOLD 0x033C
+#define SIGNED_TOPAZHP_CR_CARC_THRESHOLD 0
+
+#define MASK_TOPAZHP_CR_CARC_BASELINE 0x000000FF
+#define SHIFT_TOPAZHP_CR_CARC_BASELINE 0
+#define REGNUM_TOPAZHP_CR_CARC_BASELINE 0x033C
+#define SIGNED_TOPAZHP_CR_CARC_BASELINE 0
+
+/* Register CR_JMCOMP_CARC_COEFF_TOTAL */
+#define TOPAZHP_CR_JMCOMP_CARC_COEFF_TOTAL 0x0340
+#define MASK_TOPAZHP_CR_CARC_COEFF_TOTAL 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_CARC_COEFF_TOTAL 0
+#define REGNUM_TOPAZHP_CR_CARC_COEFF_TOTAL 0x0340
+#define SIGNED_TOPAZHP_CR_CARC_COEFF_TOTAL 0
+
+/* Register CR_SPE0_BEST_SAD_SIGNATURE */
+#define TOPAZHP_CR_SPE0_BEST_SAD_SIGNATURE 0x0348
+#define MASK_TOPAZHP_CR_SPE0_BEST_SAD_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_SPE0_BEST_SAD_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_SPE0_BEST_SAD_SIGNATURE 0x0348
+#define SIGNED_TOPAZHP_CR_SPE0_BEST_SAD_SIGNATURE 0
+
+/* Register CR_SPE1_BEST_SAD_SIGNATURE */
+#define TOPAZHP_CR_SPE1_BEST_SAD_SIGNATURE 0x034C
+#define MASK_TOPAZHP_CR_SPE1_BEST_SAD_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_SPE1_BEST_SAD_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_SPE1_BEST_SAD_SIGNATURE 0x034C
+#define SIGNED_TOPAZHP_CR_SPE1_BEST_SAD_SIGNATURE 0
+
+/* Register CR_SPE0_BEST_INDEX_SIGNATURE */
+#define TOPAZHP_CR_SPE0_BEST_INDEX_SIGNATURE 0x0350
+#define MASK_TOPAZHP_CR_SPE0_BEST_INDEX_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_SPE0_BEST_INDEX_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_SPE0_BEST_INDEX_SIGNATURE 0x0350
+#define SIGNED_TOPAZHP_CR_SPE0_BEST_INDEX_SIGNATURE 0
+
+/* Register CR_SPE1_BEST_INDEX_SIGNATURE */
+#define TOPAZHP_CR_SPE1_BEST_INDEX_SIGNATURE 0x0354
+#define MASK_TOPAZHP_CR_SPE1_BEST_INDEX_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_SPE1_BEST_INDEX_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_SPE1_BEST_INDEX_SIGNATURE 0x0354
+#define SIGNED_TOPAZHP_CR_SPE1_BEST_INDEX_SIGNATURE 0
+
+/* Register CR_SPE_INTRA_COST_SIGNATURE */
+#define TOPAZHP_CR_SPE_INTRA_COST_SIGNATURE 0x0358
+#define MASK_TOPAZHP_CR_SPE_INTRA_COST_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_SPE_INTRA_COST_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_SPE_INTRA_COST_SIGNATURE 0x0358
+#define SIGNED_TOPAZHP_CR_SPE_INTRA_COST_SIGNATURE 0
+
+/* Register CR_SPE_MVD_CLIP_RANGE */
+#define TOPAZHP_CR_SPE_MVD_CLIP_RANGE 0x0360
+#define MASK_TOPAZHP_CR_SPE_MVD_NEG_CLIP 0x00000FFF
+#define SHIFT_TOPAZHP_CR_SPE_MVD_NEG_CLIP 0
+#define REGNUM_TOPAZHP_CR_SPE_MVD_NEG_CLIP 0x0360
+#define SIGNED_TOPAZHP_CR_SPE_MVD_NEG_CLIP 0
+
+#define MASK_TOPAZHP_CR_SPE_MVD_POS_CLIP 0x00FFF000
+#define SHIFT_TOPAZHP_CR_SPE_MVD_POS_CLIP 12
+#define REGNUM_TOPAZHP_CR_SPE_MVD_POS_CLIP 0x0360
+#define SIGNED_TOPAZHP_CR_SPE_MVD_POS_CLIP 0
+
+#define MASK_TOPAZHP_CR_SPE_MVD_CLIP_ENABLE 0x80000000
+#define SHIFT_TOPAZHP_CR_SPE_MVD_CLIP_ENABLE 31
+#define REGNUM_TOPAZHP_CR_SPE_MVD_CLIP_ENABLE 0x0360
+#define SIGNED_TOPAZHP_CR_SPE_MVD_CLIP_ENABLE 0
+
+/* Register CR_SPE_SUBPEL_RESOLUTION */
+#define TOPAZHP_CR_SPE_SUBPEL_RESOLUTION 0x0364
+#define MASK_TOPAZHP_CR_SPE_SUBPEL_RESOLUTION 0x00000003
+#define SHIFT_TOPAZHP_CR_SPE_SUBPEL_RESOLUTION 0
+#define REGNUM_TOPAZHP_CR_SPE_SUBPEL_RESOLUTION 0x0364
+#define SIGNED_TOPAZHP_CR_SPE_SUBPEL_RESOLUTION 0
+
+/* Register CR_SPE0_MV_SIZE_SIGNATURE */
+#define TOPAZHP_CR_SPE0_MV_SIZE_SIGNATURE 0x0368
+#define MASK_TOPAZHP_CR_SPE0_MV_SIZE_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_SPE0_MV_SIZE_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_SPE0_MV_SIZE_SIGNATURE 0x0368
+#define SIGNED_TOPAZHP_CR_SPE0_MV_SIZE_SIGNATURE 0
+
+/* Register CR_SPE1_MV_SIZE_SIGNATURE */
+#define TOPAZHP_CR_SPE1_MV_SIZE_SIGNATURE 0x036C
+#define MASK_TOPAZHP_CR_SPE1_MV_SIZE_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_SPE1_MV_SIZE_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_SPE1_MV_SIZE_SIGNATURE 0x036C
+#define SIGNED_TOPAZHP_CR_SPE1_MV_SIZE_SIGNATURE 0
+
+/* Register CR_SPE_MB_PERFORMANCE_RESULT */
+#define TOPAZHP_CR_SPE_MB_PERFORMANCE_RESULT 0x0370
+#define MASK_TOPAZHP_CR_SPE_0_MB_PERFORMANCE_RESULT 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_SPE_0_MB_PERFORMANCE_RESULT 0
+#define REGNUM_TOPAZHP_CR_SPE_0_MB_PERFORMANCE_RESULT 0x0370
+#define SIGNED_TOPAZHP_CR_SPE_0_MB_PERFORMANCE_RESULT 0
+
+#define MASK_TOPAZHP_CR_SPE_1_MB_PERFORMANCE_RESULT 0xFFFF0000
+#define SHIFT_TOPAZHP_CR_SPE_1_MB_PERFORMANCE_RESULT 16
+#define REGNUM_TOPAZHP_CR_SPE_1_MB_PERFORMANCE_RESULT 0x0370
+#define SIGNED_TOPAZHP_CR_SPE_1_MB_PERFORMANCE_RESULT 0
+
+/* Register CR_SPE_MB_PERFORMANCE_MB_NUMBER */
+#define TOPAZHP_CR_SPE_MB_PERFORMANCE_MB_NUMBER 0x0374
+#define MASK_TOPAZHP_CR_SPE_0_MB_PERFORMANCE_MB_NUMBER 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_SPE_0_MB_PERFORMANCE_MB_NUMBER 0
+#define REGNUM_TOPAZHP_CR_SPE_0_MB_PERFORMANCE_MB_NUMBER 0x0374
+#define SIGNED_TOPAZHP_CR_SPE_0_MB_PERFORMANCE_MB_NUMBER 0
+
+#define MASK_TOPAZHP_CR_SPE_1_MB_PERFORMANCE_MB_NUMBER 0xFFFF0000
+#define SHIFT_TOPAZHP_CR_SPE_1_MB_PERFORMANCE_MB_NUMBER 16
+#define REGNUM_TOPAZHP_CR_SPE_1_MB_PERFORMANCE_MB_NUMBER 0x0374
+#define SIGNED_TOPAZHP_CR_SPE_1_MB_PERFORMANCE_MB_NUMBER 0
+
+/* Register CR_SPE_MB_PERFORMANCE_CLEAR */
+#define TOPAZHP_CR_SPE_MB_PERFORMANCE_CLEAR 0x0378
+#define MASK_TOPAZHP_CR_SPE_MB_PERFORMANCE_CLEAR 0x00000001
+#define SHIFT_TOPAZHP_CR_SPE_MB_PERFORMANCE_CLEAR 0
+#define REGNUM_TOPAZHP_CR_SPE_MB_PERFORMANCE_CLEAR 0x0378
+#define SIGNED_TOPAZHP_CR_SPE_MB_PERFORMANCE_CLEAR 0
+
+/* Register CR_PC_TOTAL_COSTS_SIGNATURE */
+#define TOPAZHP_CR_PC_TOTAL_COSTS_SIGNATURE 0x037C
+#define MASK_TOPAZHP_CR_PC_TOTAL_COSTS_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PC_TOTAL_COSTS_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_PC_TOTAL_COSTS_SIGNATURE 0x037C
+#define SIGNED_TOPAZHP_CR_PC_TOTAL_COSTS_SIGNATURE 0
+
+/* Register CR_PC_INTER_REGS_SIGNATURE */
+#define TOPAZHP_CR_PC_INTER_REGS_SIGNATURE 0x0380
+#define MASK_TOPAZHP_CR_PC_INTER_REGS_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PC_INTER_REGS_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_PC_INTER_REGS_SIGNATURE 0x0380
+#define SIGNED_TOPAZHP_CR_PC_INTER_REGS_SIGNATURE 0
+
+/* Register CR_PC_INTRA_REGS_SIGNATURE */
+#define TOPAZHP_CR_PC_INTRA_REGS_SIGNATURE 0x0384
+#define MASK_TOPAZHP_CR_PC_INTRA_REGS_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PC_INTRA_REGS_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_PC_INTRA_REGS_SIGNATURE 0x0384
+#define SIGNED_TOPAZHP_CR_PC_INTRA_REGS_SIGNATURE 0
+
+/* Register CR_PC_HW_OUTPUT_SIGNATURE */
+#define TOPAZHP_CR_PC_HW_OUTPUT_SIGNATURE 0x0388
+#define MASK_TOPAZHP_CR_PC_HW_OUTPUT_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PC_HW_OUTPUT_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_PC_HW_OUTPUT_SIGNATURE 0x0388
+#define SIGNED_TOPAZHP_CR_PC_HW_OUTPUT_SIGNATURE 0
+
+/* Register CR_PC_COSTS_16X8_SIGNATURE */
+#define TOPAZHP_CR_PC_COSTS_16X8_SIGNATURE 0x038C
+#define MASK_TOPAZHP_CR_PC_COSTS_16X8_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PC_COSTS_16X8_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_PC_COSTS_16X8_SIGNATURE 0x038C
+#define SIGNED_TOPAZHP_CR_PC_COSTS_16X8_SIGNATURE 0
+
+/* Register CR_PRED_COMB_CONTROL */
+#define TOPAZHP_CR_PRED_COMB_CONTROL 0x0390
+#define MASK_TOPAZHP_CR_INTRA4X4_DISABLE 0x00000001
+#define SHIFT_TOPAZHP_CR_INTRA4X4_DISABLE 0
+#define REGNUM_TOPAZHP_CR_INTRA4X4_DISABLE 0x0390
+#define SIGNED_TOPAZHP_CR_INTRA4X4_DISABLE 0
+
+#define MASK_TOPAZHP_CR_INTRA8X8_DISABLE 0x00000002
+#define SHIFT_TOPAZHP_CR_INTRA8X8_DISABLE 1
+#define REGNUM_TOPAZHP_CR_INTRA8X8_DISABLE 0x0390
+#define SIGNED_TOPAZHP_CR_INTRA8X8_DISABLE 0
+
+#define MASK_TOPAZHP_CR_INTRA16X16_DISABLE 0x00000004
+#define SHIFT_TOPAZHP_CR_INTRA16X16_DISABLE 2
+#define REGNUM_TOPAZHP_CR_INTRA16X16_DISABLE 0x0390
+#define SIGNED_TOPAZHP_CR_INTRA16X16_DISABLE 0
+
+#define MASK_TOPAZHP_CR_INTER8X8_DISABLE 0x00000010
+#define SHIFT_TOPAZHP_CR_INTER8X8_DISABLE 4
+#define REGNUM_TOPAZHP_CR_INTER8X8_DISABLE 0x0390
+#define SIGNED_TOPAZHP_CR_INTER8X8_DISABLE 0
+
+#define MASK_TOPAZHP_CR_B_PIC0_DISABLE 0x00000100
+#define SHIFT_TOPAZHP_CR_B_PIC0_DISABLE 8
+#define REGNUM_TOPAZHP_CR_B_PIC0_DISABLE 0x0390
+#define SIGNED_TOPAZHP_CR_B_PIC0_DISABLE 0
+
+#define MASK_TOPAZHP_CR_B_PIC1_DISABLE 0x00000200
+#define SHIFT_TOPAZHP_CR_B_PIC1_DISABLE 9
+#define REGNUM_TOPAZHP_CR_B_PIC1_DISABLE 0x0390
+#define SIGNED_TOPAZHP_CR_B_PIC1_DISABLE 0
+
+#define MASK_TOPAZHP_CR_INTER_INTRA_SCALE_ENABLE 0x00001000
+#define SHIFT_TOPAZHP_CR_INTER_INTRA_SCALE_ENABLE 12
+#define REGNUM_TOPAZHP_CR_INTER_INTRA_SCALE_ENABLE 0x0390
+#define SIGNED_TOPAZHP_CR_INTER_INTRA_SCALE_ENABLE 0
+
+#define MASK_TOPAZHP_CR_CUMULATIVE_BIASES_ENABLE 0x00000800
+#define SHIFT_TOPAZHP_CR_CUMULATIVE_BIASES_ENABLE 11
+#define REGNUM_TOPAZHP_CR_CUMULATIVE_BIASES_ENABLE 0x0390
+#define SIGNED_TOPAZHP_CR_CUMULATIVE_BIASES_ENABLE 0
+
+#define MASK_TOPAZHP_CR_SKIPPED_CODED_SCALE_ENABLE 0x00002000
+#define SHIFT_TOPAZHP_CR_SKIPPED_CODED_SCALE_ENABLE 13
+#define REGNUM_TOPAZHP_CR_SKIPPED_CODED_SCALE_ENABLE 0x0390
+#define SIGNED_TOPAZHP_CR_SKIPPED_CODED_SCALE_ENABLE 0
+
+#define MASK_TOPAZHP_CR_INTER_INTRA_HYSTERESIS 0xFFFF0000
+#define SHIFT_TOPAZHP_CR_INTER_INTRA_HYSTERESIS 16
+#define REGNUM_TOPAZHP_CR_INTER_INTRA_HYSTERESIS 0x0390
+#define SIGNED_TOPAZHP_CR_INTER_INTRA_HYSTERESIS 0
+
+/* Register CR_PC_COSTS_8X16_SIGNATURE */
+#define TOPAZHP_CR_PC_COSTS_8X16_SIGNATURE 0x0394
+#define MASK_TOPAZHP_CR_PC_COSTS_8X16_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PC_COSTS_8X16_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_PC_COSTS_8X16_SIGNATURE 0x0394
+#define SIGNED_TOPAZHP_CR_PC_COSTS_8X16_SIGNATURE 0
+
+/* Register CR_PC_COSTS_8X8_SIGNATURE */
+#define TOPAZHP_CR_PC_COSTS_8X8_SIGNATURE 0x0398
+#define MASK_TOPAZHP_CR_PC_COSTS_8X8_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PC_COSTS_8X8_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_PC_COSTS_8X8_SIGNATURE 0x0398
+#define SIGNED_TOPAZHP_CR_PC_COSTS_8X8_SIGNATURE 0
+
+/* Register CR_PRED_BU_STAT_UPDATE */
+#define TOPAZHP_CR_PRED_BU_STAT_UPDATE 0x039C
+#define MASK_TOPAZHP_CR_FORCE_BU_STAT_UPDATE 0x00000001
+#define SHIFT_TOPAZHP_CR_FORCE_BU_STAT_UPDATE 0
+#define REGNUM_TOPAZHP_CR_FORCE_BU_STAT_UPDATE 0x039C
+#define SIGNED_TOPAZHP_CR_FORCE_BU_STAT_UPDATE 0
+
+/* Register CR_BEST_INTER_BU_SAD */
+#define TOPAZHP_CR_BEST_INTER_BU_SAD 0x03A0
+#define MASK_TOPAZHP_CR_BEST_INTER_BU_SAD 0x7FFFFFFF
+#define SHIFT_TOPAZHP_CR_BEST_INTER_BU_SAD 0
+#define REGNUM_TOPAZHP_CR_BEST_INTER_BU_SAD 0x03A0
+#define SIGNED_TOPAZHP_CR_BEST_INTER_BU_SAD 0
+
+/* Register CR_BEST_INTER_BU_COST */
+#define TOPAZHP_CR_BEST_INTER_BU_COST 0x03A4
+#define MASK_TOPAZHP_CR_BEST_INTER_BU_COST 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_BEST_INTER_BU_COST 0
+#define REGNUM_TOPAZHP_CR_BEST_INTER_BU_COST 0x03A4
+#define SIGNED_TOPAZHP_CR_BEST_INTER_BU_COST 0
+
+/* Register CR_BEST_INTRA_BU_SAD */
+#define TOPAZHP_CR_BEST_INTRA_BU_SAD 0x03A8
+#define MASK_TOPAZHP_CR_BEST_INTRA_BU_SAD 0x7FFFFFFF
+#define SHIFT_TOPAZHP_CR_BEST_INTRA_BU_SAD 0
+#define REGNUM_TOPAZHP_CR_BEST_INTRA_BU_SAD 0x03A8
+#define SIGNED_TOPAZHP_CR_BEST_INTRA_BU_SAD 0
+
+/* Register CR_BEST_INTRA_BU_COST */
+#define TOPAZHP_CR_BEST_INTRA_BU_COST 0x03AC
+#define MASK_TOPAZHP_CR_BEST_INTRA_BU_COST 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_BEST_INTRA_BU_COST 0
+#define REGNUM_TOPAZHP_CR_BEST_INTRA_BU_COST 0x03AC
+#define SIGNED_TOPAZHP_CR_BEST_INTRA_BU_COST 0
+
+/* Register CR_PRED_COMB_DMS_SIGNATURE */
+#define TOPAZHP_CR_PRED_COMB_DMS_SIGNATURE 0x03B0
+#define MASK_TOPAZHP_CR_PRED_COMB_DMS_SIGNATURE 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_PRED_COMB_DMS_SIGNATURE 0
+#define REGNUM_TOPAZHP_CR_PRED_COMB_DMS_SIGNATURE 0x03B0
+#define SIGNED_TOPAZHP_CR_PRED_COMB_DMS_SIGNATURE 0
+
+/* Register CR_PC_DMS_PERFORMANCE_CYCLES */
+#define TOPAZHP_CR_PC_DMS_PERFORMANCE_CYCLES 0x03B4
+#define MASK_TOPAZHP_CR_PC_DMS_WORST_MB_CYCLES 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_PC_DMS_WORST_MB_CYCLES 0
+#define REGNUM_TOPAZHP_CR_PC_DMS_WORST_MB_CYCLES 0x03B4
+#define SIGNED_TOPAZHP_CR_PC_DMS_WORST_MB_CYCLES 0
+
+/* Register CR_PC_DMS_PERFORMANCE_MB_NUM */
+#define TOPAZHP_CR_PC_DMS_PERFORMANCE_MB_NUM 0x03B8
+#define MASK_TOPAZHP_CR_PC_DMS_WORST_MB_NUM 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_PC_DMS_WORST_MB_NUM 0
+#define REGNUM_TOPAZHP_CR_PC_DMS_WORST_MB_NUM 0x03B8
+#define SIGNED_TOPAZHP_CR_PC_DMS_WORST_MB_NUM 0
+
+/* Register CR_PC_DMS_PERFORMANCE_CTRL */
+#define TOPAZHP_CR_PC_DMS_PERFORMANCE_CTRL 0x03BC
+#define MASK_TOPAZHP_CR_PC_DMS_WORST_MB_CLEAR 0x00000001
+#define SHIFT_TOPAZHP_CR_PC_DMS_WORST_MB_CLEAR 0
+#define REGNUM_TOPAZHP_CR_PC_DMS_WORST_MB_CLEAR 0x03BC
+#define SIGNED_TOPAZHP_CR_PC_DMS_WORST_MB_CLEAR 0
+
+#define MASK_TOPAZHP_CR_PC_DMS_DISABLE_COUNTERS 0x00000002
+#define SHIFT_TOPAZHP_CR_PC_DMS_DISABLE_COUNTERS 1
+#define REGNUM_TOPAZHP_CR_PC_DMS_DISABLE_COUNTERS 0x03BC
+#define SIGNED_TOPAZHP_CR_PC_DMS_DISABLE_COUNTERS 0
+
+/* Register CR_PC_DM_PERFORMANCE_CYCLES */
+#define TOPAZHP_CR_PC_DM_PERFORMANCE_CYCLES 0x03C0
+#define MASK_TOPAZHP_CR_PC_DM_WORST_MB_CYCLES 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_PC_DM_WORST_MB_CYCLES 0
+#define REGNUM_TOPAZHP_CR_PC_DM_WORST_MB_CYCLES 0x03C0
+#define SIGNED_TOPAZHP_CR_PC_DM_WORST_MB_CYCLES 0
+
+/* Register CR_PC_DM_PERFORMANCE_MB_NUM */
+#define TOPAZHP_CR_PC_DM_PERFORMANCE_MB_NUM 0x03C4
+#define MASK_TOPAZHP_CR_PC_DM_WORST_MB_NUM 0x0000FFFF
+#define SHIFT_TOPAZHP_CR_PC_DM_WORST_MB_NUM 0
+#define REGNUM_TOPAZHP_CR_PC_DM_WORST_MB_NUM 0x03C4
+#define SIGNED_TOPAZHP_CR_PC_DM_WORST_MB_NUM 0
+
+/* Register CR_PC_DM_PERFORMANCE_CTRL */
+#define TOPAZHP_CR_PC_DM_PERFORMANCE_CTRL 0x03C8
+#define MASK_TOPAZHP_CR_PC_DM_WORST_MB_CLEAR 0x00000001
+#define SHIFT_TOPAZHP_CR_PC_DM_WORST_MB_CLEAR 0
+#define REGNUM_TOPAZHP_CR_PC_DM_WORST_MB_CLEAR 0x03C8
+#define SIGNED_TOPAZHP_CR_PC_DM_WORST_MB_CLEAR 0
+
+#define MASK_TOPAZHP_CR_PC_DM_DISABLE_COUNTERS 0x00000002
+#define SHIFT_TOPAZHP_CR_PC_DM_DISABLE_COUNTERS 1
+#define REGNUM_TOPAZHP_CR_PC_DM_DISABLE_COUNTERS 0x03C8
+#define SIGNED_TOPAZHP_CR_PC_DM_DISABLE_COUNTERS 0
+
+/* Register CR_BEST_INTER_INTRA_COUNTS */
+#define TOPAZHP_CR_BEST_INTER_INTRA_COUNTS 0x03CC
+#define MASK_TOPAZHP_CR_BEST_INTRA_BU_COUNT 0x000000FF
+#define SHIFT_TOPAZHP_CR_BEST_INTRA_BU_COUNT 0
+#define REGNUM_TOPAZHP_CR_BEST_INTRA_BU_COUNT 0x03CC
+#define SIGNED_TOPAZHP_CR_BEST_INTRA_BU_COUNT 0
+
+#define MASK_TOPAZHP_CR_BEST_INTER_BU_COUNT 0x0000FF00
+#define SHIFT_TOPAZHP_CR_BEST_INTER_BU_COUNT 8
+#define REGNUM_TOPAZHP_CR_BEST_INTER_BU_COUNT 0x03CC
+#define SIGNED_TOPAZHP_CR_BEST_INTER_BU_COUNT 0
+
+/* Register CR_WEIGHTED_PRED_CONTROL */
+#define TOPAZHP_CR_WEIGHTED_PRED_CONTROL 0x03D0
+#define MASK_TOPAZHP_CR_LOG_WD_LUMA 0x00000007
+#define SHIFT_TOPAZHP_CR_LOG_WD_LUMA 0
+#define REGNUM_TOPAZHP_CR_LOG_WD_LUMA 0x03D0
+#define SIGNED_TOPAZHP_CR_LOG_WD_LUMA 0
+
+#define MASK_TOPAZHP_CR_LOG_WD_CHROMA 0x00000070
+#define SHIFT_TOPAZHP_CR_LOG_WD_CHROMA 4
+#define REGNUM_TOPAZHP_CR_LOG_WD_CHROMA 0x03D0
+#define SIGNED_TOPAZHP_CR_LOG_WD_CHROMA 0
+
+#define MASK_TOPAZHP_CR_IMPLICIT_BIPRED 0x40000000
+#define SHIFT_TOPAZHP_CR_IMPLICIT_BIPRED 30
+#define REGNUM_TOPAZHP_CR_IMPLICIT_BIPRED 0x03D0
+#define SIGNED_TOPAZHP_CR_IMPLICIT_BIPRED 0
+
+#define MASK_TOPAZHP_CR_WEIGHTED_PRED_ENABLE 0x80000000
+#define SHIFT_TOPAZHP_CR_WEIGHTED_PRED_ENABLE 31
+#define REGNUM_TOPAZHP_CR_WEIGHTED_PRED_ENABLE 0x03D0
+#define SIGNED_TOPAZHP_CR_WEIGHTED_PRED_ENABLE 0
+#define TOPAZHP_CR_WEIGHTED_PRED_ENABLE_ENABLED                0x00000001              /* Weighted Prediction is enabled */
+#define TOPAZHP_CR_WEIGHTED_PRED_ENABLE_DISABLED               0x00000000              /* Weighted Prediction is not enabled */
+
+/* Register CR_WEIGHTED_PRED_COEFFS_0 */
+#define TOPAZHP_CR_WEIGHTED_PRED_COEFFS_0 0x03D4
+#define MASK_TOPAZHP_CR_WEIGHTED_PRED_OFFSET_00(i) (0x000000FF << (16 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_WEIGHTED_PRED_OFFSET_00(i) (16 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_WEIGHTED_PRED_OFFSET_00(i) 0x03D4
+
+#define MASK_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT_00(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT_00(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT_00(i) 0x03D4
+
+/* Register CR_WEIGHTED_PRED_COEFFS_1 */
+#define TOPAZHP_CR_WEIGHTED_PRED_COEFFS_1 0x03D8
+#define MASK_TOPAZHP_CR_WEIGHTED_PRED_OFFSET_01(i) (0x000000FF << (16 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_WEIGHTED_PRED_OFFSET_01(i) (16 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_WEIGHTED_PRED_OFFSET_01(i) 0x03D8
+
+#define MASK_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT_01(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT_01(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT_01(i) 0x03D8
+
+/* Register CR_WEIGHTED_PRED_COEFFS_2 */
+#define TOPAZHP_CR_WEIGHTED_PRED_COEFFS_2 0x03DC
+#define MASK_TOPAZHP_CR_WEIGHTED_PRED_OFFSET_02(i) (0x000000FF << (16 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_WEIGHTED_PRED_OFFSET_02(i) (16 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_WEIGHTED_PRED_OFFSET_02(i) 0x03DC
+
+#define MASK_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT_02(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT_02(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT_02(i) 0x03DC
+
+/* Register CR_WEIGHTED_PRED_INV_WEIGHT */
+#define TOPAZHP_CR_WEIGHTED_PRED_INV_WEIGHT 0x03E0
+#define MASK_TOPAZHP_CR_INV_LOG_WD(i) (0x00000007 << (16 + ((i) * 3)))
+#define SHIFT_TOPAZHP_CR_INV_LOG_WD(i) (16 + ((i) * 3))
+#define REGNUM_TOPAZHP_CR_INV_LOG_WD(i) 0x03E0
+
+#define MASK_TOPAZHP_CR_INV_WEIGHT(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_INV_WEIGHT(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_INV_WEIGHT(i) 0x03E0
+
+/* Register CR_TOPAZHP_RSVD0 */
+#define TOPAZHP_CR_TOPAZHP_RSVD0    0x03F0
+#define MASK_TOPAZHP_CR_TOPAZHP_RESERVED0 0xFFFFFFFF
+#define SHIFT_TOPAZHP_CR_TOPAZHP_RESERVED0 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_RESERVED0 0x03F0
+#define SIGNED_TOPAZHP_CR_TOPAZHP_RESERVED0 0
+
+/* Register CR_TOPAZHP_CRC_CLEAR */
+#define TOPAZHP_CR_TOPAZHP_CRC_CLEAR 0x03F4
+#define MASK_TOPAZHP_CR_IPE_CRC_CLEAR 0x00000001
+#define SHIFT_TOPAZHP_CR_IPE_CRC_CLEAR 0
+#define REGNUM_TOPAZHP_CR_IPE_CRC_CLEAR 0x03F4
+#define SIGNED_TOPAZHP_CR_IPE_CRC_CLEAR 0
+
+#define MASK_TOPAZHP_CR_SPE_CRC_CLEAR 0x00000002
+#define SHIFT_TOPAZHP_CR_SPE_CRC_CLEAR 1
+#define REGNUM_TOPAZHP_CR_SPE_CRC_CLEAR 0x03F4
+#define SIGNED_TOPAZHP_CR_SPE_CRC_CLEAR 0
+
+#define MASK_TOPAZHP_CR_JMCOMP_CRC_CLEAR 0x00000008
+#define SHIFT_TOPAZHP_CR_JMCOMP_CRC_CLEAR 3
+#define REGNUM_TOPAZHP_CR_JMCOMP_CRC_CLEAR 0x03F4
+#define SIGNED_TOPAZHP_CR_JMCOMP_CRC_CLEAR 0
+
+#define MASK_TOPAZHP_CR_H264COMP_CRC_CLEAR 0x00000010
+#define SHIFT_TOPAZHP_CR_H264COMP_CRC_CLEAR 4
+#define REGNUM_TOPAZHP_CR_H264COMP_CRC_CLEAR 0x03F4
+#define SIGNED_TOPAZHP_CR_H264COMP_CRC_CLEAR 0
+
+#define MASK_TOPAZHP_CR_DB_CRC_CLEAR 0x00000020
+#define SHIFT_TOPAZHP_CR_DB_CRC_CLEAR 5
+#define REGNUM_TOPAZHP_CR_DB_CRC_CLEAR 0x03F4
+#define SIGNED_TOPAZHP_CR_DB_CRC_CLEAR 0
+
+#define MASK_TOPAZHP_CR_VLC_CRC_CLEAR 0x00000040
+#define SHIFT_TOPAZHP_CR_VLC_CRC_CLEAR 6
+#define REGNUM_TOPAZHP_CR_VLC_CRC_CLEAR 0x03F4
+#define SIGNED_TOPAZHP_CR_VLC_CRC_CLEAR 0
+
+#define MASK_TOPAZHP_CR_PC_CRC_CLEAR 0x00000080
+#define SHIFT_TOPAZHP_CR_PC_CRC_CLEAR 7
+#define REGNUM_TOPAZHP_CR_PC_CRC_CLEAR 0x03F4
+#define SIGNED_TOPAZHP_CR_PC_CRC_CLEAR 0
+
+#define MASK_TOPAZHP_CR_LRITC_CRC_CLEAR 0x00000100
+#define SHIFT_TOPAZHP_CR_LRITC_CRC_CLEAR 8
+#define REGNUM_TOPAZHP_CR_LRITC_CRC_CLEAR 0x03F4
+#define SIGNED_TOPAZHP_CR_LRITC_CRC_CLEAR 0
+
+#define MASK_TOPAZHP_CR_INPUT_SCALER_CRC_CLEAR 0x00000200
+#define SHIFT_TOPAZHP_CR_INPUT_SCALER_CRC_CLEAR 9
+#define REGNUM_TOPAZHP_CR_INPUT_SCALER_CRC_CLEAR 0x03F4
+#define SIGNED_TOPAZHP_CR_INPUT_SCALER_CRC_CLEAR 0
+
+
+/* Table CR_JMCOMP_LUMA_QUANTISER_TABLE */
+
+/* Register CR_JMCOMP_LUMA_QUANTISER */
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER(X) (0x0280 + (4 * (X)))
+#define MASK_TOPAZHP_CR_JMCOMP_LUMA_QUANT(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_LUMA_QUANT(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_LUMA_QUANT(X,i) (0x0280 + (4 * (X)))
+
+/* Number of entries in table CR_JMCOMP_LUMA_QUANTISER_TABLE */
+
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_TABLE_SIZE_UINT32 16
+#define TOPAZHP_CR_JMCOMP_LUMA_QUANTISER_TABLE_NUM_ENTRIES 16
+
+
+/* Table CR_JMCOMP_CHROMA_QUANTISER_TABLE */
+
+/* Register CR_JMCOMP_CHROMA_QUANTISER */
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER(X) (0x02C0 + (4 * (X)))
+#define MASK_TOPAZHP_CR_JMCOMP_CHROMA_QUANT(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_JMCOMP_CHROMA_QUANT(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_JMCOMP_CHROMA_QUANT(X,i) (0x02C0 + (4 * (X)))
+
+/* Number of entries in table CR_JMCOMP_CHROMA_QUANTISER_TABLE */
+
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_TABLE_SIZE_UINT32 16
+#define TOPAZHP_CR_JMCOMP_CHROMA_QUANTISER_TABLE_NUM_ENTRIES 16
+
+
+/* Table CR_WEIGHTED_PRED_COEFFS */
+
+/* Register CR_WEIGHTED_PRED_COEFFS */
+#define TOPAZHP_CR_WEIGHTED_PRED_COEFFS(X) (0x03D4 + (4 * (X)))
+#define MASK_TOPAZHP_CR_WEIGHTED_PRED_OFFSET(i) (0x000000FF << (16 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_WEIGHTED_PRED_OFFSET(i) (16 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_WEIGHTED_PRED_OFFSET(X,i) (0x03D4 + (4 * (X)))
+
+#define MASK_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT(i) (0x000000FF << (0 + ((i) * 8)))
+#define SHIFT_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT(i) (0 + ((i) * 8))
+#define REGNUM_TOPAZHP_CR_WEIGHTED_PRED_WEIGHT(X,i) (0x03D4 + (4 * (X)))
+
+/* Number of entries in table CR_WEIGHTED_PRED_COEFFS */
+
+#define TOPAZHP_CR_WEIGHTED_PRED_COEFFS_SIZE_UINT32 3
+#define TOPAZHP_CR_WEIGHTED_PRED_COEFFS_NUM_ENTRIES 3
+
+/*
+       Byte range covering the group TOPAZHP_CORE file
+*/
+
+#define TOPAZHP_TOPAZHP_CORE_REGISTERS_START           0x00000000
+#define TOPAZHP_TOPAZHP_CORE_REGISTERS_END             0x000003F7
+
+/*
+       Byte range covering the whole register file
+*/
+
+#define TOPAZHP_REGISTERS_START                0x00000000
+#define TOPAZHP_REGISTERS_END                  0x000003F7
+
+
+
+#endif
diff --git a/driver/encoder/reg_headers/topazhp_multicore_regs.h b/driver/encoder/reg_headers/topazhp_multicore_regs.h
new file mode 100644 (file)
index 0000000..83c04bb
--- /dev/null
@@ -0,0 +1,1290 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _REGCONV_H_topazhp_multicore_regs_h
+#define _REGCONV_H_topazhp_multicore_regs_h
+
+/* Register CR_MULTICORE_SRST */
+#define TOPAZHP_TOP_CR_MULTICORE_SRST 0x0000
+#define MASK_TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET 0
+#define REGNUM_TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET 0
+
+#define MASK_TOPAZHP_TOP_CR_IMG_TOPAZ_IO_SOFT_RESET 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_IMG_TOPAZ_IO_SOFT_RESET 1
+#define REGNUM_TOPAZHP_TOP_CR_IMG_TOPAZ_IO_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_TOP_CR_IMG_TOPAZ_IO_SOFT_RESET 0
+
+#define MASK_TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET 2
+#define REGNUM_TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET 0
+
+/* Register CR_MULTICORE_INT_STAT */
+#define TOPAZHP_TOP_CR_MULTICORE_INT_STAT 0x0004
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_DMAC 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_DMAC 0
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_DMAC 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_DMAC 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MTX 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MTX 1
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MTX 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MTX 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MTX_HALT 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MTX_HALT 2
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MTX_HALT 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MTX_HALT 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT 0x00000078
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT 3
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MTX_CORES 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MTX_CORES 8
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MTX_CORES 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MTX_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_HOST_CORES 0x00FF0000
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_HOST_CORES 16
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_HOST_CORES 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_HOST_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT_B 0x1E000000
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT_B 25
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT_B 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT_B 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MAS_MTX_INTS 0x40000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MAS_MTX_INTS 30
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MAS_MTX_INTS 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MAS_MTX_INTS 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MAS_HOST_INTS 0x80000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MAS_HOST_INTS 31
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MAS_HOST_INTS 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MAS_HOST_INTS 0
+
+/* Register CR_MULTICORE_MTX_INT_ENAB */
+#define TOPAZHP_TOP_CR_MULTICORE_MTX_INT_ENAB 0x0008
+#define MASK_TOPAZHP_TOP_CR_MTX_INTEN_DMAC 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_MTX_INTEN_DMAC 0
+#define REGNUM_TOPAZHP_TOP_CR_MTX_INTEN_DMAC 0x0008
+#define SIGNED_TOPAZHP_TOP_CR_MTX_INTEN_DMAC 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_INTEN_MTX 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_MTX_INTEN_MTX 1
+#define REGNUM_TOPAZHP_TOP_CR_MTX_INTEN_MTX 0x0008
+#define SIGNED_TOPAZHP_TOP_CR_MTX_INTEN_MTX 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_INTEN_MTX_HALT 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_MTX_INTEN_MTX_HALT 2
+#define REGNUM_TOPAZHP_TOP_CR_MTX_INTEN_MTX_HALT 0x0008
+#define SIGNED_TOPAZHP_TOP_CR_MTX_INTEN_MTX_HALT 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_INTEN_MMU_FAULT 0x00000078
+#define SHIFT_TOPAZHP_TOP_CR_MTX_INTEN_MMU_FAULT 3
+#define REGNUM_TOPAZHP_TOP_CR_MTX_INTEN_MMU_FAULT 0x0008
+#define SIGNED_TOPAZHP_TOP_CR_MTX_INTEN_MMU_FAULT 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_INTEN_MTX_CORES 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_MTX_INTEN_MTX_CORES 8
+#define REGNUM_TOPAZHP_TOP_CR_MTX_INTEN_MTX_CORES 0x0008
+#define SIGNED_TOPAZHP_TOP_CR_MTX_INTEN_MTX_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_INTEN_HOST_CORES 0x00FF0000
+#define SHIFT_TOPAZHP_TOP_CR_MTX_INTEN_HOST_CORES 16
+#define REGNUM_TOPAZHP_TOP_CR_MTX_INTEN_HOST_CORES 0x0008
+#define SIGNED_TOPAZHP_TOP_CR_MTX_INTEN_HOST_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_INTEN_MMU_FAULT_B 0x1E000000
+#define SHIFT_TOPAZHP_TOP_CR_MTX_INTEN_MMU_FAULT_B 25
+#define REGNUM_TOPAZHP_TOP_CR_MTX_INTEN_MMU_FAULT_B 0x0008
+#define SIGNED_TOPAZHP_TOP_CR_MTX_INTEN_MMU_FAULT_B 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_TOPAZHP_MAS_INTEN 0x40000000
+#define SHIFT_TOPAZHP_TOP_CR_MTX_TOPAZHP_MAS_INTEN 30
+#define REGNUM_TOPAZHP_TOP_CR_MTX_TOPAZHP_MAS_INTEN 0x0008
+#define SIGNED_TOPAZHP_TOP_CR_MTX_TOPAZHP_MAS_INTEN 0
+
+/* Register CR_MULTICORE_HOST_INT_ENAB */
+#define TOPAZHP_TOP_CR_MULTICORE_HOST_INT_ENAB 0x000C
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_DMAC 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_DMAC 0
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_DMAC 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_DMAC 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MTX 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MTX 1
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MTX 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MTX 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MTX_HALT 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MTX_HALT 2
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MTX_HALT 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MTX_HALT 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT 0x00000078
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT 3
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MTX_CORES 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MTX_CORES 8
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MTX_CORES 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MTX_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_HOST_CORES 0x00FF0000
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_HOST_CORES 16
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_HOST_CORES 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_HOST_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT_B 0x1E000000
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT_B 25
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT_B 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT_B 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_TOPAZHP_MAS_INTEN 0x80000000
+#define SHIFT_TOPAZHP_TOP_CR_HOST_TOPAZHP_MAS_INTEN 31
+#define REGNUM_TOPAZHP_TOP_CR_HOST_TOPAZHP_MAS_INTEN 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_TOPAZHP_MAS_INTEN 0
+
+/* Register CR_MULTICORE_INT_CLEAR */
+#define TOPAZHP_TOP_CR_MULTICORE_INT_CLEAR 0x0010
+#define MASK_TOPAZHP_TOP_CR_INTCLR_DMAC 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_DMAC 0
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_DMAC 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_DMAC 0
+
+#define MASK_TOPAZHP_TOP_CR_INTCLR_MTX 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_MTX 1
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_MTX 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_MTX 0
+
+#define MASK_TOPAZHP_TOP_CR_INTCLR_MTX_HALT 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_MTX_HALT 2
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_MTX_HALT 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_MTX_HALT 0
+
+#define MASK_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT 0x00000078
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT 3
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT 0
+
+#define MASK_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT_B 0x1E000000
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT_B 25
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT_B 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT_B 0
+
+/* Register CR_MULTICORE_MAN_CLK_GATE */
+#define TOPAZHP_TOP_CR_MULTICORE_MAN_CLK_GATE 0x0014
+#define MASK_TOPAZHP_TOP_CR_TOPAZ_MTX_MAN_CLK_GATE 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZ_MTX_MAN_CLK_GATE 1
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZ_MTX_MAN_CLK_GATE 0x0014
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZ_MTX_MAN_CLK_GATE 0
+
+/* Register CR_TOPAZ_MTX_C_RATIO */
+#define TOPAZHP_TOP_CR_TOPAZ_MTX_C_RATIO 0x0018
+#define MASK_TOPAZHP_TOP_CR_MTX_C_RATIO 0x00000003
+#define SHIFT_TOPAZHP_TOP_CR_MTX_C_RATIO 0
+#define REGNUM_TOPAZHP_TOP_CR_MTX_C_RATIO 0x0018
+#define SIGNED_TOPAZHP_TOP_CR_MTX_C_RATIO 0
+
+/* Register CR_MMU_STATUS */
+#define TOPAZHP_TOP_CR_MMU_STATUS   0x001C
+#define MASK_TOPAZHP_TOP_CR_MMU_PF_N_RW 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_MMU_PF_N_RW 0
+#define REGNUM_TOPAZHP_TOP_CR_MMU_PF_N_RW 0x001C
+#define SIGNED_TOPAZHP_TOP_CR_MMU_PF_N_RW 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_FAULT_ADDR 0xFFFFF000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_FAULT_ADDR 12
+#define REGNUM_TOPAZHP_TOP_CR_MMU_FAULT_ADDR 0x001C
+#define SIGNED_TOPAZHP_TOP_CR_MMU_FAULT_ADDR 0
+
+/* Register CR_MMU_MEM_REQ */
+#define TOPAZHP_TOP_CR_MMU_MEM_REQ  0x0020
+#define MASK_TOPAZHP_TOP_CR_MEM_REQ_STAT_READS 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_MEM_REQ_STAT_READS 0
+#define REGNUM_TOPAZHP_TOP_CR_MEM_REQ_STAT_READS 0x0020
+#define SIGNED_TOPAZHP_TOP_CR_MEM_REQ_STAT_READS 0
+
+/* Register CR_MMU_CONTROL0 */
+#define TOPAZHP_TOP_CR_MMU_CONTROL0 0x0024
+#define MASK_TOPAZHP_TOP_CR_MMU_NOREORDER 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_MMU_NOREORDER 0
+#define REGNUM_TOPAZHP_TOP_CR_MMU_NOREORDER 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_NOREORDER 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_PAUSE 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_MMU_PAUSE 1
+#define REGNUM_TOPAZHP_TOP_CR_MMU_PAUSE 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_PAUSE 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_FLUSH 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_MMU_FLUSH 2
+#define REGNUM_TOPAZHP_TOP_CR_MMU_FLUSH 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_FLUSH 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_INVALDC 0x00000008
+#define SHIFT_TOPAZHP_TOP_CR_MMU_INVALDC 3
+#define REGNUM_TOPAZHP_TOP_CR_MMU_INVALDC 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_INVALDC 0
+
+#define MASK_TOPAZHP_TOP_CR_FLOWRATE_TOPAZ 0x00000700
+#define SHIFT_TOPAZHP_TOP_CR_FLOWRATE_TOPAZ 8
+#define REGNUM_TOPAZHP_TOP_CR_FLOWRATE_TOPAZ 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_FLOWRATE_TOPAZ 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ 0x00010000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ 16
+#define REGNUM_TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ 0
+
+/* Register CR_MMU_CONTROL1 */
+#define TOPAZHP_TOP_CR_MMU_CONTROL1 0x0028
+#define MASK_TOPAZHP_TOP_CR_MMU_TTE_THRESHOLD 0x00000FFF
+#define SHIFT_TOPAZHP_TOP_CR_MMU_TTE_THRESHOLD 0
+#define REGNUM_TOPAZHP_TOP_CR_MMU_TTE_THRESHOLD 0x0028
+#define SIGNED_TOPAZHP_TOP_CR_MMU_TTE_THRESHOLD 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_ADT_TTE 0x000FF000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_ADT_TTE 12
+#define REGNUM_TOPAZHP_TOP_CR_MMU_ADT_TTE 0x0028
+#define SIGNED_TOPAZHP_TOP_CR_MMU_ADT_TTE 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_BEST_COUNT 0x0FF00000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_BEST_COUNT 20
+#define REGNUM_TOPAZHP_TOP_CR_MMU_BEST_COUNT 0x0028
+#define SIGNED_TOPAZHP_TOP_CR_MMU_BEST_COUNT 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_PAGE_SIZE 0xF0000000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_PAGE_SIZE 28
+#define REGNUM_TOPAZHP_TOP_CR_MMU_PAGE_SIZE 0x0028
+#define SIGNED_TOPAZHP_TOP_CR_MMU_PAGE_SIZE 0
+
+/* Register CR_MMU_CONTROL2 */
+#define TOPAZHP_TOP_CR_MMU_CONTROL2 0x002C
+#define MASK_TOPAZHP_TOP_CR_MMU_ENABLE_36BIT_ADDRESSING 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_MMU_ENABLE_36BIT_ADDRESSING 0
+#define REGNUM_TOPAZHP_TOP_CR_MMU_ENABLE_36BIT_ADDRESSING 0x002C
+#define SIGNED_TOPAZHP_TOP_CR_MMU_ENABLE_36BIT_ADDRESSING 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_TILING_SCHEME 0x00000008
+#define SHIFT_TOPAZHP_TOP_CR_MMU_TILING_SCHEME 3
+#define REGNUM_TOPAZHP_TOP_CR_MMU_TILING_SCHEME 0x002C
+#define SIGNED_TOPAZHP_TOP_CR_MMU_TILING_SCHEME 0
+
+/* Register CR_MMU_DIR_LIST_BASE_0 */
+#define TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_0 0x0030
+#define MASK_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR_00 0xFFFFFFF0
+#define SHIFT_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR_00 4
+#define REGNUM_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR_00 0x0030
+#define SIGNED_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR_00 0
+
+/* Register CR_MMU_TILE_0 */
+#define TOPAZHP_TOP_CR_MMU_TILE_0   0x0038
+#define MASK_TOPAZHP_TOP_CR_TILE_MIN_ADDR_00 0x00000FFF
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MIN_ADDR_00 0
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MIN_ADDR_00 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MIN_ADDR_00 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_MAX_ADDR_00 0x00FFF000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MAX_ADDR_00 12
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MAX_ADDR_00 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MAX_ADDR_00 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_STRIDE_00 0x07000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_STRIDE_00 24
+#define REGNUM_TOPAZHP_TOP_CR_TILE_STRIDE_00 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_STRIDE_00 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_ENABLE_00 0x10000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_ENABLE_00 28
+#define REGNUM_TOPAZHP_TOP_CR_TILE_ENABLE_00 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_ENABLE_00 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE_00 0x20000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE_00 29
+#define REGNUM_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE_00 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE_00 0
+
+/* Register CR_MMU_TILE_1 */
+#define TOPAZHP_TOP_CR_MMU_TILE_1   0x003C
+#define MASK_TOPAZHP_TOP_CR_TILE_MIN_ADDR_01 0x00000FFF
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MIN_ADDR_01 0
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MIN_ADDR_01 0x003C
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MIN_ADDR_01 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_MAX_ADDR_01 0x00FFF000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MAX_ADDR_01 12
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MAX_ADDR_01 0x003C
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MAX_ADDR_01 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_STRIDE_01 0x07000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_STRIDE_01 24
+#define REGNUM_TOPAZHP_TOP_CR_TILE_STRIDE_01 0x003C
+#define SIGNED_TOPAZHP_TOP_CR_TILE_STRIDE_01 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_ENABLE_01 0x10000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_ENABLE_01 28
+#define REGNUM_TOPAZHP_TOP_CR_TILE_ENABLE_01 0x003C
+#define SIGNED_TOPAZHP_TOP_CR_TILE_ENABLE_01 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE_01 0x20000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE_01 29
+#define REGNUM_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE_01 0x003C
+#define SIGNED_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE_01 0
+
+/* Register CR_MTX_DEBUG_MSTR */
+#define TOPAZHP_TOP_CR_MTX_DEBUG_MSTR 0x0044
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_IN 0x00000003
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_IN 0
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_IN 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_IN 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE 2
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_OUT 0x00000018
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_OUT 3
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_OUT 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_OUT 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANKS 0x00000F00
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANKS 8
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANKS 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANKS 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANK_SIZE 0x000F0000
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANK_SIZE 16
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANK_SIZE 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANK_SIZE 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_LAST_RAM_BANK_SIZE 0x0F000000
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_LAST_RAM_BANK_SIZE 24
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_LAST_RAM_BANK_SIZE 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_LAST_RAM_BANK_SIZE 0
+
+/* Register CR_MTX_DEBUG_SLV */
+#define TOPAZHP_TOP_CR_MTX_DEBUG_SLV 0x0048
+#define MASK_TOPAZHP_TOP_CR_MTX_SLV_DBG_GPIO_IN 0x00000003
+#define SHIFT_TOPAZHP_TOP_CR_MTX_SLV_DBG_GPIO_IN 0
+#define REGNUM_TOPAZHP_TOP_CR_MTX_SLV_DBG_GPIO_IN 0x0048
+#define SIGNED_TOPAZHP_TOP_CR_MTX_SLV_DBG_GPIO_IN 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_SLV_DBG_IS_SLAVE 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_MTX_SLV_DBG_IS_SLAVE 2
+#define REGNUM_TOPAZHP_TOP_CR_MTX_SLV_DBG_IS_SLAVE 0x0048
+#define SIGNED_TOPAZHP_TOP_CR_MTX_SLV_DBG_IS_SLAVE 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_SLV_DBG_GPIO_OUT 0x00000018
+#define SHIFT_TOPAZHP_TOP_CR_MTX_SLV_DBG_GPIO_OUT 3
+#define REGNUM_TOPAZHP_TOP_CR_MTX_SLV_DBG_GPIO_OUT 0x0048
+#define SIGNED_TOPAZHP_TOP_CR_MTX_SLV_DBG_GPIO_OUT 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_SLV_RAM_BANKS 0x00000F00
+#define SHIFT_TOPAZHP_TOP_CR_MTX_SLV_RAM_BANKS 8
+#define REGNUM_TOPAZHP_TOP_CR_MTX_SLV_RAM_BANKS 0x0048
+#define SIGNED_TOPAZHP_TOP_CR_MTX_SLV_RAM_BANKS 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_SLV_RAM_BANK_SIZE 0x000F0000
+#define SHIFT_TOPAZHP_TOP_CR_MTX_SLV_RAM_BANK_SIZE 16
+#define REGNUM_TOPAZHP_TOP_CR_MTX_SLV_RAM_BANK_SIZE 0x0048
+#define SIGNED_TOPAZHP_TOP_CR_MTX_SLV_RAM_BANK_SIZE 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_SLV_LAST_RAM_BANK_SIZE 0x0F000000
+#define SHIFT_TOPAZHP_TOP_CR_MTX_SLV_LAST_RAM_BANK_SIZE 24
+#define REGNUM_TOPAZHP_TOP_CR_MTX_SLV_LAST_RAM_BANK_SIZE 0x0048
+#define SIGNED_TOPAZHP_TOP_CR_MTX_SLV_LAST_RAM_BANK_SIZE 0
+
+/* Register CR_MULTICORE_CORE_SEL_0 */
+#define TOPAZHP_TOP_CR_MULTICORE_CORE_SEL_0 0x0050
+#define MASK_TOPAZHP_TOP_CR_DMAC_MTX_SELECT 0x00000007
+#define SHIFT_TOPAZHP_TOP_CR_DMAC_MTX_SELECT 0
+#define REGNUM_TOPAZHP_TOP_CR_DMAC_MTX_SELECT 0x0050
+#define SIGNED_TOPAZHP_TOP_CR_DMAC_MTX_SELECT 0
+
+#define MASK_TOPAZHP_TOP_CR_WRITES_MTX_ALL 0x40000000
+#define SHIFT_TOPAZHP_TOP_CR_WRITES_MTX_ALL 30
+#define REGNUM_TOPAZHP_TOP_CR_WRITES_MTX_ALL 0x0050
+#define SIGNED_TOPAZHP_TOP_CR_WRITES_MTX_ALL 0
+
+#define MASK_TOPAZHP_TOP_CR_WRITES_CORE_ALL 0x80000000
+#define SHIFT_TOPAZHP_TOP_CR_WRITES_CORE_ALL 31
+#define REGNUM_TOPAZHP_TOP_CR_WRITES_CORE_ALL 0x0050
+#define SIGNED_TOPAZHP_TOP_CR_WRITES_CORE_ALL 0
+
+/* Register CR_MULTICORE_CORE_SEL_1 */
+#define TOPAZHP_TOP_CR_MULTICORE_CORE_SEL_1 0x0054
+#define MASK_TOPAZHP_TOP_CR_RTM_PORT_CORE_SELECT 0x0000001F
+#define SHIFT_TOPAZHP_TOP_CR_RTM_PORT_CORE_SELECT 0
+#define REGNUM_TOPAZHP_TOP_CR_RTM_PORT_CORE_SELECT 0x0054
+#define SIGNED_TOPAZHP_TOP_CR_RTM_PORT_CORE_SELECT 0
+
+/* Register CR_MULTICORE_HW_CFG */
+#define TOPAZHP_TOP_CR_MULTICORE_HW_CFG 0x0058
+#define MASK_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED 0x0000001F
+#define SHIFT_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED 0
+#define REGNUM_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED 0x0058
+#define SIGNED_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_NUM_MTX_SUPPORTED 0x00000700
+#define SHIFT_TOPAZHP_TOP_CR_NUM_MTX_SUPPORTED 8
+#define REGNUM_TOPAZHP_TOP_CR_NUM_MTX_SUPPORTED 0x0058
+#define SIGNED_TOPAZHP_TOP_CR_NUM_MTX_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_NUM_CORES_PER_MTX 0x00070000
+#define SHIFT_TOPAZHP_TOP_CR_NUM_CORES_PER_MTX 16
+#define REGNUM_TOPAZHP_TOP_CR_NUM_CORES_PER_MTX 0x0058
+#define SIGNED_TOPAZHP_TOP_CR_NUM_CORES_PER_MTX 0
+
+#define MASK_TOPAZHP_TOP_CR_EXTENDED_ADDR_RANGE 0x0F000000
+#define SHIFT_TOPAZHP_TOP_CR_EXTENDED_ADDR_RANGE 24
+#define REGNUM_TOPAZHP_TOP_CR_EXTENDED_ADDR_RANGE 0x0058
+#define SIGNED_TOPAZHP_TOP_CR_EXTENDED_ADDR_RANGE 0
+
+/* Register CR_MULTICORE_CMD_FIFO_WRITE */
+#define TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE 0x0060
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_WDATA 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_WDATA 0
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_WDATA 0x0060
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_WDATA 0
+
+/* Register CR_MULTICORE_CMD_FIFO_WRITE_SPACE */
+#define TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE_SPACE 0x0064
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_SPACE 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_SPACE 0
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_SPACE 0x0064
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_SPACE 0
+
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_FULL 0x00000100
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_FULL 8
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_FULL 0x0064
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_FULL 0
+
+/* Register CR_TOPAZ_CMD_FIFO_READ */
+#define TOPAZHP_TOP_CR_TOPAZ_CMD_FIFO_READ 0x0070
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_RDATA 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_RDATA 0
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_RDATA 0x0070
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_RDATA 0
+
+/* Register CR_TOPAZ_CMD_FIFO_READ_AVAILABLE */
+#define TOPAZHP_TOP_CR_TOPAZ_CMD_FIFO_READ_AVAILABLE 0x0074
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_QUANTITY 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_QUANTITY 0
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_QUANTITY 0x0074
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_QUANTITY 0
+
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_NOTEMPTY 0x00000100
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_NOTEMPTY 8
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_NOTEMPTY 0x0074
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_NOTEMPTY 0
+
+/* Register CR_TOPAZ_CMD_FIFO_FLUSH */
+#define TOPAZHP_TOP_CR_TOPAZ_CMD_FIFO_FLUSH 0x0078
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_FLUSH 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_FLUSH 0
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_FLUSH 0x0078
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_FLUSH 0
+
+/* Register CR_MMU_TILE_EXT_0 */
+#define TOPAZHP_TOP_CR_MMU_TILE_EXT_0 0x0080
+#define MASK_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT_00 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT_00 0
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT_00 0x0080
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT_00 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT_00 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT_00 8
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT_00 0x0080
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT_00 0
+
+/* Register CR_MMU_TILE_EXT_1 */
+#define TOPAZHP_TOP_CR_MMU_TILE_EXT_1 0x0084
+#define MASK_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT_01 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT_01 0
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT_01 0x0084
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT_01 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT_01 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT_01 8
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT_01 0x0084
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT_01 0
+
+/* Register CR_TOPAZHP_CMD_PRIORITY_ENABLE */
+#define TOPAZHP_TOP_CR_TOPAZHP_CMD_PRIORITY_ENABLE 0x0090
+#define MASK_TOPAZHP_TOP_CR_CMD_PRI_BIF 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_CMD_PRI_BIF 0
+#define REGNUM_TOPAZHP_TOP_CR_CMD_PRI_BIF 0x0090
+#define SIGNED_TOPAZHP_TOP_CR_CMD_PRI_BIF 0
+#define TOPAZHP_TOP_CR_CMD_PRI_BIF_PRI_ENABLE          0x00000001              /* Enable setting of mem_cmd_priority for BIF memory transactions */
+#define TOPAZHP_TOP_CR_CMD_PRI_BIF_PRI_DISABLE         0x00000000              /* Disable setting of mem_cmd_priority for BIF memory transactions */
+
+#define MASK_TOPAZHP_TOP_CR_CMD_PRI_LRITC0 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_CMD_PRI_LRITC0 1
+#define REGNUM_TOPAZHP_TOP_CR_CMD_PRI_LRITC0 0x0090
+#define SIGNED_TOPAZHP_TOP_CR_CMD_PRI_LRITC0 0
+#define TOPAZHP_TOP_CR_CMD_PRI_LRITC0_PRI_ENABLE               0x00000001              /* Enable setting of mem_cmd_priority for LRITC0 memory transactions */
+#define TOPAZHP_TOP_CR_CMD_PRI_LRITC0_PRI_DISABLE              0x00000000              /* Disable setting of mem_cmd_priority for LRITC0 memory transactions
+ */
+
+#define MASK_TOPAZHP_TOP_CR_CMD_PRI_SEQ0_VLC0_DMAC 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_CMD_PRI_SEQ0_VLC0_DMAC 2
+#define REGNUM_TOPAZHP_TOP_CR_CMD_PRI_SEQ0_VLC0_DMAC 0x0090
+#define SIGNED_TOPAZHP_TOP_CR_CMD_PRI_SEQ0_VLC0_DMAC 0
+#define TOPAZHP_TOP_CR_CMD_PRI_SEQ0_VLC0_DMAC_PRI_ENABLE               0x00000001              /* Enable setting of mem_cmd_priority for SEQ0 / VLC0 / DMAC memory
+ transactions */
+#define TOPAZHP_TOP_CR_CMD_PRI_SEQ0_VLC0_DMAC_PRI_DISABLE              0x00000000              /* Disable setting of mem_cmd_priority for SEQ0 / VLC0 / DMAC
+ memory transactions */
+
+#define MASK_TOPAZHP_TOP_CR_CMD_PRI_LRITC1 0x00000008
+#define SHIFT_TOPAZHP_TOP_CR_CMD_PRI_LRITC1 3
+#define REGNUM_TOPAZHP_TOP_CR_CMD_PRI_LRITC1 0x0090
+#define SIGNED_TOPAZHP_TOP_CR_CMD_PRI_LRITC1 0
+#define TOPAZHP_TOP_CR_CMD_PRI_LRITC1_PRI_ENABLE               0x00000001              /* Enable setting of mem_cmd_priority for LRITC1 memory transactions */
+#define TOPAZHP_TOP_CR_CMD_PRI_LRITC1_PRI_DISABLE              0x00000000              /* Disable setting of mem_cmd_priority for LRITC1 memory transactions
+ */
+
+#define MASK_TOPAZHP_TOP_CR_CMD_PRI_SEQ1_VLC1 0x00000010
+#define SHIFT_TOPAZHP_TOP_CR_CMD_PRI_SEQ1_VLC1 4
+#define REGNUM_TOPAZHP_TOP_CR_CMD_PRI_SEQ1_VLC1 0x0090
+#define SIGNED_TOPAZHP_TOP_CR_CMD_PRI_SEQ1_VLC1 0
+#define TOPAZHP_TOP_CR_CMD_PRI_SEQ1_VLC1_PRI_ENABLE            0x00000001              /* Enable setting of mem_cmd_priority for SEQ1 / VLC1 memory transactions
+ */
+#define TOPAZHP_TOP_CR_CMD_PRI_SEQ1_VLC1_PRI_DISABLE           0x00000000              /* Disable setting of mem_cmd_priority for SEQ1 / VLC1 memory transactions
+ */
+
+#define MASK_TOPAZHP_TOP_CR_CMD_PRI_LRITC2 0x00000020
+#define SHIFT_TOPAZHP_TOP_CR_CMD_PRI_LRITC2 5
+#define REGNUM_TOPAZHP_TOP_CR_CMD_PRI_LRITC2 0x0090
+#define SIGNED_TOPAZHP_TOP_CR_CMD_PRI_LRITC2 0
+#define TOPAZHP_TOP_CR_CMD_PRI_LRITC2_PRI_ENABLE               0x00000001              /* Enable setting of mem_cmd_priority for LRITC2 memory transactions */
+#define TOPAZHP_TOP_CR_CMD_PRI_LRITC2_PRI_DISABLE              0x00000000              /* Disable setting of mem_cmd_priority for LRITC2 memory transactions
+ */
+
+#define MASK_TOPAZHP_TOP_CR_CMD_PRI_SEQ2_VLC2 0x00000040
+#define SHIFT_TOPAZHP_TOP_CR_CMD_PRI_SEQ2_VLC2 6
+#define REGNUM_TOPAZHP_TOP_CR_CMD_PRI_SEQ2_VLC2 0x0090
+#define SIGNED_TOPAZHP_TOP_CR_CMD_PRI_SEQ2_VLC2 0
+#define TOPAZHP_TOP_CR_CMD_PRI_SEQ2_VLC2_PRI_ENABLE            0x00000001              /* Enable setting of mem_cmd_priority for SEQ2 / VLC2 memory transactions
+ */
+#define TOPAZHP_TOP_CR_CMD_PRI_SEQ2_VLC2_PRI_DISABLE           0x00000000              /* Disable setting of mem_cmd_priority for SEQ2 / VLC2 memory transactions
+ */
+
+#define MASK_TOPAZHP_TOP_CR_CMD_PRI_LRITC3 0x00000080
+#define SHIFT_TOPAZHP_TOP_CR_CMD_PRI_LRITC3 7
+#define REGNUM_TOPAZHP_TOP_CR_CMD_PRI_LRITC3 0x0090
+#define SIGNED_TOPAZHP_TOP_CR_CMD_PRI_LRITC3 0
+#define TOPAZHP_TOP_CR_CMD_PRI_LRITC3_PRI_ENABLE               0x00000001              /* Enable setting of mem_cmd_priority for LRITC3 memory transactions */
+#define TOPAZHP_TOP_CR_CMD_PRI_LRITC3_PRI_DISABLE              0x00000000              /* Disable setting of mem_cmd_priority for LRITC3 memory transactions
+ */
+
+#define MASK_TOPAZHP_TOP_CR_CMD_PRI_SEQ3_VLC3 0x00000100
+#define SHIFT_TOPAZHP_TOP_CR_CMD_PRI_SEQ3_VLC3 8
+#define REGNUM_TOPAZHP_TOP_CR_CMD_PRI_SEQ3_VLC3 0x0090
+#define SIGNED_TOPAZHP_TOP_CR_CMD_PRI_SEQ3_VLC3 0
+#define TOPAZHP_TOP_CR_CMD_PRI_SEQ3_VLC3_PRI_ENABLE            0x00000001              /* Enable setting of mem_cmd_priority for SEQ3 / VLC3 memory transactions
+ */
+#define TOPAZHP_TOP_CR_CMD_PRI_SEQ3_VLC3_PRI_DISABLE           0x00000000              /* Disable setting of mem_cmd_priority for SEQ3 / VLC3 memory transactions
+ */
+
+/* Register CR_TOPAZHP_LIMITED_THROUGHPUT */
+#define TOPAZHP_TOP_CR_TOPAZHP_LIMITED_THROUGHPUT 0x0094
+#define MASK_TOPAZHP_TOP_CR_LIMITED_WORDS 0x000003FF
+#define SHIFT_TOPAZHP_TOP_CR_LIMITED_WORDS 0
+#define REGNUM_TOPAZHP_TOP_CR_LIMITED_WORDS 0x0094
+#define SIGNED_TOPAZHP_TOP_CR_LIMITED_WORDS 0
+
+#define MASK_TOPAZHP_TOP_CR_REQUEST_GAP 0x0FFF0000
+#define SHIFT_TOPAZHP_TOP_CR_REQUEST_GAP 16
+#define REGNUM_TOPAZHP_TOP_CR_REQUEST_GAP 0x0094
+#define SIGNED_TOPAZHP_TOP_CR_REQUEST_GAP 0
+
+/* Register CR_FIRMWARE_REG_1 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_1 0x0100
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_1 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_1 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_1 0x0100
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_1 0
+
+/* Register CR_FIRMWARE_REG_2 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_2 0x0104
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_2 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_2 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_2 0x0104
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_2 0
+
+/* Register CR_FIRMWARE_REG_3 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_3 0x0108
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_3 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_3 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_3 0x0108
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_3 0
+
+/* Register CR_CYCLE_COUNTER */
+#define TOPAZHP_TOP_CR_CYCLE_COUNTER 0x0110
+#define MASK_TOPAZHP_TOP_CR_CYCLE_COUNTER 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_CYCLE_COUNTER 0
+#define REGNUM_TOPAZHP_TOP_CR_CYCLE_COUNTER 0x0110
+#define SIGNED_TOPAZHP_TOP_CR_CYCLE_COUNTER 0
+
+/* Register CR_CYCLE_COUNTER_CTRL */
+#define TOPAZHP_TOP_CR_CYCLE_COUNTER_CTRL 0x0114
+#define MASK_TOPAZHP_TOP_CR_CYCLE_COUNTER_ENABLE 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_CYCLE_COUNTER_ENABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_CYCLE_COUNTER_ENABLE 0x0114
+#define SIGNED_TOPAZHP_TOP_CR_CYCLE_COUNTER_ENABLE 0
+
+/* Register CR_MULTICORE_IDLE_PWR_MAN */
+#define TOPAZHP_TOP_CR_MULTICORE_IDLE_PWR_MAN 0x0118
+#define MASK_TOPAZHP_TOP_CR_TOPAZ_IDLE_DISABLE 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZ_IDLE_DISABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZ_IDLE_DISABLE 0x0118
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZ_IDLE_DISABLE 0
+
+/* Register CR_DIRECT_BIAS_TABLE */
+#define TOPAZHP_TOP_CR_DIRECT_BIAS_TABLE 0x0124
+#define MASK_TOPAZHP_TOP_CR_DIRECT_BIAS_TABLE 0x00007FFF
+#define SHIFT_TOPAZHP_TOP_CR_DIRECT_BIAS_TABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_DIRECT_BIAS_TABLE 0x0124
+#define SIGNED_TOPAZHP_TOP_CR_DIRECT_BIAS_TABLE 0
+
+/* Register CR_INTRA_BIAS_TABLE */
+#define TOPAZHP_TOP_CR_INTRA_BIAS_TABLE 0x0128
+#define MASK_TOPAZHP_TOP_CR_INTRA8_BIAS_TABLE 0xFFFF0000
+#define SHIFT_TOPAZHP_TOP_CR_INTRA8_BIAS_TABLE 16
+#define REGNUM_TOPAZHP_TOP_CR_INTRA8_BIAS_TABLE 0x0128
+#define SIGNED_TOPAZHP_TOP_CR_INTRA8_BIAS_TABLE 0
+
+#define MASK_TOPAZHP_TOP_CR_INTRA16_BIAS_TABLE 0x0000FFFF
+#define SHIFT_TOPAZHP_TOP_CR_INTRA16_BIAS_TABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_INTRA16_BIAS_TABLE 0x0128
+#define SIGNED_TOPAZHP_TOP_CR_INTRA16_BIAS_TABLE 0
+
+/* Register CR_INTER_BIAS_TABLE */
+#define TOPAZHP_TOP_CR_INTER_BIAS_TABLE 0x012C
+#define MASK_TOPAZHP_TOP_CR_INTER_BIAS_TABLE 0x0000FFFF
+#define SHIFT_TOPAZHP_TOP_CR_INTER_BIAS_TABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_INTER_BIAS_TABLE 0x012C
+#define SIGNED_TOPAZHP_TOP_CR_INTER_BIAS_TABLE 0
+
+/* Register CR_INTRA_SCALE_TABLE */
+#define TOPAZHP_TOP_CR_INTRA_SCALE_TABLE 0x0130
+#define MASK_TOPAZHP_TOP_CR_INTRA8_SCALE_TABLE 0x00000007
+#define SHIFT_TOPAZHP_TOP_CR_INTRA8_SCALE_TABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_INTRA8_SCALE_TABLE 0x0130
+#define SIGNED_TOPAZHP_TOP_CR_INTRA8_SCALE_TABLE 0
+
+/* Register CR_QPCB_QPCR_OFFSET */
+#define TOPAZHP_TOP_CR_QPCB_QPCR_OFFSET 0x0134
+#define MASK_TOPAZHP_TOP_CR_QPCB_OFFSET 0x0000001F
+#define SHIFT_TOPAZHP_TOP_CR_QPCB_OFFSET 0
+#define REGNUM_TOPAZHP_TOP_CR_QPCB_OFFSET 0x0134
+#define SIGNED_TOPAZHP_TOP_CR_QPCB_OFFSET 0
+
+#define MASK_TOPAZHP_TOP_CR_QPCR_OFFSET 0x00001F00
+#define SHIFT_TOPAZHP_TOP_CR_QPCR_OFFSET 8
+#define REGNUM_TOPAZHP_TOP_CR_QPCR_OFFSET 0x0134
+#define SIGNED_TOPAZHP_TOP_CR_QPCR_OFFSET 0
+
+/* Register CR_INTER_INTRA_SCALE_TABLE */
+#define TOPAZHP_TOP_CR_INTER_INTRA_SCALE_TABLE 0x0140
+#define MASK_TOPAZHP_TOP_CR_INTRA_SCALING_TABLE 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_INTRA_SCALING_TABLE 8
+#define REGNUM_TOPAZHP_TOP_CR_INTRA_SCALING_TABLE 0x0140
+#define SIGNED_TOPAZHP_TOP_CR_INTRA_SCALING_TABLE 0
+
+#define MASK_TOPAZHP_TOP_CR_INTER_SCALING_TABLE 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_INTER_SCALING_TABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_INTER_SCALING_TABLE 0x0140
+#define SIGNED_TOPAZHP_TOP_CR_INTER_SCALING_TABLE 0
+
+/* Register CR_SKIPPED_CODED_SCALE_TABLE */
+#define TOPAZHP_TOP_CR_SKIPPED_CODED_SCALE_TABLE 0x0144
+#define MASK_TOPAZHP_TOP_CR_CODED_SCALING_TABLE 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_CODED_SCALING_TABLE 8
+#define REGNUM_TOPAZHP_TOP_CR_CODED_SCALING_TABLE 0x0144
+#define SIGNED_TOPAZHP_TOP_CR_CODED_SCALING_TABLE 0
+
+#define MASK_TOPAZHP_TOP_CR_SKIPPED_SCALING_TABLE 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_SKIPPED_SCALING_TABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_SKIPPED_SCALING_TABLE 0x0144
+#define SIGNED_TOPAZHP_TOP_CR_SKIPPED_SCALING_TABLE 0
+
+/* Register CR_POLYNOM_ALPHA_COEFF_CORE_0 */
+#define TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_0 0x0148
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_00 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_00 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_00 0x0148
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_00 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_00 0x007FFF00
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_00 8
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_00 0x0148
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_00 1
+
+/* Register CR_POLYNOM_GAMMA_COEFF_CORE_0 */
+#define TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_0 0x014C
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_00 0x0003FFFF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_00 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_00 0x014C
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_00 0
+
+/* Register CR_POLYNOM_CUTOFF_CORE_0 */
+#define TOPAZHP_TOP_CR_POLYNOM_CUTOFF_CORE_0 0x0150
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_00 0x0000003F
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_00 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_00 0x0150
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_00 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_00 0x00000FC0
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_00 6
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_00 0x0150
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_00 0
+
+/* Register CR_POLYNOM_ALPHA_COEFF_CORE_1 */
+#define TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_1 0x0154
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_01 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_01 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_01 0x0154
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_01 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_01 0x007FFF00
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_01 8
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_01 0x0154
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_01 1
+
+/* Register CR_POLYNOM_GAMMA_COEFF_CORE_1 */
+#define TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_1 0x0158
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_01 0x0003FFFF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_01 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_01 0x0158
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_01 0
+
+/* Register CR_POLYNOM_CUTOFF_CORE_1 */
+#define TOPAZHP_TOP_CR_POLYNOM_CUTOFF_CORE_1 0x015C
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_01 0x0000003F
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_01 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_01 0x015C
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_01 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_01 0x00000FC0
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_01 6
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_01 0x015C
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_01 0
+
+/* Register CR_POLYNOM_ALPHA_COEFF_CORE_2 */
+#define TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_2 0x0160
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_02 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_02 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_02 0x0160
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_02 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_02 0x007FFF00
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_02 8
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_02 0x0160
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_02 1
+
+/* Register CR_POLYNOM_GAMMA_COEFF_CORE_2 */
+#define TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_2 0x0164
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_02 0x0003FFFF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_02 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_02 0x0164
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_02 0
+
+/* Register CR_POLYNOM_CUTOFF_CORE_2 */
+#define TOPAZHP_TOP_CR_POLYNOM_CUTOFF_CORE_2 0x0168
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_02 0x0000003F
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_02 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_02 0x0168
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_02 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_02 0x00000FC0
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_02 6
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_02 0x0168
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_02 0
+
+/* Register CR_POLYNOM_ALPHA_COEFF_CORE_3 */
+#define TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_3 0x016C
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_03 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_03 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_03 0x016C
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE_03 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_03 0x007FFF00
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_03 8
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_03 0x016C
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE_03 1
+
+/* Register CR_POLYNOM_GAMMA_COEFF_CORE_3 */
+#define TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_3 0x0170
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_03 0x0003FFFF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_03 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_03 0x0170
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE_03 0
+
+/* Register CR_POLYNOM_CUTOFF_CORE_3 */
+#define TOPAZHP_TOP_CR_POLYNOM_CUTOFF_CORE_3 0x0174
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_03 0x0000003F
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_03 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_03 0x0174
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE_03 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_03 0x00000FC0
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_03 6
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_03 0x0174
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE_03 0
+
+/* Register CR_SECURE_CONFIG */
+#define TOPAZHP_TOP_CR_SECURE_CONFIG 0x0200
+#define MASK_TOPAZHP_TOP_CR_DMAC_SECURE 0x01000000
+#define SHIFT_TOPAZHP_TOP_CR_DMAC_SECURE 24
+#define REGNUM_TOPAZHP_TOP_CR_DMAC_SECURE 0x0200
+#define SIGNED_TOPAZHP_TOP_CR_DMAC_SECURE 0
+
+#define MASK_TOPAZHP_TOP_CR_OUTPUT_SECURE_PIPE(i) (0x00000001 << (0 + ((i) * 1)))
+#define SHIFT_TOPAZHP_TOP_CR_OUTPUT_SECURE_PIPE(i) (0 + ((i) * 1))
+#define REGNUM_TOPAZHP_TOP_CR_OUTPUT_SECURE_PIPE(i) 0x0200
+
+#define MASK_TOPAZHP_TOP_CR_INPUT_SECURE_PIPE(i) (0x00000001 << (8 + ((i) * 1)))
+#define SHIFT_TOPAZHP_TOP_CR_INPUT_SECURE_PIPE(i) (8 + ((i) * 1))
+#define REGNUM_TOPAZHP_TOP_CR_INPUT_SECURE_PIPE(i) 0x0200
+
+#define MASK_TOPAZHP_TOP_CR_SW_DMA_SECURE_PIPE(i) (0x00000001 << (16 + ((i) * 1)))
+#define SHIFT_TOPAZHP_TOP_CR_SW_DMA_SECURE_PIPE(i) (16 + ((i) * 1))
+#define REGNUM_TOPAZHP_TOP_CR_SW_DMA_SECURE_PIPE(i) 0x0200
+
+/* Register CR_FIRMWARE_REG_4 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_4 0x0300
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_4 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_4 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_4 0x0300
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_4 0
+
+/* Register CR_FIRMWARE_REG_5 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_5 0x0304
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_5 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_5 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_5 0x0304
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_5 0
+
+/* Register CR_FIRMWARE_REG_6 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_6 0x0308
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_6 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_6 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_6 0x0308
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_6 0
+
+/* Register CR_FIRMWARE_REG_7 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_7 0x030C
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_7 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_7 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_7 0x030C
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_7 0
+
+/* Register CR_MULTICORE_RSVD0 */
+#define TOPAZHP_TOP_CR_MULTICORE_RSVD0 0x03B0
+#define MASK_TOPAZHP_TOP_CR_RESERVED0 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_RESERVED0 0
+#define REGNUM_TOPAZHP_TOP_CR_RESERVED0 0x03B0
+#define SIGNED_TOPAZHP_TOP_CR_RESERVED0 0
+
+/* Register CR_TOPAZHP_CORE_ID */
+#define TOPAZHP_TOP_CR_TOPAZHP_CORE_ID 0x03C0
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_CORE_CONFIG 0x0000FFFF
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_CORE_CONFIG 0
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_CORE_CONFIG 0x03C0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_CORE_CONFIG 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_CORE_ID 0x00FF0000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_CORE_ID 16
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_CORE_ID 0x03C0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_CORE_ID 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_GROUP_ID 0xFF000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_GROUP_ID 24
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_GROUP_ID 0x03C0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_GROUP_ID 0
+
+/* Register CR_TOPAZHP_CORE_REV */
+#define TOPAZHP_TOP_CR_TOPAZHP_CORE_REV 0x03D0
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV 0
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV 0x03D0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV 8
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV 0x03D0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV 0x00FF0000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV 16
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV 0x03D0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER 0xFF000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER 24
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER 0x03D0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER 0
+
+/* Register CR_TOPAZHP_CORE_DES1 */
+#define TOPAZHP_TOP_CR_TOPAZHP_CORE_DES1 0x03E0
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED 0x00000080
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED 7
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_GENERATE_PERFORMANCE_STORE 0x00000100
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_GENERATE_PERFORMANCE_STORE 8
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_GENERATE_PERFORMANCE_STORE 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_GENERATE_PERFORMANCE_STORE 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED 0x00000200
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED 9
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED 0x00000400
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED 10
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MPEG2_SUPPORTED 0x00000800
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MPEG2_SUPPORTED 11
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MPEG2_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MPEG2_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_SUBSET 0x00001000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_SUBSET 12
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_SUBSET 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_SUBSET 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_ALL 0x00002000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_ALL 13
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_ALL 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_ALL 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_ME_SUPPORTED 0x00004000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_ME_SUPPORTED 14
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_ME_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_ME_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED 0x00008000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED 15
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED 0x00010000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED 16
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED 0x00020000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED 17
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED 0x00040000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED 18
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED 0x00080000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED 19
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED 0x00100000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED 20
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED 0x00200000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED 21
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED 0x00400000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED 22
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_16X8_8X16_SUPPORTED 0x00800000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_16X8_8X16_SUPPORTED 23
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_16X8_8X16_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_16X8_8X16_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED 0x01000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED 24
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_SLAVE_JPEG_SUPPORTED 0x02000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_SLAVE_JPEG_SUPPORTED 25
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_SLAVE_JPEG_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_SLAVE_JPEG_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_JPEG_SUPPORTED 0x04000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_JPEG_SUPPORTED 26
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_JPEG_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_JPEG_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H263_SUPPORTED 0x08000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H263_SUPPORTED 27
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H263_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H263_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MPEG4_SUPPORTED 0x10000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MPEG4_SUPPORTED 28
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MPEG4_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MPEG4_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_SUPPORTED 0x20000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_SUPPORTED 29
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_DMAC_SUPPORTED 0x40000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_DMAC_SUPPORTED 30
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_DMAC_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_DMAC_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MMU_SUPPORTED 0x80000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MMU_SUPPORTED 31
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MMU_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MMU_SUPPORTED 0
+
+/* Register CR_TOPAZHP_CORE_DES2 */
+#define TOPAZHP_TOP_CR_TOPAZHP_CORE_DES2 0x03F0
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER2 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER2 0
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER2 0x03F0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER2 0
+
+
+/* Table MMU_DIR_LIST_BASE */
+
+/* Register CR_MMU_DIR_LIST_BASE */
+#define TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE(X) (0x0030 + (4 * (X)))
+#define MASK_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR 0xFFFFFFF0
+#define SHIFT_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR 4
+#define REGNUM_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR 0x0030
+#define SIGNED_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR 0
+
+/* Number of entries in table MMU_DIR_LIST_BASE */
+
+#define TOPAZHP_TOP_MMU_DIR_LIST_BASE_SIZE_UINT32 1
+#define TOPAZHP_TOP_MMU_DIR_LIST_BASE_NUM_ENTRIES 1
+
+
+/* Table MMU_TILE */
+
+/* Register CR_MMU_TILE */
+#define TOPAZHP_TOP_CR_MMU_TILE(X)  (0x0038 + (4 * (X)))
+#define MASK_TOPAZHP_TOP_CR_TILE_MIN_ADDR 0x00000FFF
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MIN_ADDR 0
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MIN_ADDR 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MIN_ADDR 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_MAX_ADDR 0x00FFF000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MAX_ADDR 12
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MAX_ADDR 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MAX_ADDR 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_STRIDE 0x07000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_STRIDE 24
+#define REGNUM_TOPAZHP_TOP_CR_TILE_STRIDE 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_STRIDE 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_ENABLE 0x10000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_ENABLE 28
+#define REGNUM_TOPAZHP_TOP_CR_TILE_ENABLE 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_ENABLE 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE 0x20000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE 29
+#define REGNUM_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE 0
+
+/* Number of entries in table MMU_TILE */
+
+#define TOPAZHP_TOP_MMU_TILE_SIZE_UINT32 2
+#define TOPAZHP_TOP_MMU_TILE_NUM_ENTRIES 2
+
+
+/* Table MMU_TILE_EXT */
+
+/* Register CR_MMU_TILE_EXT */
+#define TOPAZHP_TOP_CR_MMU_TILE_EXT(X) (0x0080 + (4 * (X)))
+#define MASK_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT 0
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT 0x0080
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT 8
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT 0x0080
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT 0
+
+/* Number of entries in table MMU_TILE_EXT */
+
+#define TOPAZHP_TOP_MMU_TILE_EXT_SIZE_UINT32 2
+#define TOPAZHP_TOP_MMU_TILE_EXT_NUM_ENTRIES 2
+
+
+/* Table TABLES_POLYNOM_TABLE */
+
+/* Register CR_POLYNOM_ALPHA_COEFF_CORE */
+#define TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE(X) (0x0148 + (12 * (X)))
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE 0x0148
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_ALPHA_COEFF_CORE 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE 0x007FFF00
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE 8
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE 0x0148
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_BETA_COEFF_CORE 1
+
+/* Register CR_POLYNOM_GAMMA_COEFF_CORE */
+#define TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE(X) (0x014C + (12 * (X)))
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE 0x0003FFFF
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE 0x014C
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_GAMMA_COEFF_CORE 0
+
+/* Register CR_POLYNOM_CUTOFF_CORE */
+#define TOPAZHP_TOP_CR_POLYNOM_CUTOFF_CORE(X) (0x0150 + (12 * (X)))
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE 0x0000003F
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE 0
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE 0x0150
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SAD_CUTOFF_CORE 0
+
+#define MASK_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE 0x00000FC0
+#define SHIFT_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE 6
+#define REGNUM_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE 0x0150
+#define SIGNED_TOPAZHP_TOP_CR_POLYNOM_SATD_CUTOFF_CORE 0
+
+/* Number of entries in table TABLES_POLYNOM_TABLE */
+
+#define TOPAZHP_TOP_TABLES_POLYNOM_TABLE_SIZE_UINT32 12
+#define TOPAZHP_TOP_TABLES_POLYNOM_TABLE_NUM_ENTRIES 4
+
+/*
+       Byte range covering the group TOPAZHP_MULTICORE file
+*/
+
+#define TOPAZHP_TOP_TOPAZHP_MULTICORE_REGISTERS_START          0x00000000
+#define TOPAZHP_TOP_TOPAZHP_MULTICORE_REGISTERS_END            0x000003F3
+
+/*
+       Byte range covering the whole register file
+*/
+
+#define TOPAZHP_TOP_REGISTERS_START            0x00000000
+#define TOPAZHP_TOP_REGISTERS_END              0x000003F3
+#define TOPAZHP_TOP_REG_DEFAULT_TABLE struct {\
+                       IMG_UINT16 uRegOffset;\
+                       IMG_UINT32 uRegDefault;\
+                       IMG_UINT32 uRegMask;\
+                       bool bReadonly;\
+                       const char* pszName;\
+               } TOPAZHP_TOP_Defaults[] = {\
+       {0x0000, 0x00000000, 0x00000007, 0, "CR_MULTICORE_SRST" } ,\
+       {0x0004, 0x00000000, 0xDEFFFF7F, 0, "CR_MULTICORE_INT_STAT" } ,\
+       {0x0008, 0x00000000, 0x5EFFFF7F, 0, "CR_MULTICORE_MTX_INT_ENAB" } ,\
+       {0x000C, 0x00000000, 0x9EFFFF7F, 0, "CR_MULTICORE_HOST_INT_ENAB" } ,\
+       {0x0010, 0x00000000, 0x1E00007F, 0, "CR_MULTICORE_INT_CLEAR" } ,\
+       {0x0014, 0x00000000, 0x00000002, 0, "CR_MULTICORE_MAN_CLK_GATE" } ,\
+       {0x0018, 0x00000000, 0x00000003, 0, "CR_TOPAZ_MTX_C_RATIO" } ,\
+       {0x001C, 0x00000000, 0xFFFFF001, 1, "CR_MMU_STATUS" } ,\
+       {0x0020, 0x00000000, 0x000000FF, 1, "CR_MMU_MEM_REQ" } ,\
+       {0x0024, 0x00010000, 0x0001070F, 0, "CR_MMU_CONTROL0" } ,\
+       {0x0028, 0xC000000C, 0xFFFFFFFF, 0, "CR_MMU_CONTROL1" } ,\
+       {0x002C, 0x00000000, 0x00000009, 0, "CR_MMU_CONTROL2" } ,\
+       {0x0030, 0x00000000, 0xFFFFFFF0, 0, "CR_MMU_DIR_LIST_BASE_0" } ,\
+       {0x0038, 0x00000000, 0x37FFFFFF, 0, "CR_MMU_TILE_0" } ,\
+       {0x003C, 0x00000000, 0x37FFFFFF, 0, "CR_MMU_TILE_1" } ,\
+       {0x0044, 0x00010004, 0x0F0F0F1F, 0, "CR_MTX_DEBUG_MSTR" } ,\
+       {0x0048, 0x00000000, 0x0F0F0F1F, 0, "CR_MTX_DEBUG_SLV" } ,\
+       {0x0050, 0x00000000, 0xC0000007, 0, "CR_MULTICORE_CORE_SEL_0" } ,\
+       {0x0054, 0x00000000, 0x0000001F, 0, "CR_MULTICORE_CORE_SEL_1" } ,\
+       {0x0058, 0x08040104, 0x0F07071F, 1, "CR_MULTICORE_HW_CFG" } ,\
+       {0x0060, 0x00000000, 0xFFFFFFFF, 0, "CR_MULTICORE_CMD_FIFO_WRITE" } ,\
+       {0x0064, 0x00000020, 0x000001FF, 1, "CR_MULTICORE_CMD_FIFO_WRITE_SPACE" } ,\
+       {0x0070, 0x00000000, 0xFFFFFFFF, 0, "CR_TOPAZ_CMD_FIFO_READ" } ,\
+       {0x0074, 0x00000000, 0x000001FF, 1, "CR_TOPAZ_CMD_FIFO_READ_AVAILABLE" } ,\
+       {0x0078, 0x00000000, 0x00000001, 0, "CR_TOPAZ_CMD_FIFO_FLUSH" } ,\
+       {0x0080, 0x00000000, 0x0000FFFF, 0, "CR_MMU_TILE_EXT_0" } ,\
+       {0x0084, 0x00000000, 0x0000FFFF, 0, "CR_MMU_TILE_EXT_1" } ,\
+       {0x0090, 0x00000001, 0x000001FF, 0, "CR_TOPAZHP_CMD_PRIORITY_ENABLE" } ,\
+       {0x0094, 0x00000000, 0x0FFF03FF, 0, "CR_TOPAZHP_LIMITED_THROUGHPUT" } ,\
+       {0x0100, 0x00000000, 0xFFFFFFFF, 0, "CR_FIRMWARE_REG_1" } ,\
+       {0x0104, 0x00000000, 0xFFFFFFFF, 0, "CR_FIRMWARE_REG_2" } ,\
+       {0x0108, 0x00000000, 0xFFFFFFFF, 0, "CR_FIRMWARE_REG_3" } ,\
+       {0x0110, 0x00000000, 0xFFFFFFFF, 0, "CR_CYCLE_COUNTER" } ,\
+       {0x0114, 0x00000000, 0x00000001, 0, "CR_CYCLE_COUNTER_CTRL" } ,\
+       {0x0118, 0x00000000, 0x00000001, 0, "CR_MULTICORE_IDLE_PWR_MAN" } ,\
+       {0x0124, 0x00000000, 0x00007FFF, 0, "CR_DIRECT_BIAS_TABLE" } ,\
+       {0x0128, 0x00000000, 0xFFFFFFFF, 0, "CR_INTRA_BIAS_TABLE" } ,\
+       {0x012C, 0x00000000, 0x0000FFFF, 0, "CR_INTER_BIAS_TABLE" } ,\
+       {0x0130, 0x00000000, 0x00000007, 0, "CR_INTRA_SCALE_TABLE" } ,\
+       {0x0134, 0x00000000, 0x00001F1F, 0, "CR_QPCB_QPCR_OFFSET" } ,\
+       {0x0140, 0x00000000, 0x0000FFFF, 0, "CR_INTER_INTRA_SCALE_TABLE" } ,\
+       {0x0144, 0x00000000, 0x0000FFFF, 0, "CR_SKIPPED_CODED_SCALE_TABLE" } ,\
+       {0x0148, 0x00000000, 0x007FFFFF, 0, "CR_POLYNOM_ALPHA_COEFF_CORE_0" } ,\
+       {0x014C, 0x00000000, 0x0003FFFF, 0, "CR_POLYNOM_GAMMA_COEFF_CORE_0" } ,\
+       {0x0150, 0x0000071C, 0x00000FFF, 0, "CR_POLYNOM_CUTOFF_CORE_0" } ,\
+       {0x0154, 0x00000000, 0x007FFFFF, 0, "CR_POLYNOM_ALPHA_COEFF_CORE_1" } ,\
+       {0x0158, 0x00000000, 0x0003FFFF, 0, "CR_POLYNOM_GAMMA_COEFF_CORE_1" } ,\
+       {0x015C, 0x0000071C, 0x00000FFF, 0, "CR_POLYNOM_CUTOFF_CORE_1" } ,\
+       {0x0160, 0x00000000, 0x007FFFFF, 0, "CR_POLYNOM_ALPHA_COEFF_CORE_2" } ,\
+       {0x0164, 0x00000000, 0x0003FFFF, 0, "CR_POLYNOM_GAMMA_COEFF_CORE_2" } ,\
+       {0x0168, 0x0000071C, 0x00000FFF, 0, "CR_POLYNOM_CUTOFF_CORE_2" } ,\
+       {0x016C, 0x00000000, 0x007FFFFF, 0, "CR_POLYNOM_ALPHA_COEFF_CORE_3" } ,\
+       {0x0170, 0x00000000, 0x0003FFFF, 0, "CR_POLYNOM_GAMMA_COEFF_CORE_3" } ,\
+       {0x0174, 0x0000071C, 0x00000FFF, 0, "CR_POLYNOM_CUTOFF_CORE_3" } ,\
+       {0x0200, 0x010F0F0F, 0x010F0F0F, 0, "CR_SECURE_CONFIG" } ,\
+       {0x0300, 0x00000000, 0xFFFFFFFF, 0, "CR_FIRMWARE_REG_4" } ,\
+       {0x0304, 0x00000000, 0xFFFFFFFF, 0, "CR_FIRMWARE_REG_5" } ,\
+       {0x0308, 0x00000000, 0xFFFFFFFF, 0, "CR_FIRMWARE_REG_6" } ,\
+       {0x030C, 0x00000000, 0xFFFFFFFF, 0, "CR_FIRMWARE_REG_7" } ,\
+       {0x03B0, 0x00000000, 0x000000FF, 0, "CR_MULTICORE_RSVD0" } ,\
+       {0x03C0, 0x04070000, 0xFFFFFFFF, 1, "CR_TOPAZHP_CORE_ID" } ,\
+       {0x03D0, 0x00030904, 0xFFFFFFFF, 1, "CR_TOPAZHP_CORE_REV" } ,\
+       {0x03E0, 0xFFFFDE80, 0xFFFFFF80, 1, "CR_TOPAZHP_CORE_DES1" } ,\
+       {0x03F0, 0x00000000, 0xFFFFFFFF, 1, "CR_TOPAZHP_CORE_DES2" } ,\
+{ 0 }}
+
+#define TOPAZHP_TOP_REGS_INIT(uBase) \
+       { \
+               int n;\
+               TOPAZHP_TOP_REG_DEFAULT_TABLE;\
+               for (n = 0; n < sizeof(TOPAZHP_TOP_Defaults)/ sizeof(TOPAZHP_TOP_Defaults[0] ) -1; n++)\
+               {\
+                       RegWriteNoTrap(TOPAZHP_TOP_Defaults[n].uRegOffset + uBase, TOPAZHP_TOP_Defaults[n].uRegDefault); \
+               }\
+       }
+#endif
diff --git a/driver/encoder/reg_headers/topazhp_multicore_regs_old.h b/driver/encoder/reg_headers/topazhp_multicore_regs_old.h
new file mode 100644 (file)
index 0000000..0c9d18b
--- /dev/null
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * firmware header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _REGCONV_H_topazhp_multicore_regs_old_h
+#define _REGCONV_H_topazhp_multicore_regs_old_h
+
+/* Register CR_LAMBDA_DC_TABLE */
+#define TOPAZHP_TOP_CR_LAMBDA_DC_TABLE 0x0120
+#define MASK_TOPAZHP_TOP_CR_QPC_OR_DC_SCALE_LUMA_TABLE 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_QPC_OR_DC_SCALE_LUMA_TABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_QPC_OR_DC_SCALE_LUMA_TABLE 0x0120
+#define SIGNED_TOPAZHP_TOP_CR_QPC_OR_DC_SCALE_LUMA_TABLE 0
+
+#define MASK_TOPAZHP_TOP_CR_SATD_LAMBDA_OR_DC_SCALE_CHROMA_TABLE 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_SATD_LAMBDA_OR_DC_SCALE_CHROMA_TABLE 8
+#define REGNUM_TOPAZHP_TOP_CR_SATD_LAMBDA_OR_DC_SCALE_CHROMA_TABLE 0x0120
+#define SIGNED_TOPAZHP_TOP_CR_SATD_LAMBDA_OR_DC_SCALE_CHROMA_TABLE 0
+
+#define MASK_TOPAZHP_TOP_CR_SAD_LAMBDA_TABLE 0x007F0000
+#define SHIFT_TOPAZHP_TOP_CR_SAD_LAMBDA_TABLE 16
+#define REGNUM_TOPAZHP_TOP_CR_SAD_LAMBDA_TABLE 0x0120
+#define SIGNED_TOPAZHP_TOP_CR_SAD_LAMBDA_TABLE 0
+
+
+/* Register CR_MVCALC_COLOCATED (from topazhp_core_regs.h) */
+#define MASK_TOPAZHP_CR_TEMPORAL_BLEND 0x001F0000
+#define SHIFT_TOPAZHP_CR_TEMPORAL_BLEND 16
+#define REGNUM_TOPAZHP_CR_TEMPORAL_BLEND 0x0174
+#define SIGNED_TOPAZHP_CR_TEMPORAL_BLEND 0
+
+#endif
diff --git a/driver/encoder/target.h b/driver/encoder/target.h
new file mode 100644 (file)
index 0000000..7bf4b21
--- /dev/null
@@ -0,0 +1,76 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * target interface header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#if !defined (__TARGET_H__)
+#define __TARGET_H__
+
+#include "osal/inc/osa_types.h"
+
+#define TARGET_NO_IRQ   (999) /* Interrupt number when no interrupt exists */
+
+/*
+ * The memory space types
+ */
+enum mem_space_type
+{
+       MEMSPACE_REGISTER,  /* Memory space is mapped to device registers */
+       MEMSPACE_MEMORY     /* Memory space is mapped to device memory */
+};
+
+/*
+ * This structure contains all information about a device register
+ */
+struct mem_space_reg
+{
+       uint64 addr; /* Base address of device registers */
+       uint32 size; /* Size of device register block */
+       uint32 intr_num; /* The interrupt number */
+};
+
+/*
+ * This structure contains all information about a device memory region
+ */
+struct mem_space_mem
+{
+       uint64 addr; /* Base address of memory region */
+       uint64 size; /* Size of memory region */
+       uint64 guard_band; /* Memory guard band */
+};
+
+/*
+ * This structure contains all information about the device memory space
+ */
+struct mem_space
+{
+       osa_char *               name;     /* Memory space name */
+       enum mem_space_type      type;     /* Memory space type */
+       union
+       {
+               struct mem_space_reg reg;      /* Device register info */
+               struct mem_space_mem mem;      /* Device memory region info */
+       };
+
+       uint64                   cpu_addr; /* Cpu KM address for the mem space */
+};
+
+struct target_config
+{
+       uint32 num_mem_spaces;
+       struct mem_space * mem_spaces;
+};
+
+#endif /* __TARGET_H__    */
diff --git a/driver/encoder/target_config.h b/driver/encoder/target_config.h
new file mode 100644 (file)
index 0000000..45bf00c
--- /dev/null
@@ -0,0 +1,58 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Device specific memory configuration
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __TARGET_CONFIG_H__
+#define __TARGET_CONFIG_H__
+
+#include <target.h>
+
+/* Order MUST match with topaz_mem_space definition */
+enum topaz_mem_space_idx {
+        REG_TOPAZHP_MULTICORE = 0,
+        REG_DMAC,
+        REG_COMMS,
+        REG_MTX,
+        REG_MMU,
+        REG_TOPAZHP_TEST,
+        REG_MTX_RAM,
+        REG_TOPAZHP_CORE_0,
+        REG_TOPAZHP_VLC_CORE_0,
+        REG_TOPAZHP_DEBLOCKER_CORE_0,
+        REG_TOPAZHP_COREEXT_0,
+        REG_TOPAZHP_CORE_1,
+        REG_TOPAZHP_VLC_CORE_1,
+        REG_TOPAZHP_DEBLOCKER_CORE_1,
+        REG_TOPAZHP_COREEXT_1,
+        REG_TOPAZHP_CORE_2,
+        REG_TOPAZHP_VLC_CORE_2,
+        REG_TOPAZHP_DEBLOCKER_CORE_2,
+        REG_TOPAZHP_COREEXT_2,
+        REG_TOPAZHP_CORE_3,
+        REG_TOPAZHP_VLC_CORE_3,
+        REG_TOPAZHP_DEBLOCKER_CORE_3,
+        REG_TOPAZHP_COREEXT_3,
+        FW,
+        SYSMEM,
+        MEMSYSMEM,
+        MEM,
+        FB,
+        MEMDMAC_00,
+        MEMDMAC_01,
+        MEMDMAC_02,
+};
+
+#endif
diff --git a/driver/encoder/topaz_api.c b/driver/encoder/topaz_api.c
new file mode 100644 (file)
index 0000000..de6d5cc
--- /dev/null
@@ -0,0 +1,3328 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Encoder Core API function implementations
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "fw_headers/coreflags.h"
+#include "fw_headers/topazscfwif.h"
+#include "header_gen.h"
+#include "img_errors.h"
+#include "img_mem_man.h"
+#include "lst.h"
+#include "osal/inc/osa_mem.h"
+#include "osal/inc/osa_mutex.h"
+#include "osal/inc/osa_string.h"
+#include "osal/inc/osa_types.h"
+#include "reg_headers/topaz_coreext_regs.h"
+#include "reg_headers/topazhp_core_regs.h"
+#include "reg_headers/topaz_vlc_regs.h"
+#include "reg_headers/topaz_db_regs.h"
+#include "topaz_color_formats.h"
+#include "topaz_device.h"
+#include "topaz_api.h"
+#include "topaz_api_utils.h"
+#include "topazmmu.h"
+#include "vxe_public_regdefs.h"
+
+#ifndef MIN
+#define MIN(a, b) (((a) > (b)) ? (b) : (a))
+#endif
+
+#ifndef MAX
+#define MAX(x, y) (((x) > (y)) ? (x) : (y))
+#endif
+
+#define TOPAZ_TIMEOUT_RETRIES (5000000)
+#define TOPAZ_TIMEOUT_WAIT_FOR_SPACE (500)
+
+#define COMM_WB_DATA_BUF_SIZE (64)
+
+/*
+ * All contexts should be able to send as many commands as possible before waiting for a response.
+ * There must be enough command memory buffers for all applicable commands, that is:
+ * -To fill all source slots
+ * -To supply custom quant data
+ */
+#define TOPAZ_CMD_DATA_BUF_NUM ((MAX_SOURCE_SLOTS_SL + 1) * TOPAZHP_MAX_POSSIBLE_STREAMS)
+#define TOPAZ_CMD_DATA_BUF_SIZE        (64)
+#define COMM_CMD_DATA_BUF_SLOT_NONE 0xFF
+
+/*
+ * This structure contains the topaz Context.
+ * @brief  topaz Context
+ */
+struct topaz_core_context {
+       /* List of stream context structures */
+       struct topaz_dev_ctx *dev_handle;
+       struct lst_t    topaz_stream_list;
+       vxe_cb          vxe_str_processed_cb;
+       uint32          num_pipes;
+       void            *mutex;
+};
+
+struct topaz_core_context *global_topaz_core_context;
+
+struct topaz_stream_context {
+       void    **link; /* List link (allows the structure to be part of a MeOS list).*/
+       struct topaz_core_context *core_ctx;
+       struct img_enc_context *enc_ctx;
+       uint32  stream_id;                      /* DMAN allocated device ID. */
+       struct vxe_enc_ctx *vxe_ctx;
+       void *mmu_ctx; /* stream specific MMU context */
+
+};
+
+static osa_bool        global_cmd_data_busy[TOPAZ_CMD_DATA_BUF_NUM];
+struct vidio_ddbufinfo global_cmd_data_dev_addr; /* Data section */
+struct vidio_ddbufinfo global_cmd_data_info[TOPAZ_CMD_DATA_BUF_NUM]; /* Data section */
+static uint8 global_pipe_usage[TOPAZHP_MAX_NUM_PIPES] = { 0 };
+
+struct vidio_ddbufinfo *global_wb_data_info;
+static osa_bool is_topaz_core_initialized;
+
+/*
+ * Get a buffer reference
+ */
+static int32 topaz_get_buffer(struct topaz_stream_context *str_ctx,
+                             struct img_buffer *buffer, void **lin_address,
+                             osa_bool update_host_memory)
+{
+       if (buffer->lock == NOTDEVICEMEMORY) {
+               *lin_address = buffer->mem_info.cpu_virt;
+               return IMG_SUCCESS;
+       }
+
+       if (buffer->lock == SW_LOCK)
+               return IMG_ERROR_SURFACE_LOCKED;
+
+       if (update_host_memory)
+               update_host_mem(str_ctx->vxe_ctx, &buffer->mem_info);
+
+       *lin_address    = buffer->mem_info.cpu_virt;
+       buffer->lock    = SW_LOCK;
+
+       return IMG_SUCCESS;
+}
+
+static int32 topaz_release_buffer(struct topaz_stream_context *str_ctx,
+                                 struct img_buffer *buffer, osa_bool update_device_memory)
+{
+       if (buffer->lock == NOTDEVICEMEMORY)
+               return IMG_SUCCESS;
+
+       if (buffer->lock == HW_LOCK)
+               return IMG_ERROR_SURFACE_LOCKED;
+
+       buffer->lock = BUFFER_FREE;
+
+       if (update_device_memory)
+               update_device_mem(str_ctx->vxe_ctx, &buffer->mem_info);
+
+       return IMG_SUCCESS;
+}
+
+static int32 topaz_get_cmd_data_buffer(struct vidio_ddbufinfo **mem_info)
+{
+       int32 index = 0;
+       int32 res = IMG_SUCCESS;
+
+       osa_mutex_lock(global_topaz_core_context->mutex);
+
+       do {
+               if (global_cmd_data_busy[index] == osa_false)
+                       break;
+               index++;
+       } while (index < sizeof(global_cmd_data_info) / sizeof(global_cmd_data_info[0]));
+
+       if (index == sizeof(global_cmd_data_info) / sizeof(global_cmd_data_info[0])) {
+               res = IMG_ERROR_UNEXPECTED_STATE;
+       } else {
+               global_cmd_data_busy[index] = osa_true;
+               *mem_info = &global_cmd_data_info[index];
+       }
+
+       osa_mutex_unlock(global_topaz_core_context->mutex);
+
+       return res;
+}
+
+static int32 topaz_release_cmd_data_buffer(struct vidio_ddbufinfo *mem_info)
+{
+       int32 index = 0;
+       int32 res = IMG_ERROR_UNEXPECTED_STATE;
+
+       osa_mutex_lock(global_topaz_core_context->mutex);
+
+       do {
+               if (mem_info == &global_cmd_data_info[index]) {
+                       global_cmd_data_busy[index] = osa_false;
+                       res = IMG_SUCCESS;
+                       break;
+               }
+               index++;
+       } while (index < sizeof(global_cmd_data_info) / sizeof(global_cmd_data_info[0]));
+
+       osa_mutex_unlock(global_topaz_core_context->mutex);
+
+       return res;
+}
+
+/*
+ * Get a buffer reference
+ */
+static int32 get_coded_buffer(struct topaz_stream_context *str_ctx, void **lin_address,
+                             osa_bool update_host_memory, uint8 coded_package_idx)
+{
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       uint8 coded_buffer_idx;
+       uint8 found = osa_false;
+       uint32 *address;
+       struct coded_data_hdr *coded_datahdr = NULL;
+       uint32 offset_buffer_header = 0, offset_coded_buffer = 0;
+       osa_bool all_slice_retrieved = osa_false;       /* Tells if all the slices have been retrived */
+       osa_bool slice_break = osa_false;       /* Tells if we have reach the last coded buffer used or not */
+       osa_bool new_coded_header = osa_true;           /* Tells if we are at the beginning of a slice or not*/
+       uint32 total_byte_written = 0;                  /* Tells the number of bytes remaining to be retrieved */
+       uint32 coded_slices_so_far = 0;
+       uint32 coded_slices_in_buffer = 0;
+
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       if (video->coded_package[coded_package_idx]->header_buffer->lock == SW_LOCK)
+               return IMG_ERROR_UNDEFINED;
+
+       /* Retrieve the FW Package memory. Get linear address */
+       video->coded_package[coded_package_idx]->mtx_info.coded_package_fw =
+                                       (struct coded_package_dma_info *)(&video->coded_package[coded_package_idx]->mtx_info.code_package_fw_buffer->mem_info);
+
+       if (update_host_memory) {
+               /* Go through all the coded buffers */
+               for (coded_buffer_idx = 0; coded_buffer_idx < MAX_CODED_BUFFERS_PER_PACKAGE; coded_buffer_idx++) {
+                       /* Reset the Offset */
+                       offset_coded_buffer = 0;
+                       do {
+                               if (new_coded_header) { // beginning of a slice
+                                       slice_break = osa_false;
+                               /* Get the coded header information */
+                               *lin_address = video->coded_package[coded_package_idx]->header_buffer->mem_info.cpu_virt;
+                               address = *lin_address;
+                               /* Getting the nth buffer header */
+                               coded_datahdr = (struct coded_data_hdr *)(address + (offset_buffer_header / 4));
+                               total_byte_written = coded_datahdr->bytes_written;
+                               coded_slices_so_far = F_DECODE(coded_datahdr->extra_feedback, CODED_SLICES_SO_FAR);
+                               coded_slices_in_buffer = F_DECODE(coded_datahdr->extra_feedback, CODED_SLICES_IN_BUFFER);
+
+                               /* Increment the offset in the coded header information buffer in order to point on the next header */
+                               offset_buffer_header += CODED_BUFFER_INFO_SECTION_SIZE;
+                               }
+
+                               if (!new_coded_header) {
+                                       /* Retrieve the last coded data */
+                                       offset_coded_buffer = ALIGN_16(offset_coded_buffer + total_byte_written);
+                                       slice_break = osa_true;
+                                       new_coded_header = osa_true;// On next loop we will be at the start of a new slice
+                               } else {
+                                       /*
+                                        * New slice : Read all the bytes written for this slice
+                                        * Go after what we read, next 16bit align address
+                                        */
+                                       offset_coded_buffer = ALIGN_16(offset_coded_buffer + coded_datahdr->bytes_written);
+                                       if (F_DECODE(coded_datahdr->extra_feedback, CODED_SLICES_SO_FAR) ==
+                                           F_DECODE(coded_datahdr->extra_feedback, CODED_SLICES_IN_BUFFER)) {
+                                               /* We now have all the slices for this coded buffer, we should not try to read further. */
+                                               all_slice_retrieved = osa_true;
+                                               break;
+                                       }
+                               }
+                       } while(coded_slices_so_far != coded_slices_in_buffer);
+
+                       if (all_slice_retrieved || slice_break) {
+                               /* If we are NOT in the middle of a slice */
+                               found = osa_true;
+                               /* We lock this last buffer */
+                               video->coded_package[coded_package_idx]->coded_buffer[coded_buffer_idx]->lock = SW_LOCK;
+                               /* This function will do nothing if -debugCRCs (1 or 2) has not been specified on the command line */
+                               break;
+                       }
+               }
+
+               if (!found)
+                       update_host_mem(str_ctx->vxe_ctx, &video->coded_package[coded_package_idx]->header_buffer->mem_info);
+
+       }
+
+       /* address of first  header if all buffer finish in middle of slice or !bUpdateHostMemory, last red header otherwise */
+       *lin_address = video->coded_package[coded_package_idx]->header_buffer->mem_info.cpu_virt;
+       /* Lock-it */
+       video->coded_package[coded_package_idx]->header_buffer->lock    = SW_LOCK;
+
+       return IMG_SUCCESS;
+}
+
+static void combine_feedback(struct topaz_stream_context *str_ctx, uint8 active_coded_package_idx,
+                            uint32 *feedback, uint32 *extra_feedback, uint32 *bytes_coded)
+{
+       struct img_enc_context *enc = str_ctx->enc_ctx;
+       struct coded_data_hdr *coded_datahdr;
+       uint32 offset = 0;
+       uint32 min_bu = 0xFFFFFFFF;
+       uint32 coded_bytes = 0;
+       uint32 bu;
+       uint32 coded_slices_so_far;
+       uint32 coded_slices_in_buffer;
+
+       do {
+               /* we should be able to rely on the linear pointer here as the coded data header should have been updated.*/
+               coded_datahdr = (struct coded_data_hdr *)((size_t)(enc->video->coded_package[active_coded_package_idx]->header_buffer->mem_info.cpu_virt) +
+                                                          offset);
+
+               IMG_DBG_ASSERT(coded_datahdr != NULL);
+               if (!coded_datahdr)
+                       return;
+
+               bu = F_DECODE(coded_datahdr->feedback, CODED_FIRST_BU);
+               coded_slices_so_far = F_DECODE(coded_datahdr->extra_feedback, CODED_SLICES_SO_FAR);
+               coded_slices_in_buffer = F_DECODE(coded_datahdr->extra_feedback, CODED_SLICES_IN_BUFFER);
+
+               if (bu < min_bu)
+                       min_bu = bu;
+
+               coded_bytes += coded_datahdr->bytes_written;
+               offset += CODED_BUFFER_INFO_SECTION_SIZE;
+       } while (coded_slices_so_far != coded_slices_in_buffer);
+
+       *bytes_coded = coded_bytes;
+       *feedback = F_INSERT(coded_datahdr->feedback, min_bu, CODED_FIRST_BU);
+       *extra_feedback = coded_datahdr->extra_feedback;
+}
+
+/*
+ * Move around the reconstructed data and handle the list for frame reordering
+ */
+static void process_reconstructed(struct topaz_stream_context *str_ctx, osa_bool is_coded,
+                                 enum img_frame_type frame_type, struct list_item **recon_list)
+{
+       struct img_video_context *video = str_ctx->enc_ctx->video;
+       uint8 * tmp_buffer;
+       uint16 width, height;
+       struct list_item *new_item;
+       struct img_recon_node *new_node;
+       struct list_item *current_item;
+
+       *recon_list = NULL;
+
+       if (!video->output_reconstructed)
+               return;
+
+       /* Create new reconstructed node */
+       new_item = osa_zalloc(sizeof(struct list_item), OSA_GFP_KERNEL);
+       if (!new_item)
+               return;
+
+       new_item->data = osa_zalloc(sizeof(struct img_recon_node), OSA_GFP_KERNEL);
+       if (!new_item->data) {
+               osa_free(new_item);
+               new_item = NULL;
+               return;
+       }
+
+       new_node = (struct img_recon_node *)new_item->data;
+
+       if (is_coded) {
+               update_host_mem(str_ctx->vxe_ctx, video->recon_buffer);
+               tmp_buffer = (uint8 *)video->recon_buffer->cpu_virt;
+               width = ALIGN_64(video->width);
+               height = ALIGN_64(video->frame_height);
+
+               new_node->buffer = osa_zalloc(width * height * 3 / 2, OSA_GFP_KERNEL);
+               if (!new_node->buffer) {
+                       osa_free(new_item->data);
+                       osa_free(new_item);
+                       new_item = NULL;
+                       new_node = NULL;
+                       return;
+               }
+               osa_memcpy(new_node->buffer, tmp_buffer, width * height * 3 / 2);
+
+       } else {
+               new_node->buffer = NULL;
+       }
+       new_node->poc = video->recon_poc;
+
+       /* Add new node to the queue */
+       if (video->ref_frame == NULL) {
+               /* First element */
+               new_item->next = NULL;
+               video->ref_frame = new_item;
+       } else if (new_node->poc == 0) {
+               /* First element after aborted sequence */
+               current_item = video->ref_frame;
+
+               while (current_item->next != NULL)
+                       current_item = current_item->next;
+
+               /* Insert at end */
+               new_item->next = NULL;
+               current_item->next = new_item;
+       } else {
+               struct img_recon_node *head_node = (struct img_recon_node *)video->ref_frame->data;
+
+               if (head_node->poc > new_node->poc) {
+                       /* Insert at start */
+                       new_item->next = video->ref_frame;
+                       video->ref_frame = new_item;
+               } else {
+                       struct img_recon_node *next_node = NULL;
+
+                       current_item = video->ref_frame;
+                       while (current_item->next != NULL) {
+                               next_node = (struct img_recon_node *)current_item->next->data;
+
+                               if (next_node->poc > new_node->poc) {
+                                       /* Insert between current and next */
+                                       new_item->next = current_item->next;
+                                       current_item->next = new_item;
+                                       break;
+                               }
+                               current_item = current_item->next;
+                       }
+
+                       if (current_item->next == NULL) {
+                               /* Insert at end */
+                               new_item->next = NULL;
+                               current_item->next = new_item;
+                       }
+               }
+       }
+
+       if (video->next_recon == 0) {
+               video->next_recon++;
+               /* Flush all frames */
+               *recon_list = video->ref_frame;
+               video->ref_frame = NULL;
+       } else if (new_node->poc == video->next_recon) {
+               struct list_item *flush_tail = video->ref_frame;
+               struct img_recon_node *next_node;
+
+               video->next_recon++;
+
+               /* Find all flushable frames */
+               while (flush_tail->next != NULL) {
+                       next_node = (struct img_recon_node *)flush_tail->next->data;
+
+                       /* Flushing sequence ends when POCs no longer match */
+                       if (next_node->poc != video->next_recon)
+                               break;
+
+                       video->next_recon++;
+
+                       flush_tail = flush_tail->next;
+               }
+
+               /* Flush consecutive sequence */
+               *recon_list = video->ref_frame;
+
+               /* Set new head */
+               video->ref_frame = flush_tail->next;
+
+               /* Separate sequences */
+               flush_tail->next = NULL;
+       }
+}
+
+int32 topaz_process_message(struct topaz_stream_context *str_ctx, struct mtx_tohost_msg tohost_msg)
+{
+       struct driver_tohost_msg *driver_msg;
+       struct list_item *current_el = NULL;
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       struct list_item *message_list = NULL;
+       uint32 index = 0;
+
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       /* add a new element */
+       current_el = (struct list_item *)osa_zalloc(sizeof(struct list_item), OSA_GFP_KERNEL);
+       if (!current_el)
+               return IMG_ERROR_OUT_OF_MEMORY;
+
+       current_el->data = osa_zalloc(sizeof(struct driver_tohost_msg), OSA_GFP_KERNEL);
+       if (!current_el->data) {
+               osa_free(current_el);
+               current_el = NULL;
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       /* adding to head */
+       current_el->next = message_list;
+       message_list = current_el;
+
+       driver_msg = (struct driver_tohost_msg *)current_el->data;
+       driver_msg->cmd_id = tohost_msg.cmd_id;
+       driver_msg->data = tohost_msg.data;
+       driver_msg->command_data_buf = tohost_msg.command_data_buf;
+
+       switch (tohost_msg.cmd_id) {
+               case MTX_MESSAGE_ACK:
+                       driver_msg->input_cmd_id = F_DECODE(tohost_msg.input_cmd_word, MTX_MSG_CMD_ID);
+                       break;
+
+               case MTX_MESSAGE_CODED:
+                       {
+                       struct coded_data_hdr *coded_datahdr = NULL;
+                       uint32  feedback, extra_feedback;
+                       uint8   active_coded_package_idx;
+                       struct img_feedback_element *feedback_struct;
+
+                       active_coded_package_idx = tohost_msg.coded_pkg_idx;
+
+                       get_coded_buffer(str_ctx, (void **)&coded_datahdr, osa_true, active_coded_package_idx);
+
+                       feedback = coded_datahdr->feedback;
+                       extra_feedback = coded_datahdr->extra_feedback;
+
+                       /* detect the FrameNum of the coded buffer */
+                       feedback_struct = (struct img_feedback_element *)&driver_msg->feedback;
+
+                       combine_feedback(str_ctx, active_coded_package_idx, &feedback, &extra_feedback, &feedback_struct->bytes_coded);
+
+                       feedback_struct->coded_buffer_count = F_DECODE(extra_feedback, CODED_BUFFER_NUMBER_USED);
+
+                       /* Give the header buffer to the feedback structure */
+                       feedback_struct->coded_package = video->coded_package[active_coded_package_idx];
+                       feedback_struct->active_coded_package_idx       = active_coded_package_idx;
+                       /* update this frame, using the info from the coded buffer */
+                       feedback_struct->coded_package->coded_buffer[feedback_struct->coded_slot_num] =
+                                               video->coded_package[active_coded_package_idx]->coded_buffer[feedback_struct->coded_slot_num];
+
+                       feedback_struct->first_bu                               = F_DECODE(feedback, CODED_FIRST_BU);
+                       feedback_struct->storage_frame_num                      = F_DECODE(feedback, CODED_STORAGE_FRAME_NUM);
+                       feedback_struct->entire_frame                           = F_DECODE(feedback, CODED_ENTIRE_FRAME);
+                       feedback_struct->is_skipped                             = F_DECODE(feedback, CODED_IS_SKIPPED);
+                       feedback_struct->is_coded                               = F_DECODE(feedback, CODED_IS_CODED);
+                       feedback_struct->recon_idx                              = F_DECODE(feedback, CODED_RECON_IDX);
+                       feedback_struct->source_slot                            = F_DECODE(feedback, CODED_SOURCE_SLOT);
+                       feedback_struct->frame_type                             = F_DECODE(feedback, CODED_FRAME_TYPE);
+                       feedback_struct->slice_num                              = F_DECODE(feedback, CODED_SLICE_NUM);
+                       feedback_struct->poc                                    = video->source_slot_poc[feedback_struct->source_slot];
+
+                       feedback_struct->slices_in_buffer               = F_DECODE(extra_feedback, CODED_SLICES_IN_BUFFER);
+                       feedback_struct->field                          = F_DECODE(extra_feedback, CODED_FIELD);
+                       feedback_struct->patched_recon                  = F_DECODE(extra_feedback, CODED_PATCHED_RECON);
+                       feedback_struct->bytes_coded                    = coded_datahdr->bytes_written;
+                       feedback_struct->host_ctx                       = coded_datahdr->host_ctx;
+
+                       if ((video->highest_storage_number != feedback_struct->storage_frame_num) &&
+                           (video->standard != IMG_STANDARD_H263)) {
+                               if (feedback_struct->storage_frame_num == ((video->highest_storage_number + 1) & 0x03)) {
+                                       /* it is piece of the next frame */
+                                       video->highest_storage_number = feedback_struct->storage_frame_num ;
+                                       /* retrieve next WB */
+                                       video->encode_pic_processing--;
+                                       video->extra_wb_retrieved++;
+                               } else if (feedback_struct->storage_frame_num == ((video->highest_storage_number + 2) & 0x03)) {
+                                       /* it is piece of the next frame */
+                                       video->highest_storage_number = feedback_struct->storage_frame_num ;
+
+                                       video->encode_pic_processing -= 2;
+                                       video->extra_wb_retrieved += 2;
+                               }
+                       }
+
+                       while (index < feedback_struct->coded_buffer_count) {
+                               if (video->coded_package[active_coded_package_idx]->coded_buffer[index]->lock == SW_LOCK)
+                                       /* Unlock coded buffers used*/
+                                       topaz_release_buffer(str_ctx, (struct img_buffer *)(video->coded_package[active_coded_package_idx]->coded_buffer[index]), osa_false);
+                               index++;
+                       }
+
+               /* Unlock header buffer */
+               topaz_release_buffer(str_ctx, video->coded_package[feedback_struct->active_coded_package_idx]->header_buffer, osa_false);
+
+               /* Release the coded slot */
+               video->coded_package[feedback_struct->active_coded_package_idx]->busy = osa_false;
+
+               feedback_struct->src_frame = video->source_slot_buff[feedback_struct->source_slot];
+
+               /* Detect the slice number based on the Slice Map and the first BU in a slice */
+               if (feedback_struct->bytes_coded) {
+                       struct img_buffer *output_slice_map;
+                       unsigned char *src_buffer = NULL;
+                       uint8 slices_per_picture;
+                       uint16 first_bu_in_slice;
+                       uint8 slice_number;
+                       uint8 index;
+                       uint16 first_bu_in_slice_list[MAX_SLICESPERPIC];
+                       uint8 slice_size_in_bu[MAX_SLICESPERPIC];
+                       uint16 total_bu_in_picture;
+
+                       /* postion the start of the slice map */
+                       output_slice_map = &video->slice_map[feedback_struct->source_slot];
+
+                       topaz_get_buffer(str_ctx, output_slice_map, (void **)&src_buffer, osa_false);
+
+                       /* retrieve slices per field */
+                       slices_per_picture = *src_buffer;
+                       src_buffer++;
+
+                       /* retrieve first BU in slices and Slice sizes in BUs */
+                       first_bu_in_slice = 0;
+
+                       for (index = 0; index < slices_per_picture; index++) {
+                               slice_number = src_buffer[index * 2];
+                               slice_size_in_bu[slice_number] = src_buffer[index * 2 + 1];
+
+                               first_bu_in_slice_list[slice_number] = first_bu_in_slice;
+                               first_bu_in_slice += slice_size_in_bu[slice_number];
+                       }
+                       topaz_release_buffer(str_ctx, output_slice_map, osa_false);
+
+                       total_bu_in_picture = ((video->picture_height + 15) / 16) * (video->width / 16) / video->rc_params.bu_size;
+                       feedback_struct->slices_per_picture = slices_per_picture;
+               }
+
+               if (feedback_struct->entire_frame) {
+                       /* we encoded the entire frame  */
+                       video->frames_encoded++;
+                       OSA_PR_INFO("FRAMES_CODED[%d]\n", video->frames_encoded);
+
+                       if (feedback_struct->coded_package->coded_buffer[0] != NULL)
+                               /* Send callback for coded_buffer ready */
+                               global_topaz_core_context->vxe_str_processed_cb(str_ctx->vxe_ctx, VXE_CB_CODED_BUFF_READY,
+                                                                               (void *)(feedback_struct->coded_package->coded_buffer[0]),
+                                                                               feedback_struct->bytes_coded, video->frames_encoded);
+
+                       if (feedback_struct->src_frame != NULL)
+                               /* Send callback for coded_buffer ready */
+                               global_topaz_core_context->vxe_str_processed_cb(str_ctx->vxe_ctx, VXE_CB_SRC_FRAME_RELEASE,
+                                                                               (void *)(feedback_struct->src_frame),
+                                                                               0, 0);
+
+                       if (video->flush_at_frame > 0 && video->frames_encoded >= video->flush_at_frame)
+                               feedback_struct->last_frame_encoded = osa_true;
+
+                       if (feedback_struct->patched_recon && video->patched_recon_buffer) {
+                               video->recon_buffer = video->patched_recon_buffer;
+                               video->patched_recon_buffer = NULL;
+                       } else {
+                               video->recon_buffer = &video->recon_pictures[feedback_struct->recon_idx];
+                       }
+                       video->recon_poc = feedback_struct->poc;
+
+                       video->frame_type = feedback_struct->frame_type;
+
+                       process_reconstructed(str_ctx, feedback_struct->is_coded, video->frame_type, &feedback_struct->recon_list);
+
+                       /* If there are more frames to be encoded, release the source slot */
+                       if ((video->frame_count == 0) || (video->encode_requested < video->frame_count))
+                               video->source_slot_buff[feedback_struct->source_slot] = NULL;
+
+                       if (!video->extra_wb_retrieved) {
+                               video->encode_pic_processing--;
+                               video->highest_storage_number = (video->highest_storage_number + 1) & 0x03;
+                       } else {
+                               video->extra_wb_retrieved--;
+                       }
+               }
+
+               if ( (feedback_struct->entire_frame) && (video->enable_sel_stats_flags & ESF_FIRST_STAGE_STATS))
+                       feedback_struct->motion_search_statistics_buf = &video->firstpass_out_param_buf[feedback_struct->source_slot];
+               else
+                       feedback_struct->motion_search_statistics_buf = NULL;
+
+               if (video->frame_count > 0 && video->frames_encoded >= video->frame_count)
+                       feedback_struct->last_frame_encoded = osa_true;
+
+               if ((feedback_struct->entire_frame) &&
+                  (video->enable_sel_stats_flags & ESF_MP_BEST_MB_DECISION_STATS ||
+                   video->enable_sel_stats_flags & ESF_MP_BEST_MOTION_VECTOR_STATS))
+                       feedback_struct->best_multipass_statistics_buf = &video->firstpass_out_best_multipass_param_buf[feedback_struct->source_slot];
+               else
+                       feedback_struct->best_multipass_statistics_buf = NULL;
+               break;
+               }
+       }
+
+       return IMG_SUCCESS;
+}
+
+void handle_encoder_firmware_response(struct img_writeback_msg *wb_msg, void *priv)
+{
+       struct topaz_stream_context *str_ctx;
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       struct mtx_tohost_msg tohost_msg;
+       int32 index;
+       uint32 cmd_buf_slot = COMM_CMD_DATA_BUF_SLOT_NONE;
+       uint32 *cmdbuf_devaddr;
+
+       str_ctx = (struct topaz_stream_context *)priv;
+
+       if (!str_ctx)
+               return;
+
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       osa_memset(&tohost_msg, 0, sizeof(tohost_msg));
+       tohost_msg.cmd_id = F_DECODE(wb_msg->cmd_word, MTX_MSG_MESSAGE_ID);
+
+       switch (tohost_msg.cmd_id) {
+               case MTX_MESSAGE_ACK:
+                       OSA_PR_INFO("MTX_MESSAGE_ACK received\n");
+
+                       tohost_msg.wb_val = wb_msg->writeback_val;
+                       tohost_msg.input_cmd_word = wb_msg->cmd_word;
+                       tohost_msg.data = wb_msg->data;
+                       break;
+               case MTX_MESSAGE_CODED:
+                       OSA_PR_INFO("MTX_MESSAGE_CODED Received\n");
+                       tohost_msg.input_cmd_word = wb_msg->cmd_word;
+                       tohost_msg.coded_pkg_idx = wb_msg->coded_package_consumed_idx;
+                       break;
+       }
+
+       cmdbuf_devaddr = global_cmd_data_dev_addr.cpu_virt;
+
+       for (index = 0; index < TOPAZ_CMD_DATA_BUF_NUM; index++) {
+               if (*cmdbuf_devaddr == wb_msg->extra_data) {
+                       /* Input cmd buffer found */
+                       cmd_buf_slot = index;
+                       break;
+               }
+               cmdbuf_devaddr++;
+       }
+
+       if (cmd_buf_slot != COMM_CMD_DATA_BUF_SLOT_NONE) {
+               tohost_msg.command_data_buf = &global_cmd_data_info[cmd_buf_slot];
+               topaz_release_cmd_data_buffer(tohost_msg.command_data_buf);
+
+       } else {
+               tohost_msg.command_data_buf = NULL;
+       }
+
+       topaz_process_message(str_ctx, tohost_msg);
+
+}
+
+static void inline populate_firmware_message(struct vidio_ddbufinfo *dest, uint32 dest_offset,
+                                            struct vidio_ddbufinfo *src, uint32 src_offset)
+{
+       *(uint32 *)(dest->cpu_virt + dest_offset) = src->dev_virt + src_offset;
+       return;
+}
+
+/*
+ * init_hardware
+ */
+int32 init_topaz_core(void *device_handle, uint32 *num_pipes, uint32 mmu_flags, void *callback)
+{
+       uint32 index;
+
+       if (is_topaz_core_initialized)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       is_topaz_core_initialized = osa_true;
+
+       global_topaz_core_context = osa_zalloc(sizeof(*global_topaz_core_context), OSA_GFP_KERNEL);
+       if (!global_topaz_core_context) {
+               is_topaz_core_initialized = osa_false;
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       /* Initialise device context. */
+       global_topaz_core_context->dev_handle = (struct topaz_dev_ctx *)device_handle;
+       global_topaz_core_context->vxe_str_processed_cb = (vxe_cb)callback;
+
+       lst_init(&global_topaz_core_context->topaz_stream_list);
+
+       *num_pipes = topazdd_get_num_pipes(device_handle);
+
+       /* allocate memory for HighCmd FIFO data section */
+       if (mmu_alloc(global_topaz_core_context->dev_handle->topaz_mmu_ctx.mmu_context_handle, global_topaz_core_context->dev_handle->vxe_arg, MMU_GENERAL_HEAP_ID,
+                     1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE), 4 * TOPAZ_CMD_DATA_BUF_NUM, 64, &global_cmd_data_dev_addr)) {
+               IMG_DBG_ASSERT("Global command data info buff alloc failed\n");
+               osa_free(global_topaz_core_context);
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       for (index = 0; index < sizeof(global_cmd_data_info) / sizeof(global_cmd_data_info[0]); index++) {
+               if (mmu_alloc(global_topaz_core_context->dev_handle->topaz_mmu_ctx.mmu_context_handle, global_topaz_core_context->dev_handle->vxe_arg, MMU_GENERAL_HEAP_ID,
+                             1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE), TOPAZ_CMD_DATA_BUF_SIZE, 64, &global_cmd_data_info[index])) {
+                       IMG_DBG_ASSERT("Global command data info buff alloc failed\n");
+                       mmu_free(global_topaz_core_context->dev_handle->vxe_arg, &global_cmd_data_dev_addr);
+                       osa_free(global_topaz_core_context);
+                       return IMG_ERROR_OUT_OF_MEMORY;
+               }
+               populate_firmware_message(&global_cmd_data_dev_addr, 4 * index, &global_cmd_data_info[index], 0);
+               global_cmd_data_busy[index] = osa_false;
+       }
+
+       /*Lock for locking critical section in TopazAPI*/
+       osa_mutex_create(&global_topaz_core_context->mutex);
+       return IMG_SUCCESS;
+}
+
+/*
+ * deinit_topaz_core
+ */
+int32 deinit_topaz_core()
+{
+       uint32 index;
+
+       osa_mutex_destroy(&global_topaz_core_context->mutex);
+
+       if (mmu_free(global_topaz_core_context->dev_handle->vxe_arg, &global_cmd_data_dev_addr))
+               IMG_DBG_ASSERT(!"Free failed");
+
+       for (index = 0; index < sizeof(global_cmd_data_info) / sizeof(global_cmd_data_info[0]); index++)
+               if (mmu_free(global_topaz_core_context->dev_handle->vxe_arg, &global_cmd_data_info[index]))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+       return IMG_SUCCESS;
+}
+
+static uint16 create_gop_frame(uint8 *level, osa_bool reference, uint8 pos, uint8 ref0_level, uint8 ref1_level, enum img_frame_type frame_type)
+{
+       *level = MAX(ref0_level, ref1_level) + 1;
+
+       return F_ENCODE(reference, GOP_REFERENCE) |
+               F_ENCODE(pos, GOP_POS) |
+               F_ENCODE(ref0_level, GOP_REF0) |
+               F_ENCODE(ref1_level, GOP_REF1) |
+               F_ENCODE(frame_type, GOP_FRAMETYPE);
+}
+
+static void gop_split(uint16 **gop_structure, int8 ref0, int8 ref1, uint8 ref0_level, uint8 ref1_level, uint8 pic_on_level[])
+{
+       uint8 distance = ref1 - ref0;
+       uint8 position = ref0 + (distance >> 1);
+       uint8 level;
+
+       if (distance == 1)
+               return;
+
+       /* mark middle as this level */
+       (*gop_structure)++;
+       **gop_structure = create_gop_frame(&level, distance >= 3, position, ref0_level, ref1_level, IMG_INTER_B);
+       pic_on_level[level]++;
+
+       if (distance >= 4)
+               gop_split(gop_structure, ref0, position, ref0_level, level, pic_on_level);
+
+       if (distance >= 3)
+               gop_split(gop_structure, position, ref1, level, ref1_level, pic_on_level);
+}
+
+static void mini_gop_generate_hierarchical(uint16 gop_structure[], uint32 bframe_count, uint32 ref_spacing, uint8 pic_on_level[])
+{
+       uint8 level;
+
+       gop_structure[0] = create_gop_frame(&level, osa_true, bframe_count, ref_spacing, 0, IMG_INTER_P);
+       pic_on_level[level]++;
+
+       gop_split(&gop_structure, -1, bframe_count, ref_spacing, ref_spacing + 1, pic_on_level);
+}
+
+static void mini_gop_generate_flat(uint16 gop_structure[], uint32 bframe_count, uint32 ref_spacing, uint8 pic_on_level[])
+{
+       /* B B B B P */
+       uint8 encode_order_pos;
+       uint8 level;
+
+       gop_structure[0] = create_gop_frame(&level, osa_true, MAX_BFRAMES, ref_spacing, 0, IMG_INTER_P);
+       pic_on_level[level]++;
+
+       for (encode_order_pos = 1; encode_order_pos < MAX_GOP_SIZE; encode_order_pos++) {
+               gop_structure[encode_order_pos] = create_gop_frame(&level, osa_false, encode_order_pos - 1, ref_spacing, ref_spacing + 1, IMG_INTER_B);
+               pic_on_level[level] = bframe_count;
+       }
+}
+
+/*
+ * Create the MTX-side encoder context
+ */
+static int32 topaz_video_create_mtx_context(struct topaz_stream_context *str_ctx,
+                                           struct img_video_params *video_params)
+{
+       struct img_video_context *video;
+       struct img_enc_context *enc;
+       int32 index, i, j;
+       void *mtx_enc_context_mem;
+       struct img_mtx_video_context *mtx_enc_context;
+       uint8 flag;
+       uint32  max_cores;
+       uint32 bit_limit;
+       uint32 vert_mv_limit;
+       uint32 packed_strides;
+       uint16 *gop_structure;
+
+       max_cores = topazdd_get_num_pipes(global_topaz_core_context->dev_handle);
+
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       mtx_enc_context = (struct img_mtx_video_context *)(video->mtx_enc_ctx_mem.cpu_virt);
+
+       /* clear the context region */
+       osa_memset(mtx_enc_context, 0x00, MTX_CONTEXT_SIZE);
+
+       mtx_enc_context_mem = (void *)(&enc->video->mtx_enc_ctx_mem);
+
+       mtx_enc_context->initial_qp_i = video->rc_params.initial_qp_i;
+       mtx_enc_context->initial_qp_p = video->rc_params.initial_qp_p;
+       mtx_enc_context->initial_qp_b = video->rc_params.initial_qp_b;
+
+       mtx_enc_context->cqp_offset = (video->rc_params.qcp_offset&0x1f) | ((video->rc_params.qcp_offset&0x1f)<<8);
+       mtx_enc_context->standard = video->standard;
+       mtx_enc_context->width_in_mbs = video->width >> 4;
+       mtx_enc_context->picture_height_in_mbs = video->picture_height >> 4;
+
+       mtx_enc_context->kick_size = video->kick_size;
+       mtx_enc_context->kicks_per_bu = video->kicks_per_bu;
+       mtx_enc_context->kicks_per_picture = (mtx_enc_context->width_in_mbs *
+       mtx_enc_context->picture_height_in_mbs) / video->kick_size;
+
+       mtx_enc_context->output_reconstructed = video->output_reconstructed;
+
+       mtx_enc_context->vop_time_resolution = video->vop_time_resolution;
+
+       mtx_enc_context->max_slices_per_picture = video->slices_per_picture;
+
+       mtx_enc_context->is_interlaced = video->is_interlaced;
+       mtx_enc_context->top_field_first = video->top_field_first;
+       mtx_enc_context->arbitrary_so = video->arbitrary_so;
+
+       mtx_enc_context->idr_period = video->idr_period;
+       mtx_enc_context->bframe_count = video->rc_params.bframes;
+       mtx_enc_context->hierarchical = (osa_bool) video->rc_params.hierarchical;
+       mtx_enc_context->intra_loop_cnt = video->intra_cnt;
+       mtx_enc_context->ref_spacing = video_params->ref_spacing;
+
+       mtx_enc_context->debug_crcs = video_params->debug_crcs;
+
+       mtx_enc_context->fw_num_pipes = enc->pipes_to_use;
+       mtx_enc_context->fw_first_pipe = enc->base_pipe;
+       mtx_enc_context->fw_last_pipe = enc->base_pipe + enc->pipes_to_use - 1;
+       mtx_enc_context->fw_pipes_to_use_flags = 0;
+
+       flag = 0x1 << mtx_enc_context->fw_first_pipe;
+       for (index = 0; index < mtx_enc_context->fw_num_pipes; index++, flag <<= 1)
+               mtx_enc_context->fw_pipes_to_use_flags |= flag; /* Pipes used MUST be contiguous from the BasePipe offset */
+
+       mtx_enc_context->format = video_params->format;
+
+       /* copy scaler values to context in case we need them later */
+       video->enable_scaler            = video_params->enable_scaler;
+       video->crop_left                = video_params->crop_left;
+       video->crop_right               = video_params->crop_right;
+       video->crop_top                 = video_params->crop_top;
+       video->crop_bottom              = video_params->crop_bottom;
+       video->source_width             = video_params->source_width;
+       video->source_frame_height      = video_params->source_frame_height;
+
+       topaz_setup_input_format(video, &mtx_enc_context->scaler_setup);
+       topaz_setup_input_csc(video, &mtx_enc_context->scaler_setup,
+                             &mtx_enc_context->csc_setup, video_params->csc_preset);
+
+       mtx_enc_context->enable_mvc = video->enable_mvc;
+       mtx_enc_context->mvc_view_idx = video->mvc_view_idx;
+
+       if (video->standard == IMG_STANDARD_H264)
+               mtx_enc_context->no_sequence_headers = video->no_sequence_headers;
+
+       mtx_enc_context->coded_header_per_slice = video->coded_header_per_slice;
+
+       packed_strides = topaz_get_packed_buffer_strides(video->buffer_stride_bytes, video->format, video_params->enable_scaler,
+                                                        video_params->is_interlaced, video_params->is_interleaved);
+
+       mtx_enc_context->pic_row_stride_bytes = F_ENCODE(F_DECODE(packed_strides, MTX_MSG_PICMGMT_STRIDE_Y), TOPAZHP_CR_CUR_PIC_LUMA_STRIDE) |
+                                               F_ENCODE(F_DECODE(packed_strides, MTX_MSG_PICMGMT_STRIDE_UV), TOPAZHP_CR_CUR_PIC_CHROMA_STRIDE);
+
+
+       mtx_enc_context->rc_mode         = video->rc_params.rc_mode;
+       if (mtx_enc_context->rc_mode == IMG_RCMODE_VCM) {
+               mtx_enc_context->rc_vcm_mode = video->rc_params.rc_vcm_mode;
+               mtx_enc_context->rc_cfs_max_margin_perc = video->rc_params.rc_cfs_max_margin_perc;
+       }
+
+       mtx_enc_context->disable_bit_stuffing = (osa_bool)video_params->disable_bit_stuffing;
+
+       mtx_enc_context->first_pic = osa_true;
+
+       /*Content Adaptive Rate Control Parameters*/
+       if (video_params->carc) {
+               mtx_enc_context->jmcomp_rc_reg0 = F_ENCODE(video_params->carc_pos_range, TOPAZHP_CR_CARC_POS_RANGE)  |
+                                                       F_ENCODE(video_params->carc_pos_scale,  TOPAZHP_CR_CARC_POS_SCALE)   |
+                                                       F_ENCODE(video_params->carc_neg_range, TOPAZHP_CR_CARC_NEG_RANGE)    |
+                                                       F_ENCODE(video_params->carc_neg_scale,  TOPAZHP_CR_CARC_NEG_SCALE);
+
+       mtx_enc_context->jmcomp_rc_reg1 = F_ENCODE(video_params->carc_threshold, TOPAZHP_CR_CARC_THRESHOLD) |
+                                               F_ENCODE(video_params->carc_cutoff, TOPAZHP_CR_CARC_CUTOFF)  |
+                                               F_ENCODE(video_params->carc_shift, TOPAZHP_CR_CARC_SHIFT);
+       } else {
+               mtx_enc_context->jmcomp_rc_reg0 = 0;
+               mtx_enc_context->jmcomp_rc_reg1 = 0;
+       }
+
+       mtx_enc_context->mv_clip_config =  F_ENCODE(video_params->no_offscreen_mv, TOPAZHP_CR_MVCALC_RESTRICT_PICTURE);
+
+       mtx_enc_context->lritc_cache_chunk_config = 0;
+
+       mtx_enc_context->ipcm_0_config = F_ENCODE(enc->video->cabac_bin_flex, TOPAZ_VLC_CR_CABAC_BIN_FLEX) |
+                                       F_ENCODE(DEFAULT_CABAC_DB_MARGIN, TOPAZ_VLC_CR_CABAC_DB_MARGIN);
+
+       bit_limit = 3100;
+
+       mtx_enc_context->ipcm_1_config = F_ENCODE(bit_limit,TOPAZ_VLC_CR_IPCM_THRESHOLD)|
+                                       F_ENCODE(enc->video->cabac_bin_limit,TOPAZ_VLC_CR_CABAC_BIN_LIMIT);
+
+       /* leave alone until high profile and constrained modes are defined. */
+       mtx_enc_context->h264_comp_control  = F_ENCODE((video->cabac_enabled ? 0 : 1),TOPAZHP_CR_H264COMP_8X8_CAVLC);
+       mtx_enc_context->h264_comp_control |= F_ENCODE(video_params->use_default_scaling_list ? 1 : 0, TOPAZHP_CR_H264COMP_DEFAULT_SCALING_LIST);
+       mtx_enc_context->h264_comp_control |= F_ENCODE(video->h264_8x8_transform ? 1 : 0, TOPAZHP_CR_H264COMP_8X8_TRANSFORM);
+       mtx_enc_context->h264_comp_control |= F_ENCODE(video->h264_intra_constrained ? 1 : 0, TOPAZHP_CR_H264COMP_CONSTRAINED_INTRA);
+
+       mtx_enc_context->mc_adaptive_rounding_disable = video_params->vp_adaptive_rounding_disable;
+       mtx_enc_context->h264_comp_control |= F_ENCODE(mtx_enc_context->mc_adaptive_rounding_disable ? 0 : 1, TOPAZHP_CR_H264COMP_ADAPT_ROUND_ENABLE);
+
+       if (!mtx_enc_context->mc_adaptive_rounding_disable)
+               for (i = 0; i < 4; i++)
+                       for (j = 0; j < AR_REG_SIZE; j++)
+                               mtx_enc_context->mc_adaptive_rounding_offsets[j][i] = video_params->vp_adaptive_rounding_offsets[j][i];
+
+       if (video->standard == IMG_STANDARD_H264)
+               mtx_enc_context->h264_comp_control |= F_ENCODE(USE_VCM_HW_SUPPORT, TOPAZHP_CR_H264COMP_VIDEO_CONF_ENABLE);
+
+       mtx_enc_context->h264_comp_control |=
+                       F_ENCODE(video_params->use_custom_scaling_lists & 0x01 ? 1 : 0, TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_LUMA_ENABLE) |
+                       F_ENCODE(video_params->use_custom_scaling_lists & 0x02 ? 1 : 0, TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CB_ENABLE) |
+                       F_ENCODE(video_params->use_custom_scaling_lists & 0x04 ? 1 : 0, TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTRA_CR_ENABLE) |
+                       F_ENCODE(video_params->use_custom_scaling_lists & 0x08 ? 1 : 0, TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_LUMA_ENABLE) |
+                       F_ENCODE(video_params->use_custom_scaling_lists & 0x10 ? 1 : 0, TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CB_ENABLE) |
+                       F_ENCODE(video_params->use_custom_scaling_lists & 0x20 ? 1 : 0, TOPAZHP_CR_H264COMP_CUSTOM_QUANT_4X4_INTER_CR_ENABLE) |
+                       F_ENCODE(video_params->use_custom_scaling_lists & 0x40 ? 1 : 0, TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTRA_LUMA_ENABLE) |
+                       F_ENCODE(video_params->use_custom_scaling_lists & 0x80 ? 1 : 0, TOPAZHP_CR_H264COMP_CUSTOM_QUANT_8X8_INTER_LUMA_ENABLE);
+
+       mtx_enc_context->h264_comp_control |= F_ENCODE(video_params->enable_lossless ? 1 : 0, TOPAZHP_CR_H264COMP_LOSSLESS) |
+                                               F_ENCODE(video_params->lossless_8x8_prefilter ? TOPAZHP_CR_H264COMP_LOSSLESS_8X8_PREFILTER_BYPASS :                                                     TOPAZHP_CR_H264COMP_LOSSLESS_8X8_PREFILTER_FILTER, TOPAZHP_CR_H264COMP_LOSSLESS_8X8_PREFILTER);
+
+       mtx_enc_context->h264_comp_intra_pred_modes = 0x3ffff;// leave at default for now.
+
+       if (video->intra_pred_modes != 0)
+               mtx_enc_context->h264_comp_intra_pred_modes = video->intra_pred_modes;
+
+       mtx_enc_context->pred_comb_control = video->pred_comb_control;
+
+       mtx_enc_context->skip_coded_inter_intra = F_ENCODE(video->inter_intra_index,TOPAZHP_CR_INTER_INTRA_SCALE_IDX) |
+                                                       F_ENCODE(video->coded_skipped_index,TOPAZHP_CR_SKIPPED_CODED_SCALE_IDX);
+
+       if (video->enable_inp_ctrl) {
+               mtx_enc_context->mb_host_ctrl = F_ENCODE(video->enable_host_qp,TOPAZHP_CR_MB_HOST_QP) |
+                                               F_ENCODE(video->enable_host_bias,TOPAZHP_CR_MB_HOST_SKIPPED_CODED_SCALE) |
+                                               F_ENCODE(video->enable_host_bias,TOPAZHP_CR_MB_HOST_INTER_INTRA_SCALE);
+       mtx_enc_context->pred_comb_control |= F_ENCODE(1, TOPAZHP_CR_INTER_INTRA_SCALE_ENABLE) | F_ENCODE(1, TOPAZHP_CR_SKIPPED_CODED_SCALE_ENABLE);
+       }
+
+       if (video_params->enable_cumulative_biases)
+               mtx_enc_context->pred_comb_control |= F_ENCODE(1, TOPAZHP_CR_CUMULATIVE_BIASES_ENABLE);
+
+       mtx_enc_context->pred_comb_control |= F_ENCODE((((video->inter_intra_index == 3) && (video->coded_skipped_index == 3)) ? 0 : 1),
+                                                         TOPAZHP_CR_INTER_INTRA_SCALE_ENABLE) | F_ENCODE((video->coded_skipped_index == 3 ? 0 : 1),
+                                                         TOPAZHP_CR_SKIPPED_CODED_SCALE_ENABLE);
+
+       mtx_enc_context->deblock_ctrl = F_ENCODE(video->deblock_idc,TOPAZ_DB_CR_DISABLE_DEBLOCK_IDC);
+
+       /* Set up VLC Control Register */
+       mtx_enc_context->vlc_control = 0;
+
+       switch (video->standard) {
+               case IMG_STANDARD_H264:
+                       mtx_enc_context->vlc_control |= F_ENCODE(1, TOPAZ_VLC_CR_CODEC); /* 1 for H.264 note this is inconsistant with the sequencer value */
+                       mtx_enc_context->vlc_control |= F_ENCODE(0, TOPAZ_VLC_CR_CODEC_EXTEND);
+               break;
+
+               default:
+               break;
+       }
+
+       if (video->cabac_enabled)
+               mtx_enc_context->vlc_control |= F_ENCODE(1, TOPAZ_VLC_CR_CABAC_ENABLE); /* 2 for Mpeg4 note this is inconsistant with the sequencer value */
+
+       mtx_enc_context->vlc_control |= F_ENCODE(video->is_interlaced ? 1 : 0, TOPAZ_VLC_CR_VLC_FIELD_CODED);
+       mtx_enc_context->vlc_control |= F_ENCODE(video->h264_8x8_transform ? 1 : 0, TOPAZ_VLC_CR_VLC_8X8_TRANSFORM);
+       mtx_enc_context->vlc_control |= F_ENCODE(video->h264_intra_constrained ? 1 : 0, TOPAZ_VLC_CR_VLC_CONSTRAINED_INTRA);
+
+       mtx_enc_context->vlc_slice_control = F_ENCODE(video->rc_params.slice_byte_limit, TOPAZ_VLC_CR_SLICE_SIZE_LIMIT);
+       mtx_enc_context->vlc_slice_mb_control = F_ENCODE(video->rc_params.slice_mb_limit, TOPAZ_VLC_CR_SLICE_MBS_LIMIT);
+
+       switch (video->standard) {
+               case IMG_STANDARD_H264:
+                       vert_mv_limit = 255; /* default to no clipping */
+                       if (video->vert_mv_limit)
+                               vert_mv_limit = enc->video->vert_mv_limit;
+
+                       /* as topaz can only cope with at most 255 (in the register field) */
+                       vert_mv_limit = MIN(255 , vert_mv_limit);
+                       mtx_enc_context->ipe_vector_clipping = F_ENCODE(1, TOPAZHP_CR_IPE_VECTOR_CLIPPING_ENABLED) |
+                                                               F_ENCODE(255, TOPAZHP_CR_IPE_VECTOR_CLIPPING_X) |
+                                                               F_ENCODE(vert_mv_limit, TOPAZHP_CR_IPE_VECTOR_CLIPPING_Y);
+
+                       mtx_enc_context->spe_mvd_clip_range = F_ENCODE(0, TOPAZHP_CR_SPE_MVD_CLIP_ENABLE);
+                       break;
+               default:
+                       break;
+       }
+
+       /* Update MV Scaling settings: IDR */
+       osa_memcpy(&mtx_enc_context->mv_settings_idr, &video->mv_settings_idr, sizeof(struct img_mv_settings));
+
+       /* NonB (I or P) */
+       for (i = 0; i <= MAX_BFRAMES; i++)
+               osa_memcpy(&mtx_enc_context->mv_settings_non_b[i], &video->mv_settings_non_b[i], sizeof(struct img_mv_settings));
+
+       /* WEIGHTED PREDICTION */
+       mtx_enc_context->weighted_prediction_enabled = video_params->weighted_prediction;
+       mtx_enc_context->mtx_weighted_implicit_bi_pred=video_params->vp_weighted_implicit_bi_pred;
+
+       /* SEI_INSERTION */
+       mtx_enc_context->insert_hrd_params = video_params->insert_hrd_params;
+       if (mtx_enc_context->insert_hrd_params & enc->video->rc_params.bits_per_second)
+               /* HRD parameters are meaningless without a bitrate */
+               mtx_enc_context->insert_hrd_params = osa_false;
+
+       if (mtx_enc_context->insert_hrd_params) {
+               mtx_enc_context->clock_div_bitrate = (90000 * 0x100000000LL);
+               mtx_enc_context->clock_div_bitrate /= enc->video->rc_params.bits_per_second;
+               mtx_enc_context->max_buffer_mult_clock_div_bitrate = (uint32)(((uint64)(video->rc_params.buffer_size) * (uint64) 90000) /
+                                                                       (uint64) enc->video->rc_params.bits_per_second);
+       }
+
+       osa_memcpy(&mtx_enc_context->in_params, &video->pic_params.in_params, sizeof(struct in_rc_params));
+
+       mtx_enc_context->lritc_cache_chunk_config = F_ENCODE(enc->video->chunks_per_mb, TOPAZHP_CR_CACHE_CHUNKS_PER_MB)
+                                                       | F_ENCODE(enc->video->max_chunks, TOPAZHP_CR_CACHE_CHUNKS_MAX)
+                                                       | F_ENCODE(enc->video->max_chunks - enc->video->priority_chunks, TOPAZHP_CR_CACHE_CHUNKS_PRIORITY);
+
+       mtx_enc_context->first_pic_flags = video->first_pic_flags;
+       mtx_enc_context->non_first_pic_flags = video->non_first_pic_flags;
+
+       mtx_enc_context->slice_header_slot_num = -1;
+
+       osa_memset(mtx_enc_context->pic_on_level, 0, sizeof(mtx_enc_context->pic_on_level));
+
+       gop_structure = (uint16 *)(video->flat_gop_struct.cpu_virt);
+
+       mini_gop_generate_flat(gop_structure, mtx_enc_context->bframe_count, mtx_enc_context->ref_spacing, mtx_enc_context->pic_on_level);
+       update_device_mem(str_ctx->vxe_ctx, &video->flat_gop_struct);
+
+       if (video->rc_params.hierarchical) {
+               osa_memset(mtx_enc_context->pic_on_level, 0, sizeof(mtx_enc_context->pic_on_level));
+               gop_structure = (uint16 *)(video->hierar_gop_struct.cpu_virt);
+
+               mini_gop_generate_hierarchical(gop_structure, mtx_enc_context->bframe_count, mtx_enc_context->ref_spacing, mtx_enc_context->pic_on_level);
+               update_device_mem(str_ctx->vxe_ctx, &video->hierar_gop_struct);
+       }
+
+       update_device_mem(str_ctx->vxe_ctx, &video->mtx_enc_ctx_mem);
+
+       populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->mv_settings_b_table - (uint8*)mtx_enc_context),
+                                 &video->mv_settings_btable, 0);
+
+       if (video->rc_params.hierarchical)
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->mv_settings_hierarchical - (uint8*)mtx_enc_context),
+                                         &video->mv_settings_hierarchical, 0);
+
+       for (i = 0; i < video->pic_nodes; i++) {
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->reconstructed[i] - (uint8*)mtx_enc_context),
+                                         &video->recon_pictures[i], 0);
+
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->colocated[i] - (uint8*)mtx_enc_context),
+                                         &video->colocated[i], 0);
+       }
+
+       for (i = 0; i < WB_FIFO_SIZE; i++)
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->writeback_regions[i] - (uint8*)mtx_enc_context),
+                                         &global_wb_data_info[i], 0);
+
+       for (i = 0; i < video->mv_stores; i++)
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->mv[i] - (uint8*)mtx_enc_context),
+                                         &video->mv[i], 0);
+
+       if (video->enable_mvc) {
+               for (i = 0; i < 2; i++)
+                       populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->inter_view_mv[i] - (uint8*)mtx_enc_context),
+                                                 &video->inter_view_mv[i], 0);
+       }
+
+       for (i = 0; i < (int32)max_cores; i++)
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->above_params[i] - (uint8*)mtx_enc_context),
+                                         &video->above_params[i], 0);
+
+       /* SEI insertion */
+       if (video_params->insert_hrd_params) {
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->sei_buffering_period_template - (uint8*)mtx_enc_context),
+                                         &video->sei_buffering_period_header_mem, 0);
+
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->sei_picture_timing_template - (uint8*)mtx_enc_context),
+                                         &video->sei_picture_timing_header_mem, 0);
+       }
+
+       for (i = 0; i < sizeof(video->slice_params_template_mem) / sizeof(video->slice_params_template_mem[0]); i++)
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->slice_params_templates[i] - (uint8*)mtx_enc_context),
+                                         &video->slice_params_template_mem[i], 0);
+
+       for (i = 0; i < video->slots_in_use; i++) {
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->slice_map[i] - (uint8*)mtx_enc_context),
+                                         &video->slice_map[i].mem_info, 0);
+
+               /* WEIGHTED PREDICTION */
+               if (video_params->weighted_prediction || (video_params->vp_weighted_implicit_bi_pred == WBI_EXPLICIT)) {
+                       populate_firmware_message(mtx_enc_context_mem,
+                                                 (uint32)((uint8*)&mtx_enc_context->weighted_prediction_virt_addr[i] - (uint8*)mtx_enc_context),
+                                                 &video->weighted_prediction_mem[i], 0);
+               }
+       }
+
+       populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->flat_gop_struct - (uint8*)mtx_enc_context),
+                                 &video->flat_gop_struct, 0);
+
+       populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->flat_gop_struct - (uint8*)mtx_enc_context),
+                                 &video->flat_gop_struct, 0);
+
+       for (i = 0; i < video->slots_in_use; i++) {
+               populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->ltref_header[i] - (uint8*)mtx_enc_context),
+                                         &video->ltref_header[i], 0);
+       }
+
+       if (mtx_enc_context->hierarchical)
+               populate_firmware_message(mtx_enc_context_mem,
+                                         (uint32)((uint8*)&mtx_enc_context->hierar_gop_struct - (uint8*)mtx_enc_context),
+                                         &video->hierar_gop_struct, 0);
+
+
+       for (i = 0; i < sizeof(video->pichdr_template_mem) / sizeof(video->pichdr_template_mem[0]); i++)
+               populate_firmware_message(mtx_enc_context_mem,
+                                         (uint32)((uint8*)&mtx_enc_context->pichdr_templates[i] - (uint8*)mtx_enc_context),
+                                         &video->pichdr_template_mem[i], 0);
+
+       if (video->standard == IMG_STANDARD_H264) {
+               populate_firmware_message(mtx_enc_context_mem,
+                                         (uint32)((uint8*)&mtx_enc_context->seq_header - (uint8*)mtx_enc_context),
+                                         &video->seq_header_mem, 0);
+
+               if (video->enable_mvc)
+                       populate_firmware_message(mtx_enc_context_mem,
+                                                 (uint32)((uint8*)&mtx_enc_context->subset_seq_header - (uint8*)mtx_enc_context),
+                                                 &video->subset_seq_header_mem, 0);
+       }
+
+       /* Store the feedback memory address for all "5" slots in the context */
+       if (video->enable_sel_stats_flags & ESF_FIRST_STAGE_STATS) {
+               for (i = 0; i < video->slots_in_use; i++)
+                       populate_firmware_message(mtx_enc_context_mem, (uint32)((uint8*)&mtx_enc_context->firstpass_out_param_addr[i] - (uint8*)mtx_enc_context),
+                                                 &video->firstpass_out_param_buf[i].mem_info, 0);
+       }
+
+       /* Store the feedback memory address for all "5" slots in the context */
+       if (video->enable_sel_stats_flags & ESF_MP_BEST_MB_DECISION_STATS ||
+           video->enable_sel_stats_flags & ESF_MP_BEST_MOTION_VECTOR_STATS) {
+               for (i = 0; i < video->slots_in_use; i++) {
+                       populate_firmware_message(mtx_enc_context_mem,
+                                                 (uint32)((uint8*)&mtx_enc_context->firstpass_out_best_multipass_param_addr[i] - (uint8*)mtx_enc_context),
+                                                 &video->firstpass_out_best_multipass_param_buf[i].mem_info, 0);
+               }
+       }
+
+       /* Store the MB-Input control parameter memory for all the 5-slots in the context */
+       if (video->enable_inp_ctrl) {
+               for (i = 0; i < video->slots_in_use; i++)
+                       populate_firmware_message(mtx_enc_context_mem,
+                                                 (uint32)((uint8*)&mtx_enc_context->mb_ctrl_in_params_addr[i] - (uint8*)mtx_enc_context),
+                                                 &video->mb_ctrl_in_params_buf[i].mem_info, 0);
+       }
+
+       update_device_mem(str_ctx->vxe_ctx, &video->mtx_enc_ctx_mem);
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Prepares the header templates for the encode for H.264
+ */
+static int32 h264_prepare_templates(struct topaz_stream_context *str_ctx, struct img_rc_params *rc_params,
+                                   int32 fine_y_search_size)
+{
+       struct img_enc_context *enc;
+       struct img_video_context *video_ctx;
+       struct pic_params *pic_params;
+
+       enc = str_ctx->enc_ctx;
+       video_ctx = enc->video;
+
+       prepare_mv_estimates(enc);
+
+       pic_params = &enc->video->pic_params;
+
+       pic_params->flags = 0;
+
+       if (rc_params->rc_enable) {
+               pic_params->flags |= ISRC_FLAGS;
+               setup_rc_data(enc->video, pic_params, rc_params);
+       } else {
+               pic_params->in_params.se_init_qp_i = rc_params->initial_qp_i;
+               pic_params->in_params.mb_per_row   = (enc->video->width >> 4);
+               pic_params->in_params.mb_per_bu    = rc_params->bu_size;
+               pic_params->in_params.mb_per_frm   = ((uint32)(enc->video->width >> 4)) * (enc->video->frame_height >> 4);
+               pic_params->in_params.bu_per_frm   = (pic_params->in_params.mb_per_frm) / rc_params->bu_size;
+       }
+
+       /* Prepare Slice header templates */
+       generate_slice_params_template(enc, &enc->video->slice_params_template_mem[IMG_FRAME_IDR], IMG_FRAME_IDR, enc->video->is_interlaced, fine_y_search_size);
+       update_device_mem(str_ctx->vxe_ctx, &enc->video->slice_params_template_mem[IMG_FRAME_IDR]);
+
+
+       generate_slice_params_template(enc, &enc->video->slice_params_template_mem[IMG_FRAME_INTRA], IMG_FRAME_INTRA, enc->video->is_interlaced, fine_y_search_size);
+       update_device_mem(str_ctx->vxe_ctx, &enc->video->slice_params_template_mem[IMG_FRAME_INTRA]);
+
+       generate_slice_params_template(enc, &enc->video->slice_params_template_mem[IMG_FRAME_INTER_P], IMG_FRAME_INTER_P, enc->video->is_interlaced, fine_y_search_size);
+       update_device_mem(str_ctx->vxe_ctx, &enc->video->slice_params_template_mem[IMG_FRAME_INTER_P]);
+
+       generate_slice_params_template(enc, &enc->video->slice_params_template_mem[IMG_FRAME_INTER_B], IMG_FRAME_INTER_B, enc->video->is_interlaced, fine_y_search_size);
+       update_device_mem(str_ctx->vxe_ctx, &enc->video->slice_params_template_mem[IMG_FRAME_INTER_B]);
+
+       if (video_ctx->enable_mvc) {
+               generate_slice_params_template(enc, &enc->video->slice_params_template_mem[IMG_FRAME_INTER_P_IDR],
+                                              IMG_FRAME_INTER_P_IDR, enc->video->is_interlaced, fine_y_search_size);
+               update_device_mem(str_ctx->vxe_ctx, &enc->video->slice_params_template_mem[IMG_FRAME_INTER_P_IDR]);
+       }
+
+       /* Prepare Pic Params Templates */
+       adjust_pic_flags(enc, rc_params, osa_true, &video_ctx->first_pic_flags);
+       adjust_pic_flags(enc, rc_params, osa_false, &video_ctx->non_first_pic_flags);
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Prepares the header templates for the encode.
+ */
+static int32 topaz_video_prepare_templates(struct topaz_stream_context *str_ctx, uint8 search_range,
+                                          int32 fine_y_search_size)
+{
+       struct img_enc_context *enc = str_ctx->enc_ctx;
+       struct img_video_context *video = enc->video;
+       int32 err_value = IMG_ERROR_UNEXPECTED_STATE;
+
+       switch (video->standard) {
+               case IMG_STANDARD_H264:
+                       err_value = h264_prepare_templates(str_ctx, &video->rc_params, fine_y_search_size);
+               break;
+               default:
+               break;
+       }
+
+       return err_value;
+}
+
+/*
+ * Prepare the sequence header for h.264
+ */
+int32 topaz_h264_prepare_sequence_header(void *topaz_str_ctx, uint32 mb_width,
+                                        uint32 mb_height, osa_bool vui_params_present,
+                                        struct h264_vui_params *params,
+                                        struct h264_crop_params *crop_params,
+                                        struct h264_sequence_header_params *sh_params,
+                                        osa_bool mvc_sps)
+{
+       struct mtx_header_params *seq_header;
+       struct img_enc_context *enc;
+       struct topaz_stream_context *str_ctx;
+
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+
+       enc = str_ctx->enc_ctx;
+
+       /* Ensure parameters are consistent with context */
+       if (!enc->video->custom_scaling)
+               sh_params->seq_scaling_matrix_present_flag = osa_false;
+
+       /* Get a pointer to the memory the header will be written to */
+       seq_header = (struct mtx_header_params *)(enc->video->seq_header_mem.cpu_virt);
+       h264_prepare_sequence_header(seq_header, mb_width, mb_height, vui_params_present,
+       params, crop_params, sh_params, enc->video->arbitrary_so);
+
+       update_device_mem(str_ctx->vxe_ctx, &enc->video->seq_header_mem);
+
+
+       if (mvc_sps) {
+               /* prepare subset sequence parameter header */
+               struct mtx_header_params *subset_seq_header;
+
+               subset_seq_header = (struct mtx_header_params *)(enc->video->subset_seq_header_mem.cpu_virt);
+               h264_prepare_mvc_sequence_header(subset_seq_header, mb_width, mb_height, vui_params_present, params, crop_params, sh_params);
+               update_device_mem(str_ctx->vxe_ctx, &enc->video->subset_seq_header_mem);
+       }
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Prepare the picture header for h.264
+ */
+int32 topaz_h264_prepare_picture_header(void *topaz_str_ctx, int8 cqp_offset)
+{
+       struct mtx_header_params *pic_header;
+       struct topaz_stream_context *str_ctx;
+       struct img_enc_context *enc;
+       osa_bool dep_view_pps = osa_false;
+
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+       enc = str_ctx->enc_ctx;
+
+       /* Get a pointer to the memory the header will be written to */
+       pic_header = (struct mtx_header_params *)(enc->video->pichdr_template_mem[0].cpu_virt);
+
+       if ((enc->video->enable_mvc) && (enc->video->mvc_view_idx != 0) &&
+           (enc->video->mvc_view_idx != (uint16)(NON_MVC_VIEW)))
+               dep_view_pps = osa_true;
+
+       h264_prepare_picture_header(pic_header, enc->video->cabac_enabled,
+                                   enc->video->h264_8x8_transform, enc->video->h264_intra_constrained,
+                                   cqp_offset, enc->video->weighted_prediction, enc->video->weighted_bi_pred,
+                                   dep_view_pps,enc->video->pps_scaling, enc->video->pps_scaling &&
+                                   enc->video->custom_scaling);
+
+       update_device_mem(str_ctx->vxe_ctx, &enc->video->pichdr_template_mem[0]);
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Prepare the AUD header for H264
+ */
+int32 topaz_h264_prepare_aud_header(void *str_context)
+{
+       struct mtx_header_params *aud_header;
+       struct img_enc_context *enc;
+       struct topaz_stream_context *str_ctx;
+
+       str_ctx = (struct topaz_stream_context *)str_context;
+       if (!str_ctx)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       enc = str_ctx->enc_ctx;
+
+       /* Get a pointer to the memory the header will be written to */
+       aud_header = (struct mtx_header_params *)(&enc->video->aud_header_mem);
+
+       h264_prepare_aud_header(aud_header);
+
+       update_device_mem(str_ctx->vxe_ctx, &enc->video->aud_header_mem);
+
+       return IMG_SUCCESS;
+}
+
+static uint32 topaz_get_max_coded_data_size(enum img_standard standard, uint16 width,
+                                           uint16 height, uint32 initial_qp_i)
+{
+       uint32 worst_qp_size;
+
+       if (standard == IMG_STANDARD_H264) {
+               /* allocate based on worst case qp size */
+               worst_qp_size = 400;
+               return ((uint32)(width / 16) * (uint32)(height / 16) * worst_qp_size);
+       }
+
+       if (initial_qp_i <= 5)
+               return ((uint32)width * (uint32)height * 1600) / (16 * 16);
+
+       return ((uint32)width * (uint32)height * 900) / (16 * 16);
+}
+
+static int32 topaz_get_context_coded_buffer_size(struct img_enc_context *enc, struct img_rc_params *rc_params,
+                                                uint32 *coded_buffer_size)
+{
+       struct img_video_context *video;
+
+       video = enc->video;
+
+       *coded_buffer_size = topaz_get_max_coded_data_size(video->standard, video->width,
+                                                          video->picture_height, rc_params->initial_qp_i);
+
+       if (!video->disable_bit_stuffing && (rc_params->rc_mode == IMG_RCMODE_CBR))
+               *coded_buffer_size = MAX(*coded_buffer_size, ((rc_params->bits_per_second + rc_params->frame_rate / 2) / rc_params->frame_rate) * 2);
+
+       if (video->coded_header_per_slice)
+               *coded_buffer_size += CODED_BUFFER_INFO_SECTION_SIZE * video->slices_per_picture;
+       else
+               *coded_buffer_size += CODED_BUFFER_INFO_SECTION_SIZE;
+
+       *coded_buffer_size = ALIGN_1024(*coded_buffer_size); /* Ensure coded buffer sizes are always aligned to 1024 */
+
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Description:        Allocate a coded package
+ */
+static int32 topaz_allocate_coded_package(struct topaz_stream_context *str_ctx,
+                                         uint32 coded_buffersize_bytes, struct coded_package_host **package)
+{
+       struct coded_package_host *this_package;
+       struct img_video_context *video = str_ctx->enc_ctx->video;
+
+       *package = osa_zalloc(sizeof(struct coded_package_host), OSA_GFP_KERNEL);
+
+       this_package = *package;
+
+       if (!this_package)
+               return IMG_ERROR_OUT_OF_MEMORY;
+
+       this_package->busy = 0;
+
+       this_package->num_coded_buffers = 1;
+
+       /* Allocate FW Buffer  IMG_BUFFER  memory */
+       this_package->mtx_info.code_package_fw_buffer = (struct img_buffer *)osa_zalloc(sizeof(struct img_buffer), OSA_GFP_KERNEL);
+
+       if (!this_package->mtx_info.code_package_fw_buffer)
+               goto error_handling;
+
+       /* Allocate header IMG_BUFFER memory */
+       this_package->header_buffer = (struct img_buffer *)osa_zalloc(sizeof(struct img_buffer), OSA_GFP_KERNEL);
+
+       if (!this_package->header_buffer)
+               goto error_handling;
+
+       /* Allocate the FW Package (this will provide addresses of header and the coded buffer array) */
+       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                            sizeof(struct coded_package_dma_info), 64, &this_package->mtx_info.code_package_fw_buffer->mem_info))
+               goto error_handling;
+
+
+       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                            (video->coded_header_per_slice ? video->slices_per_picture : 1) * CODED_BUFFER_INFO_SECTION_SIZE,
+                            64, &this_package->header_buffer->mem_info))
+               goto error_handling;
+
+       this_package->header_buffer->size = (video->coded_header_per_slice ? video->slices_per_picture : 1) * CODED_BUFFER_INFO_SECTION_SIZE;
+
+       return IMG_SUCCESS;
+
+error_handling:
+       if (*package) {
+               osa_free(*package);
+               *package = NULL;
+       }
+
+       if (this_package->mtx_info.code_package_fw_buffer) {
+               osa_free(this_package->mtx_info.code_package_fw_buffer);
+               this_package->mtx_info.code_package_fw_buffer = NULL;
+       }
+
+       if (this_package->header_buffer) {
+               osa_free(this_package->header_buffer);
+               this_package->header_buffer = NULL;
+       }
+
+       if (this_package->mtx_info.code_package_fw_buffer->mem_info.dev_virt)
+               mmu_stream_free(str_ctx->mmu_ctx, &this_package->mtx_info.code_package_fw_buffer->mem_info);
+
+       return IMG_ERROR_OUT_OF_MEMORY;
+}
+
+/*
+ * Create the Video Encoder context
+ */
+static int32 topaz_video_create_context(struct topaz_stream_context *str_ctx, struct img_video_params *video_params,
+                                       struct img_rc_params *rc_params)
+{
+       struct img_enc_caps     encoder_caps;
+       struct img_enc_context  *enc;
+       struct img_video_context        *video;
+       uint32  alloc_size;
+       int32   index, i;
+       uint16  picture_height;
+       uint32  coded_buffer_size;
+       uint16  width_in_mbs;
+       uint16  frame_height_in_mbs;
+       uint8   pipes_to_use;
+       uint32  max_cores;
+       uint32  min_slice_height;
+       uint32  factor = 1;
+       uint32  kick_size, kicks_per_bu;
+       int32 ret;
+
+       max_cores = topazdd_get_num_pipes(str_ctx->core_ctx->dev_handle);
+
+       enc = str_ctx->enc_ctx;
+
+       picture_height = ((video_params->frame_height >> (video_params->is_interlaced ? 1 : 0)) + 15) & ~15;
+       width_in_mbs = (video_params->width + 15) >> 4;
+       frame_height_in_mbs =  ((picture_height + 15) >> 4) << (video_params->is_interlaced ? 1 : 0);
+
+       if (topaz_get_encoder_caps(video_params->standard, video_params->width, picture_height, &encoder_caps) != IMG_SUCCESS) {
+               OSA_PR_ERR("\nERROR: Unable to encode the size %dx%d with current hardware version\n\n",
+                          video_params->width, picture_height);
+               return IMG_ERROR_NOT_SUPPORTED;
+       }
+
+       /*scaler input W/H limit is 4K*/
+       if (video_params->source_width > 4096) {
+               OSA_PR_ERR("\nERROR: Source Width is bigger than the maximum supported Source Width(4096)\n");
+               return IMG_ERROR_NOT_SUPPORTED;
+       }
+
+       if (video_params->source_frame_height > 4096) {
+               OSA_PR_ERR("\nERROR: Source Height is bigger than the maximum supported Source Height(4096)\n");
+               return IMG_ERROR_NOT_SUPPORTED;
+       }
+
+       if (video_params->width > encoder_caps.max_width) {
+       OSA_PR_ERR("\n ERROR: Width too big for given core revision 0x%x. Maximum width is %d. \n",
+       encoder_caps.core_revision, encoder_caps.max_width);
+       return IMG_ERROR_NOT_SUPPORTED;
+       }
+
+       if (picture_height > encoder_caps.max_height) {
+               OSA_PR_ERR("\n ERROR: Height too big for given core revision 0x%x. Maximum height is %d. \n",
+                          encoder_caps.core_revision, encoder_caps.max_height);
+               return IMG_ERROR_NOT_SUPPORTED;
+       }
+
+       if (video_params->width < encoder_caps.min_width) {
+               OSA_PR_ERR("\n ERROR: Width too small for given core revision 0x%x. Minimum width is %d. \n",
+                          encoder_caps.core_revision, encoder_caps.min_width);
+               return IMG_ERROR_NOT_SUPPORTED;
+       }
+
+       if (video_params->standard == IMG_STANDARD_H264) {
+               if (video_params->slices_per_picture < encoder_caps.min_slices) {
+                       OSA_PR_ERR("WARNING: Minimum slices supported for this resolution is %d. Increasing slices per frame to %d\n",
+                                  encoder_caps.min_slices, video_params->slices_per_picture);
+                       video_params->slices_per_picture =  (uint8)encoder_caps.min_slices;
+               }
+               factor = MIN(enc->pipes_to_use, video_params->slices_per_picture);
+       }
+
+       if (video_params->standard == IMG_STANDARD_H264)
+               pipes_to_use = MIN(enc->pipes_to_use, video_params->slices_per_picture);
+       else
+               pipes_to_use = 1;
+
+       if (picture_height < (encoder_caps.min_height * factor)) {
+               OSA_PR_ERR("\n ERROR: Height too small for given core revision 0x%x. Minimum height is %d. \n",
+                           encoder_caps.core_revision, encoder_caps.min_height * factor);
+               return IMG_ERROR_NOT_SUPPORTED;
+       }
+
+       if ((uint32)((width_in_mbs) * (picture_height >> 4)) > encoder_caps.max_mb_num) {
+               OSA_PR_ERR("\n ERROR: Number of macroblocks too high. It should not be bigger than %d. \n",
+                           encoder_caps.max_mb_num);
+               return IMG_ERROR_NOT_SUPPORTED;
+       }
+
+       calculate_kick_and_bu_size(width_in_mbs, picture_height / 16, video_params->is_interlaced,
+                                  encoder_caps.max_bu_per_frame, &kick_size, &kicks_per_bu, &min_slice_height);
+
+       if (encoder_caps.min_slice_height > min_slice_height)
+               min_slice_height = encoder_caps.min_slice_height;
+
+       if ((uint32)(video_params->slices_per_picture * min_slice_height) > (uint32)(picture_height/16)) {
+               /* we have too many slices for this resolution */
+               OSA_PR_ERR("\n ERROR: Too many slices for this resolution. \n");
+               return IMG_ERROR_NOT_SUPPORTED;
+       }
+
+       video = (struct img_video_context *)osa_zalloc(sizeof(*video), OSA_GFP_KERNEL);
+       if (!video)
+               return IMG_ERROR_OUT_OF_MEMORY;
+
+       enc->video = video;
+
+       osa_memcpy(&video->rc_params, rc_params, sizeof(*rc_params));
+
+       /* Setup BU size for rate control */
+       video->rc_params.bu_size = kick_size * kicks_per_bu;
+       rc_params->bu_size = video->rc_params.bu_size;
+
+       video->kick_size = kick_size;
+       video->kicks_per_bu = kicks_per_bu;
+
+       video->debug_crcs = video_params->debug_crcs;
+
+       /* stream level params */
+       video->standard = video_params->standard;
+       video->format = video_params->format;
+       video->csc_preset = video_params->csc_preset;
+       video->width = width_in_mbs << 4;
+       video->frame_height = frame_height_in_mbs << 4;
+       video->unrounded_width = video_params->width;
+       video->unrounded_frame_height = video_params->frame_height;
+
+       video->picture_height = picture_height;
+       video->is_interlaced = video_params->is_interlaced;
+       video->is_interleaved = video_params->is_interleaved;
+       video->top_field_first = !(video_params->bottom_field_first);
+       video->encode_requested = 0;
+       video->limit_num_vectors = video_params->limit_num_vectors;
+       video->disable_bit_stuffing = video_params->disable_bit_stuffing;
+       video->vert_mv_limit = video_params->vert_mv_limit;
+       /* Cabac Parameters */
+       video->cabac_enabled = video_params->cabac_enabled;
+       video->cabac_bin_limit  =  video_params->cabac_bin_limit;
+       video->cabac_bin_flex   =  video_params->cabac_bin_flex;
+
+       video->frame_count = 0;
+       video->flush_at_frame = 0;
+       video->flushed_at_frame = 0;
+       video->encoder_idle = osa_true;
+       video->high_latency=video_params->high_latency;
+       video->slices_per_picture = (uint8) video_params->slices_per_picture;
+       video->deblock_idc = video_params->deblock_idc;
+       video->output_reconstructed = video_params->output_reconstructed;
+       video->arbitrary_so = video_params->arbitrary_so;
+       video->f_code = video_params->f_code;
+
+       /* Default f_code is 4 */
+       if (!video->f_code)
+               video->f_code = 4;
+
+       video->vop_time_resolution = video_params->vop_time_resolution;
+       video->frames_encoded = 0;
+       video->idr_period = video_params->idr_period;
+
+       video->intra_cnt = video_params->intra_cnt;
+       video->multi_reference_p = video_params->multi_reference_p;
+       video->spatial_direct = video_params->spatial_direct;
+       video->enable_sel_stats_flags = video_params->enable_sel_stats_flags;
+       video->enable_inp_ctrl = video_params->enable_inp_ctrl;
+       video->enable_host_bias = video_params->enable_host_bias;
+       video->enable_host_qp = video_params->enable_host_qp;
+       /* Line counter */
+       video->line_counter = video_params->line_counter_enabled;
+
+       video->enable_air = video_params->enable_air;
+       video->num_air_mbs = video_params->num_air_mbs;
+       video->air_threshold = video_params->air_threshold;
+       video->air_skip_cnt = video_params->air_skip_cnt;
+
+       video->extra_wb_retrieved = 0;
+       video->highest_storage_number = 0;
+
+       video->buffer_stride_bytes = calculate_stride(video_params->format, video_params->buffer_stride_bytes,
+       video_params->source_width);
+       video->buffer_height = ((video_params->buffer_height ? video_params->buffer_height :
+       video_params->source_frame_height));
+
+       if (!video_params->disable_bh_rounding)
+               video->buffer_height = (((video->buffer_height >> (video_params->is_interlaced ? 1 : 0)) + 15)  & ~15) << (video_params->is_interlaced ? 1 : 0) ;
+
+       video_params->buffer_stride_bytes = video->buffer_stride_bytes;
+       video_params->buffer_height = video->buffer_height;
+
+       video->next_recon = 0;
+
+       video->enable_mvc       = video_params->enable_mvc;
+       video->mvc_view_idx     = video_params->mvc_view_idx;
+
+       enc->pipes_to_use = pipes_to_use;
+
+       enc->requested_pipes_to_use = pipes_to_use;
+       video->slots_in_use = rc_params->bframes + 2;
+       enc->video->slots_required = enc->video->slots_in_use;
+
+       video->h264_8x8_transform = video_params->h264_8x8;
+       video->h264_intra_constrained = video_params->constrained_intra;
+       video->custom_scaling = (video_params->use_custom_scaling_lists != 0);
+       video->pps_scaling = (video_params->pps_scaling && (video_params->use_default_scaling_list || video->custom_scaling));
+
+       video->encode_pic_processing = 0;
+       video->next_slice = 0;
+       video->ref_frame = NULL;
+
+       /* create topaz device context */
+       ret = topazdd_create_stream_context(global_topaz_core_context->dev_handle, str_ctx->enc_ctx->codec,
+                                           handle_encoder_firmware_response, str_ctx, &str_ctx->enc_ctx->video->dd_str_ctx,
+                                           &global_wb_data_info);
+
+       if (ret != IMG_SUCCESS)
+               return ret;
+
+
+       ret = topazdd_setup_stream_ctx(str_ctx->enc_ctx->video->dd_str_ctx, video->frame_height,
+                                      video->width, (uint8 *)&video->dd_ctx_num, &video->dd_ctx_num);
+
+       if (ret != IMG_SUCCESS)
+               return ret;
+
+       /* Create MMU stream context */
+       ret = mmu_stream_create(&global_topaz_core_context->dev_handle->topaz_mmu_ctx, 0x1/*stream_id*/, str_ctx->vxe_ctx, &str_ctx->mmu_ctx);
+       if (ret)
+               return ret;
+
+       /* WEIGHTED PREDICTION */
+       if (video_params->weighted_prediction || video_params->vp_weighted_implicit_bi_pred == WBI_EXPLICIT) {
+               video->weighted_prediction = osa_true;
+
+               for (i = 0; i < video->slots_in_use; i++) {
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            sizeof(struct weighted_prediction_values), 64, &video->weighted_prediction_mem[i]))
+                               IMG_DBG_ASSERT(!"Allocation failed (A)");
+               }
+       } else {
+               video->weighted_prediction = osa_false;
+       }
+
+       video->weighted_bi_pred = video_params->vp_weighted_implicit_bi_pred;
+
+       video->coded_skipped_index=video_params->coded_skipped_index;
+       video->inter_intra_index=video_params->inter_intra_index;
+
+       /*
+        * patch video parameters is the user has specified a profile
+        * calculate the number of macroblocks per second
+       */
+       video->mbps = width_in_mbs * frame_height_in_mbs * video->rc_params.frame_rate;
+
+       patch_hw_profile(video_params, video);
+
+       enc->auto_expand_pipes = video_params->auto_expand_pipes;
+
+       /* As ui32Vp8RefStructMode is not in use the worst case would have to be taken and hence 5 pic nodes*/
+       video->pic_nodes = (rc_params->hierarchical ? MAX_REF_B_LEVELS : 0) + video_params->ref_spacing + 4;
+       video->mv_stores = (video->pic_nodes * 2);
+
+       /* We're using a common MACRO here so we can guarantee the same calculation when managing buffers either from host or within drivers */
+       video->coded_package_max_num = CALC_NUM_CODED_PACKAGES_ENCODE(video_params->slice_level,
+                                                                     video_params->slices_per_picture, pipes_to_use,
+                                                                     video->is_interlaced);
+
+       alloc_size = MVEA_ABOVE_PARAM_REGION_SIZE * (ALIGN_64(width_in_mbs));
+
+       for (index = 0; index < (int32)max_cores; index++) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+       ALIGN_64(alloc_size), 64, &video->above_params[index]))
+       IMG_DBG_ASSERT(!"Allocation failed (C)");
+
+       }
+       alloc_size = MVEA_MV_PARAM_REGION_SIZE * ALIGN_4(width_in_mbs) * frame_height_in_mbs;
+
+       for (index = 0; index < video->pic_nodes; index++) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    alloc_size, 64, &video->colocated[index]))
+                       IMG_DBG_ASSERT(!"Allocation failed (D)");
+       }
+
+       alloc_size = (ALIGN_64(video->width)) * (ALIGN_64(video->frame_height)) * 3 / 2;
+
+       for (index = 0; index < video->pic_nodes; index++) {
+               void *data;
+
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    alloc_size, 256, &video->recon_pictures[index]))
+                       IMG_DBG_ASSERT(!"Allocation failed (E)");
+
+               data = video->recon_pictures[index].cpu_virt;
+               osa_memset(data, 0, alloc_size);
+
+               update_device_mem(str_ctx->vxe_ctx, &video->recon_pictures[index]);
+       }
+
+       video->patched_recon_buffer = NULL;
+
+       alloc_size = MVEA_MV_PARAM_REGION_SIZE * ALIGN_4(width_in_mbs) * frame_height_in_mbs;
+       for (i = 0; i < video->mv_stores; i++) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    alloc_size, 64, &video->mv[i]))
+                       IMG_DBG_ASSERT(!"Allocation failed (F)");
+               update_device_mem(str_ctx->vxe_ctx, &video->mv[i]);
+       }
+
+       if (video->enable_mvc) {
+               for (i = 0; i < 2; i++) {
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            alloc_size, 64, &video->inter_view_mv[i]))
+                               IMG_DBG_ASSERT(!"Allocation failed (G)");
+               }
+       }
+
+       /* memory for encoder context */
+       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                            ALIGN_64(MTX_CONTEXT_SIZE), 64, &video->mtx_enc_ctx_mem))
+               IMG_DBG_ASSERT(!"Allocation failed (H)");
+
+       video->no_sequence_headers = video_params->no_sequence_headers;
+       video->auto_encode = video_params->auto_encode;
+       video->slice_level = video_params->slice_level;
+       video->coded_header_per_slice = video_params->coded_header_per_slice;
+
+       /* partially coded headers supplied to HW */
+       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                            MAX_HEADERSIZEBYTES, 64, &video->seq_header_mem))
+               IMG_DBG_ASSERT(!"Allocation failed (I)\n");
+
+       /* partially coded subset sequence parameter headers supplied to HW */
+       if (video->enable_mvc) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    MAX_HEADERSIZEBYTES, 64, &video->subset_seq_header_mem))
+                       IMG_DBG_ASSERT(!"Allocation failed (J)");
+       }
+
+       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                            MAX_BFRAMES * MV_ROW_STRIDE, 64, &video->mv_settings_btable))
+               IMG_DBG_ASSERT(!"Allocation failed (K)");
+
+       if (video->rc_params.hierarchical) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    MAX_BFRAMES * sizeof(struct img_mv_settings), 64, &video->mv_settings_hierarchical))
+                       IMG_DBG_ASSERT(!"Allocation failed (L)");
+       } else {
+               video->mv_settings_hierarchical.cpu_virt = NULL;
+       }
+
+       video->insert_hrd_params=video_params->insert_hrd_params;
+       if (video_params->insert_hrd_params) {
+               alloc_size      = 64;
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    alloc_size, 64, &video->aud_header_mem))
+                       IMG_DBG_ASSERT(!"Allocation failed (M)");
+
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    alloc_size, 64, &video->sei_buffering_period_header_mem))
+                       IMG_DBG_ASSERT(!"Allocation failed (N)");
+
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    alloc_size, 64, &video->sei_picture_timing_header_mem))
+                       IMG_DBG_ASSERT(!"Allocation failed (O)");
+       }
+
+       for (index = 0; index < sizeof(video->pichdr_template_mem) / sizeof(video->pichdr_template_mem[0]); index++) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    MAX_HEADERSIZEBYTES, 64, &video->pichdr_template_mem[index]))
+                       IMG_DBG_ASSERT(!"Allocation failed (P)");
+       }
+
+       for (index=0; index < sizeof(video->slice_params_template_mem) / sizeof(video->slice_params_template_mem[0]); index++) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    ALIGN_64(sizeof(struct slice_params)), 64, &video->slice_params_template_mem[index]))
+                       IMG_DBG_ASSERT(!"Allocation failed (Q)");
+       }
+
+
+       for (index = 0; index < video->slots_in_use; index++) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    ALIGN_64(sizeof(struct mtx_header_params)), 64, &video->ltref_header[index]))
+                       IMG_DBG_ASSERT(!"Allocation failed (R)");
+       }
+
+       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                            ALIGN_64(4), 64, &video->src_phys_addr))
+               IMG_DBG_ASSERT(!"Allocation failed (S)");
+
+       for (index=0; index < video->slots_in_use; index++) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    (1 + MAX_SLICESPERPIC * 2 + 15) & ~15, 64, &video->slice_map[index].mem_info) != IMG_SUCCESS)
+                       IMG_DBG_ASSERT(!"Allocation failed (T)");
+       }
+
+       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                            ALIGN_64(sizeof(uint16) * MAX_GOP_SIZE), 64, &video->flat_gop_struct))
+               IMG_DBG_ASSERT(!"Allocation failed (U)");
+
+       if (video->rc_params.hierarchical) {
+               if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                    ALIGN_64(sizeof(uint16) * MAX_GOP_SIZE), 64, &video->hierar_gop_struct))
+                       IMG_DBG_ASSERT(!"Allocation failed (V)");
+       }
+
+       if (video->custom_scaling) {
+               for (index = 0; index < 2; index++) {
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            ALIGN_64(QUANT_LISTS_SIZE), 64, &video->custom_quant[index]))
+                               IMG_DBG_ASSERT(!"Allocation failed (W)");
+
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            192, 64, &video->custom_quant_regs4x4_sp[index]))
+                               IMG_DBG_ASSERT(!"Allocation failed (X)");
+
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            128 * CUSTOM_QUANT_PARAMSIZE_8x8, 64, &video->custom_quant_regs8x8_sp[index]))
+                               IMG_DBG_ASSERT(!"Allocation failed (Y)");
+
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            128, 64, &video->custom_quant_regs4x4_q[index]))
+                               IMG_DBG_ASSERT(!"Allocation failed (Z)");
+
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            64 * CUSTOM_QUANT_PARAMSIZE_8x8, 64, &video->custom_quant_regs8x8_q[index]))
+                               IMG_DBG_ASSERT(!"Allocation failed (0)");
+               }
+               video->custom_quant_slot = 0;
+       }
+
+       /* Allocate device memory for storing feedback information for all "5" slots */
+       if (video->enable_sel_stats_flags & ESF_FIRST_STAGE_STATS) {
+               for (index = 0; index < video->slots_in_use; index++) {
+                       uint32 row_size = ALIGN_64(width_in_mbs * sizeof(struct img_first_stage_mb_params));
+
+                       /* Allocate memory padding size of each row to to be multiple of 64-bytes */
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            frame_height_in_mbs * row_size, 64, &(video->firstpass_out_param_buf[index].mem_info) ))
+                               IMG_DBG_ASSERT(!"Allocation failed (1)");
+
+                       video->firstpass_out_param_buf[index].lock              = BUFFER_FREE;
+                       video->firstpass_out_param_buf[index].bytes_written     = 0;
+                       video->firstpass_out_param_buf[index].size              = frame_height_in_mbs * row_size;
+               }
+       } else {
+               /* Set buffer pointers to NULL */
+               for (index = 0; index < video->slots_in_use; index++) {
+                       video->firstpass_out_param_buf[index].mem_info.cpu_virt = NULL;
+                       video->firstpass_out_param_buf[index].lock              = BUFFER_FREE;
+                       video->firstpass_out_param_buf[index].bytes_written     = 0;
+                       video->firstpass_out_param_buf[index].size              = 0;
+               }
+       }
+
+       /* Allocate device memory for storing feedback information for all "5" slots */
+       if (video->enable_sel_stats_flags & ESF_MP_BEST_MB_DECISION_STATS ||
+           video->enable_sel_stats_flags & ESF_MP_BEST_MOTION_VECTOR_STATS) {
+               for (index = 0; index < video->slots_in_use; index++) {
+                       uint32 best_multipass_size = frame_height_in_mbs * (((5 * width_in_mbs) + 3) >> 2) * 64; //From TRM (4.5.2)
+
+                       /* Allocate memory padding size of each row to to be multiple of 64-bytes */
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            best_multipass_size, 64, &(video->firstpass_out_best_multipass_param_buf[index].mem_info) ))
+                               IMG_DBG_ASSERT(!"Allocation failed (2)");
+
+                       video->firstpass_out_best_multipass_param_buf[index].lock               = BUFFER_FREE;
+                       video->firstpass_out_best_multipass_param_buf[index].bytes_written      = 0;
+                       video->firstpass_out_best_multipass_param_buf[index].size               = best_multipass_size;
+               }
+       } else {
+               /* Set buffer pointers to NULL */
+               for (index = 0; index < video->slots_in_use; index++) {
+                       video->firstpass_out_best_multipass_param_buf[index].mem_info.cpu_virt  = NULL;
+                       video->firstpass_out_best_multipass_param_buf[index].lock               = BUFFER_FREE;
+                       video->firstpass_out_best_multipass_param_buf[index].bytes_written      = 0;
+                       video->firstpass_out_best_multipass_param_buf[index].size               = 0;
+               }
+       }
+
+       if (video->enable_inp_ctrl) {
+               for (index = 0; index < video->slots_in_use; index++) {
+                       alloc_size =  frame_height_in_mbs *  width_in_mbs * 2;
+
+                       /*
+                        * Allocate memory for worst case slice structure
+                        * i.e. assume number-of-slices == number-of-rows
+                        */
+                       if (mmu_stream_alloc(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, 1, (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                                            alloc_size + 64, 64, &(video->mb_ctrl_in_params_buf[index].mem_info) ))
+                               IMG_DBG_ASSERT(!"Allocation failed (3)");
+
+                       video->mb_ctrl_in_params_buf[index].lock = BUFFER_FREE;
+                       video->mb_ctrl_in_params_buf[index].bytes_written = 0;
+                       video->mb_ctrl_in_params_buf[index].size = alloc_size;
+               }
+       } else {
+               for (index = 0; index < video->slots_in_use; index++) {
+                       video->mb_ctrl_in_params_buf[index].mem_info.cpu_virt   = NULL;
+                       video->mb_ctrl_in_params_buf[index].lock        = BUFFER_FREE;
+                       video->mb_ctrl_in_params_buf[index].bytes_written = 0;
+                       video->mb_ctrl_in_params_buf[index].size        =  0;
+               }
+       }
+
+       for (index = 0; index < video->slots_in_use; index++)
+               video->source_slot_buff[index] = NULL;
+
+       /* Allocate coded package */
+       topaz_get_context_coded_buffer_size(enc, rc_params, &coded_buffer_size);
+
+       video->coded_buffer_max_size = coded_buffer_size;
+
+       for ( i = 0; i < video->coded_package_max_num; i++) {
+               if (topaz_allocate_coded_package(str_ctx, coded_buffer_size, &video->coded_package[i]) != IMG_SUCCESS)
+                       IMG_DBG_ASSERT(!"Coded package Allocation failed\n");
+       }
+
+       video->encode_sent = 0;
+
+       topaz_video_prepare_templates(str_ctx, video_params->f_code, video_params->fine_y_search_size);
+
+       enc->video->max_chunks = video_params->max_chunks;
+       enc->video->chunks_per_mb = video_params->chunks_per_mb;
+       enc->video->priority_chunks = video_params->priority_chunks;
+
+
+       return (topaz_video_create_mtx_context(str_ctx, video_params));
+}
+
+osa_bool topaz_validate_params(struct img_video_params *video_params,
+                              struct img_rc_params *rc_params)
+{
+       osa_bool modified = osa_false;
+       uint32 required_core_des1 = 0;
+       uint32 core_des1 = topazdd_get_core_des1();
+
+       if (video_params) {
+               /* Validate video params */
+               if (video_params->standard == IMG_STANDARD_H264) {
+                       if (video_params->is_interlaced) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED)) == 0) {
+                                       video_params->is_interlaced = osa_false;
+
+                                       if (!video_params->is_interleaved) {
+                                               /* Non-interleaved source. Encode field pictures as frames. */
+                                               video_params->frame_height >>= 1;
+                                               video_params->buffer_height >>= 1;
+                                               video_params->source_frame_height >>= 1;
+                                       } else {
+                                               /* Interleaved source. Unite fields into single picture. */
+                                               video_params->is_interleaved = osa_false;
+                                       }
+
+                                       video_params->bottom_field_first = osa_false;
+                                       modified = osa_true;
+                               } else {
+                                       required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED);
+                               }
+                       }
+
+                       if (video_params->h264_8x8) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED)) == 0) {
+                                       video_params->h264_8x8 = osa_false;
+                                       modified = osa_true;
+                               } else {
+                               required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED);
+                               }
+                       }
+
+                       if (video_params->cabac_enabled) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED)) == 0) {
+                                       video_params->cabac_enabled = osa_false;
+                                       modified = osa_true;
+                               } else {
+                                       required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED);
+                               }
+                       }
+
+                       if (!video_params->enc_features.disable_bframes) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED)) == 0) {
+                                       video_params->enc_features.disable_bframes = osa_false;
+                                       modified = osa_true;
+                               }
+                       }
+
+                       if (video_params->enable_sel_stats_flags) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED)) == 0) {
+                                       video_params->enable_sel_stats_flags = 0;
+                                       modified = osa_true;
+                               } else {
+                                       required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED);
+                               }
+                       }
+
+                       if (video_params->use_default_scaling_list) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED)) == 0) {
+                                       video_params->use_default_scaling_list = osa_false;
+                                       modified = osa_true;
+                               } else {
+                                       required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED);
+                               }
+                       }
+
+                       if (video_params->use_custom_scaling_lists) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED)) == 0) {
+                                       video_params->use_custom_scaling_lists = 0;
+                                       modified = osa_true;
+                               } else {
+                                       required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED);
+                               }
+                       }
+
+                       if ((video_params->weighted_prediction || video_params->vp_weighted_implicit_bi_pred)) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED)) == 0) {
+                                       video_params->weighted_prediction = osa_false;
+                                       video_params->vp_weighted_implicit_bi_pred = 0;
+                                       modified = osa_true;
+                               } else {
+                                       required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED);
+                               }
+                       }
+
+                       if (video_params->multi_reference_p || video_params->enable_mvc) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED)) == 0) {
+                                       video_params->multi_reference_p = osa_false;
+                                       video_params->enable_mvc = osa_false;
+                                       modified = osa_true;
+                               } else {
+                                       required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED);
+                               }
+                       }
+
+                       if (video_params->spatial_direct) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED)) == 0) {
+                                       video_params->spatial_direct = osa_false;
+                                       modified = osa_true;
+                               } else {
+                                       required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED);
+                               }
+                       }
+
+                       if (video_params->enable_lossless) {
+                               if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED)) == 0) {
+                                       video_params->enable_lossless = osa_false;
+                                       modified = osa_true;
+                               } else {
+                                       required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED);
+                               }
+                       }
+
+               }
+
+               if (video_params->enable_scaler) {
+                       if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED)) == 0) {
+                               video_params->enable_scaler = osa_false;
+                               modified = osa_true;
+                       } else {
+                               required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED);
+                       }
+               }
+
+               if (rc_params) {
+                       /* Validate RC params */
+                       if (video_params->standard == IMG_STANDARD_H264) {
+                               if (rc_params->bframes) {
+                                       if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED)) == 0) {
+                                               rc_params->bframes = 0;
+                                               rc_params->hierarchical = osa_false;
+                                               modified = osa_true;
+                                       } else {
+                                               required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED);
+                                       }
+                               }
+
+                               if (rc_params->hierarchical && (rc_params->bframes > 1)) {
+                                       if ((core_des1 & F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED)) == 0) {
+                                               rc_params->hierarchical = osa_false;
+                                               modified = osa_true;
+                                       } else {
+                                               required_core_des1 |= F_ENCODE(1, TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED);
+                                       }
+                               }
+                       }
+               }
+       }
+
+       return modified;
+}
+
+/*
+ * Creat an encoder context
+ */
+int32 topaz_stream_create(void *vxe_ctx, struct img_video_params *video_params, uint8 base_pipe,
+                         uint8 pipes_to_use, struct img_rc_params *rc_params, void **topaz_str_context)
+{
+       struct img_enc_context *enc;
+       struct topaz_stream_context *str_ctx;
+
+       if (!is_topaz_core_initialized)
+               return IMG_ERROR_NOT_INITIALISED;
+
+       str_ctx = osa_zalloc(sizeof(*str_ctx), OSA_GFP_KERNEL);
+       if (!str_ctx)
+               return IMG_ERROR_OUT_OF_MEMORY;
+
+       enc = (struct img_enc_context *)osa_zalloc(sizeof(*enc), OSA_GFP_KERNEL);
+       if (!enc) {
+               osa_free(str_ctx);
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       *topaz_str_context = str_ctx;
+       str_ctx->enc_ctx = enc;
+       str_ctx->core_ctx = global_topaz_core_context;
+       str_ctx->vxe_ctx = vxe_ctx;
+
+       enc->core_rev = topazdd_get_core_rev();
+       enc->sync_first_pass = true;
+
+       enc->requested_base_pipe = enc->base_pipe = base_pipe;
+       enc->requested_pipes_to_use = enc->pipes_to_use = pipes_to_use;
+
+       topaz_validate_params(video_params, rc_params);
+
+       switch (video_params->standard) {
+               case IMG_STANDARD_H264:
+                       if (video_params->enable_mvc) {
+                               switch (rc_params->rc_mode) {
+                                       case IMG_RCMODE_NONE:
+                                               enc->codec = IMG_CODEC_H264MVC_NO_RC;
+                                       break;
+                                       case IMG_RCMODE_CBR:
+                                               enc->codec = IMG_CODEC_H264MVC_CBR;
+                                       break;
+                                       case IMG_RCMODE_VBR:
+                                               enc->codec = IMG_CODEC_H264MVC_VBR;
+                                       break;
+                                       case IMG_RCMODE_ERC:
+                                               enc->codec = IMG_CODEC_H264MVC_ERC;
+                                       break;
+                                       case IMG_RCMODE_VCM:
+                                               IMG_DBG_ASSERT(0 && "VCM mode is not supported for MVC");
+                                       break;
+                               }
+                       } else {
+                               switch (rc_params->rc_mode) {
+                                       case IMG_RCMODE_NONE:
+                                               enc->codec = IMG_CODEC_H264_NO_RC;
+                                               break;
+                                       case IMG_RCMODE_CBR:
+                                               enc->codec = IMG_CODEC_H264_CBR;
+                                               break;
+                                       case IMG_RCMODE_VBR:
+                                               enc->codec = IMG_CODEC_H264_VBR;
+                                               break;
+                                       case IMG_RCMODE_VCM:
+                                               enc->codec = IMG_CODEC_H264_VCM;
+                                       break;
+                                       case IMG_RCMODE_ERC:
+                                               enc->codec = IMG_CODEC_H264_ERC;
+                                       break;
+                               }
+                       }
+               break;
+               default:
+                       IMG_DBG_ASSERT(0 && "Only H264 encode is supported");
+       }
+
+       /* initialise video context structure */
+       return (topaz_video_create_context(str_ctx, video_params, rc_params));
+}
+
+/*
+ * Sends a command to the specified core.
+ * The function returns a writeback value.  This is a unique value that will be
+ * written back by the target core after it completes its command.
+ */
+uint32 topaz_insert_command(struct img_enc_context *enc_ctx,
+                           enum mtx_cmd_id cmd_id, uint32 data)
+{
+       uint32 writeback_val;
+
+       if (enc_ctx->debug_settings && (enc_ctx->debug_settings->serialized_communication_mode == VXE_SERIALIZED_MODE_SERIAL))
+               /* in serial mode do not use the priority bit */
+               cmd_id &= ~MTX_CMDID_PRIORITY;
+
+       topazdd_send_msg(enc_ctx->video->dd_str_ctx, cmd_id, data, NULL, &writeback_val);
+
+       return writeback_val;
+}
+
+/*
+ * Sends a command to the specified core.
+ */
+uint32 topaz_insert_command_with_sync(struct img_enc_context *enc_ctx,
+                                     enum mtx_cmd_id cmd_id, uint32 data)
+{
+       int32 ret;
+
+       if (enc_ctx->debug_settings && (enc_ctx->debug_settings->serialized_communication_mode == VXE_SERIALIZED_MODE_SERIAL))
+               /* in serial mode do not use the priority bit */
+               cmd_id &= ~MTX_CMDID_PRIORITY;
+
+       ret = topazdd_send_msg_with_sync(enc_ctx->video->dd_str_ctx, cmd_id, data, NULL);
+
+       return ret;
+}
+
+/*
+ * Sends a command to the specified core.
+ * The data specified in psCommandData will be read via DMA by the MTX,
+ * so this memory must remain in scope for the duration of the execution
+ * of the command.
+ * The function returns a writeback value.  This is a unique value that will be
+ * written back by the target core after it completes its command.
+ */
+uint32 topaz_insert_mem_command(struct img_enc_context *enc_ctx,
+                               enum mtx_cmd_id cmd_id,
+                               uint32 data,
+                               struct vidio_ddbufinfo *command_data)
+{
+       uint32 writeback_val;
+
+       /* Priority bit is not supported for MEM commands */
+       cmd_id &= ~MTX_CMDID_PRIORITY;
+
+       topazdd_send_msg(enc_ctx->video->dd_str_ctx, cmd_id, data, command_data, &writeback_val);
+
+       return writeback_val;
+}
+
+/*
+ * Sends a command to the specified core.
+ * The data specified in psCommandData will be read via DMA by the MTX,
+ * so this memory must remain in scope for the duration of the execution
+ * of the command.
+ */
+uint32 topaz_insert_mem_command_with_sync(struct img_enc_context *enc_ctx,
+                                         enum mtx_cmd_id cmd_id,
+                                         uint32 data,
+                                         struct vidio_ddbufinfo *command_data)
+{
+       int32 ret;
+
+       /* Priority bit is not supported for MEM commands */
+       cmd_id &= ~MTX_CMDID_PRIORITY;
+
+       ret = topazdd_send_msg_with_sync(enc_ctx->video->dd_str_ctx, cmd_id,
+                                        data, command_data);
+       return ret;
+}
+
+/*
+ * Send the Access Unit Delimiter to the stream
+ */
+static int32 topaz_send_aud_header(struct img_enc_context *enc)
+{
+       if (enc->video->aborted)
+               return IMG_ERROR_UNDEFINED;
+
+       /* must use unique writeback word */
+       topaz_insert_mem_command(enc, MTX_CMDID_DO_HEADER, 0,
+                                enc->video->aud_header_mem.cpu_virt);
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Transmit the picture headerts to MTX
+ */
+static int32 topaz_send_picture_headers(struct img_enc_context *enc)
+{
+       /* send Seqence headers only for IDR (I-frames) and only once in the beginning */
+       struct img_video_context * video = enc->video;
+
+       /* SEI_INSERTION */
+       if (video->insert_hrd_params) {
+               /* Access unit delimiter */
+               if ((!video->enable_mvc) || (video->enable_mvc && (video->mvc_view_idx == 0)))
+                       /* in case of MVC, both views are a single access unit. delimiter should be inserted by view 0 only. */
+                       topaz_send_aud_header(enc);
+       }
+
+       if (video->insert_seq_header && !video->no_sequence_headers) {
+               switch (video->standard) {
+                       case IMG_STANDARD_H264:
+                               IMG_DBG_ASSERT(osa_true && "SPS and PPS will be send from firmware.");
+                       break;
+                       default:
+                               IMG_DBG_ASSERT(osa_false && "only H264 encode is supported.");
+                       break;
+               }
+       }
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Encode a frame
+ */
+int32 topaz_encode_frame(void *topaz_str_ctx)
+{
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       struct topaz_stream_context *str_ctx;
+       /* If line counter is enabled, we add one more bit in the command data to inform the firmware context whether it should proceed */
+       uint32 encode_cmd_data;
+
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       if (video->aborted)
+               return IMG_ERROR_UNEXPECTED_STATE;
+
+       video->insert_seq_header = (video->encode_sent == 0);
+
+       topaz_send_picture_headers(enc);
+
+       encode_cmd_data = F_ENCODE(1, MTX_MSG_ENCODE_CODED_INTERRUPT);
+
+       if (video->line_counter)
+               /* Set bit 20 to 1 to inform FW that we are using the line counter feature */
+               encode_cmd_data |= F_ENCODE(1, MTX_MSG_ENCODE_USE_LINE_COUNTER);
+
+       topaz_insert_command_with_sync(enc, MTX_CMDID_ENCODE_FRAME | MTX_CMDID_WB_INTERRUPT,
+                                      encode_cmd_data);
+
+       video->encode_pic_processing++;
+       video->encode_sent++;
+
+       return IMG_SUCCESS;
+}
+
+int32 topaz_get_pipe_usage(uint8 pipe, uint8 *ctx_id)
+{
+       IMG_DBG_ASSERT(pipe < TOPAZHP_MAX_NUM_PIPES);
+
+       if (pipe >= TOPAZHP_MAX_NUM_PIPES)
+               return 0;
+
+       return global_pipe_usage[pipe];
+}
+
+void topaz_set_pipe_usage(uint8 pipe, uint8 val)
+{
+       IMG_DBG_ASSERT(pipe < TOPAZHP_MAX_NUM_PIPES);
+
+       if (pipe < TOPAZHP_MAX_NUM_PIPES)
+               global_pipe_usage[pipe] = val;
+
+       return;
+}
+
+/*
+ * Set the mtx context to the one implicit in the encoder context
+ */
+static int32 topaz_video_setup_mtx_context(struct img_enc_context *enc)
+{
+       struct img_video_context *video_context;
+       uint8 index;
+
+       video_context = enc->video;
+
+       for (index=0; index < enc->pipes_to_use; index++)
+               topaz_set_pipe_usage(enc->base_pipe + index, enc->ctx_num);
+
+       if (topaz_insert_mem_command_with_sync(enc, MTX_CMDID_SETVIDEO | MTX_CMDID_WB_INTERRUPT,
+                                              enc->base_pipe, &video_context->mtx_enc_ctx_mem)) {
+               OSA_PR_ERR("topaz mtx context setup command failed\n");
+               return IMG_ERROR_UNDEFINED;
+       }
+
+       video_context->aborted = osa_false;
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Load the encoder and MTX context
+ */
+int32 topaz_load_context(void *topaz_str_ctx)
+{
+       struct topaz_stream_context *str_ctx;
+       struct img_enc_context *enc;
+       osa_bool serialized_comm;
+
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+       enc = str_ctx->enc_ctx;
+
+       serialized_comm = enc->debug_settings && (enc->debug_settings->serialized_communication_mode == VXE_SERIALIZED_MODE_SYNCED);
+
+       enc->video->vid_ctx_num = 0;
+
+       enc->ctx_num++;
+
+       return (topaz_video_setup_mtx_context(enc));
+}
+
+/*
+ * Store the encoder and MTX context
+ */
+int32 topaz_store_context(void *topaz_str_ctx)
+{
+       struct img_enc_context *enc;
+       struct topaz_stream_context *str_ctx;
+
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+       enc = str_ctx->enc_ctx;
+
+       /* Update Globals */
+       if ((enc->codec != IMG_CODEC_NONE) && (enc->codec != IMG_CODEC_JPEG)) {
+               struct img_video_context *video_context;
+               video_context = enc->video;
+
+               if (!topaz_insert_mem_command_with_sync(enc, MTX_CMDID_GETVIDEO | MTX_CMDID_WB_INTERRUPT,
+                                                       enc->base_pipe, &video_context->mtx_enc_ctx_mem)) {
+                       OSA_PR_ERR("MTX message for GETVIDEO failed\n");
+                       return IMG_ERROR_UNDEFINED;
+               }
+       }
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Flush video stream
+ */
+int32 topaz_flush_stream(void *topaz_str_ctx, uint32 frame_cnt)
+{
+       struct topaz_stream_context *str_ctx;
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       int32 index;
+
+       if ( !topaz_str_ctx )
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       if (enc->video->aborted)
+               return IMG_ERROR_UNDEFINED;
+
+       /* flush the internal queues */
+       /* Check source slots */
+       for (index = 0; index < enc->video->slots_in_use; index++) {
+               if (enc->video->source_slot_buff[index] != NULL) {
+                       /* Found a valid src_frame, so signal callback for the same. */
+                       global_topaz_core_context->vxe_str_processed_cb(str_ctx->vxe_ctx, VXE_CB_SRC_FRAME_RELEASE,
+                                                                       (void *)(enc->video->source_slot_buff[index]),
+                                                                       0, 0);
+                       enc->video->source_slot_buff[index] = NULL;
+               }
+       }
+
+       /* Check coded package slots */
+       for (index = 0; index < enc->video->coded_package_max_num; index++) {
+               if (enc->video->coded_package[index]->busy) {
+                       /* Found a valid coded package, so, signal callback for the same */
+                       global_topaz_core_context->vxe_str_processed_cb(str_ctx->vxe_ctx, VXE_CB_CODED_BUFF_READY,
+                                                                       (void *)(enc->video->coded_package[index]->coded_buffer[0]),
+                                                                       0, 0);
+                       enc->video->coded_package[index]->busy = osa_false;
+               }
+       }
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Destroy the Video Encoder context
+ */
+static int32 topaz_video_destroy_context(struct topaz_stream_context *str_ctx)
+{
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       int32 i;
+       uint32  max_cores;
+
+       max_cores = topazdd_get_num_pipes(str_ctx->core_ctx->dev_handle);
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       for (i = 0; i < enc->pipes_to_use; i++)
+               if (topaz_get_pipe_usage(enc->base_pipe + i, NULL) == enc->ctx_num)
+                       topaz_set_pipe_usage(enc->base_pipe + i, 0);
+
+       if ((video->standard == IMG_STANDARD_H264) && video->weighted_prediction) {
+               for (i = 0; i < video->slots_in_use; i++) {
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &video->weighted_prediction_mem[i]))
+                               IMG_DBG_ASSERT(!"Free failed");
+               }
+       }
+
+       for (i = 0; i < video->coded_package_max_num; i++) {
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->coded_package[i]->mtx_info.code_package_fw_buffer->mem_info))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->coded_package[i]->header_buffer->mem_info))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+               osa_free(video->coded_package[i]);
+               video->coded_package[i] = NULL;
+       }
+
+       if (mmu_stream_free(str_ctx->mmu_ctx, &video->flat_gop_struct))
+               IMG_DBG_ASSERT(!"Free failed");
+
+       if (video->rc_params.hierarchical)
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->hierar_gop_struct))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+       for (i = 0; i < video->slots_in_use; i++) {
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->slice_map[i].mem_info))
+                       IMG_DBG_ASSERT(!"slice map free failed");
+       }
+
+       for (i = 0; i < (int32)max_cores; i++)
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->above_params[i]))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+       for (i = 0; i < video->pic_nodes; i++)
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->colocated[i]))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+       for (i = 0; i < video->pic_nodes; i++)
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->recon_pictures[i]))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+       for (i = 0; i < video->mv_stores; i++)
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->mv[i]))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+       if (video->enable_mvc) {
+               for (i = 0; i < 2; i++) {
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &video->inter_view_mv[i]))
+                               IMG_DBG_ASSERT(!"Free failed");
+               }
+       }
+
+       if (mmu_stream_free(str_ctx->mmu_ctx, &video->mtx_enc_ctx_mem))
+               IMG_DBG_ASSERT(!"Free failed");
+
+       if (mmu_stream_free(str_ctx->mmu_ctx, &video->mv_settings_btable))
+               IMG_DBG_ASSERT(!"Free failed");
+
+       if (video->mv_settings_hierarchical.cpu_virt)
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->mv_settings_hierarchical))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+       /* partially coded headers supplied to HW */
+       /* SEI_INSERTION */
+       if (video->insert_hrd_params) {
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->aud_header_mem))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->sei_buffering_period_header_mem))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->sei_picture_timing_header_mem))
+                       IMG_DBG_ASSERT(!"Free failed");
+       }
+
+       if (mmu_stream_free(str_ctx->mmu_ctx, &video->seq_header_mem))
+               IMG_DBG_ASSERT(!"Free failed");
+
+       /* FREE subset sequence parameter header */
+       if (video->enable_mvc)
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->subset_seq_header_mem))
+                       IMG_DBG_ASSERT(!"Free failed");
+
+       for (i = 0; i < sizeof(video->pichdr_template_mem) / sizeof(video->pichdr_template_mem[0]); i++) {
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->pichdr_template_mem[i]))
+                       IMG_DBG_ASSERT(!"Free failed");
+       }
+
+       for (i = 0; i < sizeof(video->slice_params_template_mem) / sizeof(video->slice_params_template_mem[0]); i++) {
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->slice_params_template_mem[i]))
+                       IMG_DBG_ASSERT(!"Free failed");
+       }
+
+       if (mmu_stream_free(str_ctx->mmu_ctx, &video->src_phys_addr))
+               IMG_DBG_ASSERT(!"Free failed");
+
+       /* de-allocate memory corresponding to the output parameters */
+       for (i = 0; i < video->slots_in_use; i++) {
+               if (video->firstpass_out_param_buf[i].mem_info.cpu_virt != NULL)
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &(video->firstpass_out_param_buf[i].mem_info)))
+                               IMG_DBG_ASSERT(!"Free failed");
+
+               if (video->mb_ctrl_in_params_buf[i].mem_info.cpu_virt != NULL)
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &(video->mb_ctrl_in_params_buf[i].mem_info)))
+                               IMG_DBG_ASSERT(!"Free failed");
+       }
+
+       /* de-allocate memory corresponding to the selectable best MV parameters */
+       for (i = 0; i < video->slots_in_use; i++) {
+               if (video->firstpass_out_best_multipass_param_buf[i].mem_info.cpu_virt != NULL)
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &(video->firstpass_out_best_multipass_param_buf[i].mem_info)))
+                               IMG_DBG_ASSERT(!"Free failed");
+       }
+
+       for (i = 0; i < video->slots_in_use; i++) {
+               if (mmu_stream_free(str_ctx->mmu_ctx, &video->ltref_header[i]))
+                       IMG_DBG_ASSERT(!"Free failed");
+       }
+
+       if (video->custom_scaling) {
+               for (i = 0; i < 2; i++) {
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &video->custom_quant[i]))
+                               IMG_DBG_ASSERT(!"Free failed");
+
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &video->custom_quant_regs4x4_sp[i]))
+                               IMG_DBG_ASSERT(!"Free failed");
+
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &video->custom_quant_regs8x8_sp[i]))
+                               IMG_DBG_ASSERT(!"Free failed");
+
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &video->custom_quant_regs4x4_q[i]))
+                               IMG_DBG_ASSERT(!"Free failed");
+
+                       if (mmu_stream_free(str_ctx->mmu_ctx, &video->custom_quant_regs8x8_q[i]))
+                               IMG_DBG_ASSERT(!"Free failed");
+               }
+       }
+
+       topazdd_destroy_stream_ctx(video->dd_str_ctx);
+
+       mmu_stream_destroy(&global_topaz_core_context->dev_handle->topaz_mmu_ctx, str_ctx->mmu_ctx);
+
+       /* free the video encoder structure itself */
+       osa_free(video);
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Destroy an Encoder Context
+ */
+int32 topaz_stream_destroy(void *str_context)
+{
+       struct img_enc_context *enc;
+       struct topaz_stream_context *str_ctx;
+       int32 ret;
+
+       str_ctx = (struct topaz_stream_context *)str_context;
+       if (!str_ctx)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       enc = str_ctx->enc_ctx;
+
+       ret = topaz_video_destroy_context(str_ctx);
+
+       if (enc->debug_settings) {
+               osa_free(enc->debug_settings);
+               enc->debug_settings = NULL;
+       }
+
+       osa_free(enc);
+       osa_free(str_context);
+
+       return ret;
+}
+
+/*
+ * Get the capabilities of the encoder for the given codec
+ */
+int32 topaz_get_encoder_caps(enum img_standard standard,
+                            uint16 width, uint16 height, struct img_enc_caps *caps)
+{
+       uint32 width_in_mbs,height_in_mbs, kick_size, kicks_per_bu, min_slice_height, mbs;
+
+       /* get the actual number of cores */
+       caps->num_cores = topazdd_get_num_pipes(global_topaz_core_context->dev_handle);
+
+       if (caps->num_cores < 3)
+               caps->max_bu_per_frame = TOPAZHP_MAX_BU_SUPPORT_HD;
+       else
+               caps->max_bu_per_frame = TOPAZHP_MAX_BU_SUPPORT_4K;
+
+       caps->core_features = topazdd_get_core_des1();
+       caps->core_revision = topazdd_get_core_rev();
+
+       width_in_mbs = (width + 15) / 16;
+       height_in_mbs = (height + 15) / 16;
+
+       switch (standard) {
+               case IMG_STANDARD_H264:
+                       /* Assume progressive video for now as we don't know either way */
+                       calculate_kick_and_bu_size(width_in_mbs, height_in_mbs, osa_false, caps->max_bu_per_frame, &kick_size, &kicks_per_bu, &min_slice_height);
+                       caps->max_slices = height_in_mbs / min_slice_height;
+
+                       /*
+                        * Limit for number of MBs in slices is 32K-2 = 32766
+                        * Here we will limit it to 16K per slice = 16384
+                        */
+                       caps->min_slices = 1;
+                       mbs = width_in_mbs * height_in_mbs;
+                       if (mbs >= 32768)
+                               caps->min_slices = 3;
+                       else if (mbs >= 16384)
+                               caps->min_slices = 2;
+
+                       /* if height is bigger or equal to 4000, use at least two slices */
+                       if (height_in_mbs >= 250 && (caps->min_slices == 1))
+                               caps->min_slices = 2;
+
+                       caps->recommended_slices = MIN(caps->num_cores, caps->max_slices);
+                       caps->min_slice_height = min_slice_height;
+
+                       caps->max_height = 2048;
+                       caps->max_width = 2048;
+                       caps->min_height = 48;
+                       caps->min_width = 144;
+                       caps->max_mb_num = (2048*2048) >> 8;
+               break;
+               default:
+                       IMG_DBG_ASSERT(osa_false && "Only H264 encoder is supported");
+       }
+
+       if (caps->recommended_slices < caps->min_slices)
+               caps->recommended_slices = caps->min_slices;
+       if (caps->recommended_slices > caps->max_slices)
+               caps->recommended_slices = caps->max_slices;
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Supply a source frame to the encode process
+ */
+int32 topaz_send_source_frame(void *topaz_str_ctx, struct img_frame *src_frame,
+                             uint32 frame_num, uint64 ctx)
+{
+       struct topaz_stream_context *str_ctx;
+       struct img_source_buffer_params *buffer_params;
+
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       uint8 slot_number;
+       void *data;
+       uint32 y_plane_base = 0;
+       uint32 u_plane_base = 0;
+       uint32 v_plane_base = 0;
+       struct vidio_ddbufinfo *cmd_data_mem_info = NULL;
+       uint8 *slice_map_addr = NULL;
+
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       /* if source slot is NULL then it's just a next portion of slices */
+       if (!src_frame)
+               return IMG_ERROR_UNEXPECTED_STATE;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       if (video->aborted)
+               return IMG_ERROR_UNEXPECTED_STATE;
+
+       slot_number = video->source_slot_reserved;
+
+       /* mark the appropriate slot as filled */
+       video->source_slot_buff[slot_number] = src_frame;
+       video->source_slot_poc[slot_number] = frame_num;
+
+       topaz_get_cmd_data_buffer(&cmd_data_mem_info);
+
+       if (!cmd_data_mem_info)
+               return IMG_ERROR_UNEXPECTED_STATE;
+
+       data = cmd_data_mem_info->cpu_virt;
+       buffer_params = (struct img_source_buffer_params *)data;
+
+       /* Prepare data */
+       if (src_frame->y_plane_buffer != NULL) {
+               populate_firmware_message(&(video->src_phys_addr), 0,
+                                         &(src_frame->y_plane_buffer->mem_info), 0);
+
+               data = video->src_phys_addr.cpu_virt;
+               y_plane_base = *((uint32 *)data);
+       }
+
+       if (src_frame->u_plane_buffer != NULL) {
+               populate_firmware_message(&(video->src_phys_addr), 0,
+                                        &(src_frame->u_plane_buffer->mem_info), 0);
+
+               data = video->src_phys_addr.cpu_virt;
+               u_plane_base = *((uint32 *)data);
+       } else {
+               u_plane_base = y_plane_base;
+       }
+
+       if (src_frame->v_plane_buffer != NULL) {
+               populate_firmware_message(&(video->src_phys_addr), 0,
+                                         &(src_frame->v_plane_buffer->mem_info), 0);
+
+               data = video->src_phys_addr.cpu_virt;
+               v_plane_base = *((uint32 *)data);
+       } else {
+               v_plane_base = u_plane_base;
+       }
+
+       buffer_params->slot_num = slot_number;
+       buffer_params->display_order_num = (uint8) (frame_num & 0xFF);
+       buffer_params->host_context = ctx;
+
+       buffer_params->phys_addr_y_plane_field_0 = y_plane_base + src_frame->y_component_offset + src_frame->field0_y_offset;
+       buffer_params->phys_addr_u_plane_field_0 = u_plane_base + src_frame->u_component_offset + src_frame->field0_u_offset;
+       buffer_params->phys_addr_v_plane_field_0 = v_plane_base + src_frame->v_component_offset + src_frame->field0_v_offset;
+
+       buffer_params->phys_addr_y_plane_field_1 = y_plane_base + src_frame->y_component_offset + src_frame->field1_y_offset;
+       buffer_params->phys_addr_u_plane_field_1 = u_plane_base + src_frame->u_component_offset + src_frame->field1_u_offset;
+       buffer_params->phys_addr_v_plane_field_1 = v_plane_base + src_frame->v_component_offset + src_frame->field1_v_offset;
+
+       update_device_mem(str_ctx->vxe_ctx, cmd_data_mem_info);
+
+       /* update slicemap */
+       topaz_get_buffer(str_ctx, &video->slice_map[slot_number], (void **)&slice_map_addr, osa_false);
+       *slice_map_addr = video->slices_per_picture; /* only 1 slice per picture */
+       slice_map_addr++;
+       *slice_map_addr = 0;  /* only 1 slice per picture, marking slice number as 0 */
+       slice_map_addr++;
+       /* round up for case where the last BU is smaller */
+       *slice_map_addr = ((video->picture_height / 16) * (video->width / 16) + video->rc_params.bu_size-1) / video->rc_params.bu_size;
+
+       topaz_release_buffer(str_ctx, &video->slice_map[slot_number], osa_true);
+
+       OSA_PR_INFO("\n\nAPI - IMG_V_SendSourceFrame - Sending a source slot %i to FW\n\n", slot_number);
+
+       /* Send command */
+       topaz_insert_mem_command(enc, MTX_CMDID_PROVIDE_SOURCE_BUFFER, 0, cmd_data_mem_info);
+
+       video->encode_requested++;
+
+       return  IMG_SUCCESS;
+}
+
+/*
+ * Supply a header buffer and an optional number of coded data buffers as part of a package
+ */
+int32 topaz_send_coded_package(void *topaz_str_ctx, struct img_coded_buffer *coded_buffer)
+{
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       struct topaz_stream_context *str_ctx;
+       uint8 coded_buffer_idx;
+       uint32 *address = NULL;
+       struct coded_package_dma_info *this_coded_header_node;
+
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+       if (!coded_buffer)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       if (video->aborted)
+               return IMG_ERROR_UNEXPECTED_STATE;
+
+       video->coded_package[video->coded_package_slot_reserved]->coded_buffer[0] = coded_buffer;
+
+       OSA_PR_INFO("\n\nEncode Context [%i] sending coded package [%i]\n", enc->ctx_num, video->coded_package_slot_reserved);
+
+       /* Get the FW buffer */
+       topaz_get_buffer(str_ctx, video->coded_package[video->coded_package_slot_reserved]->mtx_info.code_package_fw_buffer,
+                        (void **)&address, osa_false);
+
+       this_coded_header_node = video->coded_package[video->coded_package_slot_reserved]->mtx_info.coded_package_fw =
+                                                                                       (struct coded_package_dma_info *)address;
+
+       this_coded_header_node->coded_buffer_info = F_ENCODE(video->coded_package[video->coded_package_slot_reserved]->num_coded_buffers,                                                                    MTX_MSG_NUM_CODED_BUFFERS_PER_HEADER);
+
+       /* Inverted function: From host to MTX */
+       populate_firmware_message(&(video->coded_package[video->coded_package_slot_reserved]->mtx_info.code_package_fw_buffer->mem_info),
+                                 (uint8*) &this_coded_header_node->coded_header_addr - (uint8*)this_coded_header_node,
+                                 (struct vidio_ddbufinfo *)(&(video->coded_package[video->coded_package_slot_reserved]->header_buffer->mem_info)), 0);
+
+       /* Normal mode - An array of consecutive memory addresses */
+       for (coded_buffer_idx = 0; coded_buffer_idx < video->coded_package[video->coded_package_slot_reserved]->num_coded_buffers;
+            coded_buffer_idx++) {
+               if (video->coded_package[video->coded_package_slot_reserved]->coded_buffer[coded_buffer_idx]) {
+                       /* Write coded buffer memory address into the structure (host to MTX) */
+                       populate_firmware_message(&(video->coded_package[video->coded_package_slot_reserved]->mtx_info.code_package_fw_buffer->mem_info),
+                                                 (uint8*) &this_coded_header_node->coded_mem_addr[coded_buffer_idx] - (uint8*) this_coded_header_node,
+                                                 (struct vidio_ddbufinfo *)(&(video->coded_package[video->coded_package_slot_reserved]->coded_buffer[coded_buffer_idx]->mem_info)),
+                                                 0);
+               } else {
+                       this_coded_header_node->coded_mem_addr[coded_buffer_idx] = 0;
+                       break;
+               }
+       }
+
+       /* Release the FW buffer */
+       topaz_release_buffer(str_ctx, video->coded_package[video->coded_package_slot_reserved]->mtx_info.code_package_fw_buffer, osa_true);
+
+       /* Send header buffers to the MTX */
+       topaz_insert_mem_command(enc, MTX_CMDID_PROVIDE_CODEDPACKAGE_BUFFER | MTX_CMDID_WB_INTERRUPT,
+                                F_ENCODE(video->coded_package[video->coded_package_slot_reserved]->coded_buffer[0]->size >> 10, MTX_MSG_PROVIDE_CODED_BUFFER_SIZE) |
+                                F_ENCODE(video->coded_package_slot_reserved, MTX_MSG_PROVIDE_CODEDPACKAGE_BUFFER_SLOT),
+                                &(video->coded_package[video->coded_package_slot_reserved]->mtx_info.code_package_fw_buffer->mem_info));
+
+       return IMG_SUCCESS;
+}
+
+uint32 topaz_get_coded_buffer_max_size(void *topaz_str_ctx, enum img_standard standard,
+                                      uint16 width, uint16 height, struct img_rc_params *rc_params)
+{
+       /* TODO: Determine if we want to make this api str_ctx dependent
+       struct topaz_stream_context *str_ctx;
+       if (!topaz_str_ctx)
+       return IMG_ERROR_INVALID_CONTEXT;
+       */
+       /* Worst-case coded buffer size: All MBs maximum size, and a coded buffer header for each row */
+       return topaz_get_max_coded_data_size(standard, width, height, rc_params->initial_qp_i) +
+                                            ((height >> 4) * CODED_BUFFER_INFO_SECTION_SIZE);
+}
+
+uint32 topaz_get_coded_package_max_num(void *topaz_str_ctx, enum img_standard standard,
+                                      uint16 width, uint16 height, struct img_rc_params *rc_params)
+{
+       struct topaz_stream_context *str_ctx;
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+
+       return (str_ctx->enc_ctx->video->coded_package_max_num);
+}
+
+/*
+ * Get a source slot to fill
+ */
+int32 topaz_reserve_source_slot(void *topaz_str_ctx, uint8 *src_slot_num)
+{
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       struct topaz_stream_context *str_ctx;
+       int8    index;
+
+       if (!topaz_str_ctx )
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       if (video->aborted)
+               return IMG_ERROR_UNEXPECTED_STATE;
+
+       for (index = 0; index < video->slots_in_use; index++) {
+               if (video->source_slot_buff[index] == NULL) {
+                       /* Found an empty slot, Mark the slot as reserved */
+                       video->source_slot_reserved = index;
+                       *src_slot_num = index;
+                       return IMG_SUCCESS;
+               }
+       }
+
+       return IMG_ERROR_UNEXPECTED_STATE;
+}
+
+/*
+ * Get a coded slot to fill
+ */
+int32 topaz_reserve_coded_package_slot(void *topaz_str_ctx)
+{
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       struct topaz_stream_context *str_ctx;
+       int8    index;
+
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       if (video->aborted)
+               return IMG_ERROR_UNEXPECTED_STATE;
+
+       for (index = 0; index < video->coded_package_max_num; index++) {
+               if (!video->coded_package[index]->busy) {
+                       /* Found an empty slot, Mark the slot as reserved */
+                       video->coded_package_slot_reserved = index;
+                       video->coded_package[index]->busy = osa_true;
+                       return IMG_SUCCESS;
+               }
+       }
+
+       return IMG_ERROR_UNEXPECTED_STATE;
+}
+
+/*
+ * Returns number of empty source slots
+ */
+int8 topaz_query_empty_source_slots(void *topaz_str_ctx)
+{
+       struct topaz_stream_context *str_ctx;
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+
+       uint8 slot_number;
+       uint8 empty_source_slots = 0;
+
+       if (!topaz_str_ctx) {
+               OSA_PR_ERR("ERROR: Invalid context handle provides to IMG_V_QueryEmptySourceSlots\n");
+               return IMG_ERROR_INVALID_CONTEXT;
+       }
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+       enc = str_ctx->enc_ctx;
+       video = enc->video;
+
+       if (video->aborted)
+               return -2;
+
+       for (slot_number = 0; slot_number < video->slots_in_use; slot_number++) {
+               if (!video->source_slot_buff[slot_number])
+                       empty_source_slots++;
+       }
+
+       return empty_source_slots;
+}
+
+/*
+ * Returns number of empty coded buffer slots
+ */
+int8 topaz_query_empty_coded_slots(void *topaz_str_ctx)
+{
+       struct topaz_stream_context *str_ctx;
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+
+       uint8 slot_number;
+       uint8 empty_coded_slots = 0;
+
+       if (!topaz_str_ctx) {
+               OSA_PR_ERR("ERROR: Invalid context handle provides to IMG_V_QueryEmptyCodedSlots\n");
+               return IMG_ERROR_INVALID_CONTEXT;
+       }
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+       enc = str_ctx->enc_ctx;;
+       video = enc->video;
+
+       if (video->aborted)
+               return -2;
+
+       for (slot_number = 0; slot_number < video->coded_package_max_num; slot_number++) {
+               if (!video->coded_package[slot_number]->busy)
+                       empty_coded_slots++;
+       }
+
+       return empty_coded_slots;
+}
+
+/*
+ * topaz_stream_map_buf_sg
+ */
+int32 topaz_stream_map_buf_sg(void *topaz_str_ctx, enum venc_buf_type buf_type,
+                          struct vidio_ddbufinfo *buf_info, void *sgt)
+{
+       int32 ret;
+       struct topaz_stream_context *str_ctx;
+
+       /*
+        * Resource stream ID cannot be zero. If zero just warning and
+        * proceeding further will break the code. Return IMG_ERROR_INVALID_ID.
+        */
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       IMG_DBG_ASSERT(buf_type < VENC_BUFTYPE_MAX);
+       IMG_DBG_ASSERT(buf_info);
+       IMG_DBG_ASSERT(sgt);
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+
+       /* Map heap from VENC to MMU. Currently only one heap is used for all buffer types */
+       switch (buf_type) {
+               case VENC_BUFTYPE_BITSTREAM:
+               case VENC_BUFTYPE_PICTURE:
+                       /* TODO: add logic to cache these buffers into str context list */
+               break;
+
+               default:
+                       IMG_DBG_ASSERT(osa_false);
+       }
+
+       /* Map this buffer into the MMU. */
+       ret = mmu_stream_map_ext_sg(str_ctx->mmu_ctx, MMU_GENERAL_HEAP_ID, sgt, buf_info->buf_size,
+                                   64, 0, buf_info->cpu_virt, buf_info, &buf_info->buff_id);
+       IMG_DBG_ASSERT(ret == IMG_SUCCESS);
+       if (ret != IMG_SUCCESS)
+               return IMG_ERROR_OUT_OF_MEMORY;
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * core_stream_unmap_buf_sg
+ */
+int32 topaz_stream_unmap_buf_sg(void *topaz_str_ctx, struct vidio_ddbufinfo *buf_info)
+{
+       int32 ret;
+       struct topaz_stream_context *str_ctx;
+
+       if (!topaz_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+
+       /* Unmap this buffer from the MMU. */
+       ret = mmu_stream_free_sg(str_ctx->mmu_ctx, buf_info);
+
+       IMG_DBG_ASSERT(ret == IMG_SUCCESS);
+       if (ret != IMG_SUCCESS)
+               return ret;
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * End Of Video stream
+ */
+int32 topaz_end_of_stream(void *topaz_str_ctx, uint32 frame_cnt)
+{
+       struct topaz_stream_context *str_ctx;
+       struct img_enc_context *enc;
+
+       if ( !topaz_str_ctx )
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       str_ctx = (struct topaz_stream_context *)topaz_str_ctx;
+       enc = str_ctx->enc_ctx;
+
+       if (enc->video->aborted)
+               return IMG_ERROR_UNDEFINED;
+
+       enc->video->frame_count = frame_cnt;
+
+       if (frame_cnt - enc->video->flushed_at_frame < enc->video->slots_in_use)
+               enc->video->slots_required = frame_cnt - enc->video->flushed_at_frame;
+
+       /* Send PicMgmt Command */
+       topaz_insert_command(enc, MTX_CMDID_PICMGMT | MTX_CMDID_PRIORITY,
+                            F_ENCODE(IMG_PICMGMT_EOS, MTX_MSG_PICMGMT_SUBTYPE) |
+                            F_ENCODE(frame_cnt, MTX_MSG_PICMGMT_DATA));
+
+       return IMG_SUCCESS;
+}
diff --git a/driver/encoder/topaz_api.h b/driver/encoder/topaz_api.h
new file mode 100644 (file)
index 0000000..2226c84
--- /dev/null
@@ -0,0 +1,881 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Encoder core interface header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __TOPAZ_API_H__
+#define __TOPAZ_API_H__
+
+#include "fw_headers/topazscfwif.h"
+#include "fw_headers/vxe_common.h"
+#include "osal/inc/osa_define.h"
+#include "osal/inc/osa_types.h"
+#include "vid_buf.h"
+
+#define MAX_MVC_VIEWS       2
+#define MVC_BASE_VIEW_IDX   0
+#define NON_MVC_VIEW        (~0x0)
+
+#define MVC_SPS_ID          1
+#define MVC_PPS_ID          1
+
+#define NUM_SLICE_TYPES     5
+
+/*
+ * This type defines the buffer type categories.
+ * @brief  Buffer Types
+ */
+enum venc_buf_type {
+       VENC_BUFTYPE_BITSTREAM = 0,
+       VENC_BUFTYPE_PICTURE,
+       VENC_BUFTYPE_ALL,
+       VENC_BUFTYPE_MAX
+};
+
+/*
+ * VXE callback type definitions
+ */
+enum vxe_cb_type {
+       VXE_CB_CODED_BUFF_READY,
+       VXE_CB_SRC_FRAME_RELEASE,
+       VXE_CB_STR_END,
+       VXE_CB_ERROR_FATAL
+};
+
+typedef void (*vxe_cb)(void *ctx, enum vxe_cb_type type, void *buf_ref, uint32 size, uint32 coded_frm_cnt);
+
+/*
+ * Enum specifying video encode profile
+ */
+enum img_video_enc_profile {
+       ENC_PROFILE_DEFAULT = 0,
+       ENC_PROFILE_LOWCOMPLEXITY,
+       ENC_PROFILE_HIGHCOMPLEXITY,
+       ENC_PROFILE_REDUCEDMODE
+};
+
+/*
+ * Enum describing smallest blocksize used during motion search
+ */
+enum img_ipe_minblock_size {
+       BLK_SZ_16x16 = 0,
+       BLK_SZ_8x8 = 1,
+       BLK_SZ_4x4 = 2,
+       BLK_SZ_DEFAULT = 3
+};
+
+/*
+ * Struct specifing flags to enable/disable encode features.
+ * All boolean flags are FALSE by default
+ */
+struct img_encode_features {
+       uint16                          disable_intra4x4;
+       uint16                          disable_intra8x8;
+       uint16                          disable_intra16x16;
+       uint16                          disable_inter8x8;
+       uint16                          restrict_inter4x4;
+       uint16                          disable_bpic_ref1;
+       uint16                          disable_bpic_ref0;
+       uint16                          enable_8x16_mv_detect;
+       uint16                          enable_16x8_mv_detect;
+       uint16                          disable_bframes;
+       enum img_ipe_minblock_size      min_blk_sz;
+       uint16                          restricted_intra_pred;
+};
+
+/*
+ *
+ * Struct describing Macro-block params generated by first stage.
+ * Refer T.R.M. for details
+ */
+struct img_first_stage_mb_params {
+       uint16          ipe0_sad;
+       uint16          ipe1_sad;
+       uint8           ipe0_blks;
+       uint8           ipe1_blks;
+       uint8           carc_cmplx_val;
+       uint8           reserved;
+};
+
+/*
+ * Size of Inter/Intra & Coded/Skipped tables
+ */
+#define TOPAZHP_SCALE_TBL_SZ                    (8)
+#define DEFAULT_CABAC_DB_MARGIN    (0x190)
+
+/*
+ * Struct describing params for video encoding
+ */
+struct img_video_params {
+       enum img_standard       standard;
+       enum img_format         format;
+       enum img_csc_preset     csc_preset;
+       uint8                   slices_per_picture;
+       uint16                  width;
+       uint16                  frame_height;
+       osa_bool                is_interlaced;
+       osa_bool                is_interleaved;
+       osa_bool                constrained_intra;
+       osa_bool                h264_8x8;
+       osa_bool                bottom_field_first;
+       osa_bool                arbitrary_so;
+       osa_bool                cabac_enabled;
+       uint32                  cabac_bin_limit;
+       uint32                  cabac_bin_flex;
+       uint8                   deblock_idc;
+       osa_bool                output_reconstructed;
+       uint32                  f_code;
+       int32                   fine_y_search_size;
+       osa_bool                no_offscreen_mv;
+       uint32                  idr_period;
+
+       uint32                  intra_cnt;
+       uint32                  vop_time_resolution;
+       struct img_encode_features      enc_features;
+       uint8                   enable_sel_stats_flags; /* Flags to enable selective first-pass statistics gathering by the hardware. Bit 1 - First Stage Motion Search Data, Bit 2 - Best Multipass MB Decision Data, Bit 3 - Best Multipass Motion Vectors. (First stage Table 2 motion vectors are always switched on) */
+       osa_bool                enable_inp_ctrl;                        /* Enable Macro-block input control */
+       osa_bool                enable_air;                             /* Enable Adaptive Intra Refresh */
+       int32                   num_air_mbs;                    /* n = Max number of AIR MBs per frame, 0 = _ALL_ MBs over threshold will be marked as AIR Intras, -1 = Auto 10% */
+       int32                   air_threshold;          /* n = SAD Threshold above which a MB is a AIR MB candidate,  -1 = Auto adjusting threshold */
+       int16                   air_skip_cnt;                   /* n = Number of MBs to skip in AIR Table between frames, -1 = Random (0 - NumAIRMbs) skip between frames in AIR table */
+
+       osa_bool                enable_cumulative_biases;
+       osa_bool                enable_host_bias;
+       osa_bool                enable_host_qp;
+       osa_bool                use_default_scaling_list;
+       int16                   use_custom_scaling_lists;
+       uint16                  pps_scaling;
+       uint32                  vert_mv_limit;
+       uint32                  intra_pred_modes;
+
+       uint16                  limit_num_vectors;
+       uint16                  disable_bit_stuffing;   /* Disabling bitstuffing to maintain bitrate */
+
+       uint8                   coded_skipped_index;
+       uint8                   inter_intra_index;
+       uint8                   mpeg2_intra_dc_precision;       /* Only used in MPEG2, 2 bit field (0 = 8 bit, 1 = 9 bit, 2 = 10 bit and 3=11 bit precision). Set to zero for other encode standards. */
+
+       /* Contents Adaptive Rate Control parameters */
+       uint16                  carc;
+       int32                   carc_baseline;
+       uint32                  carc_threshold;
+       uint32                  carc_cutoff;
+       uint32                  carc_neg_range;
+       uint32                  carc_neg_scale;
+       uint32                  carc_pos_range;
+       uint32                  carc_pos_scale;
+       uint32                  carc_shift;
+
+       /* Weighted prediction */
+       osa_bool                weighted_prediction;
+       uint8                   vp_weighted_implicit_bi_pred;
+
+       /* SEI insertion */
+       osa_bool                insert_hrd_params;
+
+       uint16                  intra_refresh;
+
+       uint32                  chunks_per_mb;
+       uint32                  max_chunks;
+       uint32                  priority_chunks;
+       uint32                  mbps;
+
+       osa_bool                multi_reference_p;
+       uint8                   ref_spacing;
+       osa_bool                spatial_direct;
+
+       uint16                  vp_adaptive_rounding_disable;
+       uint16                  vp_adaptive_rounding_offsets[18][4];
+
+       uint32                  debug_crcs;
+
+       osa_bool                enable_mvc;                     /* True if MVC is enabled. False by default */
+       uint16                  mvc_view_idx;                   /* MVC view index */
+       osa_bool                high_latency;
+
+       uint16                  buffer_stride_bytes;
+       uint16                  buffer_height;
+       osa_bool                disable_bh_rounding;            /* True if we wish to disable the buffer height rounding to 16 pixels (enables contiguous YU memory for non-aligned image heights)      */
+       uint16                  source_width;
+       uint16                  source_frame_height;
+
+       osa_bool                no_sequence_headers;
+       osa_bool                auto_encode;
+       osa_bool                slice_level;
+       osa_bool                coded_header_per_slice;
+
+       osa_bool                auto_expand_pipes;      /* Automatically expand a context pipe allocations when new pipes become available */
+       osa_bool                enable_lossless;
+       osa_bool                lossless_8x8_prefilter;
+
+       osa_bool                enable_scaler;
+       uint16                  crop_left;
+       uint16                  crop_right;
+       uint16                  crop_top;
+       uint16                  crop_bottom;
+
+#if SECURE_IO_PORTS
+       osa_bool                secure_ctx_input;
+       osa_bool                secure_ctx_output;
+#endif
+       /* Low latency encoding related */
+       osa_bool                line_counter_enabled;           //<! Drives the activation of low-latency encoding */
+};
+
+/*
+ * Struct describing JPEG component info
+ */
+struct component_info {
+       uint32  width;          /* Width of the image component */
+       uint32  stride;         /* Stride of the image component */
+       uint32  step;           /* Step of the image component */
+       uint32  height;         /* Height of the image component */
+};
+
+/*
+ * Struct describing JPEG info
+ */
+struct img_unaligned_source_info {
+       uint32  output_width;           /* Width of the JPEG image */
+       uint32  output_height;          /* Height of the JPEG image */
+       uint32  components;                     /* Number of components in the image ( 1 or 3 ) */
+       struct component_info comp_info[3];                     /* Array containing component info */
+};
+
+/*
+ * Struct containing details of a reconstuctured picture
+ */
+struct img_recon_done {
+       uint32  poc;                                    /* PicOrderCount */
+       void    *buffer;                                        /* Buffer containing reconstructured image */
+};
+
+/*
+ * Struct containing a feedback for one frame
+ */
+struct img_feedback_element {
+       osa_bool                is_coded;                                                       /* Is the frame was coded or skipped completely? */
+       osa_bool                is_skipped;                                                     /* Is the frame coded as a set of skipped MBs? */
+       osa_bool                entire_frame;                                           /* Was the frame encoded entirely or there a still slices to come? */
+       enum img_frame_type     frame_type;                                                     /* Frame Type (IDR, I, P, B) */
+       uint8                   source_slot;                                            /* Number of the source slot, containing the source buffer */
+       uint8                   recon_idx;                                              /* Number of the slot, conaining reconstructed picture */
+       struct img_frame        *src_frame;                                                     /* Source buffer */
+       struct img_buffer       *motion_search_statistics_buf;                  /* Buffer to contain Table 1 (8 byte Motion Search Data) of the selectable stats */
+       struct img_buffer       *best_multipass_statistics_buf;         /* Buffer to contain (optionally) Table 4 (64 bytes Multipass Motion Vectors) and table 3 (16 byte Multipass Parameters) */
+
+       struct coded_package_host *coded_package;                                       /* Pointer to the coded package, containing the returned header and coded buffer information */
+
+       struct list_item        *recon_list;                                            /* List of reconstructed pictures */
+       uint32                  bytes_coded;                                            /* Size of the encoded slice in bytes */
+       uint32                  first_bu;                                               /* Number of the first BU in the slice */
+       uint8                   storage_frame_num;                                      /* Last 2 bits of the Frame number in Storage Order */
+       uint8                   slice_num;                                              /* Number of the slice in a Slice Map supplied */
+       uint8                   slices_per_picture;                             /* Number of the slices in this picture */
+       uint8                   field;                                                  /* The field this slice belongs to */
+       uint8                   coded_slot_num;                                 /* Slot number of the coded buffer */
+
+       uint8                   active_coded_package_idx;
+
+       uint32                  poc;                                                    /* PicOrderCount of the coded slice */
+       osa_bool                patched_recon;                                          /* Was the reconstructed picture written to a patched buffer? */
+       uint8                   slices_in_buffer;                                       /* Number of slices contained in the coded buffer */
+       osa_bool                last_frame_encoded;                             /* True if the last frame has been encoded */
+       uint8                   coded_buffer_count;                             /* Number of coded buffer used */
+
+       uint64          host_ctx;                                                               /* Host context value */
+};
+
+/*
+ * Bit fields for ui32CoreFeatures
+ */
+#define SCALER_SUPPORTED_MASK                                  0x00000080
+#define GENERATE_PERFORMANCE_STORE_MASK                        0x00000100
+#define H264_LOSSLESS_SUPPORTED_MASK                   0x00000200
+#define H264_CUSTOM_QUANT_SUPPORTED_MASK               0x00000400
+#define MPEG2_SUPPORTED_MASK                                   0x00000800
+#define SIGNATURES_SUPPORTED_SUBSET_MASK               0x00001000
+#define SIGNATURES_SUPPORTED_ALL_MASK                  0x00002000
+#define H264_WEIGHTED_PRED_ME_SUPPORTED_MASK   0x00004000
+#define H264_WEIGHTED_PRED_SUPPORTED_MASK              0x00008000
+#define H264_2_REF_ON_P_PIC_SUPPORTED_MASK             0x00010000
+#define H264_SPATIAL_DIRECT_SUPPORTED_MASK             0x00020000
+#define H264_MULTIPASS_SUPPORTED_MASK                  0x00040000
+#define H264_DEFAULT_TABLES_SUPPORTED_MASK             0x00080000
+#define H264_8X8_TRANSFORM_SUPPORTED_MASK              0x00100000
+#define H264_INTERLACED_SUPPORTED_MASK                 0x00200000
+#define H264_B_PIC_SUPPORTED_MASK                              0x00400000
+#define H264_16X8_8X16_SUPPORTED_MASK                  0x00800000
+#define H264_CABAC_SUPPORTED_MASK                              0x01000000
+#define SLAVE_JPEG_SUPPORTED_MASK                              0x02000000
+#define JPEG_SUPPORTED_MASK                                            0x04000000
+#define H263_SUPPORTED_MASK                                            0x08000000
+#define MPEG4_SUPPORTED_MASK                                   0x10000000
+#define H264_SUPPORTED_MASK                                            0x20000000
+#define DMAC_SUPPORTED_MASK                                            0x40000000
+#define MMU_SUPPORTED_MASK                                             0x80000000
+
+/*
+ * Struct describing the capabilities of the encoder
+ */
+struct img_enc_caps {
+       uint16  min_slices;                     /* Minimum slices to use */
+       uint16  max_slices;                     /* Maximum slices to use */
+       uint16  recommended_slices;     /* Recommended number of slices */
+       uint32  num_cores;                      /* Number of cores that will be used */
+       uint32  core_features;          /* Core features flags */
+       uint32  core_revision;          /* Core revision */
+       uint32  max_height;                     /* Maximum height supported */
+       uint32  max_width;                      /* Maximum width supported */
+       uint32  min_height;                     /* Minimum height supported */
+       uint32  min_width;                      /* Minimum width supported */
+       uint32  max_mb_num;                     /* Maximum number of macro blocks */
+       uint32  min_slice_height;               /* Minimum number of rows that a slice can span (not including automatic slice breaks) */
+       uint32  max_bu_per_frame;               /* Maximum number of basic units per frame */
+};
+
+/*
+ * Struct describing driver results message
+ */
+struct driver_tohost_msg {
+       enum mtx_message_id     cmd_id;
+       enum mtx_cmd_id         input_cmd_id;
+       uint32                  data;
+       struct vidio_ddbufinfo  *command_data_buf;
+       struct img_feedback_element     feedback;
+};
+
+/*
+ * Enum describing picture coding type
+ */
+
+enum h264_picture_coding_type {
+       I_FRAME = 0,            /* An intra frame */
+       P_FRAME = 1,            /* An inter frame */
+       B_FRAME = 2                     /* A B frame */
+};
+
+/*
+ * Struct describing H264 VUI parameters
+ */
+struct h264_vui_params {
+       uint32  time_scale;                                                                     /* Time scale as defined in the H.264 specification */
+       uint32  bit_rate_value_minus1;                                          /* An inter framebitrate/64)-1 */
+       uint32  cbp_size_value_minus1;                                          /* An inter frame(bitrate*1.5)/16 */
+       uint8   aspect_ratio_info_present_flag;             /* aspect_ratio_info_present_flag as defined in the H.264 specification */
+       uint8   aspect_ratio_idc;                           /* as defined in the H.264 specification */
+       uint16  sar_width;
+       uint16  sar_height;
+       uint8   cbr;                                                                            /* CBR as defined in the H.264 specification */
+       uint8   initial_cpb_removal_delay_length_minus1;        /* as defined in the H.264 specification */
+       uint8   cpb_removal_delay_length_minus1;                        /* as defined in the H.264 specification */
+       uint8   dpb_output_delay_length_minus1;                         /* as defined in the H.264 specification */
+       uint8   time_offset_length;                                                     /* as defined in the H.264 specification */
+       uint8   num_reorder_frames;
+       uint8   max_dec_frame_buffering;
+};
+
+/*
+ * Struct describing H264 crop parameters
+ */
+struct h264_crop_params
+{
+       osa_bool        clip;                                                   /* Flag indicating if cropping parameters are present */
+       uint16  left_crop_offset;                                               /* Number of pixels to crop from the left side /2 */
+       uint16  right_crop_offset;                                              /* Number of pixels to crop from the right side /2 */
+       uint16  top_crop_offset;                                                /* Number of pixels to crop from the top /2 */
+       uint16  bottom_crop_offset;                                             /* Number of pixels to crop from the bottom /2 */
+};
+
+/*
+ * Enum describing Profile (H264)
+ */
+enum sh_profile_type {
+       SH_PROFILE_BP = 0,                                                              /* H.264 Baseline Profile */
+       SH_PROFILE_MP = 1,                                                              /* H.264 Main Profile */
+       SH_PROFILE_HP = 2,                                                              /* H.264 High Profile */
+       SH_PROFILE_H10P = 3,                                                    /* H.264 High 10P Profile */
+       SH_PROFILE_H422P = 4,                                                   /* H.264 High 4:2:2 Profile */
+       SH_PROFILE_H444P = 5                                                    /* H.264 High 4:4:4 Profile */
+};
+
+/*
+ * Enum describing level (H264)
+ */
+enum sh_level_type {
+       SH_LEVEL_1 = 10,                                                                /* H264 Level as specified in the specification */
+       SH_LEVEL_1B = 1,                                                                /* Special-case H264 Level */
+       SH_LEVEL_11 = 11,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_12 = 12,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_13 = 13,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_2 = 20,                                                                /* H264 Level as specified in the specification */
+       SH_LEVEL_21 = 21,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_22 = 22,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_3 = 30,                                                                /* H264 Level as specified in the specification */
+       SH_LEVEL_31 = 31,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_32 = 32,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_4 = 40,                                                                /* H264 Level as specified in the specification */
+       SH_LEVEL_41 = 41,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_42 = 42,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_5 = 50,                                                                /* H264 Level as specified in the specification */
+       SH_LEVEL_51 = 51,                                                               /* H264 Level as specified in the specification */
+       SH_LEVEL_52 = 52                                                                /* H264 Level as specified in the specification */
+};
+
+/*
+ * Struct describing SPS (sequence) parameters (H264)
+ */
+struct h264_sequence_header_params {
+       enum sh_profile_type    profile;
+       enum sh_level_type      level;
+       uint8                   width_in_mbs_minus1;
+       uint8                   height_in_maps_units_minus1;
+       uint8                   log2_max_pic_order_cnt;
+       uint8                   max_num_ref_frames;
+       uint8           gaps_in_frame_num_value;
+       uint8           frame_mbs_only_flag;
+       uint8           vui_params_present;
+       uint8           seq_scaling_matrix_present_flag;
+
+       osa_bool        use_default_scaling_list;
+       osa_bool        is_lossless;
+       struct h264_vui_params  vui_params;
+};
+
+/*
+ * Struct describing Bias parameters
+ */
+struct img_henc_debug_settings {
+       uint32  serialized_communication_mode;
+};
+
+#define VXE_SERIALIZED_MODE_OFF                (0)
+#define VXE_SERIALIZED_MODE_SYNCED     (1)
+#define VXE_SERIALIZED_MODE_SERIAL     (2)
+
+/*
+ * Struct describing input parameters to encode a video picture
+ */
+struct pic_params {
+       uint32                  flags;                          /* Picture parameter flags */
+       struct in_rc_params     in_params;      /* Rate control parameters */
+};
+
+/*
+ * Video encode context
+ */
+ struct img_video_context {
+       /* topaz dd str context handle */
+       void    *dd_str_ctx;            /* Pointer to device instance data */
+       uint32  dd_ctx_num;
+
+       /* stream level params */
+       enum img_standard       standard;               /* Video standard */
+       uint16                  width;              /* target output width */
+       uint16                  frame_height;        /* target output height */
+       uint16                  picture_height;      /* target output height */
+       uint16                  buffer_stride_bytes;        /* input buffer stride */
+       uint16                  buffer_height;       /* input buffer width */
+       uint8                   frame_rate;
+
+       uint16                  unrounded_width;
+       uint16                  unrounded_frame_height;
+
+       uint32                  debug_crcs;
+       enum img_format         format;         /* Pixel format of the source surface */
+       enum img_csc_preset     csc_preset; /* Colour space conversion to be performed on the source surface */
+
+       /* Numbers of array elements that will be allocated */
+       int32           pic_nodes;
+       int32           mv_stores;
+
+       /* per core params */
+       struct pic_params       pic_params;  /* Picture level parameters (supplied by driver) */
+       struct vidio_ddbufinfo  above_params[TOPAZHP_MAX_NUM_PIPES];  /* Picture level parameters (supplied by driver) */
+       struct vidio_ddbufinfo  recon_pictures[MAX_PIC_NODES];  /* Reference pictures (2 input and 1 output) */
+       struct vidio_ddbufinfo  colocated[MAX_PIC_NODES];               /* Colocated vector stores (2 input and 1 output) */
+       struct vidio_ddbufinfo  mv[MAX_MV];                                             /* Vector stores */
+       struct vidio_ddbufinfo  inter_view_mv[2];                                       /* Inter-view vector stores */
+
+       /* partially coded headers supplied to HW */
+       /* SEI_INSERTION */
+       struct vidio_ddbufinfo  aud_header_mem;
+       struct vidio_ddbufinfo  sei_buffering_period_header_mem;
+       struct vidio_ddbufinfo  sei_picture_timing_header_mem;
+
+       struct vidio_ddbufinfo  seq_header_mem;                          /* Partially coded Sequence header */
+       struct vidio_ddbufinfo  subset_seq_header_mem;                    /* Partially coded Subset sequence header for H264 mvc */
+       struct vidio_ddbufinfo  pichdr_template_mem[4];
+       struct vidio_ddbufinfo  slice_params_template_mem[NUM_SLICE_TYPES];
+
+       uint32  f_code;
+       struct vidio_ddbufinfo  src_phys_addr;
+
+       /* WEIGHTED PREDICTION */
+       struct vidio_ddbufinfo  weighted_prediction_mem[MAX_SOURCE_SLOTS_SL];
+       osa_bool                weighted_prediction;
+       uint8                   weighted_bi_pred;
+
+       struct vidio_ddbufinfo  flat_gop_struct;                                /* Flat MiniGop structure */
+       struct vidio_ddbufinfo  hierar_gop_struct;                           /* Hierarchical MiniGop structure */
+
+       struct vidio_ddbufinfo  ltref_header[MAX_SOURCE_SLOTS_SL];
+
+       struct vidio_ddbufinfo  custom_quant[2];                                /* Custom quantization values */
+       struct vidio_ddbufinfo  custom_quant_regs4x4_sp[2];             /* Custom quantization register values for 4x4 Sp */
+       struct vidio_ddbufinfo  custom_quant_regs8x8_sp[2];             /* Custom quantization register values for 8x8 Sp */
+       struct vidio_ddbufinfo  custom_quant_regs4x4_q[2];              /* Custom quantization register values for 4x4 Q */
+       struct vidio_ddbufinfo  custom_quant_regs8x8_q[2];              /* Custom quantization register values for 8x8 Q */
+       uint8                   custom_quant_slot;
+
+       struct img_buffer       slice_map[MAX_SOURCE_SLOTS_SL];                      /* Slice map of the source picture */
+
+       struct img_buffer       firstpass_out_param_buf[MAX_SOURCE_SLOTS_SL];              /* Output Parameters of the First Pass */
+
+       struct img_buffer       firstpass_out_best_multipass_param_buf[MAX_SOURCE_SLOTS_SL];  /* Output Selectable Best MV Parameters of the First Pass */
+       struct img_buffer       mb_ctrl_in_params_buf[MAX_SOURCE_SLOTS_SL];                 /* Input Parameters to the second pass */
+
+       /* these values set at picture level & written in at slice */
+       uint32                  ipe_control;         /* common bits IPE control register for entire picture  */
+       uint32                  pred_comb_control;    /* common bits of Predictor-combiner control register for entire picture */
+       osa_bool                cabac_enabled;          /* FLAG to enable Cabac mode */
+       uint32                  cabac_bin_limit;      /* Min Bin Limit after which the Topaz hardware would encode MB as IPCM */
+       uint32                  cabac_bin_flex;       /* Max Flex-Limit, the Topaz-HW will encode MB as IPCM after (BinLimit+BinFlex) */
+
+       uint32                  first_pic_flags;
+       uint32                  non_first_pic_flags;
+
+       osa_bool                is_interlaced;
+       osa_bool                is_interleaved;
+       osa_bool                top_field_first;
+       osa_bool                arbitrary_so;
+       uint8                   slices_per_picture;
+       uint8                   deblock_idc;
+       uint32                  kick_size;
+       uint32                  kicks_per_bu;
+       uint32                  vop_time_resolution;
+       uint32                  idr_period;
+       uint32                  intra_cnt;
+       osa_bool                multi_reference_p;
+       osa_bool                spatial_direct;
+
+       struct img_mv_settings  mv_settings_idr;
+       struct img_mv_settings  mv_settings_non_b[MAX_BFRAMES + 1];
+
+       /*  | MVSetingsB0 | MVSetingsB1 | ... | MVSetings Bn |  */
+
+       struct vidio_ddbufinfo  mv_settings_btable;                                             /* three colocated vector stores (2 input and 1 output) */
+       struct vidio_ddbufinfo  mv_settings_hierarchical;
+
+       /* Source slots */
+       struct img_frame        *source_slot_buff[MAX_SOURCE_SLOTS_SL];         /* Source slots */
+       uint32                  source_slot_poc[MAX_SOURCE_SLOTS_SL];   /* POCs of frames in slots */
+       uint8                   slots_in_use;                           /* Number of source slots */
+       uint8                   slots_required;                         /* Number of source slots to be consumed */
+
+       /* Coded slots */
+       struct coded_package_host       *coded_package[MAX_CODED_PACKAGES];     /* Collection of coded/header information */
+       uint32 coded_buffer_max_size;
+       uint8 coded_package_max_num;
+
+       uint32                  frame_count;
+       uint32                  flush_at_frame;
+       uint32                  flushed_at_frame;
+       uint32                  encode_sent;
+       uint32                  encode_requested;
+       uint32                  frames_encoded;
+       osa_bool                encoder_idle;           /* Indicates that the encoder is waiting for data, Set to true at start of encode */
+       osa_bool                aborted;
+
+       struct list_item        *ref_frame;
+       uint32                  recon_poc;
+       uint32                  next_recon;
+
+       struct vidio_ddbufinfo  *recon_buffer;
+       struct vidio_ddbufinfo  *patched_recon_buffer;
+
+       struct img_rc_params    rc_params;
+       enum img_frame_type     frame_type;
+
+       uint32                  buffers_status_reg;
+
+       osa_bool                insert_seq_header;
+       osa_bool                output_reconstructed;
+
+       uint32                  encode_pic_processing;
+       uint8                   extra_wb_retrieved;
+
+       uint8                   enable_sel_stats_flags;   /* Flags to enable selective first-pass statistics gathering by the hardware. Bit 1 - First Stage Motion Search Data, Bit 2 - Best Multipass MB Decision Data, Bit 3 - Best Multipass Motion Vectors. (First stage Table 2 motion vectors are always switched on) */
+
+       osa_bool                enable_inp_ctrl;     /* Enable Macro-block input control */
+       osa_bool                enable_air;                     /* Enable Adaptive Intra Refresh */
+       int32                   num_air_mbs;    /* n = Max number of AIR MBs per frame, 0 = _ALL_ MBs over threshold will be marked as AIR Intras, -1 = Auto 10% */
+       int32                   air_threshold;  /* n = SAD Threshold above which a MB is a AIR MB candidate,  -1 = Auto adjusting threshold */
+       int16                   air_skip_cnt;   /* n = Number of MBs to skip in AIR Table between frames, -1 = Random (0 - NumAIRMbs) skip between frames in AIR table */
+
+       osa_bool                enable_host_bias;
+       osa_bool                enable_host_qp;
+
+       osa_bool                custom_scaling;
+       osa_bool                pps_scaling;
+       osa_bool                h264_8x8_transform;
+       osa_bool                h264_intra_constrained;
+       uint32                  vert_mv_limit;
+       uint32                  intra_pred_modes;
+       osa_bool                limit_num_vectors;
+       osa_bool                disable_bit_stuffing;
+       uint8                   coded_skipped_index;
+       uint8                   inter_intra_index;
+       struct vidio_ddbufinfo mtx_enc_ctx_mem;
+       /* SEI_INSERTION */
+       osa_bool                insert_hrd_params;
+       uint32                  chunks_per_mb;
+       uint32                  max_chunks;
+       uint32                  priority_chunks;
+
+       uint8                   source_slot_reserved;
+       uint8                   coded_package_slot_reserved;
+       void                    *encode_pic_signal;
+
+       uint8                   highest_storage_number;
+       uint8                   vid_ctx_num;
+       osa_bool                enable_mvc;         /* True if MVC is enabled. False by default */
+       uint16                  mvc_view_idx;     /* View Idx of this MVC view */
+       osa_bool                high_latency;
+       uint32                  mbps;
+
+       osa_bool                no_sequence_headers;
+       uint32                  next_slice;
+       osa_bool                auto_encode;
+       osa_bool                slice_level;
+       osa_bool                coded_header_per_slice;
+
+       /* Scaler specific values */
+       osa_bool                enable_scaler;
+       uint16                  crop_left;
+       uint16                  crop_right;
+       uint16                  crop_top;
+       uint16                  crop_bottom;
+       uint16                  source_width;
+       uint16                  source_frame_height;
+
+#if SECURE_IO_PORTS
+       osa_bool                secure_ctx_input;
+       osa_bool                secure_ctx_output;
+#endif
+       osa_bool        line_counter;           /* Keep track of line counter activation */
+};
+
+/*
+ * Encoder context
+ */
+struct img_enc_context {
+       enum img_codec  codec;  /* encode codec */
+       struct img_video_context *video;                        /* Video encode context */
+
+       uint8           base_pipe;              /* The first of a contiguous set of pipes to use for the context encode */
+       uint8           pipes_to_use;           /* The number of contiguous pipes (starting with ui8BasePipe) to use for the context encode */
+
+       uint8           requested_base_pipe;            /* The first of a contiguous set of pipes to use for the context encode */
+       uint8           requested_pipes_to_use;         /* The number of contiguous pipes (starting with ui8BasePipe) to use for the context encode */
+       osa_bool        auto_expand_pipes;      /* Automatically expand a context pipe allocations when new pipes become available */
+
+       uint8           ctx_num;
+
+       osa_bool        sync_first_pass;        /* true if never synced */
+       uint32          core_rev;
+
+       struct img_henc_debug_settings  *debug_settings;
+};
+
+/*
+ * Struct containing details of a reconstuctured picture
+ */
+struct img_recon_node {
+       uint32  poc;    /* PicOrderCount */
+       void    *buffer;        /* Buffer containing reconstructured image */
+};
+
+/*
+ * Function pointer type for picture management functions
+ */
+typedef void (*pic_mgmt_func)(void* app_context, uint32 frame_num);
+
+/*
+ * @function   InitHardware
+ * @brief      Initialise the Encoder Hardware
+ * @details    Reset the hardware and set up registers, etc.
+ */
+int32 init_topaz_core(void *dev_handle, uint32 *num_pipes, uint32 mmu_flags, void *callback);
+
+/*
+ * @function           DeinitHardware
+ */
+int32  deinit_topaz_core(void);
+
+/*
+ * @function           CreateContext
+ * @brief              Create an encoder context
+ * @details            Set up an encoder context with the given parameters
+ */
+int32 topaz_stream_create(void *vxe_ctx, struct img_video_params *video_params, uint8 base_pipe,
+                               uint8 pipes_to_use, struct img_rc_params *rc_params, void **topaz_str_context);
+
+int32 topaz_end_of_stream(void *topaz_str_ctx, uint32 frame_cnt);
+
+int32 topaz_flush_stream(void *topaz_str_ctx, uint32 frame_cnt);
+
+int32 topaz_stream_destroy(void *topaz_str_ctx);
+
+/*
+ * Load the given context onto the hardware
+ */
+int32 topaz_load_context(void *topaz_str_ctx);
+
+/*
+ * Store the context from the hardware into given location
+ */
+int32 topaz_store_context(void *topaz_str_ctx);
+
+/*
+ * Destroy the given context onto the hardware
+ */
+int32 topaz_destroy_context(void *topaz_str_ctx);
+
+/*
+ * Get the capabilities of the encoder for the given requirements.
+ * @param    standard          : Standard setting
+ * @param    width             : Target output width
+ * @param    height            : Target output height
+ * @param    caps              : Pointer to caps structure to be filled in.
+ */
+int32 topaz_get_encoder_caps(enum img_standard standard, uint16 width,
+                       uint16 height, struct img_enc_caps *caps);
+
+
+int32 topaz_stream_map_buf_sg(void *topaz_str_ctx, enum venc_buf_type buf_type,
+                       struct vidio_ddbufinfo *buf_info, void *sgt);
+
+int32 topaz_stream_unmap_buf_sg(void *topaz_str_ctx, struct vidio_ddbufinfo *buf_info);
+
+/*
+ * Prepare a partially coded H264 Sequence Header (SPS).
+ * @param    mb_width                          : Width of the sequence in MBs
+ * @param    mb_height                 : Height of the sequence in MBs
+ * @param    vui_params_present        : IMG_TRUE to include VUI parameters
+ * @param    params                            : Pointer to VUI parameters structure
+ * @param    crop                              : Pointer to crop parameter structure
+ * @param    sh_params                 : Pointer to sequence header params structure
+ */
+int32 topaz_h264_prepare_sequence_header(void *topaz_str_ctx, uint32 mb_width, uint32 mb_height,
+                                              osa_bool vui_params_present, struct h264_vui_params *params,
+                                              struct h264_crop_params *crop,
+                                              struct h264_sequence_header_params *sh_params, osa_bool mvc_sps);
+/*
+ * Prepare a partially coded H264 Picture Header (PPS).
+ * @param              cqp_offset                      : Chroma QP offset
+ */
+int32 topaz_h264_prepare_picture_header(void *topaz_str_ctx, int8 cqp_offset);
+
+/*
+ * Prepare an AUD header.
+ */
+int32 topaz_h264_prepare_aud_header(void *topaz_str_ctx);
+
+/*
+ * Set offsets and strides for YUV components.
+ * @param              frame                           : Source frame
+ */
+int32 topaz_set_component_offsets(void *topaz_str_ctx, struct img_frame *frame);
+
+/*
+ * Reserves a slot to be used by a subsequent call to SendCodedPackageToFW.
+ * If internally allocated coded buffers are being used, it also gets a buffer
+ * from the encoder's internal list.
+ */
+int32 topaz_reserve_coded_package_slot(void *topaz_str_ctx);
+
+/*
+ * Submits a buffer to the encoder to receive coded data along with a coded header buffer.
+ * A VP8 non coded buffer can also be sent.
+ * @param      coded_buffer                    : Pointer to the coded package to send to FW
+ */
+int32 topaz_send_coded_package(void *topaz_str_ctx, struct img_coded_buffer *coded_buffer);
+
+/*
+ * Returns the number of empty source slots available
+ * @return   uint8                     : Number of empty source slots  (negative number indicates an error)
+ */
+int8 topaz_query_empty_source_slots(void *topaz_str_ctx);
+
+/*
+ * Returns the number of empty coded buffer slots available
+ * @return   int8                      : Number of empty coded slots (negative number indicates an error)
+ */
+int8 topaz_query_empty_coded_slots(void *topaz_str_ctx);
+
+/*
+ * Reserves a slot to be used by a subsequent call to SendSourceFrame.
+ * If internally allocated source buffers are being used, it also gets a buffer
+ * from the encoder's internal list.
+ * @param              src_slot_num            : Pointer to receive slot number
+ */
+int32 topaz_reserve_source_slot(void *topaz_str_ctx, uint8 *src_slot_num);
+
+/*
+ * Submits a frame to the encoder for processing
+ * @param              src_frame                       : Pointer to receive buffer pointer
+ * @param              frame_num               : Frame number of the given frame
+ * @param              ctx_value       : Value which will be insert into coded data buffer header
+ */
+int32 topaz_send_source_frame(void *topaz_str_ctx, struct img_frame *src_frame,
+                                   uint32 frame_num, uint64 ctx_value);
+
+/*
+ * Indicates that there are no more source frames to send. It may not be the last
+ * command, but it should inform the drivers about the length of the video stream.
+ */
+int32 topaz_end_of_stream(void *topaz_str_ctx, uint32 frame_count);
+
+/*
+ * Indicates that the encoder should be flushed after the specified number of
+ * frames have been encoded.
+ * @param    frame_count       : Number of frames which should have been encoded when the flush is complete
+ */
+int32 topaz_flush_stream(void *topaz_str_ctx, uint32 frame_count);
+
+/*
+ * Get the maximum coded data length for the given parameters, which can be used
+ * to determine the size of the coded data buffer.
+ */
+uint32 topaz_get_coded_buffer_max_size(void *topaz_str_ctx, enum img_standard standard,
+                                       uint16 width, uint16 height, struct img_rc_params *rc_params);
+
+uint32 topaz_get_coded_package_max_num(void *topaz_str_ctx, enum img_standard standard,
+                                       uint16 width, uint16 height, struct img_rc_params *rc_params);
+
+/*
+ * Tell the firmware to encode a frame.
+ */
+int32 topaz_encode_frame(void *topaz_str_ctx);
+
+/*
+ * Tells whether or not a pipe is being used by any context.
+ * If it is being used then it returns the id (1 or 2) of the context that is using it.
+ * Else it returns zero as the context id.
+ */
+int32 topaz_get_pipe_usage(uint8 pipe, uint8 *ctx_id);
+
+#endif
diff --git a/driver/encoder/topaz_api_utils.c b/driver/encoder/topaz_api_utils.c
new file mode 100644 (file)
index 0000000..9c22d9d
--- /dev/null
@@ -0,0 +1,1271 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * encoder utility function implementations
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "fw_headers/defs.h"
+#include "img_errors.h"
+#include "osal/inc/osa_types.h"
+#include "osal/inc/osa_string.h"
+#include "reg_headers/topazhp_core_regs.h"
+#include "reg_headers/topaz_coreext_regs.h"
+#include "reg_headers/topazhp_multicore_regs_old.h"
+#include "topaz_api.h"
+
+#define MV_OFFSET_IN_TABLE(distance, position) ((distance) * MV_ROW_STRIDE + (position) * sizeof(struct img_mv_settings))
+#define DEFAULT_MVCALC_CONFIG       ((0x00040303)|(MASK_TOPAZHP_CR_MVCALC_JITTER_POINTER_RST))
+
+/*
+ * Calculates the correct number of macroblocks per kick and kicks per BU
+ */
+void calculate_kick_and_bu_size(uint32 width_in_mbs, uint32 height_in_mbs, osa_bool is_interlaced, uint32 max_bu_per_frame,
+                               uint32 *kick_size, uint32 *kicks_per_bu,  uint32 *min_slice_height)
+{
+       uint32 kick_size_local, kicks_per_bu_local, bu_per_frame, min_slice_height_local;
+
+       /*
+       * Basic unit is either an integer number of rows or an integer number of basic units fit in a row
+       * We calculate the ideal kick size first then decide how many kicks there will be for each basic unit
+       */
+
+       /* Default to 1 kick per row */
+       kick_size_local = width_in_mbs;
+       kicks_per_bu_local = 1;
+       min_slice_height_local = 1;
+
+       /* See if we can use a smaller kick size */
+       if(!(kick_size_local % 3) && (kick_size_local > 30)) {
+               kick_size_local /= 3;
+               kicks_per_bu_local = 3;
+       } else if(!(kick_size_local % 2) && (kick_size_local > 20)) {
+               kick_size_local /= 2;
+               kicks_per_bu_local = 2;
+       }
+
+       IMG_DBG_ASSERT((kick_size_local < 256) && "Kick Size can't be bigger than 255");
+
+       /* Now calculate how many kicks we do per BU */
+       bu_per_frame = height_in_mbs * (is_interlaced ? 2 : 1);
+
+       while(bu_per_frame > max_bu_per_frame) {
+               /* we have too many BUs so double up the number of rows per BU so we can half the number of BUs */
+               kicks_per_bu_local *= 2;
+               bu_per_frame = (bu_per_frame + 1) / 2; /* if we had an odd number of rows then the last BU will be half height */
+               min_slice_height_local *= 2;
+       }
+
+       /* if we can afford to have 2 BUs per row then do it */
+       if((bu_per_frame < (max_bu_per_frame / 2)) && (kicks_per_bu_local == 2)) {
+               kicks_per_bu_local = 1;
+               bu_per_frame *= 2;
+       }
+
+       /* if we can afford to have 3 BUs per row then do it */
+       if((bu_per_frame < (max_bu_per_frame / 3)) && (kicks_per_bu_local == 3)) {
+               kicks_per_bu_local = 1;
+               bu_per_frame += 2;
+       }
+
+       *kick_size = kick_size_local;
+       *kicks_per_bu = kicks_per_bu_local;
+       *min_slice_height = min_slice_height_local;
+}
+
+/*
+ * Calculates the stride based on the input format and width
+ */
+uint32 calculate_stride(enum img_format format, uint16 requested_stride_bytes, uint16 width)
+{
+       uint16 stride_bytes;
+
+       if (requested_stride_bytes) {
+               stride_bytes = requested_stride_bytes;
+       } else {
+               switch (format) {
+                       case IMG_CODEC_Y0UY1V_8888:
+                       case IMG_CODEC_Y0VY1U_8888:
+                       case IMG_CODEC_UY0VY1_8888:
+                       case IMG_CODEC_VY0UY1_8888:
+                               stride_bytes = width << 1;
+                       break;
+                       case IMG_CODEC_ABCX:
+                       case IMG_CODEC_XBCA:
+                               stride_bytes = width << 2;
+                       break;
+                       case IMG_CODEC_ABC565:
+                               stride_bytes = width << 1;
+                       break;
+                       default:
+                               stride_bytes = width;
+                       break;
+               }
+       }
+
+       switch (format) {
+               case IMG_CODEC_420_YUV:
+               case IMG_CODEC_420_YV12:
+               case IMG_CODEC_420_PL8:
+               case IMG_CODEC_422_YUV:
+               case IMG_CODEC_422_YV12:
+               case IMG_CODEC_422_PL8:
+               case IMG_CODEC_420_IMC2:        /* although luma stride is same as chroma stride, start address is half the stride. so we need 128-byte alignment */
+               case IMG_CODEC_422_IMC2:        /* although luma stride is same as chroma stride, start address is half the stride. so we need 128-byte alignment */
+                       /*
+                       * All strides need to be 64-byte aligned
+                       * Chroma stride is half luma stride, so (luma) stride needs to be 64-byte aligned when divided by 2
+                       */
+                       return ALIGN_128(stride_bytes);
+               break;
+               default:
+                       /* Stride needs to be 64-byte aligned */
+                       return ALIGN_64(stride_bytes);
+               break;
+       }
+}
+
+/*
+ * Patch HW profile based on the profile specified by the user
+ */
+void patch_hw_profile(struct img_video_params *video_params, struct img_video_context *video)
+{
+       uint32 ipe_control =0;
+       uint32 pred_comb_control =0;
+       struct img_encode_features *enc_features = &(video_params->enc_features);
+
+       /* disable_intra4x4 */
+       if (enc_features->disable_intra4x4)
+               pred_comb_control |= F_ENCODE(1, TOPAZHP_CR_INTRA4X4_DISABLE);
+
+       /* disable_intra8x8 */
+       if (enc_features->disable_intra8x8)
+               pred_comb_control |= F_ENCODE(1, TOPAZHP_CR_INTRA8X8_DISABLE);
+
+       /* disable_intra16x16, check if atleast one of the other Intra mode is enabled */
+       if ((enc_features->disable_intra16x16) &&
+           (!(enc_features->disable_intra8x8) || !(enc_features->disable_intra4x4)))
+               pred_comb_control |= F_ENCODE(1, TOPAZHP_CR_INTRA16X16_DISABLE);
+
+       if (video_params->mbps)
+               video->mbps = video_params->mbps;
+
+       if (enc_features->restrict_inter4x4)
+               ipe_control |= F_ENCODE(1, TOPAZHP_CR_IPE_MV_NUMBER_RESTRICTION);
+
+       if (enc_features->disable_inter8x8)
+               pred_comb_control |= F_ENCODE(1, TOPAZHP_CR_INTER8X8_DISABLE);
+
+       if (enc_features->disable_bpic_ref1)
+               pred_comb_control |= F_ENCODE(1, TOPAZHP_CR_B_PIC1_DISABLE);
+       else if (enc_features->disable_bpic_ref0)
+               pred_comb_control |= F_ENCODE(1, TOPAZHP_CR_B_PIC0_DISABLE);
+
+       /* save predictor combiner control in video encode parameter set */
+       video->pred_comb_control = pred_comb_control;
+
+       /* set blocksize */
+       ipe_control |= F_ENCODE( enc_features->min_blk_sz, TOPAZHP_CR_IPE_BLOCKSIZE );
+
+       if (enc_features->enable_8x16_mv_detect)
+               ipe_control |= F_ENCODE(1, TOPAZHP_CR_IPE_8X16_ENABLE );
+
+       if (enc_features->enable_16x8_mv_detect)
+               ipe_control |= F_ENCODE(1, TOPAZHP_CR_IPE_16X8_ENABLE );
+
+       if (enc_features->disable_bframes)
+               video->rc_params.bframes = 0;
+
+       if(enc_features->restricted_intra_pred)
+               video->intra_pred_modes = 0xff0f;
+
+       /* save IPE-control register */
+       video->ipe_control = ipe_control;
+
+       return;
+}
+
+/*
+ * Set offsets and strides for YUV components of source picture
+ */
+int32 topaz_set_component_offsets(void *enc_ctx_handle, struct img_frame *frame)
+{
+       struct img_enc_context *enc;
+       struct img_video_context *video;
+       enum img_format format;
+       uint16 stride_bytes;
+       uint16 picture_height;
+
+       if (!enc_ctx_handle )
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       /* if source slot is NULL then it's just a next portion of slices */
+       if (frame == NULL)
+               return IMG_ERROR_UNDEFINED;
+
+       enc = (struct img_enc_context *)enc_ctx_handle;
+       video = enc->video;
+
+       format = video->format;
+       picture_height = video->buffer_height >> (video->is_interlaced ? 1 : 0);
+       stride_bytes = video->buffer_stride_bytes;
+
+       /*
+       * 3 Components: Y, U, V
+       * Y component is always at the beginning
+       */
+       frame->y_component_offset = 0;
+       frame->src_y_stride_bytes = stride_bytes;
+
+       /* Assume for now that field 0 comes first */
+       frame->field0_y_offset = 0;
+       frame->field0_u_offset = 0;
+       frame->field0_v_offset = 0;
+
+       switch(format) {
+               case IMG_CODEC_420_YUV:
+                       frame->src_uv_stride_bytes = stride_bytes / 2;
+
+                       frame->u_component_offset = stride_bytes * picture_height;
+                       frame->v_component_offset = stride_bytes * picture_height + (stride_bytes / 2) * (picture_height / 2);
+               break;
+
+               case IMG_CODEC_420_PL8:
+                       frame->src_uv_stride_bytes = stride_bytes / 2;
+
+                       frame->u_component_offset = 0;
+                       frame->v_component_offset = 0;
+               break;
+
+               case IMG_CODEC_420_PL12:
+               case IMG_CODEC_420_PL21:
+                       frame->src_uv_stride_bytes = stride_bytes;
+
+                       frame->u_component_offset = 0;
+                       frame->v_component_offset = 0;
+               break;
+
+               case IMG_CODEC_420_YV12:
+                       frame->src_uv_stride_bytes = stride_bytes / 2;
+                       frame->u_component_offset = stride_bytes * picture_height + (stride_bytes / 2) * (picture_height / 2);
+                       frame->v_component_offset = stride_bytes * picture_height;
+               break;
+
+               case IMG_CODEC_420_PL12_PACKED:
+               case IMG_CODEC_420_PL21_PACKED:
+                       frame->src_uv_stride_bytes = stride_bytes;
+                       frame->u_component_offset = stride_bytes * picture_height;
+                       frame->v_component_offset = stride_bytes * picture_height;
+               break;
+
+               case IMG_CODEC_420_IMC2:        /* IMC2 */
+                       frame->src_uv_stride_bytes = stride_bytes;
+                       frame->u_component_offset = stride_bytes * picture_height + (stride_bytes / 2);
+                       frame->v_component_offset = stride_bytes * picture_height;
+               break;
+
+               case IMG_CODEC_422_YUV:
+                       frame->src_uv_stride_bytes = stride_bytes / 2;
+                       frame->u_component_offset = stride_bytes * picture_height;
+                       frame->v_component_offset = stride_bytes * picture_height + (stride_bytes / 2) * picture_height;
+               break;
+
+               case IMG_CODEC_422_YV12:        /* YV16 */
+                       frame->src_uv_stride_bytes = stride_bytes / 2;
+                       frame->u_component_offset = stride_bytes * picture_height + (stride_bytes / 2) * picture_height;
+                       frame->v_component_offset = stride_bytes * picture_height;
+               break;
+
+               case IMG_CODEC_422_PL8:
+                       frame->src_uv_stride_bytes = stride_bytes / 2;
+                       frame->u_component_offset = 0;
+                       frame->v_component_offset = 0;
+               break;
+
+               case IMG_CODEC_422_IMC2:        /* IMC2 */
+                       frame->src_uv_stride_bytes = stride_bytes;
+                       frame->u_component_offset = stride_bytes * picture_height + (stride_bytes / 2);
+                       frame->v_component_offset = stride_bytes * picture_height;
+               break;
+
+               case IMG_CODEC_422_PL12:
+               case IMG_CODEC_422_PL21:
+                       frame->src_uv_stride_bytes = stride_bytes;
+                       frame->u_component_offset = 0;
+                       frame->v_component_offset = 0;
+               break;
+
+               case IMG_CODEC_444_YUV:
+                       frame->src_uv_stride_bytes = stride_bytes;
+                       frame->u_component_offset = stride_bytes * picture_height;
+                       frame->v_component_offset = stride_bytes * picture_height + stride_bytes * picture_height;
+               break;
+
+               case IMG_CODEC_444_YV12:        /* YV16 */
+                       frame->src_uv_stride_bytes = stride_bytes;
+                       frame->u_component_offset = stride_bytes * picture_height + stride_bytes * picture_height;
+                       frame->v_component_offset = stride_bytes * picture_height;
+               break;
+
+               case IMG_CODEC_444_PL8:
+                       frame->src_uv_stride_bytes = stride_bytes;
+                       frame->u_component_offset = 0;
+                       frame->v_component_offset = 0;
+               break;
+
+               case IMG_CODEC_444_IMC2:        /* IMC2 */
+                       frame->src_uv_stride_bytes = stride_bytes * 2;
+                       frame->u_component_offset = stride_bytes * picture_height + stride_bytes;
+                       frame->v_component_offset = stride_bytes * picture_height;
+               break;
+
+               case IMG_CODEC_444_PL12:
+               case IMG_CODEC_444_PL21:
+                       frame->src_uv_stride_bytes = stride_bytes * 2;
+                       frame->u_component_offset = 0;
+                       frame->v_component_offset = 0;
+               break;
+
+               case IMG_CODEC_Y0UY1V_8888:
+               case IMG_CODEC_Y0VY1U_8888:
+               case IMG_CODEC_UY0VY1_8888:
+               case IMG_CODEC_VY0UY1_8888:
+               case IMG_CODEC_ABCX:
+               case IMG_CODEC_XBCA:
+               case IMG_CODEC_ABC565:
+                       frame->src_uv_stride_bytes = stride_bytes;
+                       frame->u_component_offset = 0;
+                       frame->v_component_offset = 0;
+               break;
+
+               default:
+               break;
+       }
+
+       if (video->is_interlaced) {
+               if (video->is_interleaved) {
+                       switch(format) {
+                               case IMG_CODEC_420_IMC2:
+                               case IMG_CODEC_422_IMC2:
+                                       frame->v_component_offset *= 2;
+                                       frame->u_component_offset = frame->v_component_offset + (stride_bytes / 2);
+                               break;
+                               case IMG_CODEC_444_IMC2:
+                                       frame->v_component_offset *= 2;
+                                       frame->u_component_offset = frame->v_component_offset + stride_bytes;
+                               break;
+
+                               default:
+                                       frame->u_component_offset *= 2;
+                                       frame->v_component_offset *= 2;
+                               break;
+                       }
+
+                       frame->field1_y_offset = frame->field0_y_offset + frame->src_y_stride_bytes;
+                       frame->field1_u_offset = frame->field0_u_offset + frame->src_uv_stride_bytes;
+                       frame->field1_v_offset = frame->field0_v_offset + frame->src_uv_stride_bytes;
+
+                       frame->src_y_stride_bytes *= 2;
+                       frame->src_uv_stride_bytes *= 2;
+               } else {
+                       uint32 y_field_size, c_field_size;
+
+                       switch (format) {
+                               case IMG_CODEC_420_YUV:
+                               case IMG_CODEC_420_YV12:
+                               case IMG_CODEC_420_IMC2:
+                               case IMG_CODEC_420_PL12_PACKED:
+                               case IMG_CODEC_420_PL21_PACKED:
+                                       /*In Packed formats including PL12 packed the field offsets should be calculated in the following manner*/
+                                       y_field_size = picture_height * stride_bytes * 3 / 2;
+                                       c_field_size = y_field_size;
+                               break;
+                               case IMG_CODEC_420_PL8:
+                                       y_field_size = picture_height * stride_bytes;
+                                       c_field_size = picture_height * stride_bytes / 4;
+                               break;
+                               case IMG_CODEC_420_PL12:
+                               case IMG_CODEC_420_PL21:
+                                       y_field_size = picture_height * stride_bytes;
+                                       c_field_size = picture_height * stride_bytes / 2;
+                               break;
+                               case IMG_CODEC_422_YUV:
+                               case IMG_CODEC_422_YV12:
+                               case IMG_CODEC_422_IMC2:
+                                       y_field_size = picture_height * stride_bytes * 2;
+                                       c_field_size = y_field_size;
+                               break;
+                               case IMG_CODEC_422_PL8:
+                                       y_field_size = picture_height * stride_bytes;
+                                       c_field_size = picture_height * stride_bytes / 2;
+                               break;
+                               case IMG_CODEC_422_PL12:
+                               case IMG_CODEC_422_PL21:
+                                       y_field_size = picture_height * stride_bytes;
+                                       c_field_size = picture_height * stride_bytes;
+                               break;
+                               case IMG_CODEC_Y0UY1V_8888:
+                               case IMG_CODEC_UY0VY1_8888:
+                               case IMG_CODEC_Y0VY1U_8888:
+                               case IMG_CODEC_VY0UY1_8888:
+                                       y_field_size = picture_height * stride_bytes;
+                                       c_field_size = y_field_size;
+                               break;
+                               case IMG_CODEC_444_YUV:
+                               case IMG_CODEC_444_YV12:
+                               case IMG_CODEC_444_IMC2:
+                                       y_field_size = picture_height * stride_bytes * 3;
+                                       c_field_size = y_field_size;
+                               break;
+                               case IMG_CODEC_444_PL8:
+                                       y_field_size = picture_height * stride_bytes;
+                                       c_field_size = picture_height * stride_bytes;
+                               break;
+                               case IMG_CODEC_444_PL12:
+                               case IMG_CODEC_444_PL21:
+                                       y_field_size = picture_height * stride_bytes;
+                                       c_field_size = picture_height * stride_bytes * 2;
+                               break;
+                               case IMG_CODEC_ABCX:
+                               case IMG_CODEC_XBCA:
+                               case IMG_CODEC_ABC565:
+                                       y_field_size = picture_height * stride_bytes;
+                                       c_field_size = y_field_size;
+                               break;
+                               default:
+                                       y_field_size = picture_height * stride_bytes * 3 / 2;
+                                       c_field_size = y_field_size;
+                               break;
+                       }
+
+                       frame->field1_y_offset = y_field_size;
+                       frame->field1_u_offset = c_field_size;
+                       frame->field1_v_offset = c_field_size;
+               }
+       } else {
+               frame->field1_y_offset = frame->field0_y_offset;
+               frame->field1_u_offset = frame->field0_u_offset;
+               frame->field1_v_offset = frame->field0_v_offset;
+       }
+       return IMG_SUCCESS;
+}
+
+void topaz_setup_input_csc(struct img_video_context *video, struct img_vxe_scaler_setup *scaler_setup,
+                          struct img_vxe_csc_setup *csc_setup, enum img_csc_preset csc_preset)
+{
+#define CSC_MINUS_1_16(X) TOPAZHP_EXT_CR_CSC_SOURCE_MOD_0 ## X ## _MINUS_1_16
+#define CSC_MINUS_1_2(X) TOPAZHP_EXT_CR_CSC_SOURCE_MOD_0 ## X ## _MINUS_1_2
+#define CSC_UNSIGNED(X) TOPAZHP_EXT_CR_CSC_SOURCE_MOD_0 ## X ## _UNSIGNED
+
+       if ((csc_preset != IMG_CSC_NONE) && ((video->format == IMG_CODEC_ABCX) ||
+           (video->format == IMG_CODEC_XBCA) || (video->format == IMG_CODEC_ABC565))) {
+               uint8 source_mode[IMG_CSC_PRESETS][3] = {
+               /* IMG_CSC_NONE - No colour-space conversion */
+               {CSC_MINUS_1_16(0), CSC_MINUS_1_2(1), CSC_MINUS_1_16(2)},
+
+               /* IMG_CSC_709_TO_601 - ITU BT.709 YUV to be converted to ITU BT.601 YUV */
+               {CSC_MINUS_1_16(0), CSC_MINUS_1_2(1), CSC_MINUS_1_16(2)},
+
+               /* IMG_CSC_601_TO_709 - ITU BT.601 YUV to be converted to ITU BT.709 YUV */
+               {CSC_MINUS_1_16(0), CSC_MINUS_1_2(1), CSC_MINUS_1_16(2)},
+
+               /* IMG_CSC_RGB_TO_601_ANALOG - RGB to be converted to ITU BT.601 YUV */
+               {  CSC_UNSIGNED(0),  CSC_UNSIGNED(1),  CSC_UNSIGNED(2)},
+
+               /* IMG_CSC_RGB_TO_601_DIGITAL - RGB to be converted to ITU BT.601 YCbCr RS */
+               {  CSC_UNSIGNED(0),  CSC_UNSIGNED(1),  CSC_UNSIGNED(2)},
+
+               /* IMG_CSC_RGB_TO_601_DIGITAL_FS - RGB to be converted to ITU BT.601 YCbCr FS */
+               {  CSC_UNSIGNED(0),  CSC_UNSIGNED(1),  CSC_UNSIGNED(2)},
+
+               /* IMG_CSC_RGB_TO_709 - RGB to be converted to ITU BT.709 YUV */
+               {  CSC_UNSIGNED(0),  CSC_UNSIGNED(1),  CSC_UNSIGNED(2)},
+
+               /* IMG_CSC_YIQ_TO_601 - YIQ to be converted to ITU BT.601 YUV */
+               {CSC_MINUS_1_16(0), CSC_MINUS_1_2(1), CSC_MINUS_1_16(2)},
+
+               /* IMG_CSC_YIQ_TO_709 - YIQ to be converted to ITU BT.709 YUV */
+               {CSC_MINUS_1_16(0), CSC_MINUS_1_2(1), CSC_MINUS_1_16(2)},
+
+               /* IMG_CSC_BRG_TO_601 - RGB to be converted to ITU BT.601 YUV */
+               {0, 0, 0},
+
+               /* IMG_CSC_RBG_TO_601 - RGB to be converted to ITU BT.709 YUV */
+               {0, 0, 0},
+
+               /* IMG_CSC_BGR_TO_601 - RGB to be converted to ITU BT.601 YUV */
+               {0, 0, 0},
+
+               /* IMG_CSC_UYV_TO_YUV - UYV to be converted to YUV */
+               {CSC_MINUS_1_2(0), CSC_MINUS_1_16(1), CSC_MINUS_1_2(2)},
+               /*{  CSC_UNSIGNED(0),  CSC_UNSIGNED(1),  CSC_UNSIGNED(2)}, */
+       };
+
+       int32 coeffs[IMG_CSC_PRESETS][3][3] = {
+               /* IMG_CSC_NONE - No colour-space conversion */
+               {
+                       { 1024,    0,    0 },
+                       {    0, 1024,    0 },
+                       {    0,    0, 1024 }
+               },
+
+               /* IMG_CSC_709_TO_601 - ITU BT.709 YUV to be converted to ITU BT.601 YUV */
+               {
+                       { 1024, (int32)( 0.15941 * 1024), (int32)( 0.11649 * 1024) },
+                       {    0, (int32)(-0.07844 * 1024), (int32)( 0.98985 * 1024) },
+                       {    0, (int32)( 0.9834  * 1024), (int32)(-0.10219 * 1024) }
+               },
+
+               /* IMG_CSC_601_TO_709 - ITU BT.601 YUV to be converted to ITU BT.709 YUV */
+               {
+                       { 1024, (int32)(-0.17292 * 1024), (int32)(-0.13554 * 1024) },
+                       {    0, (int32)( 0.08125 * 1024), (int32)( 1.01864 * 1024) },
+                       {    0, (int32)( 1.02532 * 1024), (int32)( 0.10586 * 1024) }
+               },
+
+               /* IMG_CSC_RGB_TO_601_ANALOG - RGB to be converted to ITU BT.601 YUV */
+               {       /*      R                                       G                                       B */
+                       { (int32)(219 *  0.299   * 4.0157), (int32)(219 *  0.587   * 4.0157), (int32)(219 *  0.114   * 4.0157) },
+                       { (int32)(224 * -0.14713 * 4.0157), (int32)(224 * -0.28886 * 4.0157), (int32)(224 *  0.446   * 4.0157) },
+                       { (int32)(224 *  0.615   * 4.0157), (int32)(224 * -0.51499 * 4.0157), (int32)(224 * -0.10001 * 4.0157) }
+               },      /*              A                               B                                       C */
+
+               /* IMG_CSC_RGB_TO_601_DIGITAL - RGB to be converted to ITU BT.601 YCbCr reduced scale */
+               {       /*      R                               G                                       B */
+                       { (int32)(219 *  0.299   * 4.0157), (int32)(219 *  0.587   * 4.0157), (int32)(219 *  0.114   * 4.0157) },
+                       { (int32)(224 * -0.172   * 4.0157), (int32)(224 * -0.339   * 4.0157), (int32)(224 *  0.511   * 4.0157) },
+                       { (int32)(224 *  0.511   * 4.0157), (int32)(224 * -0.428   * 4.0157), (int32)(224 * -0.083   * 4.0157) }
+               },      /*      A                                       B                               C */
+
+               /* IMG_CSC_RGB_TO_601_DIGITAL_FS - RGB to be converted to ITU BT.601 YCbCr full scale */
+               {       /*      R                               G                       B */
+                       { (int32)(219 *  0.257   * 4.0157), (int32)(219 *  0.504   * 4.0157), (int32)(219 *  0.098   * 4.0157) },
+                       { (int32)(224 * -0.148   * 4.0157), (int32)(224 * -0.291   * 4.0157), (int32)(224 *  0.439   * 4.0157) },
+                       { (int32)(224 *  0.439   * 4.0157), (int32)(224 * -0.368   * 4.0157), (int32)(224 * -0.071   * 4.0157) }
+               },      /*      A                               B                       C */
+
+               /* IMG_CSC_RGB_TO_709 - RGB to be converted to ITU BT.709 YUV */
+               {
+                       { (int32)(219 *  0.2215 * 4.0157), (int32)(219 *  0.7154 * 4.0157), (int32)(219 *  0.0721 * 4.0157) },
+                       { (int32)(224 * -0.1145 * 4.0157), (int32)(224 * -0.3855 * 4.0157), (int32)(224 *  0.5    * 4.0157) },
+                       { (int32)(224 *  0.5016 * 4.0157), (int32)(224 * -0.4556 * 4.0157), (int32)(224 * -0.0459 * 4.0157) }
+               },
+
+               /* IMG_CSC_YIQ_TO_601 - YIQ to be converted to ITU BT.601 YUV */
+               {
+                       { 1024,                           0,                            0 },
+                       {    0, (int32)(0.83885 * 1024), (int32)(-0.54475 * 1024) },
+                       {    0, (int32)(0.54484 * 1024), (int32)( 0.83896 * 1024) }
+               },
+
+               /* IMG_CSC_YIQ_TO_709 - YIQ to be converted to ITU BT.709 YUV */
+               {
+                       { 1024, (int32)(-0.20792 * 1024), (int32)( 0.07122 * 1024) },
+                       {    0, (int32)( 0.89875 * 1024), (int32)(-0.48675 * 1024) },
+                       {    0, (int32)( 0.64744 * 1024), (int32)( 0.80255 * 1024) }
+               },
+
+               /*
+                * IMG_CSC_BRG_TO_601 - RGB to be converted to ITU BT.601 YUV
+                * Entries have been reordered to provide support for xRGB format
+                */
+               {       /*            B                                   R                                       G      */
+                       { (int32)(219 *  0.114   * 4.0157), (int32)(219 *  0.299   * 4.0157), (int32)(219 *  0.587   * 4.0157)},
+                       { (int32)(224 *  0.446   * 4.0157), (int32)(224 * -0.14713 * 4.0157), (int32)(224 * -0.28886 * 4.0157)},
+                       { (int32)(224 * -0.10001 * 4.0157), (int32)(224 *  0.615   * 4.0157), (int32)(224 * -0.51499 * 4.0157)}
+               },      /*      A                                       B                               C */
+
+               /*
+                * IMG_CSC_RBG_TO_601 - RGB to be converted to ITU BT.601 YUV
+                * Entries have been reordered to provide support for xBGR format
+                */
+               {       /*                      R                          B                                    G       */
+                       { (int32)(219 *  0.299   * 4.0157), (int32)(219 *  0.114   * 4.0157), (int32)(219 *  0.587   * 4.0157)},
+                       { (int32)(224 * -0.14713 * 4.0157), (int32)(224 *  0.446   * 4.0157), (int32)(224 * -0.28886 * 4.0157)},
+                       { (int32)(224 *  0.615   * 4.0157), (int32)(224 * -0.10001 * 4.0157), (int32)(224 * -0.51499 * 4.0157)}
+               },      /*              A                                       B                               C */
+
+               /*
+                * IMG_CSC_BGR_TO_601 - RGB to be converted to ITU BT.601 YUV
+                * Entries have been reordered to provide support for BGRx format
+                */
+               {   /*                      B                                   G                                       R */
+                       { (int32)(219 *  0.114   * 4.0157), (int32)(219 *  0.587   * 4.0157), (int32)(219 *  0.299   * 4.0157)},
+                       { (int32)(224 *  0.446   * 4.0157), (int32)(224 * -0.28886 * 4.0157), (int32)(224 * -0.14713 * 4.0157)},
+                       { (int32)(224 * -0.10001 * 4.0157), (int32)(224 * -0.51499 * 4.0157), (int32)(224 *  0.615   * 4.0157)},
+               },  /*                      A                                   B                                       C */
+
+               /* IMG_CSC_UYV_TO_YUV - UYV to YUV */
+               {
+                       { 0, 1024, 0 },
+                       { 1024, 0, 0 },
+                       { 0, 0, 1024 }
+               },
+       };
+
+       uint32 index = csc_preset;
+       IMG_DBG_ASSERT(index < IMG_CSC_PRESETS);
+
+       if (index >= IMG_CSC_PRESETS)
+               return;
+
+# define SRC_MOD(X) TOPAZHP_EXT_CR_CSC_SOURCE_MOD_0 ## X
+# define OUT_MOD(X) TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_0 ## X
+
+# define SOURCE_Y_ARRAY csc_setup->csc_source_y
+# define SRC_Y_PARAM(X) TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_Y
+
+# define SOURCE_CbCr_ARRAY csc_setup->csc_source_cbcr
+# define SRC_CB_PARAM(X) TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CB
+# define SRC_CR_PARAM(X) TOPAZHP_EXT_CR_CSC_SOURCE_SRC_TO_CR
+
+# define CLIP_VALUE 255
+
+       scaler_setup->scaler_control |= F_ENCODE(1, TOPAZHP_EXT_CR_ENABLE_COLOUR_SPACE_CONVERSION);
+
+       csc_setup->csc_output_clip[0] = F_ENCODE(TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_00_ADD_1_16, OUT_MOD(0)) |
+                                       F_ENCODE(CLIP_VALUE, TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP) |
+                                       F_ENCODE(0, TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP);
+
+       csc_setup->csc_output_clip[1] = F_ENCODE(TOPAZHP_EXT_CR_CSC_OUTPUT_MOD_01_ADD_1_2, OUT_MOD(1)) |
+                                       F_ENCODE(CLIP_VALUE, TOPAZHP_EXT_CR_CSC_OUTPUT_MAX_CLIP) | F_ENCODE(0, TOPAZHP_EXT_CR_CSC_OUTPUT_MIN_CLIP);
+
+       SOURCE_Y_ARRAY[0] = F_ENCODE(source_mode[index][0], SRC_MOD(0)) |
+                               F_ENCODE(coeffs[index][0][0], SRC_Y_PARAM(0));
+       SOURCE_CbCr_ARRAY[0] = F_ENCODE(coeffs[index][1][0], SRC_CB_PARAM(0)) |
+                               F_ENCODE(coeffs[index][2][0], SRC_CR_PARAM(0));
+
+       SOURCE_Y_ARRAY[1] = F_ENCODE(source_mode[index][1], SRC_MOD(1)) |
+                               F_ENCODE(coeffs[index][0][1], SRC_Y_PARAM(1));
+       SOURCE_CbCr_ARRAY[1] = F_ENCODE(coeffs[index][1][1], SRC_CB_PARAM(1)) |
+                               F_ENCODE(coeffs[index][2][1], SRC_CR_PARAM(1));
+
+       SOURCE_Y_ARRAY[2] = F_ENCODE(source_mode[index][2], SRC_MOD(2)) |
+                               F_ENCODE(coeffs[index][0][2], SRC_Y_PARAM(2));
+       SOURCE_CbCr_ARRAY[2] = F_ENCODE(coeffs[index][1][2], SRC_CB_PARAM(2)) |
+                               F_ENCODE(coeffs[index][2][2], SRC_CR_PARAM(2));
+       }
+}
+
+/*
+ * Calculate buffer strides
+ */
+uint32 topaz_get_packed_buffer_strides(uint16 buffer_stride_bytes, enum img_format format,
+                                      osa_bool enable_scaler, osa_bool is_interlaced,
+                                      osa_bool is_interleaved)
+{
+       uint16 src_y_stride_bytes;
+       uint16 src_uv_stride_bytes = 0;
+
+       /* 3 Components: Y, U, V */
+       src_y_stride_bytes = buffer_stride_bytes;
+
+       switch(format) {
+               case IMG_CODEC_420_YUV:
+               case IMG_CODEC_420_PL8:
+               case IMG_CODEC_420_YV12:
+                       src_uv_stride_bytes = src_y_stride_bytes / 2;
+               break;
+
+               case IMG_CODEC_422_YUV:         /* Odd-numbered chroma rows unused if scaler not present */
+               case IMG_CODEC_422_YV12:        /* Odd-numbered chroma rows unused if scaler not present */
+               case IMG_CODEC_422_PL8:         /* Odd-numbered chroma rows unused if scaler not present */
+                       if (!enable_scaler)
+                               /* Skip alternate lines of chroma for 4:2:2 if scaler disabled/not present */
+                               src_uv_stride_bytes = src_y_stride_bytes;
+                       else
+                               src_uv_stride_bytes = src_y_stride_bytes / 2;
+               break;
+
+               case IMG_CODEC_422_IMC2:        /* Interleaved chroma pixels (and unused odd-numbered chroma rows if scaler not present) */
+               case IMG_CODEC_422_PL12:        /* Interleaved chroma rows (and unused odd-numbered chroma rows if scaler not present) */
+               case IMG_CODEC_422_PL21:        /* Interleaved chroma rows (and unused odd-numbered chroma rows if scaler not present) */
+                       if (!enable_scaler)
+                               /* Skip alternate lines of chroma for 4:2:2 if scaler disabled/not present */
+                               src_uv_stride_bytes = src_y_stride_bytes * 2;
+                       else
+                               src_uv_stride_bytes = src_y_stride_bytes;
+               break;
+
+               case IMG_CODEC_420_PL12:                /* Interleaved chroma pixels */
+               case IMG_CODEC_420_PL21:
+
+               case IMG_CODEC_420_PL12_PACKED: /* Interleaved chroma pixels */
+               case IMG_CODEC_420_PL21_PACKED: /* Interleaved chroma pixels */
+               case IMG_CODEC_420_IMC2:                /* Interleaved chroma rows */
+               case IMG_CODEC_Y0UY1V_8888:     /* Interleaved luma and chroma pixels */
+               case IMG_CODEC_Y0VY1U_8888:     /* Interleaved luma and chroma pixels */
+               case IMG_CODEC_UY0VY1_8888:     /* Interleaved luma and chroma pixels */
+               case IMG_CODEC_VY0UY1_8888:     /* Interleaved luma and chroma pixels */
+               case IMG_CODEC_ABCX:            /* Interleaved pixels of unknown colour space */
+               case IMG_CODEC_XBCA:            /* Interleaved pixels of unknown colour space */
+               case IMG_CODEC_ABC565:          /* Packed pixels of unknown coloour space */
+                       src_uv_stride_bytes = src_y_stride_bytes;
+               break;
+
+               case IMG_CODEC_444_YUV:         /* Unusable if scaler not present */
+               case IMG_CODEC_444_YV12:        /* Unusable if scaler not present */
+               case IMG_CODEC_444_PL8:         /* Unusable if scaler not present */
+                       src_uv_stride_bytes = src_y_stride_bytes;
+               break;
+
+               case IMG_CODEC_444_IMC2:        /* Interleaved chroma pixels (unusable if scaler not present) */
+               case IMG_CODEC_444_PL12:        /* Interleaved chroma rows (unusable if scaler not present) */
+               case IMG_CODEC_444_PL21:        /* Interleaved chroma rows (unusable if scaler not present) */
+                       src_uv_stride_bytes = src_y_stride_bytes * 2;
+               break;
+
+               default:
+               break;
+       }
+
+       if (is_interlaced && is_interleaved) {
+               src_y_stride_bytes *= 2;
+               src_uv_stride_bytes *= 2;
+       }
+       return F_ENCODE(src_y_stride_bytes >> 6, MTX_MSG_PICMGMT_STRIDE_Y) | F_ENCODE(src_uv_stride_bytes >> 6, MTX_MSG_PICMGMT_STRIDE_UV);
+}
+
+/*
+ * Setup the registers for scaling candidate motion vectors to take into account
+ * how far away (temporally) the reference pictures are
+ */
+#define RESTRICT16x16_FLAGS                            (0x1)
+#define RESTRICT8x8_FLAGS                              (0x2)
+
+void update_driver_mv_scaling(uint32 frame_num, uint32 ref0_num, uint32 ref1_num,
+                             uint32 pic_flags, uint32 *mv_calc_below_handle, uint32 *mv_calc_colocated_handle,
+                             uint32 *mv_calc_config_handle)
+{
+       uint32 mv_calc_config = 0;
+       uint32 mv_calc_colocated = F_ENCODE(0x10, TOPAZHP_CR_TEMPORAL_BLEND);
+       uint32 mv_calc_below = 0;
+
+       /* If b picture calculate scaling factor for colocated motion vectors */
+       if (pic_flags & ISINTERB_FLAGS) {
+               int32 tb, td, tx;
+               int32 dist_scale;
+
+               /* calculation taken from H264 spec */
+               tb = (frame_num * 2) - (ref1_num * 2);
+               td = (ref0_num  * 2) - (ref1_num * 2);
+               tx = (16384 + abs(td / 2)) / td;
+               dist_scale = (tb * tx + 32) >> 6;
+               if (dist_scale > 1023)
+                       dist_scale = 1023;
+
+               if (dist_scale < -1024)
+                       dist_scale = -1024;
+
+               mv_calc_colocated |= F_ENCODE(dist_scale, TOPAZHP_CR_COL_DIST_SCALE_FACT);
+
+               /*
+               * We assume the below temporal mvs are from the latest reference frame
+               * rather then the most recently encoded B frame (as Bs aren't reference)
+               * Fwd temporal is same as colocated mv scale
+               */
+               mv_calc_below |= F_ENCODE(dist_scale, TOPAZHP_CR_PIC0_DIST_SCALE_FACTOR);
+
+               /* Bkwd temporal needs to be scaled by the recipricol amount in the other direction */
+               tb = (frame_num * 2) - (ref0_num * 2);
+               td = (ref0_num  * 2) - (ref1_num * 2);
+               tx = (16384 + abs(td / 2)) / td;
+               dist_scale = (tb * tx + 32) >> 6;
+               if (dist_scale > 1023)
+                       dist_scale = 1023;
+
+               if (dist_scale < -1024)
+                       dist_scale = -1024;
+
+               mv_calc_below |= F_ENCODE(dist_scale, TOPAZHP_CR_PIC1_DIST_SCALE_FACTOR);
+       } else {
+               /* Don't scale the temporal below mvs */
+               mv_calc_below |= F_ENCODE(1 << 8, TOPAZHP_CR_PIC0_DIST_SCALE_FACTOR);
+
+               if(ref0_num != ref1_num) {
+                       int32 ref0_dist, ref1_dist;
+                       int32 scale;
+
+                       /*
+                       * Distance to second reference picture may be different when
+                       * using multiple reference frames on P. Scale based on difference
+                       * in temporal distance to ref pic 1 compared to distance to ref pic 0
+                       */
+                       ref0_dist = (frame_num - ref0_num);
+                       ref1_dist = (frame_num - ref1_num);
+                       scale    = (ref1_dist << 8) / ref0_dist;
+
+                       if (scale > 1023)
+                               scale = 1023;
+                       if (scale < -1024)
+                               scale = -1024;
+
+                       mv_calc_below |= F_ENCODE(scale, TOPAZHP_CR_PIC1_DIST_SCALE_FACTOR);
+               } else {
+                       mv_calc_below |= F_ENCODE(1 << 8, TOPAZHP_CR_PIC1_DIST_SCALE_FACTOR);
+               }
+       }
+
+       if(frame_num > 0) {
+               int32 ref0_distance, ref1_distance;
+               int32 jitter0, jitter1;
+
+               ref0_distance = abs((int32)frame_num - (int32)ref0_num);
+               ref1_distance = abs((int32)frame_num - (int32)ref1_num);
+
+               if(!(pic_flags & ISINTERB_FLAGS)) {
+                       jitter0 = ref0_distance * 1;
+                       jitter1 = jitter0 > 1 ? 1 : 2;
+               } else {
+                       jitter0 = ref1_distance * 1;
+                       jitter1 = ref0_distance * 1;
+               }
+
+               /* Hardware can only cope with 1 - 4 jitter factors */
+               jitter0 = (jitter0 > 4) ? 4 : (jitter0 < 1) ? 1 : jitter0;
+               jitter1 = (jitter1 > 4) ? 4 : (jitter1 < 1) ? 1 : jitter1;
+
+               /* Hardware can only cope with 1 - 4 jitter factors */
+               IMG_DBG_ASSERT(jitter0 > 0 && jitter0 <= 4 && jitter1 > 0 && jitter1 <= 4);
+
+               mv_calc_config |= F_ENCODE(jitter0 - 1, TOPAZHP_CR_MVCALC_IPE0_JITTER_FACTOR) |
+                               F_ENCODE(jitter1 - 1, TOPAZHP_CR_MVCALC_IPE1_JITTER_FACTOR);
+       }
+
+       mv_calc_config |= F_ENCODE(1, TOPAZHP_CR_MVCALC_DUP_VEC_MARGIN);
+       mv_calc_config |= F_ENCODE(7, TOPAZHP_CR_MVCALC_GRID_MB_X_STEP);
+       mv_calc_config |= F_ENCODE(13, TOPAZHP_CR_MVCALC_GRID_MB_Y_STEP);
+       mv_calc_config |= F_ENCODE(3, TOPAZHP_CR_MVCALC_GRID_SUB_STEP);
+       mv_calc_config |= F_ENCODE(1, TOPAZHP_CR_MVCALC_GRID_DISABLE);
+
+       mv_calc_config |= F_ENCODE(1, TOPAZHP_CR_MVCALC_NO_PSEUDO_DUPLICATES);
+
+       *mv_calc_below_handle = mv_calc_below;
+       *mv_calc_colocated_handle = mv_calc_colocated;
+       *mv_calc_config_handle = mv_calc_config;
+}
+
+void prepare_mv_estimates(struct img_enc_context *enc)
+{
+       struct img_video_context *vid_ctx = enc->video;
+       uint32 distance;
+       uint32 distance_b;
+       uint32 position;
+       struct img_mv_settings *host_mv_settings_b_table;
+       struct img_mv_settings *host_mv_settings_hierarchical;
+       osa_bool hierarchical;
+
+       /* IDR */
+       vid_ctx->mv_settings_idr.mv_calc_config = DEFAULT_MVCALC_CONFIG;        /* default based on TRM */
+       vid_ctx->mv_settings_idr.mv_calc_colocated = 0x00100100; /* default based on TRM */
+       vid_ctx->mv_settings_idr.mv_calc_below = 0x01000100;    /* default based on TRM */
+
+       update_driver_mv_scaling(0, 0, 0, 0, &vid_ctx->mv_settings_idr.mv_calc_below,
+       &vid_ctx->mv_settings_idr.mv_calc_colocated,
+       &vid_ctx->mv_settings_idr.mv_calc_config);
+
+       /* NonB (I or P) */
+       for (distance = 1; distance <= MAX_BFRAMES + 1; distance++) {
+               vid_ctx->mv_settings_non_b[distance - 1].mv_calc_config = DEFAULT_MVCALC_CONFIG;        /* default based on TRM */
+               vid_ctx->mv_settings_non_b[distance - 1].mv_calc_colocated = 0x00100100; /* default based on TRM */
+               vid_ctx->mv_settings_non_b[distance - 1].mv_calc_below = 0x01000100;    /* default based on TRM */
+
+               update_driver_mv_scaling(distance, 0, 0, 0, &vid_ctx->mv_settings_non_b[distance - 1].mv_calc_below,
+                                        &vid_ctx->mv_settings_non_b[distance - 1].mv_calc_colocated,
+                                        &vid_ctx->mv_settings_non_b[distance - 1].mv_calc_config);
+       }
+
+       hierarchical = (vid_ctx->mv_settings_hierarchical.cpu_virt != NULL);
+
+       host_mv_settings_b_table = (struct img_mv_settings *)(vid_ctx->mv_settings_btable.cpu_virt);
+
+       if (hierarchical)
+               host_mv_settings_hierarchical = (struct img_mv_settings *)(vid_ctx->mv_settings_hierarchical.cpu_virt);
+
+       for (distance_b = 0; distance_b < MAX_BFRAMES; distance_b++) {
+               for (position = 1; position <= distance_b + 1; position++) {
+                       struct img_mv_settings *mv_element = (struct img_mv_settings *) ((uint8 *)host_mv_settings_b_table +
+                                                               MV_OFFSET_IN_TABLE(distance_b, position - 1));
+
+                       mv_element->mv_calc_config = (DEFAULT_MVCALC_CONFIG | MASK_TOPAZHP_CR_MVCALC_GRID_DISABLE);    /* default based on TRM */
+
+                       mv_element->mv_calc_colocated = 0x00100100;/* default based on TRM */
+                       mv_element->mv_calc_below = 0x01000100; /* default based on TRM */
+
+                       update_driver_mv_scaling(position, distance_b + 2, 0, ISINTERB_FLAGS,
+                                                &mv_element->mv_calc_below,
+                                                &mv_element->mv_calc_colocated,
+                                                &mv_element->mv_calc_config);
+               }
+       }
+
+       if (hierarchical) {
+               for (distance_b = 0; distance_b < MAX_BFRAMES; distance_b++)
+                       osa_memcpy(host_mv_settings_hierarchical + distance_b, (uint8 *)host_mv_settings_b_table +
+                                  MV_OFFSET_IN_TABLE(distance_b, distance_b >> 1), sizeof(struct img_mv_settings));
+       }
+}
+
+/*
+ * Generates the video pic params template
+ */
+void adjust_pic_flags(struct img_enc_context *enc, struct img_rc_params *rc_params,
+                               osa_bool first_pic, uint32 *flags)
+{
+       uint32 flags_local;
+       struct img_video_context *video = enc->video;
+       struct pic_params *pic_params = &enc->video->pic_params;
+
+       flags_local = pic_params->flags;
+       video = enc->video;
+
+       if (!rc_params->rc_enable || (!first_pic))
+               flags_local = 0;
+
+       *flags = flags_local;
+}
+
+/*
+ * Sets up RC Data
+ */
+void setup_rc_data(struct img_video_context *video, struct pic_params *pic_params,
+                       struct img_rc_params *rc_params)
+{
+       int32   frame_rate, tmp_qp = 0;
+       double  bpp;
+       int32   buffer_size_in_frames;
+       int16   max_qp = MAX_QP_H264;
+       int16   min_qp = 0;
+
+       /* If Bit Rate and Basic Units are not specified then set to default values. */
+       if(rc_params->bits_per_second == 0 && !video->enable_mvc)
+               rc_params->bits_per_second = 640000; /* kbps */
+
+       if(!rc_params->bu_size)
+               rc_params->bu_size = (video->picture_height >> 4) * (video->width >> 4); /* BU = 1 Frame */
+
+       if(!rc_params->frame_rate)
+               rc_params->frame_rate = 30; /* fps */
+
+       /* Calculate Bits Per Pixel */
+       if(video->width <= 176 )
+               frame_rate      = 30;
+       else
+               frame_rate      = rc_params->frame_rate;
+
+       bpp = rc_params->bits_per_second / (frame_rate * video->width * video->frame_height);
+
+       pic_params->in_params.se_init_qp_i      = rc_params->initial_qp_i;
+
+       pic_params->in_params.mb_per_row        = (video->width >> 4);
+       pic_params->in_params.mb_per_bu         = rc_params->bu_size;
+       pic_params->in_params.mb_per_frm                = ((uint32)(video->width >> 4)) * (video->frame_height >> 4);
+       pic_params->in_params.bu_per_frm        = (pic_params->in_params.mb_per_frm) / rc_params->bu_size;
+
+       pic_params->in_params.intra_period      = rc_params->intra_freq;
+       pic_params->in_params.bframes           = rc_params->bframes;
+       pic_params->in_params.bit_rate          = rc_params->bits_per_second;
+
+       pic_params->in_params.frm_skip_disable = rc_params->disable_frame_skipping;
+
+       pic_params->in_params.bits_per_frm      = (rc_params->bits_per_second + rc_params->frame_rate / 2) / rc_params->frame_rate;
+
+       pic_params->in_params.bits_per_bu       = pic_params->in_params.bits_per_frm / (4 * pic_params->in_params.bu_per_frm);
+
+       /*Disable Vcm Hardware*/
+       pic_params->in_params.disable_vcm_hardware = rc_params->disable_vcm_hardware;
+       /* Codec-dependant fields */
+       if(video->standard == IMG_STANDARD_H264) {
+               pic_params->in_params.mode.h264.transfer_rate  = (rc_params->transfer_bits_per_second + rc_params->frame_rate / 2) / rc_params->frame_rate;
+               pic_params->in_params.mode.h264.hierarchical_mode =   rc_params->hierarchical;
+
+               pic_params->in_params.mode.h264.enable_slice_bob = (osa_bool)rc_params->enable_slice_bob;
+               pic_params->in_params.mode.h264.max_slice_bob = (uint8)rc_params->max_slice_bob;
+               pic_params->in_params.mode.h264.slice_bob_qp = (uint8)rc_params->slice_bob_qp;
+       }
+
+       if(pic_params->in_params.bits_per_frm) {
+               buffer_size_in_frames = (rc_params->buffer_size + (pic_params->in_params.bits_per_frm / 2)) / pic_params->in_params.bits_per_frm;
+       } else {
+               IMG_DBG_ASSERT(video->enable_mvc && "Can happen only in MVC mode");
+               /* Asigning more or less `normal` value. To be overriden by MVC RC module */
+               buffer_size_in_frames = 30;
+       }
+
+       /* select thresholds and initial Qps etc that are codec dependent */
+       switch (video->standard) {
+               case IMG_STANDARD_H264:
+                       /* Max Qp */
+                       pic_params->in_params.max_qp = (rc_params->max_qp > 0) && (rc_params->max_qp < max_qp) ? rc_params->max_qp : max_qp;
+                       tmp_qp = 4;
+                       min_qp = 2;
+
+                       if (tmp_qp < min_qp)
+                               pic_params->in_params.min_qp = min_qp;
+                       else
+                               pic_params->in_params.min_qp = tmp_qp;
+
+
+                       /* Calculate Initial QP if it has not been specified */
+                       tmp_qp = pic_params->in_params.se_init_qp_i;
+                       max_qp = 49;
+
+                       if(tmp_qp > max_qp)
+                               tmp_qp = max_qp;
+
+                       if(tmp_qp < pic_params->in_params.min_qp)
+                               tmp_qp = pic_params->in_params.min_qp;
+
+                       pic_params->in_params.se_init_qp_i = tmp_qp;
+               break;
+
+               default:
+                       /* the NO RC cases will fall here */
+               break;
+       }
+
+       if (video->rc_params.rc_mode == IMG_RCMODE_VBR) {
+               pic_params->in_params.mb_per_bu = pic_params->in_params.mb_per_frm;
+               pic_params->in_params.bu_per_frm        = 1;
+
+               /* Initialize the parameters of fluid flow traffic model. */
+               pic_params->in_params.buffer_size = rc_params->buffer_size;
+
+               /* VBR shouldn't skip frames */
+               pic_params->in_params.frm_skip_disable = osa_true;
+
+               /*
+                * These scale factor are used only for rate control to avoid overflow
+                * in fixed-point calculation these scale factors are decided by bit rate
+                */
+               if(rc_params->bits_per_second < 640000)
+                       pic_params->in_params.scale_factor  = 2; /* related to complexity */
+               else if(rc_params->bits_per_second < 2000000)    /* 2 Mbits */
+                       pic_params->in_params.scale_factor  = 4;
+               else if(rc_params->bits_per_second < 8000000)     /* 8 Mbits */
+                       pic_params->in_params.scale_factor  = 6;
+               else
+               pic_params->in_params.scale_factor  = 8;
+       } else {
+               /* Set up Input Parameters that are mode dependent */
+               switch (video->standard) {
+                       case IMG_STANDARD_H264:
+                               /*
+                               * H264 CBR RC: Initialize the parameters of fluid flow traffic model.
+                               */
+                               pic_params->in_params.buffer_size = rc_params->buffer_size;
+
+                               /* HRD consideration - These values are used by H.264 reference code. */
+                               if(rc_params->bits_per_second < 1000000)         /* 1 Mbits/s */
+                                       pic_params->in_params.scale_factor = 0;
+                               else if(rc_params->bits_per_second < 2000000)    /* 2 Mbits/s */
+                                       pic_params->in_params.scale_factor = 1;
+                               else if(rc_params->bits_per_second < 4000000)    /* 4 Mbits/s */
+                                       pic_params->in_params.scale_factor = 2;
+                               else if(rc_params->bits_per_second < 8000000)    /* 8 Mbits/s */
+                                       pic_params->in_params.scale_factor = 3;
+                               else
+                                       pic_params->in_params.scale_factor = 4;
+
+                               if(video->rc_params.rc_mode == IMG_RCMODE_VCM)
+                                       pic_params->in_params.buffer_size_frames = buffer_size_in_frames;
+                       break;
+
+                       default:
+                       break;
+               }
+       }
+
+       if(rc_params->sc_detect_disable)
+               pic_params->flags  |= ISSCENE_DISABLED;
+
+       pic_params->in_params.initial_delay     = rc_params->initial_delay;
+       pic_params->in_params.initial_level     = rc_params->initial_level;
+       rc_params->initial_qp_i                 = pic_params->in_params.se_init_qp_i;
+
+       /* The rate control uses this value to adjust the reaction rate to larger than expected frames */
+       if(video->standard == IMG_STANDARD_H264) {
+               if(pic_params->in_params.bits_per_frm) {
+                       const int32 bits_per_gop = (rc_params->bits_per_second / rc_params->frame_rate) * rc_params->intra_freq;
+
+                       pic_params->in_params.mode.h264.rc_scale_factor = (bits_per_gop * 256) /
+                                                               (pic_params->in_params.buffer_size - pic_params->in_params.initial_level);
+               } else {
+                       pic_params->in_params.mode.h264.rc_scale_factor = 0;
+               }
+       }
+}
+
+void topaz_setup_input_format(struct img_video_context *video, struct img_vxe_scaler_setup *scaler_setup)
+{
+       const uint32 scaler_coeff_regs_no_crop[] = {4261951490, 4178589440,
+                                                       4078580480, 4045614080};
+
+       if (video->enable_scaler) {
+               uint32 pitch_x, pitch_y;
+               int32 phase;
+
+               pitch_x = (((uint32)(video->source_width - video->crop_left -
+                            video->crop_right)) << 13) / video->unrounded_width;
+
+               pitch_y = (((uint32)(video->source_frame_height - video->crop_top -
+                            video->crop_bottom)) << 13) / video->unrounded_frame_height;
+
+               /* Input size */
+               scaler_setup->scaler_input_size_reg = F_ENCODE(video->source_width - 1,
+                                                              TOPAZHP_EXT_CR_SCALER_INPUT_WIDTH_MIN1) |
+                                                              F_ENCODE((video->source_frame_height >>
+                                                              (video->is_interlaced ? 1 : 0)) - 1,
+                                                              TOPAZHP_EXT_CR_SCALER_INPUT_HEIGHT_MIN1);
+
+               scaler_setup->scaler_crop_reg = F_ENCODE(video->crop_left, TOPAZHP_EXT_CR_SCALER_INPUT_CROP_HOR) |
+                                               F_ENCODE(video->crop_top, TOPAZHP_EXT_CR_SCALER_INPUT_CROP_VER);
+
+               /* Scale factors */
+               scaler_setup->scaler_pitch_reg = 0;
+
+               if (pitch_x > 0x7FFF) {
+                       scaler_setup->scaler_pitch_reg |= F_ENCODE(1, TOPAZHP_EXT_CR_SCALER_HOR_BILINEAR_FILTER);
+                       pitch_x >>= 1;
+               }
+
+               if (pitch_x > 0x7FFF)
+                       pitch_x = 0x7FFF;
+
+               if (pitch_y > 0x7FFF) {
+                       scaler_setup->scaler_pitch_reg |= F_ENCODE(1, TOPAZHP_EXT_CR_SCALER_VER_BILINEAR_FILTER);
+                       pitch_y >>= 1;
+               }
+
+               if (pitch_y > 0x7FFF)
+                       pitch_y = 0x7FFF;
+
+               scaler_setup->scaler_pitch_reg |=
+                               F_ENCODE(pitch_x, TOPAZHP_EXT_CR_SCALER_INPUT_HOR_PITCH) |
+                               F_ENCODE(pitch_y, TOPAZHP_EXT_CR_SCALER_INPUT_VER_PITCH);
+
+               /*
+               * Coefficients
+               * With no crop, the coefficients remain the same.
+               * If crop is desired, new values will need to be calculated.
+               */
+               for (phase = 0; phase < 4; phase++) {
+                       scaler_setup->hor_scaler_coeff_regs[phase] = scaler_coeff_regs_no_crop[phase];
+       }
+
+       for (phase = 0; phase < 4; phase++) {
+               scaler_setup->ver_scaler_coeff_regs[phase] = scaler_coeff_regs_no_crop[phase];
+       }
+
+       scaler_setup->scaler_control =F_ENCODE(1, TOPAZHP_EXT_CR_SCALER_ENABLE);
+
+       switch (video->format) {
+               case IMG_CODEC_420_YUV:
+               case IMG_CODEC_420_PL8:
+               case IMG_CODEC_420_YV12:
+               case IMG_CODEC_420_IMC2:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL111YCBCR8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_420_PL12:
+               case IMG_CODEC_420_PL12_PACKED:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL12YCBCR8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_420_PL21:
+               case IMG_CODEC_420_PL21_PACKED:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_420PL12YCRCB8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_422_YUV:
+               case IMG_CODEC_422_PL8:
+               case IMG_CODEC_422_YV12:
+               case IMG_CODEC_422_IMC2:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL111YCBCR8,
+                                               TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_422_PL12:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL12YCBCR8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_422_PL21:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422PL12YCRCB8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_Y0UY1V_8888:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422IL3YCBYCR8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_Y0VY1U_8888:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422IL3YCRYCB8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_UY0VY1_8888:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422IL3CBYCRY8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_VY0UY1_8888:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_422IL3CRYCBY8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_444_YUV:
+               case IMG_CODEC_444_PL8:
+               case IMG_CODEC_444_YV12:
+               case IMG_CODEC_444_IMC2:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL111YCBCR8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_444_PL12:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL12YCBCR8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_444_PL21:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444PL12YCRCB8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_ABCX:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444IL4ABCX8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_XBCA:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444IL4XBCA8,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               case IMG_CODEC_ABC565:
+                       scaler_setup->input_scaler_control =
+                                       F_ENCODE(TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT_444IL3RGB565,
+                                                TOPAZHP_EXT_CR_INPUT_FRAME_STORE_FORMAT);
+               break;
+               default:
+               break;
+               }
+       } else {
+               /* Disable Scaling */
+               scaler_setup->scaler_control = 0;
+       }
+}
diff --git a/driver/encoder/topaz_api_utils.h b/driver/encoder/topaz_api_utils.h
new file mode 100644 (file)
index 0000000..00b5f3a
--- /dev/null
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * topaz utility header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "osal/inc/osa_types.h"
+#include "topaz_api.h"
+
+/*
+ * Calculates the correct number of macroblocks per kick and kicks per BU
+ */
+void calculate_kick_and_bu_size(uint32 width_in_mbs, uint32 height_in_mbs, osa_bool is_interlaced, uint32 max_bu_per_frame,
+                               uint32 *kick_size, uint32 *kicks_per_bu,  uint32 *min_slice_height);
+
+uint32 calculate_stride(enum img_format format, uint16 requested_stride_bytes, uint16 width);
+
+void topaz_setup_input_format(struct img_video_context *video, struct img_vxe_scaler_setup *scaler_setup);
+
+void topaz_setup_input_csc(struct img_video_context *video, struct img_vxe_scaler_setup *scaler_setup,
+                          struct img_vxe_csc_setup *csc_setup, enum img_csc_preset csc_preset);
+
+uint32 topaz_get_packed_buffer_strides(uint16 buffer_stride_bytes, enum img_format format,
+                                      osa_bool enable_scaler, osa_bool is_interlaced,
+                                      osa_bool is_interleaved);
+
+void prepare_mv_estimates(struct img_enc_context *enc);
+
+void adjust_pic_flags(struct img_enc_context *enc, struct img_rc_params *prc_params,
+                     osa_bool first_pic, uint32 *flags);
+
+void setup_rc_data(struct img_video_context *video, struct pic_params *pic_params,
+                  struct img_rc_params *rc_params);
+
+void patch_hw_profile(struct img_video_params *video_params, struct img_video_context *video);
diff --git a/driver/encoder/topaz_color_formats.h b/driver/encoder/topaz_color_formats.h
new file mode 100644 (file)
index 0000000..8eb3857
--- /dev/null
@@ -0,0 +1,101 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * buffer sizes calculation
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "topaz_api.h"
+#include "fw_headers/defs.h"
+
+void plane_size(enum img_format color_format, uint32 stride,
+               uint32 height, uint32 *y_size, uint32 *u_size,
+               uint32 *v_size)
+{
+       *y_size = *u_size = *v_size = 0;
+
+       switch (color_format) {
+               case IMG_CODEC_420_PL8:
+                       /* allocate frame for 4:2:0 planar format */
+                       *y_size = stride * height;
+                       *u_size = stride * height / 4;
+                       *v_size = stride * height / 4;
+                       break;
+               case IMG_CODEC_420_PL12:
+                       /* allocate frame for 4:2:0 planar format (chroma interleaved) */
+                       *y_size = stride * height;
+                       *u_size = stride * height / 2;
+                       break;
+               case IMG_CODEC_422_YUV:
+               case IMG_CODEC_422_YV12:
+               case IMG_CODEC_422_IMC2:
+                       /* allocate frame for 4:2:2 format */
+                       *y_size = stride * height * 2;
+                       break;
+               case IMG_CODEC_422_PL8:
+                       /* allocate frame for 4:2:2 planar format */
+                       *y_size = stride * height;
+                       *u_size = stride * height / 2;
+                       *v_size = stride * height / 2;
+                       break;
+               case IMG_CODEC_422_PL12:
+                       /* allocate frame for 4:2:2 planar format (chroma interleaved) */
+                       *y_size = stride * height;
+                       *u_size = stride * height;
+                       break;
+               case IMG_CODEC_Y0UY1V_8888:
+               case IMG_CODEC_UY0VY1_8888:
+               case IMG_CODEC_Y0VY1U_8888:
+               case IMG_CODEC_VY0UY1_8888:
+                       /* allocate frame for 4:2:2 format */
+                       *y_size = stride * height;
+                       break;
+               case IMG_CODEC_444_YUV:
+               case IMG_CODEC_444_YV12:
+               case IMG_CODEC_444_IMC2:
+                       /* allocate frame for 4:2:2 format */
+                       *y_size = stride * height * 3;
+                       break;
+               case IMG_CODEC_444_PL8:
+                       /* allocate frame for 4:2:2 planar format */
+                       *y_size = stride * height;
+                       *u_size = stride * height;
+                       *v_size = stride * height;
+                       break;
+               case IMG_CODEC_444_PL12:
+                       /* allocate frame for 4:2:2 planar format (chroma interleaved) */
+                       *y_size = stride * height;
+                       *u_size = stride * height * 2;
+                       break;
+               case IMG_CODEC_ABCX:
+               case IMG_CODEC_XBCA:
+               case IMG_CODEC_ABC565:
+                       /* allocate frame for RGB interleaved format */
+                       *y_size = stride * height;
+                       break;
+               case IMG_CODEC_420_YUV:
+               case IMG_CODEC_420_YV12:
+               case IMG_CODEC_420_IMC2:
+               case IMG_CODEC_420_PL12_PACKED:
+               case IMG_CODEC_420_PL21_PACKED:
+                       /* allocate frame for 4:2:0 format */
+                       *y_size = stride * height * 3 / 2;
+                       break;
+               default:
+                       *y_size = 0;
+                       *u_size = 0;
+                       *v_size = 0;
+                       break;
+       }
+       return;
+}
diff --git a/driver/encoder/topaz_device.c b/driver/encoder/topaz_device.c
new file mode 100644 (file)
index 0000000..07bb64e
--- /dev/null
@@ -0,0 +1,1478 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Encoder device function implementations
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "fw_headers/defs.h"
+#include "fw_headers/vxe_common.h"
+#include "img_errors.h"
+#include "osal/inc/osa_define.h"
+#include "osal/inc/osa_delay.h"
+#include "osal/inc/osa_event.h"
+#include "osal/inc/osa_mem.h"
+#include "osal/inc/osa_string.h"
+#include "osal/inc/osa_spin.h"
+#include "osal/inc/osa_mutex.h"
+#include "osal/inc/osa_workqueue.h"
+#include "target.h"
+#include "target_config.h"
+#include "topaz_device.h"
+#include "topazmmu.h"
+#include "vid_buf.h"
+#include "vxe_public_regdefs.h"
+
+#ifdef DEBUG_ENCODER_DRIVER
+static char command_string[][38] =
+{
+       "MTX_CMDID_NULL",
+       "MTX_CMDID_SHUTDOWN",
+       "MTX_CMDID_DO_HEADER",
+       "MTX_CMDID_ENCODE_FRAME",
+       "MTX_CMDID_START_FRAME",
+       "MTX_CMDID_ENCODE_SLICE",
+       "MTX_CMDID_END_FRAME",
+       "MTX_CMDID_SETVIDEO",
+       "MTX_CMDID_GETVIDEO",
+       "MTX_CMDID_DO_CHANGE_PIPEWORK",
+#if SECURE_IO_PORTS
+       "MTX_CMDID_SECUREIO",
+#endif
+       "MTX_CMDID_PICMGMT",
+       "MTX_CMDID_RC_UPDATE",
+       "MTX_CMDID_PROVIDE_SOURCE_BUFFER",
+       "MTX_CMDID_PROVIDE_REF_BUFFER",
+       "MTX_CMDID_PROVIDE_CODEDPACKAGE_BUFFER",
+       "MTX_CMDID_ABORT",
+       "MTX_CMDID_SETQUANT",
+       "MTX_CMDID_SETUP_INTERFACE",
+       "MTX_CMDID_ISSUEBUFF",
+       "MTX_CMDID_SETUP",
+       "MTX_CMDID_UPDATE_SOURCE_FORMAT",
+       "MTX_CMDID_UPDATE_CSC",
+       "MTX_CMDID_ENDMARKER"
+};
+#endif
+
+extern void topazkm_pfnDevPowerPreS5(void * hDevHandle, void *pvDevInstanceData);
+extern void topazkm_pfnDevPowerPostS0(void * hDevHandle, void *pvDevInstanceData);
+extern uint32 mmu_control_val;
+extern int use_secure_fw_upload;
+
+#define TOPAZ_DEV_SPIN_LOCK_NAME  "topaz_dev"
+#define MAX_TOPAZ_CMD_COUNT       (0x1000) /* max syncStatus value used (at least 4 * MAX_TOPAZ_CMDS_QUEUED) */
+
+#define COMM_WB_DATA_BUF_SIZE     (64)
+
+/* Sempahore locks */
+#define COMM_LOCK_TX          0x01
+#define COMM_LOCK_RX          0x02
+#define COMM_LOCK_BOTH        (COMM_LOCK_TX | COMM_LOCK_RX)
+
+static uint32 topaz_timeout_retries = 817000;
+
+#define TOPAZ_TIMEOUT_JPEG    (50000)
+#define TOPAZ_TIMEOUT_RETRIES (topaz_timeout_retries)
+
+uint16 g_load_method = MTX_LOADMETHOD_DMA; /* This is the load method used */
+
+uint32 g_core_rev;
+uint32 g_core_des1;
+void *g_lock = NULL;
+
+struct vidio_ddbufinfo *g_aps_wb_data_info;
+
+static uint8 g_pipe_usage[TOPAZHP_MAX_NUM_PIPES] = { 0 };
+
+/* Order MUST match with topaz_mem_space_idx enum */
+struct mem_space topaz_mem_space[] =
+{
+       /* Multicore sync RAM */
+       { "REG_TOPAZHP_MULTICORE",        MEMSPACE_REGISTER, {{0x00000000, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_DMAC",                     MEMSPACE_REGISTER, {{0x00000400, 0x000000ff, TARGET_NO_IRQ}}},
+       { "REG_COMMS",                    MEMSPACE_REGISTER, {{0x00000500, 0x000000ff, TARGET_NO_IRQ}}},
+       { "REG_MTX",                      MEMSPACE_REGISTER, {{0x00000800, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_MMU",                      MEMSPACE_REGISTER, {{0x00000C00, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_TEST",             MEMSPACE_REGISTER, {{0xFFFF0000, 0x000001ff, TARGET_NO_IRQ}}},
+       { "REGMTXRAM",                    MEMSPACE_REGISTER, {{0x80000000, 0x0000ffff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_CORE_0",           MEMSPACE_REGISTER, {{0x00001000, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_VLC_CORE_0",       MEMSPACE_REGISTER, {{0x00001400, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_DEBLOCKER_CORE_0", MEMSPACE_REGISTER, {{0x00001800, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_COREEXT_0",        MEMSPACE_REGISTER, {{0x00001C00, 0x000003ff, TARGET_NO_IRQ}}},
+
+       { "REG_TOPAZHP_CORE_1",           MEMSPACE_REGISTER, {{0x00002000, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_VLC_CORE_1",       MEMSPACE_REGISTER, {{0x00002400, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_DEBLOCKER_CORE_1", MEMSPACE_REGISTER, {{0x00002800, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_COREEXT_1",        MEMSPACE_REGISTER, {{0x00002C00, 0x000003ff, TARGET_NO_IRQ}}},
+
+       { "REG_TOPAZHP_CORE_2",           MEMSPACE_REGISTER, {{0x00003000, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_VLC_CORE_2",       MEMSPACE_REGISTER, {{0x00003400, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_DEBLOCKER_CORE_2", MEMSPACE_REGISTER, {{0x00003800, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_COREEXT_2",        MEMSPACE_REGISTER, {{0x00003C00, 0x000003ff, TARGET_NO_IRQ}}},
+
+       { "REG_TOPAZHP_CORE_3",           MEMSPACE_REGISTER, {{0x00004000, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_VLC_CORE_3",       MEMSPACE_REGISTER, {{0x00004400, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_DEBLOCKER_CORE_3", MEMSPACE_REGISTER, {{0x00004800, 0x000003ff, TARGET_NO_IRQ}}},
+       { "REG_TOPAZHP_COREEXT_3",        MEMSPACE_REGISTER, {{0x00004C00, 0x000003ff, TARGET_NO_IRQ}}},
+
+       { "FW",                           MEMSPACE_MEMORY,   {{0x00000000, 0x00800000, 0            }}},
+       { "SYSMEM",                       MEMSPACE_MEMORY,   {{0x00000000, 0,          0            }}},
+       { "MEMSYSMEM",                    MEMSPACE_MEMORY,   {{0x00000000, 0,          0            }}},
+       { "MEM",                          MEMSPACE_MEMORY,   {{0x00000000, 0,          0            }}},
+       { "FB",                           MEMSPACE_MEMORY,   {{0x00000000, 0,          0            }}},
+       { "MEMDMAC_00",                   MEMSPACE_MEMORY,   {{0x00000000, 0,          0            }}},
+       { "MEMDMAC_01",                   MEMSPACE_MEMORY,   {{0x00000000, 0,          0            }}},
+       { "MEMDMAC_02",                   MEMSPACE_MEMORY,   {{0x00000000, 0,          0            }}},
+};
+
+#define MEMORYSPACES_NUM (sizeof(topaz_mem_space)/sizeof(struct mem_space))
+
+static struct target_config topaz_target_config =
+{
+    MEMORYSPACES_NUM,
+    &topaz_mem_space[0]
+};
+
+/*
+ * topazdd_int_enable
+ */
+static void topazdd_int_enable(struct topaz_dev_ctx * ctx, uint32 mask)
+{
+       uint32 reg;
+       ulong flags;
+
+       osa_spin_lock_irqsave(ctx->lock, &flags);
+
+       /* config interrupts on Topaz core */
+       reg = VXE_RD_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_HOST_INT_ENAB);
+
+       /* set enable interrupt bits */
+       reg |= mask;
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_HOST_INT_ENAB, reg);
+
+       osa_spin_unlock_irqrestore(ctx->lock, flags);
+}
+
+/*
+ * topazdd_int_disable
+ */
+static void topazdd_int_disable(struct topaz_dev_ctx * ctx, uint32 mask)
+{
+       uint32 reg;
+       ulong flags;
+
+       osa_spin_lock_irqsave(ctx->lock, &flags);
+
+       /* config interrupts on Topaz core */
+       reg = VXE_RD_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_HOST_INT_ENAB);
+
+       /* clear enable interrupt bits */
+       reg &= ~mask;
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_HOST_INT_ENAB, reg);
+
+       osa_spin_unlock_irqrestore(ctx->lock, flags);
+}
+
+/*
+ * Get the number of pipes present
+ */
+uint32 topazdd_get_num_pipes(struct topaz_dev_ctx * ctx)
+{
+       static uint32 g_pipes_avail = 0;
+
+       if (ctx->multi_core_mem_addr == NULL)
+               return 0;
+
+       if (g_pipes_avail == 0) {
+               /* get the actual number of cores */
+               g_pipes_avail = VXE_RD_REG32(ctx->multi_core_mem_addr,
+                                            TOPAZHP_TOP_CR_MULTICORE_HW_CFG);
+               g_pipes_avail = (g_pipes_avail & MASK_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED);
+               IMG_DBG_ASSERT(g_pipes_avail != 0);
+       }
+
+       return g_pipes_avail;
+}
+
+uint32 topazdd_get_core_rev(void)
+{
+       return g_core_rev;
+}
+
+uint32 topazdd_get_core_des1(void)
+{
+       return g_core_des1;
+}
+
+static void wbfifo_clear(struct img_comm_socket *sock)
+{
+       sock->in_fifo_producer = 0;
+       sock->in_fifo_consumer = 0;
+}
+
+static osa_bool wbfifo_add(struct img_comm_socket *sock, struct img_writeback_msg *msg)
+{
+       uint32 new_producer = sock->in_fifo_producer + 1;
+
+       if (new_producer == COMM_INCOMING_FIFO_SIZE)
+               new_producer = 0;
+
+       if (new_producer == sock->in_fifo_consumer)
+               return osa_false;
+
+       osa_memcpy(&sock->in_fifo[sock->in_fifo_producer], msg, sizeof(struct img_writeback_msg));
+
+       sock->in_fifo_producer = new_producer;
+
+       return osa_true;
+}
+
+static osa_bool wbfifo_is_empty(struct img_comm_socket *sock)
+{
+       return (sock->in_fifo_producer == sock->in_fifo_consumer);
+}
+
+static osa_bool wbfifo_get(struct img_comm_socket *sock, struct img_writeback_msg *msg)
+{
+       if (wbfifo_is_empty(sock))
+               return osa_false;
+
+       osa_memcpy(msg, &sock->in_fifo[sock->in_fifo_consumer], sizeof(struct img_writeback_msg));
+
+       sock->in_fifo_consumer++;
+
+       if (sock->in_fifo_consumer == COMM_INCOMING_FIFO_SIZE)
+                sock->in_fifo_consumer = 0;
+
+        return osa_true;
+}
+
+osa_bool topazdd_is_idle(struct img_comm_socket *sock)
+{
+        if ((sock->msgs_sent == sock->ack_recv) && wbfifo_is_empty(sock))
+                return osa_true;
+
+        return osa_false;
+}
+
+static void set_auto_clock_gating(struct topaz_dev_ctx *ctx, struct img_fw_context *fw_ctx, uint8 gating)
+{
+       uint32 reg;
+
+       reg = F_ENCODE(1, TOPAZHP_TOP_CR_WRITES_CORE_ALL);
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CORE_SEL_0, reg);
+
+       reg = F_ENCODE(gating, TOPAZHP_CR_TOPAZHP_IPE0_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_IPE1_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_SPE0_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_SPE1_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_H264COMP4X4_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_H264COMP8X8_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_H264COMP16X16_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_JMCOMP_AUTO_CLK_GATE)|
+               F_ENCODE(gating, TOPAZHP_CR_TOPAZHP_VLC_AUTO_CLK_GATE) |
+               F_ENCODE(gating, TOPAZHP_CR_TOPAZHP_DEB_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_PC_DM_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_PC_DMS_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_CABAC_AUTO_CLK_GATE) |
+               F_ENCODE(gating,TOPAZHP_CR_TOPAZHP_INPUT_SCALER_AUTO_CLK_GATE);
+
+       VXE_WR_REG32(ctx->hp_core_reg_addr[0], TOPAZHP_CR_TOPAZHP_AUTO_CLOCK_GATING, reg);
+
+       reg = 0;
+       reg = VXE_RD_REG32(ctx->hp_core_reg_addr[0], TOPAZHP_CR_TOPAZHP_MAN_CLOCK_GATING);
+
+       /* Disable LRITC clocks */
+       reg = F_INSERT(reg, 1, TOPAZHP_CR_TOPAZHP_LRITC_MAN_CLK_GATE);
+
+       VXE_WR_REG32(ctx->hp_core_reg_addr[0], TOPAZHP_CR_TOPAZHP_MAN_CLOCK_GATING, reg);
+
+       reg = F_ENCODE(0, TOPAZHP_TOP_CR_WRITES_CORE_ALL);
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CORE_SEL_0, reg);
+}
+
+static void comm_lock(struct topaz_dev_ctx *ctx, uint32 flags)
+{
+       if (flags & COMM_LOCK_TX)
+               osa_mutex_lock(ctx->comm_tx_mutex);
+
+       if (flags & COMM_LOCK_RX)
+               osa_mutex_lock(ctx->comm_rx_mutex);
+}
+
+
+static void comm_unlock(struct topaz_dev_ctx *ctx, uint32 flags)
+{
+       if (flags & COMM_LOCK_RX)
+               osa_mutex_unlock(ctx->comm_rx_mutex);
+
+       if (flags & COMM_LOCK_TX)
+               osa_mutex_unlock(ctx->comm_tx_mutex);
+}
+
+int32 comm_prepare_fw(struct img_fw_context *fw_ctx, enum img_codec codec)
+{
+       if (fw_ctx->populated || fw_ctx->initialized)
+               return IMG_SUCCESS;
+
+       return mtx_populate_fw_ctx(codec, fw_ctx);
+}
+
+static uint32 H264_RCCONFIG_TABLE_5[27] = { 0x00000007, 0x00000006, 0x00000006, 0x00000006, 0x00000006, 0x00000005, 0x00000005, 0x00000005, 0x00000005,
+0x00000005, 0x00000005, 0x00000004, 0x00000004, 0x00000004, 0x00000004, 0x00000004, 0x00000004, 0x00000004, 0x00000004, 0x00000005, 0x00000005, 0x00000005,
+0x00000005, 0x00000005, 0x00000005, 0x00000006, 0x00000006 };
+
+static uint32 H264_RCCONFIG_TABLE_6[27] = { 0x00000018, 0x00000018, 0x00000018, 0x00000018, 0x00000018, 0x00000018, 0x00000018, 0x00000018, 0x00000024,
+0x00000030, 0x00000030, 0x0000003c, 0x0000003c, 0x00000048, 0x00000048, 0x00000054, 0x00000060, 0x0000006c, 0x000000c8, 0x00000144, 0x00000180, 0x00000210,
+0x000002a0, 0x00000324, 0x0000039c, 0x00000414, 0x00000450 };
+
+static uint32 H264_RCCONFIG_TABLE_7[27] = { 0x00000014, 0x00000014, 0x00000014, 0x00000014, 0x00000014, 0x00000014, 0x00000032, 0x00000064, 0x000000d2,
+0x000001a4, 0x000001a4, 0x000001bd, 0x000001d6, 0x000001ef, 0x00000208, 0x00000217, 0x00000226, 0x0000023a, 0x000002cb, 0x0000035c, 0x00000384, 0x000003e8,
+0x000004b0, 0x00000578, 0x00000640, 0x00000708, 0x000007d0 };
+
+static uint32 MPEG_RCCONFIG_TABLE_7[17] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000003c, 0x000000b4, 0x0000012c,
+0x000001a4, 0x0000021c, 0x00000294, 0x0000030c, 0x00000384, 0x000003fc, 0x00000474, 0x000004ec };
+
+/*
+ * Load the tables for H.264
+ */
+void comm_load_h264_tables(struct topaz_dev_ctx *ctx)
+{
+       int32 n;
+       uint32 pipe, pipe_cnt;
+
+       pipe_cnt = topazdd_get_num_pipes(ctx);
+
+       for (n=26; n>=0; n--) {
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_RC_CONFIG_TABLE4, 0);
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_RC_CONFIG_TABLE5, H264_RCCONFIG_TABLE_5[n]);
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_RC_CONFIG_TABLE6, H264_RCCONFIG_TABLE_6[n]);
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_RC_CONFIG_TABLE7, H264_RCCONFIG_TABLE_7[n]);
+       }
+
+       for (pipe = 0; pipe < pipe_cnt; pipe++) {
+               VXE_WR_REG32(ctx->hp_core_reg_addr[pipe], TOPAZHP_CR_RC_CONFIG_REG8, 0x00000006);
+               VXE_WR_REG32(ctx->hp_core_reg_addr[pipe], TOPAZHP_CR_RC_CONFIG_REG9, 0x00000406);
+       }
+}
+
+/*
+ * Load the tables for mpeg4
+ */
+void comm_load_tables(struct topaz_dev_ctx *ctx)
+{
+       int32 n;
+       uint32 pipe;
+
+       for (n = 16; n > 0; n--) {
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_RC_CONFIG_TABLE4, 0);
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_RC_CONFIG_TABLE6, 0);
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_RC_CONFIG_TABLE7, MPEG_RCCONFIG_TABLE_7[n]);
+       }
+
+       for (pipe = 0; pipe < topazdd_get_num_pipes(ctx); pipe++)
+               VXE_WR_REG32(ctx->hp_core_reg_addr[pipe], TOPAZHP_CR_RC_CONFIG_REG8, 0x00000006);
+}
+
+/*
+ * Load bias tables
+ */
+static int32 comm_load_bias(struct topaz_dev_ctx *ctx, uint32 codec_mask)
+{
+       if ((codec_mask & CODEC_MASK_H263) || (codec_mask & CODEC_MASK_MPEG2) || (codec_mask & CODEC_MASK_MPEG4))
+               comm_load_tables(ctx);
+
+       if ((codec_mask & CODEC_MASK_H264) || (codec_mask & CODEC_MASK_H264MVC))
+               comm_load_h264_tables(ctx);
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * Loads MTX firmware
+ */
+void topaz_setup_firmware(struct topaz_dev_ctx *ctx,
+                         struct img_fw_context *fw_ctx,
+                         enum mtx_load_method load_method,
+                         enum img_codec codec, uint8 num_pipes)
+{
+       uint32 reg;
+       int32 ret;
+
+       fw_ctx->initialized = osa_false;
+
+       /* Reset the MTXs and Upload the code. */
+       /* start each MTX in turn MUST start with master to enable comms to other cores */
+
+#if SECURE_IO_PORTS
+       if (!use_secure_fw_upload) {
+               /* reset SECURE_CONFIG register to allow loading FW without security. Default option is secure. */
+               uint32 secure_reg = 0x000F0F0F;
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_SECURE_CONFIG, secure_reg);
+       }
+#endif
+
+       ret = comm_prepare_fw(fw_ctx, codec);
+
+       if (ret != IMG_SUCCESS) {
+               OSA_PR_ERR("Failed to populate firmware context. Error code: %i\n", ret);
+               return;
+       }
+
+       /* initialise the MTX */
+       mtx_initialize(ctx, fw_ctx);
+
+       /* clear TOHOST register now so that our ISR doesn't see any intermediate value before the FW has output anything */
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_FIRMWARE_REG_1 + (MTX_SCRATCHREG_TOHOST << 2), 0);
+
+       /* clear BOOTSTATUS register.  Firmware will write to this to indicate firmware boot progress */
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_FIRMWARE_REG_1 + (MTX_SCRATCHREG_BOOTSTATUS << 2), 0);
+
+       /* Soft reset of MTX */
+       reg = 0;
+       reg = F_ENCODE(1, TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET) | F_ENCODE(1,TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET);
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_SRST, reg);
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_SRST, 0x0);
+
+       if (fw_ctx->initialized == osa_true) {
+               set_auto_clock_gating(ctx, fw_ctx, 1);
+               mtx_load(ctx, fw_ctx, load_method);
+
+               /* flush the command FIFO */
+               reg = 0;
+               reg = F_ENCODE(1, TOPAZHP_TOP_CR_CMD_FIFO_FLUSH );
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_TOPAZ_CMD_FIFO_FLUSH, reg);
+
+               if (use_secure_fw_upload)
+                       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE, mmu_control_val);
+               else
+                       /* we do not want to run in secre FW mode so write a place holder to the FIFO that the firmware will know to ignore */
+                       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE, TOPAZHP_NON_SECURE_FW_MARKER);
+
+               /* Clear FW_IDLE_STATUS register */
+               VXE_WR_REG32(ctx->multi_core_mem_addr, MTX_SCRATCHREG_IDLE, 0);
+
+               /* turn on MTX */
+               mtx_start(fw_ctx);
+               /* get MTX Clk Freq */
+
+               mtx_kick(fw_ctx, 1);
+
+               /*
+                * We do not need to do this POLL here as it is safe to continue without it.
+                * We do it because it serves to warn us that there is a problem if the firmware doesn't start for some reason
+                */
+               VXE_POLL_REG32_ISEQ(ctx->multi_core_mem_addr,
+                                   TOPAZHP_TOP_CR_FIRMWARE_REG_1 + (MTX_SCRATCHREG_BOOTSTATUS << 2),
+                                   TOPAZHP_FW_BOOT_SIGNAL,
+                                   0xffffffff,
+                                   TOPAZ_TIMEOUT_RETRIES);
+       }
+}
+
+static int32 comm_send(struct img_comm_socket *sock, struct mtx_tomtx_msg *msg, uint32 *wb_val)
+{
+       struct topaz_dev_ctx *ctx;
+       struct img_fw_context *fw_ctx;
+       uint32 space_avail;
+       uint32 cmd_word;
+       uint32 writeback_val;
+       enum mtx_cmd_id cmd_id = msg->cmd_id & 0x7F;
+       uint32 slot;
+
+       ctx = sock->ctx;
+       fw_ctx = &ctx->fw_ctx;
+
+       /* mark the context as active in case we need to save its state later */
+       fw_ctx->active_ctx_mask |= (1 << sock->id);
+
+       space_avail = VXE_RD_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE_SPACE);
+
+       space_avail = F_DECODE(space_avail, TOPAZHP_TOP_CR_CMD_FIFO_SPACE);
+
+       if (space_avail < 4) {
+               comm_unlock(sock->ctx, COMM_LOCK_TX);
+               return IMG_ERROR_RETRY;
+       }
+
+       /* Write command to FIFO */
+       cmd_word = F_ENCODE(sock->id, MTX_MSG_CORE) | msg->cmd_id;
+
+       if (msg->cmd_id & MTX_CMDID_PRIORITY) {
+               /* increment the command counter */
+               sock->high_cmd_cnt++;
+
+               /* Prepare high priority command */
+               cmd_word |= F_ENCODE(1, MTX_MSG_PRIORITY) |
+                           F_ENCODE(((sock->low_cmd_cnt - 1) & 0xff) | (sock->high_cmd_cnt << 8), MTX_MSG_COUNT);
+       }
+       else {
+               /* Prepare low priority command */
+               cmd_word |= F_ENCODE(sock->low_cmd_cnt & 0xff, MTX_MSG_COUNT);
+       }
+
+       /* write command into FIFO */
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE, cmd_word);
+
+       /* Write data to FIFO */
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE, msg->data);
+
+       if (msg->command_data_buf) {
+               /* Write address */
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE,
+                            msg->command_data_buf->dev_virt);
+       }
+       else {
+               /* Write nothing */
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE, 0);
+       }
+
+       /* Write writeback value to FIFO */
+
+       /* prepare Writeback value */
+
+       /* We don't actually use this value, but it may be useful to customers */
+       if (msg->cmd_id & MTX_CMDID_PRIORITY) {
+               /* HIGH priority command */
+
+               writeback_val = sock->high_cmd_cnt << 24;
+
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE, writeback_val);
+       }
+       else {
+               /* LOW priority command */
+               writeback_val = sock->low_cmd_cnt << 16;
+
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE, writeback_val);
+
+               /* increment the command counter */
+               sock->low_cmd_cnt++;
+       }
+
+       if (wb_val)
+               *wb_val = writeback_val;
+
+       sock->last_sync = writeback_val;
+
+       switch (cmd_id)
+       {
+       case MTX_CMDID_PROVIDE_CODEDPACKAGE_BUFFER:
+               slot = F_DECODE(msg->data, MTX_MSG_PROVIDE_CODEDPACKAGE_BUFFER_SLOT);
+               OSA_PR_DEBUG("MSG_TX[%d]: %s(%d) %s %s cmd: %#08x cmd_word: %#08x data: %#08x: addr: %#08x writeback_val: %#08x\n",
+                       sock->id, command_string[cmd_id], slot,
+                       (msg->cmd_id & MTX_CMDID_PRIORITY ? "(PRIORITY)" : "(NORMAL)"),
+                       (msg->cmd_id & MTX_CMDID_WB_INTERRUPT ? "(Interrupt)" : "(NO Interrupt)"),
+                       (msg->cmd_id), cmd_word, (msg->data), msg->command_data_buf,
+                       writeback_val);
+               break;
+       default:
+               OSA_PR_DEBUG("MSG_TX[%d]: %s %s %s cmd: %#08x cmd_word: %#08x data: %#08x addr: %#08x writeback_val: %#08x\n",
+                       sock->id, command_string[cmd_id],
+                       (msg->cmd_id & MTX_CMDID_PRIORITY ? "(PRIORITY)" : "(NORMAL)"),
+                       (msg->cmd_id & MTX_CMDID_WB_INTERRUPT ? "(Interrupt)" : "(NO Interrupt)"),
+                       (msg->cmd_id), cmd_word, (msg->data), msg->command_data_buf,
+                       writeback_val);
+               break;
+       }
+#ifdef DEBUG_ENCODER_DRIVER
+       if (msg->command_data_buf) {
+               int32 i;
+
+               OSA_PR_DEBUG("Has msg->command_data_buf cpu_virt=%#08x dev_virt=%#08x\n",
+                       msg->command_data_buf->cpu_virt, msg->command_data_buf->dev_virt);
+
+               for (i = 0; i < 350; i++) {
+                       OSA_PR_DEBUG("MSG_TX %03d %#08x\n", i,
+                               ((uint32*)msg->command_data_buf->cpu_virt)[i]);
+               }
+       }
+#endif
+
+       /* kick the master MTX */
+       mtx_kick(fw_ctx, 1);
+
+       sock->msgs_sent++;
+
+       return IMG_SUCCESS;
+}
+
+int32 topazdd_send_msg(void *dd_str_ctx, enum mtx_cmd_id cmd_id,
+                      uint32 data, struct vidio_ddbufinfo *cmd_data_buf,
+                      uint32 *wb_val)
+{
+       struct mtx_tomtx_msg *msg;
+       struct img_comm_socket *sock;
+       int32 err;
+
+       if (!dd_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       sock = (struct img_comm_socket *)dd_str_ctx;
+
+       msg = osa_malloc(sizeof(*msg), OSA_GFP_KERNEL);
+       IMG_DBG_ASSERT(msg != NULL);
+       if (msg == NULL)
+               return IMG_ERROR_UNDEFINED;
+
+       msg->command_data_buf = cmd_data_buf;
+       msg->cmd_id = cmd_id;
+       msg->data = data;
+
+       if (!wb_val) {
+               comm_lock(sock->ctx, COMM_LOCK_TX);
+               err = comm_send(sock, msg, NULL);
+               comm_unlock(sock->ctx, COMM_LOCK_TX);
+       }
+       else {
+               uint32 ret_wb_val;
+               comm_lock(sock->ctx, COMM_LOCK_TX);
+               err = comm_send(sock, msg, &ret_wb_val);
+               comm_unlock(sock->ctx, COMM_LOCK_TX);
+
+               if (err == IMG_SUCCESS)
+                       *wb_val = ret_wb_val;
+       }
+
+       osa_free(msg);
+        return err;
+}
+
+#define WAIT_FOR_SYNC_RETRIES 100
+#define WAIT_FOR_SYNC_TIMEOUT 1
+
+static int32 topazdd_wait_on_sync(struct img_comm_socket *sock, uint32 wb_val)
+{
+       uint32 retries = 0;
+
+       if (!sock)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       while (osa_wait_event_obj(sock->event, osa_true, WAIT_FOR_SYNC_TIMEOUT) != IMG_SUCCESS) {
+               if (retries == WAIT_FOR_SYNC_RETRIES) {
+                       /*
+                        * We shouldn't wait any longer than that!
+                        * If the hardware locked up, we will get stuck otherwise.
+                        */
+                       OSA_PR_ERR("TIMEOUT: topazdd_wait_on_sync timed out waiting for writeback 0x%08x.\n", sock->sync_wb_val);
+                       return IMG_ERROR_TIMEOUT;
+               }
+
+               osa_msleep(WAIT_FOR_SYNC_TIMEOUT);
+               retries++;
+               continue;
+       }
+
+       return IMG_SUCCESS;
+}
+
+int32 topazdd_send_msg_with_sync(void *dd_str_ctx, enum mtx_cmd_id cmd_id,
+                                uint32 data,
+                                struct vidio_ddbufinfo *cmd_data_buf)
+{
+       struct img_comm_socket *sock;
+       uint32 wb_val = 0;
+
+       if (!dd_str_ctx)
+               return IMG_ERROR_INVALID_CONTEXT;
+
+       sock = (struct img_comm_socket *)dd_str_ctx;
+
+       osa_mutex_lock(sock->sync_wb_mutex);
+       topazdd_send_msg(dd_str_ctx, cmd_id, data, cmd_data_buf, &wb_val);
+       sock->sync_waiting = osa_true;
+       sock->sync_wb_val = wb_val;
+       osa_mutex_unlock(sock->sync_wb_mutex);
+
+       return (topazdd_wait_on_sync(sock, wb_val));
+}
+
+static void stream_worker(void *work)
+{
+       struct img_comm_socket *sock = NULL;
+       struct img_writeback_msg msg;
+       work = osa_get_work_buff(work, FALSE);
+       sock = osa_container_of(work, struct img_comm_socket, work);
+
+       while (wbfifo_get(sock, &msg)) {
+               if (F_DECODE(msg.cmd_word, MTX_MSG_MESSAGE_ID) == MTX_MESSAGE_ACK)
+                       sock->ack_recv++;
+
+               osa_mutex_lock(sock->sync_wb_mutex);
+               if (sock->sync_waiting && (msg.writeback_val == sock->sync_wb_val)) {
+                       sock->sync_waiting = osa_false;
+                       osa_mutex_unlock(sock->sync_wb_mutex);
+                       /* signal the waiting sync event */
+                       osa_signal_event_obj(sock->event);
+                       return;
+               }
+               osa_mutex_unlock(sock->sync_wb_mutex);
+               comm_unlock(sock->ctx, COMM_LOCK_RX);
+
+               if (sock->cb)
+                       sock->cb(&msg, sock->cb_priv);
+       }
+}
+
+int32 topazdd_create_stream_context(struct topaz_dev_ctx *ctx, enum img_codec codec,
+                         enc_cb cb, void * cb_priv,
+                         void **dd_str_ctx, struct vidio_ddbufinfo **wb_data_info)
+{
+       struct img_comm_socket *p_sock;
+
+       p_sock = osa_malloc(sizeof(*p_sock), OSA_GFP_KERNEL);
+       IMG_DBG_ASSERT(p_sock != NULL);
+       if (p_sock == NULL)
+               return IMG_ERROR_OUT_OF_MEMORY;
+
+       osa_mutex_create(&p_sock->sync_wb_mutex);
+       if (NULL == p_sock->sync_wb_mutex) {
+               osa_free(p_sock);
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       osa_create_event_obj(&p_sock->event);
+       if (NULL == p_sock->event) {
+               osa_mutex_destroy(&p_sock->sync_wb_mutex);
+               osa_free(p_sock);
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       osa_init_work(&p_sock->work, stream_worker);
+       if (NULL == p_sock->work) {
+               osa_destroy_event_obj(p_sock->event);
+               osa_mutex_destroy(&p_sock->sync_wb_mutex);
+               osa_free(p_sock);
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       p_sock->low_cmd_cnt = 0xa5a5a5a5 %  MAX_TOPAZ_CMD_COUNT;
+       p_sock->high_cmd_cnt = 0;
+       p_sock->msgs_sent = 0;
+       p_sock->ack_recv = 0;
+       p_sock->codec = codec;
+       p_sock->ctx = ctx;
+       p_sock->cb = cb;
+       p_sock->cb_priv = cb_priv;
+
+       wbfifo_clear(p_sock);
+
+       *wb_data_info = g_aps_wb_data_info;
+
+       *dd_str_ctx = (void *)p_sock;
+
+       OSA_PR_INFO("topazdd context created with codec %d\n", codec);
+
+       return IMG_SUCCESS;
+}
+
+static int32 topaz_upload_firmware(struct topaz_dev_ctx *ctx,
+                                  enum img_codec codec)
+{
+       OSA_PR_INFO("Loading firmware.\n");
+       /* Upload FW */
+       /* load and start MTX cores */
+       ctx->fw_ctx.load_method = (enum mtx_load_method)g_load_method;
+
+       topaz_setup_firmware(ctx, &(ctx->fw_ctx), ctx->fw_ctx.load_method,
+                            codec, topazdd_get_num_pipes(ctx));
+
+       if (ctx->fw_ctx.initialized == osa_false) {
+               OSA_PR_ERR("\nERROR: Firmware cannot be loaded!\n");
+               return IMG_ERROR_UNDEFINED;
+       }
+
+       comm_load_bias(ctx, ctx->fw_ctx.supported_codecs);
+       /* initialise read offset of firmware output fifo */
+       VXE_WR_REG32(ctx->multi_core_mem_addr,
+                    TOPAZHP_TOP_CR_FIRMWARE_REG_1+(MTX_SCRATCHREG_TOMTX<<2),
+                    0);
+
+       ctx->fw_uploaded = codec;
+
+       OSA_PR_INFO("firmware uploaded!\n");
+       return IMG_SUCCESS;
+}
+
+int32 topazdd_setup_stream_ctx(void *dd_str_ctx, uint16 height,
+                        uint16 width, uint8 *ctx_num, uint32 *used_sock)
+{
+       uint8 idx;
+       struct img_fw_context *fw_ctx;
+       struct img_comm_socket *sock;
+       int32 res = IMG_ERROR_UNDEFINED;
+       uint32 codec_mask = 0;
+
+       sock = (struct img_comm_socket *)dd_str_ctx;
+
+       comm_lock(sock->ctx, COMM_LOCK_BOTH);
+
+       fw_ctx = &sock->ctx->fw_ctx;
+
+       switch (sock->codec) {
+       case IMG_CODEC_JPEG:
+               codec_mask = CODEC_MASK_JPEG;
+       break;
+       case IMG_CODEC_H264_NO_RC:
+       case IMG_CODEC_H264_VBR:
+       case IMG_CODEC_H264_CBR:
+       case IMG_CODEC_H264_VCM:
+       case IMG_CODEC_H264_ERC:
+               codec_mask = CODEC_MASK_H264;
+       break;
+       case IMG_CODEC_H263_NO_RC:
+       case IMG_CODEC_H263_VBR:
+       case IMG_CODEC_H263_CBR:
+       case IMG_CODEC_H263_ERC:
+               codec_mask = CODEC_MASK_H263;
+       break;
+       case IMG_CODEC_MPEG4_NO_RC:
+       case IMG_CODEC_MPEG4_VBR:
+       case IMG_CODEC_MPEG4_CBR:
+       case IMG_CODEC_MPEG4_ERC:
+               codec_mask = CODEC_MASK_MPEG4;
+       break;
+       case IMG_CODEC_MPEG2_NO_RC:
+       case IMG_CODEC_MPEG2_VBR:
+       case IMG_CODEC_MPEG2_CBR:
+       case IMG_CODEC_MPEG2_ERC:
+               codec_mask = CODEC_MASK_MPEG2;
+       break;
+
+       case IMG_CODEC_H264MVC_NO_RC:
+       case IMG_CODEC_H264MVC_VBR:
+       case IMG_CODEC_H264MVC_CBR:
+       case IMG_CODEC_H264MVC_ERC:
+               codec_mask = CODEC_MASK_H264MVC;
+       break;
+       default:
+               IMG_DBG_ASSERT(!"Impossible use case!\n");
+       break;
+       }
+
+       if ((sock->ctx->fw_uploaded != IMG_CODEC_NONE) && /* Only do the following checks if some other firmware is loaded */
+           ((sock->ctx->fw_uploaded != sock->codec) /* Different firmware is uploaded */
+            || (sock->ctx->fw_uploaded == IMG_CODEC_JPEG && sock->ctx->used_socks))) { /* We currently only support one JPEG context to be encoded at the same time */
+
+               if (!(fw_ctx->supported_codecs & codec_mask)) {
+                       comm_unlock(sock->ctx, COMM_LOCK_BOTH);
+                       res = IMG_ERROR_UNDEFINED;
+                       OSA_PR_ERR("\nERROR: Incompatible firmware context types!. Required codec: 0x%x Loaded FW : 0x%x\n", codec_mask, fw_ctx->supported_codecs);
+                       return res;
+               }
+       }
+
+       if (fw_ctx->initialized && (sock->ctx->used_socks >= fw_ctx->num_contexts)) {
+               /* the firmware can't support any more contexts */
+               comm_unlock(sock->ctx, COMM_LOCK_BOTH);
+               OSA_PR_ERR("\nERROR: Firmware context limit reached!\n");
+               return IMG_ERROR_UNDEFINED;
+       }
+
+       /* Search for an Available socket. */
+       IMG_DBG_ASSERT(TOPAZHP_MAX_POSSIBLE_STREAMS < (1 << 8));
+       for (idx = 0; idx < TOPAZHP_MAX_POSSIBLE_STREAMS; idx++) {
+               if (sock->ctx->socks[idx] == NULL) {
+                       uint32 index = idx;
+                       sock->id = idx;
+                       *ctx_num = idx;
+                       *used_sock = index;
+                       sock->ctx->socks[idx] = sock;
+                       sock->ctx->used_socks++;
+                       break;
+               }
+       }
+
+       if (idx == TOPAZHP_MAX_POSSIBLE_STREAMS) {
+               comm_unlock(sock->ctx, COMM_LOCK_BOTH);
+               return IMG_ERROR_INVALID_SIZE;
+       }
+
+       if (sock->codec == IMG_CODEC_JPEG)
+               topaz_timeout_retries = TOPAZ_TIMEOUT_JPEG;
+       else {
+               uint32 mbs_per_pic = (height * width) / 256;
+               if (topaz_timeout_retries < (mbs_per_pic + 10) * 100)
+                       topaz_timeout_retries = (mbs_per_pic + 10) * 100;
+       }
+
+       if (sock->ctx->fw_uploaded == IMG_CODEC_NONE) {
+               OSA_PR_INFO("Loading a different firmware.\n");
+               res = topaz_upload_firmware(sock->ctx, sock->codec);
+               if (!res) {
+                       comm_unlock(sock->ctx, COMM_LOCK_BOTH);
+                       res = IMG_ERROR_UNDEFINED;
+                       OSA_PR_ERR("\nERROR: Firmware cannot be loaded!\n");
+                       return res;
+               }
+       }
+
+       res = IMG_SUCCESS;
+
+       comm_unlock(sock->ctx, COMM_LOCK_BOTH);
+
+       return res;
+}
+
+
+void topazdd_destroy_stream_ctx(void *dd_str_ctx)
+{
+       uint32 idx;
+       struct img_comm_socket *sock;
+
+       sock = (struct img_comm_socket *)dd_str_ctx;
+
+       IMG_DBG_ASSERT(sock != NULL);
+       if (sock == NULL) {
+               OSA_PR_ERR("topazdd_destroy_sock: invalid sock\n");
+               return;
+       }
+
+       osa_flush_work(sock->work);
+
+       comm_lock(sock->ctx, COMM_LOCK_BOTH);
+       for (idx = 0; idx < TOPAZHP_MAX_POSSIBLE_STREAMS; idx++) {
+               if (sock->ctx->socks[idx] == sock) {
+                       sock->ctx->used_socks--;
+                       break;
+               }
+       }
+
+       OSA_PR_INFO("topazdd sock context closed\n");
+
+       /* Flush the MMU table cache (so it we can't accidentally access the freed device memory due to cache/table mismatch.) */
+       topaz_core_mmu_flush_cache();
+
+       /*
+        * if nIndex == TOPAZHP_MAX_POSSIBLE_STREAMS then OpenSocket succeeded
+        * and SetupSocket failed (maybe incompatible firmware)
+        */
+       if (idx != TOPAZHP_MAX_POSSIBLE_STREAMS) {
+               /*
+                * Abort the stream first.
+                * This function can be called as a result of abnormal process
+                * exit, and since the hardware might be encoding some frame it
+                * means that the hardware still needs the context resources
+                * (buffers mapped to the hardware, etc), so we need to make
+                * sure that hardware encoding is aborted first before releasing
+                * the resources.
+                * This is important if you're doing several encodes
+                * simultaneously because releasing the resources too early will
+                * cause a page-fault that will halt all simultaneous encodes
+                * not just the one that caused the page-fault.
+                */
+               struct mtx_tomtx_msg msg;
+               uint32 wb_val = 0;
+
+               wbfifo_clear(sock);
+
+               msg.cmd_id = MTX_CMDID_ABORT | MTX_CMDID_PRIORITY | MTX_CMDID_WB_INTERRUPT;
+               msg.data = 0;
+               msg.command_data_buf = NULL;
+               osa_mutex_lock(sock->sync_wb_mutex);
+               comm_send(sock, &msg, &wb_val);
+               sock->sync_waiting = osa_true;
+               sock->sync_wb_val = wb_val;
+               osa_mutex_unlock(sock->sync_wb_mutex);
+
+               topazdd_wait_on_sync(sock, wb_val);
+               /*
+                * Set it to NULL here -not any time sooner-, we need it in case
+                * we had to abort the stream.
+                */
+               sock->ctx->socks[idx] = NULL;
+       }
+
+       comm_unlock(sock->ctx, COMM_LOCK_BOTH);
+       osa_destroy_event_obj(sock->event);
+       osa_mutex_destroy(sock->sync_wb_mutex);
+       osa_free(sock);
+}
+
+/*
+ * topazdd_int_clear
+ */
+static void topazdd_int_clear(struct topaz_dev_ctx * ctx, uint32 mask)
+{
+       ulong flags;
+
+       osa_spin_lock_irqsave(ctx->lock, &flags);
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_INT_CLEAR, mask);
+
+       osa_spin_unlock_irqrestore(ctx->lock, flags);
+}
+
+uint8 topazdd_get_pipe_usage(uint8 pipe)
+{
+       IMG_DBG_ASSERT(pipe < TOPAZHP_MAX_NUM_PIPES);
+       if (pipe >= TOPAZHP_MAX_NUM_PIPES)
+               return 0;
+
+       return g_pipe_usage[pipe];
+}
+
+void topazdd_set_pipe_usage(uint8 pipe, uint8 val)
+{
+       IMG_DBG_ASSERT(pipe < TOPAZHP_MAX_NUM_PIPES);
+       if (pipe < TOPAZHP_MAX_NUM_PIPES)
+               g_pipe_usage[pipe] = val;
+}
+
+static uint32 comm_get_consumer(struct topaz_dev_ctx *ctx)
+{
+       uint32 reg;
+
+       reg = VXE_RD_REG32(ctx->multi_core_mem_addr,
+                          TOPAZHP_TOP_CR_FIRMWARE_REG_1 + (MTX_SCRATCHREG_TOMTX << 2));
+
+       return F_DECODE(reg, WB_CONSUMER);
+}
+
+static void comm_set_consumer(struct topaz_dev_ctx *ctx, uint32 consumer)
+{
+       uint32 reg;
+
+       reg = VXE_RD_REG32(ctx->multi_core_mem_addr,
+                          TOPAZHP_TOP_CR_FIRMWARE_REG_1 + (MTX_SCRATCHREG_TOMTX << 2));
+
+       reg = F_INSERT(reg, consumer, WB_CONSUMER);
+
+       VXE_WR_REG32(ctx->multi_core_mem_addr,
+                    TOPAZHP_TOP_CR_FIRMWARE_REG_1 + (MTX_SCRATCHREG_TOMTX << 2),
+                    reg);
+}
+
+static uint32 comm_get_producer(struct topaz_dev_ctx *ctx)
+{
+       uint32 reg;
+
+       reg = VXE_RD_REG32(ctx->multi_core_mem_addr,
+                          TOPAZHP_TOP_CR_FIRMWARE_REG_1 + (MTX_SCRATCHREG_TOHOST << 2));
+
+       return F_DECODE(reg, WB_PRODUCER);
+}
+
+static void comm_set_producer(struct topaz_dev_ctx *ctx, uint32 producer)
+{
+       uint32 reg;
+
+       reg = VXE_RD_REG32(ctx->multi_core_mem_addr,
+                          TOPAZHP_TOP_CR_FIRMWARE_REG_1 + (MTX_SCRATCHREG_TOHOST << 2));
+
+       reg = F_INSERT(reg, producer, WB_PRODUCER);
+
+       VXE_WR_REG32(ctx->multi_core_mem_addr,
+                    TOPAZHP_TOP_CR_FIRMWARE_REG_1 + (MTX_SCRATCHREG_TOHOST << 2),
+                    reg);
+}
+
+static int32 topazdd_init_comms(struct topaz_dev_ctx *ctx, uint32 mmu_flags)
+{
+       uint32 num_cores;
+       uint32 i;
+       uint32 reg;
+
+       num_cores = topazdd_get_num_pipes(ctx);
+
+       for (i = 0; i < num_cores; i++) {
+               uint32 offset = REG_TOPAZHP_CORE_0 + (i * 4);
+               ctx->hp_core_reg_addr[i] = (void *)topaz_mem_space[offset].cpu_addr;
+
+               offset = REG_TOPAZHP_VLC_CORE_0 + (i * 4);
+               ctx->vlc_reg_addr[i] = (void *)topaz_mem_space[offset].cpu_addr;
+       }
+
+       if (mmu_device_create(&ctx->topaz_mmu_ctx, mmu_flags) != IMG_SUCCESS) {
+               OSA_PR_ERR("\nERROR: Could not initialize MMU with selected parameters!\n");
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       /* Start up MMU support for each core (if MMU is switched on) */
+       reg = (F_ENCODE( 1, TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET ) |
+              F_ENCODE( 1, TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET) |
+              F_ENCODE( 1, TOPAZHP_TOP_CR_IMG_TOPAZ_IO_SOFT_RESET));
+
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_SRST, reg);
+       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_SRST, 0x0);
+
+       for (i = 0; i < num_cores; i++) {
+               uint32 reset_bits = F_ENCODE(1, TOPAZHP_CR_TOPAZHP_IPE_SOFT_RESET) |
+                                   F_ENCODE(1, TOPAZHP_CR_TOPAZHP_SPE_SOFT_RESET) |
+                                   F_ENCODE(1, TOPAZHP_CR_TOPAZHP_PC_SOFT_RESET) |
+                                   F_ENCODE(1, TOPAZHP_CR_TOPAZHP_H264COMP_SOFT_RESET) |
+                                   F_ENCODE(1, TOPAZHP_CR_TOPAZHP_JMCOMP_SOFT_RESET) |
+                                   F_ENCODE(1, TOPAZHP_CR_TOPAZHP_PREFETCH_SOFT_RESET) |
+                                   F_ENCODE(1, TOPAZHP_CR_TOPAZHP_VLC_SOFT_RESET ) |
+                                   F_ENCODE(1, TOPAZHP_CR_TOPAZHP_LTRITC_SOFT_RESET) |
+                                   F_ENCODE(1, TOPAZHP_CR_TOPAZHP_DB_SOFT_RESET);
+
+#ifdef TOPAZHP // TODO: strangely, this doesn't seem defined in the build... but we ARE topazhp...
+               reset_bits |= F_ENCODE(1, MVEA_CR_IMG_MVEA_SPE_SOFT_RESET(1)) |
+               F_ENCODE(1, MVEA_CR_IMG_MVEA_IPE_SOFT_RESET(1));
+#endif
+
+               VXE_WR_REG32(ctx->hp_core_reg_addr[i], TOPAZHP_CR_TOPAZHP_SRST, reset_bits);
+
+               VXE_WR_REG32(ctx->hp_core_reg_addr[i], TOPAZHP_CR_TOPAZHP_SRST, 0);
+       }
+
+       ctx->topaz_mmu_ctx.ptd_phys_addr = ctx->ptd;
+       topaz_core_mmu_hw_setup(&ctx->topaz_mmu_ctx, ctx->multi_core_mem_addr);
+
+       ctx->fw_uploaded = IMG_CODEC_NONE;
+
+       g_core_rev = VXE_RD_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_TOPAZHP_CORE_REV);
+       g_core_rev &= (MASK_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV | MASK_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV | MASK_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV);
+       g_core_des1 = VXE_RD_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_TOPAZHP_CORE_DES1);
+
+
+       osa_mutex_create(&ctx->comm_tx_mutex);
+       if (NULL == ctx->comm_tx_mutex)
+               return IMG_ERROR_OUT_OF_MEMORY;
+
+       osa_mutex_create(&ctx->comm_rx_mutex);
+       if (NULL == ctx->comm_rx_mutex) {
+               osa_mutex_destroy(&ctx->comm_tx_mutex);
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       g_aps_wb_data_info = osa_malloc(sizeof(struct vidio_ddbufinfo) * WB_FIFO_SIZE, OSA_GFP_KERNEL);
+       if (g_aps_wb_data_info == NULL) {
+               osa_mutex_destroy(&ctx->comm_rx_mutex);
+               osa_mutex_destroy(&ctx->comm_tx_mutex);
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+
+       /* Allocate WB buffers */
+       for (i = 0; i < WB_FIFO_SIZE; i++) {
+               struct vidio_ddbufinfo *mem_info = &g_aps_wb_data_info[i];
+               if (mmu_alloc(ctx->topaz_mmu_ctx.mmu_context_handle,
+                             ctx->vxe_arg, MMU_GENERAL_HEAP_ID, 1,
+                             (SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE),
+                             COMM_WB_DATA_BUF_SIZE, 64, mem_info)) {
+                       OSA_PR_ERR("mmu_alloc failed!\n");
+                       osa_free(g_aps_wb_data_info);
+                       return IMG_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       /* Initialise the COMM registers */
+       comm_set_producer(ctx, 0);
+
+       /* Must reset the Consumer register too, otherwise the COMM stack may be initialised incorrectly */
+       comm_set_consumer(ctx, 0);
+
+       for (i = 0; i < TOPAZHP_MAX_POSSIBLE_STREAMS; i++)
+               ctx->socks[i] = NULL;
+
+       ctx->used_socks = 0;
+       ctx->initialized = osa_true;
+
+       return 0;
+}
+
+static void topazdd_deinit_comms(struct topaz_dev_ctx *ctx)
+{
+       uint32 idx;
+       struct img_fw_context *fw_ctx;
+
+       fw_ctx = &ctx->fw_ctx;
+
+       if (fw_ctx && fw_ctx->initialized) {
+               /* Stop the MTX */
+               mtx_stop(fw_ctx);
+               mtx_wait_for_completion(fw_ctx);
+       }
+
+       if (g_aps_wb_data_info != NULL) {
+               for (idx = 0; idx < WB_FIFO_SIZE; idx++) {
+                       struct vidio_ddbufinfo *mem_info = &g_aps_wb_data_info[idx];
+                       mmu_free(ctx->vxe_arg, mem_info);
+               }
+               osa_free(g_aps_wb_data_info);
+       }
+
+       /* Close all of the opened sockets */
+       for (idx = 0; idx < TOPAZHP_MAX_POSSIBLE_STREAMS; idx++) {
+               if (ctx->socks[idx] != NULL)
+                       topazdd_destroy_stream_ctx(ctx->socks[idx]);
+       }
+
+       osa_mutex_destroy(ctx->comm_tx_mutex);
+       osa_mutex_destroy(ctx->comm_rx_mutex);
+
+       if (fw_ctx && fw_ctx->initialized)
+               mtx_deinitialize(fw_ctx);
+
+       mmu_device_destroy(&ctx->topaz_mmu_ctx);
+
+       ctx->fw_uploaded = IMG_CODEC_NONE;
+       ctx->initialized = osa_false;
+}
+
+static void setup_topaz_mem(uint64 reg_base, uint32 reg_size)
+{
+       uint idx;
+
+       /* set up the kernel virtual address for mem space access */
+       for (idx = 0; idx < topaz_target_config.num_mem_spaces; idx++) {
+               uint64 offset = topaz_target_config.mem_spaces[idx].reg.addr;
+               topaz_target_config.mem_spaces[idx].cpu_addr = reg_base + offset;
+       }
+}
+
+/*
+ * topazdd_init
+ */
+int32 topazdd_init(uint64 reg_base, uint32 reg_size, uint32 mmu_flags,
+                  void * vxe_arg, uint32 ptd, void ** data)
+{
+       struct topaz_dev_ctx *ctx;
+       int32 ret;
+
+       setup_topaz_mem(reg_base, reg_size);
+
+       /* Allocate device structure...*/
+       ctx = osa_malloc(sizeof(*ctx), OSA_GFP_KERNEL);
+       IMG_DBG_ASSERT(ctx != NULL);
+       if (ctx == NULL)
+               return IMG_ERROR_OUT_OF_MEMORY;
+
+       memset(ctx, 0, sizeof(*ctx));
+
+       osa_spin_lock_create(&ctx->lock, TOPAZ_DEV_SPIN_LOCK_NAME);
+       if (ctx->lock == NULL) {
+               osa_free(ctx);
+               return IMG_ERROR_OUT_OF_MEMORY;
+       }
+       g_lock = ctx->lock;
+
+       *data = ctx;
+       ctx->initialized = osa_false;
+
+       ctx->multi_core_mem_addr = (void *)topaz_mem_space[REG_TOPAZHP_MULTICORE].cpu_addr;
+
+       if (ctx->multi_core_mem_addr == NULL) {
+               osa_spin_destroy(&ctx->lock);
+               osa_free(ctx);
+               return IMG_ERROR_DEVICE_NOT_FOUND;
+       }
+
+       /* Now enabled interrupts */
+       topazdd_int_enable(ctx, (MASK_TOPAZHP_TOP_CR_HOST_INTEN_MTX |
+                          MASK_TOPAZHP_TOP_CR_HOST_TOPAZHP_MAS_INTEN |
+                          MASK_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT |
+                          MASK_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT_B));
+
+       ctx->vxe_arg = vxe_arg;
+       ctx->ptd = ptd;
+
+       ret = topazdd_init_comms(ctx, mmu_flags);
+       if (ret) {
+               topazdd_int_disable(ctx, ~0);
+               osa_spin_destroy(&ctx->lock);
+               osa_free(ctx);
+               return ret;
+       }
+
+       comm_lock(ctx, COMM_LOCK_BOTH);
+       ret = topaz_upload_firmware(ctx, IMG_CODEC_H264_NO_RC);
+       comm_unlock(ctx, COMM_LOCK_BOTH);
+
+       if (ret) {
+               topazdd_deinit_comms(ctx);
+               topazdd_int_disable(ctx, ~0);
+               osa_spin_destroy(&ctx->lock);
+               osa_free(ctx);
+               return ret;
+       }
+
+       /* Device now initailised...*/
+       ctx->initialized = osa_true;
+
+       /* Return success...*/
+       return IMG_SUCCESS;
+}
+
+/*
+ * topazdd_deinit
+ */
+void topazdd_deinit(void * data)
+{
+       struct topaz_dev_ctx *ctx = data;
+       uint32 reg;
+
+       /* If the interrupt was defined then it is also safe to clear interrupts
+       and reset the core....*/
+       if (ctx->initialized) {
+               topazdd_deinit_comms(ctx);
+
+               /* Disable interrupts...*/
+               topazdd_int_disable(ctx, ~0);
+
+               /* disable interrupts on Topaz core */
+               reg = VXE_RD_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_HOST_INT_ENAB);
+
+               reg &= ~MASK_TOPAZHP_TOP_CR_HOST_INTEN_MTX;
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_HOST_INT_ENAB, reg);
+
+               /* clear interrupt - just in case */
+               VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_INT_CLEAR, MASK_TOPAZHP_TOP_CR_INTCLR_MTX);
+
+               g_lock = NULL;
+               osa_spin_destroy(&ctx->lock);
+       }
+
+       osa_free(data);
+}
+
+static int32 comm_dispatch_in_msg(struct topaz_dev_ctx *ctx)
+{
+       uint32 hw_fifo_producer;
+       uint32 hw_fifo_consumer;
+
+       hw_fifo_consumer = comm_get_consumer(ctx);
+       hw_fifo_producer = comm_get_producer(ctx);
+
+       while (hw_fifo_consumer != hw_fifo_producer) {
+               struct img_writeback_msg *wb_msg;
+               uint8 conn_id;
+               struct vidio_ddbufinfo *mem_info = &g_aps_wb_data_info[hw_fifo_consumer];
+               enum mtx_cmd_id cmd_id;
+
+               /* Update corresponding memory region */
+               update_host_mem(ctx->vxe_arg, mem_info);
+               wb_msg = (struct img_writeback_msg *)(mem_info->cpu_virt);
+
+               /* Copy to the corresponding SW fifo */
+               conn_id = F_DECODE(wb_msg->cmd_word, MTX_MSG_CORE);
+
+               /* Find corresponding Buffer Addr */
+               cmd_id = F_DECODE(wb_msg->cmd_word, MTX_MSG_MESSAGE_ID);
+               if ((uint32)cmd_id == (uint32)MTX_MESSAGE_ACK) {
+                       OSA_PR_DEBUG("MSG_RX[%d]: 0x%03X %s (ACK) cmd_word: %#08x data: %#08x extra_data: %#08x writeback_val: %#08x\n",
+                                   F_DECODE(wb_msg->cmd_word, MTX_MSG_CORE),
+                                   hw_fifo_producer & 0x1f,
+                                   command_string[wb_msg->cmd_word & 0x1f],
+                                   wb_msg->cmd_word, wb_msg->data,
+                                   wb_msg->extra_data, wb_msg->writeback_val);
+               } else {
+                       OSA_PR_DEBUG("MSG_RX[%d]: 0x%03X CODED_BUFFER cmd_word: %#08x coded_package_consumed: %d\n",
+                                   F_DECODE(wb_msg->cmd_word, MTX_MSG_CORE),
+                                   hw_fifo_producer & 0x1f,
+                                   wb_msg->cmd_word,
+                                   wb_msg->coded_package_consumed_idx);
+               }
+
+               /* If corresponding socket still exists, call the callback */
+               if (ctx->socks[conn_id]) {
+                       wbfifo_add(ctx->socks[conn_id], wb_msg);
+                       osa_schedule_work(ctx->socks[conn_id]->work);
+               }
+
+               /* Activate corresponding FIFO
+                * proceed to the next one
+                */
+               hw_fifo_consumer++;
+
+               if (hw_fifo_consumer == WB_FIFO_SIZE)
+                       hw_fifo_consumer = 0;
+
+               comm_set_consumer(ctx, hw_fifo_consumer);
+
+               /*
+                * We need to update the producer because we might have received a new
+                * message meanwhile. This new message won't trigger an interrupt and
+                * consequently will be lost till another message arrives
+                */
+               hw_fifo_producer = comm_get_producer(ctx);
+       }
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * topazdd_threaded_isr
+ */
+osa_bool topazdd_threaded_isr(void * inst_data)
+{
+       struct topaz_dev_ctx *ctx = *(struct topaz_dev_ctx **)inst_data;
+
+       /* If interrupts not defined then...*/
+       if (!ctx || !ctx->initialized) {
+               OSA_PR_ERR(" in topazdd_isr but not yet initialized!\n");
+               return osa_false;
+       }
+
+       /* Now dispatch the messages */
+       comm_dispatch_in_msg(ctx);
+
+       /* Signal this interrupt has been handled...*/
+       return osa_true;
+}
+
+/*
+ * topazdd_isr
+ */
+osa_irqreturn_t topazdd_isr(void * inst_data)
+{
+       uint32 reg;
+       uint32 mmu_fault_mask = MASK_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT;
+
+       struct topaz_dev_ctx *ctx = *(struct topaz_dev_ctx **)inst_data;
+
+       /* More requesters with topaz hp */
+       mmu_fault_mask |= MASK_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT_B;
+
+       /* If interrupts not defined then...*/
+       if (!ctx || !ctx->initialized) {
+               OSA_PR_ERR(" in topazdd_isr but not yet initialized!\n");
+               return OSA_IRQ_NONE;
+       }
+
+       /* read device interrupt status */
+       reg = VXE_RD_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_INT_STAT);
+
+       /* if interrupts enabled and fired...*/
+       if (((reg & MASK_TOPAZHP_TOP_CR_INT_STAT_MTX) == (MASK_TOPAZHP_TOP_CR_INT_STAT_MTX ))) {
+               /* Clear interrupt source...*/
+               topazdd_int_clear(ctx, MASK_TOPAZHP_TOP_CR_INTCLR_MTX);
+
+               /* Signal this interrupt has been handled...*/
+               return OSA_IRQ_WAKE_THREAD;
+       }
+
+       /* if page fault ever happenned */
+       if (reg & (mmu_fault_mask)) {
+               static osa_bool dump_once = osa_true;
+
+               if (dump_once) {
+                       uint32 mmu_status;
+                       mmu_status = VXE_RD_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MMU_STATUS);
+                       /* keep minimum from kernel hoping we will have enough time to dump all registers (print out MMU status) */
+                       OSA_PR_ERR("Page fault [%08x %08X]\n", reg, mmu_status);
+                       VXE_WR_REG32(ctx->multi_core_mem_addr, TOPAZHP_TOP_CR_MULTICORE_HOST_INT_ENAB, 0);
+
+                       dump_once = osa_false; /* only on first page fault for readability */
+               }
+
+               /* Clear interrupt source...*/
+               topazdd_int_clear(ctx, mmu_fault_mask);
+
+               /* IT served, we might never reach that point on kernel crashes */
+               return OSA_IRQ_HANDLED;
+       }
+
+       /* Signal not this device...*/
+       return OSA_IRQ_NONE;
+}
diff --git a/driver/encoder/topaz_device.h b/driver/encoder/topaz_device.h
new file mode 100644 (file)
index 0000000..7b93f35
--- /dev/null
@@ -0,0 +1,143 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * topaz driver data strcutures
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#if !defined (__TOPAZ_DEVICE_H__)
+#define __TOPAZ_DEVICE_H__
+
+#include "fw_headers/topazscfwif.h"
+#include "fw_headers/mtx_fwif.h"
+#include "osal/inc/osa_interrupt.h"
+#include "topazmmu.h"
+#include "vid_buf.h"
+
+#       define CODEC_MASK_JPEG          0x0001
+#       define CODEC_MASK_MPEG2         0x0002
+#       define CODEC_MASK_MPEG4         0x0004
+#       define CODEC_MASK_H263          0x0008
+#       define CODEC_MASK_H264          0x0010
+#       define CODEC_MASK_H264MVC       0x0020
+#       define CODEC_MASK_VP8           0x0040
+#       define CODEC_MASK_H265          0x0080
+#       define CODEC_MASK_FAKE          0x007F
+
+struct img_comm_socket;
+
+/* prototype for callback for incoming message */
+typedef void (*enc_cb)(struct img_writeback_msg *msg, void *priv);
+
+struct mtx_tohost_msg
+{
+       enum mtx_message_id cmd_id;
+       uint32 input_cmd_word;
+       uint8 coded_pkg_idx;
+       uint32 wb_val;
+       uint32 data;
+       struct vidio_ddbufinfo * command_data_buf;
+};
+
+struct mtx_tomtx_msg
+{
+       enum mtx_cmd_id cmd_id;
+       uint32 data;
+       struct vidio_ddbufinfo * command_data_buf;
+};
+
+/*
+ * This structure contains the device context.
+ */
+struct topaz_dev_ctx
+{
+       /* Parent context, needed to pass to mmu_alloc */
+       void * vxe_arg;
+
+       /* KM addresses for mem spaces */
+       void * multi_core_mem_addr;
+       void * hp_core_reg_addr[TOPAZHP_MAX_NUM_PIPES];
+       void * vlc_reg_addr[TOPAZHP_MAX_NUM_PIPES];
+
+       osa_bool initialized; /*!< Indicates that the device driver has been initialised */
+
+       uint32 used_socks;
+       struct img_comm_socket *socks[TOPAZHP_MAX_POSSIBLE_STREAMS];
+
+       uint32 fw_uploaded;
+       struct img_fw_context fw_ctx;
+
+       void *lock; /* basic device level spinlock */
+       void *comm_tx_mutex;
+       void *comm_rx_mutex;
+
+       uint32 ptd;
+       struct topaz_mmu_context topaz_mmu_ctx;
+};
+
+#define COMM_INCOMING_FIFO_SIZE        (WB_FIFO_SIZE * 2)
+struct img_comm_socket
+{
+       uint8   id;
+       uint32  low_cmd_cnt;  /* count of low-priority commands sent to TOPAZ */
+       uint32  high_cmd_cnt; /* count of high-priority commands sent to TOPAZ */
+       uint32  last_sync;    /* Last sync value sent */
+       struct  img_writeback_msg in_fifo[COMM_INCOMING_FIFO_SIZE];
+       uint32  in_fifo_consumer;
+       uint32  in_fifo_producer;
+       void *  work;
+
+       enc_cb  cb; /* User-provided callback function */
+       void *  cb_priv; /* User-provided callback data */
+
+       void * event;
+       osa_bool sync_waiting;
+       uint32 sync_wb_val;
+       void *sync_wb_mutex;
+
+       uint32   msgs_sent;
+       uint32   ack_recv;
+       osa_bool is_serialized;
+
+       uint32  codec;
+
+       struct topaz_dev_ctx *ctx;
+};
+
+osa_bool topazdd_threaded_isr(void * data);
+osa_irqreturn_t topazdd_isr(void * data);
+
+int32 topazdd_init(uint64 reg_base, uint32 reg_size, uint32 mmu_flags,
+                  void * vxe_arg, uint32 ptd, void ** data);
+void topazdd_deinit(void * data);
+uint32 topazdd_get_num_pipes(struct topaz_dev_ctx *ctx);
+uint32 topazdd_get_core_rev(void);
+uint32 topazdd_get_core_des1(void);
+osa_bool topazdd_is_idle(struct img_comm_socket *sock);
+
+int32 topazdd_upload_firmware(struct topaz_dev_ctx *ctx,
+                              enum img_codec codec);
+int32 topazdd_create_stream_context(struct topaz_dev_ctx *ctx, enum img_codec codec,
+                         enc_cb cb, void * cb_priv,
+                         void **dd_str_ctx, struct vidio_ddbufinfo **wb_data_info);
+void topazdd_destroy_stream_ctx(void *dd_str_ctx);
+int32 topazdd_setup_stream_ctx(void *dd_str_ctx, uint16 height,
+                         uint16 width, uint8 *ctx_num, uint32 *used_sock);
+int32 topazdd_send_msg(void *dd_str_ctx, enum mtx_cmd_id cmd_id,
+                       uint32 data, struct vidio_ddbufinfo *cmd_data_buf,
+                       uint32 *wb_val);
+int32 topazdd_send_msg_with_sync(void *dd_str_ctx, enum mtx_cmd_id cmd_id,
+                                uint32 data,
+                                struct vidio_ddbufinfo *cmd_data_buf);
+
+#endif /* __TOPAZ_DEVICE_H__   */
diff --git a/driver/encoder/topazmmu.c b/driver/encoder/topazmmu.c
new file mode 100644 (file)
index 0000000..18e569a
--- /dev/null
@@ -0,0 +1,757 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * topaz mmu function implementations
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "fw_headers/defs.h"
+#include "img_errors.h"
+#include "img_mem.h"
+#include "img_mem_man.h"
+#include "osal/inc/osa_define.h"
+#include "osal/inc/osa_mem.h"
+#include "osal/inc/osa_spin.h"
+#include "osal/inc/osa_mutex.h"
+#include "target_config.h"
+#include "talmmu_api.h"
+#include "topazmmu.h"
+#include "vxe_public_regdefs.h"
+
+/* Global */
+extern struct mem_space topaz_mem_space[];
+extern void *g_lock;
+
+int use_extended_addressing = 0;
+osa_bool use_secure_fw_upload = osa_false;
+uint32 mmu_control_val;
+osa_bool device_initialized = osa_false;
+
+/*
+ * These determine the sizes of the MMU heaps we are using.
+ * The tiled heap is set arbitrarily large at present.
+ */
+#define GENERALMMUHEAPLENGTH 0x40000000
+
+/*
+ * This describes the heaps - the separate areas mapped by the MMU
+ * Currently we only use a single large heap as Topaz Core has no
+ * MMU specific memory features.
+ */
+struct talmmu_heap_info mmu_heap_info [HEAP_ID_NO_OF_HEAPS]=
+{
+       { MMU_GENERAL_HEAP_ID, TALMMU_HEAP_PERCONTEXT, TALMMU_HEAPFLAGS_NONE, "MEMSYSMEM", 0x00400000 , GENERALMMUHEAPLENGTH }
+};
+
+/* This describes the memory being mapped by the MMU */
+struct talmmu_devmem_info mmu_device_memory_info = {
+       /* ui32DeviceId */
+       1,
+       /* eMMUType */
+       TALMMU_MMUTYPE_4K_PAGES_32BIT_ADDR,
+       /* eDevFlags */
+       TALMMU_DEVFLAGS_NONE,
+       /* pszPageDirMemSpaceName */
+       "MEMSYSMEM",
+       /* pszPageTableMemSpaceName */
+       "MEMSYSMEM",
+       /* ui32PageSize */
+       4096,
+       /* ui32PageTableDirAlignment */
+       0
+};
+
+/*
+ * mmu template is global. so we don't need to worry about maintaining device
+ * context
+ */
+void* mmu_template = NULL;
+
+/*
+ * Stream context is global. Can be modified in future to handle list of streams.
+ */
+struct mmu_str_context *str_ctx;
+
+/*
+ * Called once during initialization to initialize the MMU hardware, create
+ * the template and define the MMU heap.
+ * This is where talmmu initialization and template will be created.
+ *
+ * NOTE : We are not taking care of alignment here, need to be updated in
+ * mmu_device_memory_info.
+ */
+int mmu_device_create(struct topaz_mmu_context *mmu_context, uint32 mmu_flags)
+{
+       void* topaz_multi_core_regid;
+       uint32 hw_rev;
+       int32 result, i;
+
+       use_secure_fw_upload = (mmu_flags & MMU_SECURE_FW_UPLOAD);
+
+       use_extended_addressing = (mmu_flags & MMU_EXTENDED_ADDR_FLAG);
+
+       /* Initialize TALMMU API and create a template */
+       result = talmmu_init();
+       IMG_DBG_ASSERT(result == 0);
+
+       if (result != 0) {
+               OSA_PR_ERR("talmmu_init failed!\n");
+               return IMG_ERROR_COULD_NOT_OBTAIN_RESOURCE;
+       }
+
+       /*
+        * We are reading the register and finding the mmu type, if needed this
+        * can be passed from the upper layers directly.
+        */
+
+       topaz_multi_core_regid = (void *)topaz_mem_space[REG_TOPAZHP_MULTICORE].cpu_addr;
+
+       hw_rev = VXE_RD_REG32(topaz_multi_core_regid, TOPAZHP_TOP_CR_TOPAZHP_CORE_REV);
+       hw_rev &= (MASK_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV | MASK_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV | MASK_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV);
+
+       if (use_extended_addressing) {
+               uint32 reg_val;
+
+               /* Versions 3.6 and above may be 32-bit, 36-bit or 40-bit */
+               reg_val = VXE_RD_REG32(topaz_multi_core_regid, TOPAZHP_TOP_CR_MULTICORE_HW_CFG);
+
+               switch (F_DECODE(reg_val, TOPAZHP_TOP_CR_EXTENDED_ADDR_RANGE)) {
+                       case 0:
+                               mmu_device_memory_info.mmu_type = TALMMU_MMUTYPE_4K_PAGES_32BIT_ADDR;
+                       break;
+                       case 4:
+                               mmu_device_memory_info.mmu_type = TALMMU_MMUTYPE_4K_PAGES_36BIT_ADDR;
+                       break;
+                       case 8:
+                               mmu_device_memory_info.mmu_type = TALMMU_MMUTYPE_4K_PAGES_40BIT_ADDR;
+                       break;
+                       default:
+                               OSA_PR_ERR("Unsupported MMU mode requested\n");
+                               return IMG_ERROR_NOT_SUPPORTED;
+                       break;
+               }
+       }
+
+       result = talmmu_devmem_template_create (&mmu_device_memory_info, &mmu_template);
+       IMG_DBG_ASSERT(result == 0);
+       if (result != 0) {
+               OSA_PR_ERR("talmmu_devmem_template_create failed!\n");
+               talmmu_deinit();
+               return IMG_ERROR_COULD_NOT_OBTAIN_RESOURCE;
+       }
+
+       /* Add heaps to the template */
+       for (i = 0 ; i < HEAP_ID_NO_OF_HEAPS; i++) {
+               result = talmmu_devmem_heap_add (mmu_template, &(mmu_heap_info[i]));
+               IMG_DBG_ASSERT(result == 0);
+               if (result != 0) {
+                       OSA_PR_ERR("talmmu_devmem_heap_add failed!\n");
+                       talmmu_devmem_template_destroy(mmu_template);
+                       talmmu_deinit();
+                       return IMG_ERROR_COULD_NOT_OBTAIN_RESOURCE;
+               }
+       }
+
+       /* Create a context from the template */
+       /* (Template, User allocated user ID) */
+       result = talmmu_devmem_ctx_create(mmu_template, 1, &mmu_context->mmu_context_handle);
+       IMG_DBG_ASSERT(result == 0);
+       if (result != 0) {
+               OSA_PR_ERR("talmmu_devmem_ctx_create failed!\n");
+               talmmu_devmem_template_destroy(mmu_template);
+               talmmu_deinit();
+               return IMG_ERROR_COULD_NOT_OBTAIN_RESOURCE;
+       }
+
+       topaz_core_mmu_flush_cache();
+
+       /* Initialise stream list. */
+       lst_init(&mmu_context->str_list);
+
+       device_initialized = osa_true;
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * This function is used to destroy the MMU device context.
+ * NOTE: Destroy device automatically destroys any streams and frees and
+ * memory allocated using MMU_StreamMalloc().
+ */
+int32 mmu_device_destroy(struct topaz_mmu_context *mmu_context)
+{
+       uint32 result = 0;
+       struct mmu_str_context *str_ctx;
+
+       /* Destroy all streams associated with the device. */
+       str_ctx = lst_first(&mmu_context->str_list);
+       while (str_ctx) {
+               /* remove stream to list. */
+               lst_remove(&mmu_context->str_list, str_ctx);
+               mmu_stream_destroy(mmu_context, str_ctx);
+
+               /* See if there are more streams. */
+               str_ctx = lst_first(&mmu_context->str_list);
+       }
+
+       /* Destroy the device context */
+       result = talmmu_devmem_ctx_destroy(mmu_context->mmu_context_handle);
+       if (result != IMG_SUCCESS)
+               return result;
+
+       /* Destroy the template. */
+       return (talmmu_devmem_template_destroy(mmu_template));
+}
+
+/*
+ * This function is used to create and initialize the MMU stream context.
+ */
+int32 mmu_stream_create(struct topaz_mmu_context *mmu_context, uint32 km_str_id, void *vxe_enc_ctx_arg, void **mmu_str_ctx)
+{
+       struct mmu_str_context *str_ctx;
+
+       /* Validate inputs. */
+       if (!device_initialized)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       /* Allocate a stream context structure */
+       str_ctx = osa_zalloc(sizeof(*str_ctx), OSA_GFP_KERNEL);
+       if (!str_ctx)
+               return IMG_ERROR_OUT_OF_MEMORY;
+
+       str_ctx->km_str_id = km_str_id;
+       str_ctx->int_reg_num = 32;
+       str_ctx->vxe_enc_context = (struct vxe_enc_ctx *)vxe_enc_ctx_arg;
+
+       /* copy the mmu context created earlier */
+       str_ctx->mmu_context_handle = mmu_context->mmu_context_handle;
+
+       *mmu_str_ctx = str_ctx;
+
+       /* Add stream to list. */
+       lst_add(&mmu_context->str_list, str_ctx);
+
+       return IMG_SUCCESS;
+}
+
+/*
+ * This function is used to destroy the MMU stream context.
+ * NOTE: Destroy automatically frees and memory allocated using
+ *     mmu_stream_malloc().
+ */
+int32 mmu_stream_destroy(struct topaz_mmu_context *mmu_context, struct mmu_str_context *str_ctx)
+{
+       /* Validate inputs. */
+       if (!str_ctx)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       /* remove stream to list. */
+       lst_remove(&mmu_context->str_list, str_ctx);
+
+       osa_free(str_ctx);
+
+       return IMG_SUCCESS;
+}
+
+static uint32 set_attributes(enum sys_emem_attrib mem_attrib)
+{
+       uint32 attrib = 0;
+
+       if (mem_attrib & SYS_MEMATTRIB_CACHED)
+               attrib |= MEM_ATTR_CACHED;
+
+       if (mem_attrib & SYS_MEMATTRIB_UNCACHED)
+               attrib |= MEM_ATTR_UNCACHED;
+
+       if (mem_attrib & SYS_MEMATTRIB_WRITECOMBINE)
+               attrib |= MEM_ATTR_WRITECOMBINE;
+
+       if (mem_attrib & SYS_MEMATTRIB_SECURE)
+               attrib |= MEM_ATTR_SECURE;
+
+       return attrib;
+}
+
+int32 mmu_alloc(void *mmu_context_handle, struct vxe_enc_ctx *vxe_enc_ctx_arg,
+               enum mmu_eheap_id heap_id, uint32 mem_heap_id,
+               enum sys_emem_attrib mem_attrib,  uint32 size, uint32 alignment,
+               struct vidio_ddbufinfo *ddbuf_info)
+{
+       int result = 0;
+       void *devmem_heap_hndl;
+       uint32 dev_page_size = DEV_MMU_PAGE_SIZE;
+       struct vxe_enc_ctx *ctx;
+       struct vxe_dev *vxe;
+       uint32 flags = 0;
+       uint32 attributes = 0;
+
+       dev_page_size = HOST_MMU_PAGE_SIZE;
+
+       if (!mmu_context_handle)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       /* Set buffer size. */
+       ddbuf_info->buf_size = size;
+
+       /* Round size up to next multiple of physical pages */
+       if ((size % HOST_MMU_PAGE_SIZE) != 0)
+               size = ((size / HOST_MMU_PAGE_SIZE) + 1) * HOST_MMU_PAGE_SIZE;
+
+       /* Allocate memory */
+       ctx = vxe_enc_ctx_arg;
+       vxe = ctx->dev;
+
+       attributes = set_attributes(mem_attrib);
+
+       result = img_mem_alloc(vxe->dev, ctx->mem_ctx, mem_heap_id,
+                              size, attributes, &ddbuf_info->buff_id);
+       if (result != IMG_SUCCESS)
+               goto error_alloc;
+
+       ddbuf_info->is_internal = 1;
+
+       /* TODO need to check more on attributes from memmgr_km */
+       if (mem_attrib & SYS_MEMATTRIB_SECURE) {
+               ddbuf_info->cpu_virt = NULL;
+       } else {
+               /* Map the buffer to CPU */
+               result = img_mem_map_km(ctx->mem_ctx, ddbuf_info->buff_id);
+               if (result) {
+                       OSA_DEV_ERR(vxe->dev, "%s: failed to map buf to cpu!(%d)\n",
+                                   __func__, result);
+                       goto error_get_heap_handle;
+               }
+               ddbuf_info->cpu_virt = img_mem_get_kptr(ctx->mem_ctx,
+               ddbuf_info->buff_id);
+       }
+
+       /* Get heap handle */
+       result = talmmu_get_heap_handle(heap_id, mmu_context_handle, &devmem_heap_hndl);
+       if (result != IMG_SUCCESS)
+               goto error_get_heap_handle;
+
+       /* Allocate device "virtual" memory. */
+       result = talmmu_devmem_addr_alloc(mmu_context_handle, devmem_heap_hndl,
+                                         size, alignment, &ddbuf_info->hndl_memory);
+       if (result != IMG_SUCCESS)
+               goto error_mem_map_ext_mem;
+
+       /* Get the device virtual address. */
+       result = talmmu_get_dev_virt_addr(ddbuf_info->hndl_memory, &ddbuf_info->dev_virt);
+       if (result != IMG_SUCCESS)
+               goto error_get_dev_virt_addr;
+
+       result = img_mmu_map(ctx->mmu_ctx, ctx->mem_ctx, ddbuf_info->buff_id, ddbuf_info->dev_virt, flags);
+       if (result != IMG_SUCCESS)
+               goto error_map_dev;
+
+       return IMG_SUCCESS;
+
+error_map_dev:
+error_get_dev_virt_addr:
+       talmmu_devmem_addr_free(ddbuf_info->hndl_memory);
+       ddbuf_info->hndl_memory = NULL;
+error_mem_map_ext_mem:
+error_get_heap_handle:
+       img_mem_free(ctx->mem_ctx, ddbuf_info->buff_id);
+error_alloc:
+       return result;
+}
+
+/*
+ * mmu_stream_malloc
+ */
+int32 mmu_stream_alloc(void *mmu_str_hndl, enum mmu_eheap_id heap_id,
+                      uint32 mem_heap_id, enum sys_emem_attrib mem_attrib,
+                      uint32 size, uint32 alignment,
+                      struct vidio_ddbufinfo *ddbuf_info)
+{
+       struct mmu_str_context *str_ctx;
+
+       /* Validate inputs. */
+       if (!mmu_str_hndl)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       str_ctx = (struct mmu_str_context *)mmu_str_hndl;
+
+       /* Check if device level heap. */
+       switch (heap_id) {
+               case MMU_GENERAL_HEAP_ID:
+               break;
+
+               default:
+                       return IMG_ERROR_INVALID_PARAMETERS;
+       }
+
+       ddbuf_info->kmstr_id = str_ctx->km_str_id;
+
+       /* Allocate device memory. */
+       return (mmu_alloc(str_ctx->mmu_context_handle, str_ctx->vxe_enc_context,
+                         heap_id, mem_heap_id, mem_attrib, size, alignment, ddbuf_info));
+}
+
+/*
+ * mmu_stream_map_ext_sg
+ */
+int32 mmu_stream_map_ext_sg(void *mmu_str_hndl, enum mmu_eheap_id heap_id,
+                           void *sgt, uint32 size, uint32 alignment,
+                           enum sys_emem_attrib mem_attrib, void *cpu_linear_addr,
+                           struct vidio_ddbufinfo *ddbuf_info, uint32 *buff_id)
+{
+       int32 result;
+       void *devmem_heap_hndl;
+       uint32 dev_page_size = DEV_MMU_PAGE_SIZE;
+       struct mmu_str_context *str_ctx;
+       struct vxe_enc_ctx *ctx;
+       struct vxe_dev *vxe;
+
+       if (!mmu_str_hndl)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       str_ctx = (struct mmu_str_context *)mmu_str_hndl;
+
+       ctx = str_ctx->vxe_enc_context;
+       vxe = ctx->dev;
+
+       /* Check if device level heap. */
+       switch (heap_id) {
+               case MMU_GENERAL_HEAP_ID:
+               break;
+
+               default:
+                       return IMG_ERROR_INVALID_PARAMETERS;
+       }
+
+       dev_page_size = HOST_MMU_PAGE_SIZE;
+
+       if (!str_ctx->mmu_context_handle)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       /* Set buffer size. */
+       ddbuf_info->buf_size = size;
+
+       /* Round size up to next multiple of physical pages */
+       if ((size % HOST_MMU_PAGE_SIZE) != 0)
+               size = ((size / HOST_MMU_PAGE_SIZE) + 1) * HOST_MMU_PAGE_SIZE;
+
+       result = img_mem_import(vxe->dev, ctx->mem_ctx, ddbuf_info->buf_size,
+                               set_attributes(mem_attrib), buff_id);
+       if (result != IMG_SUCCESS)
+               return result;
+
+       if (mem_attrib & SYS_MEMATTRIB_SECURE)
+               ddbuf_info->cpu_virt = NULL;
+
+       ddbuf_info->buff_id = *buff_id;
+       ddbuf_info->is_internal = 0;
+
+       ddbuf_info->kmstr_id = str_ctx->km_str_id;
+
+       /* Set buffer size. */
+       ddbuf_info->buf_size = size;
+
+       /* Ensure the address of the buffer is at least page aligned. */
+       ddbuf_info->cpu_virt = cpu_linear_addr;
+
+       /* Get heap handle */
+       result = talmmu_get_heap_handle(heap_id, str_ctx->mmu_context_handle, &devmem_heap_hndl);
+       if (result != IMG_SUCCESS)
+               return result;
+
+       /* Allocate device "virtual" memory. */
+       result = talmmu_devmem_addr_alloc(str_ctx->mmu_context_handle, devmem_heap_hndl,
+                                         size, alignment, &ddbuf_info->hndl_memory);
+       if (result != IMG_SUCCESS)
+               return result;
+
+       /* Get the device virtual address. */
+       result = talmmu_get_dev_virt_addr(ddbuf_info->hndl_memory, &ddbuf_info->dev_virt);
+       if (result != IMG_SUCCESS)
+               goto error_get_dev_virt_addr;
+
+       result = img_mmu_map_sg(ctx->mmu_ctx, ctx->mem_ctx, ddbuf_info->buff_id, sgt,
+                               ddbuf_info->dev_virt, mem_attrib);
+       if (result != IMG_SUCCESS)
+               goto error_map_dev;
+
+       return IMG_SUCCESS;
+
+error_map_dev:
+error_get_dev_virt_addr:
+       talmmu_devmem_addr_free(ddbuf_info->hndl_memory);
+       ddbuf_info->hndl_memory = NULL;
+       return result;
+}
+
+/*
+ * mmu_stream_map_ext
+ */
+int32 mmu_stream_map_ext(void *mmu_str_hndl, enum mmu_eheap_id heap_id,
+                        uint32 buff_id, uint32 size, uint32 alignment,
+                        enum sys_emem_attrib mem_attrib, void *cpu_linear_addr,
+                        struct vidio_ddbufinfo *ddbuf_info)
+{
+       int32 result = 0;
+       void *devmem_heap_hndl;
+       struct vxe_enc_ctx *ctx;
+       struct vxe_dev *vxe;
+       struct mmu_str_context *str_ctx;
+
+       if (!mmu_str_hndl)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       str_ctx = (struct mmu_str_context *)mmu_str_hndl;
+
+       /* Check if device level heap. */
+       switch (heap_id) {
+               case MMU_GENERAL_HEAP_ID:
+               break;
+
+               default:
+                       return IMG_ERROR_INVALID_PARAMETERS;
+       }
+
+       /* Round size up to next multiple of physical pages */
+       if ((size % HOST_MMU_PAGE_SIZE) != 0)
+               size = ((size / HOST_MMU_PAGE_SIZE) + 1) * HOST_MMU_PAGE_SIZE;
+
+       ddbuf_info->buff_id = buff_id;
+       ddbuf_info->is_internal = 0;
+
+       ddbuf_info->kmstr_id = str_ctx->km_str_id;
+
+       /* Set buffer size. */
+       ddbuf_info->buf_size = size;
+
+       /* Ensure the address of the buffer is at least page aligned. */
+       ddbuf_info->cpu_virt = cpu_linear_addr;
+
+       /* Get heap handle */
+       result = talmmu_get_heap_handle(heap_id, str_ctx->mmu_context_handle,
+                                       &devmem_heap_hndl);
+       if (result != IMG_SUCCESS)
+               return result;
+
+       /* Allocate device "virtual" memory. */
+       result = talmmu_devmem_addr_alloc(str_ctx->mmu_context_handle,
+                                         devmem_heap_hndl, size, alignment,
+                                         &ddbuf_info->hndl_memory);
+       if (result != IMG_SUCCESS)
+               return result;
+
+       /* Get the device virtual address. */
+       result = talmmu_get_dev_virt_addr(ddbuf_info->hndl_memory, &ddbuf_info->dev_virt);
+       if (result != IMG_SUCCESS)
+               return result;
+
+       /*
+        * Map device memory (allocated from outside VDEC)
+        * into the stream PTD.
+        */
+       ctx = str_ctx->vxe_enc_context;
+       vxe = ctx->dev;
+
+       return (img_mmu_map(ctx->mmu_ctx, ctx->mem_ctx, ddbuf_info->buff_id, ddbuf_info->dev_virt, mem_attrib));
+}
+
+/*
+ * mmu_free
+ */
+int32 mmu_free(struct vxe_enc_ctx *vxe_enc_ctx_arg, struct vidio_ddbufinfo *ddbuf_info)
+{
+       int result = 0;
+       struct vxe_enc_ctx *ctx;
+       struct vxe_dev *vxe;
+
+       /* Validate inputs. */
+       if (!ddbuf_info)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       /* Unmap the memory mapped to the device */
+       ctx = vxe_enc_ctx_arg;
+       vxe = ctx->dev;
+
+       result = img_mmu_unmap(ctx->mmu_ctx, ctx->mem_ctx, ddbuf_info->buff_id);
+
+       /*
+        * Unmapping the memory mapped to the device - done
+        * Free the memory.
+        */
+       result = talmmu_devmem_addr_free(ddbuf_info->hndl_memory);
+
+       if (ddbuf_info->is_internal)
+        img_mem_free(ctx->mem_ctx, ddbuf_info->buff_id);
+
+       return result;
+}
+
+/*
+ * mmu_free_mem.
+ * This should be used only to free the stream memory.
+ */
+int32 mmu_stream_free(void *mmu_str_hndl, struct vidio_ddbufinfo *ddbuf_info)
+{
+       struct mmu_str_context *str_ctx;
+
+       if (!mmu_str_hndl)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       str_ctx = (struct mmu_str_context *)mmu_str_hndl;
+
+       return mmu_free(str_ctx->vxe_enc_context, ddbuf_info);
+}
+
+/*
+ * mmu_free_mem_sg.
+ * This should be used only to free the stream memory.
+ */
+int32 mmu_stream_free_sg(void *mmu_str_hndl, struct vidio_ddbufinfo *ddbuf_info)
+{
+       int result = 0;
+       struct vxe_enc_ctx *ctx;
+       struct vxe_dev *vxe;
+       struct mmu_str_context *str_ctx;
+
+
+       /* Validate inputs. */
+       if (!ddbuf_info || !mmu_str_hndl)
+               return IMG_ERROR_INVALID_PARAMETERS;
+
+       str_ctx = (struct mmu_str_context *)mmu_str_hndl;
+
+       /* Unmap the memory mapped to the device */
+       ctx = str_ctx->vxe_enc_context;
+       vxe = ctx->dev;
+
+       result = img_mmu_unmap(ctx->mmu_ctx, ctx->mem_ctx, ddbuf_info->buff_id);
+
+       /*
+        * Unmapping the memory mapped to the device - done
+        * Free the memory.
+        */
+       result = talmmu_devmem_addr_free(ddbuf_info->hndl_memory);
+
+       /*
+        * for external mem manager buffers, just cleanup the idr list and
+        * buffer objects
+        */
+       img_mem_free_bufid(ctx->mem_ctx, ddbuf_info->buff_id);
+
+       return result;
+}
+
+int update_device_mem(struct vxe_enc_ctx *vxe_enc_ctx_arg,
+                     struct vidio_ddbufinfo *ddbuf_info)
+{
+       struct vxe_enc_ctx *ctx = vxe_enc_ctx_arg;
+
+       return img_mem_sync_cpu_to_device(ctx->mem_ctx,
+                                         ddbuf_info->buff_id);
+}
+
+int32 update_host_mem(struct vxe_enc_ctx *vxe_enc_ctx_arg,
+                     struct vidio_ddbufinfo *ddbuf_info)
+{
+       struct vxe_enc_ctx *ctx = vxe_enc_ctx_arg;
+
+       return img_mem_sync_device_to_cpu(ctx->mem_ctx,
+                                         ddbuf_info->buff_id);
+}
+
+/*
+ * Called for each Topaz core when MMU support is activated, sets up the MMU
+ * hardware for the specified core.
+ */
+int topaz_core_mmu_hw_setup(struct topaz_mmu_context *mmu_context, void* core_reg)
+{
+       uint32 cmd;
+       void* sys_mem_id;
+
+       sys_mem_id = (void *)topaz_mem_space[MEMSYSMEM].cpu_addr;
+
+       /* Bypass all requesters while MMU is being configured */
+       cmd = F_ENCODE(1, TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ);
+       VXE_WR_REG32 ( core_reg, TOPAZHP_TOP_CR_MMU_CONTROL0, cmd );
+
+       VXE_WR_REG32(core_reg, TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE(0), mmu_context->ptd_phys_addr);
+
+       cmd = VXE_RD_REG32(core_reg,TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE(0));
+
+       OSA_PR_INFO("Page table directory at physical address 0x%08x\n", cmd);
+       /*
+        * Set up the Index Register (to point to the base register)
+        * We're setting all fields to zero (all flags pointing to directory bank 0)
+        */
+       cmd = 0;
+
+       /*  Now enable MMU access for all requesters */
+       cmd = F_ENCODE(use_extended_addressing ? 1 : 0, TOPAZHP_TOP_CR_MMU_ENABLE_36BIT_ADDRESSING); /* 36-bit actually means "not 32-bit" */
+       VXE_WR_REG32(core_reg, TOPAZHP_TOP_CR_MMU_CONTROL2, cmd);
+
+       mmu_control_val = cmd= F_ENCODE(0, TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ);
+
+       if (!use_secure_fw_upload)
+               VXE_WR_REG32 ( core_reg, TOPAZHP_TOP_CR_MMU_CONTROL0, cmd );
+
+       return 0;
+}
+
+/*
+ * topaz_core_mmu_flush_cache
+ */
+int topaz_core_mmu_flush_cache(void)
+{
+       static void* core_reg = NULL;
+       uint32 reg_value;
+       ulong flags;
+
+       if (core_reg == NULL)
+               core_reg = (void *)topaz_mem_space[REG_TOPAZHP_MULTICORE].cpu_addr;
+
+       /* TODO we can have global mutex or local based on need */
+       osa_spin_lock_irqsave(g_lock, &flags);
+
+       reg_value = VXE_RD_REG32( core_reg, TOPAZHP_TOP_CR_MMU_CONTROL0);
+
+       /* PAUSE */
+       reg_value |= F_ENCODE(1, TOPAZHP_TOP_CR_MMU_PAUSE);
+       VXE_WR_REG32 ( core_reg, TOPAZHP_TOP_CR_MMU_CONTROL0, reg_value);
+
+       {
+               uint32 i, mem_req_reg;
+               wait_till_idle:
+               for (i = 0; i < 10; i++) {
+                       mem_req_reg = VXE_RD_REG32 (core_reg, TOPAZHP_TOP_CR_MMU_MEM_REQ);
+                       if (mem_req_reg != 0)
+                               goto wait_till_idle;
+               }
+       }
+
+       /* Set invalidate */
+       reg_value |= F_ENCODE(1, TOPAZHP_TOP_CR_MMU_INVALDC);
+       VXE_WR_REG32 ( core_reg, TOPAZHP_TOP_CR_MMU_CONTROL0, reg_value);
+
+       /* Clear invalidate */
+       reg_value &= ~((uint32)F_ENCODE(1, TOPAZHP_TOP_CR_MMU_INVALDC));
+       VXE_WR_REG32 ( core_reg, TOPAZHP_TOP_CR_MMU_CONTROL0, reg_value);
+
+
+       /* UNPAUSE */
+       reg_value &= ~((uint32)F_ENCODE(1, TOPAZHP_TOP_CR_MMU_PAUSE));
+       VXE_WR_REG32 ( core_reg, TOPAZHP_TOP_CR_MMU_CONTROL0, reg_value);
+
+       /* TODO we can have global mutex or local based on need */
+       osa_spin_unlock_irqrestore(g_lock, flags);
+
+       return 0;
+}
diff --git a/driver/encoder/topazmmu.h b/driver/encoder/topazmmu.h
new file mode 100644 (file)
index 0000000..824ffa0
--- /dev/null
@@ -0,0 +1,203 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * topaz mmu header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef TOPAZZ_MMU_H_
+#define TOPAZZ_MMU_H_
+
+#include "talmmu_api.h"
+#include "vxe_enc.h"
+#include "osal/inc/osa_define.h"
+#include "img_mem.h"
+
+/* Page size of the device MMU */
+#define DEV_MMU_PAGE_SIZE (0x1000)
+/* Page alignment of the device MMU */
+#define DEV_MMU_PAGE_ALIGNMENT  (0x1000)
+
+#define HOST_MMU_PAGE_SIZE OSA_PAGE_SIZE
+
+/*
+ * This structure contains the stream context.
+ * @brief MMU Stream Context
+ * @devmem_ctx_hndl: Handle for MMU context.
+ * @dev_ctx: Pointer to device context.
+ * @ctx_id: MMU context Id.
+ * km_str_id: Stream ID used in communication with new KM interface
+ */
+struct mmu_str_context {
+       void **link; // to be able to maintain in single linked list.
+       void *mmu_context_handle;
+       uint32 int_reg_num;
+       uint32 km_str_id;
+       /* vxe encoder context. Need in stream context to access mem_ctx. */
+       struct vxe_enc_ctx  *vxe_enc_context;
+       struct lst_t ddbuf_list;
+};
+
+struct topaz_mmu_context {
+       void *mmu_context_handle;
+       uint32 ptd_phys_addr;
+       struct lst_t str_list;
+};
+
+/*
+ * This type defines MMU variant.
+ */
+enum mmu_etype {
+       MMU_TYPE_NONE = 0,
+       MMU_TYPE_32BIT,
+       MMU_TYPE_36BIT,
+       MMU_TYPE_40BIT,
+};
+
+/*
+ * This type defines the MMU heaps.
+ * @0: General heap ID.
+ */
+enum mmu_eheap_id {
+       MMU_GENERAL_HEAP_ID             = 0x00,
+       /* Do not remove - keeps count of size */
+       HEAP_ID_NO_OF_HEAPS
+};
+
+/* Function definitions */
+
+/*
+ * Called once during initialization to initialize the MMU hardware, create
+ * the template and define the MMU heap.
+ * This is where talmmu initialization and template will be created.
+ *
+ * NOTE : We are not taking care of alignment here, need to be updated in
+ * mmu_device_memory_info.
+ */
+int mmu_device_create(struct topaz_mmu_context *mmu_context, uint32 mmu_flags);
+
+/*
+ * @Function   mmu_device_destroy
+ * @Description
+ * This function is used to destroy the MMU device context.
+ * NOTE: Destroy device automatically destroys any streams and frees and
+ * memory allocated using MMU_StreamMalloc().
+ * @Return     IMG_SUCCESS or an error code.
+ */
+int mmu_device_destroy(struct topaz_mmu_context *mmu_context);
+
+/*
+ * @Function   mmu_stream_create
+ * @Description
+ * This function is used to create and initialize the MMU stream context.
+ * @Input      km_str_id : Stream Id used in communication with KM driver.
+ * @Return     IMG_SUCCESS or an error code.
+ *
+ * Context ID is 1, since we are creating single stream.
+ */
+int32 mmu_stream_create(struct topaz_mmu_context *mmu_context, uint32 km_str_id, void *vxe_enc_ctx_arg, void **mmu_str_ctx);
+
+/*
+ * @Function   mmu_stream_destroy
+ * @Description
+ * This function is used to destroy the MMU stream context.
+ * NOTE: Destroy automatically frees and memory allocated using
+ *     mmu_stream_malloc().
+ * @Input      str_ctx : The MMU stream handle.
+ * @Return     IMG_SUCCESS or an error code.
+ */
+int32 mmu_stream_destroy(struct topaz_mmu_context *mmu_context, struct mmu_str_context *str_ctx);
+
+int32 mmu_alloc(void *mmu_context_handle, struct vxe_enc_ctx *vxe_enc_ctx_arg,
+                enum mmu_eheap_id heap_id, uint32 mem_heap_id,
+                enum sys_emem_attrib mem_attrib,  uint32 size, uint32 alignment,
+                struct vidio_ddbufinfo *ddbuf_info);
+/*
+ * @Function   mmu_stream_malloc
+ */
+int32 mmu_stream_alloc(void *mmu_str_hndl, enum mmu_eheap_id heap_id,
+                    uint32 mem_heap_id,
+                    enum sys_emem_attrib mem_attrib,
+                    uint32 size,
+                    uint32 alignment,
+                    struct vidio_ddbufinfo *ddbuf_info);
+
+/*
+ * @Function   mmu_stream_map_ext_sg
+ */
+int32 mmu_stream_map_ext_sg(void *mmu_str_hndl, enum mmu_eheap_id heap_id,
+                         void *sgt,
+                         uint32 size,
+                         uint32 alignment,
+                         enum sys_emem_attrib mem_attrib,
+                         void *cpu_linear_addr,
+                         struct vidio_ddbufinfo *ddbuf_info,
+                         uint32 *buff_id);
+
+
+/*
+ * @Function   mmu_stream_map_ext
+ */
+int32 mmu_stream_map_ext(void *mmu_str_hndl, enum mmu_eheap_id heap_id,
+                      uint32 buff_id,
+                      uint32 size,
+                      uint32 alignment,
+                      enum sys_emem_attrib mem_attrib,
+                      void *cpu_linear_addr,
+                      struct vidio_ddbufinfo *ddbuf_info);
+
+/* topaz core mmu hardware setup */
+int topaz_core_mmu_hw_setup(struct topaz_mmu_context *mmu_context, void* core_reg);
+
+/* topaz core mmu flush cache */
+int topaz_core_mmu_flush_cache(void);
+
+/*
+ * @Function    mmu_free
+ *
+ * Free memory allocated with mmu_alloc
+ */
+int32 mmu_free(struct vxe_enc_ctx *vxe_enc_ctx_arg,
+              struct vidio_ddbufinfo *ddbuf_info);
+
+/*
+ * @Function   mmu_free_mem.
+ *
+ * NOTE : This should be used only to free the stream memory.
+ */
+int32 mmu_stream_free(void *mmu_str_hndl, struct vidio_ddbufinfo *ddbuf_info);
+
+/*
+ * @Function   mmu_free_mem_sg.
+ *
+ * NOTE : This should be used only to free the stream memory.
+ */
+int32 mmu_stream_free_sg(void *mmu_str_hndl, struct vidio_ddbufinfo *ddbuf_info);
+
+/*
+ * @Function    update_device_mem
+ *
+ * Update the memory to the device
+ */
+int32 update_device_mem(struct vxe_enc_ctx *vxe_enc_ctx_arg,
+                       struct vidio_ddbufinfo *ddbuf_info);
+
+/*
+ * @Function    update_host_mem
+ *
+ * Update the memory to the host
+ */
+int32 update_host_mem(struct vxe_enc_ctx *vxe_enc_ctx_arg,
+                     struct vidio_ddbufinfo *ddbuf_info);
+
+#endif /* TOPAZZ_MMU_H_ */
diff --git a/driver/encoder/vxe_enc.c b/driver/encoder/vxe_enc.c
new file mode 100644 (file)
index 0000000..0df3acb
--- /dev/null
@@ -0,0 +1,576 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Encoder Interface API function implementations
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "img_mem_man.h"
+#include "osal/inc/osa_define.h"
+#include "osal/inc/osa_types.h"
+#include "topazmmu.h"
+#include "vxe_enc.h"
+
+#define VXE_INVALID_ID (-1)
+
+/* Driver context */
+static struct {
+       /* Available memory heaps. List of <struct vxe_heap> */
+       struct clist_head heaps;
+       /* heap id for all internal allocations */
+       int32 internal_heap_id;
+       /* Memory Management context for driver */
+       struct mem_ctx *mem_ctx;
+       /* MMU context for driver */
+       struct mmu_ctx *mmu_ctx;
+       /* PTD */
+       uint32 ptd;
+} vxe_drv;
+
+/*
+ * struct vxe_heap - node for heaps list
+ * @id:   heap id
+ * @list: Entry in <struct vxe_drv:heaps>
+ */
+struct vxe_heap {
+       int32 id;
+       struct clist_head list;
+};
+
+static struct heap_config vxe_enc_heap_configs[] = {
+       {
+               .type = MEM_HEAP_TYPE_UNIFIED,
+               .options.unified = {
+                       .gfp_type = __GFP_DMA32 | __GFP_ZERO,
+               },
+               .to_dev_addr = NULL,
+       },
+};
+
+void mmu_callback(enum mmu_callback_type callback_type,
+                 int32 buff_id, void *data)
+{
+        topaz_core_mmu_flush_cache();
+}
+
+int vxe_init_mem(struct vxe_dev *vxe)
+{
+       struct heap_config *heap_configs = vxe_enc_heap_configs;
+       int32 num_heaps = ARRAY_SIZE(vxe_enc_heap_configs);
+       int ret;
+       uint32 i;
+
+       ret = img_mem_init(vxe->dev);
+       if (ret) {
+               dev_err(vxe->dev, "Failed to initialize memory\n");
+               return -ENOMEM;
+       }
+
+       INIT_OSA_LIST_HEAD(&vxe_drv.heaps);
+       vxe_drv.internal_heap_id = VXE_INVALID_ID;
+
+       /* Initialise memory management component */
+       for (i = 0; i < num_heaps; i++) {
+               struct vxe_heap *heap;
+
+               dev_info(vxe->dev, "%s: adding heap of type %d\n",
+                        __func__, heap_configs[i].type);
+
+               heap = osa_zalloc(sizeof(*heap), OSA_GFP_KERNEL);
+               if (!heap) {
+                       ret = -ENOMEM;
+                       goto heap_add_failed;
+               }
+
+               ret = img_mem_add_heap(&heap_configs[i], &heap->id);
+               if (ret < 0) {
+                       dev_err(vxe->dev, "%s: failed to init heap (type %d)!\n",
+                               __func__, heap_configs[i].type);
+                       osa_free(heap);
+                       goto heap_add_failed;
+               }
+               osa_list_add(&heap->list, &vxe_drv.heaps);
+
+               /* Implicitly, first heap is used for internal allocations */
+               if (vxe_drv.internal_heap_id < 0) {
+                       vxe_drv.internal_heap_id = heap->id;
+                       dev_err(vxe->dev, "%s: using heap %d for internal alloc\n",
+                               __func__, vxe_drv.internal_heap_id);
+               }
+       }
+
+       /* Do not proceed if internal heap not defined */
+       if (vxe_drv.internal_heap_id < 0) {
+               dev_err(vxe->dev, "%s: failed to locate heap for internal alloc\n",
+                       __func__);
+               ret = -EINVAL;
+               /* Loop registered heaps just for sanity */
+               goto heap_add_failed;
+       }
+
+       /* Create memory management context for HW buffers */
+       ret = img_mem_create_ctx(&vxe_drv.mem_ctx);
+       if (ret) {
+               OSA_DEV_ERR(vxe->dev, "%s: failed to create mem context (err:%d)!\n",
+                           __func__, ret);
+               goto create_mem_context_failed;
+       }
+
+       vxe->mem_ctx = vxe_drv.mem_ctx;
+
+       ret = img_mmu_ctx_create(vxe->dev, 40 /* mmu_addr_width is 40 */,
+                                 vxe->mem_ctx, vxe_drv.internal_heap_id,
+                                 mmu_callback, vxe, &vxe_drv.mmu_ctx);
+        if (ret) {
+                OSA_DEV_ERR(vxe->dev, "%s:%d: failed to create mmu ctx\n",
+                        __func__, __LINE__);
+                goto create_mmu_context_failed;
+        }
+
+       vxe->mmu_ctx = vxe_drv.mmu_ctx;
+
+       ret = img_mmu_get_ptd(vxe->mmu_ctx, &vxe_drv.ptd);
+        if (ret) {
+                OSA_DEV_ERR(vxe->dev, "%s:%d: failed to get PTD\n",
+                        __func__, __LINE__);
+                goto get_ptd_failed;
+        }
+       vxe->ptd = vxe_drv.ptd;
+
+       return 0;
+
+get_ptd_failed:
+       img_mmu_ctx_destroy(vxe_drv.mmu_ctx);
+create_mmu_context_failed:
+       img_mem_destroy_ctx(vxe_drv.mem_ctx);
+create_mem_context_failed:
+heap_add_failed:
+       while (!osa_list_empty(&vxe_drv.heaps)) {
+               struct vxe_heap *heap;
+
+               heap = osa_list_first_entry(&vxe_drv.heaps, struct vxe_heap, list);
+               osa_list_del(&heap->list);
+               img_mem_del_heap(heap->id);
+               osa_free(heap);
+       }
+       vxe_drv.internal_heap_id = VXE_INVALID_ID;
+       return ret;
+}
+
+void vxe_deinit_mem(void)
+{
+       if (vxe_drv.mmu_ctx) {
+               img_mmu_ctx_destroy(vxe_drv.mmu_ctx);
+               vxe_drv.mmu_ctx = NULL;
+       }
+
+       if (vxe_drv.mem_ctx) {
+               img_mem_destroy_ctx(vxe_drv.mem_ctx);
+               vxe_drv.mem_ctx = NULL;
+       }
+
+       /* Deinitialize memory management component */
+       while (!osa_list_empty(&vxe_drv.heaps)) {
+               struct vxe_heap *heap;
+
+               heap = osa_list_first_entry(&vxe_drv.heaps, struct vxe_heap, list);
+               osa_list_del(&heap->list);
+               img_mem_del_heap(heap->id);
+               osa_free(heap);
+       }
+
+       vxe_drv.internal_heap_id = VXE_INVALID_ID;
+
+       img_mem_exit();
+}
+
+void vxe_create_ctx(struct vxe_dev *vxe, struct vxe_enc_ctx *ctx)
+{
+       ctx->mem_ctx = vxe->mem_ctx;
+       ctx->mmu_ctx = vxe->mmu_ctx;
+       return;
+}
+
+uint32 calculate_h264_level(uint32 width, uint32 height, uint32 framerate,
+                           osa_bool rc_enable, uint32 bitrate,
+                           osa_bool lossless,
+                           enum sh_profile_type profile_type,
+                           uint32 max_num_ref_frames)
+{
+       uint32 level = 0, mbf = 0, mbs = 0, temp_level = 0, dpb_mbs;
+       uint32 num = 1, den = 1;
+       uint32 lossless_min_level = 320;
+
+       mbf = (width * height) / 256;
+       mbs = mbf * framerate;
+
+       if (mbf > 36864) {
+               OSA_PR_WARN("WARNING: Frame size is too high for maximum supported level!\n");
+               level = 520;
+       } else if (mbf > 22080) {
+               level = 510;
+       } else if (mbf > 8704) {
+               level = 500;
+       } else if (mbf > 8192) {
+               level = 420;
+       } else if (mbf > 5120) {
+               level = 400;
+       } else if (mbf > 3600) {
+               level = 320;
+       } else if (mbf > 1620) {
+               level = 310;
+       } else if (mbf > 792) {
+               level = 220;
+       } else if (mbf > 396) {
+               level = 210;
+       } else if (mbf > 99) {
+               level = 110;
+       } else {
+               level = 100;
+       }
+
+       dpb_mbs = mbf * max_num_ref_frames;
+
+       if (dpb_mbs > 184320) {
+               OSA_PR_WARN("ERROR: Decoded picture buffer is too high for supported level!\n");
+               return -1;
+       } else if (dpb_mbs > 110400) {
+               temp_level = 510;
+       } else if (dpb_mbs > 34816) {
+               temp_level = 500;
+       } else if (dpb_mbs > 32768) {
+               temp_level = 420;
+       } else if (dpb_mbs > 20480) {
+               temp_level = 400;
+       } else if (dpb_mbs > 18000) {
+               temp_level = 320;
+       } else if (dpb_mbs > 8100) {
+               temp_level = 310;
+       } else if (dpb_mbs > 4752) {
+               temp_level = 220;
+       } else if (dpb_mbs > 2376) {
+               temp_level = 210;
+       } else if (dpb_mbs > 900) {
+               temp_level = 120;
+       } else if (dpb_mbs > 396) {
+               temp_level = 110;
+       } else {
+               temp_level = 100;
+       }
+
+       level = max(level, temp_level);
+
+       /* now restrict based on the number of macroblocks per second */
+       if (mbs > 2073600) {
+               OSA_PR_ERR("ERROR: Macroblock processing rate is too high for supported level!\n");
+               return -1;
+       } else if (mbs > 983040) {
+               temp_level = 520;
+       } else if (mbs > 589824) {
+               temp_level = 510;
+       } else if (mbs > 522240) {
+               temp_level = 500;
+       } else if (mbs > 245760) {
+               temp_level = 420;
+       } else if (mbs > 216000) {
+               temp_level = 400;
+       } else if (mbs > 108000) {
+               temp_level = 320;
+       } else if (mbs > 40500) {
+               temp_level = 310;
+       } else if (mbs > 20250) {
+               temp_level = 300;
+       } else if (mbs > 19800) {
+               temp_level = 220;
+       } else if (mbs > 11880) {
+               temp_level = 210;
+       } else if (mbs > 6000) {
+               temp_level = 130;
+       } else if (mbs > 3000) {
+               temp_level = 120;
+       } else if (mbs > 1485) {
+               temp_level = 110;
+       } else {
+               temp_level = 100;
+       }
+
+       level = max(level, temp_level);
+
+       if (rc_enable) {
+               /*
+                * SH_PROFILE_H10P and SH_PROFILE_H422P are
+                * not valid choices for HW_3_X, skipping
+                */
+               if (profile_type == SH_PROFILE_HP) {
+                       num = 5;
+                       den = 4;
+               } else if (profile_type == SH_PROFILE_H444P) {
+                       num = 4;
+                       den = 1;
+               }
+
+               if (bitrate > ((135000000 * num) / den)) {
+                       temp_level = 510;
+               } else if (bitrate > ((50000000 * num) / den)) {
+                       temp_level = 500;
+               } else if (bitrate > ((20000000 * num) / den)) {
+                       temp_level = 410;
+               } else if (bitrate > ((14000000 * num) / den)) {
+                       temp_level = 320;
+               } else if (bitrate > ((10000000 * num) / den)) {
+                       temp_level = 310;
+               } else if (bitrate > ((4000000 * num) / den)) {
+                       temp_level = 300;
+               } else if (bitrate > ((2000000 * num) / den)) {
+                       temp_level = 210;
+               } else if (bitrate > ((768000 * num) / den)) {
+                       temp_level = 200;
+               } else if (bitrate > ((384000 * num) / den)) {
+                       temp_level = 130;
+               } else if (bitrate > ((192000 * num) / den)) {
+                       temp_level = 120;
+               } else if (bitrate > ((128000 * num) / den)) {
+                       temp_level = 110;
+               } else if (bitrate > ((64000 * num) / den)) {
+                       temp_level = 101;
+               } else {
+                       temp_level = 100;
+               }
+
+               level = max(level, temp_level);
+       } else {
+               level = 510;
+       }
+
+       if (lossless) {
+               level = max(level, lossless_min_level);
+       }
+
+       return level;
+}
+
+enum sh_profile_type find_h264_profile(osa_bool lossless,
+                                      osa_bool h264_use_default_scaling_list,
+                                      uint32 custom_quant_mask,
+                                      osa_bool h264_8x8_transform,
+                                      osa_bool enable_mvc,
+                                      uint32 b_frame_count,
+                                      osa_bool interlaced,
+                                      osa_bool h264_cabac,
+                                      uint32 weighted_prediction_mode,
+                                      uint32 weighted_implicit_bi_pred)
+{
+       enum sh_profile_type profile = SH_PROFILE_BP;
+
+       if (lossless)
+               profile = SH_PROFILE_H444P;
+       else if (h264_use_default_scaling_list || custom_quant_mask ||
+                  h264_8x8_transform || enable_mvc)
+               profile = SH_PROFILE_HP;
+       else if ((b_frame_count > 0) || interlaced || h264_cabac ||
+                  weighted_prediction_mode || weighted_implicit_bi_pred)
+               profile = SH_PROFILE_MP;
+
+       return profile;
+}
+
+void vxe_fill_default_src_frame_params(struct vxe_buffer *buf)
+{
+       buf->src_frame.component_count = 0; /* Unset in IMG */
+       buf->src_frame.format = 0; /* Unset in IMG */
+       buf->src_frame.component_offset[0] = 0;
+       buf->src_frame.component_offset[1] = 0;
+       buf->src_frame.component_offset[2] = 0;
+       buf->src_frame.bottom_component_offset[0] = 0; /* Unset in IMG */
+       buf->src_frame.bottom_component_offset[1] = 0; /* Unset in IMG */
+       buf->src_frame.bottom_component_offset[2] = 0; /* Unset in IMG */
+       buf->src_frame.component_info[0].step = 0;
+       buf->src_frame.component_info[0].width = 0;
+       buf->src_frame.component_info[0].height = 0;
+       buf->src_frame.component_info[0].phys_width = 0;
+       buf->src_frame.component_info[0].phys_height = 0;
+       buf->src_frame.component_info[1].step = 0;
+       buf->src_frame.component_info[1].width = 0;
+       buf->src_frame.component_info[1].height = 0;
+       buf->src_frame.component_info[1].phys_width = 0;
+       buf->src_frame.component_info[1].phys_height = 0;
+       buf->src_frame.component_info[2].step = 0;
+       buf->src_frame.component_info[2].width = 0;
+       buf->src_frame.component_info[2].height = 0;
+       buf->src_frame.component_info[2].phys_width = 0;
+       buf->src_frame.component_info[2].phys_height = 0;
+       buf->src_frame.field0_y_offset = 0;
+       buf->src_frame.field1_y_offset = 0;
+       buf->src_frame.field0_u_offset = 0;
+       buf->src_frame.field1_u_offset = 0;
+       buf->src_frame.field0_v_offset = 0;
+       buf->src_frame.field1_v_offset = 0;
+       buf->src_frame.imported = osa_false;
+}
+
+void vxe_fill_default_params(struct vxe_enc_ctx *ctx)
+{
+       int32 i, j;
+       uint16 h264_rounding_offsets[18][4] = {
+               {683, 683, 683, 683}, /* 0 I-Slice - INTRA4 LUMA */
+               {683, 683, 683, 683}, /* 1 P-Slice - INTRA4 LUMA */
+               {683, 683, 683, 683}, /* 2 B-Slice - INTRA4 LUMA */
+
+               {683, 683, 683, 683}, /* 3 I-Slice - INTRA8 LUMA */
+               {683, 683, 683, 683}, /* 4 P-Slice - INTRA8 LUMA */
+               {683, 683, 683, 683}, /* 5 B-Slice - INTRA8 LUMA */
+
+               {341, 341, 341, 341}, /* 6 P-Slice - INTER8 LUMA */
+               {341, 341, 341, 341}, /* 7 B-Slice - INTER8 LUMA */
+
+               {683, 683, 683, 000}, /* 8 I-Slice - INTRA16 LUMA */
+               {683, 683, 683, 000}, /* 9 P-Slice - INTRA16 LUMA */
+               {683, 683, 683, 000}, /* 10 B-Slice - INTRA16 LUMA */
+
+               {341, 341, 341, 341}, /* 11 P-Slice - INTER16 LUMA */
+               {341, 341, 341, 341}, /* 12 B-Slice - INTER16 LUMA */
+
+               {683, 683, 683, 000}, /* 13 I-Slice - INTRA16 CR */
+               {683, 683, 683, 000}, /* 14 P-Slice - INTRA16 CR */
+               {683, 683, 683, 000}, /* 15 B-Slice - INTRA16 CR */
+
+               {341, 341, 341, 000 }, /* 16 P-Slice - INTER16 CHROMA */
+               {341, 341, 341, 000 } /* 17 B-Slice - INTER16 CHROMA */
+       };
+
+       ctx->vparams.csc_preset = IMG_CSC_NONE;
+       ctx->vparams.slices_per_picture = 1;
+       ctx->vparams.is_interleaved = osa_false;
+       ctx->vparams.constrained_intra = osa_false;
+       ctx->vparams.h264_8x8 = osa_true;
+       ctx->vparams.bottom_field_first = osa_false;
+       ctx->vparams.arbitrary_so = osa_false;
+       ctx->vparams.cabac_enabled = osa_true;
+       ctx->vparams.cabac_bin_limit = 2800;
+       ctx->vparams.cabac_bin_flex = 2800;
+       ctx->vparams.deblock_idc = 0;
+       ctx->vparams.output_reconstructed = osa_false;
+       ctx->vparams.f_code = 4;
+       ctx->vparams.fine_y_search_size = 2;
+       ctx->vparams.no_offscreen_mv = osa_false;
+       ctx->vparams.idr_period = 1800; /* 60 * 30fps */
+       ctx->vparams.intra_cnt = 30;
+       ctx->vparams.vop_time_resolution = 15;
+       ctx->vparams.enc_features.disable_intra4x4 = osa_false;
+       ctx->vparams.enc_features.disable_intra8x8 = osa_false;
+       ctx->vparams.enc_features.disable_intra16x16 = osa_false;
+       ctx->vparams.enc_features.disable_inter8x8 = osa_false;
+       ctx->vparams.enc_features.restrict_inter4x4 = osa_false;
+       ctx->vparams.enc_features.disable_bpic_ref1 = osa_false;
+       ctx->vparams.enc_features.disable_bpic_ref0 = osa_false;
+       ctx->vparams.enc_features.enable_8x16_mv_detect = osa_true;
+       ctx->vparams.enc_features.enable_16x8_mv_detect = osa_true;
+       ctx->vparams.enc_features.disable_bframes = osa_false;
+       ctx->vparams.enc_features.min_blk_sz = BLK_SZ_DEFAULT;
+       ctx->vparams.enc_features.restricted_intra_pred = osa_false;
+       ctx->vparams.enable_sel_stats_flags = 0;
+       ctx->vparams.enable_inp_ctrl = osa_false;
+       ctx->vparams.enable_air = osa_false;
+       ctx->vparams.num_air_mbs = -1;
+       ctx->vparams.air_threshold = -1;
+       ctx->vparams.air_skip_cnt = -1;
+       ctx->vparams.enable_cumulative_biases = osa_false;
+       ctx->vparams.enable_host_bias = osa_true;
+       ctx->vparams.enable_host_qp = osa_false;
+       ctx->vparams.use_default_scaling_list = osa_false;
+       ctx->vparams.use_custom_scaling_lists = 0;
+       ctx->vparams.pps_scaling = 0;
+       ctx->vparams.disable_bit_stuffing = osa_false;
+       ctx->vparams.coded_skipped_index = 3;
+       ctx->vparams.inter_intra_index = 3;
+       ctx->vparams.mpeg2_intra_dc_precision = 0;
+       ctx->vparams.carc = 0;
+       ctx->vparams.carc_baseline = 0;
+       ctx->vparams.carc_threshold = 1;
+       ctx->vparams.carc_cutoff = 15;
+       ctx->vparams.carc_neg_range = 5;
+       ctx->vparams.carc_neg_scale = 12;
+       ctx->vparams.carc_pos_range = 5;
+       ctx->vparams.carc_pos_scale = 12;
+       ctx->vparams.carc_shift = 3;
+       ctx->vparams.weighted_prediction = osa_false;
+       ctx->vparams.vp_weighted_implicit_bi_pred = 0;
+       ctx->vparams.insert_hrd_params = osa_false;
+       ctx->vparams.intra_refresh = 0;
+       ctx->vparams.chunks_per_mb = 64;
+       ctx->vparams.max_chunks = 160;
+       ctx->vparams.priority_chunks = 64;
+       ctx->vparams.mbps = 0;
+       ctx->vparams.multi_reference_p = osa_false;
+       ctx->vparams.ref_spacing = 0;
+       ctx->vparams.spatial_direct = osa_false;
+       ctx->vparams.vp_adaptive_rounding_disable = 0;
+
+       for (i = 0; i < 18; i++) {
+               for (j = 0; j < 4; j++) {
+                       ctx->vparams.vp_adaptive_rounding_offsets[i][j] =
+                               h264_rounding_offsets[i][j];
+               }
+       }
+
+       ctx->vparams.debug_crcs = 0;
+       ctx->vparams.enable_mvc = osa_false;
+       ctx->vparams.mvc_view_idx = 65535;
+       ctx->vparams.high_latency = osa_true;
+       ctx->vparams.disable_bh_rounding = osa_false;
+       ctx->vparams.no_sequence_headers = osa_false;
+       ctx->vparams.auto_encode = osa_false;
+       ctx->vparams.slice_level = osa_false;
+       ctx->vparams.coded_header_per_slice = osa_false;
+       ctx->vparams.auto_expand_pipes = osa_false;
+       ctx->vparams.enable_lossless = osa_false;
+       ctx->vparams.lossless_8x8_prefilter = osa_false;
+       ctx->vparams.enable_scaler = osa_false;
+       ctx->vparams.line_counter_enabled = osa_false;
+
+       ctx->rc.initial_qp_i = 18;
+       ctx->rc.initial_qp_p = 0;
+       ctx->rc.initial_qp_b = 0;
+
+       ctx->rc.min_qp = 0;
+       ctx->rc.max_qp = 0;
+       ctx->rc.rc_enable = osa_true;
+
+       ctx->rc.hierarchical = osa_false;
+
+       ctx->rc.enable_slice_bob = osa_false;
+       ctx->rc.max_slice_bob = 2;
+       ctx->rc.slice_bob_qp = 44;
+
+       ctx->rc.qcp_offset = 0;
+       ctx->rc.sc_detect_disable = osa_false;
+       ctx->rc.slice_byte_limit = 0;
+       ctx->rc.slice_mb_limit = 0;
+       ctx->rc.rc_mode = IMG_RCMODE_CBR;
+       ctx->rc.rc_vcm_mode = IMG_RC_VCM_MODE_DEFAULT;
+       ctx->rc.rc_cfs_max_margin_perc = 9;
+       ctx->rc.disable_frame_skipping = osa_false;
+       ctx->rc.disable_vcm_hardware = osa_false;
+
+       ctx->s_fmt_flags = 0;
+}
+
+uint32 get_sizeimage(int32 w, int32 h, struct vxe_enc_fmt *fmt)
+{
+       return (w * h * fmt->size_num / fmt->size_den);
+}
+
+uint32 get_stride(int32 w, struct vxe_enc_fmt *fmt)
+{
+       return (ALIGN(w * fmt->bytes_pp, HW_ALIGN));
+}
diff --git a/driver/encoder/vxe_enc.h b/driver/encoder/vxe_enc.h
new file mode 100644 (file)
index 0000000..6cdb4c4
--- /dev/null
@@ -0,0 +1,157 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * encoder interface header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _VXE_ENC_H
+#define _VXE_ENC_H
+
+#include "osal/inc/osa_define.h"
+#include "topaz_api.h"
+
+#define HW_ALIGN 64
+#define MB_SIZE 16
+
+/*
+ * struct vxe_enc_fmt - contains info for each supported video format
+ */
+struct vxe_enc_fmt {
+       uint32 fourcc;
+       uint32 num_planes;
+       uint32 type;
+       union {
+               enum img_standard std;
+               enum img_format fmt;
+       };
+       uint32 min_bufs;
+       uint32 size_num;
+       uint32 size_den;
+       uint32 bytes_pp;
+       enum img_csc_preset csc_preset;
+};
+
+/*
+ * struct vxe_buffer - contains info for all buffers
+ */
+struct vxe_buffer
+{
+       m2m_buffer buffer;
+       uint32 index;
+       uint32 buf_map_id;
+       struct vidio_ddbufinfo buf_info;
+       union {
+               struct img_frame src_frame;
+               struct img_coded_buffer coded_buffer;
+       };
+       struct img_buffer y_buffer;
+       struct img_buffer u_buffer;
+       struct img_buffer v_buffer;
+       uint8 src_slot_num;
+};
+
+/*
+ * struct vxe_queue - contains info on buffer queues
+ */
+struct vxe_queue {
+       struct vxe_enc_fmt *fmt;
+       uint32 width;
+       uint32 height;
+       uint32 bytesperline[MAX_PLANES];
+       uint32 size_image[MAX_PLANES];
+       osa_bool streaming;
+};
+
+/*
+ * struct vxe_dev - The struct containing encoder driver internal parameters.
+ */
+struct vxe_dev {
+       void *dev;
+       struct video_device *vfd;
+       ti_device ti_vxe_dev;
+       struct platform_device *plat_dev;
+       m2m_dev *m2m_dev;
+       void *mutex;
+       int module_irq;
+       void *streams;
+       void __iomem *reg_base;
+       void *topaz_dev_ctx;
+       struct mem_ctx *mem_ctx;
+       struct mmu_ctx *mmu_ctx;
+       uint32 ptd;
+       /* dummy context for MMU mappings and allocations */
+       struct vxe_enc_ctx *ctx;
+       uint32 num_pipes;
+};
+
+#define S_FMT_FLAG_OUT_RECV 0x1
+#define S_FMT_FLAG_CAP_RECV 0x2
+#define S_FMT_FLAG_STREAM_CREATED 0x4
+
+/*
+ * struct vxe_ctx - The struct containing stream context parameters.
+ */
+struct vxe_enc_ctx {
+       file_hndl fh;
+       struct vxe_dev *dev;
+       void **enc_context;
+       void *topaz_str_context;
+       void *mutex;
+       struct img_enc_caps caps;
+       struct img_rc_params rc;
+       struct img_video_params vparams;
+       struct vxe_queue out_queue;
+       struct vxe_queue cap_queue;
+       struct mem_ctx *mem_ctx;
+       struct mmu_ctx *mmu_ctx;
+       /* list open_slots*/
+       uint8 s_fmt_flags;
+       struct h264_vui_params vui_params;
+       struct h264_crop_params crop_params;
+       struct h264_sequence_header_params sh_params;
+       osa_bool eos;
+       osa_bool flag_last;
+       uint32 coded_packages_per_frame; /* How many slices per frame */
+       uint32 available_coded_packages;
+       uint32 available_source_frames;
+       uint32 frames_encoding;
+       uint32 frame_num;
+       uint32 last_frame_num;
+};
+
+int vxe_init_mem(struct vxe_dev *vxe);
+void vxe_deinit_mem(void);
+void vxe_create_ctx(struct vxe_dev *vxe, struct vxe_enc_ctx *ctx);
+uint32 calculate_h264_level(uint32 width, uint32 height, uint32 framerate,
+                           osa_bool rc_enable, uint32 bitrate,
+                           osa_bool lossless,
+                           enum sh_profile_type profile_type,
+                           uint32 max_num_ref_frames);
+enum sh_profile_type find_h264_profile(osa_bool lossless,
+                                      osa_bool h264_use_default_scaling_list,
+                                      uint32 custom_quant_mask,
+                                      osa_bool h264_8x8_transform,
+                                      osa_bool enable_mvc,
+                                      uint32 b_frame_count,
+                                      osa_bool interlaced,
+                                      osa_bool h264_cabac,
+                                      uint32 weighted_prediction_mode,
+                                      uint32 weighted_implicit_bi_pred);
+void vxe_fill_default_src_frame_params(struct vxe_buffer *buf);
+void vxe_fill_default_params(struct vxe_enc_ctx *ctx);
+uint32 get_sizeimage(int32 w, int32 h, struct vxe_enc_fmt *fmt);
+uint32 get_stride(int32 w, struct vxe_enc_fmt *fmt);
+
+
+#endif /* _VXE_ENC_H */
diff --git a/driver/encoder/vxe_public_regdefs.h b/driver/encoder/vxe_public_regdefs.h
new file mode 100644 (file)
index 0000000..a96e95d
--- /dev/null
@@ -0,0 +1,884 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * encoder public register definitions
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __VXE_PUBLIC_REGDEFS_H__
+#define __VXE_PUBLIC_REGDEFS_H__
+
+#include "osal/inc/osa_reg_io.h"
+
+/* Write to the register */
+#define VXE_WR_REG32(base, offs, val) \
+        (osa_reg32_write((val), (offs) + (base)))
+
+/* Read the register */
+#define VXE_RD_REG32(base, offs) \
+        (osa_reg32_read((base) + (offs)))
+
+#define VXE_POLL_REG32_ISEQ(base, offs, val, mask, cnt) \
+       (osa_reg32_poll_iseq((base) + (offs), val, mask, cnt))
+
+#define REG_BASE_HOST                   0x00000000
+#define REG_OFFSET_TOPAZ_MTX            0x00000800
+#define REG_START_TOPAZ_MTX_HOST        (REG_BASE_HOST + REG_OFFSET_TOPAZ_MTX)
+
+/*
+ * DMAC configuration values:
+ */
+/*! The maximum number of channels in the SoC               */
+#define DMAC_MAX_CHANNELS       (1)
+
+/* Register CR_TOPAZHP_CORE_REV */
+#define TOPAZHP_TOP_CR_TOPAZHP_CORE_REV 0x03D0
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV 0
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV 0x03D0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MAINT_REV 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV 8
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV 0x03D0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MINOR_REV 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV 0x00FF0000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV 16
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV 0x03D0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MAJOR_REV 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER 0xFF000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER 24
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER 0x03D0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_DESIGNER 0
+
+/* Register CR_TOPAZHP_CORE_DES1 */
+#define TOPAZHP_TOP_CR_TOPAZHP_CORE_DES1 0x03E0
+
+/* Register CR_MULTICORE_HW_CFG */
+#define TOPAZHP_TOP_CR_MULTICORE_HW_CFG 0x0058
+#define MASK_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED 0x0000001F
+#define SHIFT_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED 0
+#define REGNUM_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED 0x0058
+#define SIGNED_TOPAZHP_TOP_CR_NUM_CORES_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_NUM_MTX_SUPPORTED 0x00000700
+#define SHIFT_TOPAZHP_TOP_CR_NUM_MTX_SUPPORTED 8
+#define REGNUM_TOPAZHP_TOP_CR_NUM_MTX_SUPPORTED 0x0058
+#define SIGNED_TOPAZHP_TOP_CR_NUM_MTX_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_NUM_CORES_PER_MTX 0x00070000
+#define SHIFT_TOPAZHP_TOP_CR_NUM_CORES_PER_MTX 16
+#define REGNUM_TOPAZHP_TOP_CR_NUM_CORES_PER_MTX 0x0058
+#define SIGNED_TOPAZHP_TOP_CR_NUM_CORES_PER_MTX 0
+
+#define MASK_TOPAZHP_TOP_CR_EXTENDED_ADDR_RANGE 0x0F000000
+#define SHIFT_TOPAZHP_TOP_CR_EXTENDED_ADDR_RANGE 24
+#define REGNUM_TOPAZHP_TOP_CR_EXTENDED_ADDR_RANGE 0x0058
+#define SIGNED_TOPAZHP_TOP_CR_EXTENDED_ADDR_RANGE 0
+
+/* Register CR_MULTICORE_SRST */
+#define TOPAZHP_TOP_CR_MULTICORE_SRST 0x0000
+#define MASK_TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET 0
+#define REGNUM_TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_TOP_CR_IMG_TOPAZ_MTX_SOFT_RESET 0
+
+#define MASK_TOPAZHP_TOP_CR_IMG_TOPAZ_IO_SOFT_RESET 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_IMG_TOPAZ_IO_SOFT_RESET 1
+#define REGNUM_TOPAZHP_TOP_CR_IMG_TOPAZ_IO_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_TOP_CR_IMG_TOPAZ_IO_SOFT_RESET 0
+
+#define MASK_TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET 2
+#define REGNUM_TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_TOP_CR_IMG_TOPAZ_CORE_SOFT_RESET 0
+
+/* Register CR_MULTICORE_INT_STAT */
+#define TOPAZHP_TOP_CR_MULTICORE_INT_STAT 0x0004
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_DMAC 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_DMAC 0
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_DMAC 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_DMAC 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MTX 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MTX 1
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MTX 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MTX 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MTX_HALT 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MTX_HALT 2
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MTX_HALT 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MTX_HALT 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT 0x00000078
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT 3
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MTX_CORES 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MTX_CORES 8
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MTX_CORES 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MTX_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_HOST_CORES 0x00FF0000
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_HOST_CORES 16
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_HOST_CORES 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_HOST_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT_B 0x1E000000
+#define SHIFT_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT_B 25
+#define REGNUM_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT_B 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_INT_STAT_MMU_FAULT_B 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MAS_MTX_INTS 0x40000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MAS_MTX_INTS 30
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MAS_MTX_INTS 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MAS_MTX_INTS 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MAS_HOST_INTS 0x80000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MAS_HOST_INTS 31
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MAS_HOST_INTS 0x0004
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MAS_HOST_INTS 0
+
+/* Register CR_MULTICORE_HOST_INT_ENAB */
+#define TOPAZHP_TOP_CR_MULTICORE_HOST_INT_ENAB 0x000C
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_DMAC 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_DMAC 0
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_DMAC 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_DMAC 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MTX 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MTX 1
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MTX 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MTX 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MTX_HALT 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MTX_HALT 2
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MTX_HALT 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MTX_HALT 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT 0x00000078
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT 3
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MTX_CORES 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MTX_CORES 8
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MTX_CORES 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MTX_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_HOST_CORES 0x00FF0000
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_HOST_CORES 16
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_HOST_CORES 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_HOST_CORES 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT_B 0x1E000000
+#define SHIFT_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT_B 25
+#define REGNUM_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT_B 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_INTEN_MMU_FAULT_B 0
+
+#define MASK_TOPAZHP_TOP_CR_HOST_TOPAZHP_MAS_INTEN 0x80000000
+#define SHIFT_TOPAZHP_TOP_CR_HOST_TOPAZHP_MAS_INTEN 31
+#define REGNUM_TOPAZHP_TOP_CR_HOST_TOPAZHP_MAS_INTEN 0x000C
+#define SIGNED_TOPAZHP_TOP_CR_HOST_TOPAZHP_MAS_INTEN 0
+
+/* Register CR_MULTICORE_INT_CLEAR */
+#define TOPAZHP_TOP_CR_MULTICORE_INT_CLEAR 0x0010
+#define MASK_TOPAZHP_TOP_CR_INTCLR_DMAC 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_DMAC 0
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_DMAC 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_DMAC 0
+
+#define MASK_TOPAZHP_TOP_CR_INTCLR_MTX 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_MTX 1
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_MTX 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_MTX 0
+
+#define MASK_TOPAZHP_TOP_CR_INTCLR_MTX_HALT 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_MTX_HALT 2
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_MTX_HALT 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_MTX_HALT 0
+
+#define MASK_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT 0x00000078
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT 3
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT 0
+
+#define MASK_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT_B 0x1E000000
+#define SHIFT_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT_B 25
+#define REGNUM_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT_B 0x0010
+#define SIGNED_TOPAZHP_TOP_CR_INTCLR_MMU_FAULT_B 0
+
+/* Register CR_TOPAZ_CMD_FIFO_FLUSH */
+#define TOPAZHP_TOP_CR_TOPAZ_CMD_FIFO_FLUSH 0x0078
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_FLUSH 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_FLUSH 0
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_FLUSH 0x0078
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_FLUSH 0
+
+/* Register CR_MULTICORE_CMD_FIFO_WRITE */
+#define TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE 0x0060
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_WDATA 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_WDATA 0
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_WDATA 0x0060
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_WDATA 0
+
+/* Register CR_MULTICORE_CMD_FIFO_WRITE_SPACE */
+#define TOPAZHP_TOP_CR_MULTICORE_CMD_FIFO_WRITE_SPACE 0x0064
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_SPACE 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_SPACE 0
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_SPACE 0x0064
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_SPACE 0
+
+#define MASK_TOPAZHP_TOP_CR_CMD_FIFO_FULL 0x00000100
+#define SHIFT_TOPAZHP_TOP_CR_CMD_FIFO_FULL 8
+#define REGNUM_TOPAZHP_TOP_CR_CMD_FIFO_FULL 0x0064
+#define SIGNED_TOPAZHP_TOP_CR_CMD_FIFO_FULL 0
+
+/* Register CR_MULTICORE_IDLE_PWR_MAN */
+#define TOPAZHP_TOP_CR_MULTICORE_IDLE_PWR_MAN 0x0118
+#define MASK_TOPAZHP_TOP_CR_TOPAZ_IDLE_DISABLE 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZ_IDLE_DISABLE 0
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZ_IDLE_DISABLE 0x0118
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZ_IDLE_DISABLE 0
+
+/* Register CR_FIRMWARE_REG_1 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_1 0x0100
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_1 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_1 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_1 0x0100
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_1 0
+
+/* Register CR_FIRMWARE_REG_2 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_2 0x0104
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_2 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_2 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_2 0x0104
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_2 0
+
+/* Register CR_FIRMWARE_REG_3 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_3 0x0108
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_3 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_3 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_3 0x0108
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_3 0
+
+/* Register CR_FIRMWARE_REG_4 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_4 0x0300
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_4 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_4 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_4 0x0300
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_4 0
+
+/* Register CR_FIRMWARE_REG_5 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_5 0x0304
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_5 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_5 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_5 0x0304
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_5 0
+
+/* Register CR_FIRMWARE_REG_6 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_6 0x0308
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_6 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_6 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_6 0x0308
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_6 0
+
+/* Register CR_FIRMWARE_REG_7 */
+#define TOPAZHP_TOP_CR_FIRMWARE_REG_7 0x030C
+#define MASK_TOPAZHP_TOP_CR_FIRMWARE_REG_7 0xFFFFFFFF
+#define SHIFT_TOPAZHP_TOP_CR_FIRMWARE_REG_7 0
+#define REGNUM_TOPAZHP_TOP_CR_FIRMWARE_REG_7 0x030C
+#define SIGNED_TOPAZHP_TOP_CR_FIRMWARE_REG_7 0
+
+/* Register CR_MTX_DEBUG_MSTR */
+#define TOPAZHP_TOP_CR_MTX_DEBUG_MSTR 0x0044
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_IN 0x00000003
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_IN 0
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_IN 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_IN 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE 2
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_DBG_IS_SLAVE 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_OUT 0x00000018
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_OUT 3
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_OUT 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_DBG_GPIO_OUT 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANKS 0x00000F00
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANKS 8
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANKS 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANKS 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANK_SIZE 0x000F0000
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANK_SIZE 16
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANK_SIZE 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_RAM_BANK_SIZE 0
+
+#define MASK_TOPAZHP_TOP_CR_MTX_MSTR_LAST_RAM_BANK_SIZE 0x0F000000
+#define SHIFT_TOPAZHP_TOP_CR_MTX_MSTR_LAST_RAM_BANK_SIZE 24
+#define REGNUM_TOPAZHP_TOP_CR_MTX_MSTR_LAST_RAM_BANK_SIZE 0x0044
+#define SIGNED_TOPAZHP_TOP_CR_MTX_MSTR_LAST_RAM_BANK_SIZE 0
+
+/* Register CR_MULTICORE_CORE_SEL_0 */
+#define TOPAZHP_TOP_CR_MULTICORE_CORE_SEL_0 0x0050
+#define MASK_TOPAZHP_TOP_CR_DMAC_MTX_SELECT 0x00000007
+#define SHIFT_TOPAZHP_TOP_CR_DMAC_MTX_SELECT 0
+#define REGNUM_TOPAZHP_TOP_CR_DMAC_MTX_SELECT 0x0050
+#define SIGNED_TOPAZHP_TOP_CR_DMAC_MTX_SELECT 0
+
+#define MASK_TOPAZHP_TOP_CR_WRITES_MTX_ALL 0x40000000
+#define SHIFT_TOPAZHP_TOP_CR_WRITES_MTX_ALL 30
+#define REGNUM_TOPAZHP_TOP_CR_WRITES_MTX_ALL 0x0050
+#define SIGNED_TOPAZHP_TOP_CR_WRITES_MTX_ALL 0
+
+#define MASK_TOPAZHP_TOP_CR_WRITES_CORE_ALL 0x80000000
+#define SHIFT_TOPAZHP_TOP_CR_WRITES_CORE_ALL 31
+#define REGNUM_TOPAZHP_TOP_CR_WRITES_CORE_ALL 0x0050
+#define SIGNED_TOPAZHP_TOP_CR_WRITES_CORE_ALL 0
+
+/* Register CR_TOPAZHP_AUTO_CLOCK_GATING */
+#define TOPAZHP_CR_TOPAZHP_AUTO_CLOCK_GATING 0x0024
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE0_AUTO_CLK_GATE 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE0_AUTO_CLK_GATE 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE0_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE0_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE1_AUTO_CLK_GATE 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE1_AUTO_CLK_GATE 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE1_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE1_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE0_AUTO_CLK_GATE 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE0_AUTO_CLK_GATE 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE0_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE0_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE1_AUTO_CLK_GATE 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE1_AUTO_CLK_GATE 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE1_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE1_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP4X4_AUTO_CLK_GATE 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP4X4_AUTO_CLK_GATE 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP4X4_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP4X4_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP8X8_AUTO_CLK_GATE 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP8X8_AUTO_CLK_GATE 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP8X8_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP8X8_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP16X16_AUTO_CLK_GATE 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP16X16_AUTO_CLK_GATE 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP16X16_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP16X16_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_JMCOMP_AUTO_CLK_GATE 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_JMCOMP_AUTO_CLK_GATE 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_JMCOMP_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_JMCOMP_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_VLC_AUTO_CLK_GATE 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_VLC_AUTO_CLK_GATE 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_VLC_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_VLC_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_DEB_AUTO_CLK_GATE 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_DEB_AUTO_CLK_GATE 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_DEB_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_DEB_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_DM_AUTO_CLK_GATE 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_DM_AUTO_CLK_GATE 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_DM_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_DM_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_DMS_AUTO_CLK_GATE 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_DMS_AUTO_CLK_GATE 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_DMS_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_DMS_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_CABAC_AUTO_CLK_GATE 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_CABAC_AUTO_CLK_GATE 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_CABAC_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_CABAC_AUTO_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_AUTO_CLK_GATE 0x00008000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_AUTO_CLK_GATE 15
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_AUTO_CLK_GATE 0x0024
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_AUTO_CLK_GATE 0
+
+/* Register CR_TOPAZHP_MAN_CLOCK_GATING */
+#define TOPAZHP_CR_TOPAZHP_MAN_CLOCK_GATING 0x0028
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE0_MAN_CLK_GATE 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE0_MAN_CLK_GATE 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE0_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE0_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE1_MAN_CLK_GATE 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE1_MAN_CLK_GATE 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE1_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE1_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE0_MAN_CLK_GATE 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE0_MAN_CLK_GATE 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE0_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE0_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE1_MAN_CLK_GATE 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE1_MAN_CLK_GATE 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE1_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE1_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP4X4_MAN_CLK_GATE 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP4X4_MAN_CLK_GATE 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP4X4_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP4X4_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP8X8_MAN_CLK_GATE 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP8X8_MAN_CLK_GATE 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP8X8_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP8X8_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP16X16_MAN_CLK_GATE 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP16X16_MAN_CLK_GATE 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP16X16_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP16X16_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_JMCOMP_MAN_CLK_GATE 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_JMCOMP_MAN_CLK_GATE 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_JMCOMP_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_JMCOMP_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PREFETCH_MAN_CLK_GATE 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PREFETCH_MAN_CLK_GATE 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PREFETCH_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PREFETCH_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_VLC_MAN_CLK_GATE 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_VLC_MAN_CLK_GATE 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_VLC_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_VLC_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_DEB_MAN_CLK_GATE 0x00000400
+#define SHIFT_TOPAZHP_CR_TOPAZHP_DEB_MAN_CLK_GATE 10
+#define REGNUM_TOPAZHP_CR_TOPAZHP_DEB_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_DEB_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_DM_MAN_CLK_GATE 0x00000800
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_DM_MAN_CLK_GATE 11
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_DM_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_DM_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_DMS_MAN_CLK_GATE 0x00001000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_DMS_MAN_CLK_GATE 12
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_DMS_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_DMS_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_CABAC_MAN_CLK_GATE 0x00002000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_CABAC_MAN_CLK_GATE 13
+#define REGNUM_TOPAZHP_CR_TOPAZHP_CABAC_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_CABAC_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_LRITC_MAN_CLK_GATE 0x00004000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_LRITC_MAN_CLK_GATE 14
+#define REGNUM_TOPAZHP_CR_TOPAZHP_LRITC_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_LRITC_MAN_CLK_GATE 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_MAN_CLK_GATE 0x00008000
+#define SHIFT_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_MAN_CLK_GATE 15
+#define REGNUM_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_MAN_CLK_GATE 0x0028
+#define SIGNED_TOPAZHP_CR_TOPAZHP_INPUT_SCALER_MAN_CLK_GATE 0
+
+/* Register CR_TOPAZHP_SRST */
+#define TOPAZHP_CR_TOPAZHP_SRST     0x0000
+#define MASK_TOPAZHP_CR_TOPAZHP_IPE_SOFT_RESET 0x00000001
+#define SHIFT_TOPAZHP_CR_TOPAZHP_IPE_SOFT_RESET 0
+#define REGNUM_TOPAZHP_CR_TOPAZHP_IPE_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_IPE_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SPE_SOFT_RESET 0x00000002
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SPE_SOFT_RESET 1
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SPE_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SPE_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PC_SOFT_RESET 0x00000004
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PC_SOFT_RESET 2
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PC_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PC_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_H264COMP_SOFT_RESET 0x00000008
+#define SHIFT_TOPAZHP_CR_TOPAZHP_H264COMP_SOFT_RESET 3
+#define REGNUM_TOPAZHP_CR_TOPAZHP_H264COMP_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_H264COMP_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_JMCOMP_SOFT_RESET 0x00000010
+#define SHIFT_TOPAZHP_CR_TOPAZHP_JMCOMP_SOFT_RESET 4
+#define REGNUM_TOPAZHP_CR_TOPAZHP_JMCOMP_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_JMCOMP_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_PREFETCH_SOFT_RESET 0x00000020
+#define SHIFT_TOPAZHP_CR_TOPAZHP_PREFETCH_SOFT_RESET 5
+#define REGNUM_TOPAZHP_CR_TOPAZHP_PREFETCH_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_PREFETCH_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_VLC_SOFT_RESET 0x00000040
+#define SHIFT_TOPAZHP_CR_TOPAZHP_VLC_SOFT_RESET 6
+#define REGNUM_TOPAZHP_CR_TOPAZHP_VLC_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_VLC_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_DB_SOFT_RESET 0x00000080
+#define SHIFT_TOPAZHP_CR_TOPAZHP_DB_SOFT_RESET 7
+#define REGNUM_TOPAZHP_CR_TOPAZHP_DB_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_DB_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_LTRITC_SOFT_RESET 0x00000100
+#define SHIFT_TOPAZHP_CR_TOPAZHP_LTRITC_SOFT_RESET 8
+#define REGNUM_TOPAZHP_CR_TOPAZHP_LTRITC_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_LTRITC_SOFT_RESET 0
+
+#define MASK_TOPAZHP_CR_TOPAZHP_SCALER_SOFT_RESET 0x00000200
+#define SHIFT_TOPAZHP_CR_TOPAZHP_SCALER_SOFT_RESET 9
+#define REGNUM_TOPAZHP_CR_TOPAZHP_SCALER_SOFT_RESET 0x0000
+#define SIGNED_TOPAZHP_CR_TOPAZHP_SCALER_SOFT_RESET 0
+
+/* Register CR_MMU_STATUS */
+#define TOPAZHP_TOP_CR_MMU_STATUS   0x001C
+#define MASK_TOPAZHP_TOP_CR_MMU_PF_N_RW 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_MMU_PF_N_RW 0
+#define REGNUM_TOPAZHP_TOP_CR_MMU_PF_N_RW 0x001C
+#define SIGNED_TOPAZHP_TOP_CR_MMU_PF_N_RW 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_FAULT_ADDR 0xFFFFF000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_FAULT_ADDR 12
+#define REGNUM_TOPAZHP_TOP_CR_MMU_FAULT_ADDR 0x001C
+#define SIGNED_TOPAZHP_TOP_CR_MMU_FAULT_ADDR 0
+
+/* Register CR_MMU_MEM_REQ */
+#define TOPAZHP_TOP_CR_MMU_MEM_REQ  0x0020
+#define MASK_TOPAZHP_TOP_CR_MEM_REQ_STAT_READS 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_MEM_REQ_STAT_READS 0
+#define REGNUM_TOPAZHP_TOP_CR_MEM_REQ_STAT_READS 0x0020
+#define SIGNED_TOPAZHP_TOP_CR_MEM_REQ_STAT_READS 0
+
+/* Register CR_MMU_CONTROL0 */
+#define TOPAZHP_TOP_CR_MMU_CONTROL0 0x0024
+#define MASK_TOPAZHP_TOP_CR_MMU_NOREORDER 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_MMU_NOREORDER 0
+#define REGNUM_TOPAZHP_TOP_CR_MMU_NOREORDER 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_NOREORDER 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_PAUSE 0x00000002
+#define SHIFT_TOPAZHP_TOP_CR_MMU_PAUSE 1
+#define REGNUM_TOPAZHP_TOP_CR_MMU_PAUSE 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_PAUSE 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_FLUSH 0x00000004
+#define SHIFT_TOPAZHP_TOP_CR_MMU_FLUSH 2
+#define REGNUM_TOPAZHP_TOP_CR_MMU_FLUSH 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_FLUSH 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_INVALDC 0x00000008
+#define SHIFT_TOPAZHP_TOP_CR_MMU_INVALDC 3
+#define REGNUM_TOPAZHP_TOP_CR_MMU_INVALDC 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_INVALDC 0
+
+#define MASK_TOPAZHP_TOP_CR_FLOWRATE_TOPAZ 0x00000700
+#define SHIFT_TOPAZHP_TOP_CR_FLOWRATE_TOPAZ 8
+#define REGNUM_TOPAZHP_TOP_CR_FLOWRATE_TOPAZ 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_FLOWRATE_TOPAZ 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ 0x00010000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ 16
+#define REGNUM_TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ 0x0024
+#define SIGNED_TOPAZHP_TOP_CR_MMU_BYPASS_TOPAZ 0
+
+/* Register CR_MMU_CONTROL1 */
+#define TOPAZHP_TOP_CR_MMU_CONTROL1 0x0028
+#define MASK_TOPAZHP_TOP_CR_MMU_TTE_THRESHOLD 0x00000FFF
+#define SHIFT_TOPAZHP_TOP_CR_MMU_TTE_THRESHOLD 0
+#define REGNUM_TOPAZHP_TOP_CR_MMU_TTE_THRESHOLD 0x0028
+#define SIGNED_TOPAZHP_TOP_CR_MMU_TTE_THRESHOLD 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_ADT_TTE 0x000FF000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_ADT_TTE 12
+#define REGNUM_TOPAZHP_TOP_CR_MMU_ADT_TTE 0x0028
+#define SIGNED_TOPAZHP_TOP_CR_MMU_ADT_TTE 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_BEST_COUNT 0x0FF00000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_BEST_COUNT 20
+#define REGNUM_TOPAZHP_TOP_CR_MMU_BEST_COUNT 0x0028
+#define SIGNED_TOPAZHP_TOP_CR_MMU_BEST_COUNT 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_PAGE_SIZE 0xF0000000
+#define SHIFT_TOPAZHP_TOP_CR_MMU_PAGE_SIZE 28
+#define REGNUM_TOPAZHP_TOP_CR_MMU_PAGE_SIZE 0x0028
+#define SIGNED_TOPAZHP_TOP_CR_MMU_PAGE_SIZE 0
+
+/* Register CR_MMU_CONTROL2 */
+#define TOPAZHP_TOP_CR_MMU_CONTROL2 0x002C
+#define MASK_TOPAZHP_TOP_CR_MMU_ENABLE_36BIT_ADDRESSING 0x00000001
+#define SHIFT_TOPAZHP_TOP_CR_MMU_ENABLE_36BIT_ADDRESSING 0
+#define REGNUM_TOPAZHP_TOP_CR_MMU_ENABLE_36BIT_ADDRESSING 0x002C
+#define SIGNED_TOPAZHP_TOP_CR_MMU_ENABLE_36BIT_ADDRESSING 0
+
+#define MASK_TOPAZHP_TOP_CR_MMU_TILING_SCHEME 0x00000008
+#define SHIFT_TOPAZHP_TOP_CR_MMU_TILING_SCHEME 3
+#define REGNUM_TOPAZHP_TOP_CR_MMU_TILING_SCHEME 0x002C
+#define SIGNED_TOPAZHP_TOP_CR_MMU_TILING_SCHEME 0
+
+/* Table MMU_DIR_LIST_BASE */
+
+/* Register CR_MMU_DIR_LIST_BASE */
+#define TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE(X) (0x0030 + (4 * (X)))
+#define MASK_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR 0xFFFFFFF0
+#define SHIFT_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR 4
+#define REGNUM_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR 0x0030
+#define SIGNED_TOPAZHP_TOP_CR_MMU_DIR_LIST_BASE_ADDR 0
+
+/* Number of entries in table MMU_DIR_LIST_BASE */
+
+#define TOPAZHP_TOP_MMU_DIR_LIST_BASE_SIZE_UINT32 1
+#define TOPAZHP_TOP_MMU_DIR_LIST_BASE_NUM_ENTRIES 1
+
+
+/* Table MMU_TILE */
+
+/* Register CR_MMU_TILE */
+#define TOPAZHP_TOP_CR_MMU_TILE(X)  (0x0038 + (4 * (X)))
+#define MASK_TOPAZHP_TOP_CR_TILE_MIN_ADDR 0x00000FFF
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MIN_ADDR 0
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MIN_ADDR 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MIN_ADDR 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_MAX_ADDR 0x00FFF000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MAX_ADDR 12
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MAX_ADDR 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MAX_ADDR 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_STRIDE 0x07000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_STRIDE 24
+#define REGNUM_TOPAZHP_TOP_CR_TILE_STRIDE 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_STRIDE 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_ENABLE 0x10000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_ENABLE 28
+#define REGNUM_TOPAZHP_TOP_CR_TILE_ENABLE 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_ENABLE 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE 0x20000000
+#define SHIFT_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE 29
+#define REGNUM_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE 0x0038
+#define SIGNED_TOPAZHP_TOP_CR_TILE_128BYTE_INTERLEAVE 0
+
+/* Number of entries in table MMU_TILE */
+
+#define TOPAZHP_TOP_MMU_TILE_SIZE_UINT32 2
+#define TOPAZHP_TOP_MMU_TILE_NUM_ENTRIES 2
+
+/* Table MMU_TILE_EXT */
+
+/* Register CR_MMU_TILE_EXT */
+#define TOPAZHP_TOP_CR_MMU_TILE_EXT(X) (0x0080 + (4 * (X)))
+#define MASK_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT 0x000000FF
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT 0
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT 0x0080
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MIN_ADDR_EXT 0
+
+#define MASK_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT 0x0000FF00
+#define SHIFT_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT 8
+#define REGNUM_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT 0x0080
+#define SIGNED_TOPAZHP_TOP_CR_TILE_MAX_ADDR_EXT 0
+
+/* Number of entries in table MMU_TILE_EXT */
+
+#define TOPAZHP_TOP_MMU_TILE_EXT_SIZE_UINT32 2
+#define TOPAZHP_TOP_MMU_TILE_EXT_NUM_ENTRIES 2
+
+#define TOPAZHP_CR_PROC_ESB_ACCESS_WORD0 0x00F0
+
+/* Register CR_PROC_ESB_ACCESS_CONTROL */
+#define TOPAZHP_CR_PROC_ESB_ACCESS_CONTROL 0x00EC
+#define MASK_TOPAZHP_CR_PROC_ESB_ADDR 0x00003FF0
+#define SHIFT_TOPAZHP_CR_PROC_ESB_ADDR 4
+#define REGNUM_TOPAZHP_CR_PROC_ESB_ADDR 0x00EC
+#define SIGNED_TOPAZHP_CR_PROC_ESB_ADDR 0
+
+#define MASK_TOPAZHP_CR_PROC_ESB_READ_N_WRITE 0x00010000
+#define SHIFT_TOPAZHP_CR_PROC_ESB_READ_N_WRITE 16
+#define REGNUM_TOPAZHP_CR_PROC_ESB_READ_N_WRITE 0x00EC
+#define SIGNED_TOPAZHP_CR_PROC_ESB_READ_N_WRITE 0
+
+#define MASK_TOPAZHP_CR_PROC_ESB_OP_VALID 0x00020000
+#define SHIFT_TOPAZHP_CR_PROC_ESB_OP_VALID 17
+#define REGNUM_TOPAZHP_CR_PROC_ESB_OP_VALID 0x00EC
+#define SIGNED_TOPAZHP_CR_PROC_ESB_OP_VALID 0
+
+#define MASK_TOPAZHP_CR_PROC_ACCESS_FLAG 0x03000000
+#define SHIFT_TOPAZHP_CR_PROC_ACCESS_FLAG 24
+#define REGNUM_TOPAZHP_CR_PROC_ACCESS_FLAG 0x00EC
+#define SIGNED_TOPAZHP_CR_PROC_ACCESS_FLAG 0
+
+
+/* Register CR_SECURE_CONFIG */
+#define TOPAZHP_TOP_CR_SECURE_CONFIG 0x0200
+
+/* Register CR_VLC_MPEG4_CFG */
+#define TOPAZ_VLC_CR_VLC_MPEG4_CFG  0x0064
+#define MASK_TOPAZ_VLC_CR_RSIZE     0x00000007
+#define SHIFT_TOPAZ_VLC_CR_RSIZE    0
+#define REGNUM_TOPAZ_VLC_CR_RSIZE   0x0064
+#define SIGNED_TOPAZ_VLC_CR_RSIZE   0
+
+/* RC Config registers and tables */
+#define TOPAZHP_TOP_CR_RC_CONFIG_TABLE7 0x012C
+#define TOPAZHP_TOP_CR_RC_CONFIG_TABLE6 0x0124
+#define TOPAZHP_TOP_CR_RC_CONFIG_TABLE4 0x0128
+#define TOPAZHP_TOP_CR_RC_CONFIG_TABLE5 0x0130
+#define TOPAZHP_CR_RC_CONFIG_REG8       0x0344
+#define TOPAZHP_CR_RC_CONFIG_REG9       0x0184
+#define TOPAZHP_CR_JMCOMP_RC_STATS      0x0340
+
+/* Register CR_TOPAZHP_CORE_DES1 */
+#define TOPAZHP_TOP_CR_TOPAZHP_CORE_DES1 0x03E0
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED 0x00000080
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED 7
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_SCALER_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_GENERATE_PERFORMANCE_STORE 0x00000100
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_GENERATE_PERFORMANCE_STORE 8
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_GENERATE_PERFORMANCE_STORE 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_GENERATE_PERFORMANCE_STORE 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED 0x00000200
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED 9
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_LOSSLESS_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED 0x00000400
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED 10
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_CUSTOM_QUANT_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MPEG2_SUPPORTED 0x00000800
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MPEG2_SUPPORTED 11
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MPEG2_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MPEG2_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_SUBSET 0x00001000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_SUBSET 12
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_SUBSET 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_SUBSET 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_ALL 0x00002000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_ALL 13
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_ALL 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_SIGNATURES_SUPPORTED_ALL 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_ME_SUPPORTED 0x00004000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_ME_SUPPORTED 14
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_ME_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_ME_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED 0x00008000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED 15
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_WEIGHTED_PRED_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED 0x00010000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED 16
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_2_REF_ON_P_PIC_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED 0x00020000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED 17
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_SPATIAL_DIRECT_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED 0x00040000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED 18
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_MULTIPASS_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED 0x00080000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED 19
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_DEFAULT_TABLES_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED 0x00100000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED 20
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_8X8_TRANSFORM_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED 0x00200000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED 21
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_INTERLACED_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED 0x00400000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED 22
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_B_PIC_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_16X8_8X16_SUPPORTED 0x00800000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_16X8_8X16_SUPPORTED 23
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_16X8_8X16_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_16X8_8X16_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED 0x01000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED 24
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_CABAC_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_SLAVE_JPEG_SUPPORTED 0x02000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_SLAVE_JPEG_SUPPORTED 25
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_SLAVE_JPEG_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_SLAVE_JPEG_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_JPEG_SUPPORTED 0x04000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_JPEG_SUPPORTED 26
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_JPEG_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_JPEG_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H263_SUPPORTED 0x08000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H263_SUPPORTED 27
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H263_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H263_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MPEG4_SUPPORTED 0x10000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MPEG4_SUPPORTED 28
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MPEG4_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MPEG4_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_H264_SUPPORTED 0x20000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_H264_SUPPORTED 29
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_H264_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_H264_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_DMAC_SUPPORTED 0x40000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_DMAC_SUPPORTED 30
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_DMAC_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_DMAC_SUPPORTED 0
+
+#define MASK_TOPAZHP_TOP_CR_TOPAZHP_MMU_SUPPORTED 0x80000000
+#define SHIFT_TOPAZHP_TOP_CR_TOPAZHP_MMU_SUPPORTED 31
+#define REGNUM_TOPAZHP_TOP_CR_TOPAZHP_MMU_SUPPORTED 0x03E0
+#define SIGNED_TOPAZHP_TOP_CR_TOPAZHP_MMU_SUPPORTED 0
+#endif
diff --git a/linux/encoder/Makefile b/linux/encoder/Makefile
new file mode 100644 (file)
index 0000000..b430c78
--- /dev/null
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: GPL-2.0
+
+#Set PATH
+KPATH ?=path_for_ti-linux-kernel
+KCONF ?=${KPATH}
+
+PWD :=$(shell pwd)
+
+include $(KCONF)/.config
+
+DRIVER_PATH =../../driver
+OSAL_PATH =../../osal
+
+# (1)
+# This config, if enabled, enables all the debug traces in
+# encoder driver. Enable it only for debug purpose
+# Keep it always disabled for release codebase
+DEBUG_ENCODER_DRIVER ?=n
+
+#UM INTERFACE & SYSDEV
+vxe-enc-objs += vxe_v4l2.o
+vxe-enc-objs += $(DRIVER_PATH)/encoder/vxe_enc.o
+
+#TOPAZ Device
+vxe-enc-objs += $(DRIVER_PATH)/encoder/topaz_device.o
+
+#MEM_MGR
+vxe-enc-objs += $(DRIVER_PATH)/common/img_mem_man.o $(DRIVER_PATH)/common/img_mem_unified.o
+vxe-enc-objs += $(DRIVER_PATH)/common/talmmu_api.o
+vxe-enc-objs += $(DRIVER_PATH)/common/addr_alloc.o
+vxe-enc-objs += $(DRIVER_PATH)/common/lst.o
+vxe-enc-objs += $(DRIVER_PATH)/common/hash.o
+vxe-enc-objs += $(DRIVER_PATH)/common/ra.o
+vxe-enc-objs += $(DRIVER_PATH)/common/pool.o
+vxe-enc-objs += $(DRIVER_PATH)/common/rman_api.o
+vxe-enc-objs += $(DRIVER_PATH)/common/dq.o
+vxe-enc-objs += $(DRIVER_PATH)/common/idgen_api.o
+vxe-enc-objs += $(DRIVER_PATH)/encoder/topazmmu.o
+vxe-enc-objs += $(DRIVER_PATH)/common/imgmmu.o
+#vxe-enc-objs += memmgr.o
+
+#Topaz framework and firmware prep
+vxe-enc-objs += $(DRIVER_PATH)/encoder/topaz_api.o
+vxe-enc-objs += $(DRIVER_PATH)/encoder/topaz_api_utils.o
+vxe-enc-objs += $(DRIVER_PATH)/encoder/header_gen.o
+
+#FWIF
+vxe-enc-objs += $(DRIVER_PATH)/encoder/mtx_fwif.o
+
+#OSAL
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_mutex.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_interrupt.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_mem.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_workqueue.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_spin.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_delay.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_time.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_idr.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_firmware.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_platform.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_page.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_atomic.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_reg_io.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_string.o
+vxe-enc-objs += $(OSAL_PATH)/src/linux/osa_event.o
+
+obj-m += vxe-enc.o
+
+ccflags-y   += -DOSAL_LINUX
+
+ifeq ($(DEBUG_ENCODER_DRIVER), y)
+ccflags-y   += -DDEBUG_ENCODER_DRIVER
+ccflags-y   += -DDEBUG
+endif
+
+ccflags-y += -I$(M) -I$(M)/$(DRIVER_PATH)/common/ -I$(M)/$(DRIVER_PATH)/encoder/ -I$(M)/$(OSAL_PATH)/../
+
+all:
+       $(MAKE) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C $(KPATH) M=$(PWD) modules
+
+clean:
+       $(MAKE) -C $(KPATH) M=$(PWD) clean
diff --git a/linux/encoder/vxe_v4l2.c b/linux/encoder/vxe_v4l2.c
new file mode 100644 (file)
index 0000000..c4ac3b2
--- /dev/null
@@ -0,0 +1,1798 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * IMG Encoder v4l2 Driver Interface function implementations
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2019 Texas Instruments Incorporated - http://www.ti.com/
+ */
+
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/pm_runtime.h>
+
+#include <media/v4l2-ioctl.h>
+#include <media/videobuf2-dma-sg.h>
+#include <media/v4l2-event.h>
+
+#include "fw_headers/vxe_common.h"
+#include "osal/inc/osa_mutex.h"
+#include "osal/inc/osa_err.h"
+#include "osal/inc/osa_define.h"
+#include "osal/inc/osa_idr.h"
+#include "osal/inc/osa_mem.h"
+#include "osal/inc/osa_interrupt.h"
+#include "target_config.h"
+#include "topaz_device.h"
+#include "vxe_enc.h"
+#include "vxe_v4l2.h"
+
+#define IMG_VXE_ENC_MODULE_NAME "vxe-enc"
+
+extern struct mem_space topaz_mem_space[];
+
+static struct vxe_enc_fmt vxe_enc_formats[] = {
+       {
+               .fourcc = V4L2_PIX_FMT_NV12,
+               .num_planes = 1,
+               .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
+               .fmt = IMG_CODEC_420_PL12,
+               .min_bufs = 2,
+               .size_num = 3,
+               .size_den = 2,
+               .bytes_pp = 1,
+               .csc_preset = IMG_CSC_NONE,
+       },
+       {
+               .fourcc = V4L2_PIX_FMT_RGB32,
+               .num_planes = 1,
+               .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
+               .fmt = IMG_CODEC_ABCX,
+               .min_bufs = 2,
+               .size_num = 1,
+               .size_den = 1,
+               .bytes_pp = 4,
+               .csc_preset = IMG_CSC_RGB_TO_601_ANALOG,
+       },
+       {
+               .fourcc = V4L2_PIX_FMT_H264,
+               .num_planes = 1,
+               .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+               .std = IMG_STANDARD_H264,
+               .min_bufs = 1,
+               .size_num = 1,
+               .size_den = 1,
+               .bytes_pp = 1,
+               .csc_preset = IMG_CSC_NONE,
+       },
+};
+
+/* Note: Arrange in order of ascending CID # to simplify QUERYCTRL */
+static struct vxe_ctrl controls[] = {
+       {
+               /* idr_period */
+               .cid = V4L2_CID_MPEG_VIDEO_GOP_SIZE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "GOP size",
+               .minimum = 1,
+               .maximum = 7200,
+               .step = 1,
+               .default_value = 1800,
+               .compound = osa_false,
+       },
+       {
+               /* bits_per_second */
+               .cid = V4L2_CID_MPEG_VIDEO_BITRATE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "Video Bitrate",
+               .minimum = 50000,
+               .maximum = 100000000,
+               .step = 1,
+               .default_value = 500000,
+               .compound = osa_false,
+       },
+       {
+               /* intra_freq */
+               .cid = V4L2_CID_MPEG_VIDEO_H264_I_PERIOD,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "H264 I period",
+               .minimum = 1,
+               .maximum = 600,
+               .step = 1,
+               .default_value = 3600,
+               .compound = osa_false,
+       },
+};
+
+static struct v4l2_fract frmivals[] = {
+       {
+               .numerator = 1,
+               .denominator = 15,
+       },
+       {
+               .numerator = 1,
+               .denominator = 30,
+       },
+       {
+               .numerator = 1,
+               .denominator = 45,
+       },
+       {
+               .numerator = 1,
+               .denominator = 60,
+       },
+};
+
+static struct vxe_enc_ctx *file2ctx(struct file *file)
+{
+       return osa_container_of(file->private_data, struct vxe_enc_ctx, fh);
+}
+
+static void vxe_eos(struct vxe_enc_ctx *ctx)
+{
+       struct v4l2_event event = {};
+       struct vb2_v4l2_buffer *vb;
+
+       event.type = V4L2_EVENT_EOS;
+       v4l2_event_queue_fh(&ctx->fh, &event);
+       /*
+        * If a capture buffer is available, dequeue with FLAG_LAST
+        * else, mark for next qbuf to handle
+        */
+       if (v4l2_m2m_num_dst_bufs_ready(ctx->fh.m2m_ctx) > 0) {
+               vb = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
+               vb->flags |= V4L2_BUF_FLAG_LAST;
+               vb2_set_plane_payload(&vb->vb2_buf, 0, 0);
+               v4l2_m2m_buf_done(vb, VB2_BUF_STATE_DONE);
+       } else {
+               ctx->flag_last = osa_true;
+       }
+
+       topaz_flush_stream(ctx->topaz_str_context, ctx->last_frame_num);
+}
+
+static void vxe_return_resource(void *ctx_handle, enum vxe_cb_type type,
+                               void *img_buf_ref, uint32 size,
+                               uint32 coded_frm_cnt)
+{
+       struct vxe_enc_ctx *ctx = ctx_handle;
+       struct device *dev = ctx->dev->dev;
+       struct vxe_buffer *buf;
+
+       //osa_mutex_lock(ctx->mutex); TBD
+       switch(type)
+       {
+       case VXE_CB_CODED_BUFF_READY:
+               if (!img_buf_ref)
+                       OSA_DEV_ERR(dev, "VXE_CB_STRUNIT_PROCESSED had no buffer\n");
+
+               buf = osa_container_of((struct img_coded_buffer *)img_buf_ref,
+                                      struct vxe_buffer, coded_buffer);
+               vb2_set_plane_payload(&buf->buffer.vb.vb2_buf, 0, size);
+               v4l2_m2m_buf_done(&buf->buffer.vb, VB2_BUF_STATE_DONE);
+
+               if (coded_frm_cnt == ctx->last_frame_num) {
+                       vxe_eos(ctx);
+               }
+
+               v4l2_m2m_job_finish(ctx->dev->m2m_dev, ctx->fh.m2m_ctx);
+               break;
+       case VXE_CB_SRC_FRAME_RELEASE:
+               if (!img_buf_ref)
+                       OSA_DEV_ERR(dev, "VXE_CB_PICT_RELEASE had no buffer\n");
+
+               buf = osa_container_of((struct img_frame *)img_buf_ref,
+                                      struct vxe_buffer, src_frame);
+               vb2_set_plane_payload(&buf->buffer.vb.vb2_buf, 0, size);
+               v4l2_m2m_buf_done(&buf->buffer.vb, VB2_BUF_STATE_DONE);
+               ctx->frames_encoding--;
+               break;
+       case VXE_CB_ERROR_FATAL:
+               break;
+       default:
+               break;
+       }
+       //osa_mutex_unlock(ctx->mutex); TBD
+}
+
+static void device_run(void *priv) {
+       struct vxe_enc_ctx *ctx = priv;
+       struct device *dev = ctx->dev->dev;
+       struct vb2_v4l2_buffer *dst_vbuf, *src_vbuf;
+       struct vxe_buffer *buf;
+       int ret = 0;;
+
+       osa_mutex_lock(ctx->mutex);
+       while (((0 < topaz_query_empty_coded_slots(ctx->topaz_str_context)) &&
+               (0 < v4l2_m2m_num_dst_bufs_ready(ctx->fh.m2m_ctx))) &&
+              ((0 < topaz_query_empty_source_slots(ctx->topaz_str_context)) &&
+               (0 < v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx)))) {
+               /*
+                * Submit src and dst buffers one to one
+                * Note: Will have to revisit for B frame support
+                */
+               dst_vbuf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
+               if (!dst_vbuf)
+                       OSA_DEV_ERR(dev, "Next src buffer is null\n");
+
+               src_vbuf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
+               if (!src_vbuf)
+                       OSA_DEV_ERR(dev, "Next src buffer is null\n");
+
+               /* Handle EOS */
+               if (ctx->eos && (0 == v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx))) {
+                       OSA_PR_DEBUG("%s eos found\n", __func__);
+                       ret = topaz_end_of_stream(ctx->topaz_str_context,
+                                                 ctx->frame_num + 1);
+                       if (ret)
+                               OSA_DEV_ERR(dev, "Failed to send EOS to topaz %d\n",
+                                           ret);
+                       ctx->last_frame_num = ctx->frame_num + 1;
+               }
+
+               /* Submit coded package */
+               buf = osa_container_of(dst_vbuf, struct vxe_buffer, buffer.vb);
+               ret = topaz_reserve_coded_package_slot(ctx->topaz_str_context);
+               if (ret)
+                       OSA_DEV_ERR(dev, "Failed to reserve coded package slot %d\n",
+                                   ret);
+               ret = topaz_send_coded_package(ctx->topaz_str_context,
+                                              &buf->coded_buffer);
+               if (ret)
+                       OSA_DEV_ERR(dev, "Failed to send coded package %d\n",
+                                   ret);
+               if (!ret)
+                       ctx->available_coded_packages++;
+
+               /* Submit source frame */
+               buf = osa_container_of(src_vbuf, struct vxe_buffer, buffer.vb);
+               ret = topaz_reserve_source_slot(ctx->topaz_str_context,
+                                               &buf->src_slot_num);
+               if (ret)
+                       OSA_DEV_ERR(dev, "Failed to reserve source slot %d\n",
+                                   ret);
+               ret = topaz_send_source_frame(ctx->topaz_str_context, &buf->src_frame,
+                                             ctx->frame_num, (uint64) ctx);
+               if (ret)
+                       OSA_DEV_ERR(dev, "Failed to send source frame %d\n",
+                                   ret);
+               ctx->frame_num++;
+               if (!ret)
+                       ctx->available_source_frames++;
+       }
+
+       while ((0 < ctx->available_source_frames) &&
+              (0 < ctx->available_coded_packages)) {
+               OSA_PR_DEBUG("Calling topaz_encode_frame #src=%d #coded=%d frames_encoding=%d\n",
+                       ctx->available_source_frames,
+                       ctx->available_coded_packages,
+                       ctx->frames_encoding);
+               ret = topaz_encode_frame(ctx->topaz_str_context);
+               if (ret) {
+                       OSA_DEV_ERR(dev, "Failed to send encode_frame command %d\n",
+                                   ret);
+               } else {
+                       /* TODO: Account for scenarios where these are not 1 */
+                       ctx->available_source_frames--;
+                       ctx->available_coded_packages--;
+                       ctx->frames_encoding++;
+               }
+       }
+
+       osa_mutex_unlock(ctx->mutex);
+       return;
+}
+
+static int32 job_ready(void *priv) {
+       struct vxe_enc_ctx *ctx = priv;
+
+       /*
+        * In normal play, check if we can
+        * submit any source or coded buffers
+        */
+       if (((0 < topaz_query_empty_source_slots(ctx->topaz_str_context)) &&
+            (0 < v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx))) &&
+           ((0 < topaz_query_empty_coded_slots(ctx->topaz_str_context)) &&
+            (0 < v4l2_m2m_num_dst_bufs_ready(ctx->fh.m2m_ctx))))
+               return 1;
+
+       /*
+        * In EOS state, we only need to know
+        * that coded buffers are available
+        */
+       if (ctx->eos && (0 < v4l2_m2m_num_dst_bufs_ready(ctx->fh.m2m_ctx)) &&
+           (0 < topaz_query_empty_coded_slots(ctx->topaz_str_context)))
+               return 1;
+
+       /*
+        * Since we're allowing device_run for both submissions and actual
+        * encodes, say job ready if buffers are ready in fw
+        */
+       if ((0 < ctx->available_source_frames) &&
+           (0 < ctx->available_coded_packages)) {
+               return 1;
+       }
+
+       return 0;
+}
+
+static void job_abort(void *priv) {
+       /* TODO: stub */
+       return;
+}
+
+static const struct v4l2_m2m_ops m2m_ops = {
+       .device_run = device_run,
+       .job_ready = job_ready,
+       .job_abort = job_abort,
+};
+
+static struct vxe_queue *get_queue(struct vxe_enc_ctx *ctx,
+                                  enum v4l2_buf_type type)
+{
+       switch (type) {
+               case V4L2_BUF_TYPE_VIDEO_OUTPUT:
+               case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
+                       return &ctx->out_queue;
+               case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+               case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
+                       return &ctx->cap_queue;
+               default:
+                       return NULL;
+       }
+       return NULL;
+}
+
+static int32 vxe_queue_setup(struct vb2_queue *vq, uint32 *nbuffers,
+                            uint32 *nplanes, uint32 sizes[],
+                            struct device *alloc_devs[])
+{
+       int32 i;
+       struct vxe_enc_ctx *ctx = vb2_get_drv_priv(vq);
+       struct vxe_queue *queue;
+
+       queue = get_queue(ctx, vq->type);
+       if (!queue)
+               return -OSA_EINVAL;
+
+       if (*nplanes) {
+               /* This is being called from CREATEBUFS, perform validation */
+               if (*nplanes != queue->fmt->num_planes)
+                       return -OSA_EINVAL;
+
+               for (i = 0; i < *nplanes; i++) {
+                       if (sizes[i] != queue->size_image[i])
+                               return -OSA_EINVAL;
+               }
+
+               return 0;
+       }
+
+       *nplanes = queue->fmt->num_planes;
+
+       if (V4L2_TYPE_IS_OUTPUT(queue->fmt->type)) {
+               *nbuffers = max(*nbuffers, queue->fmt->min_bufs);
+       } else {
+               *nbuffers = topaz_get_coded_package_max_num(ctx->topaz_str_context,
+                                                           queue->fmt->std,
+                                                           queue->width,
+                                                           queue->height,
+                                                           &ctx->rc);
+               for (i = 0; i < *nplanes; i++) {
+                       queue->size_image[i] =
+                               topaz_get_coded_buffer_max_size(ctx->topaz_str_context,
+                                                               queue->fmt->std,
+                                                               queue->width,
+                                                               queue->height,
+                                                               &ctx->rc);
+               }
+       }
+
+       for(i = 0; i < *nplanes; i++)
+               sizes[i] = queue->size_image[i];
+
+       return 0;
+}
+
+static int32 vxe_buf_init(struct vb2_buffer *vb)
+{
+       struct vxe_enc_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
+       struct device *dev = ctx->dev->dev;
+       struct vxe_queue *queue;
+       void *sgt;
+       int32 i, num_planes, ret;
+       struct vxe_buffer *buf = osa_container_of(vb, struct vxe_buffer,
+                                                 buffer.vb.vb2_buf);
+
+       queue = get_queue(ctx, vb->vb2_queue->type);
+       if (!queue) {
+               OSA_DEV_ERR(dev, "Invalid queue type %d\n",
+                           vb->vb2_queue->type);
+               return -OSA_EINVAL;
+       }
+
+       num_planes = queue->fmt->num_planes;
+
+       for(i = 0; i < num_planes; i++) {
+               if (vb2_plane_size(vb, i) < queue->size_image[i]) {
+                       OSA_DEV_ERR(dev, "data will not fit into plane(%lu < %lu)\n",
+                                   vb2_plane_size(vb, i),
+                                   (slong)queue->size_image[i]);
+                       return -OSA_EINVAL;
+               }
+       }
+
+       buf->buf_info.cpu_virt = vb2_plane_vaddr(vb, 0);
+       buf->buf_info.buf_size = vb2_plane_size(vb, 0);
+
+       sgt = vb2_dma_sg_plane_desc(vb, 0);
+       if (!sgt) {
+               OSA_DEV_ERR(dev, "Could not get sg_table from plane 0\n");
+               return -OSA_EINVAL;
+       }
+
+       if (V4L2_TYPE_IS_OUTPUT(vb->type)) {
+               ret = topaz_stream_map_buf_sg(ctx->topaz_str_context,
+                                             VENC_BUFTYPE_PICTURE,
+                                             &buf->buf_info, sgt);
+               if (ret) {
+                       OSA_DEV_ERR(dev, "OUTPUT core_stream_map_buf_sg failed\n");
+                       return ret;
+               }
+               OSA_PR_DEBUG("Picture buffer mapped successfully, buf_id[%d], dev_virt[%x]\n", buf->buf_info.buff_id, buf->buf_info.dev_virt);
+
+               vxe_fill_default_src_frame_params(buf);
+
+               buf->y_buffer.mem_info = buf->buf_info;
+               buf->y_buffer.lock = BUFFER_FREE;
+               buf->y_buffer.size = 0; /* IMG has 0 */
+               buf->y_buffer.bytes_written = 0;
+
+               /* TODO Fill U/V img buffers if necessary */
+               buf->src_frame.y_plane_buffer = &buf->y_buffer;
+               buf->src_frame.u_plane_buffer = NULL;
+               buf->src_frame.v_plane_buffer = NULL;
+               buf->src_frame.y_component_offset = 0;
+               buf->src_frame.u_component_offset = queue->bytesperline[0] * queue->height;
+               buf->src_frame.v_component_offset = queue->bytesperline[0] * queue->height;
+
+               buf->src_frame.width_bytes = queue->bytesperline[0];
+               buf->src_frame.height = queue->height;
+               buf->src_frame.src_y_stride_bytes = queue->bytesperline[0];
+               buf->src_frame.src_uv_stride_bytes = queue->bytesperline[0];
+       } else {
+               ret = topaz_stream_map_buf_sg(ctx->topaz_str_context,
+                                             VENC_BUFTYPE_BITSTREAM,
+                                             &buf->buf_info, sgt);
+               if (ret) {
+                       OSA_DEV_ERR(dev, "CAPTURE core_stream_map_buf_sg failed\n");
+                       return ret;
+               }
+               OSA_PR_DEBUG("Bit-stream buffer mapped successfully, buf_id[%d], dev_virt[%x]\n", buf->buf_info.buff_id, buf->buf_info.dev_virt);
+
+               buf->coded_buffer.mem_info = buf->buf_info;
+               buf->coded_buffer.lock = BUFFER_FREE;
+               buf->coded_buffer.size = vb2_plane_size(vb, 0);
+               buf->coded_buffer.bytes_written = 0;
+       }
+
+       return 0;
+}
+
+static int32 vxe_buf_prepare(struct vb2_buffer *vb)
+{
+#ifdef DEBUG_ENCODER_DRIVER
+       struct vxe_enc_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
+       int i;
+       struct vxe_buffer *buf = osa_container_of(vb, struct vxe_buffer,
+                                                 buffer.vb.vb2_buf);
+
+       OSA_PR_INFO("%s printing contents of buffer %d at %#08x\n",
+               __func__, vb->index, buf->buf_info.cpu_virt);
+       for (i = 0; i < 1536; i = i + 8) {
+               OSA_PR_INFO("[%d] 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x,\n",
+                      ((i + 1) / 8),
+                      ((char*)buf->buf_info.cpu_virt)[i+0],
+                      ((char*)buf->buf_info.cpu_virt)[i+1],
+                      ((char*)buf->buf_info.cpu_virt)[i+2],
+                      ((char*)buf->buf_info.cpu_virt)[i+3],
+                      ((char*)buf->buf_info.cpu_virt)[i+4],
+                      ((char*)buf->buf_info.cpu_virt)[i+5],
+                      ((char*)buf->buf_info.cpu_virt)[i+6],
+                      ((char*)buf->buf_info.cpu_virt)[i+7]);
+       }
+#endif
+       return 0;
+}
+
+static void vxe_buf_queue(struct vb2_buffer *vb)
+{
+       struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
+       struct vxe_enc_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
+
+       osa_mutex_lock(ctx->mutex);
+       if (ctx->flag_last && (!V4L2_TYPE_IS_OUTPUT(vb->type))) {
+               /*
+                * If EOS came and we did not have a buffer ready
+                * to service it, service now that we have a buffer
+                */
+               vbuf->flags |= V4L2_BUF_FLAG_LAST;
+               vb2_set_plane_payload(&vbuf->vb2_buf, 0, 0);
+               v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_DONE);
+       } else {
+               v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf);
+       }
+       osa_mutex_unlock(ctx->mutex);
+}
+
+static void vxe_buf_cleanup(struct vb2_buffer *vb)
+{
+       struct vxe_enc_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
+       struct vxe_buffer *buf = osa_container_of(vb, struct vxe_buffer,
+                                                 buffer.vb.vb2_buf);
+
+       OSA_PR_DEBUG("%s Unmapping buffer %d\n", __func__, buf->index);
+       topaz_stream_unmap_buf_sg(ctx->topaz_str_context, &buf->buf_info);
+}
+
+static int32 vxe_start_streaming(struct vb2_queue *vq, uint32 count)
+{
+       struct vxe_enc_ctx *ctx = vb2_get_drv_priv(vq);
+       struct vxe_queue *queue;
+
+       queue = get_queue(ctx, vq->type);
+       queue->streaming = osa_true;
+
+       return 0;
+}
+
+static void vxe_stop_streaming(struct vb2_queue *vq)
+{
+       struct vxe_enc_ctx *ctx = vb2_get_drv_priv(vq);
+       struct device *dev = ctx->dev->dev;
+       struct vb2_v4l2_buffer *vb;
+
+       /* Unmap all buffers in v4l2 from mmu */
+       while (v4l2_m2m_num_dst_bufs_ready(ctx->fh.m2m_ctx)) {
+               vb = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
+               if (!vb)
+                       OSA_DEV_ERR(dev, "Next dst buffer is null\n");
+               v4l2_m2m_buf_done(vb, VB2_BUF_STATE_ERROR);
+       }
+       while (v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx)) {
+               vb = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
+               if (!vb)
+                       OSA_DEV_ERR(dev, "Next dst buffer is null\n");
+               v4l2_m2m_buf_done(vb, VB2_BUF_STATE_ERROR);
+       }
+}
+
+static struct vb2_ops vxe_video_ops = {
+       .queue_setup = vxe_queue_setup,
+       .buf_init = vxe_buf_init,
+       .buf_prepare = vxe_buf_prepare,
+       .buf_queue = vxe_buf_queue,
+       .buf_cleanup = vxe_buf_cleanup,
+       .wait_prepare = vb2_ops_wait_prepare,
+       .wait_finish = vb2_ops_wait_finish,
+       .start_streaming = vxe_start_streaming,
+       .stop_streaming = vxe_stop_streaming,
+};
+
+static int32 queue_init(void *priv, struct vb2_queue *src_vq,
+                       struct vb2_queue *dst_vq)
+{
+       struct vxe_enc_ctx *ctx = priv;
+       struct vxe_dev *vxe = ctx->dev;
+       int32 ret = 0;
+
+       /* src_vq */
+       memset(src_vq, 0, sizeof(*src_vq));
+       src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
+       src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
+       src_vq->drv_priv = ctx;
+       src_vq->buf_struct_size = sizeof(struct vxe_buffer);
+       src_vq->ops = &vxe_video_ops;
+       src_vq->mem_ops = &vb2_dma_sg_memops;
+       src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
+       src_vq->lock = vxe->mutex;
+       src_vq->dev = vxe->ti_vxe_dev.dev;
+
+       ret = vb2_queue_init(src_vq);
+       if (ret)
+               return ret;
+
+       /* dst_vq */
+       memset(dst_vq, 0, sizeof(*dst_vq));
+       dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
+       dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
+       dst_vq->drv_priv = ctx;
+       dst_vq->buf_struct_size = sizeof(struct vxe_buffer);
+       dst_vq->ops = &vxe_video_ops;
+       dst_vq->mem_ops = &vb2_dma_sg_memops;
+       dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
+       dst_vq->lock = vxe->mutex;
+       dst_vq->dev = vxe->ti_vxe_dev.dev;
+
+       ret = vb2_queue_init(dst_vq);
+       if (ret) {
+               vb2_queue_release(src_vq);
+               return ret;
+       }
+
+       return 0;
+}
+
+static int32 vxe_open(struct file *file)
+{
+       struct vxe_dev *vxe = video_drvdata(file);
+       struct vxe_enc_ctx *ctx;
+       int32 i, ret = 0;
+
+       OSA_DEV_DBG(vxe->dev, "%s:%d vxe %p\n", __func__, __LINE__, vxe);
+
+       osa_mutex_lock(vxe->mutex);
+
+       ctx = osa_zalloc(sizeof(*ctx), OSA_GFP_KERNEL);
+       if (!ctx) {
+               osa_mutex_unlock(vxe->mutex);
+               return -OSA_ENOMEM;
+       }
+
+       osa_mutex_create(&ctx->mutex);
+       if (NULL == ctx->mutex)
+               return OSA_ENOMEM;
+
+       ctx->dev = vxe;
+       ctx->s_fmt_flags = 0;
+       ctx->eos = osa_false;
+       ctx->flag_last = osa_false;
+       ctx->available_coded_packages = 0;
+       ctx->available_source_frames = 0;
+       ctx->frames_encoding = 0;
+       ctx->frame_num = 0;
+       ctx->out_queue.streaming = osa_false;
+       ctx->cap_queue.streaming = osa_false;
+
+       for (i = 0; i < ARRAY_SIZE(vxe_enc_formats); i++) {
+               if (vxe_enc_formats[i].type ==
+                   V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
+                       ctx->out_queue.fmt = &vxe_enc_formats[i];
+                       break;
+               }
+       }
+       for (i = 0; i < ARRAY_SIZE(vxe_enc_formats); i++) {
+               if (vxe_enc_formats[i].type ==
+                   V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
+                       ctx->cap_queue.fmt = &vxe_enc_formats[i];
+                       break;
+               }
+       }
+
+       v4l2_fh_init(&ctx->fh, video_devdata(file));
+       file->private_data = &ctx->fh;
+
+       ctx->fh.m2m_ctx = v4l2_m2m_ctx_init(vxe->m2m_dev, ctx, &queue_init);
+       if (OSA_IS_ERR(ctx->fh.m2m_ctx)) {
+               ret = OSA_PTR_ERR(ctx->fh.m2m_ctx);
+               goto exit;
+       }
+
+       vxe_fill_default_params(ctx);
+
+       v4l2_fh_add(&ctx->fh);
+
+       vxe_create_ctx(vxe, ctx);
+
+       /* TODO: Add stream id creation */
+exit:
+       osa_mutex_unlock(vxe->mutex);
+       return ret;
+}
+
+static int32 vxe_release(struct file *file)
+{
+       struct vxe_dev *vxe = video_drvdata(file);
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+       /* TODO Need correct API */
+
+       osa_mutex_lock(vxe->mutex);
+
+       v4l2_fh_del(&ctx->fh);
+       v4l2_fh_exit(&ctx->fh);
+       v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
+
+       if (ctx->s_fmt_flags & S_FMT_FLAG_STREAM_CREATED)
+               topaz_stream_destroy(ctx->topaz_str_context);
+       ctx->topaz_str_context = NULL;
+
+       osa_mutex_destroy(&ctx->mutex);
+       osa_free(ctx);
+
+       osa_mutex_unlock(vxe->mutex);
+
+       return 0;
+}
+
+static const struct v4l2_file_operations vxe_enc_fops = {
+       .owner = THIS_MODULE,
+       .open = vxe_open,
+       .release = vxe_release,
+       .poll = v4l2_m2m_fop_poll,
+       .unlocked_ioctl = video_ioctl2,
+       .mmap = v4l2_m2m_fop_mmap,
+};
+
+static int32 vxe_querycap(struct file *file, void *priv,
+                         struct v4l2_capability *cap)
+{
+       strncpy(cap->driver, IMG_VXE_ENC_MODULE_NAME, sizeof(cap->driver) - 1);
+       strncpy(cap->card, IMG_VXE_ENC_MODULE_NAME, sizeof(cap->card) - 1);
+       snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
+                IMG_VXE_ENC_MODULE_NAME);
+       cap->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;
+       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
+       return 0;
+}
+
+static struct vxe_enc_fmt *find_format(struct v4l2_format *f)
+{
+       int32 i;
+
+       for (i = 0; i < ARRAY_SIZE(vxe_enc_formats); ++i) {
+               if (vxe_enc_formats[i].fourcc == f->fmt.pix_mp.pixelformat &&
+                   vxe_enc_formats[i].type == f->type)
+                       return &vxe_enc_formats[i];
+       }
+       return NULL;
+}
+
+static int32 vxe_enum_fmt(struct file *file, void *priv, struct v4l2_fmtdesc *f)
+{
+       int32 i, index = 0;
+       struct vxe_enc_fmt *fmt = NULL;
+
+       for (i = 0; i < ARRAY_SIZE(vxe_enc_formats); ++i) {
+               if (vxe_enc_formats[i].type == f->type) {
+                       if (index == f->index) {
+                               fmt = &vxe_enc_formats[i];
+                               break;
+                       }
+                       index++;
+               }
+       }
+
+       if (!fmt)
+               return -OSA_EINVAL;
+
+       f->pixelformat = fmt->fourcc;
+       return 0;
+}
+
+static int32 vxe_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
+{
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+       struct v4l2_pix_format_mplane *pix_mp;
+       struct vxe_queue *queue;
+       int i;
+
+       pix_mp = &f->fmt.pix_mp;
+
+       queue = get_queue(ctx, f->type);
+       if (!queue)
+               return -OSA_EINVAL;
+
+       pix_mp->width = queue->width;
+       pix_mp->height = queue->height;
+       pix_mp->pixelformat = queue->fmt->fourcc;
+       pix_mp->field = V4L2_FIELD_NONE;
+
+       for (i = 0; i < queue->fmt->num_planes; i++) {
+               pix_mp->plane_fmt[i].sizeimage = queue->size_image[i];
+               pix_mp->plane_fmt[i].bytesperline = queue->bytesperline[i];
+       }
+       pix_mp->num_planes = queue->fmt->num_planes;
+
+       return 0;
+}
+
+static int32 vxe_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
+{
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+       struct vxe_enc_fmt *fmt;
+       struct vxe_queue *queue;
+       int i;
+       struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp;
+       struct v4l2_plane_pix_format *plane_fmt = pix_mp->plane_fmt;
+       struct img_rc_params rc;
+
+       fmt = find_format(f);
+       if (!fmt)
+               return -OSA_EINVAL;
+
+       queue = get_queue(ctx, f->type);
+       if (!queue)
+               return -OSA_EINVAL;
+
+       if (V4L2_TYPE_IS_OUTPUT(f->type)) {
+               pix_mp->num_planes = fmt->num_planes;
+               pix_mp->flags = 0;
+               for (i = 0; i < fmt->num_planes; i++) {
+                       plane_fmt[i].bytesperline = get_stride(pix_mp->width,
+                                                              fmt);
+                       plane_fmt[i].sizeimage = get_sizeimage(plane_fmt[i].bytesperline,
+                                                              pix_mp->height,
+                                                              fmt);
+               }
+       } else {
+               pix_mp->flags = 0;
+               /* Worst case estimation of sizeimage */
+//             plane_fmt[0].sizeimage = ALIGN(pix_mp->width, HW_ALIGN) *
+//                                      ALIGN(pix_mp->height, HW_ALIGN) * 2;
+               rc.initial_qp_i = 18; /* TODO: This is the only thing that matters here, make sure this is correct */
+               plane_fmt[0].bytesperline = 0;
+               plane_fmt[0].sizeimage = topaz_get_coded_buffer_max_size(NULL,
+                                                                        fmt->std,
+                                                                        pix_mp->width,
+                                                                        pix_mp->height,
+                                                                        &rc);
+
+       }
+
+       if (pix_mp->field == V4L2_FIELD_ANY)
+               pix_mp->field = V4L2_FIELD_NONE;
+
+       return 0;
+}
+
+static int32 vxe_s_fmt(struct file *file, void *priv, struct v4l2_format *f)
+{
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+       struct v4l2_pix_format_mplane *pix_mp;
+       struct vxe_enc_fmt *fmt;
+       struct vxe_queue *queue;
+       int32 i, ret = 0;
+       uint32 level_h264;
+
+       ret = vxe_try_fmt(file, priv, f);
+       if (ret)
+               return ret;
+
+       fmt = find_format(f);
+       if (!fmt)
+               return -OSA_EINVAL;
+
+       queue = get_queue(ctx, f->type);
+       if (!queue)
+               return -OSA_EINVAL;
+
+       pix_mp = &f->fmt.pix_mp;
+
+       queue->fmt = fmt;
+       queue->width = pix_mp->width;
+       queue->height = pix_mp->height;
+
+       if (V4L2_TYPE_IS_OUTPUT(f->type)) {
+               ctx->vparams.format = fmt->fmt;
+               ctx->vparams.source_width = pix_mp->width;
+               ctx->vparams.source_frame_height = pix_mp->height;
+               ctx->vparams.csc_preset = fmt->csc_preset;
+               if (ctx->vparams.csc_preset != IMG_CSC_NONE)
+                       ctx->vparams.enable_scaler = osa_true;
+
+               OSA_PR_DEBUG("img_video_params: format=%d\n", ctx->vparams.format);
+               OSA_PR_DEBUG("img_video_params: source_width=%d\n", ctx->vparams.source_width);
+               OSA_PR_DEBUG("img_video_params: source_frame_height=%d\n", ctx->vparams.source_frame_height);
+               OSA_PR_DEBUG("img_video_params: csc_preset=%d\n", ctx->vparams.csc_preset);
+               OSA_PR_DEBUG("img_video_params: enable_scaler=%s\n", ctx->vparams.enable_scaler ? "true" : "false");
+
+               for (i = 0; i < fmt->num_planes; i++) {
+                       queue->bytesperline[i] = get_stride(queue->width, fmt);
+                       queue->size_image[i] = get_sizeimage(pix_mp->plane_fmt[i].bytesperline,
+                                                            queue->height, fmt);
+               }
+
+               /* Rate Control parameters */
+               ctx->rc.transfer_bits_per_second = ctx->rc.bits_per_second;
+               ctx->rc.bu_size = -1414812757; /* Pretty sure unitialized */
+               ctx->rc.buffer_size = ctx->rc.transfer_bits_per_second;
+
+               ctx->rc.initial_level = (3 * ctx->rc.buffer_size) >> 4;
+               ctx->rc.initial_level = ((ctx->rc.initial_level +
+                                         ((ctx->rc.bits_per_second /
+                                           ctx->rc.frame_rate) / 2)) /
+                                         (ctx->rc.bits_per_second /
+                                          ctx->rc.frame_rate)) *
+                                       (ctx->rc.bits_per_second / ctx->rc.frame_rate);
+               ctx->rc.initial_level = max((uint32)ctx->rc.initial_level,
+                                           (uint32)(ctx->rc.bits_per_second /
+                                            ctx->rc.frame_rate));
+               ctx->rc.initial_delay = ctx->rc.buffer_size - ctx->rc.initial_level;
+               ctx->rc.bframes = 0;
+
+               OSA_PR_DEBUG("img_rc_params: initial_level=%d\n", ctx->rc.initial_level);
+               OSA_PR_DEBUG("img_rc_params: initial_delay=%d\n", ctx->rc.initial_delay);
+
+               ctx->sh_params.profile = find_h264_profile(osa_false, /* TODO Figure out which lossless to use */
+                                                          ctx->vparams.use_default_scaling_list,
+                                                          osa_false,
+                                                          ctx->vparams.h264_8x8,
+                                                          ctx->vparams.enable_mvc,
+                                                          ctx->rc.bframes,
+                                                          ctx->vparams.is_interlaced,
+                                                          ctx->vparams.cabac_enabled,
+                                                          ctx->vparams.weighted_prediction,
+                                                          ctx->vparams.vp_weighted_implicit_bi_pred);
+               ctx->sh_params.max_num_ref_frames = 1; //TODO Need more logic
+
+               level_h264 = calculate_h264_level(pix_mp->width, pix_mp->height,
+                                                 ctx->rc.frame_rate,
+                                                 ctx->rc.rc_enable,
+                                                 ctx->rc.bits_per_second,
+                                                 osa_false, /* TODO Figure out which lossless to use */
+                                                 ctx->sh_params.profile,
+                                                 ctx->sh_params.max_num_ref_frames);
+               OSA_PR_DEBUG("level_h264=%d\n", level_h264);
+
+               ctx->vparams.vert_mv_limit = 255;
+               if (level_h264 >= 110)
+                       ctx->vparams.vert_mv_limit = 511;
+               if (level_h264 >= 210)
+                       ctx->vparams.vert_mv_limit = 1023;
+               if (level_h264 >= 310)
+                       ctx->vparams.vert_mv_limit = 2047;
+
+               if (level_h264 >= 300)
+                       ctx->vparams.limit_num_vectors = osa_true;
+               else
+                       ctx->vparams.limit_num_vectors = osa_false;
+
+               OSA_PR_DEBUG("ctx->vparams.vert_mv_limit=%d\n", ctx->vparams.vert_mv_limit);
+               OSA_PR_DEBUG("ctx->vparams.limit_num_vectors=%d\n", ctx->vparams.limit_num_vectors);
+
+               /* VUI parameters */
+               ctx->vui_params.time_scale = ctx->rc.frame_rate * 2;
+               ctx->vui_params.bit_rate_value_minus1 = (ctx->rc.bits_per_second / 64)
+                                                       - 1;
+               ctx->vui_params.cbp_size_value_minus1 = (ctx->rc.buffer_size / 64) - 1;
+               ctx->vui_params.aspect_ratio_info_present_flag = osa_false; //unset
+               ctx->vui_params.aspect_ratio_idc = 0; //unset
+               ctx->vui_params.sar_width = 0; //unset
+               ctx->vui_params.sar_height = 0; //unset
+               ctx->vui_params.cbr = (IMG_RCMODE_CBR == ctx->rc.rc_mode) ?
+                                     osa_true : osa_false;
+               ctx->vui_params.initial_cpb_removal_delay_length_minus1 =
+                       BPH_SEI_NAL_INITIAL_CPB_REMOVAL_DELAY_SIZE - 1;
+               ctx->vui_params.cpb_removal_delay_length_minus1 =
+                       PTH_SEI_NAL_CPB_REMOVAL_DELAY_SIZE - 1;
+               ctx->vui_params.dpb_output_delay_length_minus1 =
+                       PTH_SEI_NAL_DPB_OUTPUT_DELAY_SIZE - 1;
+               ctx->vui_params.time_offset_length = 24; //hard coded
+               ctx->vui_params.num_reorder_frames = 0; //TODO
+               ctx->vui_params.max_dec_frame_buffering = 0; //unset
+
+               OSA_PR_DEBUG("h264_vui_params: time_scale=%d\n", ctx->vui_params.time_scale);
+               OSA_PR_DEBUG("h264_vui_params: bit_rate_value_minus1=%d\n", ctx->vui_params.bit_rate_value_minus1);
+               OSA_PR_DEBUG("h264_vui_params: cbp_size_value_minus1=%d\n", ctx->vui_params.cbp_size_value_minus1);
+               OSA_PR_DEBUG("h264_vui_params: cbr=%d\n", ctx->vui_params.cbr);
+               OSA_PR_DEBUG("h264_vui_params: initial_cpb_removal_delay_length_minus1=%d\n", ctx->vui_params.initial_cpb_removal_delay_length_minus1);
+               OSA_PR_DEBUG("h264_vui_params: cpb_removal_delay_length_minus1=%d\n", ctx->vui_params.cpb_removal_delay_length_minus1);
+               OSA_PR_DEBUG("h264_vui_params: dpb_output_delay_length_minus1=%d\n", ctx->vui_params.dpb_output_delay_length_minus1);
+
+               /* Sequence Header parameters */
+               switch (level_h264)
+               {
+                       case  100:
+                               ctx->sh_params.level = SH_LEVEL_1;
+                               break;
+                       case 101:
+                               ctx->sh_params.level = SH_LEVEL_1B;
+                               break;
+                       case 110:
+                               ctx->sh_params.level = SH_LEVEL_11;
+                               break;
+                       case 120:
+                               ctx->sh_params.level = SH_LEVEL_12;
+                               break;
+                       case 130:
+                               ctx->sh_params.level = SH_LEVEL_13;
+                               break;
+                       case 200:
+                               ctx->sh_params.level = SH_LEVEL_2;
+                               break;
+                       case 210:
+                               ctx->sh_params.level = SH_LEVEL_21;
+                               break;
+                       case 220:
+                               ctx->sh_params.level = SH_LEVEL_22;
+                               break;
+                       case 300:
+                               ctx->sh_params.level = SH_LEVEL_3;
+                               break;
+                       case 310:
+                               ctx->sh_params.level = SH_LEVEL_31;
+                               break;
+                       case 320:
+                               ctx->sh_params.level = SH_LEVEL_32;
+                               break;
+                       case 400:
+                               ctx->sh_params.level = SH_LEVEL_4;
+                               break;
+                       case 410:
+                               ctx->sh_params.level = SH_LEVEL_41;
+                               break;
+                       case 420:
+                               ctx->sh_params.level = SH_LEVEL_42;
+                               break;
+                       case 500:
+                               ctx->sh_params.level = SH_LEVEL_5;
+                               break;
+                       case 510:
+                               ctx->sh_params.level = SH_LEVEL_51;
+                               break;
+                       case 520:
+                               ctx->sh_params.level = SH_LEVEL_52;
+                               break;
+                       default:
+                               OSA_PR_ERR("Error invalid h264 level %d\n", level_h264);
+                               return -OSA_EINVAL;
+               }
+               if (V4L2_TYPE_IS_OUTPUT(f->type)) {
+                       ctx->sh_params.width_in_mbs_minus1 =
+                               (queue->width / MB_SIZE) - 1;
+                       ctx->sh_params.height_in_maps_units_minus1 =
+                               (queue->height / MB_SIZE) - 1;
+                       OSA_PR_DEBUG("h264_sequence_header_params: width_in_mbs_minus1=%d\n", ctx->sh_params.width_in_mbs_minus1);
+                       OSA_PR_DEBUG("h264_sequence_header_params: height_in_maps_units_minus1=%d\n", ctx->sh_params.height_in_maps_units_minus1);
+               }
+               ctx->sh_params.log2_max_pic_order_cnt = 6; //hard coded
+               ctx->sh_params.gaps_in_frame_num_value = osa_false;
+               ctx->sh_params.frame_mbs_only_flag = ctx->vparams.is_interlaced ?
+                                                    osa_false : osa_true;
+               ctx->sh_params.vui_params_present = (IMG_RCMODE_NONE == ctx->rc.rc_mode)
+                                                   ? osa_false: osa_true;
+               ctx->sh_params.seq_scaling_matrix_present_flag = osa_false;
+               ctx->sh_params.use_default_scaling_list = osa_false;
+               ctx->sh_params.is_lossless = osa_false;
+               ctx->sh_params.vui_params = ctx->vui_params;
+
+               OSA_PR_DEBUG("h264_sequence_header_params: frame_mbs_only_flag=%d\n", ctx->sh_params.frame_mbs_only_flag);
+               OSA_PR_DEBUG("h264_sequence_header_params: vui_params_present=%d\n", ctx->sh_params.vui_params_present);
+
+               ctx->s_fmt_flags |= S_FMT_FLAG_OUT_RECV;
+       } else {
+               for (i = 0; i < fmt->num_planes; i++) {
+                       queue->bytesperline[i] = 0;
+                       queue->size_image[i] =
+                               topaz_get_coded_buffer_max_size(ctx->topaz_str_context,
+                                                               queue->fmt->std,
+                                                               queue->width,
+                                                               queue->height,
+                                                               &ctx->rc);
+               }
+               ctx->vparams.standard = fmt->std;
+               ctx->vparams.width = pix_mp->width;
+               /*
+                * Note: Do not halve height for interlaced.
+                * App should take care of this.
+                */
+               ctx->vparams.frame_height = pix_mp->height;
+
+               OSA_PR_DEBUG("img_video_params: standard=%d\n", ctx->vparams.standard);
+               OSA_PR_DEBUG("img_video_params: width=%d\n", ctx->vparams.width);
+               OSA_PR_DEBUG("img_video_params: frame_height=%d\n", ctx->vparams.frame_height);
+
+               ctx->s_fmt_flags |= S_FMT_FLAG_CAP_RECV;
+       }
+       ctx->vparams.is_interlaced = osa_false;
+
+       ctx->vparams.intra_pred_modes = -1414812757; /* Pretty sure uninitialized */
+
+       ctx->vparams.buffer_stride_bytes = 0;
+       ctx->vparams.buffer_height = 0;
+
+       ctx->vparams.crop_left = 0;
+       ctx->vparams.crop_right = 0;
+       ctx->vparams.crop_top = 0;
+       ctx->vparams.crop_bottom = 0;
+
+       /* Crop parameters */
+       ctx->crop_params.clip = osa_false;
+       ctx->crop_params.left_crop_offset = 0;
+       ctx->crop_params.right_crop_offset = 0;
+       ctx->crop_params.top_crop_offset = 0;
+       ctx->crop_params.bottom_crop_offset = 0;
+
+       OSA_PR_DEBUG("s_fmt_flags=%#08x\n", ctx->s_fmt_flags);
+       if ((ctx->s_fmt_flags & S_FMT_FLAG_OUT_RECV) &&
+           (ctx->s_fmt_flags & S_FMT_FLAG_CAP_RECV))
+       {
+               OSA_PR_DEBUG("Calling topaz_stream_create()\n");
+               topaz_stream_create(ctx, &ctx->vparams, 0, 1, &ctx->rc,
+                                   &ctx->topaz_str_context);
+
+               topaz_h264_prepare_sequence_header(ctx->topaz_str_context,
+                                                  ctx->sh_params.width_in_mbs_minus1 + 1,
+                                                  ctx->sh_params.height_in_maps_units_minus1 + 1,
+                                                  osa_true, &ctx->vui_params,
+                                                  &ctx->crop_params,
+                                                  &ctx->sh_params, osa_false);
+               /* Note: cqp_offset looks unset in img */
+               topaz_h264_prepare_picture_header(ctx->topaz_str_context, 0);
+
+               topaz_load_context(ctx->topaz_str_context);
+
+               ctx->s_fmt_flags |= S_FMT_FLAG_STREAM_CREATED;
+       }
+
+       return 0;
+}
+
+static int32 vxe_subscribe_event(struct v4l2_fh *fh,
+                                const struct v4l2_event_subscription *sub)
+{
+       if (sub->type != V4L2_EVENT_EOS)
+               return -OSA_EINVAL;
+
+       v4l2_event_subscribe(fh, sub, 0, NULL);
+       return 0;
+}
+
+static int32 vxe_try_cmd(struct file *file, void *fh,
+                        struct v4l2_encoder_cmd *cmd)
+{
+       if (cmd->cmd != V4L2_DEC_CMD_STOP)
+               return -EINVAL;
+       return 0;
+}
+
+static int32 vxe_cmd(struct file *file, void *fh, struct v4l2_encoder_cmd *cmd)
+{
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+
+       if (cmd->cmd != V4L2_DEC_CMD_STOP)
+               return -EINVAL;
+
+       osa_mutex_lock(ctx->mutex);
+       if (0 < v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx) ||
+           (! ctx->out_queue.streaming) || (! ctx->cap_queue.streaming)) {
+               /* Buffers are still in queue for encode, set eos flag */
+               ctx->eos = osa_true;
+               osa_mutex_unlock(ctx->mutex);
+       } else if ((0 < ctx->available_source_frames) ||
+                  (0 < ctx->frames_encoding)) {
+               /*
+                * Buffers are still in firmware for encode. Tell topaz
+                * that last frame sent is last frame in stream
+                */
+               topaz_end_of_stream(ctx->topaz_str_context, ctx->frame_num + 1);
+               ctx->last_frame_num = ctx->frame_num + 1;
+       } else {
+               /* All buffers are encoded, so issue dummy stream end */
+               osa_mutex_unlock(ctx->mutex);
+               vxe_eos(ctx);
+       }
+       return 0;
+}
+
+static int32 vxe_queryctrl(struct file *file, void *priv,
+                          struct v4l2_queryctrl *query)
+{
+       int i;
+
+       query->reserved[0] = 0;
+       query->reserved[1] = 0;
+
+       /* Enumerate controls */
+       if (query->id & V4L2_CTRL_FLAG_NEXT_CTRL) {
+               query->id &= ~V4L2_CTRL_FLAG_NEXT_CTRL;
+               for (i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
+                       if ((! controls[i].compound) &&
+                           controls[i].cid > query->id) {
+                               query->id = controls[i].cid;
+                               query->type = controls[i].type;
+                               strncpy(query->name, controls[i].name, sizeof(query->name));
+                               query->minimum = controls[i].minimum;
+                               query->maximum = controls[i].maximum;
+                               query->step = controls[i].step;
+                               query->default_value = controls[i].default_value;
+                               query->flags = 0;
+                               return 0;
+                       }
+               }
+               return -OSA_EINVAL;
+       }
+
+       /* Return info on requested control */
+       for (i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
+               if (controls[i].cid == query->id) {
+                       query->id = controls[i].cid;
+                       query->type = controls[i].type;
+                       strncpy(query->name, controls[i].name, sizeof(query->name));
+                       query->minimum = controls[i].minimum;
+                       query->maximum = controls[i].maximum;
+                       query->step = controls[i].step;
+                       query->default_value = controls[i].default_value;
+                       query->flags = 0;
+                       return 0;
+               }
+       }
+
+       return -OSA_EINVAL;
+}
+
+static int32 vxe_query_ext_ctrl(struct file *file, void *priv,
+                               struct v4l2_query_ext_ctrl *query)
+{
+       uint32 queryid;
+       int i, j;
+
+       query->reserved[0] = 0;
+       query->reserved[1] = 0;
+
+       /* Enumerate controls */
+       if ((query->id & V4L2_CTRL_FLAG_NEXT_CTRL) ||
+           (query->id & V4L2_CTRL_FLAG_NEXT_COMPOUND)) {
+               queryid = query->id;
+               queryid &= ~V4L2_CTRL_FLAG_NEXT_CTRL;
+               queryid &= ~V4L2_CTRL_FLAG_NEXT_COMPOUND;
+               for (i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
+                       if ((((! controls[i].compound) &&
+                             (query->id & V4L2_CTRL_FLAG_NEXT_CTRL)) ||
+                            ((controls[i].compound) &&
+                             (query->id & V4L2_CTRL_FLAG_NEXT_COMPOUND))) &&
+                           (controls[i].cid > queryid)) {
+                               query->id = controls[i].cid;
+                               query->type = controls[i].type;
+                               strncpy(query->name, controls[i].name, sizeof(query->name));
+                               query->minimum = controls[i].minimum;
+                               query->maximum = controls[i].maximum;
+                               query->step = controls[i].step;
+                               query->default_value = controls[i].default_value;
+                               /* Our supported controls use int32 values */
+                               query->elem_size = 4;
+                               query->elems  = 1;
+                               query->nr_of_dims = 0;
+                               for (j = 0; j < V4L2_CTRL_MAX_DIMS; j++)
+                                       query->dims[j] = 0;
+                               query->flags = 0;
+                               return 0;
+                       }
+               }
+               return -OSA_EINVAL;
+       }
+
+       /* Return info on requested control */
+       for (i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
+               if (controls[i].cid == query->id) {
+                       query->id = controls[i].cid;
+                       query->type = controls[i].type;
+                       strncpy(query->name, controls[i].name, sizeof(query->name));
+                       query->minimum = controls[i].minimum;
+                       query->maximum = controls[i].maximum;
+                       query->step = controls[i].step;
+                       query->default_value = controls[i].default_value;
+                       /* Our supported controls use int32 values */
+                       query->elem_size = 4;
+                       query->elems  = 1;
+                       query->nr_of_dims = 0;
+                       for (j = 0; j < V4L2_CTRL_MAX_DIMS; j++)
+                               query->dims[j] = 0;
+                       query->flags = 0;
+                       return 0;
+               }
+       }
+
+       return -OSA_EINVAL;
+}
+
+static int32 vxe_g_ext_ctrls(struct file *file, void *priv,
+                            struct v4l2_ext_controls *ctrls)
+{
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+       struct device *dev = ctx->dev->dev;
+       struct v4l2_queryctrl query;
+       int i;
+
+       ctrls->reserved[0] = 0;
+       ctrls->reserved[1] = 0;
+
+       if (V4L2_CTRL_WHICH_DEF_VAL == ctrls->which) {
+               for (i = 0; i < ctrls->count; i++) {
+                       query.id = ctrls->controls[i].id;
+                       if (vxe_queryctrl(NULL, NULL, &query)) {
+                               OSA_DEV_ERR(dev, "%s could not find default value for id=%#08x\n",
+                                           __func__, ctrls->controls[i].id);
+                               return -OSA_EINVAL;
+                       }
+                       ctrls->controls[i].value = query.default_value;
+               }
+       }
+
+       for (i = 0; i < ctrls->count; i++) {
+               ctrls->controls[i].reserved2[0] = 0;
+
+               switch(ctrls->controls[i].id)
+               {
+               case V4L2_CID_MPEG_VIDEO_GOP_SIZE:
+                       ctrls->controls[i].size = 0;
+                       ctrls->controls[i].value = ctx->vparams.idr_period;
+                       break;
+               case V4L2_CID_MPEG_VIDEO_BITRATE:
+                       ctrls->controls[i].size = 0;
+                       ctrls->controls[i].value = ctx->rc.bits_per_second;
+                       break;
+               case V4L2_CID_MPEG_VIDEO_H264_I_PERIOD:
+                       ctrls->controls[i].size = 0;
+                       ctrls->controls[i].value = ctx->rc.intra_freq;
+                       break;
+               default:
+                       OSA_DEV_ERR(dev, "%s Invalid control id %#08x\n",
+                                   __func__, ctrls->controls[i].id);
+                       ctrls->error_idx = ctrls->count;
+                       return -OSA_EINVAL;
+               }
+       }
+
+       return 0;
+}
+
+static int32 vxe_try_ext_ctrls(struct file *file, void *priv,
+                            struct v4l2_ext_controls *ctrls)
+{
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+       struct device *dev = ctx->dev->dev;
+       struct v4l2_queryctrl query;
+       int i;
+
+       ctrls->reserved[0] = 0;
+       ctrls->reserved[1] = 0;
+
+       /* Can't write default values or support requests */
+       if (V4L2_CTRL_WHICH_CUR_VAL != ctrls->which)
+               return -OSA_EINVAL;
+
+       /* Cannot change values once context is created */
+       /* TODO: Handle controls after stream is created but before streamon */
+       if (ctx->s_fmt_flags & S_FMT_FLAG_STREAM_CREATED)
+               return -OSA_EBUSY;
+
+       for (i = 0; i < ctrls->count; i++) {
+               ctrls->controls[i].reserved2[0] = 0;
+
+               query.id = ctrls->controls[i].id;
+               if (vxe_queryctrl(NULL, NULL, &query)) {
+                       OSA_DEV_ERR(dev, "%s could not find control id=%#08x\n",
+                                   __func__, ctrls->controls[i].id);
+                       ctrls->error_idx = i;
+                       return -OSA_EINVAL;
+               }
+               if (ctrls->controls[i].value < query.minimum) {
+                       OSA_DEV_ERR(dev, "%s control id=%#08x value=%d less than minimum=%d\n",
+                                   __func__, ctrls->controls[i].id,
+                                   ctrls->controls[i].value, query.minimum);
+                       ctrls->error_idx = i;
+                       return -OSA_ERANGE;
+               }
+               if (ctrls->controls[i].value > query.maximum) {
+                       OSA_DEV_ERR(dev, "%s control id=%#08x value=%d greater than maximum=%d\n",
+                                   __func__, ctrls->controls[i].id,
+                                   ctrls->controls[i].value, query.maximum);
+                       ctrls->error_idx = i;
+                       return -OSA_ERANGE;
+               }
+       }
+
+       return 0;
+}
+
+static int32 vxe_s_ext_ctrls(struct file *file, void *priv,
+                            struct v4l2_ext_controls *ctrls)
+{
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+       struct device *dev = ctx->dev->dev;
+       int i;
+       int32 ret;
+
+       ctrls->reserved[0] = 0;
+       ctrls->reserved[1] = 0;
+
+       if (V4L2_CTRL_WHICH_CUR_VAL != ctrls->which)
+               return -OSA_EINVAL;
+
+       /* Verify first with try_ext_ctrls */
+       ret = vxe_try_ext_ctrls(file, priv, ctrls);
+       if (ret) {
+               /* Indicate verification stage error */
+               ctrls->error_idx = ctrls->count;
+               return ret;
+       }
+
+       /* Set all values in this set of commands */
+       for (i = 0; i < ctrls->count; i++) {
+               ctrls->controls[i].reserved2[0] = 0;
+
+               switch(ctrls->controls[i].id)
+               {
+               case V4L2_CID_MPEG_VIDEO_GOP_SIZE:
+                       ctrls->controls[i].size = 0;
+                       ctx->vparams.idr_period = ctrls->controls[i].value;
+                       break;
+               case V4L2_CID_MPEG_VIDEO_BITRATE:
+                       ctrls->controls[i].size = 0;
+                       ctx->rc.bits_per_second = ctrls->controls[i].value;
+                       break;
+               case V4L2_CID_MPEG_VIDEO_H264_I_PERIOD:
+                       ctrls->controls[i].size = 0;
+                       ctx->rc.intra_freq = ctrls->controls[i].value;
+                       ctx->vparams.intra_cnt = ctrls->controls[i].value;
+                       break;
+               default:
+                       OSA_DEV_ERR(dev, "%s Invalid control id %#08x\n",
+                                   __func__, ctrls->controls[i].id);
+                       ctrls->error_idx = i;
+                       return -OSA_EINVAL;
+               }
+       }
+
+       return 0;
+}
+
+static int32 vxe_enum_framesizes(struct file *file, void *priv,
+                                struct v4l2_frmsizeenum *fsize)
+{
+       if (fsize->index != 0)
+               return -OSA_EINVAL;
+
+       fsize->type = V4L2_FRMSIZE_TYPE_CONTINUOUS;
+       fsize->stepwise.min_width = 1;
+       fsize->stepwise.max_width = 1920;
+       fsize->stepwise.step_width = 1;
+       fsize->stepwise.min_height = 1;
+       fsize->stepwise.max_height = 1080;
+       fsize->stepwise.step_height = 1;
+
+       fsize->reserved[0] = 0;
+       fsize->reserved[1] = 0;
+
+       return 0;
+}
+
+static int32 vxe_enum_frameintervals(struct file *file, void *priv,
+                                    struct v4l2_frmivalenum *fival)
+{
+       if (fival->index > (sizeof(frmivals) / sizeof(frmivals[0])))
+               return -EINVAL;
+
+       fival->type = V4L2_FRMIVAL_TYPE_DISCRETE;
+       fival->discrete = frmivals[fival->index];
+
+       fival->reserved[0] = 0;
+       fival->reserved[1] = 1;
+
+       return 0;
+}
+
+static int32 vxe_g_parm(struct file *file, void *priv,
+                       struct v4l2_streamparm *parm)
+{
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+
+       if (V4L2_TYPE_IS_OUTPUT(parm->type)) {
+               parm->parm.output.capability = V4L2_CAP_TIMEPERFRAME;
+               parm->parm.output.timeperframe.numerator = 1;
+               parm->parm.output.timeperframe.denominator = ctx->rc.frame_rate;
+       } else {
+               parm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
+               parm->parm.capture.timeperframe.numerator = 1;
+               parm->parm.capture.timeperframe.denominator = ctx->rc.frame_rate;
+       }
+
+       return 0;
+}
+
+static int32 vxe_s_parm(struct file *file, void *priv,
+                       struct v4l2_streamparm *parm)
+{
+       struct vxe_enc_ctx *ctx = file2ctx(file);
+       uint32 num, den;
+       int i;
+
+       /* Cannot change values once context is created */
+       /* TODO: Handle controls after stream is created but before streamon */
+       if (ctx->s_fmt_flags & S_FMT_FLAG_STREAM_CREATED)
+               return -OSA_EBUSY;
+
+       if (V4L2_TYPE_IS_OUTPUT(parm->type)) {
+               parm->parm.output.capability = V4L2_CAP_TIMEPERFRAME;
+               num = parm->parm.output.timeperframe.numerator;
+               den = parm->parm.output.timeperframe.denominator;
+       } else {
+               parm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
+               num = parm->parm.capture.timeperframe.numerator;
+               den = parm->parm.capture.timeperframe.denominator;
+       }
+
+       for (i = 0; i < (sizeof(frmivals) / sizeof(frmivals[0])); i++) {
+               if ((num == frmivals[i].numerator) &&
+                   (den == frmivals[i].denominator)) {
+                       /* Switch from frame interval to frame rate */
+                       ctx->rc.frame_rate = den / num;
+               }
+       }
+
+       if (V4L2_TYPE_IS_OUTPUT(parm->type)) {
+               parm->parm.output.capability = V4L2_CAP_TIMEPERFRAME;
+               parm->parm.output.timeperframe.numerator = 1;
+               parm->parm.output.timeperframe.denominator = ctx->rc.frame_rate;
+       } else {
+               parm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
+               parm->parm.capture.timeperframe.numerator = 1;
+               parm->parm.capture.timeperframe.denominator = ctx->rc.frame_rate;
+       }
+
+       return 0;
+}
+
+static const struct v4l2_ioctl_ops vxe_enc_ioctl_ops = {
+       .vidioc_querycap = vxe_querycap,
+
+       .vidioc_enum_fmt_vid_cap_mplane = vxe_enum_fmt,
+       .vidioc_g_fmt_vid_cap_mplane = vxe_g_fmt,
+       .vidioc_try_fmt_vid_cap_mplane = vxe_try_fmt,
+       .vidioc_s_fmt_vid_cap_mplane = vxe_s_fmt,
+
+       .vidioc_enum_fmt_vid_out_mplane = vxe_enum_fmt,
+       .vidioc_g_fmt_vid_out_mplane = vxe_g_fmt,
+       .vidioc_try_fmt_vid_out_mplane = vxe_try_fmt,
+       .vidioc_s_fmt_vid_out_mplane = vxe_s_fmt,
+
+       .vidioc_reqbufs = v4l2_m2m_ioctl_reqbufs,
+       .vidioc_querybuf = v4l2_m2m_ioctl_querybuf,
+       .vidioc_qbuf = v4l2_m2m_ioctl_qbuf,
+       .vidioc_dqbuf = v4l2_m2m_ioctl_dqbuf,
+       .vidioc_expbuf = v4l2_m2m_ioctl_expbuf,
+
+       .vidioc_streamon = v4l2_m2m_ioctl_streamon,
+       .vidioc_streamoff = v4l2_m2m_ioctl_streamoff,
+       .vidioc_log_status = v4l2_ctrl_log_status,
+
+       .vidioc_subscribe_event = vxe_subscribe_event,
+       .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
+       .vidioc_try_encoder_cmd = vxe_try_cmd,
+       .vidioc_encoder_cmd = vxe_cmd,
+
+       .vidioc_queryctrl = vxe_queryctrl,
+       .vidioc_query_ext_ctrl = vxe_query_ext_ctrl,
+       .vidioc_g_ext_ctrls = vxe_g_ext_ctrls,
+       .vidioc_s_ext_ctrls = vxe_s_ext_ctrls,
+       .vidioc_try_ext_ctrls = vxe_try_ext_ctrls,
+
+       .vidioc_enum_framesizes = vxe_enum_framesizes,
+       .vidioc_enum_frameintervals = vxe_enum_frameintervals,
+
+       .vidioc_g_parm = vxe_g_parm,
+       .vidioc_s_parm = vxe_s_parm,
+};
+
+static struct video_device vxe_enc_videodev = {
+       .name = IMG_VXE_ENC_MODULE_NAME,
+       .fops = &vxe_enc_fops,
+       .ioctl_ops = &vxe_enc_ioctl_ops,
+       .minor = -1,
+       .release = video_device_release,
+       .vfl_dir = VFL_DIR_M2M,
+};
+
+static const struct of_device_id vxe_enc_of_match[] = {
+       {.compatible = "img,vxe384"},   {/* end */},
+};
+MODULE_DEVICE_TABLE(of, vxe_enc_of_match);
+
+static osa_irqreturn_t soft_thread_irq(int32 irq, void *dev_data)
+{
+       osa_bool handled;
+       if (!dev_data)
+               return OSA_IRQ_NONE;
+
+       handled = topazdd_threaded_isr(dev_data);
+       if (handled)
+               return IRQ_HANDLED;
+
+       return IRQ_NONE;
+}
+
+static osa_irqreturn_t hard_isrcb(int32 irq, void *dev_data)
+{
+       if (!dev_data)
+               return OSA_IRQ_NONE;
+
+       return topazdd_isr(dev_data);
+}
+
+static int32 vxe_enc_probe(struct platform_device *pdev)
+{
+       struct vxe_dev *vxe;
+       struct resource *res;
+       const struct of_device_id *of_dev_id;
+       struct video_device *vfd;
+       int32 ret;
+       int32 module_irq;
+       struct vxe_enc_ctx *ctx;
+
+       of_dev_id = of_match_device(vxe_enc_of_match, &pdev->dev);
+       if (!of_dev_id) {
+               dev_err(&pdev->dev, "%s: Unable to match device\n", __func__);
+               return -ENODEV;
+       }
+
+       dma_set_mask(&pdev->dev, DMA_BIT_MASK(40));
+
+       vxe = devm_kzalloc(&pdev->dev, sizeof(*vxe), GFP_KERNEL);
+       if (!vxe)
+               return -ENOMEM;
+
+       vxe->dev = &pdev->dev;
+       vxe->plat_dev = pdev;
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       vxe->reg_base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(vxe->reg_base))
+               return PTR_ERR(vxe->reg_base);
+
+       module_irq = platform_get_irq(pdev, 0);
+       if (module_irq < 0)
+               return -ENXIO;
+       vxe->module_irq = module_irq;
+
+       ret = vxe_init_mem(vxe);
+       if (ret) {
+               dev_err(&pdev->dev, "Failed to initialize memory\n");
+               return -ENOMEM;
+       }
+
+       osa_mutex_create(&vxe->mutex);
+       if (NULL == vxe->mutex)
+               return OSA_ENOMEM;
+
+       platform_set_drvdata(pdev, vxe);
+
+       pm_runtime_enable(&pdev->dev);
+       ret = pm_runtime_get_sync(&pdev->dev);
+       if (ret < 0) {
+               dev_err(&pdev->dev, "%s: failed to enable clock, status = %d\n",
+                       __func__, ret);
+               goto exit;
+       }
+
+       ret = osa_devm_request_threaded_irq(&pdev->dev, module_irq, &hard_isrcb,
+                                       &soft_thread_irq, OSA_IRQF_SHARED,
+                                       IMG_VXE_ENC_MODULE_NAME, &vxe->topaz_dev_ctx);
+       if (ret) {
+               dev_err(&pdev->dev, "Failed to get IRQ\n");
+               goto out_put_sync;
+       }
+
+       ctx = osa_zalloc(sizeof(*ctx), OSA_GFP_KERNEL);
+       if (!ctx) {
+               free_irq(module_irq, &vxe->topaz_dev_ctx);
+               return -OSA_ENOMEM;
+       }
+       ctx->dev = vxe;
+
+       vxe_fill_default_params(ctx);
+
+       ctx->mem_ctx = vxe->mem_ctx;
+       ctx->mmu_ctx = vxe->mmu_ctx;
+
+       vxe->ctx = ctx;
+
+       ret = topazdd_init((uint64)vxe->reg_base, res->end - res->start + 1,
+                          (MMU_USE_MMU_FLAG | MMU_EXTENDED_ADDR_FLAG),
+                          ctx, vxe->ptd, &vxe->topaz_dev_ctx);
+       if (ret)
+               goto out_free_irq;
+
+       osa_idr_init(&vxe->streams);
+       if (NULL == vxe->streams) {
+               ret = OSA_ENOMEM;
+               goto topazdd_deinit;
+       }
+
+       ret = init_topaz_core(vxe->topaz_dev_ctx, &vxe->num_pipes,
+                             (MMU_USE_MMU_FLAG | MMU_EXTENDED_ADDR_FLAG),
+                             vxe_return_resource);
+       if (ret) {
+               OSA_DEV_ERR(&pdev->dev, "Failed to initialize topaz core\n");
+               goto topazdd_deinit;
+       }
+
+       ret = v4l2_device_register(&pdev->dev, &vxe->ti_vxe_dev);
+       if (ret){
+               OSA_DEV_ERR(&pdev->dev, "Failed to register v4l2 device\n");
+               goto topaz_core_deinit;
+       }
+
+       vfd = video_device_alloc();
+       if (!vfd) {
+               OSA_DEV_ERR(&pdev->dev, "Failed to allocate video device\n");
+               ret = -OSA_ENOMEM;
+               goto out_v4l2_device;
+       }
+
+       snprintf(vfd->name, sizeof(vfd->name), "%s", vxe_enc_videodev.name);
+       vxe->vfd = vfd;
+       *vfd = vxe_enc_videodev;
+       vfd->v4l2_dev = &vxe->ti_vxe_dev;
+       vfd->lock = vxe->mutex;
+
+       video_set_drvdata(vfd, vxe);
+
+       vxe->m2m_dev = v4l2_m2m_init(&m2m_ops);
+       if (OSA_IS_ERR(vxe->m2m_dev)) {
+               OSA_DEV_ERR(&pdev->dev, "Failed to init mem2mem device\n");
+               ret = -OSA_EINVAL;
+               goto out_vid_dev;
+       }
+
+       ret = video_register_device (vfd, VFL_TYPE_GRABBER, 0);
+       if (ret) {
+               OSA_DEV_ERR(&pdev->dev, "Failed to register video device\n");
+               goto out_vid_reg;
+       }
+       v4l2_info(&vxe->ti_vxe_dev, "encoder registered as /dev/video%d\n",
+                 vfd->num);
+
+       return 0;
+
+out_vid_reg:
+       v4l2_m2m_release(vxe->m2m_dev);
+out_vid_dev:
+       video_device_release(vfd);
+out_v4l2_device:
+       v4l2_device_unregister(&vxe->ti_vxe_dev);
+topaz_core_deinit:
+       deinit_topaz_core();
+topazdd_deinit:
+       topazdd_deinit(vxe->topaz_dev_ctx);
+out_free_irq:
+       osa_free(vxe->ctx);
+       free_irq(module_irq, &vxe->topaz_dev_ctx);
+out_put_sync:
+       pm_runtime_put_sync(&pdev->dev);
+
+exit:
+       pm_runtime_disable(&pdev->dev);
+       vxe_deinit_mem();
+
+       return ret;
+}
+
+static int32 vxe_enc_remove(struct platform_device *pdev)
+{
+       struct vxe_dev *vxe = platform_get_drvdata(pdev);
+
+       topazdd_deinit(vxe->topaz_dev_ctx);
+
+       osa_free(vxe->ctx);
+       vxe_deinit_mem();
+
+       free_irq(vxe->module_irq, &vxe->topaz_dev_ctx);
+
+       pm_runtime_put_sync(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
+
+       return 0;
+}
+
+static struct platform_driver vxe_enc_driver = {
+       .probe = vxe_enc_probe,
+       .remove = vxe_enc_remove,
+       .driver = {
+               .name = "img_enc",
+               .of_match_table = vxe_enc_of_match,
+       },
+};
+module_platform_driver(vxe_enc_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("IMG VXE384 video encoder driver");
diff --git a/linux/encoder/vxe_v4l2.h b/linux/encoder/vxe_v4l2.h
new file mode 100644 (file)
index 0000000..2ddf4ad
--- /dev/null
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * V4L2 interface header
+ *
+ * Copyright (c) Imagination Technologies Ltd.
+ * Copyright (c) 2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _VXE_V4L2_H
+#define _VXE_V4L2_H
+
+#include "osal/inc/osa_define.h"
+
+/*
+ * struct vxe_ctrl - contains info for each supported v4l2 control
+ */
+struct vxe_ctrl {
+       uint32 cid;
+       enum v4l2_ctrl_type type;
+       uint8 name[32];
+       int32 minimum;
+       int32 maximum;
+       int32 step;
+       int32 default_value;
+       osa_bool compound;
+};
+
+#endif
index fa8db9083ece9ed4cef3fed77d7576d8fdcf54ee..595faff9ebfc6d4abe49c84478472962748f42c8 100644 (file)
@@ -25,7 +25,7 @@
 #include <media/v4l2-device.h>
 #include <media/v4l2-mem2mem.h>
 
-#ifdef DEBUG_DECODER_DRIVER
+#if defined (DEBUG_DECODER_DRIVER) || defined (DEBUG_ENCODER_DRIVER)
 #define OSA_PR_INFO             pr_info
 #define OSA_PR_DEBUG            pr_debug
 #define OSA_DEV_INFO            dev_info
@@ -49,7 +49,7 @@
 #define OSA_DMA_BIDIRECTIONAL   DMA_BIDIRECTIONAL
 #define OSA_DUMP_STACK          dump_stack()
 
-#define MAX_PLANES             2
+#define MAX_PLANES             3
 
 #else
 
index 8fac98cf14d887fb5cd580557d81256164fa5423..97a371aa8b9f0c988f006d60a3100a0b8a0dcd97 100644 (file)
@@ -61,7 +61,7 @@ enum {
 
   typedef unsigned char                         osa_bool;
 
-  typedef struct v4l2_fh                               file_hndl;
+  typedef struct v4l2_fh                       file_hndl;
   typedef struct v4l2_m2m_buffer               m2m_buffer;
   typedef struct v4l2_m2m_dev                  m2m_dev;
   typedef struct v4l2_device                   ti_device;