/external/libpng/ |
D | pngpread.c | 31 png_process_data(png_structp png_ptr, png_infop info_ptr, in png_process_data() argument 34 if (png_ptr == NULL || info_ptr == NULL) in png_process_data() 37 png_push_restore_buffer(png_ptr, buffer, buffer_size); in png_process_data() 39 while (png_ptr->buffer_size) in png_process_data() 41 png_process_some_data(png_ptr, info_ptr); in png_process_data() 49 png_process_some_data(png_structp png_ptr, png_infop info_ptr) in png_process_some_data() argument 51 if (png_ptr == NULL) in png_process_some_data() 54 switch (png_ptr->process_mode) in png_process_some_data() 58 png_push_read_sig(png_ptr, info_ptr); in png_process_some_data() 64 png_push_read_chunk(png_ptr, info_ptr); in png_process_some_data() [all …]
|
D | pngread.c | 47 png_structp png_ptr; in png_create_read_struct_2() local 60 png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, in png_create_read_struct_2() 63 png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); in png_create_read_struct_2() 65 if (png_ptr == NULL) in png_create_read_struct_2() 70 png_ptr->user_width_max = PNG_USER_WIDTH_MAX; in png_create_read_struct_2() 71 png_ptr->user_height_max = PNG_USER_HEIGHT_MAX; in png_create_read_struct_2() 74 png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; in png_create_read_struct_2() 78 png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX; in png_create_read_struct_2() 86 if (setjmp(png_ptr->jmpbuf)) in png_create_read_struct_2() 89 png_free(png_ptr, png_ptr->zbuf); in png_create_read_struct_2() [all …]
|
D | pngrutil.c | 29 __inline double png_strtod(png_structp png_ptr, PNG_CONST char *nptr, in png_strtod() argument 37 str = (wchar_t *)png_malloc(png_ptr, len * png_sizeof(wchar_t)); in png_strtod() 44 png_free(png_ptr, str); in png_strtod() 54 png_get_uint_31(png_structp png_ptr, png_bytep buf) in png_get_uint_31() argument 66 png_error(png_ptr, "PNG unsigned integer out of range."); in png_get_uint_31() 112 png_read_chunk_header(png_structp png_ptr) in png_read_chunk_header() argument 118 png_read_data(png_ptr, buf, 8); in png_read_chunk_header() 119 length = png_get_uint_31(png_ptr, buf); in png_read_chunk_header() 122 png_memcpy(png_ptr->chunk_name, buf + 4, 4); in png_read_chunk_header() 125 png_ptr->chunk_name, length); in png_read_chunk_header() [all …]
|
D | pngwrite.c | 30 png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) in png_write_info_before_PLTE() argument 34 if (png_ptr == NULL || info_ptr == NULL) in png_write_info_before_PLTE() 36 if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) in png_write_info_before_PLTE() 39 png_write_sig(png_ptr); in png_write_info_before_PLTE() 41 if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \ in png_write_info_before_PLTE() 42 (png_ptr->mng_features_permitted)) in png_write_info_before_PLTE() 44 png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); in png_write_info_before_PLTE() 45 png_ptr->mng_features_permitted = 0; in png_write_info_before_PLTE() 49 png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, in png_write_info_before_PLTE() 64 png_write_gAMA(png_ptr, info_ptr->gamma); in png_write_info_before_PLTE() [all …]
|
D | pngwutil.c | 63 png_write_sig(png_structp png_ptr) in png_write_sig() argument 68 png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], in png_write_sig() 69 (png_size_t)(8 - png_ptr->sig_bytes)); in png_write_sig() 70 if (png_ptr->sig_bytes < 3) in png_write_sig() 71 png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; in png_write_sig() 84 png_write_chunk(png_structp png_ptr, png_bytep chunk_name, in png_write_chunk() argument 87 if (png_ptr == NULL) in png_write_chunk() 89 png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length); in png_write_chunk() 90 png_write_chunk_data(png_ptr, data, (png_size_t)length); in png_write_chunk() 91 png_write_chunk_end(png_ptr); in png_write_chunk() [all …]
|
D | pngmem.c | 57 png_structp png_ptr = &dummy_struct; in png_create_struct_2() local 58 png_ptr->mem_ptr=mem_ptr; in png_create_struct_2() 59 struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size); in png_create_struct_2() 89 png_structp png_ptr = &dummy_struct; in png_destroy_struct_2() local 90 png_ptr->mem_ptr=mem_ptr; in png_destroy_struct_2() 91 (*(free_fn))(png_ptr, struct_ptr); in png_destroy_struct_2() 119 png_calloc(png_structp png_ptr, png_uint_32 size) in png_calloc() argument 123 ret = (png_malloc(png_ptr, size)); in png_calloc() 130 png_malloc(png_structp png_ptr, png_uint_32 size) in png_malloc() argument 134 if (png_ptr == NULL || size == 0) in png_malloc() [all …]
|
D | example.c | 34 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) 85 png_structp png_ptr; 98 png_structp png_ptr; 110 png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 113 if (png_ptr == NULL) 120 info_ptr = png_create_info_struct(png_ptr); 124 png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); 133 if (setjmp(png_jmpbuf(png_ptr))) 136 png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); 145 png_init_io(png_ptr, fp); [all …]
|
D | pngerror.c | 25 png_default_error PNGARG((png_structp png_ptr, 29 png_default_warning PNGARG((png_structp png_ptr, 40 png_error(png_structp png_ptr, png_const_charp error_message) in png_error() argument 44 if (png_ptr != NULL) in png_error() 46 if (png_ptr->flags& in png_error() 56 if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) in png_error() 69 if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) in png_error() 79 if (png_ptr != NULL && png_ptr->error_fn != NULL) in png_error() 80 (*(png_ptr->error_fn))(png_ptr, error_message); in png_error() 84 png_default_error(png_ptr, error_message); in png_error() [all …]
|
D | pngrtran.c | 26 png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) in png_set_crc_action() argument 30 if (png_ptr == NULL) in png_set_crc_action() 40 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 41 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; in png_set_crc_action() 45 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 46 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | in png_set_crc_action() 51 png_warning(png_ptr, in png_set_crc_action() 57 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 68 png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; in png_set_crc_action() 69 png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; in png_set_crc_action() [all …]
|
D | png.c | 99 png_set_sig_bytes(png_structp png_ptr, int num_bytes) in png_set_sig_bytes() argument 103 if (png_ptr == NULL) in png_set_sig_bytes() 107 png_error(png_ptr, "Too many bytes for PNG signature."); in png_set_sig_bytes() 109 png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes); in png_set_sig_bytes() 158 png_zalloc(voidpf png_ptr, uInt items, uInt size) in png_zalloc() argument 161 png_structp p=(png_structp)png_ptr; in png_zalloc() 165 if (png_ptr == NULL) in png_zalloc() 175 ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes); in png_zalloc() 202 png_zfree(voidpf png_ptr, voidpf ptr) in png_zfree() argument 204 png_free((png_structp)png_ptr, (png_voidp)ptr); in png_zfree() [all …]
|
D | pngset.c | 26 png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) in png_set_bKGD() argument 30 if (png_ptr == NULL || info_ptr == NULL) in png_set_bKGD() 41 png_set_cHRM(png_structp png_ptr, png_infop info_ptr, in png_set_cHRM() argument 47 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM() 74 png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, in png_set_cHRM_fixed() argument 81 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM_fixed() 85 if (png_check_cHRM_fixed(png_ptr, in png_set_cHRM_fixed() 116 png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma) in png_set_gAMA() argument 122 if (png_ptr == NULL || info_ptr == NULL) in png_set_gAMA() 128 png_warning(png_ptr, "Limiting gamma to 21474.83"); in png_set_gAMA() [all …]
|
D | pngrio.c | 33 png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) in png_read_data() argument 37 if (png_ptr->read_data_fn != NULL) in png_read_data() 38 (*(png_ptr->read_data_fn))(png_ptr, data, length); in png_read_data() 40 png_error(png_ptr, "Call to NULL read function"); in png_read_data() 43 png_ptr->total_data_read += length; in png_read_data() 49 png_seek_data(png_structp png_ptr, png_uint_32 offset) in png_seek_data() argument 51 if (png_ptr->seek_data_fn != NULL) in png_seek_data() 52 (*(png_ptr->seek_data_fn))(png_ptr, offset); in png_seek_data() 54 png_error(png_ptr, "Call to NULL seek function"); in png_seek_data() 66 png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) in png_default_read_data() argument [all …]
|
D | pngwio.c | 34 png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) in png_write_data() argument 36 if (png_ptr->write_data_fn != NULL ) in png_write_data() 37 (*(png_ptr->write_data_fn))(png_ptr, data, length); in png_write_data() 39 png_error(png_ptr, "Call to NULL write function"); in png_write_data() 50 png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) in png_default_write_data() argument 54 if (png_ptr == NULL) in png_default_write_data() 57 if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) in png_default_write_data() 60 check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); in png_default_write_data() 63 png_error(png_ptr, "Write Error"); in png_default_write_data() 75 png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) in png_default_write_data() argument [all …]
|
/external/qemu/distrib/libpng-1.2.19/ |
D | pngpread.c | 28 png_process_data(png_structp png_ptr, png_infop info_ptr, in png_process_data() argument 31 if(png_ptr == NULL) return; in png_process_data() 32 png_push_restore_buffer(png_ptr, buffer, buffer_size); in png_process_data() 34 while (png_ptr->buffer_size) in png_process_data() 36 png_process_some_data(png_ptr, info_ptr); in png_process_data() 44 png_process_some_data(png_structp png_ptr, png_infop info_ptr) in png_process_some_data() argument 46 if(png_ptr == NULL) return; in png_process_some_data() 47 switch (png_ptr->process_mode) in png_process_some_data() 51 png_push_read_sig(png_ptr, info_ptr); in png_process_some_data() 56 png_push_read_chunk(png_ptr, info_ptr); in png_process_some_data() [all …]
|
D | pngread.c | 38 png_structp png_ptr; in png_create_read_struct_2() local 50 png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, in png_create_read_struct_2() 53 png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); in png_create_read_struct_2() 55 if (png_ptr == NULL) in png_create_read_struct_2() 60 png_init_mmx_flags(png_ptr); /* 1.2.0 addition */ in png_create_read_struct_2() 66 png_ptr->user_width_max=PNG_USER_WIDTH_MAX; in png_create_read_struct_2() 67 png_ptr->user_height_max=PNG_USER_HEIGHT_MAX; in png_create_read_struct_2() 74 if (setjmp(png_ptr->jmpbuf)) in png_create_read_struct_2() 77 png_free(png_ptr, png_ptr->zbuf); in png_create_read_struct_2() 78 png_ptr->zbuf=NULL; in png_create_read_struct_2() [all …]
|
D | pngwrite.c | 26 png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) in png_write_info_before_PLTE() argument 29 if (png_ptr == NULL || info_ptr == NULL) in png_write_info_before_PLTE() 31 if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) in png_write_info_before_PLTE() 33 png_write_sig(png_ptr); /* write PNG signature */ in png_write_info_before_PLTE() 35 if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted)) in png_write_info_before_PLTE() 37 png_warning(png_ptr,"MNG features are not allowed in a PNG datastream"); in png_write_info_before_PLTE() 38 png_ptr->mng_features_permitted=0; in png_write_info_before_PLTE() 42 png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, in png_write_info_before_PLTE() 56 png_write_gAMA(png_ptr, info_ptr->gamma); in png_write_info_before_PLTE() 59 png_write_gAMA_fixed(png_ptr, info_ptr->int_gamma); in png_write_info_before_PLTE() [all …]
|
D | pngrutil.c | 26 __inline double png_strtod(png_structp png_ptr, PNG_CONST char *nptr, char **endptr) in png_strtod() argument 33 str = (wchar_t *)png_malloc(png_ptr, len * sizeof(wchar_t)); in png_strtod() 40 png_free(png_ptr, str); in png_strtod() 50 png_get_uint_31(png_structp png_ptr, png_bytep buf) in png_get_uint_31() argument 54 png_error(png_ptr, "PNG unsigned integer out of range."); in png_get_uint_31() 97 png_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length) in png_crc_read() argument 99 if(png_ptr == NULL) return; in png_crc_read() 100 png_read_data(png_ptr, buf, length); in png_crc_read() 101 png_calculate_crc(png_ptr, buf, length); in png_crc_read() 109 png_crc_finish(png_structp png_ptr, png_uint_32 skip) in png_crc_finish() argument [all …]
|
D | pngwutil.c | 62 png_write_chunk(png_structp png_ptr, png_bytep chunk_name, in png_write_chunk() argument 65 if(png_ptr == NULL) return; in png_write_chunk() 66 png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length); in png_write_chunk() 67 png_write_chunk_data(png_ptr, data, length); in png_write_chunk() 68 png_write_chunk_end(png_ptr); in png_write_chunk() 76 png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, in png_write_chunk_start() argument 81 if(png_ptr == NULL) return; in png_write_chunk_start() 85 png_write_data(png_ptr, buf, (png_size_t)4); in png_write_chunk_start() 88 png_write_data(png_ptr, chunk_name, (png_size_t)4); in png_write_chunk_start() 90 png_reset_crc(png_ptr); in png_write_chunk_start() [all …]
|
D | pngmem.c | 54 png_structp png_ptr = &dummy_struct; in png_create_struct_2() local 55 png_ptr->mem_ptr=mem_ptr; in png_create_struct_2() 56 struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size); in png_create_struct_2() 86 png_structp png_ptr = &dummy_struct; in png_destroy_struct_2() local 87 png_ptr->mem_ptr=mem_ptr; in png_destroy_struct_2() 88 (*(free_fn))(png_ptr, struct_ptr); in png_destroy_struct_2() 117 png_malloc(png_structp png_ptr, png_uint_32 size) in png_malloc() argument 121 if (png_ptr == NULL || size == 0) in png_malloc() 125 if(png_ptr->malloc_fn != NULL) in png_malloc() 126 ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); in png_malloc() [all …]
|
D | pngrtran.c | 23 png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) in png_set_crc_action() argument 27 if(png_ptr == NULL) return; in png_set_crc_action() 33 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 34 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; in png_set_crc_action() 37 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 38 png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | in png_set_crc_action() 42 png_warning(png_ptr, "Can't discard critical data on CRC error."); in png_set_crc_action() 46 png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; in png_set_crc_action() 55 png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; in png_set_crc_action() 56 png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; in png_set_crc_action() [all …]
|
D | pngerror.c | 21 png_default_error PNGARG((png_structp png_ptr, 25 png_default_warning PNGARG((png_structp png_ptr, 35 png_error(png_structp png_ptr, png_const_charp error_message) in png_error() argument 39 if (png_ptr != NULL) in png_error() 41 if (png_ptr->flags& in png_error() 50 if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) in png_error() 63 if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) in png_error() 73 if (png_ptr != NULL && png_ptr->error_fn != NULL) in png_error() 74 (*(png_ptr->error_fn))(png_ptr, error_message); in png_error() 78 png_default_error(png_ptr, error_message); in png_error() [all …]
|
D | png.c | 98 png_set_sig_bytes(png_structp png_ptr, int num_bytes) in png_set_sig_bytes() argument 100 if(png_ptr == NULL) return; in png_set_sig_bytes() 103 png_error(png_ptr, "Too many bytes for PNG signature."); in png_set_sig_bytes() 105 png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes); in png_set_sig_bytes() 154 png_zalloc(voidpf png_ptr, uInt items, uInt size) in png_zalloc() argument 157 png_structp p=(png_structp)png_ptr; in png_zalloc() 161 if(png_ptr == NULL) return (NULL); in png_zalloc() 170 ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes); in png_zalloc() 197 png_zfree(voidpf png_ptr, voidpf ptr) in png_zfree() argument 199 png_free((png_structp)png_ptr, (png_voidp)ptr); in png_zfree() [all …]
|
D | pngset.c | 23 png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) in png_set_bKGD() argument 26 if (png_ptr == NULL || info_ptr == NULL) in png_set_bKGD() 37 png_set_cHRM(png_structp png_ptr, png_infop info_ptr, in png_set_cHRM() argument 42 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM() 50 png_warning(png_ptr, in png_set_cHRM() 59 png_warning(png_ptr, in png_set_cHRM() 87 png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, in png_set_cHRM_fixed() argument 93 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM_fixed() 101 png_warning(png_ptr, in png_set_cHRM_fixed() 125 png_warning(png_ptr, in png_set_cHRM_fixed() [all …]
|
D | pngget.c | 17 png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag) in png_get_valid() argument 19 if (png_ptr != NULL && info_ptr != NULL) in png_get_valid() 26 png_get_rowbytes(png_structp png_ptr, png_infop info_ptr) in png_get_rowbytes() argument 28 if (png_ptr != NULL && info_ptr != NULL) in png_get_rowbytes() 36 png_get_rows(png_structp png_ptr, png_infop info_ptr) in png_get_rows() argument 38 if (png_ptr != NULL && info_ptr != NULL) in png_get_rows() 48 png_get_image_width(png_structp png_ptr, png_infop info_ptr) in png_get_image_width() argument 50 if (png_ptr != NULL && info_ptr != NULL) in png_get_image_width() 58 png_get_image_height(png_structp png_ptr, png_infop info_ptr) in png_get_image_height() argument 60 if (png_ptr != NULL && info_ptr != NULL) in png_get_image_height() [all …]
|
D | pngwio.c | 29 png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) in png_write_data() argument 31 if (png_ptr->write_data_fn != NULL ) in png_write_data() 32 (*(png_ptr->write_data_fn))(png_ptr, data, length); in png_write_data() 34 png_error(png_ptr, "Call to NULL write function"); in png_write_data() 44 png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) in png_default_write_data() argument 48 if(png_ptr == NULL) return; in png_default_write_data() 50 if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) in png_default_write_data() 53 check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); in png_default_write_data() 56 png_error(png_ptr, "Write Error"); in png_default_write_data() 68 png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) in png_default_write_data() argument [all …]
|