Merge branch 'master' into htj2c
[asdcplib.git] / src / JP2K_Sequence_Parser.cpp
index a08044000ba1df1ab804b0fb27da31112fe4b485..c5610337fd3fedbd863b792b5632a1810cec9d63 100755 (executable)
@@ -249,6 +249,57 @@ operator==(const ASDCP::JP2K::CodingStyleDefault_t& lhs, const ASDCP::JP2K::Codi
   return true;
 }
 
+//
+bool
+operator==(const ASDCP::JP2K::ExtendedCapabilities_t& lhs, const ASDCP::JP2K::ExtendedCapabilities_t& rhs)
+{
+       if (lhs.N != rhs.N) return false;
+
+       if (lhs.N != JP2K::NoExtendedCapabilitiesSignaled) {
+
+               if (lhs.Pcap != rhs.Pcap) return false;
+
+               for (ui32_t i = 0; i < lhs.N; i++)
+               {
+                       if (lhs.Ccap[i] != rhs.Ccap[i])
+                               return false;
+               }
+
+       }
+
+       return true;
+}
+
+//
+bool
+operator==(const ASDCP::JP2K::CorrespondingProfile_t& lhs, const ASDCP::JP2K::CorrespondingProfile_t& rhs)
+{
+       if (lhs.N != rhs.N) return false;
+
+       for (ui32_t i = 0; i < lhs.N; i++)
+       {
+               if (lhs.Pcpf[i] != rhs.Pcpf[i])
+                       return false;
+       }
+
+       return true;
+}
+
+//
+bool
+operator==(const ASDCP::JP2K::Profile_t& lhs, const ASDCP::JP2K::Profile_t& rhs)
+{
+       if (lhs.N != rhs.N) return false;
+
+       for (ui32_t i = 0; i < lhs.N; i++)
+       {
+               if (lhs.Pprf[i] != rhs.Pprf[i])
+                       return false;
+       }
+
+       return true;
+}
+
 //
 bool
 operator==(const ASDCP::JP2K::PictureDescriptor& lhs, const ASDCP::JP2K::PictureDescriptor& rhs)
@@ -271,6 +322,9 @@ operator==(const ASDCP::JP2K::PictureDescriptor& lhs, const ASDCP::JP2K::Picture
   if ( lhs.Csize != rhs.Csize ) return false;
   if ( ! ( lhs.CodingStyleDefault == rhs.CodingStyleDefault ) ) return false;
   if ( ! ( lhs.QuantizationDefault == rhs.QuantizationDefault ) ) return false;
+  if (!(lhs.Profile == rhs.Profile)) return false;
+  if (!(lhs.CorrespondingProfile == rhs.CorrespondingProfile)) return false;
+  if (!(lhs.ExtendedCapabilities == rhs.ExtendedCapabilities)) return false;
   
   for ( ui32_t i = 0; i < JP2K::MaxComponents; i++ )
     {