Sie sind auf Seite 1von 2

Steps for VPIF Video Loopback

1. In the TVP5147.c file of vpif project change line CodecRegWrite(baseAddr, 0x02, 0x01); to
CodecRegWrite(baseAddr, 0x02, 0x02);
2. In the same file i.e. TVP5147.c comment the following lines
reg_val = CodecRegRead(baseAddr, 0x3A);
while((reg_val | 0xF1) != 0xFF)
{
reg_val = CodecRegRead(baseAddr, 0x3A);
}
3. In vpif.h at line 105 add #define VPIF_PAL 3
4. Import the drivers project in starterware i.e.
C:\ti\C6748_StarterWare_1_20_04_01\build\c674x\cgt_ccs\c6748\drivers
5. In the above drivers Project which is imported open vpif.c file copy the below code above the
statement if(mode==VPIF_CAPTURE_RAW)

if(mode==VPIF_PAL)
{
if(sdChannel==VPIF_CHANNEL_0)
{
HWREG(baseAddr + C0HCFG) = (280 << VPIF_C0HCFG_EAV2SAV_SHIFT) |
(1440 << VPIF_C0HCFG_SAV2EAV_SHIFT);
HWREG(baseAddr + C0VCFG0) = (1 << VPIF_C0VCFG0_L1_SHIFT) | (23 <<
VPIF_C0VCFG0_L3_SHIFT);
HWREG(baseAddr + C0VCFG1) = (311 << VPIF_C0VCFG1_L5_SHIFT) | (313
<< VPIF_C0VCFG1_L7_SHIFT);
HWREG(baseAddr + C0VCFG2) = (336 << VPIF_C0VCFG2_L9_SHIFT) | (624
<< VPIF_C0VCFG2_L11_SHIFT);
HWREG(baseAddr + C0VSIZE) = 625 << VPIF_C0VSIZE_VSIZE_SHIFT;
}
if(sdChannel==VPIF_CHANNEL_1)
{
HWREG(baseAddr + C1HCFG) = (280 << VPIF_C1HCFG_EAV2SAV_SHIFT) |
(1440 << VPIF_C1HCFG_SAV2EAV_SHIFT);
HWREG(baseAddr + C1VCFG0) = (1 << VPIF_C1VCFG0_L1_SHIFT) | (23 <<
VPIF_C1VCFG0_L3_SHIFT);
HWREG(baseAddr + C1VCFG1) = (311 << VPIF_C1VCFG1_L5_SHIFT) | (313
<< VPIF_C1VCFG1_L7_SHIFT);
HWREG(baseAddr + C1VCFG2) = (336 << VPIF_C1VCFG2_L9_SHIFT) | (624
<< VPIF_C1VCFG2_L11_SHIFT);
HWREG(baseAddr + C1VSIZE) = 625 << VPIF_C1VSIZE_VSIZE_SHIFT;
}
}
6. Recompile the driver project which will generate a new driver.lib file (you would better save
the old one with a different extension, just in case)
7. Go to the line VPIFCaptureModeConfig(SOC_VPIF_0_REGS, VPIF_PAL,
VPIF_CHANNEL_0, 0, (struct vbufParam *) 0); in vpif_lcd_loopback project change
highlighted parameter
8. In the "facedetect_lcdk.c" change line 88 to: #define CAPTURE_IMAGE_HEIGHT
(576)
9. In the same file on line 456 add "VPIFCaptureModeConfig(SOC_VPIF_0_REGS,
VPIF_PAL, VPIF_CHANNEL_0, 0, (struct vbufParam *) 0);" and coment the line above

Das könnte Ihnen auch gefallen