Lines Matching refs:dest

66   my_dest_ptr dest = (my_dest_ptr) cinfo->dest;  in init_destination()  local
69 dest->buffer = (JOCTET *) in init_destination()
73 dest->pub.next_output_byte = dest->buffer; in init_destination()
74 dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; in init_destination()
110 my_dest_ptr dest = (my_dest_ptr) cinfo->dest; in empty_output_buffer() local
112 if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) != in empty_output_buffer()
116 dest->pub.next_output_byte = dest->buffer; in empty_output_buffer()
117 dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; in empty_output_buffer()
127 my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest; in empty_mem_output_buffer() local
130 nextsize = dest->bufsize * 2; in empty_mem_output_buffer()
136 MEMCOPY(nextbuffer, dest->buffer, dest->bufsize); in empty_mem_output_buffer()
138 if (dest->newbuffer != NULL) in empty_mem_output_buffer()
139 free(dest->newbuffer); in empty_mem_output_buffer()
141 dest->newbuffer = nextbuffer; in empty_mem_output_buffer()
143 dest->pub.next_output_byte = nextbuffer + dest->bufsize; in empty_mem_output_buffer()
144 dest->pub.free_in_buffer = dest->bufsize; in empty_mem_output_buffer()
146 dest->buffer = nextbuffer; in empty_mem_output_buffer()
147 dest->bufsize = nextsize; in empty_mem_output_buffer()
165 my_dest_ptr dest = (my_dest_ptr) cinfo->dest; in term_destination() local
166 size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer; in term_destination()
170 if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount) in term_destination()
173 fflush(dest->outfile); in term_destination()
175 if (ferror(dest->outfile)) in term_destination()
182 my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest; in term_mem_destination() local
184 *dest->outbuffer = dest->buffer; in term_mem_destination()
185 *dest->outsize = dest->bufsize - dest->pub.free_in_buffer; in term_mem_destination()
198 my_dest_ptr dest; in jpeg_stdio_dest() local
206 if (cinfo->dest == NULL) { /* first time for this JPEG object? */ in jpeg_stdio_dest()
207 cinfo->dest = (struct jpeg_destination_mgr *) in jpeg_stdio_dest()
212 dest = (my_dest_ptr) cinfo->dest; in jpeg_stdio_dest()
213 dest->pub.init_destination = init_destination; in jpeg_stdio_dest()
214 dest->pub.empty_output_buffer = empty_output_buffer; in jpeg_stdio_dest()
215 dest->pub.term_destination = term_destination; in jpeg_stdio_dest()
216 dest->outfile = outfile; in jpeg_stdio_dest()
238 my_mem_dest_ptr dest; in jpeg_mem_dest() local
246 if (cinfo->dest == NULL) { /* first time for this JPEG object? */ in jpeg_mem_dest()
247 cinfo->dest = (struct jpeg_destination_mgr *) in jpeg_mem_dest()
252 dest = (my_mem_dest_ptr) cinfo->dest; in jpeg_mem_dest()
253 dest->pub.init_destination = init_mem_destination; in jpeg_mem_dest()
254 dest->pub.empty_output_buffer = empty_mem_output_buffer; in jpeg_mem_dest()
255 dest->pub.term_destination = term_mem_destination; in jpeg_mem_dest()
256 dest->outbuffer = outbuffer; in jpeg_mem_dest()
257 dest->outsize = outsize; in jpeg_mem_dest()
258 dest->newbuffer = NULL; in jpeg_mem_dest()
262 dest->newbuffer = *outbuffer = (unsigned char *) malloc(OUTPUT_BUF_SIZE); in jpeg_mem_dest()
263 if (dest->newbuffer == NULL) in jpeg_mem_dest()
268 dest->pub.next_output_byte = dest->buffer = *outbuffer; in jpeg_mem_dest()
269 dest->pub.free_in_buffer = dest->bufsize = *outsize; in jpeg_mem_dest()