Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

int Impala::Core::VideoSet::FrameHashes::Diff ( FrameHashes arg  )  const [inline]

Definition at line 35 of file FrameHashes.h.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get2(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get3(), ILOG_DEBUG, ILOG_ERROR, Impala::Min(), and Impala::Core::Table::Table::Size().

Referenced by Impala::Application::Repository::DoDiffFrameHashes().

00036     {
00037         int nDiffAll = 0;
00038         int framesToCompare = Size();
00039         if (Size() != arg->Size())
00040         {
00041             ILOG_ERROR("Frame count differs: " << Size() << " vs. " <<
00042                        arg->Size());
00043             nDiffAll++;
00044             framesToCompare = Impala::Min(Size(), arg->Size());
00045         }
00046 
00047         int nDiffPre = 0;
00048         int nDiffPost = 0;
00049         for (int i = 0 ; i < framesToCompare ; i++)
00050         {
00051             bool foundDiff = false;
00052             int frameNr = Get1(i);
00053             if (arg->Get1(i) != frameNr)  
00054             {
00055                                 // programmer error or data corruption
00056                 ILOG_ERROR("Frame nr. different for entry " << i <<
00057                            ": " << frameNr << " vs. " << arg->Get1(i));
00058                 foundDiff = true;
00059             }
00060 
00061                         bool diffPre = !Get2(i).Equals(arg->Get2(i));
00062             bool diffPost = !Get3(i).Equals(arg->Get3(i));
00063             if (diffPre)
00064             {
00065                                 nDiffPre++;
00066                 ILOG_DEBUG("Frame " << frameNr << ", before conversion: " <<
00067                            Get2(i) << " vs. " << arg->Get2(i));
00068                         }
00069             else if (diffPost)
00070                         {
00071                                 nDiffPost++;
00072                 ILOG_DEBUG("Frame " << frameNr << ", after conversion: " <<
00073                            Get3(i) << " vs. " << arg->Get3(i));
00074                         }
00075             foundDiff = foundDiff || diffPre || diffPost;
00076             if (foundDiff)
00077                 nDiffAll++;
00078         }
00079         if (nDiffAll > 0)
00080                 {
00081             ILOG_ERROR("Found " << nDiffAll << " differences");
00082             ILOG_ERROR("  Of which " << nDiffPre << " relate to pre-RGB-conversion hashes");
00083             ILOG_ERROR("       and " << nDiffPost << " relate to post-RGB-conversion hashes");
00084                 }
00085         return nDiffAll;
00086     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:21:52 2011 for ImpalaSrc by  doxygen 1.5.1