1 /* 2 * Copyright (c) 2011 Intel Corporation. All Rights Reserved. 3 * Copyright (c) Imagination Technologies Limited, UK 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the 7 * "Software"), to deal in the Software without restriction, including 8 * without limitation the rights to use, copy, modify, merge, publish, 9 * distribute, sub license, and/or sell copies of the Software, and to 10 * permit persons to whom the Software is furnished to do so, subject to 11 * the following conditions: 12 * 13 * The above copyright notice and this permission notice (including the 14 * next paragraph) shall be included in all copies or substantial portions 15 * of the Software. 16 * 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 20 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 21 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 */ 25 26 27 #define F_MASK(basename) (MASK_##basename) 28 #define F_SHIFT(basename) (SHIFT_##basename) 29 30 #define F_ENCODE(val,basename) (((val)<<(F_SHIFT(basename)))&(F_MASK(basename))) 31 #define F_ENCODE_MVEA(val,basename) (((val)<<(F_SHIFT_MVEA(basename)))&(F_MASK_MVEA(basename))) 32 33 #define MVEA_LRB_SEARCH_HEIGHT 80 34 #define MVEA_LRB_TOP_OFFSET (((MVEA_LRB_SEARCH_HEIGHT/2)/16)*16) 35 36 37 #define F_MASK_MVEA(basename) (MASK_MVEA_##basename) /* MVEA */ 38 #define F_SHIFT_MVEA(basename) (SHIFT_MVEA_##basename) /* MVEA */ 39 40 41 #define MASK_MVEA_CR_IPE_GRID_FINE_SEARCH 0x00000C00 42 #define SHIFT_MVEA_CR_IPE_GRID_FINE_SEARCH 10 43 #define REGNUM_MVEA_CR_IPE_GRID_FINE_SEARCH 0x0200 44 45 46 #define MASK_MVEA_CR_IPE_GRID_SEARCH_SIZE 0x00000380 47 #define SHIFT_MVEA_CR_IPE_GRID_SEARCH_SIZE 7 48 #define REGNUM_MVEA_CR_IPE_GRID_SEARCH_SIZE 0x0200 49 50 51 #define MVEA_CR_IPE_CONTROL 0x0200 52 #define MASK_MVEA_CR_IPE_BLOCKSIZE 0x00000003 53 #define SHIFT_MVEA_CR_IPE_BLOCKSIZE 0 54 #define REGNUM_MVEA_CR_IPE_BLOCKSIZE 0x0200 55 56 57 58 #define MASK_MVEA_CR_IPE_ENCODING_FORMAT 0x00003000 59 #define SHIFT_MVEA_CR_IPE_ENCODING_FORMAT 12 60 #define REGNUM_MVEA_CR_IPE_ENCODING_FORMAT 0x0200 61 62 63 #define MASK_MVEA_CR_IPE_Y_CANDIDATE_NUM 0x0000003C 64 #define SHIFT_MVEA_CR_IPE_Y_CANDIDATE_NUM 2 65 #define REGNUM_MVEA_CR_IPE_Y_CANDIDATE_NUM 0x0200 66 67 68 #define MASK_MVEA_CR_IPE_Y_FINE_SEARCH 0x00000040 69 #define SHIFT_MVEA_CR_IPE_Y_FINE_SEARCH 6 70 #define REGNUM_MVEA_CR_IPE_Y_FINE_SEARCH 0x0200 71 72 #define MASK_MVEA_CR_JMCOMP_AC_ENABLE 0x00008000 73 #define SHIFT_MVEA_CR_JMCOMP_AC_ENABLE 15 74 #define REGNUM_MVEA_CR_JMCOMP_AC_ENABLE 0x0280 75 76 77 #define MB_START_OF_SLICE (1<<5) 78 #define MB_END_OF_SLICE (1<<4) 79 #define MB_END_OF_PICTURE (1<<6) 80 #define MB_END_OF_ROW (1<<7) 81 #define PARAMS_ABOVEL_VALID (1<<0) 82 #define PARAMS_ABOVE_VALID (1<<1) 83 #define PARAMS_ABOVER_VALID (1<<2) 84 #define PARAMS_LEFT_VALID (1<<3)#define VECTORS_ABOVE_LEFT_VALID (1<<0) 85 #define VECTORS_ABOVE_VALID (1<<1) 86 #define VECTORS_LEFT_VALID (1<<2) 87 #define VECTORS_BELOW_VALID (1<<4) 88 #define VECTORS_2BELOW_VALID (1<<5) 89 90 91 #define MVEA_CR_JMCOMP_CONTROL 0x0280 92 #define MASK_MVEA_CR_JMCOMP_MODE 0x00000003 93 #define SHIFT_MVEA_CR_JMCOMP_MODE 0 94 #define REGNUM_MVEA_CR_JMCOMP_MODE 0x0280 95 96 #define MASK_TOPAZ_VLC_CR_CODEC 0x00000003 97 #define SHIFT_TOPAZ_VLC_CR_CODEC 0 98 99 #define MASK_TOPAZ_VLC_CR_SLICE_CODING_TYPE 0x0000000C 100 #define SHIFT_TOPAZ_VLC_CR_SLICE_CODING_TYPE 2 101 102 103 104 105 106 107 108 109 110 111 112 113