Updated the MJ2 codec to be compatible with the recent changes in the OpenJPEG library.
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 12 Sep 2007 08:52:18 +0000 (08:52 +0000)
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Wed, 12 Sep 2007 08:52:18 +0000 (08:52 +0000)
ChangeLog
mj2/meta_out.c
mj2/mj2_to_frames.c
mj2/mj2_to_metadata.sln
mj2/mj2_to_metadata.vcproj

index ddb8977c4aaa86e8b3a88f1277978b7acf354da0..d681d94c5ceb5d5a3f6451d8802eb3191c8f2ee4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@ What's New for OpenJPEG
 ! : changed
 + : added
 
+September 12, 2007
+* [FOD] Updated the MJ2 codec to be compatible with the recent changes in the OpenJPEG library
+
 September 11, 2007
 * [GB] JPWL encoding is finalized correctly into the JP2 file format; added an additional structure in opj_codestream_info, to keep a record of the written markers
 
index c77ec20a6485cefcf2683f4de4e8e084e933b2c8..b6c99e13e0c2ae82a28dfac63e9bd37f54077d2f 100644 (file)
@@ -945,7 +945,7 @@ int xml_out_frame(FILE* file, FILE* xmlout, mj2_sample_t *sample, unsigned int s
        cio = opj_cio_open((opj_common_ptr)dinfo, frame_codestream, sample->sample_size-8);
 
   /* Decode J2K to image: */
-       img = opj_decode(dinfo, cio);
+       img = opj_decode(dinfo, cio, NULL);             /* We don't need cstr_info -> set to NULL */
   if (!img) {
                fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n");
                opj_destroy_decompress(dinfo);
index bf4dfe6b10cf2f5b97bb3fef23a0b6be59a06cb5..6eae57f098c55c4851c077de2148ca6753abd5d3 100644 (file)
@@ -160,7 +160,7 @@ int main(int argc, char *argv[]) {
                /* open a byte stream */
                cio = opj_cio_open((opj_common_ptr)dinfo, frame_codestream, sample->sample_size-8);
                
-               img = opj_decode(dinfo, cio); // Decode J2K to image
+               img = opj_decode(dinfo, cio, NULL); // Decode J2K to image. We will not use the cstr_info afterwards -> set to NULL
                                
     if (((img->numcomps == 3) && (img->comps[0].dx == img->comps[1].dx / 2) 
       && (img->comps[0].dx == img->comps[2].dx / 2 ) && (img->comps[0].dx == 1)) 
index 7cfbb6f2f855b14796e541bad819d94a528a9d41..32b926d45af59fd0e8cba25cb03b4b14e40e075c 100644 (file)
@@ -1,12 +1,12 @@
 \r
 Microsoft Visual Studio Solution File, Format Version 9.00\r
 # Visual Studio 2005\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mj2_to_metadata", "mj2_to_metadata.vcproj", "{5B7DCDB5-EA9B-4F31-AAE8-44B2DBD44060}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mj2_to_metadata", "mj2_to_metadata.vcproj", "{69BE42AB-E7CE-4DA1-BBD2-39FEA2C91E0B}"\r
        ProjectSection(ProjectDependencies) = postProject\r
-               {4F27AA53-4181-4A1A-8238-3931B0A41048} = {4F27AA53-4181-4A1A-8238-3931B0A41048}\r
+               {0B1B7713-35B6-40A7-9BFF-A7D0EB06A8BD} = {0B1B7713-35B6-40A7-9BFF-A7D0EB06A8BD}\r
        EndProjectSection\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibOpenJPEG", "..\LibOpenJPEG.vcproj", "{4F27AA53-4181-4A1A-8238-3931B0A41048}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibOpenJPEG", "..\LibOpenJPEG.vcproj", "{0B1B7713-35B6-40A7-9BFF-A7D0EB06A8BD}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
@@ -14,14 +14,14 @@ Global
                Release|Win32 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {5B7DCDB5-EA9B-4F31-AAE8-44B2DBD44060}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {5B7DCDB5-EA9B-4F31-AAE8-44B2DBD44060}.Debug|Win32.Build.0 = Debug|Win32\r
-               {5B7DCDB5-EA9B-4F31-AAE8-44B2DBD44060}.Release|Win32.ActiveCfg = Release|Win32\r
-               {5B7DCDB5-EA9B-4F31-AAE8-44B2DBD44060}.Release|Win32.Build.0 = Release|Win32\r
-               {4F27AA53-4181-4A1A-8238-3931B0A41048}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {4F27AA53-4181-4A1A-8238-3931B0A41048}.Debug|Win32.Build.0 = Debug|Win32\r
-               {4F27AA53-4181-4A1A-8238-3931B0A41048}.Release|Win32.ActiveCfg = Release|Win32\r
-               {4F27AA53-4181-4A1A-8238-3931B0A41048}.Release|Win32.Build.0 = Release|Win32\r
+               {69BE42AB-E7CE-4DA1-BBD2-39FEA2C91E0B}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {69BE42AB-E7CE-4DA1-BBD2-39FEA2C91E0B}.Debug|Win32.Build.0 = Debug|Win32\r
+               {69BE42AB-E7CE-4DA1-BBD2-39FEA2C91E0B}.Release|Win32.ActiveCfg = Release|Win32\r
+               {69BE42AB-E7CE-4DA1-BBD2-39FEA2C91E0B}.Release|Win32.Build.0 = Release|Win32\r
+               {0B1B7713-35B6-40A7-9BFF-A7D0EB06A8BD}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {0B1B7713-35B6-40A7-9BFF-A7D0EB06A8BD}.Debug|Win32.Build.0 = Debug|Win32\r
+               {0B1B7713-35B6-40A7-9BFF-A7D0EB06A8BD}.Release|Win32.ActiveCfg = Release|Win32\r
+               {0B1B7713-35B6-40A7-9BFF-A7D0EB06A8BD}.Release|Win32.Build.0 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index e7cde7d0db022def544d469d07e3a7464ce1fa13..4207365cfde58380b07f6b77558fa55689bc3325 100644 (file)
@@ -1,9 +1,9 @@
-                                   <?xml version="1.0" encoding="Windows-1252"?>\r
+<?xml version="1.0" encoding="Windows-1252"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
        Version="8,00"\r
        Name="mj2_to_metadata"\r
-       ProjectGUID="{5B7DCDB5-EA9B-4F31-AAE8-44B2DBD44060}"\r
+       ProjectGUID="{69BE42AB-E7CE-4DA1-BBD2-39FEA2C91E0B}"\r
        >\r
        <Platforms>\r
                <Platform\r
@@ -73,7 +73,7 @@
                                OutputFile=".\mj2_to_metadata___Win32_Debug0/mj2_to_metadata.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
-                               IgnoreDefaultLibraryNames="libc"\r
+                               IgnoreDefaultLibraryNames="LIBCMT"\r
                                GenerateDebugInformation="true"\r
                                ProgramDatabaseFile=".\mj2_to_metadata___Win32_Debug0/mj2_to_metadata.pdb"\r
                                SubSystem="1"\r
                                OutputFile=".\Release/mj2_to_metadata.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
-                               IgnoreDefaultLibraryNames="libc"\r
+                               IgnoreDefaultLibraryNames="libcmtd"\r
                                ProgramDatabaseFile=".\Release/mj2_to_metadata.pdb"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r