Forum Discussion
scaler problem
Hi, I have another problem about scaler, it's right that adding a control port to scaler makes the input resolution changable, but some resolution doesn't work.
My data path is listed below. Clocked Video Input(CVI) -> Scaler(SCL) -> Frame Buffer(FB) -> Mixer(with Test Pattern) -> Clocked Video Output(CVO) The settings of SCL please see the attachments During run-time, I changed the output size of scaler to 1024x768, and I started to change the input resolution, all the resolutions above and include 800x600 worked pretty fine. But when I set the resolution below 800x600, like 720x480 or 640x480, it flickered badly. Any reply is appreciated!32 Replies
- Altera_Forum
Honored Contributor
This is just a guess. How deep is the FIFO on your CVI block? Because you are upscaling you are going to put backpressure from the scaler to the CVI. It may be that this backpressure is causing an overflow in your CVI.
Jake - Altera_Forum
Honored Contributor
--- Quote Start --- This is just a guess. How deep is the FIFO on your CVI block? Because you are upscaling you are going to put backpressure from the scaler to the CVI. It may be that this backpressure is causing an overflow in your CVI. Jake --- Quote End --- Hi, Jake, thanks for your reply! Yes, your guess is right, when I change the input resolution 640x480@60 to 640x480@30, which reduced the backpressure on CVI, it worked well, but it seems hard to set a appropriate size for the FIFO of CVI. In the user guide, you know, it mentioned that the latency of scaler is N(Tap)-1 lines, in my understanding, does it mean that a overflow of CVI won't happen as long as the FIFO depth of CVI is equal to or more than (N-1)lines. Again thanks for reply! - Altera_Forum
Honored Contributor
It's a balance between clock frequency and fifo size. Basically when you upscale, the scaler has to use the same input line of data more than once to produce the output. This will hold off the input by at least a line. If during that time your CVI FIFO overflows, then you're in trouble. Now if you're running the VIP blocks fast enough, the scaler can chew through that second line of output and start pulling data again from the input before the FIFO gets a chance to overflow.
It's actually a fairly complex calculation to find the exact frequency. Taking into account the vertical and horizontal blanking interval and the input sample frequency at exactly what point will your FIFO overflow. However, if you always run your VIP blocks at at least 2X the input clock frequency of any standard that will be upscaled, you'll probably avoid the issue. Jake - Altera_Forum
Honored Contributor
Hi ;
I'm working with scaler to upscale from 800x600 to 1080P, but I don't have anything in the screen or in the est case I get a flicker. I'm using Altera Cyclone III development board. and here the chain that I'm using in sopc builder. CVI->scaler->video frame buffer -> CVO Does anayone have an resolution for this problem ? thank you. Rabia - Altera_Forum
Honored Contributor
Hi,
lots of things could be wrong in this system. You need to get this system working first: TPG->CVO (where TPG is the test pattern generator) Then you can try: TPG->frame buffer->CVO Then: TPG->scaler->frame buffer->CVO And finally: CVI->scaler->frame buffer->CVO - Altera_Forum
Honored Contributor
Hi vgs;
thank you for your reply. I've already done the different steps you said. I started with the TPG-> CVO, it was working perfectly. TPG -> frame buffer -> CVO works perfectly. TPG -> scaler -> frame buffer -> CVO does not work. could you guide to to get it working properley? thanks! Rabia - Altera_Forum
Honored Contributor
Could you give the parameterizations (or GUI screenshots) you are using for the design that does not work?
Did you make any changes to the TPG, FrameBuffer, CVO parameterization when you added the scaler in? - Altera_Forum
Honored Contributor
Hi vgs;
sorry for the delay. Here are the snapshots of the different IPs used in the design. I have made also a frame buffer using cvi->fb->cvo, it works perfectly, but when I insert a scaler between the cvi and the scaler I don't get anything. Thanks.:) - Altera_Forum
Honored Contributor
--- Quote Start --- Hi vgs; sorry for the delay. Here are the snapshots of the different IPs used in the design. I have made also a frame buffer using cvi->fb->cvo, it works perfectly, but when I insert a scaler between the cvi and the scaler I don't get anything. Thanks.:) --- Quote End --- Hi, Is there any overflow or underflow occured when you insert a scaler? If a overflow occured, may be you could increase the buffer of the cvi. Sean - Altera_Forum
Honored Contributor
Hi,
As pointed out by Sean, the cvi->scaler->vfb->cvo designs may not work because the cvi is overflowing. You can try moving the vfb before the scaler or increase the number of lines of buffering in the cvi. I still have no idea why the tpg->scaler->vfb->cvo design stops working when adding the scaler. Did you use 1080p or 800x600 in the tpg->vfb->cvo design that works? Please try it with 1080p if you did not already.