SD speed record

The master of RLP…Awesome


Incredible… And that’s on a Cobra. I assume you’re buffering from the SD card as fast as it’s playing and not buffering the entire video first?

Idd, frames are directly copied from SD to LCD buffer. Each frame does a roundtrip to Netmf now in this example. The video on the SD card contains uncompressed 5:6:5 bmp data, so no conversions are needed.

Can you share a bit more info or code on what you have in c# and how did you convert a video to raw netmf format?

This looks impossible! What speed you have and what is the FPS?!

I am really impressed! Each image is 150KB so at 10 frames you need 1.5MB per second!

@ Gus: Current framerate is 20FPS and each frame is initiated with a call from NETMF, so when you run it completly in RLP, I would expect a framerate of 30FPS.

I have downloaded a MPEG1 sample video from internet, then converted this video to a BMP sequence with virtual dub. Then I used a batch process to convert each bitmap to 320x240 5:6:5 BMP format. Then I have written a small C# console program that merges all BMP files without headers to a single file I then put on the SD card.

int fh;
fr = FatFsDriver.OpenFile("0:\\output.seq", FileAccess.READ, out fh);
if (fr == FileResult.OK)
    Debug.Print("File opened");

    int bytesRead = 0;
    int totalBytesRead = 0;
    byte[] buffer = new byte[320*240*2];
    int start = Environment.TickCount;
        fr = FatFsDriver.LoadSingleFrame(fh, buffer, out bytesRead);
        totalBytesRead += bytesRead;
    } while ((bytesRead > 0) && (fr == FileResult.OK));
    int duration = Environment.TickCount - start;
    if (fr == FileResult.OK)
        Debug.Print("Read succeeded with " + totalBytesRead + " bytes in " + duration + "ms");
        float speed = ((float)totalBytesRead / 1048.576f) / (float)duration;
        string s = speed.ToString(); int dotPos = s.IndexOf('.'); if (dotPos > 0) s = s.Substring(0, dotPos + 3);
        Debug.Print(" readspeed = " + s + " MByte/s");
    else Debug.Print("Read failed after " + totalBytesRead + " bytes");

    fr = FatFsDriver.CloseFile(fh);
else Debug.Print("Failed to open file, error = " + fr);

So basically you read speed is over 2MBytes/sec :open_mouth: nice!

In RLP it’s 4.4MByte/sec to be exact :slight_smile:

one more question, virtualdub software did convert to 5:6:5? I just downloaded it and I see how to convert to BMP, very easy and now trying to convert to 5:6:5.

I’ve recorded a save-as bmp 5:6:5 macro in photoshop and then ran it as a batch process on the folder containing the bitmaps.

Impressive performance

Hi WouterH,

This looks nice. I thought I’d see what kind of SD Card performance I was getting without RLP (which I do not have on my Argon board) for a comparison. Are you able to compare your results with the standard .NET MF version?

I have Sytech’s 480x272 screen, which means more data to transmit (255Kb) per frame. I downloaded a stream from youtube and converted it to rgb565le (raw) using ffmpeg similar to yourself and got the following:

.NET MF Argon R1 - SD Card Read Speed Test - YouTube

I am transferring 255Kb in 45ms which comes out as a rate of 5.53Mb per second, similar to yourself. I am currently using the built in NETMF FAT library for this, so I expect I could speed it up a bit should I look at doing so later on. I also have about 5% more bandwidth in the SDCard interface to improve upon.



Wow that impressive… work… :slight_smile:

Thanks Jay Jay - as I say I should be able to get another 5 or 10% out of the SD Card as it is currently running at 20Mhz where as the maximum speed of the microcontroller SD Card interface is 25Mhz.

I had to lower the clock because SDRAM could not follow up :smiley:

Hi WouterH,

Are you using DMA to move the data from the SD Card to the RAM? I suppose the limit you are hitting is the 16bit interface to your SDRAM?


I use DMA but the limit is the wait-state of the RAM. It has a wait-state of 3 clockcycles if I remember correct.