test suite passes
with all jpegload coming via VipsStreamInput
This commit is contained in:
parent
6c1d7db31b
commit
20cb0da247
@ -16,6 +16,8 @@
|
|||||||
- add @interpretation and @format to rawload
|
- add @interpretation and @format to rawload
|
||||||
- nifti load/save uses double for all floating point metadata
|
- nifti load/save uses double for all floating point metadata
|
||||||
- add vips_error_buffer_copy()
|
- add vips_error_buffer_copy()
|
||||||
|
- add VipsStream ... a universal IO class for loaders and savers
|
||||||
|
- jpegload uses the new IO class
|
||||||
|
|
||||||
31/8/19 started 8.8.3
|
31/8/19 started 8.8.3
|
||||||
- revert sharpen restoring the input colourspace
|
- revert sharpen restoring the input colourspace
|
||||||
|
@ -250,6 +250,26 @@ stream_fill_input_buffer( j_decompress_ptr cinfo )
|
|||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
skip_input_data( j_decompress_ptr cinfo, long num_bytes )
|
||||||
|
{
|
||||||
|
Source *src = (Source *) cinfo->src;
|
||||||
|
|
||||||
|
if( num_bytes > 0 ) {
|
||||||
|
while (num_bytes > (long) src->pub.bytes_in_buffer) {
|
||||||
|
num_bytes -= (long) src->pub.bytes_in_buffer;
|
||||||
|
(void) (*src->pub.fill_input_buffer) (cinfo);
|
||||||
|
|
||||||
|
/* note we assume that fill_input_buffer will never
|
||||||
|
* return FALSE, so suspension need not be handled.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
src->pub.next_input_byte += (size_t) num_bytes;
|
||||||
|
src->pub.bytes_in_buffer -= (size_t) num_bytes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
readjpeg_open_input( ReadJpeg *jpeg )
|
readjpeg_open_input( ReadJpeg *jpeg )
|
||||||
{
|
{
|
||||||
@ -272,6 +292,7 @@ readjpeg_open_input( ReadJpeg *jpeg )
|
|||||||
src->pub.init_source = stream_init_source;
|
src->pub.init_source = stream_init_source;
|
||||||
src->pub.fill_input_buffer = stream_fill_input_buffer;
|
src->pub.fill_input_buffer = stream_fill_input_buffer;
|
||||||
src->pub.resync_to_restart = jpeg_resync_to_restart;
|
src->pub.resync_to_restart = jpeg_resync_to_restart;
|
||||||
|
src->pub.skip_input_data = skip_input_data;
|
||||||
src->pub.bytes_in_buffer = 0;
|
src->pub.bytes_in_buffer = 0;
|
||||||
src->pub.next_input_byte = src->buf;
|
src->pub.next_input_byte = src->buf;
|
||||||
}
|
}
|
||||||
|
@ -197,8 +197,6 @@ vips_foreign_load_jpeg_stream_load( VipsForeignLoad *load )
|
|||||||
static gboolean
|
static gboolean
|
||||||
vips_foreign_load_jpeg_stream_is_a( VipsStreamInput *input )
|
vips_foreign_load_jpeg_stream_is_a( VipsStreamInput *input )
|
||||||
{
|
{
|
||||||
printf( "vips_foreign_load_jpeg_stream_is_a:\n" );
|
|
||||||
|
|
||||||
return( vips__isjpeg_stream( input ) );
|
return( vips__isjpeg_stream( input ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,16 +33,19 @@
|
|||||||
|
|
||||||
/* TODO
|
/* TODO
|
||||||
*
|
*
|
||||||
|
* - filename encoding
|
||||||
* - memory output
|
* - memory output
|
||||||
* - add mmapable descriptors
|
* - add mmapable descriptors
|
||||||
* - add seekable descriptors
|
* - add seekable descriptors
|
||||||
|
* - can we test for mmapable and seekable?
|
||||||
|
* - do we need eof?
|
||||||
* - can we really change all behaviour in the subclass? will we need map and
|
* - can we really change all behaviour in the subclass? will we need map and
|
||||||
* seek as well as read and rewind?
|
* seek as well as read and rewind?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*/
|
|
||||||
#define VIPS_DEBUG
|
#define VIPS_DEBUG
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user