Hi,
I'm trying to use vpfe resizer to resize frames grabbed from v4l. My
capture device's output is a Pal 720x576 frame and I try to resize it to
180x144.
In the vpfe_init.c I proceed whith theese steps:
1) load HFILT registers with 7-tap 4-phase coefficients from ZHENG LEI post
outl(coef_7_4[0], (HFILT10)+RESZ_IOBASE_VADDR);
outl(coef_7_4[1], (HFILT32)+RESZ_IOBASE_VADDR);
ecc. ecc.
2) setup RSZ_CNT whith VSTPH=0, HSTPH=0, CBLIN=0, INPSRC=0, INPTYP=0,
YCPOS=0, and VRSZ=1019 HRSZ=1019 (is this correct?) calculated with
formulas in cap 5.5.5.1 in sprue38a
outl(0x000FEFFB, (RSZ_CNT)+RESZ_IOBASE_VADDR);
3) setup IN_SIZE and OUT_SIZE
outl(0x024002D0, (IN_SIZE)+RESZ_IOBASE_VADDR);
outl(0x009000B4, (OUT_SIZE)+RESZ_IOBASE_VADDR);
4) setup IN_START SDR_INADD SDR_INOFF
outl(0x00000000, (IN_START)+RESZ_IOBASE_VADDR); // grab all pixels
outl(0x00000000, (SDR_INADD)+RESZ_IOBASE_VADDR); // reading from camera
outl(0x00000000, (SDR_INOFF)+RESZ_IOBASE_VADDR); // reading from camera
5) disable YENH
6) setup SDR_OUT_ADD and SDR_OUTOFF to point to a __get_free_pages()
allocated ram block
7) setup SYN_MODE and FMTCFG
synmodeReg=inl((SYN_MODE)+RESZ_IOBASE_VADDR);
outl(synmodeReg|=(0x01<<SYN_MODE_WEN), (SYN_MODE)+RESZ_IOBASE_VADDR);
outl(synmodeReg|=(0x01<<SYN_MODE_SDR2RSZ),
(SYN_MODE)+RESZ_IOBASE_VADDR);
fmtcfgReg=inl((FMTCFG)+RESZ_IOBASE_VADDR);
outl(fmtcfgReg&=~(0x01<<FMTCFG_VPEN), (FMTCFG)+RESZ_IOBASE_VADDR);
// select yCbCR image format
8) and finally the enable flag:
outl(0x00000001, (RSZ_PCR)+RESZ_IOBASE_VADDR); // enable resizer
module davinci_vpfe.ko compile and load successfully, but when frames
arrive I always see PCR.BUSY=1, and no valid frame resized in memory
buffer.
Any suggestion?
Best regards,
Riccardo
--
Ing. Riccardo Sala
M31 s.r.l.
35129, Via Croce Rossa 112
Padova (PD), Italy
Phone: 0498697508
www.m31engineering.com
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source