[trunk] Rename bio_create and bio_destroy with opj_ prefix
authorMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 27 Sep 2012 14:42:08 +0000 (14:42 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 27 Sep 2012 14:42:08 +0000 (14:42 +0000)
libopenjpeg/bio.c
libopenjpeg/bio.h
libopenjpeg/t2.c

index c01882386f2315fcaae253c3291d89ecf0d2f2f3..0bf601bb25c7c1fac30ea8415a989d6caad78b6d 100644 (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);
        }
index ee0a082b8fd5ce99358dc590b7e85971f2ab1d4c..61191f7d745edfd3f7e9ae6ecd66c3c12e90ef68 100644 (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
index 24ef12c732ccad0f5a8362122f3b91f737f16de4..372b10ead3070b27664918f38d3c07c1a0e0e31b 100644 (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) {