meaning of an expression in VHDLcode of JPEG2000

Status
Not open for further replies.

farhaenis

Newbie level 5
Joined
Mar 27, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
sfax
Activity points
1,323
meaning of an expression

In the code vhdl of the JPEG2000,i dont understand what's the meaning of this expression:

FUNCTION filter_5_3_even(x, yp, yn : SIGNED(CST_BUF_DATA_BUS_WIDTH - 1 DOWNTO 0)) RETURN SIGNED IS
BEGIN
RETURN x + SHIFT_RIGHT(yp + yn + 2, 2);
END;

This function ε to the DWT bloc.

Can any one please help me?
 

Re: meaning of an expression

I need the vhdl code of JPEG2000, can you send it to me?
Also we can help each others in understanding it.
 
Reactions: sanju_

    sanju_

    Points: 2
    Helpful Answer Positive Rating
It seems to be a short FIR lowpass filter, length = 3
The 3 input values: yp, x, yn.
(yp = "previous", yn = "next")

The 3 coefficients: 0.25; 1; 0.25

Result = 0.25 * yp + 1 * x + 0.25 * yn
The "+ 2" in the SHIFT_RIGHT argument creates rounding to the nearest integer.
(it is an addition of 0.5, then a truncation to integer).

This is probably a very hardware efficient filter, since no multipliers are needed.
It is only an addition of 4 values. The shifting doesn't cost anything.
 
Reactions: sanju_

    sanju_

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…