David Brenner
2016-03-10 05:47:14 UTC
Hi,
It's about this: https://github.com/libjpeg-turbo/libjpeg-turbo/issues/65
Since it was closed, I will try to continue the discussion here.
First, thank you dcommander for your tip. It worked.
Now I'm using this:
var
prow: Prgbarray;
RowD: Prgbarray;
............
jpeg.out_color_space := JCS_EXT_BGR;
............
// reading image
jpeg_start_decompress(@jpeg);
// allocate row
GetMem(prow, jpeg.output_width * 3);
inherited SetSize(jpeg.output_width, jpeg.output_height);
inherited PixelFormat := pf24bit;
for y := 0 to jpeg.output_height - 1 do
begin
// reading row
rowD := scanline[y];
jpeg_read_scanlines(@jpeg, @rowD, 1);
end;
It's twice as fast :)
2 questions:
1. Is it safe to use it like this?
2. It's still kind of slow (15..20 ms). Is it possible to transfer the
entire data in one step instead of one row st a time?
Thank you.
Best regards,
David
It's about this: https://github.com/libjpeg-turbo/libjpeg-turbo/issues/65
Since it was closed, I will try to continue the discussion here.
First, thank you dcommander for your tip. It worked.
Now I'm using this:
var
prow: Prgbarray;
RowD: Prgbarray;
............
jpeg.out_color_space := JCS_EXT_BGR;
............
// reading image
jpeg_start_decompress(@jpeg);
// allocate row
GetMem(prow, jpeg.output_width * 3);
inherited SetSize(jpeg.output_width, jpeg.output_height);
inherited PixelFormat := pf24bit;
for y := 0 to jpeg.output_height - 1 do
begin
// reading row
rowD := scanline[y];
jpeg_read_scanlines(@jpeg, @rowD, 1);
end;
It's twice as fast :)
2 questions:
1. Is it safe to use it like this?
2. It's still kind of slow (15..20 ms). Is it possible to transfer the
entire data in one step instead of one row st a time?
Thank you.
Best regards,
David