[Libdlo] how to test video playing performance (raw way)

Roberto De Ioris roberto at unbit.it
Sat May 23 00:25:04 PDT 2009


Using the latest (test) version of the dlfb module you can start
watching video (at 16bit)

Run mplayer as seen in my first post then use this version of testctl.c


#include <fcntl.h>

struct area {
        int x,y;
        int w,h;
} dloarea;

int main(int argc, char* argv[]) {
        int fd ;

        fd = open("/dev/fb1", O_WRONLY);

        dloarea.x = 0;
        if (argv[1]) {
                dloarea.x = atoi(argv[1]);
        }
        dloarea.y = 0;
        if (argv[2]) {
                dloarea.y = atoi(argv[2]);
        }
        dloarea.w = 320;
        if (argv[3]) {
                dloarea.w = atoi(argv[3]);
        }
        dloarea.h = 240;
        if (argv[4]) {
                dloarea.h = atoi(argv[4]);
        }

        for(;;) {
                ioctl(fd, 0xaa, &dloarea);
                usleep(250);
        }
}


it takes up to 4 parameters to set the area you are interested in
(mplayer put the video at 0 top 0 left)

Obviously you need to set the usleep value according to your processor
speed, video frame rate ecc. ecc. 

Yes, its very raw but can show you that at 16bpp you can have pretty
decent performance (on no-hd video) even without compression.

-- 
Roberto De Ioris
http://unbit.it
JID: roberto at jabber.unbit.it



More information about the Libdlo mailing list