[trunk] Rename bio_create and bio_destroy with opj_ prefix

This commit is contained in:
Mickael Savinaud 2012-09-27 14:42:08 +00:00
parent e7cd945000
commit 34ffde6799
3 changed files with 14 additions and 14 deletions

View File

@ -114,12 +114,12 @@ OPJ_UINT32 opj_bio_getbit(opj_bio_t *bio) {
==========================================================
*/
opj_bio_t* bio_create(void) {
opj_bio_t* opj_bio_create(void) {
opj_bio_t *bio = (opj_bio_t*)opj_malloc(sizeof(opj_bio_t));
return bio;
}
void bio_destroy(opj_bio_t *bio) {
void opj_bio_destroy(opj_bio_t *bio) {
if(bio) {
opj_free(bio);
}

View File

@ -67,12 +67,12 @@ typedef struct opj_bio {
Create a new BIO handle
@return Returns a new BIO handle if successful, returns NULL otherwise
*/
opj_bio_t* bio_create(void);
opj_bio_t* opj_bio_create(void);
/**
Destroy a previously created BIO handle
@param bio BIO handle to destroy
*/
void bio_destroy(opj_bio_t *bio);
void opj_bio_destroy(opj_bio_t *bio);
/**
Number of bytes written.
@param bio BIO handle

View File

@ -561,7 +561,7 @@ opj_bool opj_t2_encode_packet( OPJ_UINT32 tileno,
}
}
bio = bio_create();
bio = opj_bio_create();
bio_init_enc(bio, c, length);
bio_write(bio, 1, 1); /* Empty header bit */
@ -654,7 +654,7 @@ opj_bool opj_t2_encode_packet( OPJ_UINT32 tileno,
}
if (bio_flush(bio)) {
bio_destroy(bio);
opj_bio_destroy(bio);
return OPJ_FALSE; /* modified to eliminate longjmp !! */
}
@ -662,7 +662,7 @@ opj_bool opj_t2_encode_packet( OPJ_UINT32 tileno,
c += l_nb_bytes;
length -= l_nb_bytes;
bio_destroy(bio);
opj_bio_destroy(bio);
/* <EPH 0xff92> */
if (tcp->csty & J2K_CP_CSTY_EPH) {
@ -839,7 +839,7 @@ opj_bool opj_t2_read_packet_header( opj_t2_v2_t* p_t2,
step 2: Return to codestream for decoding
*/
l_bio = bio_create();
l_bio = opj_bio_create();
if (! l_bio) {
return OPJ_FALSE;
}
@ -868,7 +868,7 @@ opj_bool opj_t2_read_packet_header( opj_t2_v2_t* p_t2,
if (!l_present) {
bio_inalign(l_bio);
l_header_data += bio_numbytes(l_bio);
bio_destroy(l_bio);
opj_bio_destroy(l_bio);
/* EPH markers */
if (p_tcp->csty & J2K_CP_CSTY_EPH) {
@ -949,7 +949,7 @@ opj_bool opj_t2_read_packet_header( opj_t2_v2_t* p_t2,
if (!l_cblk->numsegs) {
if (! opj_t2_init_seg(l_cblk, l_segno, p_tcp->tccps[p_pi->compno].cblksty, 1)) {
bio_destroy(l_bio);
opj_bio_destroy(l_bio);
return OPJ_FALSE;
}
}
@ -958,7 +958,7 @@ opj_bool opj_t2_read_packet_header( opj_t2_v2_t* p_t2,
if (l_cblk->segs[l_segno].numpasses == l_cblk->segs[l_segno].maxpasses) {
++l_segno;
if (! opj_t2_init_seg(l_cblk, l_segno, p_tcp->tccps[p_pi->compno].cblksty, 0)) {
bio_destroy(l_bio);
opj_bio_destroy(l_bio);
return OPJ_FALSE;
}
}
@ -974,7 +974,7 @@ opj_bool opj_t2_read_packet_header( opj_t2_v2_t* p_t2,
++l_segno;
if (! opj_t2_init_seg(l_cblk, l_segno, p_tcp->tccps[p_pi->compno].cblksty, 0)) {
bio_destroy(l_bio);
opj_bio_destroy(l_bio);
return OPJ_FALSE;
}
}
@ -987,12 +987,12 @@ opj_bool opj_t2_read_packet_header( opj_t2_v2_t* p_t2,
}
if (bio_inalign(l_bio)) {
bio_destroy(l_bio);
opj_bio_destroy(l_bio);
return OPJ_FALSE;
}
l_header_data += bio_numbytes(l_bio);
bio_destroy(l_bio);
opj_bio_destroy(l_bio);
/* EPH markers */
if (p_tcp->csty & J2K_CP_CSTY_EPH) {