OLD | NEW |
(Empty) | |
| 1 /* linux/arch/arm/mach-s5pv210/include/mach/regs-vprocessor.h |
| 2 * |
| 3 * Copyright (c) 2010 Samsung Electronics Co., Ltd. |
| 4 * http://www.samsung.com/ |
| 5 * |
| 6 * S5PV210 - Video Processor register header file for Samsung TVOut driver |
| 7 * |
| 8 * This program is free software; you can redistribute it and/or modify |
| 9 * it under the terms of the GNU General Public License version 2 as |
| 10 * published by the Free Software Foundation. |
| 11 */ |
| 12 |
| 13 #include <mach/map.h> |
| 14 |
| 15 #ifndef __ASM_ARCH_REGS_VPROCESSOR_H |
| 16 #define __ASM_ARCH_REGS_VPROCESSOR_H __FILE__ |
| 17 |
| 18 #define S5P_VPROCESSOR_BASE(x) (x) |
| 19 |
| 20 #define S5P_VP_ENABLE S5P_VPROCESSOR_BASE(0x0000) |
| 21 #define S5P_VP_SRESET S5P_VPROCESSOR_BASE(0x0004) |
| 22 #define S5P_VP_SHADOW_UPDATE S5P_VPROCESSOR_BASE(0x0008) |
| 23 #define S5P_VP_FIELD_ID S5P_VPROCESSOR_BASE(0x000C) |
| 24 #define S5P_VP_MODE S5P_VPROCESSOR_BASE(0x0010) |
| 25 #define S5P_VP_IMG_SIZE_Y S5P_VPROCESSOR_BASE(0x0014) |
| 26 #define S5P_VP_IMG_SIZE_C S5P_VPROCESSOR_BASE(0x0018) |
| 27 #define S5P_VP_PER_RATE_CTRL S5P_VPROCESSOR_BASE(0x001C) |
| 28 #define S5P_VP_TOP_Y_PTR S5P_VPROCESSOR_BASE(0x0028) |
| 29 #define S5P_VP_BOT_Y_PTR S5P_VPROCESSOR_BASE(0x002C) |
| 30 #define S5P_VP_TOP_C_PTR S5P_VPROCESSOR_BASE(0x0030) |
| 31 #define S5P_VP_BOT_C_PTR S5P_VPROCESSOR_BASE(0x0034) |
| 32 #define S5P_VP_ENDIAN_MODE S5P_VPROCESSOR_BASE(0x03CC) |
| 33 #define S5P_VP_SRC_H_POSITION S5P_VPROCESSOR_BASE(0x0044) |
| 34 #define S5P_VP_SRC_V_POSITION S5P_VPROCESSOR_BASE(0x0048) |
| 35 #define S5P_VP_SRC_WIDTH S5P_VPROCESSOR_BASE(0x004C) |
| 36 #define S5P_VP_SRC_HEIGHT S5P_VPROCESSOR_BASE(0x0050) |
| 37 #define S5P_VP_DST_H_POSITION S5P_VPROCESSOR_BASE(0x0054) |
| 38 #define S5P_VP_DST_V_POSITION S5P_VPROCESSOR_BASE(0x0058) |
| 39 #define S5P_VP_DST_WIDTH S5P_VPROCESSOR_BASE(0x005C) |
| 40 #define S5P_VP_DST_HEIGHT S5P_VPROCESSOR_BASE(0x0060) |
| 41 #define S5P_VP_H_RATIO S5P_VPROCESSOR_BASE(0x0064) |
| 42 #define S5P_VP_V_RATIO S5P_VPROCESSOR_BASE(0x0068) |
| 43 #define S5P_VP_POLY8_Y0_LL S5P_VPROCESSOR_BASE(0x006C) |
| 44 #define S5P_VP_POLY8_Y0_LH S5P_VPROCESSOR_BASE(0x0070) |
| 45 #define S5P_VP_POLY8_Y0_HL S5P_VPROCESSOR_BASE(0x0074) |
| 46 #define S5P_VP_POLY8_Y0_HH S5P_VPROCESSOR_BASE(0x0078) |
| 47 #define S5P_VP_POLY8_Y1_LL S5P_VPROCESSOR_BASE(0x007C) |
| 48 #define S5P_VP_POLY8_Y1_LH S5P_VPROCESSOR_BASE(0x0080) |
| 49 #define S5P_VP_POLY8_Y1_HL S5P_VPROCESSOR_BASE(0x0084) |
| 50 #define S5P_VP_POLY8_Y1_HH S5P_VPROCESSOR_BASE(0x0088) |
| 51 #define S5P_VP_POLY8_Y2_LL S5P_VPROCESSOR_BASE(0x008C) |
| 52 #define S5P_VP_POLY8_Y2_LH S5P_VPROCESSOR_BASE(0x0090) |
| 53 #define S5P_VP_POLY8_Y2_HL S5P_VPROCESSOR_BASE(0x0094) |
| 54 #define S5P_VP_POLY8_Y2_HH S5P_VPROCESSOR_BASE(0x0098) |
| 55 #define S5P_VP_POLY8_Y3_LL S5P_VPROCESSOR_BASE(0x009C) |
| 56 #define S5P_VP_POLY8_Y3_LH S5P_VPROCESSOR_BASE(0x00A0) |
| 57 #define S5P_VP_POLY8_Y3_HL S5P_VPROCESSOR_BASE(0x00A4) |
| 58 #define S5P_VP_POLY8_Y3_HH S5P_VPROCESSOR_BASE(0x00A8) |
| 59 #define S5P_VP_POLY4_Y0_LL S5P_VPROCESSOR_BASE(0x00EC) |
| 60 #define S5P_VP_POLY4_Y0_LH S5P_VPROCESSOR_BASE(0x00F0) |
| 61 #define S5P_VP_POLY4_Y0_HL S5P_VPROCESSOR_BASE(0x00F4) |
| 62 #define S5P_VP_POLY4_Y0_HH S5P_VPROCESSOR_BASE(0x00F8) |
| 63 #define S5P_VP_POLY4_Y1_LL S5P_VPROCESSOR_BASE(0x00FC) |
| 64 #define S5P_VP_POLY4_Y1_LH S5P_VPROCESSOR_BASE(0x0100) |
| 65 #define S5P_VP_POLY4_Y1_HL S5P_VPROCESSOR_BASE(0x0104) |
| 66 #define S5P_VP_POLY4_Y1_HH S5P_VPROCESSOR_BASE(0x0108) |
| 67 #define S5P_VP_POLY4_Y2_LL S5P_VPROCESSOR_BASE(0x010C) |
| 68 #define S5P_VP_POLY4_Y2_LH S5P_VPROCESSOR_BASE(0x0110) |
| 69 #define S5P_VP_POLY4_Y2_HL S5P_VPROCESSOR_BASE(0x0114) |
| 70 #define S5P_VP_POLY4_Y2_HH S5P_VPROCESSOR_BASE(0x0118) |
| 71 #define S5P_VP_POLY4_Y3_LL S5P_VPROCESSOR_BASE(0x011C) |
| 72 #define S5P_VP_POLY4_Y3_LH S5P_VPROCESSOR_BASE(0x0120) |
| 73 #define S5P_VP_POLY4_Y3_HL S5P_VPROCESSOR_BASE(0x0124) |
| 74 #define S5P_VP_POLY4_Y3_HH S5P_VPROCESSOR_BASE(0x0128) |
| 75 #define S5P_VP_POLY4_C0_LL S5P_VPROCESSOR_BASE(0x012C) |
| 76 #define S5P_VP_POLY4_C0_LH S5P_VPROCESSOR_BASE(0x0130) |
| 77 #define S5P_VP_POLY4_C0_HL S5P_VPROCESSOR_BASE(0x0134) |
| 78 #define S5P_VP_POLY4_C0_HH S5P_VPROCESSOR_BASE(0x0138) |
| 79 #define S5P_VP_POLY4_C1_LL S5P_VPROCESSOR_BASE(0x013C) |
| 80 #define S5P_VP_POLY4_C1_LH S5P_VPROCESSOR_BASE(0x0140) |
| 81 #define S5P_VP_POLY4_C1_HL S5P_VPROCESSOR_BASE(0x0144) |
| 82 #define S5P_VP_POLY4_C1_HH S5P_VPROCESSOR_BASE(0x0148) |
| 83 #define S5P_PP_CSC_Y2Y_COEF S5P_VPROCESSOR_BASE(0x01D4) |
| 84 #define S5P_PP_CSC_CB2Y_COEF S5P_VPROCESSOR_BASE(0x01D8) |
| 85 #define S5P_PP_CSC_CR2Y_COEF S5P_VPROCESSOR_BASE(0x01DC) |
| 86 #define S5P_PP_CSC_Y2CB_COEF S5P_VPROCESSOR_BASE(0x01E0) |
| 87 #define S5P_PP_CSC_CB2CB_COEF S5P_VPROCESSOR_BASE(0x01E4) |
| 88 #define S5P_PP_CSC_CR2CB_COEF S5P_VPROCESSOR_BASE(0x01E8) |
| 89 #define S5P_PP_CSC_Y2CR_COEF S5P_VPROCESSOR_BASE(0x01EC) |
| 90 #define S5P_PP_CSC_CB2CR_COEF S5P_VPROCESSOR_BASE(0x01F0) |
| 91 #define S5P_PP_CSC_CR2CR_COEF S5P_VPROCESSOR_BASE(0x01F4) |
| 92 #define S5P_PP_BYPASS S5P_VPROCESSOR_BASE(0x0200) |
| 93 #define S5P_PP_SATURATION S5P_VPROCESSOR_BASE(0x020C) |
| 94 #define S5P_PP_SHARPNESS S5P_VPROCESSOR_BASE(0x0210) |
| 95 #define S5P_PP_LINE_EQ0 S5P_VPROCESSOR_BASE(0x0218) |
| 96 #define S5P_PP_LINE_EQ1 S5P_VPROCESSOR_BASE(0x021C) |
| 97 #define S5P_PP_LINE_EQ2 S5P_VPROCESSOR_BASE(0x0220) |
| 98 #define S5P_PP_LINE_EQ3 S5P_VPROCESSOR_BASE(0x0224) |
| 99 #define S5P_PP_LINE_EQ4 S5P_VPROCESSOR_BASE(0x0228) |
| 100 #define S5P_PP_LINE_EQ5 S5P_VPROCESSOR_BASE(0x022C) |
| 101 #define S5P_PP_LINE_EQ6 S5P_VPROCESSOR_BASE(0x0230) |
| 102 #define S5P_PP_LINE_EQ7 S5P_VPROCESSOR_BASE(0x0234) |
| 103 #define S5P_PP_BRIGHT_OFFSET S5P_VPROCESSOR_BASE(0x0238) |
| 104 #define S5P_PP_CSC_EN S5P_VPROCESSOR_BASE(0x023C) |
| 105 #define S5P_VP_VERSION_INFO S5P_VPROCESSOR_BASE(0x03FC) |
| 106 |
| 107 #define S5P_VP_FIELD_ID_S S5P_VPROCESSOR_BASE(0x016C) |
| 108 #define S5P_VP_MODE_S S5P_VPROCESSOR_BASE(0x0170) |
| 109 #define S5P_VP_IMG_SIZE_Y_S S5P_VPROCESSOR_BASE(0x0174) |
| 110 #define S5P_VP_IMG_SIZE_C_S S5P_VPROCESSOR_BASE(0x0178) |
| 111 #define S5P_VP_TOP_Y_PTR_S S5P_VPROCESSOR_BASE(0x0190) |
| 112 #define S5P_VP_BOT_Y_PTR_S S5P_VPROCESSOR_BASE(0x0194) |
| 113 #define S5P_VP_TOP_C_PTR_S S5P_VPROCESSOR_BASE(0x0198) |
| 114 #define S5P_VP_BOT_C_PTR_S S5P_VPROCESSOR_BASE(0x019C) |
| 115 #define S5P_VP_ENDIAN_MODE_S S5P_VPROCESSOR_BASE(0x03EC) |
| 116 #define S5P_VP_SRC_H_POSITION_S S5P_VPROCESSOR_BASE(0x01AC) |
| 117 #define S5P_VP_SRC_V_POSITION_S S5P_VPROCESSOR_BASE(0x01B0) |
| 118 #define S5P_VP_SRC_WIDTH_S S5P_VPROCESSOR_BASE(0x01B4) |
| 119 #define S5P_VP_SRC_HEIGHT_S S5P_VPROCESSOR_BASE(0x01B8) |
| 120 #define S5P_VP_DST_H_POSITION_S S5P_VPROCESSOR_BASE(0x01BC) |
| 121 #define S5P_VP_DST_V_POSITION_S S5P_VPROCESSOR_BASE(0x01C0) |
| 122 #define S5P_VP_DST_WIDTH_S S5P_VPROCESSOR_BASE(0x01C4) |
| 123 #define S5P_VP_DST_HEIGHT_S S5P_VPROCESSOR_BASE(0x01C8) |
| 124 #define S5P_VP_H_RATIO_S S5P_VPROCESSOR_BASE(0x01CC) |
| 125 #define S5P_VP_V_RATIO_S S5P_VPROCESSOR_BASE(0x01D0) |
| 126 #define S5P_PP_BYPASS_S S5P_VPROCESSOR_BASE(0x0258) |
| 127 #define S5P_PP_SATURATION_S S5P_VPROCESSOR_BASE(0x025C) |
| 128 #define S5P_PP_SHARPNESS_S S5P_VPROCESSOR_BASE(0x0260) |
| 129 #define S5P_PP_LINE_EQ0_S S5P_VPROCESSOR_BASE(0x0268) |
| 130 #define S5P_PP_LINE_EQ1_S S5P_VPROCESSOR_BASE(0x026C) |
| 131 #define S5P_PP_LINE_EQ2_S S5P_VPROCESSOR_BASE(0x0270) |
| 132 #define S5P_PP_LINE_EQ3_S S5P_VPROCESSOR_BASE(0x0274) |
| 133 #define S5P_PP_LINE_EQ4_S S5P_VPROCESSOR_BASE(0x0278) |
| 134 #define S5P_PP_LINE_EQ5_S S5P_VPROCESSOR_BASE(0x027C) |
| 135 #define S5P_PP_LINE_EQ6_S S5P_VPROCESSOR_BASE(0x0280) |
| 136 #define S5P_PP_LINE_EQ7_S S5P_VPROCESSOR_BASE(0x0284) |
| 137 #define S5P_PP_BRIGHT_OFFSET_S S5P_VPROCESSOR_BASE(0x0288) |
| 138 #define S5P_PP_CSC_EN_S S5P_VPROCESSOR_BASE(0x028C) |
| 139 #define S5P_PP_CSC_Y2Y_COEF_S S5P_VPROCESSOR_BASE(0x0290) |
| 140 #define S5P_PP_CSC_CB2Y_COEF_S S5P_VPROCESSOR_BASE(0x0294) |
| 141 #define S5P_PP_CSC_CR2Y_COEF_S S5P_VPROCESSOR_BASE(0x0298) |
| 142 #define S5P_PP_CSC_Y2CB_COEF_S S5P_VPROCESSOR_BASE(0x029C) |
| 143 #define S5P_PP_CSC_CB2CB_COEF_S S5P_VPROCESSOR_BASE(0x02A0) |
| 144 #define S5P_PP_CSC_CR2CB_COEF_S S5P_VPROCESSOR_BASE(0x02A4) |
| 145 #define S5P_PP_CSC_Y2CR_COEF_S S5P_VPROCESSOR_BASE(0x02A8) |
| 146 #define S5P_PP_CSC_CB2CR_COEF_S S5P_VPROCESSOR_BASE(0x02AC) |
| 147 #define S5P_PP_CSC_CR2CR_COEF_S S5P_VPROCESSOR_BASE(0x02B0) |
| 148 |
| 149 #define S5P_VP_ENABLE_ON (1<<0) |
| 150 #define S5P_VP_ENABLE_ON_S (1<<2) |
| 151 |
| 152 #define S5P_VP_SRESET_LAST_COMPLETE (0<<0) |
| 153 #define S5P_VP_SRESET_PROCESSING (1<<0) |
| 154 |
| 155 #define S5P_VP_SHADOW_UPDATE_DISABLE (0<<0) |
| 156 #define S5P_VP_SHADOW_UPDATE_ENABLE (1<<0) |
| 157 |
| 158 #define S5P_VP_FIELD_ID_TOP (0<<0) |
| 159 #define S5P_VP_FIELD_ID_BOTTOM (1<<0) |
| 160 |
| 161 #define S5P_VP_MODE_2D_IPC_ENABLE (1<<1) |
| 162 #define S5P_VP_MODE_2D_IPC_DISABLE (0<<1) |
| 163 #define S5P_VP_MODE_FIELD_ID_MAN_TOGGLING (0<<2) |
| 164 #define S5P_VP_MODE_FIELD_ID_AUTO_TOGGLING (1<<2) |
| 165 #define S5P_VP_MODE_CROMA_EXPANSION_C_TOP_PTR (0<<3) |
| 166 #define S5P_VP_MODE_CROMA_EXPANSION_C_TOPBOTTOM_PTR (1<<3) |
| 167 #define S5P_VP_MODE_MEM_MODE_LINEAR (0<<4) |
| 168 #define S5P_VP_MODE_MEM_MODE_2D_TILE (1<<4) |
| 169 #define S5P_VP_MODE_LINE_SKIP_OFF (0<<5) |
| 170 #define S5P_VP_MODE_LINE_SKIP_ON (1<<5) |
| 171 |
| 172 #define S5P_VP_ENDIAN_MODE_BIG (0<<0) |
| 173 #define S5P_VP_ENDIAN_MODE_LITTLE (1<<0) |
| 174 |
| 175 #define VP_ON_SW_RESET (1<<2) |
| 176 #define VP_POWER_DOWN_RDY (1<<1) |
| 177 #define VP_ON_ENABLE (1<<0) |
| 178 #define VP_ON_DISABLE (0<<0) |
| 179 |
| 180 #define VP_SOFT_RESET (1<<0) |
| 181 |
| 182 #define VP_SHADOW_UPDATE_ENABLE (1<<0) |
| 183 #define VP_SHADOW_UPDATE_DISABLE (0<<0) |
| 184 |
| 185 #define VP_FIELD_ID_BOTTOM (1<<0) |
| 186 #define VP_FIELD_ID_TOP (0<<0) |
| 187 |
| 188 #define VP_LINE_SKIP_ON (1<<5) |
| 189 #define VP_LINE_SKIP_OFF (0<<5) |
| 190 #define VP_MEM_2D_MODE (1<<4) |
| 191 #define VP_MEM_LINEAR_MODE (0<<4) |
| 192 #define VP_CHROMA_USE_TOP_BOTTOM (1<<3) |
| 193 #define VP_CHROMA_USE_TOP (0<<3) |
| 194 #define VP_FIELD_ID_TOGGLE_VSYNC (1<<2) |
| 195 #define VP_FIELD_ID_TOGGLE_USER (0<<2) |
| 196 #define VP_2D_IPC_ON (1<<1) |
| 197 #define VP_2D_IPC_OFF (0<<1) |
| 198 |
| 199 #define VP_IMG_HSIZE(x) ((0x3fff&x)<<16) |
| 200 #define VP_IMG_VSIZE(x) ((0x3fff&x)<<0) |
| 201 #define VP_IMG_SIZE_ILLEGAL(x) (0x7&x) |
| 202 |
| 203 #define VP_PEL_RATE_CTRL(x) ((0x3&x)<<0) |
| 204 |
| 205 #define VP_PTR_ILLEGAL(x) (0x7&x) |
| 206 |
| 207 #define VP_LITTLE_ENDIAN_MODE (1<<0) |
| 208 #define VP_BIG_ENDIAN_MODE (0<<0) |
| 209 |
| 210 #define VP_SRC_H_POSITION(x) ((0x7ff&x)<<4) |
| 211 #define VP_SRC_X_FRACT_STEP(x) (0xf&x) |
| 212 |
| 213 #define VP_SRC_V_POSITION(x) (0x7ff&x) |
| 214 |
| 215 #define VP_SRC_WIDTH(x) (0x7ff&x) |
| 216 #define VP_SRC_HEIGHT(x) (0x7ff&x) |
| 217 #define VP_DST_H_POSITION(x) (0x7ff&x) |
| 218 #define VP_DST_V_POSITION(x) (0x7ff&x) |
| 219 #define VP_DST_WIDTH(x) (0x7ff&x) |
| 220 #define VP_DST_HEIGHT(x) (0x7ff&x) |
| 221 #define VP_H_RATIO(x) (0x7ffff&x) |
| 222 #define VP_V_RATIO(x) (0x7ffff&x) |
| 223 |
| 224 #define VP_POLY8_Y0_x0(x) ((0x7&x)<<24) |
| 225 #define VP_POLY8_Y0_x1(x) ((0x7&x)<<16) |
| 226 #define VP_POLY8_Y0_x2(x) ((0x7&x)<<8) |
| 227 #define VP_POLY8_Y0_x3(x) ((0x7&x)<<0) |
| 228 |
| 229 #define VP_POLY8_Y1_x0(x) ((0x1f&x)<<24) |
| 230 #define VP_POLY8_Y1_x1(x) ((0x1f&x)<<16) |
| 231 #define VP_POLY8_Y1_x2(x) ((0x1f&x)<<8) |
| 232 #define VP_POLY8_Y1_x3(x) ((0x1f&x)<<0) |
| 233 |
| 234 #define VP_POLY8_Y2_x0(x) ((0x7f&x)<<24) |
| 235 #define VP_POLY8_Y2_x1(x) ((0x7f&x)<<16) |
| 236 #define VP_POLY8_Y2_x2(x) ((0x7f&x)<<8) |
| 237 #define VP_POLY8_Y2_x3(x) ((0x7f&x)<<0) |
| 238 |
| 239 #define VP_POLY8_Y3_x0(x) ((0x7f&x)<<24) |
| 240 #define VP_POLY8_Y3_x1(x) ((0x7f&x)<<16) |
| 241 #define VP_POLY8_Y3_x2(x) ((0x7f&x)<<8) |
| 242 #define VP_POLY8_Y3_x3(x) ((0x7f&x)<<0) |
| 243 |
| 244 #define VP_POLY4_Y0_x0(x) ((0x3f&x)<<24) |
| 245 #define VP_POLY4_Y0_x1(x) ((0x3f&x)<<16) |
| 246 #define VP_POLY4_Y0_x2(x) ((0x3f&x)<<8) |
| 247 #define VP_POLY4_Y0_x3(x) ((0x3f&x)<<0) |
| 248 |
| 249 #define VP_POLY4_Y1_x0(x) ((0x7f&x)<<24) |
| 250 #define VP_POLY4_Y1_x1(x) ((0x7f&x)<<16) |
| 251 #define VP_POLY4_Y1_x2(x) ((0x7f&x)<<8) |
| 252 #define VP_POLY4_Y1_x3(x) ((0x7f&x)<<0) |
| 253 |
| 254 #define VP_POLY4_Y2_x0(x) ((0x7f&x)<<24) |
| 255 #define VP_POLY4_Y2_x1(x) ((0x7f&x)<<16) |
| 256 #define VP_POLY4_Y2_x2(x) ((0x7f&x)<<8) |
| 257 #define VP_POLY4_Y2_x3(x) ((0x7f&x)<<0) |
| 258 |
| 259 #define VP_POLY4_Y3_x0(x) ((0x3f&x)<<24) |
| 260 #define VP_POLY4_Y3_x1(x) ((0x3f&x)<<16) |
| 261 #define VP_POLY4_Y3_x2(x) ((0x3f&x)<<8) |
| 262 #define VP_POLY4_Y3_x3(x) ((0x3f&x)<<0) |
| 263 |
| 264 #define VP_POLY4_C0_PH0(x) ((0x7f&x)<<24) |
| 265 #define VP_POLY4_C0_PH1(x) ((0x7f&x)<<16) |
| 266 #define VP_POLY4_C0_PH2(x) ((0x7f&x)<<8) |
| 267 #define VP_POLY4_C0_PH3(x) ((0x7f&x)<<0) |
| 268 |
| 269 #define VP_POLY4_C0_PH4(x) ((0x3f&x)<<24) |
| 270 #define VP_POLY4_C0_PH5(x) ((0x3f&x)<<16) |
| 271 #define VP_POLY4_C0_PH6(x) ((0x3f&x)<<8) |
| 272 #define VP_POLY4_C0_PH7(x) ((0x3f&x)<<0) |
| 273 |
| 274 #define VP_POLY4_C0_PH8(x) ((0x3f&x)<<24) |
| 275 #define VP_POLY4_C0_PH9(x) ((0x3f&x)<<16) |
| 276 #define VP_POLY4_C0_PH10(x) ((0x3f&x)<<8) |
| 277 #define VP_POLY4_C0_PH11(x) ((0x3f&x)<<0) |
| 278 |
| 279 #define VP_POLY4_C0_PH12(x) ((0x1f&x)<<24) |
| 280 #define VP_POLY4_C0_PH13(x) ((0x1f&x)<<16) |
| 281 #define VP_POLY4_C0_PH14(x) ((0x1f&x)<<8) |
| 282 #define VP_POLY4_C0_PH15(x) ((0x1f&x)<<0) |
| 283 |
| 284 #define VP_POLY4_C1_PH0(x) ((0xff&x)<<24) |
| 285 #define VP_POLY4_C1_PH1(x) ((0xff&x)<<16) |
| 286 #define VP_POLY4_C1_PH2(x) ((0xff&x)<<8) |
| 287 #define VP_POLY4_C1_PH3(x) ((0xff&x)<<0) |
| 288 |
| 289 #define VP_POLY4_C1_PH4(x) ((0xff&x)<<24) |
| 290 #define VP_POLY4_C1_PH5(x) ((0xff&x)<<16) |
| 291 #define VP_POLY4_C1_PH6(x) ((0xff&x)<<8) |
| 292 #define VP_POLY4_C1_PH7(x) ((0xff&x)<<0) |
| 293 |
| 294 #define VP_POLY4_C1_PH8(x) ((0xff&x)<<24) |
| 295 #define VP_POLY4_C1_PH9(x) ((0xff&x)<<16) |
| 296 #define VP_POLY4_C1_PH10(x) ((0xff&x)<<8) |
| 297 #define VP_POLY4_C1_PH11(x) ((0xff&x)<<0) |
| 298 |
| 299 #define VP_POLY4_C1_PH12(x) ((0x7f&x)<<24) |
| 300 #define VP_POLY4_C1_PH13(x) ((0x7f&x)<<16) |
| 301 #define VP_POLY4_C1_PH14(x) ((0x7f&x)<<8) |
| 302 #define VP_POLY4_C1_PH15(x) ((0x7f&x)<<0) |
| 303 |
| 304 #define VP_CSC_COEF(x) (0xfff&x) |
| 305 |
| 306 #define VP_BY_PASS_ENABLE (0) |
| 307 #define VP_BY_PASS_DISABLE (1) |
| 308 |
| 309 #define VP_SATURATION(x) (0xff&x) |
| 310 |
| 311 #define VP_TH_HNOISE(x) ((0xf&x)<<8) |
| 312 #define VP_SHARPNESS(x) (0x3&x) |
| 313 |
| 314 #define VP_LINE_INTC(x) ((0xffff&x)<<8) |
| 315 #define VP_LINE_SLOPE(x) (0xff&x) |
| 316 #define VP_LINE_INTC_CLEAR(x) (~(0xffff<<8)&x) |
| 317 #define VP_LINE_SLOPE_CLEAR(x) (~0xff&x) |
| 318 |
| 319 #define VP_BRIGHT_OFFSET(x) (0x1ff&x) |
| 320 |
| 321 #define VP_SUB_Y_OFFSET_ENABLE (1<<1) |
| 322 #define VP_SUB_Y_OFFSET_DISABLE (0<<1) |
| 323 #define VP_CSC_ENABLE (1) |
| 324 #define VP_CSC_DISABLE (0) |
| 325 |
| 326 static unsigned int g_vp_contrast_brightness; |
| 327 |
| 328 /* |
| 329 * Ref. to VP manual p37-39 |
| 330 * [11] : sign bit, [10] : integer bit, [9:0] : fraction bit |
| 331 * CSC from BT.601(SD) to BT.709(HD) |
| 332 */ |
| 333 #define Y2Y_COEF_601_TO_709 0x400 /* 1.0 */ |
| 334 #define CB2Y_COEF_601_TO_709 0x879 /* about -0.118188 */ |
| 335 #define CR2Y_COEF_601_TO_709 0x8d9 /* about -0.212685 */ |
| 336 |
| 337 #define Y2CB_COEF_601_TO_709 0x0 /* 0 */ |
| 338 #define CB2CB_COEF_601_TO_709 0x413 /* about 1.018640 */ |
| 339 #define CR2CB_COEF_601_TO_709 0x875 /* about -0.114618 */ |
| 340 |
| 341 #define Y2CR_COEF_601_TO_709 0x0 |
| 342 #define CB2CR_COEF_601_TO_709 0x04d /* about 0.075049 */ |
| 343 #define CR2CR_COEF_601_TO_709 0x41a /* about 1.025327 */ |
| 344 |
| 345 #define Y2Y_COEF_709_TO_601 0x400 |
| 346 #define CB2Y_COEF_709_TO_601 0x068 /* about 0.101579 */ |
| 347 #define CR2Y_COEF_709_TO_601 0x0c9 /* about 0.196076 */ |
| 348 |
| 349 #define Y2CB_COEF_709_TO_601 0x0 |
| 350 #define CB2CB_COEF_709_TO_601 0x3f6 /* about 0.989854 */ |
| 351 #define CR2CB_COEF_709_TO_601 0x871 /* about -0.110653 */ |
| 352 |
| 353 #define Y2CR_COEF_709_TO_601 0x0 |
| 354 #define CB2CR_COEF_709_TO_601 0x84a /* about -0.072453 */ |
| 355 #define CR2CR_COEF_709_TO_601 0xbef /* about -0.983398 */ |
| 356 |
| 357 #define TILE_WIDTH 0x40 |
| 358 #define MAX_NUM_OF_FRM 34 /* according to MFC */ |
| 359 |
| 360 #endif /* __ASM_ARCH_REGS_VPROCESSOR_H */ |
OLD | NEW |