Re: Video scaler for Spartan 3E?



ok... I guess i better start small anyway since I really new to this.
Well I'm going to take a DSP module in school soon so it will definitely
help me along.

(the higher the utilization the more difficult it is to place and route it
at a higher speed).
Yes so true. I kept getting timing constraint problem for my current video
scaler project.
Well though i learnt that timing delay could be reduced by adding output
registers to fit the timing constraint.

Oh yah consulted my colleague who said that my video scaler (polyphase
actually, did i mention it before?) is good in a sense that it consumes
lesser resources.
Well I could be working on this project further on, though i will still need
to understand some of the theory in video scaling as well.

Well really thank alot for the time and effort to advise me and give me some
direction.

Oh by the way, can I ask if that once i kind of burn the chip and little
smoke came off, is the chip spoilt? The board's power indicators are fine
and I programmed successfully into the chip through a parallel IV cable but
nothing was displayed though. No self-test or whatsoever is available
though...so scared...

"Paul" <pauljbennett@xxxxxxxxx> wrote in message
news:1178889638.696406.114280@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I definately was not saying that linear interpolation results will be
"very" poor... in fact... I'd bet some commercial scalers do it that
way.... At any rate... I'd be cautious of shooting for the stars -
you're better off with an obtainable project... Here's some
considerations...

640x480 = 307200points... which, if you're talking about RGB input,
means 307200 points of Red, Green & Blue each.... 307200points x
60fps = 18.4MSample/s per color... lets assume you're processing the
three colors independently... I know the Spartan3 development boards
have 50MHz clocks on them. I probably wouldn't try to push a Spartan
design much past 100MHz unless it was a VERY empty part (the higher
the utilization the more difficult it is to place and route it at a
higher speed). Now, assuming 100MHz, processing 3 colors
independently, that basically means you can do 5 "operations" in a
sample time... if you want to double your output rate (i.e. - scale up
to 1280x960) that may be as low as 2.5 operations, depending what the
operation is and if it needs to be done at the higher or lower rate.
In short what that gets down to is that anymore operations than that
must be done in different "blocks" of the design (i.e. they use more
resources). And that is going to quickly run you up against the limit
in terms of the number of multipliers in the spartan probably.

Now those are all TOTALLY ballpark, off the cuff numbers. My gut
instinct would be that linear interpolation will be NO problem at all
in the spartan at 100MHz, I'd bet you could even do it at those
resolutions at 50MHz. But my other gut instinct there is also that
any real significant amount of processing beyond linear interpolation
is going to get really tight, really quick. I think as a student
you're better off not trying to attempt a really tightly packed
design. The reason I say that is that to get a really tight design to
place and route correctly and meet timing you need to really know all
the ins and outs of the software tools (the Xilinx software). You
have to set all sorts of settings, possibly go in an manually place
critical parts of the design, etc... etc.... And that's REALLY not
what you want to be spending your time on as a student. Your purpose
is to learn about the logical part of FPGA design, and that's going to
be tricky enough on its own - I really wouldnt recommend working
yourself into that tight a position... You're really going to have a
lot on your plate with this design as it is.

At any rate.. that's my advice.. anyone else is welcome to
disagree...




On May 11, 1:14 am, "Ken Soon" <c...@xxxxxxxxxx> wrote:
Yeh Kolja, I will definitely start with something simple first.
Since I haven't begin to understand the concept of coefficient and
upsampling.

Ah thanks Paul, for taking out the time to explain some concept. (trying
to
digest all of them though >_<)
Well, interpolation is basically creating more datapoints between the
original fixed datapoints right?
Linear interpolation ar. I hope i can progress not from linear
interpolation
as it seems that the results i will be getting should be very poor.
But I will have to see how far i will be able to go from linear
interpolation. hope to be able to scale some video input from a vcd
players.
Though i will have to worry about the I/O of the boards and other
hardware
related issues.
Will check out the DSP books that you recommended too! :)

"Paul" <pauljbenn...@xxxxxxxxx> wrote in message

news:1178285538.481886.251680@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



OK... think time domain signal... say your signal x = [1 10 5 3] and
you want to upsample this to twice the sampling frequency.... if you
did a simple linear interpolation you'd get x_upsampled = [1 5.5 10
7.5 5 4 3 ?] that last datapoint{?} is kinda arbitrary, presumably
you'd just set it to 3. However, signals are defined as a sum of
sinusoids, and generally they fit that model fairly well - when you
have something that doesn't, it takes more sinusoids to fit it.. thats
the general theory behind a fourier transform, right? So linear
interpolation isn't really you're best solution. You can
mathematically prove that if you had an infinitely long signal, and an
infinitely perfect low pass filter, the "perfect" upsampling is done
by inserting zeros x_zero = [1 0 10 0 5 0 3 0], and low pass
fitlering it. Obviously, neither the infinite sequence or the perfect
LPF is realistic. If you do the math (or plug it into matlab), the
FFT of x (shfited to place zero frequency in the center), X=[-7 -4+7j
19 -4-7j] If you take the FFT of x_zero, X_ZERO = [19 -4-7j -7
-4+7j 19 -4-7j -7 -4+7j] Note, this is simply X repeated.
So how do you get back your correct frequency spectrum? An ideal LPF
returns X_UPSAMPLE=[0 0 -7 -4+7j 19 -4-7j 0 0]. Now note
this... if you use matlab and take the inverse FFT of this (the
shifted version of this actually) you get [1.0000 5.8107
10.0000 8.6391 5.0000 3.6893 3.0000 0.8609]
Actually... you get this divided by 2 (you need to multiply by your
upsampling facor, that comes out in the math) with a risidual
imaginary part due to the fact that it's an even length sequence, so
you just look at the real part. Point being however, note that the
interpolated values are NOT what you get using straight linear
interpolation. this is because this method takes into account the
curvature of the rest of the sequence and stuff.

That being said.... for this project, I would imagine that simple
linear interpolation is plenty adequate! A 2 dimensional version of
this example above would be quite tricky and take a lot of processing
power. But read the chapter in your DSP book on upsampling - it will
cover all this :-) Actually, not positive, but the stock, every
college in the world uses, oppenheim & shaeffer signals & systems book
MIGHT even go into it in one of the later chapters.

How accurate do your interpolations need to be? Think basic 1-
dimensional DSP.. how do you upsample a signal? insert zeros
between
samples and LPF, right? Or do the same thing in the F-domain by
zero
padding the ends of the FFT and inverse-FFT'ing. Either of these
methods in 2 dimensions is going to be a lot of computation and a
lot
of taking stuff in and out of memory in different orders. DDR
memories like you to take stuff out in the same order you put them
in... they slow down big time when you try to jump around.. So if
you
do this, you will need to some up with some clever methods of read
out
pieces from DDR in the incorrect order, and then re-reading from a
local, smaller, block ram in the order you actually want. This will
take careful planning and a lot of simulation, even an experienced
designer would have a tricky time with this and probably get it
wrong
in simulation the first shot.

Woah, ok I'm totally lost in here. But no problem, I will take note of
these
points and consult my profs or someone- Hide quoted text -

- Show quoted text -





.



Relevant Pages

  • Re: changing sampling rate of filter coeficients
    ... number of taps and interpolate between each coefficient? ... you'd have to interpolate from the end values to the notional zeros beyond as well because linear interpolation is convolution with a triangle function. ... The difficulty is that the filter's optimum function needs to be found from documentation unlikely to exist, or deduced from its purpose in the design. ...
    (comp.dsp)
  • Re: pow/log functions in fixed point
    ... each for both expand logwith quadratic interpolation. ... if an economical scheme such as bipartite tables is used. ... Bipartite tables are basically a more economical form of linear interpolation, ...
    (comp.dsp)
  • Re: Hann interpolation instead of linear or cubic
    ... going to quickly have to change it to a Hann function, ... Alright so, you know how linear interpolation works like, right? ... signal with a triangle which spans from the left ...
    (comp.graphics.algorithms)
  • Re: An interpolation question
    ... "repeated samples" methods of upsampling is definitely not in the standard DSP textbooks. ... you can use Nth order interpolation polynomial. ... As I clear as I can remember the lecture at school, it was about converting digital to analog using a polynomial of a degree N to do the interpolation directly in the continuos time. ...
    (comp.dsp)
  • Re: DrawImage and NearestNeighbor bug?
    ... > Find great Windows Forms articles in Windows Forms Tips and Tricks ... >> I am drawing an image, stretched, with interpolation set to ... >> I created a checkboard of 5x5 pixels and painted it in a panel. ... >> rounding error in the interpolation code to me, but maybe it's by design? ...
    (microsoft.public.dotnet.framework.drawing)