fprintf(stderr, "Framebuffer xsize:%d, ysize:%d, vbpp:%d\n",
cinfo->fb_vinfo.xres, cinfo->fb_vinfo.yres, cinfo->fb_vinfo.bits_per_pixel);
//#endif
- if(cinfo->fb_vinfo.xres % 16 != 0 || cinfo->fb_vinfo.yres % 16 != 0){
- fprintf(stderr, "This system support only multiple of 16 X,Y size Framebuffer.\n");
- exit(1);
- }
+
if(cinfo->fb_vinfo.bits_per_pixel != 16){
fprintf(stderr, "This system support only 16 bits per pixel Framebuffer\n");
exit(1);
}
cinfo->fb_yinc = cinfo->fb_vinfo.bits_per_pixel / 8;
+ if(cinfo->image_width % 16 != 0 || cinfo->image_width % 16 != 0){
+ fprintf(stderr, "This system support only multiple of 16 X,Y size motion JPEG.\n");
+ exit(1);
+ }
+
/* access IP core */
printf("setting up hardware\n");
cinfo->dev_fd = open("/dev/kmjpeg", O_RDWR);