OpenJPEG
2.2.0
|
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "byte_manager.h"
Macros | |
#define | FCGI_stdout stdout |
#define | FCGI_stderr stderr |
#define | logstream stderr |
Functions | |
Byte_t * | fetch_bytes (int fd, OPJ_OFF_T offset, OPJ_SIZE_T size) |
fetch bytes of data in file stream More... | |
Byte_t | fetch_1byte (int fd, OPJ_OFF_T offset) |
fetch a 1-byte Byte codes in file stream More... | |
Byte2_t | fetch_2bytebigendian (int fd, OPJ_OFF_T offset) |
fetch a 2-byte big endian Byte codes in file stream More... | |
Byte4_t | fetch_4bytebigendian (int fd, OPJ_OFF_T offset) |
fetch a 4-byte big endian Byte codes in file stream More... | |
Byte8_t | fetch_8bytebigendian (int fd, OPJ_OFF_T offset) |
fetch a 8-byte big endian Byte codes in file stream More... | |
Byte2_t | big2 (Byte_t *buf) |
convert 2-byte big endian Byte codes to number More... | |
Byte4_t | big4 (Byte_t *buf) |
convert 4-byte big endian Byte codes to number More... | |
Byte8_t | big8 (Byte_t *buf) |
convert 8-byte big endian Byte codes to number More... | |
void | modify_4Bytecode (Byte4_t code, Byte_t *stream) |
modify 4Byte code in a codestream More... | |
OPJ_OFF_T | get_filesize (int fd) |
Get file size. More... | |
#define FCGI_stderr stderr |
Referenced by fetch_1byte(), fetch_2bytebigendian(), fetch_4bytebigendian(), fetch_8bytebigendian(), fetch_bytes(), and get_filesize().
#define FCGI_stdout stdout |
Referenced by fetch_1byte(), fetch_bytes(), and get_filesize().
#define logstream stderr |
convert 2-byte big endian Byte codes to number
[in] | buf | Byte codes |
Referenced by fetch_2bytebigendian(), gene_ihdrbox(), get_CODmkrdata_from_j2kstream(), get_mainheader_from_j2kstream(), get_SIZmkrdata_from_j2kstream(), and modify_COCmkrstream().
convert 4-byte big endian Byte codes to number
[in] | buf | Byte codes |
Referenced by add_emptyboxstream(), big8(), fetch_4bytebigendian(), gene_boxbyOffinStream(), gene_boxbyOffset(), gene_boxbyType(), gene_boxbyTypeinStream(), gene_ihdrbox(), get_SIZmkrdata_from_j2kstream(), and parse_phld().
convert 8-byte big endian Byte codes to number
[in] | buf | Byte codes |
References big4().
Referenced by add_emptyboxstream(), fetch_8bytebigendian(), gene_boxbyOffinStream(), gene_boxbyOffset(), gene_boxbyType(), gene_boxbyTypeinStream(), and parse_phld().
fetch a 1-byte Byte codes in file stream
[in] | fd | file discriptor |
[in] | offset | start Byte position |
References FCGI_stderr, and FCGI_stdout.
Referenced by fetch_codestream1byte(), and fetch_DBox1byte().
fetch a 2-byte big endian Byte codes in file stream
[in] | fd | file discriptor |
[in] | offset | start Byte position |
References big2(), FCGI_stderr, and fetch_bytes().
Referenced by fetch_codestream2bytebigendian(), and fetch_DBox2bytebigendian().
fetch a 4-byte big endian Byte codes in file stream
[in] | fd | file discriptor |
[in] | offset | start Byte position |
References big4(), FCGI_stderr, and fetch_bytes().
Referenced by fetch_codestream4bytebigendian(), fetch_DBox4bytebigendian(), and gene_boxheader().
fetch a 8-byte big endian Byte codes in file stream
[in] | fd | file discriptor |
[in] | offset | start Byte position |
References big8(), FCGI_stderr, and fetch_bytes().
Referenced by fetch_DBox8bytebigendian(), and gene_boxheader().
Byte_t* fetch_bytes | ( | int | fd, |
OPJ_OFF_T | offset, | ||
OPJ_SIZE_T | size | ||
) |
fetch bytes of data in file stream
[in] | fd | file discriptor |
[in] | offset | start Byte position |
[in] | size | Byte length |
References FCGI_stderr, and FCGI_stdout.
Referenced by add_body_stream(), fetch_2bytebigendian(), fetch_4bytebigendian(), fetch_8bytebigendian(), fetch_codestreambytes(), fetch_DBoxbytes(), fetch_headbytes(), gene_boxbyOffset(), gene_boxbyType(), and gene_boxheader().
OPJ_OFF_T get_filesize | ( | int | fd | ) |
Get file size.
[in] | fd | file discriptor |
References FCGI_stderr, and FCGI_stdout.
Referenced by const_metadatalist(), fread_jpip(), gene_boxbyType(), and parse_jp2file().
modify 4Byte code in a codestream
[in] | code | code value |
[out] | stream | modifying codestream |
Referenced by modify_SIZmkrstream(), and modify_tileheader().