• R/O
  • HTTP
  • SSH
  • HTTPS

leon-mjpeg: Commit

motionJPEG play on LEON processor


Commit MetaInfo

Revision5acfbddfcdf39a175ecb1b6ea8ca2fde0abd3787 (tree)
Time2011-02-15 16:19:43
AuthorKenichi Kurimoto <kurimoto12@user...>
CommiterKenichi Kurimoto

Log Message

check image size is multiple of 16 -- dmjpeg.c

Change Summary

Incremental Difference

--- a/snapgear-2.6-p42/user/jpeg-6b/dmjpeg.c
+++ b/snapgear-2.6-p42/user/jpeg-6b/dmjpeg.c
@@ -179,10 +179,7 @@ void setup_hardware(j_decompress_ptr cinfo)
179179 fprintf(stderr, "Framebuffer xsize:%d, ysize:%d, vbpp:%d\n",
180180 cinfo->fb_vinfo.xres, cinfo->fb_vinfo.yres, cinfo->fb_vinfo.bits_per_pixel);
181181 //#endif
182- if(cinfo->fb_vinfo.xres % 16 != 0 || cinfo->fb_vinfo.yres % 16 != 0){
183- fprintf(stderr, "This system support only multiple of 16 X,Y size Framebuffer.\n");
184- exit(1);
185- }
182+
186183 if(cinfo->fb_vinfo.bits_per_pixel != 16){
187184 fprintf(stderr, "This system support only 16 bits per pixel Framebuffer\n");
188185 exit(1);
@@ -195,6 +192,11 @@ void setup_hardware(j_decompress_ptr cinfo)
195192 }
196193 cinfo->fb_yinc = cinfo->fb_vinfo.bits_per_pixel / 8;
197194
195+ if(cinfo->image_width % 16 != 0 || cinfo->image_width % 16 != 0){
196+ fprintf(stderr, "This system support only multiple of 16 X,Y size motion JPEG.\n");
197+ exit(1);
198+ }
199+
198200 /* access IP core */
199201 printf("setting up hardware\n");
200202 cinfo->dev_fd = open("/dev/kmjpeg", O_RDWR);
Show on old repository browser