Skip to content

Commit

Permalink
align outlen length with jpeg jeaders. fixes #941
Browse files Browse the repository at this point in the history
  • Loading branch information
msmeissn committed Dec 4, 2023
1 parent af2a91f commit 721f7f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions camlibs/ptp2/chdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ static void yuv_live_to_jpeg(unsigned char *p_yuv,
struct jpeg_error_mgr jerr;
JSAMPROW row_ptr[1];
uint8_t *outbuf = NULL, *tmprowbuf = NULL;
uint64_t outlen = 0;
unsigned long outlen = 0;
unsigned int row_inc;
int sshift, dshift, xshift, skip;

Expand All @@ -1161,8 +1161,8 @@ static void yuv_live_to_jpeg(unsigned char *p_yuv,
sshift = 6;
dshift = (width/height > 2) ? 6 : 12;
xshift = 4;
/* Digic 6 cameras: 8 bit per element UYVY,
* 4 bytes used to encode 2 pixels, need 6 bytes raw YUV data for jpeg encoding */
/* Digic 6 cameras: 8 bit per element UYVY,
* 4 bytes used to encode 2 pixels, need 6 bytes raw YUV data for jpeg encoding */
} else {
row_inc = buf_width*2;
sshift = 4;
Expand Down

0 comments on commit 721f7f8

Please sign in to comment.