/*******************************************************************************
**+--------------------------------------------------------------------------+**
**| **** |**
**| **** |**
**| ******o*** |**
**| ********_///_**** |**
**| ***** /_//_/ **** |**
**| ** ** (__/ **** |**
**| ********* |**
**| **** |**
**| *** |**
**| |**
**| Copyright (c) 2006-2010 Texas Instruments Incorporated |**
**| ALL RIGHTS RESERVED |**
**| |**
**| Permission is hereby granted to licensees of Texas Instruments |**
**| Incorporated (TI) products to use this computer program for the sole |**
**| purpose of implementing a licensee product based on TI products. |**
**| No other rights to reproduce, use, or disseminate this computer |**
**| program, whether in part or in whole, are granted. |**
**| |**
**| TI makes no representation or warranties with respect to the |**
**| performance of this computer program, and specifically disclaims |**
**| any responsibility for any damages, special or consequential, |**
**| connected with the use of this program. |**
**| |**
**+--------------------------------------------------------------------------+**
*******************************************************************************/
/** \file psp_bios_vpfe_st_on_the_fly_sample.h
*
* \brief Header File
*
* (C) Copyright 2010, Texas Instruments, Inc
*
* \author Maulik Desai
*
* \version 0.1 Created
*/
/****************************************************************************
HEADER FILE INCLUSION
*****************************************************************************/
#include<std.h>
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************
Macros
******************************************************************************/
#define R_PHASE \
0, 0, 0, 0, \
0, 64, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 16, 0, 0, \
16, 0, 16, 0, \
\
16, 0, 16, 0, \
0, 0, 0, 0, \
16, 0, 16, 0, \
0, 0, 0, 0, \
\
0, 16, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
32, 0, 32, 0, \
\
16, -26, 16, 0, \
26, 0, 26, 0, \
16, -26, 16, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 32, 0, 0, \
0, 0, 0, 0, \
\
16, 26, 16, 0, \
-26, 0, -26, 0, \
16, 26, 16, 0, \
0, 0, 0, 0, \
\
0, 32, 0, 0, \
0, 0, 0, 0
#define GR_PHASE \
-8, 0, -8, 0, \
32, 32, 32, 0, \
-8, 0, -8, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
\
-10, 32, -10, 0, \
0, 40, 0, 0, \
-10, 32, -10, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
32, 0, 32, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
\
-13, 32, -13, 0, \
0, 52, 0, 0, \
-13, 32, -13, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 0, 0, 0, \
\
-16, 0, -16, 0, \
32, 64, 32, 0, \
-16, 0, -16, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
\
0, 32, 0, 0, \
0, 0, 0, 0, \
0, 32, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 0, 0, 0
#define GB_PHASE \
-8, 32, -8, 0, \
0, 32, 0, 0, \
-8, 32, -8, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
\
-8, 0, -8, 0, \
32, 32, 32, 0, \
-8, 0, -8, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 0, 0, 0, \
\
-16, 32, -16, 0, \
0, 64, 0, 0, \
-16, 32, -16, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
\
0, 0, 0, 0, \
29, 6, 29, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 32, 0, 0, \
0, 0, 0, 0, \
0, 32, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
\
-13, 0, -13, 0, \
32, 52, 32, 0, \
-13, 0, -13, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 0, 0, 0
#define B_PHASE \
16, -6, 16, 0, \
6, 0, 6, 0, \
16, -6, 16, 0, \
0, 0, 0, 0, \
\
0, 16, 0, 0, \
16, 0, 16, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 16, 0, 0, \
0, 0, 0, 0, \
\
16, -32, 16, 0, \
32, 0, 32, 0, \
16, -32, 16, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
32, 0, 32, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 0, 0, 0, \
\
16, 26, 16, 0, \
-26, 0, -26, 0, \
16, 26, 16, 0, \
0, 0, 0, 0, \
\
0, 32, 0, 0, \
0, 0, 0, 0, \
\
0, 0, 0, 0, \
0, 64, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
\
0, 32, 0, 0, \
0, 0, 0, 0
#define FRAME_WIDTH 640
#define FRAME_HEIGHT 480
#ifdef __cplusplus
}
#endif
I have connected a CMOS sensor to DM6437 VPFE and I'm using Previewer to convert Bayer data to YUV. I can see that image are converted, but color is not converted correctly.
I've enabled CFA interpolation and used CFA coefficients from PSP 1.10.03 sample (psp_bios_vpfe_st_on_the_fly_sample.h: see attached file for reference)
I've disabled RGB to RGB blending module by setting its metrix as Identity Metrix & offset vector to 0s.
For RGB to YCbCr conversion I've kept default settings.
I'm not sure that the CFA coeffs I'm using are correct or not. Please let me know which CFA coeffs shuold I use.
Input Image:
Output image:
Thanks & Regards,
Mitul Chokshi