INTEGRATION: CWS jl47_SRC680 (1.12.84.1.6); FILE MERGED 2006/09/20 11:48:32 jl 1.12.84.1.6.1: #i69642# added default language in case there is no user installation

--- desktop/source/deployment/misc/dp_resource.cxx
+++ desktop/source/deployment/misc/dp_resource.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dp_resource.cxx,v $
  *
- *  $Revision: 1.14 $
- *
- *  last change: $Author: obo $ $Date: 2006-09-17 09:42:02 $
+ *  $Revision: 1.15 $
+ *
+ *  last change: $Author: vg $ $Date: 2006-09-26 14:21:32 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -40,6 +40,7 @@
 #include "dp_resource.h"
 #include "osl/module.hxx"
 #include "osl/mutex.hxx"
+#include "rtl/ustring.h"
 #include "cppuhelper/implbase1.hxx"
 #include "unotools/configmgr.hxx"

@@ -58,6 +59,10 @@
         if (! (::utl::ConfigManager::GetDirectConfigProperty(
                    ::utl::ConfigManager::LOCALE ) >>= slang))
             throw RuntimeException( OUSTR("Cannot determine language!"), 0 );
+        //fallback, the locale is currently only set when the user starts the
+        //office for the first time.
+        if (slang.getLength() == 0)
+            slang =  rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en-US"));
         return toLocale(slang);
     }
 };


+ revert to "limit 1" logic
+ discard everything after table name when building
  table descriptor to avoid seq scan

git-svn-id: 5adfda8227e14e59fd47d5bd9925a30df16fed74@963 d397654b-2ff0-0310-9e29-ba003691a0f9

--- plugins/input/sqlite/sqlite_datasource.cpp
+++ plugins/input/sqlite/sqlite_datasource.cpp
@@ -182,8 +182,11 @@
                   we cannot determine the right columns types and names
                   as all column_type are SQLITE_NULL
         */
+
+        std::string::size_type idx = table_.find(table_name);
         std::ostringstream s;
-        s << "select * from " << table_ << " limit 0";
+        s << "select * from (" <<  table_.substr(0,idx + table_name.length()) << ") limit 1";
+
         boost::scoped_ptr<sqlite_resultset> rs (dataset_->execute_query (s.str()));
         if (rs->is_valid () && rs->step_next())
         {


removed GetThrustAxis, has been moved to the helper


Fix MC 2

Fix MC 2


Comment

Comment

--- PWGGA/EMCALTasks/AliAnalysisTaskEMCALPhoton.cxx
+++ PWGGA/EMCALTasks/AliAnalysisTaskEMCALPhoton.cxx
@@ -1,3 +1,9 @@
+// $Id:$
+//
+//
+//
+//
+
 #include "TChain.h"
 #include "TTree.h"
 #include "TH1F.h"


- changed Addtask to run added signals for new MC's

--- PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp.C
+++ PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp.C
@@ -345,7 +345,7 @@
 	if (periodname.CompareTo("LHC12i3") == 0){
 		TObjString *Header2 = new TObjString("BOX");
 		HeaderList->Add(Header2);
-	} else if (periodname.CompareTo("LHC14e2b")){
+	} else if (periodname.CompareTo("LHC14e2b")==0){
 		TObjString *Header2 = new TObjString("pi0_1");
 		HeaderList->Add(Header2);
 		TObjString *Header3 = new TObjString("eta_2");


Fix filling of THnSparse

Fix filling of THnSparse

--- PWGHF/vertexingHF/AliAnalysisTaskCheckEvSel.cxx
+++ PWGHF/vertexingHF/AliAnalysisTaskCheckEvSel.cxx
@@ -584,19 +584,18 @@
     fHistNTracksTPCoutVsNTracklets->Fill(ntracksTPCout,ntrkl);
     fHistNTracksFB4VsNTracklets->Fill(ntracksFB4,ntrkl);
     fHistNTracksBC0VsNTracksFB4->Fill(ntracksBC0,ntracksFB4);
-  }
-
-  Double_t vec4Sp[8];
-  vec4Sp[0]=centr;
-  vec4Sp[1]=zvSPD;
-  vec4Sp[2]=nTrackletsEta1;
-  vec4Sp[3]=nTrackletsGoldenEta14;
-  vec4Sp[4]=nTrackletsGoldenEta1;
-  vec4Sp[5]=nGenerEta1;
-  vec4Sp[6]=nGenerGoldenSPDEta14;
-  vec4Sp[7]=nGenerGoldenSPDEta1;
-  fEventProp->Fill(vec4Sp);
-
+
+    Double_t vec4Sp[8];
+    vec4Sp[0]=centr;
+    vec4Sp[1]=zvSPD;
+    vec4Sp[2]=nTrackletsEta1;
+    vec4Sp[3]=nTrackletsGoldenEta14;
+    vec4Sp[4]=nTrackletsGoldenEta1;
+    vec4Sp[5]=nGenerEta1;
+    vec4Sp[6]=nGenerGoldenSPDEta14;
+    vec4Sp[7]=nGenerGoldenSPDEta1;
+    fEventProp->Fill(vec4Sp);
+  }

   PostData(1,fOutput);
   PostData(2,fCounter);


更新标签栏显示与修复文字错位

更新标签栏显示与修复文字错位

--- Browser/BrowserDlg.cpp
+++ Browser/BrowserDlg.cpp
@@ -101,7 +101,7 @@
 		{
 			pUI = new Browser::TitleUI();
 		}
-
+
 		return pUI;
 	}

@@ -205,6 +205,8 @@
 			if (_tcsnicmp(sCtrlName,_T("tabTitle"),8) == 0){
 				CDuiString sBuffer = msg.pSender->GetText();
 				SetWindowText(m_hWnd, sBuffer.GetData());
+				sBuffer = msg.pSender->GetUserData();
+				editUrl->SetText(sBuffer.GetData());
 				if (m_pBrowser){
 					m_nBrowserSelectedId = msg.pSender->GetTag();
 					m_pBrowser->ShowPage(m_nBrowserSelectedId);
@@ -221,7 +223,7 @@
 		CDuiString sBuffer;
 		if (m_bIsPopup) {
 			CreateBrowserWindow(browser,CefBrowserSettings());
-		}
+		}

 		if(m_bIsPopup){
 			CLabelUI* pTitle = new CLabelUI;
@@ -270,24 +272,39 @@

 	void BrowserDlg::OnSetAddress(CefRefPtr<CefBrowser> browser, const std::wstring& url)
 	{
-		editUrl->SetText(url.c_str());
-	}
-
-	void BrowserDlg::OnSetTitle(CefRefPtr<CefBrowser> browser, const std::wstring& title)
-	{
 		int nTabsCount = uiTabs->GetCount();
 		UINT_PTR nTag = browser->GetIdentifier();
 		for (int idx = 0; idx < nTabsCount; idx++)
 		{
 			DuiLib::CControlUI* pTitle = (DuiLib::CControlUI*)uiTabs->GetItemAt(idx);
-			if (pTitle != NULL && pTitle->GetTag() == nTag){
+			if (pTitle == NULL || _tcsicmp(pTitle->GetClass(), _T("ButtonUI")) == 0)
+				continue;
+			if (pTitle->GetTag() == nTag){
+				pTitle->SetUserData(url.c_str());
+				CDuiString sBuffer = pTitle->GetText();
+				if(sBuffer.GetLength() == 0)
+					pTitle->SetText(url.c_str());
+			}
+		}
+		if (nTag == m_nBrowserSelectedId) {
+			editUrl->SetText(url.c_str());
+		}
+	}
+
+	void BrowserDlg::OnSetTitle(CefRefPtr<CefBrowser> browser, const std::wstring& title)
+	{
+		int nTabsCount = uiTabs->GetCount();
+		UINT_PTR nTag = browser->GetIdentifier();
+		for (int idx = 0; idx < nTabsCount; idx++)
+		{
+			DuiLib::CControlUI* pTitle = (DuiLib::CControlUI*)uiTabs->GetItemAt(idx);
+			if (pTitle == NULL || _tcsicmp(pTitle->GetClass(), _T("ButtonUI")) == 0)
+				continue;
+			if (pTitle->GetTag() == nTag){
 				pTitle->SetText(title.c_str());
 			}
-		}
-		if(nTag == m_nBrowserSelectedId){
-			SetWindowText(m_hWnd, title.c_str());
-		}
-		if (m_bIsPopup) {
+		}
+		if (m_bIsPopup || nTag == m_nBrowserSelectedId) {
 			SetWindowText(m_hWnd, title.c_str());
 		}
 	}
@@ -400,10 +417,10 @@
 		REQUIRE_MAIN_THREAD();

 		int x, y, width, height;
-
+
 		RECT rcWindow = m_rcBrowser;
 		//if(m_bIsPopup)
-			Create(NULL,_T("Browser"),UI_WNDSTYLE_FRAME,WS_EX_APPWINDOW,0,0,0,0,NULL);
+		Create(NULL,_T("Browser"),UI_WNDSTYLE_FRAME,WS_EX_APPWINDOW,0,0,0,0,NULL);
 		if (::IsRectEmpty(&rcWindow)) {
 			CenterWindow();
 		} else {
@@ -441,8 +458,13 @@

 		CefRefPtr<CefFrame> pFrame = browser->GetMainFrame();

-		tabNew->SetVisible(false);
-		uiToolbar->SetVisible(false);
+		if(m_bWithControls){
+			tabNew->SetVisible(true);
+			uiToolbar->SetVisible(true);
+		}else{
+			tabNew->SetVisible(false);
+			uiToolbar->SetVisible(false);
+		}
 		m_BrowserCtrl->ShowPopup(browser, m_hWnd, rcBrowser.left, rcBrowser.top, rcBrowser.right - rcBrowser.left, rcBrowser.bottom - rcBrowser.top);
 		if (m_pBrowser){
 			m_pBrowser->ShowPage(browser->GetIdentifier());


Disable a NetEq unittest on Android. The test tries to register iSAC-swb as send codec and fails.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2303004

Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 3fdeddb59a2fba86887420b29b10405150b77dce

--- modules/audio_coding/neteq4/neteq_unittest.cc
+++ modules/audio_coding/neteq4/neteq_unittest.cc
@@ -837,7 +837,7 @@
   }
 }

-TEST_F(NetEqDecodingTest, BackgroundNoise) {
+TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(BackgroundNoise)) {
   neteq_->SetBackgroundNoiseMode(kBgnOn);
   CheckBgnOff(8000, kBgnOn);
   CheckBgnOff(16000, kBgnOn);


After cancel, don't send 408 in Fork call context finished.

--- src/forkcallcontext.cc
+++ src/forkcallcontext.cc
@@ -164,7 +164,7 @@

 void ForkCallContext::checkFinished(){
 	if (mOutgoings.size() == 0 && (mLateTimerExpired || mLateTimer==NULL)) {
-		if (mIncoming != NULL && mFinal == 0) {
+		if (mIncoming != NULL && !hasFinalResponse()) {
 			if (mBestResponse == NULL) {
 				// Create response
 				shared_ptr<MsgSip> msgsip(mIncoming->createResponse(SIP_408_REQUEST_TIMEOUT));


Changes test condition in AudioDeviceTest.RunPlayoutAndRecordingInFullDuplex

TBR=henrik.lundin

Bug: webrtc:7744
Change-Id: I8e8adc666e4734a9333dc3eaa273f68d66a8d0af
Reviewed-on: https://webrtc-review.googlesource.com/7260
Commit-Queue: Henrik Andreassson <e468f06af92d21183a2a635f545ff5cefc8c8b65@webrtc.org>
Reviewed-by: Henrik Andreassson <e468f06af92d21183a2a635f545ff5cefc8c8b65@webrtc.org>
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#20183}

--- modules/audio_device/audio_device_unittest.cc
+++ modules/audio_device/audio_device_unittest.cc
@@ -703,8 +703,9 @@
   StopPlayout();
   // This thresholds is set rather high to accommodate differences in hardware
   // in several devices. The main idea is to capture cases where a very large
-  // latency is built up.
-  EXPECT_LE(audio_stream.average_size(), 5u);
+  // latency is built up. See http://bugs.webrtc.org/7744 for examples on
+  // bots where relatively large average latencies can happen.
+  EXPECT_LE(audio_stream.average_size(), 25u);
   PRINT("\n");
 }


Crashing on train, another try

Crashing on train, another try

--- PWGUD/UPC/nanoAOD/AliAnalysisTaskUpcNano_MB.cxx
+++ PWGUD/UPC/nanoAOD/AliAnalysisTaskUpcNano_MB.cxx
@@ -75,6 +75,9 @@
 	hITSPIDKaon(0),
 	hITSPIDKaonCorr(0),
 	hTPCdEdxCorr(0),
+	fSPDfile(0),
+  	hBCmod4(0),
+  	hSPDeff(0)

 {


Update guess-the-word.cpp

Update guess-the-word.cpp

--- C++/guess-the-word.cpp
+++ C++/guess-the-word.cpp
@@ -22,7 +22,7 @@
         vector<int> possible(wordlist.size());
         iota(possible.begin(), possible.end(), 0);
         int n = 0;
-        while (!possible.empty() && n < 6) {
+        while (n < 6) {
             auto guess = solve(H, possible);
             n = master.guess(wordlist[guess]);
             vector<int> new_possible;
@@ -78,34 +78,51 @@
 class Solution2 {
 public:
     void findSecretWord(vector<string>& wordlist, Master& master) {
-        for (int i = 0, n = 0; i < 10 && n < 6; ++i) {
-            unordered_map<string, int> count;
-            for (const auto& w1 : wordlist) {
-                for (const auto& w2 : wordlist) {
-                    if (match(w1, w2) == 0) {
-                        ++count[w1];
-                    }
+        vector<vector<int>> H(wordlist.size(), vector<int>(wordlist.size()));
+        for (int i = 0; i < wordlist.size(); ++i) {
+            for (int j = 0; j < wordlist.size(); ++j) {
+                H[i][j] = match(wordlist[i], wordlist[j]);
+            }
+        }
+
+        vector<int> possible(wordlist.size());
+        iota(possible.begin(), possible.end(), 0);
+        int n = 0;
+        while (n < 6) {
+            auto guess = solve(H, possible);
+            n = master.guess(wordlist[guess]);
+            vector<int> new_possible;
+            for (const auto& j : possible) {
+                if (H[guess][j] == n) {
+                    new_possible.emplace_back(j);
                 }
             }
-            string guess;
-            for (const auto& w : wordlist) {
-                if (guess.empty() ||
-                    count[w] < count[guess]) {
-                    guess = w;
-                }
-            }
-            n = master.guess(guess);
-            vector<string> new_wordlist;
-            for (const auto& w : wordlist) {
-                if (match(w, guess) == n) {
-                    new_wordlist.emplace_back(w);
-                }
-            }
-            wordlist = new_wordlist;
+            possible = new_possible;
         }
     }

 private:
+    int solve(const vector<vector<int>>& H,
+              const vector<int>& possible) {
+
+        vector<int> min_max_group = possible;
+        int best_guess = -1;
+        for (const auto& guess : possible) {
+            vector<vector<int>> groups(7);
+            for (const auto& j : possible) {
+                if (j != guess) {
+                    groups[H[guess][j]].emplace_back(j);
+                }
+            }
+            int max_group_i = 0;
+            if (groups[max_group_i].size() < min_max_group.size()) {
+                min_max_group = groups[max_group_i];
+                best_guess = guess;
+            }
+        }
+        return best_guess;
+    }
+
     int match(const string& a, const string& b) {
         int matches = 0;
         for (int i = 0; i < a.length(); ++i) {


Different ITSsa cuts

Different ITSsa cuts

--- PWGUD/UPC/nanoAOD/AliAnalysisTaskUpcNano_MB.cxx
+++ PWGUD/UPC/nanoAOD/AliAnalysisTaskUpcNano_MB.cxx
@@ -149,8 +149,7 @@
   fTrackCutsBit0->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
   fTrackCutsBit5 = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011();

-  fTrackCutsBit1 = new AliESDtrackCuts("ITS stand-alone Track Cuts", "ESD Track Cuts");
-  fTrackCutsBit1->SetRequireITSStandAlone(kTRUE);
+  fTrackCutsBit1 = AliESDtrackCuts::GetStandardITSPureSATrackCuts2010(kFALSE,kTRUE);

   fOutputList = new TList();
   fOutputList ->SetOwner();
@@ -314,7 +313,7 @@
   if(!fEvent) return;
   TString trigger = fEvent->GetFiredTriggerClasses();
   if(!isMC && !trigger.Contains("CCUP29-B") && !trigger.Contains("CCUP30-B") && !trigger.Contains("CCUP31-B"))return;
-
+
   fRunNumber = fEvent->GetRunNumber();

   AliVVZERO *fV0data = fEvent->GetVZEROData();
@@ -357,6 +356,7 @@
   if( fADAdecision != 0 || fADCdecision != 0) return;

   fHistEvents->Fill(1);
+  //cout<<"Event, tracks = "<<fEvent ->GetNumberOfTracks()<<endl;

   TDatabasePDG *pdgdat = TDatabasePDG::Instance();

@@ -402,7 +402,6 @@
     if(isESD){
     	AliESDtrack *trk = dynamic_cast<AliESDtrack*>(fEvent->GetTrack(iTrack));
 	if( !trk ) continue;
-
 	if(fTrackCutsBit0->AcceptTrack(trk))nGoodTracksLoose++;
     	if(!fTrackCutsBit5->AcceptTrack(trk))goodTPCTrack = kFALSE;
     	else{
@@ -414,6 +413,11 @@
     else{
     	AliAODTrack *trk = dynamic_cast<AliAODTrack*>(fEvent->GetTrack(iTrack));
     	if( !trk ) continue;
+
+	//if(trk->IsMuonTrack())cout<<"Muon"<<endl;
+	//else{ for(Int_t i = 0; i<10; i++)cout<<trk->TestFilterBit(1<<i)<<" ";
+		//cout<<endl;
+		//}

     	if(trk->TestFilterBit(1<<0) && (trk->HasPointOnITSLayer(0) || trk->HasPointOnITSLayer(1)))nGoodTracksLoose++;
     	if(!(trk->TestFilterBit(1<<5)))goodTPCTrack = kFALSE;
@@ -438,6 +442,7 @@
 	TrackIndexALL[nGoodTracksTPC+nGoodTracksITS] = iTrack;
     	TrackPtALL[nGoodTracksTPC+nGoodTracksITS] = trk->Pt();
     	nGoodTracksITS++;
+	//cout<<"good its track"<<endl;
     	}


fix tst_qlocalsocket::readBufferOverflow for Windows CE

The TCP socket must get the chance to read data into its read buffer
after the first read operation emptied it.

Reviewed-by: thartman

--- tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -555,14 +555,17 @@
     QVERIFY(server.hasPendingConnections());

     QLocalSocket* serverSocket = server.nextPendingConnection();
-    char* buffer = (char*)qMalloc(dataBufferSize);
+    char buffer[dataBufferSize];
     memset(buffer, 0, dataBufferSize);
     serverSocket->write(buffer, dataBufferSize);
     serverSocket->flush();
-    qFree(buffer);

     QVERIFY(client.waitForReadyRead());
-    QCOMPARE(client.readAll().size(), dataBufferSize);
+    QCOMPARE(client.read(buffer, readBufferSize), qint64(readBufferSize));
+#ifdef QT_LOCALSOCKET_TCP
+    QTest::qWait(250);
+#endif
+    QCOMPARE(client.read(buffer, readBufferSize), qint64(readBufferSize));
 }

 // QLocalSocket/Server can take a name or path, check that it works as expected


Update partial_idct_test.cc to support high bitdepth

BUG=webm:1301

Change-Id: Ieedadee221ce539e39bf806c41331f749f891a3c

--- test/partial_idct_test.cc
+++ test/partial_idct_test.cc
@@ -29,11 +29,23 @@
 using libvpx_test::ACMRandom;

 namespace {
+
 typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride);
+
+#if CONFIG_VP9_HIGHBITDEPTH
+typedef uint16_t Pixel;
+typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride,
+                            int bd);
+#else   // !CONFIG_VP9_HIGHBITDEPTH
+typedef uint8_t Pixel;
 typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride);
-typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, InvTxfmFunc, TX_SIZE, int>
+#endif  // CONFIG_VP9_HIGHBITDEPTH
+
+typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, InvTxfmFunc, TX_SIZE, int,
+                        int>
     PartialInvTxfmParam;
 const int kMaxNumCoeffs = 1024;
+const int kCountTestBlock = 1000;

 // https://bugs.chromium.org/p/webm/issues/detail?id=1332
 // The functions specified do not pass with INT16_MIN/MAX. They fail at the
@@ -57,7 +69,7 @@
   if (a == vpx_idct8x8_64_add_ssse3 || a == vpx_idct8x8_12_add_ssse3) {
     return -23625 + 1;
   }
-#elif HAVE_NEON
+#elif HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH
   if (a == vpx_idct4x4_16_add_neon) {
     return std::numeric_limits<int16_t>::min() + 1;
   }
@@ -70,11 +82,14 @@
  public:
   virtual ~PartialIDctTest() {}
   virtual void SetUp() {
+    ACMRandom rnd(ACMRandom::DeterministicSeed());
     ftxfm_ = GET_PARAM(0);
     full_itxfm_ = GET_PARAM(1);
     partial_itxfm_ = GET_PARAM(2);
     tx_size_ = GET_PARAM(3);
     last_nonzero_ = GET_PARAM(4);
+    bit_depth_ = GET_PARAM(5);
+    mask_ = (1 << bit_depth_) - 1;

     switch (tx_size_) {
       case TX_4X4: size_ = 4; break;
@@ -83,14 +98,26 @@
       case TX_32X32: size_ = 32; break;
       default: FAIL() << "Wrong Size!"; break;
     }
-    block_size_ = size_ * size_;
+
+    // Randomize stride_ to a value less than or equal to 1024
+    stride_ = rnd(1024) + 1;
+    if (stride_ < size_) {
+      stride_ = size_;
+    }
+    // Align stride_ to 16 if it's bigger than 16.
+    if (stride_ > 16) {
+      stride_ &= ~15;
+    }
+
+    input_block_size_ = size_ * size_;
+    output_block_size_ = size_ * stride_;

     input_block_ = reinterpret_cast<tran_low_t *>(
-        vpx_memalign(16, sizeof(*input_block_) * block_size_));
-    output_block_ = reinterpret_cast<uint8_t *>(
-        vpx_memalign(16, sizeof(*output_block_) * block_size_));
-    output_block_ref_ = reinterpret_cast<uint8_t *>(
-        vpx_memalign(16, sizeof(*output_block_ref_) * block_size_));
+        vpx_memalign(16, sizeof(*input_block_) * input_block_size_));
+    output_block_ = reinterpret_cast<Pixel *>(
+        vpx_memalign(16, sizeof(*output_block_) * output_block_size_));
+    output_block_ref_ = reinterpret_cast<Pixel *>(
+        vpx_memalign(16, sizeof(*output_block_ref_) * output_block_size_));
   }

   virtual void TearDown() {
@@ -103,14 +130,26 @@
     libvpx_test::ClearSystemState();
   }

+  void Exec(InvTxfmFunc func, void *out) {
+#if CONFIG_VP9_HIGHBITDEPTH
+    func(input_block_, CONVERT_TO_BYTEPTR(out), stride_, bit_depth_);
+#else
+    func(input_block_, reinterpret_cast<uint8_t *>(out), stride_);
+#endif
+  }
+
  protected:
   int last_nonzero_;
   TX_SIZE tx_size_;
   tran_low_t *input_block_;
-  uint8_t *output_block_;
-  uint8_t *output_block_ref_;
+  Pixel *output_block_;
+  Pixel *output_block_ref_;
   int size_;
-  int block_size_;
+  int stride_;
+  int input_block_size_;
+  int output_block_size_;
+  int bit_depth_;
+  int mask_;
   FwdTxfmFunc ftxfm_;
   InvTxfmFunc full_itxfm_;
   InvTxfmFunc partial_itxfm_;
@@ -118,29 +157,31 @@

 TEST_P(PartialIDctTest, RunQuantCheck) {
   ACMRandom rnd(ACMRandom::DeterministicSeed());
-
-  const int count_test_block = 1000;
-
   DECLARE_ALIGNED(16, int16_t, input_extreme_block[kMaxNumCoeffs]);
   DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);

-  for (int i = 0; i < count_test_block; ++i) {
+  for (int i = 0; i < kCountTestBlock; ++i) {
     // clear out destination buffer
-    memset(input_block_, 0, sizeof(*input_block_) * block_size_);
-    memset(output_block_, 0, sizeof(*output_block_) * block_size_);
-    memset(output_block_ref_, 0, sizeof(*output_block_ref_) * block_size_);
+    memset(input_block_, 0, sizeof(*input_block_) * input_block_size_);
+    for (int j = 0; j < output_block_size_; ++j) {
+      output_block_[j] = output_block_ref_[j] = rnd.Rand16() & mask_;
+    }

     ACMRandom rnd(ACMRandom::DeterministicSeed());

-    for (int i = 0; i < count_test_block; ++i) {
-      // Initialize a test block with input range [-255, 255].
-      if (i == 0) {
-        for (int j = 0; j < block_size_; ++j) input_extreme_block[j] = 255;
-      } else if (i == 1) {
-        for (int j = 0; j < block_size_; ++j) input_extreme_block[j] = -255;
+    for (int j = 0; j < kCountTestBlock; ++j) {
+      // Initialize a test block with input range [-mask_, mask_].
+      if (j == 0) {
+        for (int k = 0; k < input_block_size_; ++k) {
+          input_extreme_block[k] = mask_;
+        }
+      } else if (j == 1) {
+        for (int k = 0; k < input_block_size_; ++k) {
+          input_extreme_block[k] = -mask_;
+        }
       } else {
-        for (int j = 0; j < block_size_; ++j) {
-          input_extreme_block[j] = rnd.Rand8() % 2 ? 255 : -255;
+        for (int k = 0; k < input_block_size_; ++k) {
+          input_extreme_block[k] = rnd.Rand8() % 2 ? mask_ : -mask_;
         }
       }

@@ -148,32 +189,29 @@

       // quantization with maximum allowed step sizes
       input_block_[0] = (output_ref_block[0] / 1336) * 1336;
-      for (int j = 1; j < last_nonzero_; ++j) {
-        input_block_[vp9_default_scan_orders[tx_size_].scan[j]] =
-            (output_ref_block[j] / 1828) * 1828;
+      for (int k = 1; k < last_nonzero_; ++k) {
+        input_block_[vp9_default_scan_orders[tx_size_].scan[k]] =
+            (output_ref_block[k] / 1828) * 1828;
       }
     }

-    ASM_REGISTER_STATE_CHECK(
-        full_itxfm_(input_block_, output_block_ref_, size_));
-    ASM_REGISTER_STATE_CHECK(
-        partial_itxfm_(input_block_, output_block_, size_));
-
+    ASM_REGISTER_STATE_CHECK(Exec(full_itxfm_, output_block_ref_));
+    ASM_REGISTER_STATE_CHECK(Exec(partial_itxfm_, output_block_));
     ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
-                        sizeof(*output_block_) * block_size_))
+                        sizeof(*output_block_) * output_block_size_))
         << "Error: partial inverse transform produces different results";
   }
 }

 TEST_P(PartialIDctTest, ResultsMatch) {
   ACMRandom rnd(ACMRandom::DeterministicSeed());
-  const int count_test_block = 1000;
   const int max_coeff = 32766 / 4;
-  for (int i = 0; i < count_test_block; ++i) {
+  for (int i = 0; i < kCountTestBlock; ++i) {
     // clear out destination buffer
-    memset(input_block_, 0, sizeof(*input_block_) * block_size_);
-    memset(output_block_, 0, sizeof(*output_block_) * block_size_);
-    memset(output_block_ref_, 0, sizeof(*output_block_ref_) * block_size_);
+    memset(input_block_, 0, sizeof(*input_block_) * input_block_size_);
+    for (int j = 0; j < output_block_size_; ++j) {
+      output_block_[j] = output_block_ref_[j] = rnd.Rand16() & mask_;
+    }
     int max_energy_leftover = max_coeff * max_coeff;
     for (int j = 0; j < last_nonzero_; ++j) {
       int16_t coeff = static_cast<int16_t>(sqrt(1.0 * max_energy_leftover) *
@@ -186,37 +224,32 @@
       input_block_[vp9_default_scan_orders[tx_size_].scan[j]] = coeff;
     }

-    ASM_REGISTER_STATE_CHECK(
-        full_itxfm_(input_block_, output_block_ref_, size_));
-    ASM_REGISTER_STATE_CHECK(
-        partial_itxfm_(input_block_, output_block_, size_));
+    ASM_REGISTER_STATE_CHECK(Exec(full_itxfm_, output_block_ref_));
+    ASM_REGISTER_STATE_CHECK(Exec(partial_itxfm_, output_block_));

     ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
-                        sizeof(*output_block_) * block_size_))
+                        sizeof(*output_block_) * output_block_size_))
         << "Error: partial inverse transform produces different results";
   }
 }

 TEST_P(PartialIDctTest, AddOutputBlock) {
   ACMRandom rnd(ACMRandom::DeterministicSeed());
-  const int count_test_block = 10;
-  for (int i = 0; i < count_test_block; ++i) {
-    memset(input_block_, 0, sizeof(*input_block_) * block_size_);
+  for (int i = 0; i < kCountTestBlock; ++i) {
+    memset(input_block_, 0, sizeof(*input_block_) * input_block_size_);
     for (int j = 0; j < last_nonzero_; ++j) {
       input_block_[vp9_default_scan_orders[tx_size_].scan[j]] = 10;
     }

-    for (int j = 0; j < block_size_; ++j) {
-      output_block_[j] = output_block_ref_[j] = rnd.Rand8();
-    }
-
-    ASM_REGISTER_STATE_CHECK(
-        full_itxfm_(input_block_, output_block_ref_, size_));
-    ASM_REGISTER_STATE_CHECK(
-        partial_itxfm_(input_block_, output_block_, size_));
+    for (int j = 0; j < output_block_size_; ++j) {
+      output_block_[j] = output_block_ref_[j] = rnd.Rand16() & mask_;
+    }
+
+    ASM_REGISTER_STATE_CHECK(Exec(full_itxfm_, output_block_ref_));
+    ASM_REGISTER_STATE_CHECK(Exec(partial_itxfm_, output_block_));

     ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
-                        sizeof(*output_block_) * block_size_))
+                        sizeof(*output_block_) * output_block_size_))
         << "Error: Transform results are not correctly added to output.";
   }
 }
@@ -226,181 +259,282 @@
   const int16_t max_coeff = MaxSupportedCoeff(partial_itxfm_);
   const int16_t min_coeff = MinSupportedCoeff(partial_itxfm_);
   for (int i = 0; i < last_nonzero_; ++i) {
-    memset(input_block_, 0, sizeof(*input_block_) * block_size_);
+    memset(input_block_, 0, sizeof(*input_block_) * input_block_size_);
     // Run once for min and once for max.
     for (int j = 0; j < 2; ++j) {
       const int coeff = j ? min_coeff : max_coeff;

-      memset(output_block_, 0, sizeof(*output_block_) * block_size_);
-      memset(output_block_ref_, 0, sizeof(*output_block_ref_) * block_size_);
+      memset(output_block_, 0, sizeof(*output_block_) * output_block_size_);
+      memset(output_block_ref_, 0,
+             sizeof(*output_block_ref_) * output_block_size_);
       input_block_[vp9_default_scan_orders[tx_size_].scan[i]] = coeff;

-      ASM_REGISTER_STATE_CHECK(
-          full_itxfm_(input_block_, output_block_ref_, size_));
-      ASM_REGISTER_STATE_CHECK(
-          partial_itxfm_(input_block_, output_block_, size_));
+      ASM_REGISTER_STATE_CHECK(Exec(full_itxfm_, output_block_ref_));
+      ASM_REGISTER_STATE_CHECK(Exec(partial_itxfm_, output_block_));

       ASSERT_EQ(0, memcmp(output_block_ref_, output_block_,
-                          sizeof(*output_block_) * block_size_))
+                          sizeof(*output_block_) * output_block_size_))
           << "Error: Fails with single coeff of " << coeff << " at " << i
           << ".";
     }
   }
 }
+
 using std::tr1::make_tuple;
+
+#if CONFIG_VP9_HIGHBITDEPTH
+
+INSTANTIATE_TEST_CASE_P(
+    C, PartialIDctTest,
+    ::testing::Values(
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_1024_add_c, TX_32X32, 1024, 8),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_1024_add_c, TX_32X32, 1024, 10),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_1024_add_c, TX_32X32, 1024, 12),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_34_add_c, TX_32X32, 34, 8),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_34_add_c, TX_32X32, 34, 10),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_34_add_c, TX_32X32, 34, 12),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_1_add_c, TX_32X32, 1, 8),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_1_add_c, TX_32X32, 1, 10),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_1_add_c, TX_32X32, 1, 12),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_256_add_c, TX_16X16, 256, 8),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_256_add_c, TX_16X16, 256, 10),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_256_add_c, TX_16X16, 256, 12),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_10_add_c, TX_16X16, 10, 8),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_10_add_c, TX_16X16, 10, 10),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_10_add_c, TX_16X16, 10, 12),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_1_add_c, TX_16X16, 1, 8),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_1_add_c, TX_16X16, 1, 10),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_1_add_c, TX_16X16, 1, 12),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_64_add_c, TX_8X8, 64, 8),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_64_add_c, TX_8X8, 64, 10),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_64_add_c, TX_8X8, 64, 12),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_12_add_c, TX_8X8, 12, 8),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_12_add_c, TX_8X8, 12, 10),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_12_add_c, TX_8X8, 12, 12),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_1_add_c, TX_8X8, 1, 8),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_1_add_c, TX_8X8, 1, 10),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_1_add_c, TX_8X8, 1, 12),
+        make_tuple(&vpx_highbd_fdct4x4_c, &vpx_highbd_idct4x4_16_add_c,
+                   &vpx_highbd_idct4x4_16_add_c, TX_4X4, 16, 8),
+        make_tuple(&vpx_highbd_fdct4x4_c, &vpx_highbd_idct4x4_16_add_c,
+                   &vpx_highbd_idct4x4_16_add_c, TX_4X4, 16, 10),
+        make_tuple(&vpx_highbd_fdct4x4_c, &vpx_highbd_idct4x4_16_add_c,
+                   &vpx_highbd_idct4x4_16_add_c, TX_4X4, 16, 12),
+        make_tuple(&vpx_highbd_fdct4x4_c, &vpx_highbd_idct4x4_16_add_c,
+                   &vpx_highbd_idct4x4_1_add_c, TX_4X4, 1, 8),
+        make_tuple(&vpx_highbd_fdct4x4_c, &vpx_highbd_idct4x4_16_add_c,
+                   &vpx_highbd_idct4x4_1_add_c, TX_4X4, 1, 10),
+        make_tuple(&vpx_highbd_fdct4x4_c, &vpx_highbd_idct4x4_16_add_c,
+                   &vpx_highbd_idct4x4_1_add_c, TX_4X4, 1, 12)));
+
+#if HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
+INSTANTIATE_TEST_CASE_P(
+    SSE2, PartialIDctTest,
+    ::testing::Values(
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_1_add_sse2, TX_32X32, 1, 8),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_1_add_sse2, TX_32X32, 1, 10),
+        make_tuple(&vpx_highbd_fdct32x32_c, &vpx_highbd_idct32x32_1024_add_c,
+                   &vpx_highbd_idct32x32_1_add_sse2, TX_32X32, 1, 12),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_256_add_sse2, TX_16X16, 256, 8),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_256_add_sse2, TX_16X16, 256, 10),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_256_add_sse2, TX_16X16, 256, 12),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_10_add_sse2, TX_16X16, 10, 8),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_10_add_sse2, TX_16X16, 10, 10),
+        make_tuple(&vpx_highbd_fdct16x16_c, &vpx_highbd_idct16x16_256_add_c,
+                   &vpx_highbd_idct16x16_10_add_sse2, TX_16X16, 10, 12),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_64_add_sse2, TX_8X8, 64, 8),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_64_add_sse2, TX_8X8, 64, 10),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_64_add_sse2, TX_8X8, 64, 12),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_12_add_sse2, TX_8X8, 12, 8),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_12_add_sse2, TX_8X8, 12, 10),
+        make_tuple(&vpx_highbd_fdct8x8_c, &vpx_highbd_idct8x8_64_add_c,
+                   &vpx_highbd_idct8x8_12_add_sse2, TX_8X8, 12, 12),
+        make_tuple(&vpx_highbd_fdct4x4_c, &vpx_highbd_idct4x4_16_add_c,
+                   &vpx_highbd_idct4x4_16_add_sse2, TX_4X4, 1, 8),
+        make_tuple(&vpx_highbd_fdct4x4_c, &vpx_highbd_idct4x4_16_add_c,
+                   &vpx_highbd_idct4x4_16_add_sse2, TX_4X4, 1, 10),
+        make_tuple(&vpx_highbd_fdct4x4_c, &vpx_highbd_idct4x4_16_add_c,
+                   &vpx_highbd_idct4x4_16_add_sse2, TX_4X4, 1, 12)));
+#endif  // HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
+
+#else  // !CONFIG_VP9_HIGHBITDEPTH

 INSTANTIATE_TEST_CASE_P(
     C, PartialIDctTest,
     ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1024_add_c, TX_32X32, 1024),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_135_add_c, TX_32X32, 135),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_34_add_c, TX_32X32, 34),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1_add_c, TX_32X32, 1),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_256_add_c, TX_16X16, 256),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_10_add_c, TX_16X16, 10),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_1_add_c, TX_16X16, 1),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_64_add_c, TX_8X8, 64),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_12_add_c, TX_8X8, 12),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_1_add_c, TX_8X8, 1),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_16_add_c, TX_4X4, 16),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_1_add_c, TX_4X4, 1)));
+                                 &vpx_idct32x32_1024_add_c, TX_32X32, 1024, 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_135_add_c, TX_32X32, 135, 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_34_add_c, TX_32X32, 34, 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_1_add_c, TX_32X32, 1, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_256_add_c, TX_16X16, 256, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_10_add_c, TX_16X16, 10, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_1_add_c, TX_16X16, 1, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_64_add_c, TX_8X8, 64, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_12_add_c, TX_8X8, 12, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_1_add_c, TX_8X8, 1, 8),
+                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
+                                 &vpx_idct4x4_16_add_c, TX_4X4, 16, 8),
+                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
+                                 &vpx_idct4x4_1_add_c, TX_4X4, 1, 8)));

 #if HAVE_NEON && !CONFIG_EMULATE_HARDWARE
-#if CONFIG_VP9_HIGHBITDEPTH
 INSTANTIATE_TEST_CASE_P(
     NEON, PartialIDctTest,
     ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1_add_neon, TX_32X32, 1),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_34_add_neon, TX_32X32, 34),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_1_add_neon, TX_16X16, 1),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_64_add_neon, TX_8X8, 64),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_12_add_neon, TX_8X8, 12),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_1_add_neon, TX_8X8, 1),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_16_add_neon, TX_4X4, 16),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_1_add_neon, TX_4X4, 1)));
-#else   // !CONFIG_VP9_HIGHBITDEPTH
-INSTANTIATE_TEST_CASE_P(
-    NEON, PartialIDctTest,
-    ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1024_add_neon, TX_32X32, 1024),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_135_add_neon, TX_32X32, 135),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_34_add_neon, TX_32X32, 34),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1_add_neon, TX_32X32, 1),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_256_add_neon, TX_16X16, 256),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_10_add_neon, TX_16X16, 10),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_1_add_neon, TX_16X16, 1),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_64_add_neon, TX_8X8, 64),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_12_add_neon, TX_8X8, 12),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_1_add_neon, TX_8X8, 1),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_16_add_neon, TX_4X4, 16),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_1_add_neon, TX_4X4, 1)));
-#endif  // CONFIG_VP9_HIGHBITDEPTH
+                                 &vpx_idct32x32_1024_add_neon, TX_32X32, 1024,
+                                 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_135_add_neon, TX_32X32, 135, 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_34_add_neon, TX_32X32, 34, 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_1_add_neon, TX_32X32, 1, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_256_add_neon, TX_16X16, 256, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_10_add_neon, TX_16X16, 10, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_1_add_neon, TX_16X16, 1, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_64_add_neon, TX_8X8, 64, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_12_add_neon, TX_8X8, 12, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_1_add_neon, TX_8X8, 1, 8),
+                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
+                                 &vpx_idct4x4_16_add_neon, TX_4X4, 16, 8),
+                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
+                                 &vpx_idct4x4_1_add_neon, TX_4X4, 1, 8)));
 #endif  // HAVE_NEON && !CONFIG_EMULATE_HARDWARE

-#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
+#if HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
 // 32x32_135_ is implemented using the 1024 version.
 INSTANTIATE_TEST_CASE_P(
     SSE2, PartialIDctTest,
     ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1024_add_sse2, TX_32X32, 1024),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1024_add_sse2, TX_32X32, 135),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_34_add_sse2, TX_32X32, 34),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1_add_sse2, TX_32X32, 1),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_256_add_sse2, TX_16X16, 256),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_10_add_sse2, TX_16X16, 10),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_1_add_sse2, TX_16X16, 1),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_64_add_sse2, TX_8X8, 64),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_12_add_sse2, TX_8X8, 12),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_1_add_sse2, TX_8X8, 1),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_16_add_sse2, TX_4X4, 16),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_1_add_sse2, TX_4X4, 1)));
-#endif  // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
-
-#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH && \
-    !CONFIG_EMULATE_HARDWARE
+                                 &vpx_idct32x32_1024_add_sse2, TX_32X32, 1024,
+                                 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_1024_add_sse2, TX_32X32, 135,
+                                 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_34_add_sse2, TX_32X32, 34, 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_1_add_sse2, TX_32X32, 1, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_256_add_sse2, TX_16X16, 256, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_10_add_sse2, TX_16X16, 10, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_1_add_sse2, TX_16X16, 1, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_64_add_sse2, TX_8X8, 64, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_12_add_sse2, TX_8X8, 12, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_1_add_sse2, TX_8X8, 1, 8),
+                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
+                                 &vpx_idct4x4_16_add_sse2, TX_4X4, 16, 8),
+                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
+                                 &vpx_idct4x4_1_add_sse2, TX_4X4, 1, 8)));
+#endif  // HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
+
+#if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_EMULATE_HARDWARE
 INSTANTIATE_TEST_CASE_P(
     SSSE3_64, PartialIDctTest,
     ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1024_add_ssse3, TX_32X32, 1024),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_135_add_ssse3, TX_32X32, 135),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_34_add_ssse3, TX_32X32, 34),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_64_add_ssse3, TX_8X8, 64),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_12_add_ssse3, TX_8X8, 12)));
-#endif  // HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH &&
-        // !CONFIG_EMULATE_HARDWARE
-
-#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
+                                 &vpx_idct32x32_1024_add_ssse3, TX_32X32, 1024,
+                                 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_135_add_ssse3, TX_32X32, 135,
+                                 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_34_add_ssse3, TX_32X32, 34, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_64_add_ssse3, TX_8X8, 64, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_12_add_ssse3, TX_8X8, 12, 8)));
+#endif  // HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_EMULATE_HARDWARE
+
+#if HAVE_MSA && !CONFIG_EMULATE_HARDWARE
 // 32x32_135_ is implemented using the 1024 version.
 INSTANTIATE_TEST_CASE_P(
     MSA, PartialIDctTest,
     ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1024_add_msa, TX_32X32, 1024),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1024_add_msa, TX_32X32, 135),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_34_add_msa, TX_32X32, 34),
-                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
-                                 &vpx_idct32x32_1_add_msa, TX_32X32, 1),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_256_add_msa, TX_16X16, 256),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_10_add_msa, TX_16X16, 10),
-                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
-                                 &vpx_idct16x16_1_add_msa, TX_16X16, 1),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_64_add_msa, TX_8X8, 64),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_12_add_msa, TX_8X8, 10),
-                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
-                                 &vpx_idct8x8_1_add_msa, TX_8X8, 1),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_16_add_msa, TX_4X4, 16),
-                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
-                                 &vpx_idct4x4_1_add_msa, TX_4X4, 1)));
-#endif  // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
+                                 &vpx_idct32x32_1024_add_msa, TX_32X32, 1024,
+                                 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_1024_add_msa, TX_32X32, 135, 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_34_add_msa, TX_32X32, 34, 8),
+                      make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c,
+                                 &vpx_idct32x32_1_add_msa, TX_32X32, 1, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_256_add_msa, TX_16X16, 256, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_10_add_msa, TX_16X16, 10, 8),
+                      make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c,
+                                 &vpx_idct16x16_1_add_msa, TX_16X16, 1, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_64_add_msa, TX_8X8, 64, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_12_add_msa, TX_8X8, 10, 8),
+                      make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c,
+                                 &vpx_idct8x8_1_add_msa, TX_8X8, 1, 8),
+                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
+                                 &vpx_idct4x4_16_add_msa, TX_4X4, 16, 8),
+                      make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c,
+                                 &vpx_idct4x4_1_add_msa, TX_4X4, 1, 8)));
+#endif  // HAVE_MSA && !CONFIG_EMULATE_HARDWARE
+
+#endif  // CONFIG_VP9_HIGHBITDEPTH

 }  // namespace


- Fix copy paste error causing invalid iterator access crash.

--HG--
branch : v1-8
extra : source : bd02956ec0cfa513c4814440dcefe239d6cf0f43

--- PlugIns/PCZSceneManager/src/OgreDefaultZone.cpp
+++ PlugIns/PCZSceneManager/src/OgreDefaultZone.cpp
@@ -909,7 +909,7 @@
 			PCZSceneNodeList::iterator iter = mVisitorNodeList.begin();
 			while ( iter != mVisitorNodeList.end() )
 			{
-				PCZSceneNode * pczsn = *it;
+				PCZSceneNode * pczsn = *iter;
 				if ( pczsn != exclude )
 				{
 					// make sure node is not already in the list (might have been added in another


ENH: fixed a compiler error on linux

ENH: fixed a compiler error on linux

--- PolyAffineTransform/itkLocalAffineTransform.hxx
+++ PolyAffineTransform/itkLocalAffineTransform.hxx
@@ -231,7 +231,7 @@
 LocalAffineTransform< TScalarType, NDimensions >
 ::GetPartialTransform(int startTime, int stopTime)
 {
-  AffineTransformPointer partialTransform = AffineTransform::New();
+  AffineTransformPointer partialTransform = AffineTransformType::New();
   int duration = stopTime - startTime;
   if (duration == 0)
     {


Added stack overflow reference

Added stack overflow reference

--- RValueMemberFunctions/RValueMemberFunctions.cpp
+++ RValueMemberFunctions/RValueMemberFunctions.cpp
@@ -1,3 +1,5 @@
+// http://stackoverflow.com/questions/17521238/what-are-rvalue-references-for-this-for
+
 #include <iostream>

 class MyClass


style

style

--- testat-1/pocketcalculator_test/src/Test.cpp
+++ testat-1/pocketcalculator_test/src/Test.cpp
@@ -153,7 +153,7 @@
 	};

 	void prints_digit() {
-		std::ostringstream output {};
+		std::ostringstream output { };
 		sevensegment::printLargeDigit(8, output, 1);
 		ASSERT_EQUAL(large_8, output.str());
 		output.str("");
@@ -161,17 +161,17 @@
 		ASSERT_EQUAL(large_1, output.str());
 	}
 	void prints_scaled_digit() {
-		std::ostringstream output {};
+		std::ostringstream output { };
 		sevensegment::printLargeDigit(3, output, 2);
 		ASSERT_EQUAL(large_3_scale2, output.str());
 	}
 	void throws_when_digit_out_of_range() {
-		std::ostringstream output {};
+		std::ostringstream output { };
 		ASSERT_THROWS(sevensegment::printLargeDigit(10,output, 1),
 				std::out_of_range);
 	}
 	void throws_when_scale_out_of_range() {
-		std::ostringstream output {};
+		std::ostringstream output { };
 		ASSERT_THROWS(sevensegment::printLargeDigit(5,output, 0),
 				std::range_error);
 	}
@@ -193,13 +193,13 @@
 	};

 	void prints_number() {
-		std::ostringstream output {};
+		std::ostringstream output { };
 		sevensegment::printLargeNumber(54321, output, 1);
 		ASSERT_EQUAL(large_number, output.str());
 	}

 	void prints_negative_number() {
-		std::ostringstream output {};
+		std::ostringstream output { };
 		sevensegment::printLargeNumber(-33, output, 1);
 		ASSERT_EQUAL(large_negative_number, output.str());
 	}
@@ -246,7 +246,7 @@
 	};

 	void gets_term_and_prints_result() {
-		std::ostringstream output {};
+		std::ostringstream output { };
 		std::istringstream input { "2+20" };
 		pocketcalculator::start(input, output, 1);
 		ASSERT_EQUAL(large_22, output.str());
@@ -255,7 +255,7 @@
 	void prints_error_on_invalid_input() {
 		for(auto const term : calc_tests::invalid_terms) {

-			std::ostringstream output {};
+			std::ostringstream output { };
 			std::istringstream input { term };
 			pocketcalculator::start(input, output, 1);
 			ASSERT_EQUAL(sevensegment_tests::large_error, output.str());
@@ -292,8 +292,8 @@
 	};

 	void uses_default_scale_when_scale_omitted() {
-		std::ostringstream output {};
-		std::istringstream input {"1+1"};
+		std::ostringstream output { };
+		std::istringstream input { "1+1" };
 		pocketcalculator::start(input, output);
 		ASSERT_EQUAL(large_2, output.str());
 	}


Fixed bug in ReuseQueueTest.Default tester.

--- tester/libtbag/container/ReuseQueueTest.cpp
+++ tester/libtbag/container/ReuseQueueTest.cpp
@@ -62,11 +62,11 @@

     queue.push(300);
     ASSERT_EQ(2U, queue.size());
-    ASSERT_EQ(0U, queue.sizeOfReady());
+    ASSERT_EQ(1U, queue.sizeOfReady());

     queue.push(400);
     ASSERT_EQ(3U, queue.size());
-    ASSERT_EQ(0U, queue.sizeOfReady());
+    ASSERT_EQ(1U, queue.sizeOfReady());

     queue.clear();
     ASSERT_TRUE(queue.empty());


fix tests

fix tests

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30851 0785d39b-7218-0410-832d-ea1e28bc413d

--- tests/distributed_grids/2d_coarse_grid_04.cc
+++ tests/distributed_grids/2d_coarse_grid_04.cc
@@ -36,7 +36,7 @@

   GridIn<dim> gi;
   gi.attach_triangulation (tr);
-  gi.read (SOURCE_DIR "../grid/grids/circle-grid.inp");
+  gi.read (SOURCE_DIR "/../grid/grids/circle-grid.inp");

   write_vtk(tr, "1");
 }


akaze: resolve issue with using of uninitialized memory

--- modules/features2d/src/kaze/AKAZEFeatures.cpp
+++ modules/features2d/src/kaze/AKAZEFeatures.cpp
@@ -890,11 +890,11 @@
   {
     for (int i = range.start; i < range.end; i++)
     {
-      Get_SURF_Descriptor_Upright_64((*keypoints_)[i], descriptors_->ptr<float>(i));
-    }
-  }
-
-  void Get_SURF_Descriptor_Upright_64(const KeyPoint& kpt, float* desc) const;
+      Get_SURF_Descriptor_Upright_64((*keypoints_)[i], descriptors_->ptr<float>(i), descriptors_->cols);
+    }
+  }
+
+  void Get_SURF_Descriptor_Upright_64(const KeyPoint& kpt, float* desc, int desc_size) const;

 private:
   std::vector<KeyPoint>* keypoints_;
@@ -916,11 +916,11 @@
   {
     for (int i = range.start; i < range.end; i++)
     {
-      Get_SURF_Descriptor_64((*keypoints_)[i], descriptors_->ptr<float>(i));
-    }
-  }
-
-  void Get_SURF_Descriptor_64(const KeyPoint& kpt, float* desc) const;
+      Get_SURF_Descriptor_64((*keypoints_)[i], descriptors_->ptr<float>(i), descriptors_->cols);
+    }
+  }
+
+  void Get_SURF_Descriptor_64(const KeyPoint& kpt, float* desc, int desc_size) const;

 private:
   std::vector<KeyPoint>* keypoints_;
@@ -942,11 +942,11 @@
   {
     for (int i = range.start; i < range.end; i++)
     {
-      Get_MSURF_Upright_Descriptor_64((*keypoints_)[i], descriptors_->ptr<float>(i));
-    }
-  }
-
-  void Get_MSURF_Upright_Descriptor_64(const KeyPoint& kpt, float* desc) const;
+      Get_MSURF_Upright_Descriptor_64((*keypoints_)[i], descriptors_->ptr<float>(i), descriptors_->cols);
+    }
+  }
+
+  void Get_MSURF_Upright_Descriptor_64(const KeyPoint& kpt, float* desc, int desc_size) const;

 private:
   std::vector<KeyPoint>* keypoints_;
@@ -968,11 +968,11 @@
   {
     for (int i = range.start; i < range.end; i++)
     {
-      Get_MSURF_Descriptor_64((*keypoints_)[i], descriptors_->ptr<float>(i));
-    }
-  }
-
-  void Get_MSURF_Descriptor_64(const KeyPoint& kpt, float* desc) const;
+      Get_MSURF_Descriptor_64((*keypoints_)[i], descriptors_->ptr<float>(i), descriptors_->cols);
+    }
+  }
+
+  void Get_MSURF_Descriptor_64(const KeyPoint& kpt, float* desc, int desc_size) const;

 private:
   std::vector<KeyPoint>* keypoints_;
@@ -995,11 +995,11 @@
   {
     for (int i = range.start; i < range.end; i++)
     {
-      Get_Upright_MLDB_Full_Descriptor((*keypoints_)[i], descriptors_->ptr<unsigned char>(i));
-    }
-  }
-
-  void Get_Upright_MLDB_Full_Descriptor(const KeyPoint& kpt, unsigned char* desc) const;
+      Get_Upright_MLDB_Full_Descriptor((*keypoints_)[i], descriptors_->ptr<unsigned char>(i), descriptors_->cols);
+    }
+  }
+
+  void Get_Upright_MLDB_Full_Descriptor(const KeyPoint& kpt, unsigned char* desc, int desc_size) const;

 private:
   std::vector<KeyPoint>* keypoints_;
@@ -1030,11 +1030,11 @@
   {
     for (int i = range.start; i < range.end; i++)
     {
-      Get_Upright_MLDB_Descriptor_Subset((*keypoints_)[i], descriptors_->ptr<unsigned char>(i));
-    }
-  }
-
-  void Get_Upright_MLDB_Descriptor_Subset(const KeyPoint& kpt, unsigned char* desc) const;
+      Get_Upright_MLDB_Descriptor_Subset((*keypoints_)[i], descriptors_->ptr<unsigned char>(i), descriptors_->cols);
+    }
+  }
+
+  void Get_Upright_MLDB_Descriptor_Subset(const KeyPoint& kpt, unsigned char* desc, int desc_size) const;

 private:
   std::vector<KeyPoint>* keypoints_;
@@ -1061,11 +1061,11 @@
   {
     for (int i = range.start; i < range.end; i++)
     {
-      Get_MLDB_Full_Descriptor((*keypoints_)[i], descriptors_->ptr<unsigned char>(i));
-    }
-  }
-
-  void Get_MLDB_Full_Descriptor(const KeyPoint& kpt, unsigned char* desc) const;
+      Get_MLDB_Full_Descriptor((*keypoints_)[i], descriptors_->ptr<unsigned char>(i), descriptors_->cols);
+    }
+  }
+
+  void Get_MLDB_Full_Descriptor(const KeyPoint& kpt, unsigned char* desc, int desc_size) const;
   void MLDB_Fill_Values(float* values, int sample_step, int level,
                         float xf, float yf, float co, float si, float scale) const;
   void MLDB_Binary_Comparisons(float* values, unsigned char* desc,
@@ -1100,11 +1100,11 @@
   {
     for (int i = range.start; i < range.end; i++)
     {
-      Get_MLDB_Descriptor_Subset((*keypoints_)[i], descriptors_->ptr<unsigned char>(i));
-    }
-  }
-
-  void Get_MLDB_Descriptor_Subset(const KeyPoint& kpt, unsigned char* desc) const;
+      Get_MLDB_Descriptor_Subset((*keypoints_)[i], descriptors_->ptr<unsigned char>(i), descriptors_->cols);
+    }
+  }
+
+  void Get_MLDB_Descriptor_Subset(const KeyPoint& kpt, unsigned char* desc, int desc_size) const;

 private:
   std::vector<KeyPoint>* keypoints_;
@@ -1407,7 +1407,10 @@
  * from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
  * ECCV 2008
  */
-void MSURF_Upright_Descriptor_64_Invoker::Get_MSURF_Upright_Descriptor_64(const KeyPoint& kpt, float *desc) const {
+void MSURF_Upright_Descriptor_64_Invoker::Get_MSURF_Upright_Descriptor_64(const KeyPoint& kpt, float *desc, int desc_size) const {
+
+  const int dsize = 64;
+  CV_Assert(desc_size == dsize);

   float dx = 0.0, dy = 0.0, mdx = 0.0, mdy = 0.0, gauss_s1 = 0.0, gauss_s2 = 0.0;
   float rx = 0.0, ry = 0.0, len = 0.0, xf = 0.0, yf = 0.0, ys = 0.0, xs = 0.0;
@@ -1415,7 +1418,7 @@
   int x1 = 0, y1 = 0, sample_step = 0, pattern_size = 0;
   int x2 = 0, y2 = 0, kx = 0, ky = 0, i = 0, j = 0, dcount = 0;
   float fx = 0.0, fy = 0.0, ratio = 0.0, res1 = 0.0, res2 = 0.0, res3 = 0.0, res4 = 0.0;
-  int scale = 0, dsize = 0;
+  int scale = 0;

   // Subregion centers for the 4x4 gaussian weighting
   float cx = -0.5f, cy = 0.5f;
@@ -1423,7 +1426,6 @@
   const std::vector<Evolution>& evolution = *evolution_;

   // Set the descriptor size and the sample and pattern sizes
-  dsize = 64;
   sample_step = 5;
   pattern_size = 12;

@@ -1466,11 +1468,11 @@
           //Get the gaussian weighted x and y responses
           gauss_s1 = gaussian(xs - sample_x, ys - sample_y, 2.50f*scale);

-          y1 = (int)(sample_y - .5);
-          x1 = (int)(sample_x - .5);
-
-          y2 = (int)(sample_y + .5);
-          x2 = (int)(sample_x + .5);
+          y1 = (int)(sample_y - .5f);
+          x1 = (int)(sample_x - .5f);
+
+          y2 = (int)(sample_y + .5f);
+          x2 = (int)(sample_x + .5f);

           fx = sample_x - x1;
           fy = sample_y - y1;
@@ -1514,6 +1516,8 @@
     i += 9;
   }

+  CV_Assert(dcount == desc_size);
+
   // convert to unit vector
   len = sqrt(len);

@@ -1532,7 +1536,10 @@
  * from Agrawal et al., CenSurE: Center Surround Extremas for Realtime Feature Detection and Matching,
  * ECCV 2008
  */
-void MSURF_Descriptor_64_Invoker::Get_MSURF_Descriptor_64(const KeyPoint& kpt, float *desc) const {
+void MSURF_Descriptor_64_Invoker::Get_MSURF_Descriptor_64(const KeyPoint& kpt, float *desc, int desc_size) const {
+
+  const int dsize = 64;
+  CV_Assert(desc_size == dsize);

   float dx = 0.0, dy = 0.0, mdx = 0.0, mdy = 0.0, gauss_s1 = 0.0, gauss_s2 = 0.0;
   float rx = 0.0, ry = 0.0, rrx = 0.0, rry = 0.0, len = 0.0, xf = 0.0, yf = 0.0, ys = 0.0, xs = 0.0;
@@ -1540,7 +1547,7 @@
   float fx = 0.0, fy = 0.0, ratio = 0.0, res1 = 0.0, res2 = 0.0, res3 = 0.0, res4 = 0.0;
   int x1 = 0, y1 = 0, x2 = 0, y2 = 0, sample_step = 0, pattern_size = 0;
   int kx = 0, ky = 0, i = 0, j = 0, dcount = 0;
-  int scale = 0, dsize = 0;
+  int scale = 0;

   // Subregion centers for the 4x4 gaussian weighting
   float cx = -0.5f, cy = 0.5f;
@@ -1548,7 +1555,6 @@
   const std::vector<Evolution>& evolution = *evolution_;

   // Set the descriptor size and the sample and pattern sizes
-  dsize = 64;
   sample_step = 5;
   pattern_size = 12;

@@ -1652,6 +1658,8 @@
     i += 9;
   }

+  CV_Assert(dcount == desc_size);
+
   // convert to unit vector
   len = sqrt(len);

@@ -1667,7 +1675,7 @@
  * @param kpt Input keypoint
  * @param desc Descriptor vector
  */
-void Upright_MLDB_Full_Descriptor_Invoker::Get_Upright_MLDB_Full_Descriptor(const KeyPoint& kpt, unsigned char *desc) const {
+void Upright_MLDB_Full_Descriptor_Invoker::Get_Upright_MLDB_Full_Descriptor(const KeyPoint& kpt, unsigned char *desc, int desc_size) const {

   float di = 0.0, dx = 0.0, dy = 0.0;
   float ri = 0.0, rx = 0.0, ry = 0.0, xf = 0.0, yf = 0.0;
@@ -1703,6 +1711,8 @@
     divUp(pattern_size, 2)
   };

+  memset(desc, 0, desc_size);
+
   // For the three grids
   for (int z = 0; z < 3; z++) {
     dcount2 = 0;
@@ -1754,8 +1764,6 @@
         for (int k = 0; k < 3; ++k) {
           if (*(valI + k) > *(valJ + k)) {
             desc[dcount1 / 8] |= (1 << (dcount1 % 8));
-          } else {
-            desc[dcount1 / 8] &= ~(1 << (dcount1 % 8));
           }
           dcount1++;
         }
@@ -1763,6 +1771,9 @@
     }

   } // for (int z = 0; z < 3; z++)
+
+  CV_Assert(dcount1 <= desc_size*8);
+  CV_Assert(divUp(dcount1, 8) == desc_size);
 }

 void MLDB_Full_Descriptor_Invoker::MLDB_Fill_Values(float* values, int sample_step, const int level,
@@ -1848,10 +1859,6 @@
                 if (ival > ivalues[chan * j + pos]) {
                   desc[dpos >> 3] |= (1 << (dpos & 7));
                 }
-                else {
-                  desc[dpos >> 3] &= ~(1 << (dpos & 7));
-                }
-
                 dpos++;
             }
         }
@@ -1865,7 +1872,7 @@
  * @param kpt Input keypoint
  * @param desc Descriptor vector
  */
-void MLDB_Full_Descriptor_Invoker::Get_MLDB_Full_Descriptor(const KeyPoint& kpt, unsigned char *desc) const {
+void MLDB_Full_Descriptor_Invoker::Get_MLDB_Full_Descriptor(const KeyPoint& kpt, unsigned char *desc, int desc_size) const {

   const int max_channels = 3;
   CV_Assert(options_->descriptor_channels <= max_channels);
@@ -1888,13 +1895,18 @@
   float co = cos(angle);
   float si = sin(angle);

+  memset(desc, 0, desc_size);
+
   int dpos = 0;
-  for(int lvl = 0; lvl < 3; lvl++) {
-
+  for(int lvl = 0; lvl < 3; lvl++)
+  {
       int val_count = (lvl + 2) * (lvl + 2);
       MLDB_Fill_Values(values, sample_step[lvl], kpt.class_id, xf, yf, co, si, scale);
       MLDB_Binary_Comparisons(values, desc, val_count, dpos);
   }
+
+  CV_Assert(dpos == 486);
+  CV_Assert(divUp(dpos, 8) == desc_size);
 }

 /* ************************************************************************* */
@@ -1905,7 +1917,7 @@
  * @param kpt Input keypoint
  * @param desc Descriptor vector
  */
-void MLDB_Descriptor_Subset_Invoker::Get_MLDB_Descriptor_Subset(const KeyPoint& kpt, unsigned char *desc) const {
+void MLDB_Descriptor_Subset_Invoker::Get_MLDB_Descriptor_Subset(const KeyPoint& kpt, unsigned char *desc, int desc_size) const {

   float di = 0.f, dx = 0.f, dy = 0.f;
   float rx = 0.f, ry = 0.f;
@@ -1995,11 +2007,12 @@
   // Do the comparisons
   const int *comps = descriptorBits_.ptr<int>(0);

+  CV_Assert(divUp(descriptorBits_.rows, 8) == desc_size);
+  memset(desc, 0, desc_size);
+
   for (int i = 0; i<descriptorBits_.rows; i++) {
     if (values[comps[2 * i]] > values[comps[2 * i + 1]]) {
       desc[i / 8] |= (1 << (i % 8));
-    } else {
-      desc[i / 8] &= ~(1 << (i % 8));
     }
   }
 }
@@ -2012,7 +2025,7 @@
  * @param kpt Input keypoint
  * @param desc Descriptor vector
  */
-void Upright_MLDB_Descriptor_Subset_Invoker::Get_Upright_MLDB_Descriptor_Subset(const KeyPoint& kpt, unsigned char *desc) const {
+void Upright_MLDB_Descriptor_Subset_Invoker::Get_Upright_MLDB_Descriptor_Subset(const KeyPoint& kpt, unsigned char *desc, int desc_size) const {

   float di = 0.0f, dx = 0.0f, dy = 0.0f;
   float rx = 0.0f, ry = 0.0f;
@@ -2090,11 +2103,12 @@
   const float *vals = values.ptr<float>(0);
   const int *comps = descriptorBits_.ptr<int>(0);

+  CV_Assert(divUp(descriptorBits_.rows, 8) == desc_size);
+  memset(desc, 0, desc_size);
+
   for (int i = 0; i<descriptorBits_.rows; i++) {
     if (vals[comps[2 * i]] > vals[comps[2 * i + 1]]) {
       desc[i / 8] |= (1 << (i % 8));
-    } else {
-      desc[i / 8] &= ~(1 << (i % 8));
     }
   }
 }


excluding D0Trigger from the inputs of the HLTGlobalTrigger because of a rare segfault to be investigated https://savannah.cern.ch/bugs/?72590

--- HLT/trigger/AliHLTTriggerAgent.cxx
+++ HLT/trigger/AliHLTTriggerAgent.cxx
@@ -225,8 +225,11 @@
   if (triggerInputs.Length()>0) {
     HLTInfo("Configuring inputs for %s: %s", configurationId.Data(), triggerInputs.Data());
     pHandler->CreateConfiguration(configurationId.Data(), "D0Trigger", triggerInputs.Data(), argD0.Data());
-    if (triggerOutputs.Length()>0) triggerOutputs+=" ";
-    triggerOutputs+=configurationId;
+    // FIXME: due to a rare segfault for reconstruction of PbPb data the
+    // component is temporarily excluded
+    // https://savannah.cern.ch/bugs/?72590
+    //if (triggerOutputs.Length()>0) triggerOutputs+=" ";
+    //triggerOutputs+=configurationId;
   } else {
     HLTWarning("No inputs for %s found, skipping component", configurationId.Data());
   }


Remove handle assignment validation from GC side.

--- src/gc/handletable.inl
+++ src/gc/handletable.inl
@@ -22,13 +22,6 @@
     // sanity
     _ASSERTE(handle);

-#ifdef _DEBUG_IMPL
-    // handle should not be in unloaded domain
-    ValidateAppDomainForHandle(handle);
-
-    // Make sure the objref is valid before it is assigned to a handle
-    ValidateAssignObjrefForHandle(objref, HndGetHandleTableADIndex(HndGetHandleTable(handle)));
-#endif
     // unwrap the objectref we were given
     _UNCHECKED_OBJECTREF value = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref);

@@ -49,13 +42,6 @@
     // sanity
     _ASSERTE(handle);

-#ifdef _DEBUG_IMPL
-    // handle should not be in unloaded domain
-    ValidateAppDomainForHandle(handle);
-
-    // Make sure the objref is valid before it is assigned to a handle
-    ValidateAssignObjrefForHandle(objref, HndGetHandleTableADIndex(HndGetHandleTable(handle)));
-#endif
     // unwrap the objectref we were given
     _UNCHECKED_OBJECTREF value = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref);
     _UNCHECKED_OBJECTREF oldValue = OBJECTREF_TO_UNCHECKED_OBJECTREF(oldObjref);
@@ -88,13 +74,6 @@
     // sanity
     _ASSERTE(handle);

-#ifdef _DEBUG_IMPL
-    // handle should not be in unloaded domain
-    ValidateAppDomainForHandle(handle);
-
-    // Make sure the objref is valid before it is assigned to a handle
-    ValidateAssignObjrefForHandle(objref, HndGetHandleTableADIndex(HndGetHandleTable(handle)));
-#endif
     // unwrap the objectref we were given
     _UNCHECKED_OBJECTREF value = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref);
     _UNCHECKED_OBJECTREF null = NULL;


TODO-1034: varying responses in simulator

--- portableUnitTests/OTRadioLink/OTSIM900Link.cpp
+++ portableUnitTests/OTRadioLink/OTSIM900Link.cpp
@@ -22,6 +22,7 @@

 #include <gtest/gtest.h>
 #include <stdio.h>
+#include <stdlib.h>

 #include "OTSIM900Link.h"

@@ -110,7 +111,9 @@
           // Respond to particular commands...
           if("AT" == command) { reply = "AT\r"; }
           // DHD20161101: "No PIN" response (deliberately not typical SIM900 response) resulted in SIGSEGV from not checking getResponse() result for NULL.
-          else if("AT+CPIN?" == command) { reply = "No PIN"; }
+          // Should futz/vary the response to check sensitivity.
+          // TODO: have at least one response be expected SIM900 answer for no-PIN SIM.
+          else if("AT+CPIN?" == command) { reply = (random() & 1) ? "No PIN" : "OK READY"; }
           }
         else if(collectingCommand) { command += c; }
         }
@@ -132,9 +135,11 @@
 // Events exposed.
 bool TrivialSimulator::haveSeenCommandStart;
 }
-TEST(OTSIM900Link,basics)
+TEST(OTSIM900Link,basicsSimpleSimulator)
 {
 //    const bool verbose = true;
+
+    srandomdev(); // Seed random() for use in simulator.

     ASSERT_FALSE(B1::TrivialSimulator::haveSeenCommandStart);
     OTSIM900Link::OTSIM900Link<0, 0, 0, B1::TrivialSimulator> l0;


Changed loop variable names

Changed loop variable names

--- class12/vectors.cpp
+++ class12/vectors.cpp
@@ -38,8 +38,8 @@

   // Print vector using at()
-  for (unsigned int ii=0; ii<v.size(); ii++) {
-    cout << v.at(ii) << " ";
+  for (unsigned int jj=0; jj<v.size(); jj++) {
+    cout << v.at(jj) << " ";
   }
   cout << endl << endl;;

@@ -47,8 +47,8 @@
   v.pop_back();
   cout << "After v[5]=99 & pop_back:" << endl;
   // Print vector using for-each
-  for (auto& ii : v) {
-    cout << ii << " ";
+  for (auto& kk : v) {
+    cout << kk << " ";
   }
   cout << endl;


Adds two interesting cases for set_intersection.

--- test/set_intersection.cpp
+++ test/set_intersection.cpp
@@ -127,4 +127,33 @@
     BOOST_CHECK_EQUAL_COLLECTIONS(std::begin(output), std::end(output), std::begin(expected), std::end(expected));
 }

+BOOST_AUTO_TEST_CASE( different_output_type_default_compare )
+{
+    const std::vector<double> primary{1, 3, 4.6, 5, 6};
+    const std::list<double> secondary{1.1, 2, 3.9, 4.6};
+    std::vector<int> output;
+
+    std::set_intersection(std::begin(primary), std::end(primary), std::begin(secondary), std::end(secondary), std::back_inserter(output));
+
+    const std::vector<int> expected{4};
+    BOOST_CHECK_EQUAL_COLLECTIONS(std::begin(output), std::end(output), std::begin(expected), std::end(expected));
+}
+
+BOOST_AUTO_TEST_CASE( different_output_type_custom_compare )
+{
+    const std::vector<double> primary{-1.1, 1, -1, 3, 4.6, 5, 6};
+    const std::list<double> secondary{1.1, -2, 3.9, -4.6};
+    std::vector<int> output;
+
+    auto comp = [](double lhs, double rhs){ return std::less<double>()(std::abs(lhs), std::abs(rhs)); };
+    std::set_intersection(std::begin(primary), std::end(primary), std::begin(secondary), std::end(secondary), std::back_inserter(output), comp);
+
+    /*! Here is the interesting thing: -1.1 will be compared equal to 1.1 and
+     * reported to an output iterator that accepts ints. As the algorithm
+     * reports the element from the first collection, -1.1 will be cast to int,
+     * so the number in the output collection will be negative as well. */
+    const std::vector<int> expected{-1, 4};
+    BOOST_CHECK_EQUAL_COLLECTIONS(std::begin(output), std::end(output), std::begin(expected), std::end(expected));
+}
+
 BOOST_AUTO_TEST_SUITE_END( /* set_intersection_test_suite */ )


qitrace: more compressed output, display call user/system time used.

Change-Id: I90049d5ed729aa0b1c49ac437852253edf9d8280
Reviewed-on: http://gerrit.aldebaran.lan/22373
Reviewed-by: cgestes <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>
Reviewed-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>
Tested-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>

--- bin/qitrace/qitrace.cpp
+++ bin/qitrace/qitrace.cpp
@@ -1,18 +1,13 @@
 /** Copyright (C) 2012 Aldebaran Robotics
 */

-#ifndef _WIN32
-#include <fnmatch.h>
-#else
-# include <shlwapi.h>
-# pragma comment(lib, "shlwapi.lib")
-#endif

 #include <boost/program_options.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/foreach.hpp>

 #include <qi/log.hpp>
+#include <qi/os.hpp>
 #include <qi/application.hpp>
 #include <qimessaging/session.hpp>
 #include <qitype/jsoncodec.hpp>
@@ -31,6 +26,7 @@
 bool disableTrace = false;
 bool traceState = false;
 bool cleaned = false;
+bool full = false;
 std::string sdUrl;
 std::vector<std::string> objectNames;
 unsigned int maxServiceLength = 0;
@@ -38,37 +34,57 @@

 void onTrace(ObjectMap::value_type ov, const qi::EventTrace& trace)
 {
+  static qi::int64_t secStart = 0;
+  if (!secStart && !full)
+    secStart = trace.timestamp().tv_sec;
   static unsigned int maxLen = 0;
-  std::string name = boost::lexical_cast<std::string>(trace.slotId);
+  std::string name = boost::lexical_cast<std::string>(trace.slotId());
   if (!numeric)
   {
     qi::MetaObject mo = ov.second->metaObject();
-    qi::MetaMethod* m = mo.method(trace.slotId);
+    qi::MetaMethod* m = mo.method(trace.slotId());
     if (m)
       name = m->name();
     else
     {
-      qi::MetaSignal* s = mo.signal(trace.slotId);
+      qi::MetaSignal* s = mo.signal(trace.slotId());
       if (s)
         name = s->name();
       else
         name = name + "(??" ")"; // trigraph protect mode on
     }
   }
+  if (!full && name.size() > 25)
+  {
+    name = name.substr(0, 22) + "...";
+  }
+  std::string serviceName = ov.first;
+  if (!full && serviceName.size() > 17)
+    serviceName = serviceName.substr(0, 14) + "...";
   maxLen = std::max(maxLen, (unsigned int)name.size());
-  unsigned int traceKind = trace.kind;
+  unsigned int traceKind = trace.kind();
   if (traceKind > 4)
     traceKind = 0;
-  std::string spacing(maxLen + 8 - name.size(), ' ');
-  std::string spacing2(maxServiceLength + 8 - ov.first.size(), ' ');
-  std::cout << ov.first << spacing2 << trace.id << '\t' << callType[traceKind] << ' ' << name
-   << spacing << trace.timestamp.tv_sec << '.' << trace.timestamp.tv_usec
-   << "\t" << qi::encodeJSON(trace.arguments) << std::endl;
+  std::string spacing(maxLen + 2 - name.size(), ' ');
+  std::string spacing2((full?maxServiceLength:17) + 2 - ov.first.size(), ' ');
+  if (trace.kind() == qi::EventTrace::Event_Result)
+  {
+    std::cout << serviceName << spacing2 << trace.id() << ' ' << callType[traceKind] << ' ' << name
+      << spacing << (trace.timestamp().tv_sec - secStart) << '.' << trace.timestamp().tv_usec
+      << ' ' << trace.userUsTime() << ' ' << trace.systemUsTime() << ' ' << qi::encodeJSON(trace.arguments()) << std::endl;
+  }
+  else
+  {
+    std::cout << serviceName << spacing2 << trace.id() << ' ' << callType[traceKind] << ' ' << name
+      << spacing << (trace.timestamp().tv_sec - secStart) << '.' << trace.timestamp().tv_usec
+      << ' ' << qi::encodeJSON(trace.arguments()) << std::endl;
+  }
 }

 _QI_COMMAND_LINE_OPTIONS(
   "Qitrace options",
   ("numeric,n", bool_switch(&numeric), "Do not resolve slot Ids to names")
+  ("full,f", bool_switch(&full), "Do not abreviate anything")
   ("service-directory,s", value<std::string>(&sdUrl), "url to connect to")
   ("object,o", value<std::vector<std::string> >(&objectNames), "Object(s) to monitor, specify multiple times, comma-separate, use '*' for all, use '-globPattern' to remove from list")
   ("print,p", bool_switch(&printMo), "Print out the Metaobject and exit")


ir_reader: Fix some potential NULL pointer dereferences.

Found by inspection.

--- src/glsl/ir_reader.cpp
+++ src/glsl/ir_reader.cpp
@@ -263,7 +263,7 @@
       return;

    s_list *paramlist = SX_AS_LIST(type_expr->next);
-   s_list *body_list = SX_AS_LIST(paramlist->next);
+   s_list *body_list = SX_AS_LIST(type_expr->next->next);
    if (paramlist == NULL || body_list == NULL) {
       ir_read_error(st, list, "Expected (signature <type> (parameters ...) "
 			      "(<instruction> ...))");
@@ -677,7 +677,7 @@
    }

    s_symbol *name = SX_AS_SYMBOL(list->subexpressions.head->next);
-   s_list *params = SX_AS_LIST(name->next);
+   s_list *params = SX_AS_LIST(list->subexpressions.head->next->next);
    if (name == NULL || params == NULL) {
       ir_read_error(st, list, "expected (call <name> (<param> ...))");
       return NULL;
@@ -1050,8 +1050,8 @@
       return NULL;
    }
    s_int *offset_x = SX_AS_INT(offset_list->subexpressions.head);
-   s_int *offset_y = SX_AS_INT(offset_x->next);
-   s_int *offset_z = SX_AS_INT(offset_y->next);
+   s_int *offset_y = SX_AS_INT(offset_list->subexpressions.head->next);
+   s_int *offset_z = SX_AS_INT(offset_list->subexpressions.head->next->next);
    if (offset_x == NULL || offset_y == NULL || offset_z == NULL) {
       ir_read_error(st, offset_list, "expected (<int> <int> <int>)");
       return NULL;


Check return code from cudaGetDeviceCount() call

--- src/gpujpeg_common.cpp
+++ src/gpujpeg_common.cpp
@@ -119,6 +119,7 @@
 {
     int dev_count;
     cudaGetDeviceCount(&dev_count);
+    gpujpeg_cuda_check_error("Cannot get number of CUDA devices!", return -1);
     if ( dev_count == 0 ) {
         fprintf(stderr, "[GPUJPEG] [Error] No CUDA enabled device\n");
         return -1;


workaround the test failure

workaround the test failure

--- modules/stitching/src/exposure_compensate.cpp
+++ modules/stitching/src/exposure_compensate.cpp
@@ -154,7 +154,11 @@
                 {
                     CV_Assert(similarity_it != similarities_.end());
                     UMat similarity = *similarity_it++;
-                    bitwise_and(intersect, similarity, intersect);
+                    // in-place operation has an issue. don't remove the swap
+                    // detail https://github.com/opencv/opencv/issues/19184
+                    Mat_<uchar> intersect_updated;
+                    bitwise_and(intersect, similarity, intersect_updated);
+                    std::swap(intersect, intersect_updated);
                 }

                 int intersect_count = countNonZero(intersect);


Improve exceptions thrown by release method and print them

--- server/handlers/JoinableServiceHandler.cpp
+++ server/handlers/JoinableServiceHandler.cpp
@@ -390,14 +390,20 @@
 		throw ex;
 	} catch (MediaSessionNotFoundException ex) {
 		JoinableNotFoundException e;
-		e.__set_description("MediaSession not found");
-		throw e;
-	} catch (MediaServerException ex) {
-		throw ex;
-	} catch (...) {
-		MediaServerException ex;
-		ex.__set_description("Unkown exception found");
-		ex.__set_code(ErrorCode::type::UNEXPECTED);
-		throw ex;
-	}
-}
+		e.__set_description("Joinable not found");
+		w(e.description);
+		throw e;
+	} catch (MixerNotFoundException ex) {
+		JoinableNotFoundException e;
+		e.__set_description("Joinable not found");
+		w(e.description);
+		throw e;
+	} catch (MediaServerException ex) {
+		throw ex;
+	} catch (...) {
+		MediaServerException ex;
+		ex.__set_description("Unkown exception found");
+		ex.__set_code(ErrorCode::type::UNEXPECTED);
+		throw ex;
+	}
+}


PocoRestRequestHandler: apply sanitization to request URIs

All requests URIs are sanitized prior to using them.

Signed-off-by: Jan Viktorin <3eab6ac54c005c4408f608556a6663b7f2abede7@fit.vutbr.cz>

--- server/src/rest/PocoRestRequestHandler.cpp
+++ server/src/rest/PocoRestRequestHandler.cpp
@@ -13,6 +13,7 @@
 #include "rest/RestRouter.h"
 #include "rest/RestLinker.h"
 #include "server/SessionVerifier.h"
+#include "util/Sanitize.h"

 using namespace std;
 using namespace Poco;
@@ -271,7 +272,7 @@
 			__FILE__, __LINE__);
 	}

-	Poco::URI uri(request.getURI());
+	Poco::URI uri(Sanitize::uri(request.getURI()));
 	MappedRestAction::Params params;

 	try {


Some bugfixes...

Some bugfixes...

--- Imaging/vtkImageCanvasSource2D.cxx
+++ Imaging/vtkImageCanvasSource2D.cxx
@@ -23,7 +23,7 @@

 #include <math.h>

-vtkCxxRevisionMacro(vtkImageCanvasSource2D, "1.35");
+vtkCxxRevisionMacro(vtkImageCanvasSource2D, "1.36");
 vtkStandardNewMacro(vtkImageCanvasSource2D);

 //----------------------------------------------------------------------------
@@ -118,12 +118,14 @@
   int idx0, idx1, idxV;
   int inc0, inc1, inc2;
   int sinc0, sinc1, sinc2;
-  int maxV;
+  int maxV, smaxV;
+  int sinc;

   image->GetIncrements(inc0, inc1, inc2);
   simage->GetIncrements(sinc0, sinc1, sinc2);

   maxV = image->GetNumberOfScalarComponents() - 1;
+  smaxV = simage->GetNumberOfScalarComponents() - 1;

   ptr1 = ptr;
   sptr1 = sptr;
@@ -136,13 +138,19 @@
       ptrV = ptr0;
       sptrV = sptr0;

+      sinc = 0;
+
       // Assign color to pixel.
       for (idxV = 0; idxV <= maxV; ++idxV)
         {
-        *ptrV = *sptrV;
+        *ptrV = *(sptrV + sinc);
         ptrV++;
-        sptrV++;
+        if ( sinc < smaxV )
+          {
+          sinc++;
+          }
         }
+      sptrV += smaxV;

       ptr0 += inc0;
       sptr0 += sinc0;
@@ -200,9 +208,9 @@
   ext[2] = vtkMAX(sy, ext[2]);
   ext[3] = vtkMAX(sy+height-1, ext[3]);
   clip->SetOutputWholeExtent(ext);
-
+
   vtkImageCast* ic = vtkImageCast::New();
-  ic->SetInput(image);
+  ic->SetInput(clip->GetOutput());
   ic->SetOutputScalarType(this->GetScalarType());
   ic->Update();
   int min0, max0, min1, max1;


renamed config file

renamed config file

--- qt/main.cpp
+++ qt/main.cpp
@@ -51,7 +51,7 @@
 	QApplication app(argc, argv);
 	Q_INIT_RESOURCE(android_file_transfer);

-	QCoreApplication::setApplicationName("mtp-ng-qt");
+	QCoreApplication::setApplicationName("aft-linux-qt");
 	QCoreApplication::setOrganizationDomain("whoozle.github.io");
 	QCoreApplication::setOrganizationName("whoozle.github.io");


[Chromoting] Make the sequence expectations in the ChromotingHost unit tests
more accurate.

This is a follow-up to r143005.

Review URL: https://chromiumcodereview.appspot.com/10583022

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@143098 0039d316-1c4b-4281-b951-d872f2087c98

--- remoting/host/chromoting_host_unittest.cc
+++ remoting/host/chromoting_host_unittest.cc
@@ -32,6 +32,7 @@
 using testing::CreateFunctor;
 using testing::DeleteArg;
 using testing::DoAll;
+using testing::Expectation;
 using testing::InSequence;
 using testing::InvokeArgument;
 using testing::InvokeWithoutArgs;
@@ -286,29 +287,24 @@

   // When the video packet is received we first shut down ChromotingHost,
   // then execute the done task.
-  {
-    InSequence s;
-    EXPECT_CALL(*disconnect_window_, Show(_, _, _))
-        .Times(0);
-    EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
-        .WillOnce(DoAll(
-            InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost),
-            RunDoneTask()))
-        .RetiresOnSaturation();
-    EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
-        .Times(AnyNumber())
-        .WillRepeatedly(RunDoneTask());
-    EXPECT_CALL(*connection_, Disconnect())
-        .WillOnce(
-            InvokeWithoutArgs(this, &ChromotingHostTest::ClientSessionClosed))
-        .RetiresOnSaturation();
-  }
-
-  {
-    InSequence s;
-    EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_));
-    EXPECT_CALL(*event_executor_, OnSessionFinished());
-  }
+  Expectation start = EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_));
+  Expectation stop = EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
+      .After(start)
+      .WillOnce(DoAll(
+          InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost),
+          RunDoneTask()))
+      .RetiresOnSaturation();
+  EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
+      .Times(AnyNumber())
+      .After(stop)
+      .WillRepeatedly(RunDoneTask());
+  EXPECT_CALL(*connection_, Disconnect())
+      .After(stop)
+      .WillOnce(
+          InvokeWithoutArgs(this, &ChromotingHostTest::ClientSessionClosed))
+      .RetiresOnSaturation();
+  EXPECT_CALL(*event_executor_, OnSessionFinished())
+      .After(stop);

   SimulateClientConnection(0, true);
   message_loop_.Run();
@@ -323,54 +319,43 @@

   // When the video packet is received we first disconnect the mock
   // connection, then run the done task, then quit the message loop.
-  {
-    InSequence s;
-    EXPECT_CALL(*disconnect_window_, Show(_, _, _))
-        .Times(0);
-    EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
-        .WillOnce(DoAll(
-            InvokeWithoutArgs(this, &ChromotingHostTest::RemoveClientSession),
-            RunDoneTask(),
-            InvokeWithoutArgs(this, &ChromotingHostTest::QuitMainMessageLoop)))
-        .RetiresOnSaturation();
-    EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
-        .Times(AnyNumber())
-        .WillRepeatedly(RunDoneTask());
-  }
-
-  {
-    InSequence s;
-    EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_));
-    EXPECT_CALL(*event_executor_, OnSessionFinished());
-  }
+  Expectation start1 = EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_));
+  Expectation stop1 = EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
+      .After(start1)
+      .WillOnce(DoAll(
+          InvokeWithoutArgs(this, &ChromotingHostTest::RemoveClientSession),
+          RunDoneTask(),
+          InvokeWithoutArgs(this, &ChromotingHostTest::QuitMainMessageLoop)))
+      .RetiresOnSaturation();
+  EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
+      .Times(AnyNumber())
+      .After(stop1)
+      .WillRepeatedly(RunDoneTask());
+  EXPECT_CALL(*event_executor_, OnSessionFinished())
+      .After(stop1);

   SimulateClientConnection(0, true);
   message_loop_.Run();

-  // Connect the second client.
-  {
-    InSequence s;
-    EXPECT_CALL(*disconnect_window_, Show(_, _, _))
-        .Times(0);
-    EXPECT_CALL(video_stub2_, ProcessVideoPacketPtr(_, _))
-        .WillOnce(DoAll(
-            InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost),
-            RunDoneTask()))
-        .RetiresOnSaturation();
-    EXPECT_CALL(video_stub2_, ProcessVideoPacketPtr(_, _))
-        .Times(AnyNumber())
-        .WillRepeatedly(RunDoneTask());
-    EXPECT_CALL(*connection2_, Disconnect())
-        .WillOnce(
-            InvokeWithoutArgs(this, &ChromotingHostTest::ClientSession2Closed))
-        .RetiresOnSaturation();
-  }
-
-  {
-    InSequence s;
-    EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_));
-    EXPECT_CALL(*event_executor_, OnSessionFinished());
-  }
+  Expectation start2 = EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_))
+      .After(stop1);
+  Expectation stop2 = EXPECT_CALL(video_stub2_, ProcessVideoPacketPtr(_, _))
+      .After(start2)
+      .WillOnce(DoAll(
+          InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost),
+          RunDoneTask()))
+      .RetiresOnSaturation();
+  EXPECT_CALL(video_stub2_, ProcessVideoPacketPtr(_, _))
+      .Times(AnyNumber())
+      .After(stop2)
+      .WillRepeatedly(RunDoneTask());
+  EXPECT_CALL(*connection2_, Disconnect())
+      .After(stop2)
+      .WillOnce(
+          InvokeWithoutArgs(this, &ChromotingHostTest::ClientSession2Closed))
+      .RetiresOnSaturation();
+  EXPECT_CALL(*event_executor_, OnSessionFinished())
+      .After(stop2);

   SimulateClientConnection(1, true);
   message_loop_.Run();
@@ -385,46 +370,40 @@

   // When a video packet is received we connect the second mock
   // connection.
-  {
-    InSequence s;
-    EXPECT_CALL(*disconnect_window_, Show(_, _, _))
-        .Times(0);
-    EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
-        .WillOnce(DoAll(
-            InvokeWithoutArgs(
-                CreateFunctor(
-                    this,
-                    &ChromotingHostTest::SimulateClientConnection, 1, true)),
-            RunDoneTask()))
-        .RetiresOnSaturation();
-    EXPECT_CALL(*disconnect_window_, Show(_, _, _))
-        .Times(0);
-    EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
-        .Times(AnyNumber())
-        .WillRepeatedly(RunDoneTask());
-    EXPECT_CALL(video_stub2_, ProcessVideoPacketPtr(_, _))
-        .WillOnce(DoAll(
-            InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost),
-            RunDoneTask()))
-        .RetiresOnSaturation();
-    EXPECT_CALL(video_stub2_, ProcessVideoPacketPtr(_, _))
-        .Times(AnyNumber())
-        .WillRepeatedly(RunDoneTask());
-  }
-
-  {
-    InSequence s;
-    EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_));
-    EXPECT_CALL(*event_executor_, OnSessionFinished());
-    EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_));
-    EXPECT_CALL(*event_executor_, OnSessionFinished());
-  }
-
+  Expectation start1 = EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_));
+  Expectation start2 = EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
+      .After(start1)
+      .WillOnce(DoAll(
+          InvokeWithoutArgs(
+              CreateFunctor(
+                  this,
+                  &ChromotingHostTest::SimulateClientConnection, 1, true)),
+          RunDoneTask()))
+      .RetiresOnSaturation();
+  EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _))
+      .Times(AnyNumber())
+      .After(start2)
+      .WillRepeatedly(RunDoneTask());
+  EXPECT_CALL(*event_executor_, OnSessionFinished()).After(start2);
+  EXPECT_CALL(*event_executor_, OnSessionStartedPtr(_)).After(start2);
   EXPECT_CALL(*connection_, Disconnect())
+      .After(start2)
       .WillOnce(
           InvokeWithoutArgs(this, &ChromotingHostTest::ClientSessionClosed))
       .RetiresOnSaturation();
+  Expectation stop2 = EXPECT_CALL(video_stub2_, ProcessVideoPacketPtr(_, _))
+      .After(start2)
+      .WillOnce(DoAll(
+          InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost),
+          RunDoneTask()))
+      .RetiresOnSaturation();
+  EXPECT_CALL(video_stub2_, ProcessVideoPacketPtr(_, _))
+      .Times(AnyNumber())
+      .After(stop2)
+      .WillRepeatedly(RunDoneTask());
+  EXPECT_CALL(*event_executor_, OnSessionFinished()).After(stop2);
   EXPECT_CALL(*connection2_, Disconnect())
+      .After(stop2)
       .WillOnce(
           InvokeWithoutArgs(this, &ChromotingHostTest::ClientSession2Closed))
       .RetiresOnSaturation();


MainWindow::default_font_

MainWindow::default_font_

Use to save default font before setting board's model.

--- src/gui/MainWindow.hpp
+++ src/gui/MainWindow.hpp
@@ -52,6 +52,8 @@

     GameOptionsPtr go_;

+    QFont default_font_;
+
     void setBoardsModel();

     void configureBoard(int row_number);


* Truely added unimplementation assertions to *all* the unimplemented evaluation methods

--- SIN/SINRuntime/Src/SINTreeEvaluationVisitor.cpp
+++ SIN/SINRuntime/Src/SINTreeEvaluationVisitor.cpp
@@ -593,11 +593,17 @@

 	//-----------------------------------------------------------------

-	void TreeEvaluationVisitor::Visit(MethodCallASTNode & _node){}
-
-	//-----------------------------------------------------------------
-
-	void TreeEvaluationVisitor::Visit(FuncdefCallASTNode & _node){}
+	void TreeEvaluationVisitor::Visit(MethodCallASTNode & _node) {
+		// TODO implement
+		SINASSERT(!"Not implemented");
+	}
+
+	//-----------------------------------------------------------------
+
+	void TreeEvaluationVisitor::Visit(FuncdefCallASTNode & _node) {
+		// TODO implement
+		SINASSERT(!"Not implemented");
+	}

 	//-----------------------------------------------------------------


Don't notify UIs about null atom port values (partially address #935).

git-svn-id: fb6d863945102bebb9fe1d25d24b18a16295c170@5168 a436a847-0d15-0410-975c-d299462d15a1

--- src/gui/NodeModule.cpp
+++ src/gui/NodeModule.cpp
@@ -352,7 +352,7 @@
 {
 	uint32_t index = 0;
 	for (const auto& p : _block->ports()) {
-		if (app().can_control(p.get())) {
+		if (app().can_control(p.get()) && p->value().is_valid()) {
 			port_value_changed(index, p->value());
 		}
 		++index;


A minor tweak to -E output, speeding up -E 1.5% on 447.dealII

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@40419 91177308-0d34-0410-b5e6-96231b3b80d8

--- Driver/PrintPreprocessedOutput.cpp
+++ Driver/PrintPreprocessedOutput.cpp
@@ -151,10 +151,13 @@
   // If this line is "close enough" to the original line, just print newlines,
   // otherwise print a #line directive.
   if (LineNo-CurLine < 8) {
-    unsigned Line = CurLine;
-    for (; Line != LineNo; ++Line)
+    if (LineNo-CurLine == 1)
       OutputChar('\n');
-    CurLine = Line;
+    else {
+      const char *NewLines = "\n\n\n\n\n\n\n\n";
+      OutputString(NewLines, LineNo-CurLine);
+      CurLine = LineNo;
+    }
   } else {
     if (EmittedTokensOnThisLine) {
       OutputChar('\n');


gui: unregister timing cone if there are no cones selected

Signed-off-by: Peter Gadfort <7a938094a14a6d7745b59a60224c4a3a5eb6a3d8@army.mil>