imx-ipu-v3.h (2a267e7c41aa88215de2b542de797d03d16ecdfd) | imx-ipu-v3.h (f208b26e61df411cf0bee413bee57ff434e8b38a) |
---|---|
1/* 2 * Copyright 2005-2009 Freescale Semiconductor, Inc. 3 * 4 * The code contained herein is licensed under the GNU Lesser General 5 * Public License. You may obtain a copy of the GNU Lesser General 6 * Public License Version 2.1 or later at the following locations: 7 * 8 * http://www.opensource.org/licenses/lgpl-license.html --- 373 unchanged lines hidden (view full) --- 382 */ 383enum ipu_ic_task { 384 IC_TASK_ENCODER, 385 IC_TASK_VIEWFINDER, 386 IC_TASK_POST_PROCESSOR, 387 IC_NUM_TASKS, 388}; 389 | 1/* 2 * Copyright 2005-2009 Freescale Semiconductor, Inc. 3 * 4 * The code contained herein is licensed under the GNU Lesser General 5 * Public License. You may obtain a copy of the GNU Lesser General 6 * Public License Version 2.1 or later at the following locations: 7 * 8 * http://www.opensource.org/licenses/lgpl-license.html --- 373 unchanged lines hidden (view full) --- 382 */ 383enum ipu_ic_task { 384 IC_TASK_ENCODER, 385 IC_TASK_VIEWFINDER, 386 IC_TASK_POST_PROCESSOR, 387 IC_NUM_TASKS, 388}; 389 |
390/* 391 * The parameters that describe a colorspace according to the 392 * Image Converter: 393 * - Y'CbCr encoding 394 * - quantization 395 * - "colorspace" (RGB or YUV). 396 */ 397struct ipu_ic_colorspace { 398 enum v4l2_ycbcr_encoding enc; 399 enum v4l2_quantization quant; 400 enum ipu_color_space cs; 401}; 402 403static inline void 404ipu_ic_fill_colorspace(struct ipu_ic_colorspace *ic_cs, 405 enum v4l2_ycbcr_encoding enc, 406 enum v4l2_quantization quant, 407 enum ipu_color_space cs) 408{ 409 ic_cs->enc = enc; 410 ic_cs->quant = quant; 411 ic_cs->cs = cs; 412} 413 414struct ipu_ic_csc_params { 415 s16 coeff[3][3]; /* signed 9-bit integer coefficients */ 416 s16 offset[3]; /* signed 11+2-bit fixed point offset */ 417 u8 scale:2; /* scale coefficients * 2^(scale-1) */ 418 bool sat:1; /* saturate to (16, 235(Y) / 240(U, V)) */ 419}; 420 421struct ipu_ic_csc { 422 struct ipu_ic_colorspace in_cs; 423 struct ipu_ic_colorspace out_cs; 424 struct ipu_ic_csc_params params; 425}; 426 |
|
390struct ipu_ic; | 427struct ipu_ic; |
428 429int __ipu_ic_calc_csc(struct ipu_ic_csc *csc); 430int ipu_ic_calc_csc(struct ipu_ic_csc *csc, 431 enum v4l2_ycbcr_encoding in_enc, 432 enum v4l2_quantization in_quant, 433 enum ipu_color_space in_cs, 434 enum v4l2_ycbcr_encoding out_enc, 435 enum v4l2_quantization out_quant, 436 enum ipu_color_space out_cs); |
|
391int ipu_ic_task_init(struct ipu_ic *ic, | 437int ipu_ic_task_init(struct ipu_ic *ic, |
438 const struct ipu_ic_csc *csc, |
|
392 int in_width, int in_height, | 439 int in_width, int in_height, |
393 int out_width, int out_height, 394 enum ipu_color_space in_cs, 395 enum ipu_color_space out_cs); | 440 int out_width, int out_height); |
396int ipu_ic_task_init_rsc(struct ipu_ic *ic, | 441int ipu_ic_task_init_rsc(struct ipu_ic *ic, |
442 const struct ipu_ic_csc *csc, |
|
397 int in_width, int in_height, 398 int out_width, int out_height, | 443 int in_width, int in_height, 444 int out_width, int out_height, |
399 enum ipu_color_space in_cs, 400 enum ipu_color_space out_cs, | |
401 u32 rsc); 402int ipu_ic_task_graphics_init(struct ipu_ic *ic, | 445 u32 rsc); 446int ipu_ic_task_graphics_init(struct ipu_ic *ic, |
403 enum ipu_color_space in_g_cs, | 447 const struct ipu_ic_colorspace *g_in_cs, |
404 bool galpha_en, u32 galpha, 405 bool colorkey_en, u32 colorkey); 406void ipu_ic_task_enable(struct ipu_ic *ic); 407void ipu_ic_task_disable(struct ipu_ic *ic); 408int ipu_ic_task_idma_init(struct ipu_ic *ic, struct ipuv3_channel *channel, 409 u32 width, u32 height, int burst_size, 410 enum ipu_rotate_mode rot); 411int ipu_ic_enable(struct ipu_ic *ic); --- 49 unchanged lines hidden --- | 448 bool galpha_en, u32 galpha, 449 bool colorkey_en, u32 colorkey); 450void ipu_ic_task_enable(struct ipu_ic *ic); 451void ipu_ic_task_disable(struct ipu_ic *ic); 452int ipu_ic_task_idma_init(struct ipu_ic *ic, struct ipuv3_channel *channel, 453 u32 width, u32 height, int burst_size, 454 enum ipu_rotate_mode rot); 455int ipu_ic_enable(struct ipu_ic *ic); --- 49 unchanged lines hidden --- |