Browse Source

Fix estimation of size of UFO6 frame (works for Desy camera)

Suren A. Chilingaryan 5 years ago
parent
commit
010b46493f
2 changed files with 3 additions and 2 deletions
  1. 2 1
      base.c
  2. 1 1
      private.h

+ 2 - 1
base.c

@@ -361,7 +361,8 @@ int ipecamera_start(pcilib_context_t *vctx, pcilib_event_t event_mask, pcilib_ev
 	ctx->dim.width = CMOSIS20_WIDTH;
 	ctx->dim.height = CMOSIS20_MAX_LINES;
 
-	ctx->data_line_size = (2 + CMOSIS20_PIXELS_PER_CHANNEL) * 32;
+	    // There is skipped C0 line once per every two lines (which are in fact encoded together)
+	ctx->data_line_size = CMOSIS20_PIXELS_PER_CHANNEL * 32 + 16;
 	break;
      default:
 	UNLOCK(run);

+ 1 - 1
private.h

@@ -70,7 +70,7 @@
 #define CMOSIS20_WIDTH (CMOSIS20_MAX_CHANNELS * CMOSIS20_PIXELS_PER_CHANNEL)
 */
 #define CMOSIS20_PIXELS_PER_CHANNEL 320
-#define CMOSIS20_WIDTH (CMOSIS_MAX_CHANNELS * CMOSIS_PIXELS_PER_CHANNEL)
+#define CMOSIS20_WIDTH (CMOSIS_MAX_CHANNELS * CMOSIS20_PIXELS_PER_CHANNEL)
 #define CMOSIS20_MAX_LINES 3840
 
 #define IPECAMERA_FRAME_REQUEST 		0x209 // 0x80000209 // 0x1E9