~martijnbraam/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 2

[PATCH megapixels 1/4] process_pipeline: Set the thumbnail row buffer to correct size

~dos
Details
Message ID
<162260196738.27261.14897092608774681496-0@git.sr.ht>
DKIM signature
missing
Download raw message
Patch: +1 -1
From: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>

Otherwise it's saving 2*image->width bytes of uninitialized memory
image->height times into the DNG file.
---
 src/process_pipeline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/process_pipeline.c b/src/process_pipeline.c
index dd5e4f4..830d2ad 100644
--- a/src/process_pipeline.c
+++ b/src/process_pipeline.c
@@ -401,7 +401,7 @@ process_image_for_capture(const uint8_t *image, int count)
	// Write black thumbnail, only windows uses this
	{
		unsigned char *buf =
			(unsigned char *)calloc(1, (int)mode.width >> 4);
			(unsigned char *)calloc(1, (mode.width >> 4) * 3);
		for (int row = 0; row < (mode.height >> 4); row++) {
			TIFFWriteScanline(tif, buf, row, 0);
		}
-- 
2.30.2

[PATCH megapixels 2/4] process_pipeline: Correctly set BlackLevel TIFF tag

~dos
Details
Message ID
<162260196738.27261.14897092608774681496-1@git.sr.ht>
In-Reply-To
<162260196738.27261.14897092608774681496-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Patch: +2 -1
From: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>

---
 src/process_pipeline.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/process_pipeline.c b/src/process_pipeline.c
index 830d2ad..8cec510 100644
--- a/src/process_pipeline.c
+++ b/src/process_pipeline.c
@@ -429,7 +429,8 @@ process_image_for_capture(const uint8_t *image, int count)
		TIFFSetField(tif, TIFFTAG_WHITELEVEL, 1, &camera->whitelevel);
	}
	if (camera->blacklevel) {
		TIFFSetField(tif, TIFFTAG_BLACKLEVEL, 1, &camera->blacklevel);
		const float blacklevel = camera->blacklevel;
		TIFFSetField(tif, TIFFTAG_BLACKLEVEL, 1, &blacklevel);
	}
	TIFFCheckpointDirectory(tif);
	printf("Writing frame to %s\n", fname);
-- 
2.30.2

[PATCH megapixels 3/4] process_pipeline: Handle non-RAW8 images when saving DNG

~dos
Details
Message ID
<162260196738.27261.14897092608774681496-2@git.sr.ht>
In-Reply-To
<162260196738.27261.14897092608774681496-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Patch: +3 -3
From: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>

---
 src/process_pipeline.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/process_pipeline.c b/src/process_pipeline.c
index 8cec510..4ade340 100644
--- a/src/process_pipeline.c
+++ b/src/process_pipeline.c
@@ -413,7 +413,7 @@ process_image_for_capture(const uint8_t *image, int count)
	TIFFSetField(tif, TIFFTAG_SUBFILETYPE, 0);
	TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, mode.width);
	TIFFSetField(tif, TIFFTAG_IMAGELENGTH, mode.height);
	TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
	TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, mp_pixel_format_bits_per_pixel(mode.pixel_format));
	TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_CFA);
	TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
	TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
@@ -435,9 +435,9 @@ process_image_for_capture(const uint8_t *image, int count)
	TIFFCheckpointDirectory(tif);
	printf("Writing frame to %s\n", fname);

	unsigned char *pLine = (unsigned char *)malloc(mode.width);
	unsigned char *pLine = (unsigned char *)malloc(mp_pixel_format_width_to_bytes(mode.pixel_format, mode.width));
	for (int row = 0; row < mode.height; row++) {
		TIFFWriteScanline(tif, (void *) image + (row * mode.width), row, 0);
		TIFFWriteScanline(tif, (void *) image + (row * mp_pixel_format_width_to_bytes(mode.pixel_format, mode.width)), row, 0);
	}
	free(pLine);
	TIFFWriteDirectory(tif);
-- 
2.30.2

[PATCH megapixels 4/4] process_pipeline: Drop unnecessary malloc

~dos
Details
Message ID
<162260196738.27261.14897092608774681496-3@git.sr.ht>
In-Reply-To
<162260196738.27261.14897092608774681496-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Patch: +0 -2
From: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>

---
 src/process_pipeline.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/process_pipeline.c b/src/process_pipeline.c
index 4ade340..0e4e6e9 100644
--- a/src/process_pipeline.c
+++ b/src/process_pipeline.c
@@ -435,11 +435,9 @@ process_image_for_capture(const uint8_t *image, int count)
	TIFFCheckpointDirectory(tif);
	printf("Writing frame to %s\n", fname);

	unsigned char *pLine = (unsigned char *)malloc(mp_pixel_format_width_to_bytes(mode.pixel_format, mode.width));
	for (int row = 0; row < mode.height; row++) {
		TIFFWriteScanline(tif, (void *) image + (row * mp_pixel_format_width_to_bytes(mode.pixel_format, mode.width)), row, 0);
	}
	free(pLine);
	TIFFWriteDirectory(tif);

	// Add an EXIF block to the tiff
-- 
2.30.2

[megapixels/patches] build failed

builds.sr.ht
Details
Message ID
<CBSSETDO1YTP.1YUXNCAVKANYB@cirno>
In-Reply-To
<162260196738.27261.14897092608774681496-3@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
megapixels/patches: FAILED in 49s

[process_pipeline: Set the thumbnail row buffer to correct size][0] from [~dos][1]

[0]: https://lists.sr.ht/~martijnbraam/public-inbox/patches/23125
[1]: mailto:dos@dosowisko.net

✗ #517618 FAILED megapixels/patches/arch.yml   https://builds.sr.ht/~martijnbraam/job/517618
✗ #517617 FAILED megapixels/patches/alpine.yml https://builds.sr.ht/~martijnbraam/job/517617
Reply to thread Export thread (mbox)