⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipipe_param_header.h

📁 德州仪器新推出的达芬奇技术dm355的源代码
💻 H
字号:
/*
 * 
 *
 * Copyright (C) 2005 Texas Instruments Inc
 *
 * 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; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
/* dm350_ipipe_QVGAMode.h file */

//#ifndef DM350_IPIPE_QVGAMODE_H
//#define DM350_IPIPE_QVGAMODE_H
/* structure for all configurations */ 
//#define  O_WIDTH 640
//#define  O_HEIGHT 420
#define  I_WIDTH 624	 
#define  I_HEIGHT 456 
#define  O_WIDTH 640	
#define  O_HEIGHT 480
/*static int thrTableNormal[] = {
  #include "nsf_thr_table_ISO100.h"
};

static int  strTableNormal[] ={
 #include "nsf_str_table_ISO100.h"
};*/

static int yeeTable[] = {
  #include "edgeEnhanceTable.h"
};
static int NoiseFilterTHR[] = {
  #include "NoiseFiltThr.h"
};
static int NoiseFilterSTR[] = {
  #include "NoiseFiltStr.h"
};
static int GammaTableall[] = {
 #include "gammaTable.h"
};
struct ipipe_params params = {
	.ipipeif_param = {
				/*IPPEIF config register*/
				.data_shift = BITS13_0,
				.clock_select = SDRAM_CLK,
		
				.ialaw = ALAW_OFF,
				.pack_mode = SIXTEEN_BIT,
				.avg_filter = AVG_OFF,
				.clk_div = DIVIDE_SIXTH,	
				.source = SDRAM_RAW,
				.decimation = DECIMATION_OFF,
				.mode = ONE_SHOT,
	
				.glob_hor_size = I_WIDTH + 8,//632,
				.glob_ver_size = I_HEIGHT + 10,//466,
				.hnum = I_WIDTH,
				.vnum = I_HEIGHT, 
				.adofs = I_WIDTH * 2,
				.rsz = 16,   /* resize ratio = 16/rsz: valid range (16-112) */
				.gain = 0x3FF    /* (precision is U10Q9) */ 
			},
	.ipipe_mode = ONE_SHOT,
	/*input/output datapath register*/
	.ipipe_dpaths_fmt = RAW2YUV,
	.ipipe_dpaths_bypass = RAW_MODE_OFF,//...check 
	
	/*color pattern register*/
	.ipipe_colpat_elep = GREEN_BLUE,
        .ipipe_colpat_elop = BLUE,
        .ipipe_colpat_olep = RED,
        .ipipe_colpat_olop = GREEN_RED,

	/*horizontal/vertical start, horizontal/vertical size*/
	.ipipe_vst = 1,
	.ipipe_vsz = I_HEIGHT - 1,//456 - 1,
	.ipipe_hst = 0,//check
	.ipipe_hsz =  I_WIDTH - 1,//624 - 1,
	/*interupt generation after lines*/
	
	.def_cor = {	.dfc_en	= ENABLE, 
			.dfc_sel = 0,
			//.dfc_adr = 0,
			.dfc_siz = 4,
			.dfc_table =(unsigned int*) yeeTable//for testing
		   },
	.prog_nf = {
			.noise_fil_en = ENABLE,
		        .d2f_cfg_spr = 0,
		        .d2f_cfg_shf = 0,
		        .type = 0,
		        .d2f_thr =(unsigned int *)NoiseFilterTHR ,
		        .d2f_str =(unsigned int *)NoiseFilterSTR 
		   },
	.prefilter = {
		     	.pre_en = ENABLE,
		        .sel_0 = 1,//AVG2MEDPIX,
		        .sel_1 = 1,
		        .typ_adaptive = ENABLE,
		        .typ_adaptive_dotred = DISABLE,
		        .pre_shf = 9,
		        .pre_gain = 128,
		        .pre_thr_g = 500,
		        .pre_thr_b = 4096,
		        .pre_thr_1 = 800
		     }, 
	.wb = 	   {
			.wb2_dgn  = 512,//512,//1023,//256,
		        .wb2_wg_r = 444,
		        .wb2_wg_gr= 256,
		        .wb2_wg_gb= 256,
		        .wb2_wg_b = 568//428
		   }, 	
	.rgb2rgb = {
			 .rgb_mul_rr = 0x016c,
		         .rgb_mul_gr = 0x0FA4,
			 .rgb_mul_br = 0x0FF1,
		         .rgb_mul_rg = 0x0FD2,
		         .rgb_mul_gg = 0x013D,
		         .rgb_mul_bg = 0x0FF1,
		         .rgb_mul_rb = 0x0FD2,
		         .rgb_mul_gb = 0x0FA4,
		         .rgb_mul_bb = 0x018A,
		         .rgb_oft_or = 0x0000,
			 .rgb_oft_og = 0x0000,
		         .rgb_oft_ob = 0x0000,
		         .gmm_cfg_bypr = GC_BYPASS,
		         .gmm_cfg_bypg = GC_BYPASS,
			 .gmm_cfg_bypb = GC_BYPASS,
		         .gmm_cfg_tbl  = IPIPE_RAM,
		         .gmm_cfg_siz =  IPIPE_512,
		         .gmm_tbl_r = NULL,
		         .gmm_tbl_b = NULL,
		         .gmm_tbl_g = NULL,
		         .gmm_tbl_all = (unsigned int *)GammaTableall 

		   },
	.rgb2yuv = {	
			/* RDRV_IPIPE__SAT_LOW */
			.yuv_adj_ctr = 0x10,
		        .yuv_adj_brt = 0x00,

		        .yuv_mul_ry  = 0x004d,
		        .yuv_mul_gy  = 0x0096,
		        .yuv_mul_by  = 0x001d,
		        .yuv_mul_rcb = 0x03d4,
		        .yuv_mul_gcb = 0x03ac,
		        .yuv_mul_bcb = 0x0080,
		        .yuv_mul_rcr = 0x0080,
		        .yuv_mul_gcr = 0x0395,
		        .yuv_mul_bcr = 0x03eb,
		        .yuv_oft_y   = 0x00,
		        .yuv_oft_cb  = 0x80,
		        .yuv_oft_cr  = 0x80,
		        .yuv_y_min   = 0,
		        .yuv_y_max   = 0xFF,
		        .yuv_c_min   = 0,
		        .yuv_c_max   = 0xFF,
		        .yuv_phs_lpf = DISABLE,
		        .yuv_phs_position =  1,//0

		   }, 
 	.edge_enhancer = {
			    
		 	        .yee_en =  ENABLE,        
			        .yee_emf = ENABLE,       
			        .yee_shf = 4,            // HPF Down Shift Value: valid range (0-15) 
				.yee_mul_00 = 48,
			        .yee_mul_01 = 12,
			        .yee_mul_02 = 1014,
			        .yee_mul_10 = 12,
			        .yee_mul_11 = 0,
			        .yee_mul_12 = 1018,
			        .yee_mul_20 = 1014,
			        .yee_mul_21 = 1018,
			        .yee_mul_22 = 1022,
			        .ee_table = (unsigned int*) yeeTable
			    
			 }, 	
	.false_color_suppresion = {
	  			     .fcs_en = ENABLE, // Uint8 csupEnable
				     .fcs_typ_typ = 0,
				     .fcs_shf_y = 0,
				     .fcs_shf_c = 7,
				     .fcs_thr = 235,
				     .fcs_sgn = 0,
				     .fcs_lth = 0 
				  },	
	.rsz_seq_seq = DISABLE,
	.rsz_seq_tmm = DISABLE,//output confined mode (normal mode)
	.rsz_seq_hrv = DISABLE,
	.rsz_seq_vrv = DISABLE,
	.rsz_seq_crv = DISABLE,
	
	.rsz_aal = DISABLE,

	.rsz_rsc_param ={
  			    {
			         .rsz_mode = ONE_SHOT,
			         .rsz_i_vst = 0, //even number in valid range (0-4094)  inVStart;
			         .rsz_i_vsz = 0, // valid range (0-4096) (only required when CSL_IPIPE_INPUT_LINE_CONFINED Uint16 inVSize;
			         .rsz_i_hst = 0, // even number in valid range (0-4094)  Uint16 inHStart;
				 .rsz_o_vsz = O_HEIGHT - 1,//480  - 1, //written value = val + 1 , 239 + 1
			         .rsz_o_hsz = O_WIDTH - 1,//640 - 1, //written value = val + 1 , 319 + 1
				 .rsz_o_hst = 0, //even number in valid range (0-4094) Uint16 outHStart;
			         .rsz_v_phs = 0,
			         .rsz_v_dif = 243,/* valid range (32-4096) */
			         .rsz_h_phs = 0,
			         .rsz_h_dif = 243, /* valid range (32-4096) */
			         .rsz_h_typ = CUBIC,
			         .rsz_h_lse_sel = INTERNAL_VALUE,
			         .rsz_h_lpf = 0
			     },
			     {
			         ONE_SHOT,
				 2, //even number in valid range (0-4094)  Uint16 inVStart
				 0, // valid range (0-4096) (only required when IPIPE_INPUT_LINE_CONFINED Uint16 inVSize
			         2, // even number in valid range (0-4094)  Uint16 inHStart
			         239, //written value = val + 1 , 239 + 1 
				 319, //written value = val + 1 , 319 + 1
			         0, //even number in valid range (0-4094) Uint16 outHStart
			         0, //valid range (0-8181) Uint16 vPhase;
			        256, //ratio = 256/vRsz: valid range (32-4096) Uint16 vRsz
			        0, //valid range (0-8192) Uint16 hPhase
				256, //ratio = 256/hRsz: valid range (32-4096) Uint16 hRsz
			        CUBIC,
			        INTERNAL_VALUE,
			        0
			    }
			},
	.rsz2rgb = {
			{
				.rsz_rgb_en = DISABLE,//....check
		/*		.rsz_rgb_typ = 0
				.rsz_rgb_msk0 = 0,
				.rsz_rgb_msk1 = 0,
				.rsz_rgb_alpha_val = 0 */
			   },
			{
				DISABLE,
			}
		   },	
			
	.ext_mem_param = {
			    {
			      .rsz_sdr_bad_h = 0,
			      .rsz_sdr_bad_l = 0,
			      .rsz_sdr_sad_h = 0,
			      .rsz_sdr_sad_l = 0,
			      .rsz_sdr_oft = O_WIDTH * 2,
			      .rsz_sdr_ptr_s = 0,
			     .rsz_sdr_ptr_e = 480 
   			   },
		           {
			       	0,
			       	0,
			       	0,
			       	0,
		           	320*19*2, // offset must be a multiple of32,
			        0,
			        8191
   			    }
			 },	
	.rsz_en[0] = ENABLE,
	.rsz_en[1] = DISABLE
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -