summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2012-09-27 14:42:08 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2012-09-27 14:42:08 +0000
commit34ffde6799db4af266e395fdf631b5a8fa87edb2 (patch)
treedee93ecd0101fe6b81a5d53c601df33884024df6
parente7cd945000e4e4fdbd8a484506cab709d6a6359c (diff)
[trunk] Rename bio_create and bio_destroy with opj_ prefix
-rw-r--r--libopenjpeg/bio.c4
-rw-r--r--libopenjpeg/bio.h4
-rw-r--r--libopenjpeg/t2.c20
3 files changed, 14 insertions, 14 deletions
diff --git a/libopenjpeg/bio.c b/libopenjpeg/bio.c
index c0188238..0bf601bb 100644
--- a/libopenjpeg/bio.c
+++ b/libopenjpeg/bio.c
@@ -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);
}
diff --git a/libopenjpeg/bio.h b/libopenjpeg/bio.h
index ee0a082b..61191f7d 100644
--- a/libopenjpeg/bio.h
+++ b/libopenjpeg/bio.h
@@ -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
diff --git a/libopenjpeg/t2.c b/libopenjpeg/t2.c
index 24ef12c7..372b10ea 100644
--- a/libopenjpeg/t2.c
+++ b/libopenjpeg/t2.c
@@ -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) {