Okay, the problem is solved. It turns out that the size problem is
related to my stupid coefficient indexing bug.
-----Original Message-----
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *#ZHENG
LEI#
*Sent:* Monday, January 15, 2007 3:44 PM
*To:* [email protected]
*Subject:* VPFE Resizer
Hi:
I've solved filter coefficient problem. My coefficient calculation is
correct. The error is due to a stupid indexing bug. In case anyone wants to
know, here are my filter coefficients. The 7 taps version is not tested yet.
The resizer input size problem still remains though. Has anyone got any
clue?
/*default 4-tap 8-phase FIR filter coefficient (Lanzcos3)
-0.185110, 1.370219, -0.185110, 0.000000,
-0.122543, 1.319250, -0.202571, 0.005863,
-0.046014, 1.150355, -0.127817, 0.023477,
0.018724, 0.845618, 0.090625, 0.045033,
0.050000, 0.450000, 0.450000, 0.050000,
0.045033, 0.090625, 0.845618, 0.018724,
0.023477, -0.127817, 1.150355, -0.046014,
0.005863, -0.202571, 1.319250, -0.122543, */
static u32 coef_4_8[16] = {
0x015f03d1, 0x000003d1, 0x015203e1, 0x000203cc,
0x012603f4, 0x000603df, 0x00d80005, 0x000c0017,
0x0073000d, 0x000d0073, 0x0017000c, 0x000500d8,
0x03df0006, 0x03f40126, 0x03cc0002, 0x03e10152,
};
/*default 7-tap 4-phase FIR filter coefficient (Lanzcos3)
0.019281, -0.120342, 0.601061, 0.601061, -0.120342,
0.019281, 0.000000,
0.026421, -0.116143, 0.355209, 0.789565, -0.045638, -
0.014086, 0.004672,
0.016736, -0.067853, 0.120790, 0.860655, 0.120790, -
0.067853, 0.016736,
0.004672, -0.014086, -0.045638, 0.789565, 0.355209, -
0.116143, 0.026421, */
static u32 coef_7_4[16] = {
0x03e10005, 0x009a009a, 0x000503e1, 0x00000000,
0x03e20007, 0x00ca005b, 0x03fc03f4, 0x00000001,
0x03ef0004, 0x00dc001f, 0x03ef001f, 0x00000004,
0x03fc0001, 0x00ca03f4, 0x03e2005b, 0x00000007,
};
-----Original Message-----
*From:* davinci-linux-open-source-bounces+realthunder=
[EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]
*On Behalf Of *#ZHENG LEI#
*Sent:* Monday, January 15, 2007 1:47 PM
*To:* George Gu; [email protected]
*Subject:* RE: VPFE Resizer
Hi:
Could you be more elaborate on this? Could you tell me your filter
coefficients? Thanks
-----Original Message-----
*From:* George Gu [mailto:[EMAIL PROTECTED]
*Sent:* Monday, January 15, 2007 1:41 PM
*To:* #ZHENG LEI#; [email protected]
*Subject:* RE: VPFE Resizer
zheng,
you need to set the resizer filter properly.
George Gu
(Xiangyu Gu)
Wintech Digital System Co.
Beijing, China
Ph: 8610-8278-2828 ext.168
Fax: 8610-8278-0028
http://www.wintechdigtal.com
----------------------------
------------------------------
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *#ZHENG
LEI#
*Sent:* 2007年1月15日 12:52
*To:* [email protected]
*Subject:* Fwd: VPFE Resizer
Hi:
Is there anybody kind enough to share the resizer filter coefficients? I
am not sure what it means by S10Q8. Is it a two's complement or what. What I
have tried is to time the float number with 256, and truncated to an
integer, and then take the last 10 LSBs. Well, my lancoze3 filter doesn't
work right. I only succeed in using a simple box filter with all
coefficients set to 0.25.
The other problem is regarding to the input size calculation. Does anyone
actually succeed in resizing from SDRAM to SDRAM? I have tried to resize a
704x576 image to 352x288. According to the formula in SPRUE38A, the HRSZ and
VRSZ are both 511, with 0 starting phase. But the resizer won't work with
these settings. My register values are:
RSZ_CNT: 1007fdff
OUT_SIZE: 1200160
IN_START: 0
IN_SIZE: 24002c0
SDR_INADD: 886c6000
SDR_INOFF: 580
SDR_OUTADD: 86c31800
SDR_OUTOFF: 2c0
YENH: 0
After several trials, I managed to get it right, by setting input height
to be equal to or greater than 578. In fact, any width >= 704, and height >=
578 will work, even if the picture input is actually 704x576, and the bytes
per line is still 1408. So, does this mean that the formula in SPRUE38A is
wrong? I also tried different settings for VRSZ to be 510, 509, 508, and
507. No luck for any of these. If the input height is smaller than certain
value, then the resizer will hang, and never generate any interrupt. If it
is bigger, then the picture gets all weird.
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source