added dist hook for new napali source.
[asdcplib.git] / src / JP2K.cpp
index ee979ba02951a86a5651d259a130e1757e0a4feb..b16a6963dac5f674a3863546f004c71b99b53738 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2005-2006, John Hurst
+Copyright (c) 2005-2009, John Hurst
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -89,7 +89,7 @@ ASDCP::JP2K::GetNextMarker(const byte_t** buf, JP2K::Marker& Marker)
 
   if ( Marker.m_DataSize != 0 && Marker.m_DataSize < 3 )
     {
-      DefaultLogSink().Error("Illegal data size: %lu\n", Marker.m_DataSize);
+      DefaultLogSink().Error("Illegal data size: %u\n", Marker.m_DataSize);
       return ASDCP::RESULT_FAIL;
     }
 
@@ -102,7 +102,7 @@ ASDCP::JP2K::GetNextMarker(const byte_t** buf, JP2K::Marker& Marker)
 
 //
 void
-ASDCP::JP2K::Accessor::SIZ::ReadComponent(ui32_t index, ASDCP::JP2K::ImageComponent& IC)
+ASDCP::JP2K::Accessor::SIZ::ReadComponent(ui32_t index, ASDCP::JP2K::ImageComponent_t& IC)
 {
   assert ( index < Csize() );
   const byte_t* p = m_MarkerData + 36 + (index * 3);
@@ -120,15 +120,15 @@ ASDCP::JP2K::Accessor::SIZ::Dump(FILE* stream)
 
   fprintf(stream, "SIZ: \n");
   fprintf(stream, "  Rsize: %hu\n", Rsize());
-  fprintf(stream, "  Xsize: %lu\n", Xsize());
-  fprintf(stream, "  Ysize: %lu\n", Xsize());
-  fprintf(stream, " XOsize: %lu\n", XOsize());
-  fprintf(stream, " YOsize: %lu\n", XOsize());
-  fprintf(stream, " XTsize: %lu\n", XTsize());
-  fprintf(stream, " YTsize: %lu\n", XTsize());
-  fprintf(stream, "XTOsize: %lu\n", XTOsize());
-  fprintf(stream, "YTOsize: %lu\n", YTOsize());
-  fprintf(stream, "  Csize: %lu\n", Csize());
+  fprintf(stream, "  Xsize: %u\n",  Xsize());
+  fprintf(stream, "  Ysize: %u\n",  Ysize());
+  fprintf(stream, " XOsize: %u\n",  XOsize());
+  fprintf(stream, " YOsize: %u\n",  YOsize());
+  fprintf(stream, " XTsize: %u\n",  XTsize());
+  fprintf(stream, " YTsize: %u\n",  YTsize());
+  fprintf(stream, "XTOsize: %u\n",  XTOsize());
+  fprintf(stream, "YTOsize: %u\n",  YTOsize());
+  fprintf(stream, "  Csize: %u\n",  Csize());
 
   if ( Csize() > 0 )
     {
@@ -136,10 +136,10 @@ ASDCP::JP2K::Accessor::SIZ::Dump(FILE* stream)
 
       for ( ui32_t i = 0; i < Csize(); i++ )
        {
-         ImageComponent TmpComp;
+         ImageComponent_t TmpComp;
          ReadComponent(i, TmpComp);
-         fprintf(stream, "%lu: ", i);
-         fprintf(stream, "%lu, %lu, %lu\n", TmpComp.Ssize, TmpComp.XRsize, TmpComp.YRsize);
+         fprintf(stream, "%u: ", i);
+         fprintf(stream, "%u, %u, %u\n", TmpComp.Ssize, TmpComp.XRsize, TmpComp.YRsize);
        }
     }
 }
@@ -162,6 +162,7 @@ ASDCP::JP2K::Accessor::COM::Dump(FILE* stream)
     }
   else
     {
+      fprintf(stream, "COM:\n");
       Kumu::hexdump(CommentData(), CommentSize(), stream);
     }
 }