]> granicus.if.org Git - openjpeg/commitdiff
[trunk] clean jp2_read_ihdr_v2 interface
authorMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 9 Aug 2012 13:22:25 +0000 (13:22 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 9 Aug 2012 13:22:25 +0000 (13:22 +0000)
libopenjpeg/jp2.c
libopenjpeg/openjpeg.c

index 73744f7e0bb6ae027a4777003be86d505b07b852..524bfa6a1ea638a75dfbfc0cc8cb254f9bb24d67 100644 (file)
@@ -64,14 +64,12 @@ static opj_bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio);
  * @param      p_image_header_size                     the size of the image header
  * @param      p_manager                                       the user event manager.
  *
- * @return     true if the image header is valid, fale else.
+ * @return     true if the image header is valid, false else.
  */
-static opj_bool jp2_read_ihdr_v2(
-                                                       opj_jp2_v2_t *jp2,
-                                                       unsigned char * p_image_header_data,
-                                                       unsigned int p_image_header_size,
-                                                       struct opj_event_mgr * p_manager
-                                                 );
+static opj_bool jp2_read_ihdr_v2(   opj_jp2_v2_t *jp2,
+                                    OPJ_BYTE *p_image_header_data,
+                                    OPJ_INT32 p_image_header_size,
+                                    opj_event_mgr_t * p_manager );
 
 static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio);
 
@@ -656,11 +654,10 @@ static opj_bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio) {
  *
  * @return     true if the image header is valid, fale else.
  */
-opj_bool jp2_read_ihdr_v2(
-                                                       opj_jp2_v2_t *jp2,
-                                                       unsigned char * p_image_header_data,
-                                                       unsigned int p_image_header_size,
-                                                       opj_event_mgr_t * p_manager
+opj_bool jp2_read_ihdr_v2(  opj_jp2_v2_t *jp2,
+                            OPJ_BYTE *p_image_header_data,
+                            OPJ_INT32 p_image_header_size,
+                            opj_event_mgr_t * p_manager
                                                  )
 {
        /* preconditions */
@@ -677,7 +674,7 @@ opj_bool jp2_read_ihdr_v2(
        p_image_header_data += 4;
        opj_read_bytes(p_image_header_data,&(jp2->w),4);                        /* WIDTH */
        p_image_header_data += 4;
-       opj_read_bytes(p_image_header_data,&(jp2->numcomps),2);                 /* NC */
+       opj_read_bytes(p_image_header_data,&(jp2->numcomps),2);         /* NC */
        p_image_header_data += 2;
 
        /* allocate memory for components */
index c03fac31c5b00945abfe9df88704e7fd5cd4fe25..be22535a6ecccb0a51e106dae41266b8dc55e95c 100644 (file)
@@ -1009,6 +1009,7 @@ opj_bool OPJ_CALLCONV opj_write_tile (    opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
+/* ---------------------------------------------------------------------- */
 
 void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
 {
@@ -1027,7 +1028,7 @@ void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
        }
 }
 
-
+/* ---------------------------------------------------------------------- */
 
 /*
  *
@@ -1110,10 +1111,6 @@ void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
        }
 }
 
-
-
-
-
 /* ---------------------------------------------------------------------- */
 /**
  * Helper function.