Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/libopenjpeg20/cio.h

Issue 1416783002: Merge to M46: upgrade openjpeg to commit# cf352af (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@2490
Patch Set: Fix pdfium:168 since we are already half way there Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libopenjpeg20/bio.c ('k') | third_party/libopenjpeg20/cio.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * The copyright in this software is being made available under the 2-clauses 2 * The copyright in this software is being made available under the 2-clauses
3 * BSD License, included below. This software may be subject to other third 3 * BSD License, included below. This software may be subject to other third
4 * party and contributor rights, including patent rights, and no such rights 4 * party and contributor rights, including patent rights, and no such rights
5 * are granted under this license. 5 * are granted under this license.
6 * 6 *
7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium 7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
8 * Copyright (c) 2002-2014, Professor Benoit Macq 8 * Copyright (c) 2002-2014, Professor Benoit Macq
9 * Copyright (c) 2001-2003, David Janssens 9 * Copyright (c) 2001-2003, David Janssens
10 * Copyright (c) 2002-2003, Yannick Verschueren 10 * Copyright (c) 2002-2003, Yannick Verschueren
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 * @param p_value the value to write 177 * @param p_value the value to write
178 * @param p_nb_bytes the number of bytes to write 178 * @param p_nb_bytes the number of bytes to write
179 */ 179 */
180 void opj_write_bytes_BE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_n b_bytes); 180 void opj_write_bytes_BE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_n b_bytes);
181 181
182 /** 182 /**
183 * Reads some bytes from the given data buffer, this function is used in Big End ian cpus. 183 * Reads some bytes from the given data buffer, this function is used in Big End ian cpus.
184 * @param p_buffer pointer the data buffer to read data from. 184 * @param p_buffer pointer the data buffer to read data from.
185 * @param p_value pointer to the value that will store the data. 185 * @param p_value pointer to the value that will store the data.
186 * @param p_nb_bytes the nb bytes to read. 186 * @param p_nb_bytes the nb bytes to read.
187 * @return» » » » the number of bytes read or -1 if an err or occured. 187 * @return» » » » the number of bytes read or -1 if an err or occurred.
188 */ 188 */
189 void opj_read_bytes_BE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT 32 p_nb_bytes); 189 void opj_read_bytes_BE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT 32 p_nb_bytes);
190 190
191 /** 191 /**
192 * Write some bytes to the given data buffer, this function is used in Little En dian cpus. 192 * Write some bytes to the given data buffer, this function is used in Little En dian cpus.
193 * @param p_buffer pointer the data buffer to write data to. 193 * @param p_buffer pointer the data buffer to write data to.
194 * @param p_value the value to write 194 * @param p_value the value to write
195 * @param p_nb_bytes the number of bytes to write 195 * @param p_nb_bytes the number of bytes to write
196 * @return» » » » the number of bytes written or -1 if an error occured 196 * @return» » » » the number of bytes written or -1 if an error occurred
197 */ 197 */
198 void opj_write_bytes_LE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_n b_bytes); 198 void opj_write_bytes_LE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_n b_bytes);
199 199
200 /** 200 /**
201 * Reads some bytes from the given data buffer, this function is used in Little Endian cpus. 201 * Reads some bytes from the given data buffer, this function is used in Little Endian cpus.
202 * @param p_buffer pointer the data buffer to read data from. 202 * @param p_buffer pointer the data buffer to read data from.
203 * @param p_value pointer to the value that will store the data. 203 * @param p_value pointer to the value that will store the data.
204 * @param p_nb_bytes the nb bytes to read. 204 * @param p_nb_bytes the nb bytes to read.
205 * @return» » » » the number of bytes read or -1 if an err or occured. 205 * @return» » » » the number of bytes read or -1 if an err or occurred.
206 */ 206 */
207 void opj_read_bytes_LE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT 32 p_nb_bytes); 207 void opj_read_bytes_LE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT 32 p_nb_bytes);
208 208
209 209
210 /** 210 /**
211 * Write some bytes to the given data buffer, this function is used in Little En dian cpus. 211 * Write some bytes to the given data buffer, this function is used in Little En dian cpus.
212 * @param p_buffer pointer the data buffer to write data to. 212 * @param p_buffer pointer the data buffer to write data to.
213 * @param p_value the value to write 213 * @param p_value the value to write
214 */ 214 */
215 void opj_write_double_LE(OPJ_BYTE * p_buffer, OPJ_FLOAT64 p_value); 215 void opj_write_double_LE(OPJ_BYTE * p_buffer, OPJ_FLOAT64 p_value);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 * @param p_value the value to write 262 * @param p_value the value to write
263 */ 263 */
264 void opj_write_float_BE(OPJ_BYTE * p_buffer, OPJ_FLOAT32 p_value); 264 void opj_write_float_BE(OPJ_BYTE * p_buffer, OPJ_FLOAT32 p_value);
265 265
266 /** 266 /**
267 * Reads some bytes from the stream. 267 * Reads some bytes from the stream.
268 * @param p_stream the stream to read data from. 268 * @param p_stream the stream to read data from.
269 * @param p_buffer pointer to the data buffer that will rec eive the data. 269 * @param p_buffer pointer to the data buffer that will rec eive the data.
270 * @param p_size number of bytes to read. 270 * @param p_size number of bytes to read.
271 * @param p_event_mgr the user event manager to be notified of special events. 271 * @param p_event_mgr the user event manager to be notified of special events.
272 * @return» » the number of bytes read, or -1 if an error occured or i f the stream is at the end. 272 * @return» » the number of bytes read, or -1 if an error occurred or if the stream is at the end.
273 */ 273 */
274 OPJ_SIZE_T opj_stream_read_data (opj_stream_private_t * p_stream,OPJ_BYTE * p_bu ffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr); 274 OPJ_SIZE_T opj_stream_read_data (opj_stream_private_t * p_stream,OPJ_BYTE * p_bu ffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
275 275
276 /** 276 /**
277 * Writes some bytes to the stream. 277 * Writes some bytes to the stream.
278 * @param p_stream the stream to write data to. 278 * @param p_stream the stream to write data to.
279 * @param p_buffer pointer to the data buffer holds the dat a to be writtent. 279 * @param p_buffer pointer to the data buffer holds the dat a to be writtent.
280 * @param p_size number of bytes to write. 280 * @param p_size number of bytes to write.
281 * @param p_event_mgr the user event manager to be notified of special events. 281 * @param p_event_mgr the user event manager to be notified of special events.
282 * @return» » the number of bytes writtent, or -1 if an error occured. 282 * @return» » the number of bytes writtent, or -1 if an error occurred .
283 */ 283 */
284 OPJ_SIZE_T opj_stream_write_data (opj_stream_private_t * p_stream,const OPJ_BYTE * p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr); 284 OPJ_SIZE_T opj_stream_write_data (opj_stream_private_t * p_stream,const OPJ_BYTE * p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
285 285
286 /** 286 /**
287 * Writes the content of the stream buffer to the stream. 287 * Writes the content of the stream buffer to the stream.
288 * @param p_stream the stream to write data to. 288 * @param p_stream the stream to write data to.
289 * @param p_event_mgr the user event manager to be notified of special events. 289 * @param p_event_mgr the user event manager to be notified of special events.
290 * @return true if the data could be flushed, false else. 290 * @return true if the data could be flushed, false else.
291 */ 291 */
292 OPJ_BOOL opj_stream_flush (opj_stream_private_t * p_stream, struct opj_event_mgr * p_event_mgr); 292 OPJ_BOOL opj_stream_flush (opj_stream_private_t * p_stream, struct opj_event_mgr * p_event_mgr);
293 293
294 /** 294 /**
295 * Skips a number of bytes from the stream. 295 * Skips a number of bytes from the stream.
296 * @param p_stream the stream to skip data from. 296 * @param p_stream the stream to skip data from.
297 * @param p_size the number of bytes to skip. 297 * @param p_size the number of bytes to skip.
298 * @param p_event_mgr the user event manager to be notified of special events. 298 * @param p_event_mgr the user event manager to be notified of special events.
299 * @return» » the number of bytes skipped, or -1 if an error occured. 299 * @return» » the number of bytes skipped, or -1 if an error occurred.
300 */ 300 */
301 OPJ_OFF_T opj_stream_skip (opj_stream_private_t * p_stream,OPJ_OFF_T p_size, str uct opj_event_mgr * p_event_mgr); 301 OPJ_OFF_T opj_stream_skip (opj_stream_private_t * p_stream,OPJ_OFF_T p_size, str uct opj_event_mgr * p_event_mgr);
302 302
303 /** 303 /**
304 * Tells the byte offset on the stream (similar to ftell). 304 * Tells the byte offset on the stream (similar to ftell).
305 * 305 *
306 * @param p_stream the stream to get the information from. 306 * @param p_stream the stream to get the information from.
307 * 307 *
308 * @return the current position o fthe stream. 308 * @return the current position o fthe stream.
309 */ 309 */
310 OPJ_OFF_T opj_stream_tell (const opj_stream_private_t * p_stream); 310 OPJ_OFF_T opj_stream_tell (const opj_stream_private_t * p_stream);
311 311
312 312
313 /** 313 /**
314 * Get the number of bytes left before the end of the stream (similar to cio_num bytesleft). 314 * Get the number of bytes left before the end of the stream (similar to cio_num bytesleft).
315 * 315 *
316 * @param p_stream the stream to get the information from. 316 * @param p_stream the stream to get the information from.
317 * 317 *
318 * @return Number of bytes left before the end of the stream. 318 * @return Number of bytes left before the end of the stream.
319 */ 319 */
320 OPJ_OFF_T opj_stream_get_number_byte_left (const opj_stream_private_t * p_stream ); 320 OPJ_OFF_T opj_stream_get_number_byte_left (const opj_stream_private_t * p_stream );
321 321
322 /** 322 /**
323 * Skips a number of bytes from the stream. 323 * Skips a number of bytes from the stream.
324 * @param p_stream the stream to skip data from. 324 * @param p_stream the stream to skip data from.
325 * @param p_size the number of bytes to skip. 325 * @param p_size the number of bytes to skip.
326 * @param p_event_mgr the user event manager to be notified of special events. 326 * @param p_event_mgr the user event manager to be notified of special events.
327 * @return» » the number of bytes skipped, or -1 if an error occured. 327 * @return» » the number of bytes skipped, or -1 if an error occurred.
328 */ 328 */
329 OPJ_OFF_T opj_stream_write_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_si ze, struct opj_event_mgr * p_event_mgr); 329 OPJ_OFF_T opj_stream_write_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_si ze, struct opj_event_mgr * p_event_mgr);
330 330
331 /** 331 /**
332 * Skips a number of bytes from the stream. 332 * Skips a number of bytes from the stream.
333 * @param p_stream the stream to skip data from. 333 * @param p_stream the stream to skip data from.
334 * @param p_size the number of bytes to skip. 334 * @param p_size the number of bytes to skip.
335 * @param p_event_mgr the user event manager to be notified of special events. 335 * @param p_event_mgr the user event manager to be notified of special events.
336 * @return» » the number of bytes skipped, or -1 if an error occured. 336 * @return» » the number of bytes skipped, or -1 if an error occurred.
337 */ 337 */
338 OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz e, struct opj_event_mgr * p_event_mgr); 338 OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz e, struct opj_event_mgr * p_event_mgr);
339 339
340 /** 340 /**
341 * Skips a number of bytes from the stream. 341 * Skips a number of bytes from the stream.
342 * @param p_stream the stream to skip data from. 342 * @param p_stream the stream to skip data from.
343 * @param p_size the number of bytes to skip. 343 * @param p_size the number of bytes to skip.
344 * @param p_event_mgr the user event manager to be notified of special events. 344 * @param p_event_mgr the user event manager to be notified of special events.
345 * @return» » OPJ_TRUE if success, or OPJ_FALSE if an error occured. 345 * @return» » OPJ_TRUE if success, or OPJ_FALSE if an error occurred.
346 */ 346 */
347 OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size , struct opj_event_mgr * p_event_mgr); 347 OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size , struct opj_event_mgr * p_event_mgr);
348 348
349 /** 349 /**
350 * Skips a number of bytes from the stream. 350 * Skips a number of bytes from the stream.
351 * @param p_stream the stream to skip data from. 351 * @param p_stream the stream to skip data from.
352 * @param p_size the number of bytes to skip. 352 * @param p_size the number of bytes to skip.
353 * @param p_event_mgr the user event manager to be notified of special events. 353 * @param p_event_mgr the user event manager to be notified of special events.
354 * @return» » the number of bytes skipped, or -1 if an error occured. 354 * @return» » the number of bytes skipped, or -1 if an error occurred.
355 */ 355 */
356 OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz e, struct opj_event_mgr * p_event_mgr); 356 OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz e, struct opj_event_mgr * p_event_mgr);
357 357
358 /** 358 /**
359 * Seeks a number of bytes from the stream. 359 * Seeks a number of bytes from the stream.
360 * @param p_stream the stream to skip data from. 360 * @param p_stream the stream to skip data from.
361 * @param p_size the number of bytes to skip. 361 * @param p_size the number of bytes to skip.
362 * @param p_event_mgr the user event manager to be notified of special events. 362 * @param p_event_mgr the user event manager to be notified of special events.
363 * @return true if the stream is seekable. 363 * @return true if the stream is seekable.
364 */ 364 */
(...skipping 25 matching lines...) Expand all
390 OPJ_BOOL opj_stream_default_seek (OPJ_OFF_T p_nb_bytes, void * p_user_data); 390 OPJ_BOOL opj_stream_default_seek (OPJ_OFF_T p_nb_bytes, void * p_user_data);
391 391
392 /* ----------------------------------------------------------------------- */ 392 /* ----------------------------------------------------------------------- */
393 /*@}*/ 393 /*@}*/
394 394
395 /*@}*/ 395 /*@}*/
396 396
397 397
398 #endif /* __CIO_H */ 398 #endif /* __CIO_H */
399 399
OLDNEW
« no previous file with comments | « third_party/libopenjpeg20/bio.c ('k') | third_party/libopenjpeg20/cio.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698