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

void Impala::Application::Table::DoDiffKeyframes (  ) 

Definition at line 186 of file mainTable.cpp.

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(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get4(), Impala::CmdOptions::GetArg(), Impala::Util::Database::GetInstance(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), ILOG_INFO, ILOG_VAR, Impala::Core::Table::Read(), and Impala::Core::Table::Table::Size().

Referenced by mainTable().

00187 {
00188     typedef Core::VideoSet::KeyframesBaseType KeyframesBaseType;
00189 
00190     ILOG_VAR(Impala.Application.Table.DoDiffKeyframes);
00191     CmdOptions& options = CmdOptions::GetInstance();
00192     Util::Database* db = &Util::Database::GetInstance();
00193     String fName1 = options.GetArg(1);
00194     KeyframesBaseType table1(0);
00195     Core::Table::Read(&table1, fName1, db);
00196     String fName2 = options.GetArg(2);
00197     KeyframesBaseType table2(0);
00198     Core::Table::Read(&table2, fName2, db);
00199     if (table1.Size() != table2.Size())
00200     {
00201         ILOG_INFO("Different table sizes: " << table1.Size() << " vs "
00202                   << table2.Size());
00203         return;
00204     }
00205     int verb = options.GetInt("verb");
00206     int nDiff = 0;
00207     for (int i=0 ; i<table1.Size() ; i++)
00208     {
00209         if (table1.Get1(i) != table2.Get1(i))
00210         {
00211             nDiff++;
00212             if (verb)
00213                 ILOG_INFO("diff col1 " << i << ": " << table1.Get1(i)
00214                           << " vs " << table2.Get1(i));
00215         }
00216         if (table1.Get2(i) != table2.Get2(i))
00217         {
00218             nDiff++;
00219             if (verb)
00220                 ILOG_INFO("diff col2 " << i << ": " << table1.Get2(i)
00221                           << " vs " << table2.Get2(i));
00222         }
00223         if (table1.Get3(i) != table2.Get3(i))
00224         {
00225             nDiff++;
00226             if (verb)
00227                 ILOG_INFO("diff col3 " << i << ": " << table1.Get3(i)
00228                           << " vs " << table2.Get3(i));
00229         }
00230         if (table1.Get4(i) != table2.Get4(i))
00231         {
00232             nDiff++;
00233             if (verb)
00234                 ILOG_INFO("diff col4 " << i << ": " << table1.Get4(i)
00235                           << " vs " << table2.Get4(i));
00236         }
00237     }
00238     if (nDiff > 0)
00239         ILOG_INFO("Found " << nDiff << " differences");
00240 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:50:49 2010 for ImpalaSrc by  doxygen 1.5.1