Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

RGB video encoding / storage (circuit design)

Status
Not open for further replies.

ardetnec

Newbie level 3
Joined
Feb 23, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,320
Hello,

suppose that I would want to design an FPGA that:

a. encodes RGB image data (3,11MB per image) into a lossless TIFF or BMP format, under 1/120 seconds and
b. write it to a hard drive, also under 1/120 seconds?

I don't need in depth information (unless you don't value your time higher), just a small push towards the things I should look into so I can get the appropriate books and contact the right people.

Many thanks!

EDIT: I just noticed that this is altera/... FGPA specific... please don't mind moving this to the appropriate section!
 

Is there any specific reason you want to use an FPGA?

I think the hard part is to write the data to a hard disk fast enough. What kind of disk do you have in mind?
 

Hi ardetnec,

Do you wants to store the all frames in your hard drive..? If the things are like so you need a high capacity hard drive.(If you are design the system for video streaming purpose, then you can update the old frames with new frames, so the hard drive volume would be less (Actually its for what purpose...? Can you tell...) )

One important thing you need to look is the Horizontal and Vertical size of the image, means the pixel ratio like 800x600, etc,. and also concentrate the HSYNC, VSYNC and Blanking pulses...

One another thing is the pixel format, means the number of bits needed to represents a pixel in your frame... commonly used formats are 32, 24, 16, 8...
 

Is there any specific reason you want to use an FPGA?

I think the hard part is to write the data to a hard disk fast enough. What kind of disk do you have in mind?

To be honest I don't even know I need an FPGA or not.. Could the encoding be done by just a microprocessor?
This harddrive is used by a company called Atomos: Hitachi Travelstar HTS725050 500G / 7200 rpm. They make very small digital video recorders that record very high quality 10bit RGB data and encode it to advanced high quality codecs (proress, 4:2:2). Encoding and writing in real time. So that Hitachi disc they recommend should be capable for my project.

Hi ardetnec,

Do you wants to store the all frames in your hard drive..? If the things are like so you need a high capacity hard drive.(If you are design the system for video streaming purpose, then you can update the old frames with new frames, so the hard drive volume would be less (Actually its for what purpose...? Can you tell...) )

One important thing you need to look is the Horizontal and Vertical size of the image, means the pixel ratio like 800x600, etc,. and also concentrate the HSYNC, VSYNC and Blanking pulses...

One another thing is the pixel format, means the number of bits needed to represents a pixel in your frame... commonly used formats are 32, 24, 16, 8...

Yes, I want to store all the frames on the hard drive.
Well the idea is to build a high quality digital cinema camera.
This is going to be the image sensor I'll be using: https://www.viimagic.com/fileadmin/pdf/viimagic-9225-9226-Product-Brief_V03.pdf

It puts out 12 bit RGB data (that are 3 digital video streams: Red, Green, Blue). The image format will be 1080x1920.
At 25 fps the data stream will be 78 MB/s. At 60 fps the data stream will be 178 MB/s.


I just need to know the smartest method to encode the frames to TIFF or BMP (or another mainstream lossless format) inside the camera, and how to actually write them to a harddisk.. Controlling the variables of the image sensor can just be done with a touchscreen, a gui and a microprocessor.
 

At best you will get slightly more than 100MB/s, probably enough for 25fps. This is for sequential write of 500MB.
Hitachi Travelstar 7K500 Review (500GB) | StorageReview.com - Storage Reviews

Lossless BMP/TIFF is AFAIK just raw data and some header data. Need very little CPU to handle that.
If you need a file system you have overhead for that.
If you don't need a filesystem you don't need a common file format. in my opinion. I may be wrong.

With your requirements I think you need to go for some kind of compressed file format. In that case you need a lot of CPU. Or an FPGA.
If you need a file system I think the best option is to run Linux. Possible to do in an FPGA but much more complicated than a CPU.

There are ARM processors with SATA interface and graphics engines from TI.
 

You're better off using a microprocessor, or even just a PC. An FPGA is find for handling and routing the raw data, but pretty useless for File systems etc. The processor would have access to an OS and file system, so I would just have the FPGA (if you even need of of them) dump the data into a shared memory, and then have the processor dump it into a file.

The bitmap header is pretty straightforward.
 

At best you will get slightly more than 100MB/s, probably enough for 25fps. This is for sequential write of 500MB.
Hitachi Travelstar 7K500 Review (500GB) | StorageReview.com - Storage Reviews

Just read that they use that hard drive only for recording 10bit compressed without visual quality loss.. so probably at bitrates of 50MB/s..
But I'm sure there must be hard drives that can write at 200MB/s. I really need this uncompressed data, untouched on my pc so I can process the image on my pc (much faster, much easier).

Lossless BMP/TIFF is AFAIK just raw data and some header data. Need very little CPU to handle that.
If you need a file system you have overhead for that.
If you don't need a filesystem you don't need a common file format. in my opinion. I may be wrong.

That's what I was thinking, though I wasn't sure :)

With your requirements I think you need to go for some kind of compressed file format. In that case you need a lot of CPU. Or an FPGA.
If you need a file system I think the best option is to run Linux. Possible to do in an FPGA but much more complicated than a CPU.

Yeah, there's an open source project called Apertus (apertus.org) and they installed linux on an Ephel camera. Though they need a lot of processing inside the camera, I don't. I just need a very fast hard drive.

There are ARM processors with SATA interface and graphics engines from TI.

Thank you! I'll look into them :)


You're better off using a microprocessor, or even just a PC. An FPGA is find for handling and routing the raw data, but pretty useless for File systems etc. The processor would have access to an OS and file system, so I would just have the FPGA (if you even need of of them) dump the data into a shared memory, and then have the processor dump it into a file.

The bitmap header is pretty straightforward.

So suppose I just use a microprocessor, no FPGA image processing. I would then have to write a program for the micro controller that is able to detect the start and the end of a single frame and transform it into a file (basically adding the appropriate lines of code to tell the computer it is a BMP or TIFF file), right? So as skogsjanne said: I would just need a processor with a SATA interface and a fast hard drive: OCZ Vertex II has sequential writing speed up to 275 MB/s.. Since I'm dealing with a data stream, this SSD will do the job just fin I think.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top