Enable C vs Opt unittest BUG=91 TEST=I420ToV210 Review URL: https://webrtc-codereview.appspot.com/859015

--- unit_test/convert_test.cc
+++ unit_test/convert_test.cc
@@ -48,11 +48,12 @@
   for (int i = 0; i < kHeight; ++i)                                            \
     for (int j = 0; j < kWidth; ++j)                                           \
       src_y[(i * kWidth) + j] = (random() & 0xff);                             \
-  for (int i = 0; i < kHeight / SRC_SUBSAMP_Y; ++i)                            \
+  for (int i = 0; i < kHeight / SRC_SUBSAMP_Y; ++i) {                          \
     for (int j = 0; j < kWidth / SRC_SUBSAMP_X; ++j) {                         \
       src_u[(i * kWidth / SRC_SUBSAMP_X) + j] = (random() & 0xff);             \
       src_v[(i * kWidth / SRC_SUBSAMP_X) + j] = (random() & 0xff);             \
     }                                                                          \
+  }                                                                            \
   MaskCpuFlags(0);                                                             \
   SRC_FMT_PLANAR##To##FMT_PLANAR(src_y, kWidth,                                \
                                  src_u, kWidth / SRC_SUBSAMP_X,                \
@@ -132,8 +133,6 @@
 TESTPLANARTOP(I420, 2, 2, I422, 2, 1)
 TESTPLANARTOP(I420, 2, 2, I444, 1, 1)
 TESTPLANARTOP(I420, 2, 2, I411, 4, 1)
-
-// TODO(fbarchard): Enable C code for comparison: MaskCpuFlags(0);                                                             \

 #define TESTPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, ALIGN,  \
                        W1280, N, NEG)                                          \
@@ -161,11 +160,13 @@
       src_v[(i * kWidth / SUBSAMP_X) + j] = (random() & 0xff);                 \
     }                                                                          \
   }                                                                            \
+  MaskCpuFlags(0);                                                             \
   FMT_PLANAR##To##FMT_B(src_y, kWidth,                                         \
                         src_u, kWidth / SUBSAMP_X,                             \
                         src_v, kWidth / SUBSAMP_X,                             \
                         dst_argb_c, kStrideB,                                  \
                         kWidth, NEG kHeight);                                  \
+  MaskCpuFlags(-1);                                                            \
   for (int i = 0; i < benchmark_iterations_; ++i) {                            \
     FMT_PLANAR##To##FMT_B(src_y, kWidth,                                       \
                           src_u, kWidth / SUBSAMP_X,                           \
@@ -175,7 +176,7 @@
   }                                                                            \
   int max_diff = 0;                                                            \
   for (int i = 0; i < kHeight; ++i) {                                          \
-    for (int j = 0; j < kWidth * BPP_B; ++j) {                                 \
+    for (int j = 0; j < (kWidth * 8 * BPP_B + 7) / 8; ++j) {                   \
       int abs_diff =                                                           \
           abs(static_cast<int>(dst_argb_c[i * kStrideB + j]) -                 \
               static_cast<int>(dst_argb_opt[i * kStrideB + j]));               \


dfs iterator added in connected components example

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@5197 e6417c60-b987-48fd-844e-b20f0fcc1017

--- seqan/projects/library/demos/tutorial/graph_algo_scc.cpp
+++ seqan/projects/library/demos/tutorial/graph_algo_scc.cpp
@@ -22,6 +22,18 @@
 	char names[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'};
 	resizeVertexMap(g,nameMap, names);

+// FRAGMENT(iterate-dfs)
+    TVertexDescriptor start = 0;
+    typedef Iterator<TGraph, DfsPreorder>::Type TDfsIterator;
+    TDfsIterator dfsIt(g, start);
+
+    ::std::cout << "Iterate from " << getProperty(nameMap, start) << " in depth-first-search ordering: ";
+    while(!atEnd(dfsIt)) {
+        ::std::cout << getProperty(nameMap, getValue(dfsIt)) << ", ";
+        goNext(dfsIt);
+    }
+    ::std::cout << ::std::endl;
+
 // FRAGMENT(connected-components)
 	String<unsigned int> component;
 	strongly_connected_components(g, component);


Test suite for group-aggregate improved. Different gap sizes now taken into account.

--- unittests/test_nbtree.cpp
+++ unittests/test_nbtree.cpp
@@ -1171,7 +1171,7 @@
 }

-void test_nbtree_group_aggregate_forward(size_t commit_limit, u64 step, int start_offset) {
+void test_nbtree_group_aggregate_forward(size_t commit_limit, u64 step, int start_offset, const int ts_increment=1) {
     // Build this tree structure.
     aku_Timestamp begin = 1000;
     aku_Timestamp end = begin;
@@ -1190,13 +1190,14 @@
     auto bucket_ix = 0ull;
     while(ncommits < commit_limit) {
         auto current_bucket = (end - query_begin) / step;
-        if (end >= query_begin && current_bucket > bucket_ix) {
+        if (end >= query_begin && current_bucket > bucket_ix && acc.cnt) {
             bucket_ix = current_bucket;
             buckets.push_back(acc);
             acc = INIT_AGGRES;
         }
         double value = rwalk.next();
-        aku_Timestamp ts = end++;
+        aku_Timestamp ts = end;
+        end += ts_increment;
         extents->append(ts, value);
         if (ts >= query_begin) {
             acc.add(ts, value, true);
@@ -1232,39 +1233,53 @@

 BOOST_AUTO_TEST_CASE(Test_group_aggregate_forward) {
     const int N_runs = 10;
-    std::vector<std::tuple<u32, u32, int>> cases = {
-        std::make_tuple( 1,     100, 0),
-        std::make_tuple( 2,     100, 0),
-        std::make_tuple(10,     100, 0),
-        std::make_tuple(32,     100, 0),
-        std::make_tuple(32*32,  100, 0),
-        std::make_tuple(32*32,  100, 1),
-        std::make_tuple(32*32,  100,-1),
-
-        std::make_tuple( 1,    1000, 0),
-        std::make_tuple( 2,    1000, 0),
-        std::make_tuple(10,    1000, 0),
-        std::make_tuple(32,    1000, 0),
-        std::make_tuple(32*32, 1000, 0),
-        std::make_tuple(32*32, 1000, 1),
-        std::make_tuple(32*32, 1000,-1),
-
-        std::make_tuple( 1,   10000, 0),
-        std::make_tuple( 2,   10000, 0),
-        std::make_tuple(10,   10000, 0),
-        std::make_tuple(32,   10000, 0),
-        std::make_tuple(32*32,10000, 0),
-        std::make_tuple(32*32,10000, 1),
-        std::make_tuple(32*32,10000,-1),
+    std::vector<std::tuple<u32, u32, int, int>> cases = {
+        std::make_tuple( 1,     100, 0, 1),
+        std::make_tuple( 2,     100, 0, 1),
+        std::make_tuple(10,     100, 0, 1),
+        std::make_tuple(32,     100, 0, 1),
+        std::make_tuple(32*32,  100, 0, 1),
+        std::make_tuple(32*32,  100, 1, 1),
+        std::make_tuple(32*32,  100,-1, 1),
+
+        std::make_tuple( 1,    1000, 0, 1),
+        std::make_tuple( 2,    1000, 0, 1),
+        std::make_tuple(10,    1000, 0, 1),
+        std::make_tuple(32,    1000, 0, 1),
+        std::make_tuple(32*32, 1000, 0, 1),
+        std::make_tuple(32*32, 1000, 1, 1),
+        std::make_tuple(32*32, 1000,-1, 1),
+
+        std::make_tuple( 1,   10000, 0, 1),
+        std::make_tuple( 2,   10000, 0, 1),
+        std::make_tuple(10,   10000, 0, 1),
+        std::make_tuple(32,   10000, 0, 1),
+        std::make_tuple(32*32,10000, 0, 1),
+        std::make_tuple(32*32,10000, 1, 1),
+        std::make_tuple(32*32,10000,-1, 1),
+
+        std::make_tuple(    1, 100, 0, 100),
+        std::make_tuple(   10, 100, 0, 100),
+        std::make_tuple(   32, 100, 0, 100),
+        std::make_tuple(32*32, 100, 0, 100),
+        std::make_tuple(32*32, 100, 1, 100),
+        std::make_tuple(32*32, 100,-1, 100),
+
+        std::make_tuple(    1, 100, 0, 1000),
+        std::make_tuple(   10, 100, 0, 1000),
+        std::make_tuple(   32, 100, 0, 1000),
+        std::make_tuple(32*32, 100, 0, 1000),
+        std::make_tuple(32*32, 100, 1, 1000),
+        std::make_tuple(32*32, 100,-1, 1000),
     };
     for (int i = 0; i < N_runs; i++) {
         for (auto t: cases) {
-            test_nbtree_group_aggregate_forward(std::get<0>(t), std::get<1>(t), std::get<2>(t));
-        }
-    }
-}
-
-void test_nbtree_group_aggregate_backward(size_t commit_limit, u64 step, int start_offset) {
+            test_nbtree_group_aggregate_forward(std::get<0>(t), std::get<1>(t), std::get<2>(t), std::get<3>(t));
+        }
+    }
+}
+
+void test_nbtree_group_aggregate_backward(size_t commit_limit, u64 step, int start_offset, const int ts_inc=1) {
     // Build this tree structure.
     aku_Timestamp begin = 1000;
     aku_Timestamp end = begin;
@@ -1283,7 +1298,8 @@
     std::vector<double> xss;
     while(ncommits < commit_limit) {
         double value = rwalk.next();
-        aku_Timestamp ts = end++;
+        aku_Timestamp ts = end;
+        end += ts_inc;
         extents->append(ts, value);
         tss.push_back(ts);
         xss.push_back(value);
@@ -1299,7 +1315,7 @@
     auto query_end = static_cast<u64>(static_cast<i64>(begin) + start_offset);
     for (auto ix = 0ul; ix < xss.size(); ix++) {
         auto current_bucket = (query_begin - tss[ix]) / step;
-        if (tss[ix] <= query_begin && tss[ix] > query_end && current_bucket != bucket_ix) {
+        if (tss[ix] <= query_begin && tss[ix] > query_end && current_bucket != bucket_ix && acc.cnt) {
             bucket_ix = current_bucket;
             buckets.push_back(acc);
             acc = INIT_AGGRES;
@@ -1342,33 +1358,49 @@

 BOOST_AUTO_TEST_CASE(Test_group_aggregate_backward) {
     const int N_runs = 10;
-    std::vector<std::tuple<u32, u32, int>> cases = {
-        std::make_tuple( 1,     100, 0),
-        std::make_tuple( 2,     100, 0),
-        std::make_tuple(10,     100, 0),
-        std::make_tuple(32,     100, 0),
-        std::make_tuple(32*32,  100, 0),
-        std::make_tuple(32*32,  100, 1),
-        std::make_tuple(32*32,  100,-1),
-
-        std::make_tuple( 1,    1000, 0),
-        std::make_tuple( 2,    1000, 0),
-        std::make_tuple(10,    1000, 0),
-        std::make_tuple(32,    1000, 0),
-        std::make_tuple(32*32, 1000, 0),
-        std::make_tuple(32*32, 1000, 1),
-        std::make_tuple(32*32, 1000,-1),
-        std::make_tuple( 1,   10000, 0),
-        std::make_tuple( 2,   10000, 0),
-        std::make_tuple(10,   10000, 0),
-        std::make_tuple(32,   10000, 0),
-        std::make_tuple(32*32,10000, 0),
-        std::make_tuple(32*32,10000, 1),
-        std::make_tuple(32*32,10000,-1),
+    std::vector<std::tuple<u32, u32, int, int>> cases = {
+        std::make_tuple( 1,     100, 0, 1),
+        std::make_tuple( 2,     100, 0, 1),
+        std::make_tuple(10,     100, 0, 1),
+        std::make_tuple(32,     100, 0, 1),
+        std::make_tuple(32*32,  100, 0, 1),
+        std::make_tuple(32*32,  100, 1, 1),
+        std::make_tuple(32*32,  100,-1, 1),
+
+        std::make_tuple( 1,    1000, 0, 1),
+        std::make_tuple( 2,    1000, 0, 1),
+        std::make_tuple(10,    1000, 0, 1),
+        std::make_tuple(32,    1000, 0, 1),
+        std::make_tuple(32*32, 1000, 0, 1),
+        std::make_tuple(32*32, 1000, 1, 1),
+        std::make_tuple(32*32, 1000,-1, 1),
+
+        std::make_tuple( 1,   10000, 0, 1),
+        std::make_tuple( 2,   10000, 0, 1),
+        std::make_tuple(10,   10000, 0, 1),
+        std::make_tuple(32,   10000, 0, 1),
+        std::make_tuple(32*32,10000, 0, 1),
+        std::make_tuple(32*32,10000, 1, 1),
+        std::make_tuple(32*32,10000,-1, 1),
+
+        std::make_tuple(    1, 100, 0, 100),
+        std::make_tuple(   10, 100, 0, 100),
+        std::make_tuple(   32, 100, 0, 100),
+        std::make_tuple(32*32, 100, 0, 100),
+        std::make_tuple(32*32, 100, 1, 100),
+        std::make_tuple(32*32, 100,-1, 100),
+
+        std::make_tuple(    1, 100, 0, 1000),
+        std::make_tuple(   10, 100, 0, 1000),
+        std::make_tuple(   32, 100, 0, 1000),
+        std::make_tuple(32*32, 100, 0, 1000),
+        std::make_tuple(32*32, 100, 1, 1000),
+        std::make_tuple(32*32, 100,-1, 1000),
     };
     for (int i = 0; i < N_runs; i++) {
         for (auto t: cases) {
-            test_nbtree_group_aggregate_backward(std::get<0>(t), std::get<1>(t), std::get<2>(t));
-        }
-    }
-}
+            test_nbtree_group_aggregate_backward(std::get<0>(t), std::get<1>(t), std::get<2>(t), std::get<3>(t));
+        }
+    }
+}
+


MumblePlugin: Remove debug include.

MumblePlugin: Remove debug include.

--- src/Application/MumblePlugin/MumbleNetworkHandler.cpp
+++ src/Application/MumblePlugin/MumbleNetworkHandler.cpp
@@ -17,8 +17,6 @@
 #include <QDataStream>
 #include <QSslCipher>
 #include <QMutexLocker>
-
-#include <QTime> // remove

 using namespace MumbleNetwork;


added more presolve rule

added more presolve rule

--- src/flatzinc2/presolve.cc
+++ src/flatzinc2/presolve.cc
@@ -24,6 +24,10 @@
 //
 // Presolve rule:
 //   - table_int -> intersect variables domains with tuple set.
+//   - int_eq_reif(x, x, b) -> b == 1
+//   - int_ne_reif(x, x, b) -> b == 0
+//   - array_bool_or(xi, b) and one xi is true -> b == 1
+//   - array_bool_and(xi, b) and one xi is false -> b == 0
 //
 // TODO(user):
 //   - store dependency graph of constraints -> variable to speed up presolve.


Fix some matcher bugs

Fix some matcher bugs

--- 8088/cga/calibrate/cga2ntsc/cga2ntsc.cpp
+++ 8088/cga/calibrate/cga2ntsc/cga2ntsc.cpp
@@ -846,7 +846,8 @@
 class CGAMatcher : public ThreadTask
 {
 public:
-    CGAMatcher() : _rgbiPalette(3*0x10), _decoder(128)
+    CGAMatcher()
+      : _rgbiPalette(3*0x10), _decoder(128), _active(false), _size(0, 0)
     {
         _scaler.setProfile(4);
         _scaler.setWidth(1);
@@ -857,14 +858,12 @@
     {
         _activeSize = activeSize;
         _input = input;
-        _size = input.size();
         _active = true;
         initData();
     }
     void setSize(Vector size)
     {
         _activeSize = size;
-        _size = size;
         initData();
     }
     void setProgram(Program* program) { _program = program; }
@@ -879,6 +878,7 @@
                 Vector2Cast<float>(_input.size()));
             size.x = _hdotsPerChar*_horizontalDisplayed;
             _scaler.setOutputSize(size);
+            _scaler.init();
             _size = size;
             AlignedBuffer input = _scaler.input();
             Vector tl = _scaler.inputTL();
@@ -921,6 +921,7 @@
                     unscaled[0] = p[0];
                     unscaled[1] = p[1];
                     unscaled[2] = p[2];
+                    unscaled += 3;
                 }
                 unscaledRow += input.stride();
             }
@@ -934,13 +935,20 @@
                     unscaled[0] = p[0];
                     unscaled[1] = p[1];
                     unscaled[2] = p[2];
+                    unscaled += 3;
                 }
                 unscaledRow += input.stride();
             }
-        }
+            _scaler.render();
+            _scaled = _scaler.output();
+        }
+        double quality = _quality;
+        int mode1 = (_mode & 0x13) + (_scanlinesPerRow > 2 ? 0x100 : 0);
+        if (mode1 == 0x13 || (mode1 & 0x103) == 2)
+            quality = 1;

         // Set up gamut table
-        float gDivisions = static_cast<float>(64.0/pow(2, _quality*6));
+        float gDivisions = static_cast<float>(64.0/pow(2, quality*6));
         Vector3<float> srgbScale;
         srgbScale.y = gDivisions/256;
         srgbScale.x = srgbScale.y*0.84f;
@@ -994,7 +1002,7 @@
             _decoder.calculateBurst(burst);
             _ntscPattern.ensure(blockWidth);
         }
-        _srgbPattern.ensure(blockWidth);
+        _srgbPattern.ensure(blockWidth*3);
         static const UInt32 hres1bpp[0x10] = {
             0x00000000, 0x01010101, 0x04040404, 0x05050505,
             0x10101010, 0x11111111, 0x14141414, 0x15151515,
@@ -1002,7 +1010,6 @@
             0x50505050, 0x51515151, 0x54545454, 0x55555555};

         // Populate gamut table
-        int mode1 = (_mode & 0x13) + (_scanlinesPerRow > 2 ? 0x100 : 0);
         for (UInt32 pattern = 0;; ++pattern) {
             Colour rgb(0, 0, 0);
             UInt32 dataBits[2];
@@ -1134,19 +1141,21 @@
         bool nothingChanged = true;

         int row = 0;
+        int scanline = 0;
         const Byte* inputRow = _scaled.data();
-        Colour* errorRow = &_error[3*(size.x + 2)];
+        Colour* errorRow = &_error[errorStride + 1];
         Byte* rgbiRow = &_rgbi[1];
         Byte* ntscRow = &_ntsc[0];
         Byte* srgbRow = &_srgb[0];
         int horizontalBlocks = size.x/blockWidth;
         int phaseRow = _phase << 6;
+        int bankShift = _data->getDataByte(-25) + 1;

         // Perform matching
         while (!cancelling()) {
             for (int y = 0; y < scanlines; ++y) {
                 Array<Byte> rowData = _data->getData(row*bytesPerRow +
-                    (y << (_data->getDataByte(25) + 1)), bytesPerRow);
+                    (y << bankShift), bytesPerRow);
                 memcpy(&_rowData[1 + y*rowDataStride], &rowData[0],
                     bytesPerRow);
             }
@@ -1350,7 +1359,7 @@
                         break;
                 }
                 inputBlock += blockWidth*3*sizeof(float);
-                errorBlock += blockWidth*3;
+                errorBlock += blockWidth;

                 switch (mode2) {
                     case 0x102:
@@ -1411,24 +1420,33 @@
                 srgbBlock += 3*blockWidth;
             }

-            for (int l = 0; l < scanlines; ++l) {
-                _data->change(0, row*bytesPerRow +
-                    (l << (_data->getDataByte(25) + 1)), bytesPerRow,
-                    &_rowData[1 + l*rowDataStride]);
-            }
-
-            ++row;
-            if (row >= _verticalDisplayed) {
-                row = 0;
-                inputRow = _scaled.data();
-                errorRow = &_error[3*(size.x + 2)];
-                rgbiRow = &_rgbi[1];
-                ntscRow = &_ntsc[0];
-                srgbRow = &_srgb[0];
-                horizontalBlocks = size.x/blockWidth;
-                phaseRow = _phase << 6;
-                if (!improper || nothingChanged)
-                    return;
+            if ((mode1 & 0x102) == 2) {
+                _data->change(0, row*bytesPerRow + (scanline << bankShift),
+                    bytesPerRow, &_rowData[1]);
+            }
+            else {
+                for (int l = 0; l < scanlines; ++l) {
+                    _data->change(0, row*bytesPerRow + (l << bankShift),
+                        bytesPerRow, &_rowData[1 + l*rowDataStride]);
+                }
+            }
+
+            scanline += blockHeight;
+            if (scanline == scanlines) {
+                scanline = 0;
+                ++row;
+                if (row >= _verticalDisplayed) {
+                    row = 0;
+                    inputRow = _scaled.data();
+                    errorRow = &_error[3*(size.x + 2)];
+                    rgbiRow = &_rgbi[1];
+                    ntscRow = &_ntsc[0];
+                    srgbRow = &_srgb[0];
+                    horizontalBlocks = size.x/blockWidth;
+                    phaseRow = _phase << 6;
+                    if (!improper || nothingChanged)
+                        return;
+                }
             }
             inputRow += blockHeight*_scaled.stride();
             errorRow += errorStride*blockHeight;
@@ -1515,16 +1533,18 @@
         Byte cgaRegistersData[25] = { 0 };
         Byte* cgaRegisters = &cgaRegistersData[25];
         _hdotsPerChar = (_mode & 1) != 0 ? 8 : 16;
-        _horizontalDisplayed = (_size.x + _hdotsPerChar - 1)/_hdotsPerChar;
+        _horizontalDisplayed =
+            (_activeSize.x + _hdotsPerChar - 1)/_hdotsPerChar;
         int scanlinesPerRow = _scanlinesPerRow*_scanlinesRepeat;
-        _verticalDisplayed = (_size.y + scanlinesPerRow - 1)/scanlinesPerRow;
+        _verticalDisplayed =
+            (_activeSize.y + scanlinesPerRow - 1)/scanlinesPerRow;
         _logCharactersPerBank = 0;
         while ((1 << _logCharactersPerBank) <
             _horizontalDisplayed*_verticalDisplayed)
             ++_logCharactersPerBank;
         int horizontalTotal = _horizontalDisplayed + 272/_hdotsPerChar;
         int horizontalSyncPosition = _horizontalDisplayed + 80/_hdotsPerChar;
-        int totalScanlines = _size.y + 62;
+        int totalScanlines = _activeSize.y + 62;
         int verticalTotal = totalScanlines/scanlinesPerRow;
         int verticalTotalAdjust =
             totalScanlines - verticalTotal*scanlinesPerRow;
@@ -3199,7 +3219,8 @@
         _videoCard._registers._palette.enableWindow((mode & 0x12) == 2);
         _videoCard._registers._phase.enableWindow((mode & 1) == 1);
         _videoCard._matching._quality.enableWindow(matchMode &&
-            (((mode & 3) != 2 || scanlinesPerRow > 2)));
+            ((((mode & 3) != 2 && (mode & 0x13) != 0x13) ||
+            scanlinesPerRow > 2)));
         _videoCard._matching._characterSet.enableWindow(matchMode &&
             (mode & 2) == 0);
         _videoCard._matching._diffusionHorizontal.enableWindow(matchMode);


planning: fix wrong check condition crash.

--- modules/planning/optimizer/st_graph/st_boundary_mapper.cc
+++ modules/planning/optimizer/st_graph/st_boundary_mapper.cc
@@ -66,7 +66,7 @@
       planning_time_(planning_time) {
   const auto& path_start_point = path_data_.discretized_path().start_point();
   common::SLPoint sl_point;
-  CHECK(!reference_line_.get_point_in_frenet_frame(
+  DCHECK(reference_line_.get_point_in_frenet_frame(
       {path_start_point.x(), path_start_point.y()}, &sl_point))
       << "Failed to get adc reference line s";
   adc_front_s_ = sl_point.s() + vehicle_param_.front_edge_to_center();


INTEGRATION: CWS pchfix02 (1.4.222); FILE MERGED 2006/09/01 17:25:15 kaib 1.4.222.1: #i68856# Added header markers and pch files

--- desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx
+++ desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dp_parceldesc.cxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.5 $
  *
- *  last change: $Author: rt $ $Date: 2005-09-08 17:34:18 $
+ *  last change: $Author: obo $ $Date: 2006-09-17 09:44:49 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -32,6 +32,9 @@
  *    MA  02111-1307  USA
  *
  ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_desktop.hxx"
 #include "dp_parceldesc.hxx"

 using namespace ::com::sun::star;


ISIXE-909 changed SceneManager back to old default

--- libs/i6engine-modules/src/modules/graphics/GraphicsManager.cpp
+++ libs/i6engine-modules/src/modules/graphics/GraphicsManager.cpp
@@ -91,7 +91,7 @@

 		Ogre::WindowEventUtilities::addWindowEventListener(_rWindow, this);

-		_sceneManager = _objRoot->createSceneManager(Ogre::ST_EXTERIOR_REAL_FAR);
+		_sceneManager = _objRoot->createSceneManager(Ogre::ST_GENERIC);

 		_sceneManager->addRenderQueueListener(new Ogre::OverlaySystem());


sstables.hh: Add attribute description API to file extension

--- sstables/sstables.hh
+++ sstables/sstables.hh
@@ -33,6 +33,7 @@
 #include <seastar/core/distributed.hh>
 #include <unordered_set>
 #include <unordered_map>
+#include <variant>
 #include "types.hh"
 #include "clustering_key_filter.hh"
 #include <seastar/core/enum.hh>
@@ -948,6 +949,15 @@
 public:
     virtual ~file_io_extension() {}
     virtual future<file> wrap_file(sstable&, component_type, file, open_flags flags) = 0;
+    // optionally return a map of attributes for a given sstable,
+    // suitable for "describe".
+    // This would preferably be interesting info on what/why the extension did
+    // to this table.
+    using attr_value_type = std::variant<sstring, std::map<sstring, sstring>>;
+    using attr_value_map = std::map<sstring, attr_value_type>;
+    virtual attr_value_map get_attributes(const sstable&) const {
+        return {};
+    }
 };

 }


fix for bug 22537

fix for bug 22537

git-svn-id: 95233098a850bdf68e142cb551b6b3e756f38fc7@175148 13f79535-47bb-0310-9956-ffa450edef68

--- src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
+++ src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
@@ -56,6 +56,9 @@

 /*
  * $Log$
+ * Revision 1.10  2003/08/19 14:01:41  neilg
+ * fix for bug 22537
+ *
  * Revision 1.9  2003/05/17 16:32:18  knoaman
  * Memory manager implementation : transcoder update.
  *
@@ -1051,7 +1054,7 @@
     if (*toTranscode) {
         const unsigned int wLent = calcRequiredSize(toTranscode);
         if (wLent == 0) {
-            retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));/new XMLCh[1];
+            retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));//new XMLCh[1];
             retVal[0] = 0;
             return retVal;
         }
@@ -1186,7 +1189,7 @@
                       ,    iconv_t        cd_to
                       ,    size_t        uchsize
                       ,    unsigned int    ubo
-                      , MemoryManger* const manager
+                      , MemoryManager* const manager
     )
     : XMLTranscoder(encodingName, blockSize, manager)
     , IconvGNUWrapper (cd_from, cd_to, uchsize, ubo)


check affordance list has changed before resetting widgets

git-svn-id: 767549f2a3626ae39d79f5348867a3ebb5082aca@3889 c7283977-0100-402a-a91a-fa70b306dbfe

--- software/perception/world_model/maps/src/renderers/DataControlRenderer.cpp
+++ software/perception/world_model/maps/src/renderers/DataControlRenderer.cpp
@@ -64,6 +64,7 @@
   Glib::RefPtr<Gtk::ListStore> mAffordanceTreeModel;
   Gtk::TreeView* mAffordanceListBox;
   std::shared_ptr<affordance::AffordanceUpWrapper> mAffordanceWrapper;
+  std::unordered_map<int,std::string> mAffordanceNames;

   std::unordered_map<std::string, ChannelType> mChannels;
   std::unordered_map<std::string, TimeKeeper> mTimeKeepers;
@@ -138,22 +139,40 @@
     activeRows->selected_foreach_iter
       (sigc::mem_fun(functor, &Functor::callback) );

-    // populate new list
+    // check whether affordances have changed
     std::vector<affordance::AffConstPtr> affordances;
     mAffordanceWrapper->getAllAffordances(affordances);
-    mAffordanceTreeModel->clear();
+    bool affordancesChanged = false;
+    std::unordered_map<int,std::string> newNames;
     for (size_t i = 0; i < affordances.size(); ++i) {
-      Gtk::TreeModel::iterator localIter = mAffordanceTreeModel->append();
-      const Gtk::TreeModel::Row& row = *localIter;
-      row[columns.mId] = affordances[i]->_uid;
       char name[256];
       sprintf(name, "%d - %s", affordances[i]->_uid,
               affordances[i]->getName().c_str());
-      row[columns.mLabel] = name;
-      if (std::find(functor.mIds.begin(), functor.mIds.end(),
-                    affordances[i]->_uid) != functor.mIds.end()) {
-        activeRows->select(localIter);
-      }
+      newNames[affordances[i]->_uid] = name;
+      if ((mAffordanceNames.find(affordances[i]->_uid) ==
+           mAffordanceNames.end()) ||
+          (mAffordanceNames[affordances[i]->_uid] != name)) {
+        affordancesChanged = true;
+      }
+    }
+    if (!affordancesChanged && (mAffordanceNames.size() != newNames.size())) {
+      affordancesChanged = true;
+    }
+
+    // populate new list
+    if (affordancesChanged) {
+      mAffordanceTreeModel->clear();
+      for (size_t i = 0; i < affordances.size(); ++i) {
+        Gtk::TreeModel::iterator localIter = mAffordanceTreeModel->append();
+        const Gtk::TreeModel::Row& row = *localIter;
+        row[columns.mId] = affordances[i]->_uid;
+        row[columns.mLabel] = newNames[affordances[i]->_uid];
+        if (std::find(functor.mIds.begin(), functor.mIds.end(),
+                      affordances[i]->_uid) != functor.mIds.end()) {
+          activeRows->select(localIter);
+        }
+      }
+      mAffordanceNames = newNames;
     }

     return true;


decode: Move to new packet API

decode: Move to new packet API

Signed-off-by: Derek Buitenhuis <aff7d637ede26ea82e5226e01b697996cc52e526@gmail.com>

--- core/decode.cpp
+++ core/decode.cpp
@@ -130,7 +130,7 @@
         return;

     av_freep(&lctx->in);
-    av_free_packet(&lctx->inpkt);
+    av_packet_unref(&lctx->inpkt);

     if (lctx->fctx) {
         if (lctx->fctx->pb)
@@ -432,7 +432,7 @@
         avformat_find_stream_info(dctx->fctx, NULL);

         /* Free and re-initialize any existing packet. */
-        av_free_packet(&dctx->inpkt);
+        av_packet_unref(&dctx->inpkt);
         av_init_packet(&dctx->inpkt);
     }

@@ -474,7 +474,7 @@
     o = next ? 0 : offset;
     for(j = 0; j <= o; j++) {
         while(dctx->inpkt.stream_index != dctx->stream_index) {
-            av_free_packet(&dctx->inpkt);
+            av_packet_unref(&dctx->inpkt);
             av_read_frame(dctx->fctx, &dctx->inpkt);
         }

@@ -483,7 +483,7 @@
          * with one frame of latency in libavcodec.
          */
         if ((unsigned int) frame_num == ctx->frames.size() - 1) {
-            av_free_packet(&dctx->inpkt);
+            av_packet_unref(&dctx->inpkt);
             avcodec_decode_video2(dctx->avctx, out, &av_ret, &dctx->inpkt);
             break;
         }
@@ -512,7 +512,7 @@
             dctx->inpkt = orig;

             do {
-                av_free_packet(&dctx->inpkt);
+                av_packet_unref(&dctx->inpkt);
                 av_read_frame(dctx->fctx, &dctx->inpkt);
             } while(dctx->inpkt.stream_index != dctx->stream_index);
         }


branch boyceg: setting up AdvDiffSemiImplicitHierarchyIntegrator to function correctly when an advection velocity does not have a corresponding setter function

--- src/adv_diff/AdvDiffSemiImplicitHierarchyIntegrator.C
+++ src/adv_diff/AdvDiffSemiImplicitHierarchyIntegrator.C
@@ -622,6 +622,10 @@
                 {
                     d_u_fcn[u_var]->setDataOnPatchHierarchy(u_new_idx, u_var, d_hierarchy, new_time);
                 }
+                else
+                {
+                    d_hier_fc_data_ops->copyData(u_new_idx, u_current_idx);
+                }
                 d_hier_fc_data_ops->linearSum(u_scratch_idx, 0.5, u_current_idx, 0.5, u_new_idx);
             }
         }


BUG: Potential bug in the race detector.  Conflicting writes to shared memory across cta boundaries are not actually errors.

Former-commit-id: bd043f08156b20ee0364b42ee6c845959219a921

--- ocelot/ocelot/trace/implementation/MemoryRaceDetector.cpp
+++ ocelot/ocelot/trace/implementation/MemoryRaceDetector.cpp
@@ -146,7 +146,8 @@
 				_write( event );
 			}
 		}
-		else if( event.instruction->opcode == ir::PTXInstruction::Bar )
+		else if( event.instruction->opcode == ir::PTXInstruction::Bar
+			|| event.instruction->opcode == ir::PTXInstruction::Exit )
 		{
 			_barrier();
 		}


[matchingImageCollection] add doc

[matchingImageCollection] add doc

--- src/aliceVision/matchingImageCollection/GeometricFilterMatrix_HGrowing.hpp
+++ src/aliceVision/matchingImageCollection/GeometricFilterMatrix_HGrowing.hpp
@@ -70,11 +70,24 @@
     double _maxFractionPlanarMatches{0.7};
 };

+/**
+ * @brief Return all the matches in the same plane as the match \c seedMatchId with the corresponding homography.
+ * @details This algorithm is detailed in [F.Srajer, 2016] algo. 1, p. 20.
+ * @param[in] featuresI The features of the first view.
+ * @param[in] featuresJ The features of the second view.
+ * @param[in] matches All the putative planar matches.
+ * @param[in] seedMatchId The match used to estimate the plane and the corresponding matches.
+ * @param[out] planarMatchesIndices The indices (in the \c matches vector) of the really planar matches.
+ * @param[out] transformation The homography associated to the plane.
+ * @param[in] param The parameters of the algorihm.
+ * @return true if the \c transformation is different than the identity matrix.
+ */
 bool growHomography(const std::vector<feature::SIOPointFeature> &featuresI,
                     const std::vector<feature::SIOPointFeature> &featuresJ,
                     const matching::IndMatches &matches,
                     const IndexT &seedMatchId,
-                    std::set<IndexT> &planarMatchesIndices, Mat3 &transformation,
+                    std::set<IndexT> &planarMatchesIndices,
+                    Mat3 &transformation,
                     const GrowParameters& param);

 struct HGrowingFilteringParam
@@ -96,13 +109,34 @@
     GrowParameters _growParam{};
 };

+/**
+ * @brief Filter the matches between two images using a growing homography approach.
+ * @param[in] featuresI The features of the first view.
+ * @param[in] featuresJ The features of the second view.
+ * @param[in] putativeMatches The putative matches.
+ * @param[out] homographiesAndMatches Contains each found homography and the relevant supporting matches.
+ * @param[out] outGeometricInliers All the matches that supports one of the found homographies.
+ * @param[in] param The parameters of the algorithm.
+ */
 void filterMatchesByHGrowing(const std::vector<feature::SIOPointFeature>& siofeatures_I,
                              const std::vector<feature::SIOPointFeature>& siofeatures_J,
                              const matching::IndMatches& putativeMatches,
-                             std::vector<std::pair<Mat3, matching::IndMatches>>& homographiesAndMatches,
+                             std::vector<std::pair<Mat3,
+                             matching::IndMatches>>& homographiesAndMatches,
                              matching::IndMatches& outGeometricInliers,
                              const HGrowingFilteringParam& param);

+/**
+ * @brief Generate a svg file with the two images and the matches grouped in different color
+ * according to their supporting homography.
+ * @param[in] outFilename The filename of the svg file to generate.
+ * @param[in] viewI The first view.
+ * @param[in] viewJ The second view.
+ * @param[in] featuresI The features of the first view.
+ * @param[in] featuresJ The features of the second view.
+ * @param[in] homographiesAndMatches Contains each found homography and the relevant supporting matches.
+ * @param[in] putativeMatches The putative matches.
+ */
 void drawHomographyMatches(const std::string& outFilename,
                       const sfm::View & viewI,
                       const sfm::View & viewJ,
@@ -110,6 +144,7 @@
                       const std::vector<feature::SIOPointFeature>& siofeatures_J,
                       const std::vector<std::pair<Mat3, matching::IndMatches>>& homographiesAndMatches,
                       const matching::IndMatches& putativeMatches);
+
 //-- Multiple homography matrices estimation template functor, based on homography growing, used for filter pair of putative correspondences
 struct GeometricFilterMatrix_HGrowing : public GeometricFilterMatrix
 {


[Hgrowing] cannot be applied with CCTAG descriptors

--- src/aliceVision/matchingImageCollection/GeometricFilterMatrix_HGrowing.hpp
+++ src/aliceVision/matchingImageCollection/GeometricFilterMatrix_HGrowing.hpp
@@ -55,22 +55,30 @@
     const matching::MatchesPerDescType & putativeMatchesPerType,
     matching::MatchesPerDescType & out_geometricInliersPerType)
   {
-    using namespace aliceVision;
-    using namespace aliceVision::robustEstimation;
     out_geometricInliersPerType.clear();

-    // EOrdering - Ouput ordering :
-    // * Putative: 'out_geometricInliersPerType' contains matches with the same ordering than 'putativeMatchesPerType'
-    // * Homographies: matches sharing the same homography are assembled.
     enum EOrdering {PutativeLike, HGrouped};
+    // Defines the format of 'out_geometricInliersPerType'.
+    // Considering the putative match:
+    //      [0(h0) 1(h2) 2(h1) 3(nan) 4(h2) 5(h0) 6(h1) 7(nan)]
+    // * 'PutativeLike' returns [0(h0) 1(h2) 2(h1) 4(h2) 5(h0) 6(h1)]: just remove (nan)
+    // * 'HGrouped' returns [0(h0) 5(h0) 2(h1) 6(h1) 1(h2) 4(h2)]: remove (nan) + H id. ordering
     EOrdering orderingMethod = HGrouped;
-

 //    if (pairIndex.first == 200563944 && pairIndex.second == 1112206013) // [TEMP] MATLAB exemple
     {
       const std::vector<feature::EImageDescriberType> descTypes = regionsPerView.getCommonDescTypes(pairIndex);
       if(descTypes.empty())
         return EstimationStatus(false, false);
+
+#if ALICEVISION_IS_DEFINED(ALICEVISION_HAVE_CCTAG)
+      if (std::find(descTypes.begin(), descTypes.end(),feature::EImageDescriberType::CCTAG3) != descTypes.end() ||
+          std::find(descTypes.begin(), descTypes.end(),feature::EImageDescriberType::CCTAG4) != descTypes.end())
+      {
+        ALICEVISION_LOG_ERROR("Geometric filtering by Homography Growing cannot handle CCTAG descriptors.");
+        return EstimationStatus(false, false);
+      }
+#endif

       for(size_t d = 0; d < descTypes.size(); ++d)
       {
@@ -96,7 +104,7 @@
           std::set<IndexT> visitedMatchesId, bestMatchesId;
           Mat3 bestHomographie;

-#pragma omp parallel for
+#pragma omp parallel for // (: huge optimization but modify results a little)
           for (IndexT iMatch = 0; iMatch < remainingMatches.size(); ++iMatch)
           {
             // [1st improvement ([F.Srajer, 2016] p. 20) ] Each match is used once only per homography estimation (increases computation time)
@@ -130,7 +138,7 @@
             break;
           }

-          // { ...  remaining
+          // { ...
           // [TODO] 3rd improvement: non lin optimization
           // ... }

@@ -164,7 +172,6 @@
             break;
           }
         } // IndexT iH
-

         // Copy inliers -> putative matches ordering
         if (orderingMethod == EOrdering::PutativeLike)


Multi-threaded unit test for Audio Coding Module using iSAC

This test extends AudioCodingModuleTest and AudioCodingModuleMtTest
to using iSAC as codec.

R=kwiberg@webrtc.org, tina.legrand@webrtc.org

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

git-svn-id: 03ae4fbe531b1eefc9d815f31e49022782c42458@6369 4adac7df-926f-26a2-2b94-8c16560cd09d

--- modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
+++ modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
@@ -8,9 +8,13 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */

+#include <string.h>
+#include <vector>
+
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/system_wrappers/interface/clock.h"
 #include "webrtc/system_wrappers/interface/compile_assert.h"
@@ -20,6 +24,7 @@
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/system_wrappers/interface/thread_annotations.h"
 #include "webrtc/system_wrappers/interface/thread_wrapper.h"
+#include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"

 namespace webrtc {
@@ -77,6 +82,7 @@
       const RTPFragmentationHeader* fragmentation) OVERRIDE {
     CriticalSectionScoped lock(crit_sect_.get());
     ++num_calls_;
+    last_payload_vec_.assign(payload_data, payload_data + payload_len_bytes);
     return 0;
   }

@@ -85,8 +91,19 @@
     return num_calls_;
   }

+  int last_payload_len_bytes() const {
+    CriticalSectionScoped lock(crit_sect_.get());
+    return last_payload_vec_.size();
+  }
+
+  void SwapBuffers(std::vector<uint8_t>* payload) {
+    CriticalSectionScoped lock(crit_sect_.get());
+    last_payload_vec_.swap(*payload);
+  }
+
  private:
   int num_calls_ GUARDED_BY(crit_sect_);
+  std::vector<uint8_t> last_payload_vec_ GUARDED_BY(crit_sect_);
   const scoped_ptr<CriticalSectionWrapper> crit_sect_;
 };

@@ -104,12 +121,7 @@
   void SetUp() {
     acm_.reset(AudioCodingModule::Create(id_, clock_));

-    AudioCodingModule::Codec("L16", &codec_, kSampleRateHz, 1);
-    codec_.pltype = kPayloadType;
-
-    // Register L16 codec in ACM.
-    ASSERT_EQ(0, acm_->RegisterReceiveCodec(codec_));
-    ASSERT_EQ(0, acm_->RegisterSendCodec(codec_));
+    RegisterCodec();

     rtp_utility_->Populate(&rtp_header_);

@@ -125,26 +137,38 @@
     ASSERT_EQ(0, acm_->RegisterTransportCallback(&packet_cb_));
   }

-  void InsertPacketAndPullAudio() {
+  virtual void RegisterCodec() {
+    AudioCodingModule::Codec("L16", &codec_, kSampleRateHz, 1);
+    codec_.pltype = kPayloadType;
+
+    // Register L16 codec in ACM.
+    ASSERT_EQ(0, acm_->RegisterReceiveCodec(codec_));
+    ASSERT_EQ(0, acm_->RegisterSendCodec(codec_));
+  }
+
+  virtual void InsertPacketAndPullAudio() {
     InsertPacket();
     PullAudio();
   }

-  void InsertPacket() {
+  virtual void InsertPacket() {
     const uint8_t kPayload[kPayloadSizeBytes] = {0};
     ASSERT_EQ(0,
               acm_->IncomingPacket(kPayload, kPayloadSizeBytes, rtp_header_));
     rtp_utility_->Forward(&rtp_header_);
   }

-  void PullAudio() {
+  virtual void PullAudio() {
     AudioFrame audio_frame;
     ASSERT_EQ(0, acm_->PlayoutData10Ms(-1, &audio_frame));
   }

-  void InsertAudio() { ASSERT_EQ(0, acm_->Add10MsData(input_frame_)); }
-
-  void Encode() {
+  virtual void InsertAudio() {
+    ASSERT_EQ(0, acm_->Add10MsData(input_frame_));
+    input_frame_.timestamp_ += kNumSamples10ms;
+  }
+
+  virtual void Encode() {
     int32_t encoded_bytes = acm_->Process();
     // Expect to get one packet with two bytes per sample, or no packet at all,
     // depending on how many 10 ms blocks go into |codec_.pacsize|.
@@ -246,6 +270,8 @@
   EXPECT_EQ(-1, acm_->PlayoutData10Ms(0, &audio_frame));
 }

+// A multi-threaded test for ACM. This base class is using the PCM16b 16 kHz
+// codec, while the derive class AcmIsacMtTest is using iSAC.
 class AudioCodingModuleMtTest : public AudioCodingModuleTest {
  protected:
   static const int kNumPackets = 500;
@@ -277,6 +303,10 @@

   void SetUp() {
     AudioCodingModuleTest::SetUp();
+    StartThreads();
+  }
+
+  void StartThreads() {
     unsigned int thread_id = 0;
     ASSERT_TRUE(send_thread_->Start(thread_id));
     ASSERT_TRUE(insert_packet_thread_->Start(thread_id));
@@ -294,7 +324,17 @@
     return test_complete_->Wait(10 * 60 * 1000);  // 10 minutes' timeout.
   }

- private:
+  virtual bool TestDone() {
+    if (packet_cb_.num_calls() > kNumPackets) {
+      CriticalSectionScoped lock(crit_sect_.get());
+      if (pull_audio_count_ > kNumPullCalls) {
+        // Both conditions for completion are met. End the test.
+        return true;
+      }
+    }
+    return false;
+  }
+
   static bool CbSendThread(void* context) {
     return reinterpret_cast<AudioCodingModuleMtTest*>(context)->CbSendImpl();
   }
@@ -310,12 +350,8 @@
     ++send_count_;
     InsertAudio();
     Encode();
-    if (packet_cb_.num_calls() > kNumPackets) {
-      CriticalSectionScoped lock(crit_sect_.get());
-      if (pull_audio_count_ > kNumPullCalls) {
-        // Both conditions for completion are met. End the test.
-        test_complete_->Set();
-      }
+    if (TestDone()) {
+      test_complete_->Set();
     }
     return true;
   }
@@ -377,4 +413,102 @@
   EXPECT_EQ(kEventSignaled, RunTest());
 }

+// This is a multi-threaded ACM test using iSAC. The test encodes audio
+// from a PCM file. The most recent encoded frame is used as input to the
+// receiving part. Depending on timing, it may happen that the same RTP packet
+// is inserted into the receiver multiple times, but this is a valid use-case,
+// and simplifies the test code a lot.
+class AcmIsacMtTest : public AudioCodingModuleMtTest {
+ protected:
+  static const int kNumPackets = 500;
+  static const int kNumPullCalls = 500;
+
+  AcmIsacMtTest()
+      : AudioCodingModuleMtTest(),
+        last_packet_number_(0) {}
+
+  ~AcmIsacMtTest() {}
+
+  void SetUp() {
+    AudioCodingModuleTest::SetUp();
+
+    // Set up input audio source to read from specified file, loop after 5
+    // seconds, and deliver blocks of 10 ms.
+    const std::string input_file_name =
+        webrtc::test::ResourcePath("audio_coding/speech_mono_16kHz", "pcm");
+    audio_loop_.Init(input_file_name, 5 * kSampleRateHz, kNumSamples10ms);
+
+    // Generate one packet to have something to insert.
+    int loop_counter = 0;
+    while (packet_cb_.last_payload_len_bytes() == 0) {
+      InsertAudio();
+      Encode();
+      ASSERT_LT(loop_counter++, 10);
+    }
+    // Set |last_packet_number_| to one less that |num_calls| so that the packet
+    // will be fetched in the next InsertPacket() call.
+    last_packet_number_ = packet_cb_.num_calls() - 1;
+
+    StartThreads();
+  }
+
+  virtual void RegisterCodec() {
+    COMPILE_ASSERT(kSampleRateHz == 16000, test_designed_for_isac_16khz);
+    AudioCodingModule::Codec("ISAC", &codec_, kSampleRateHz, 1);
+    codec_.pltype = kPayloadType;
+
+    // Register iSAC codec in ACM, effectively unregistering the PCM16B codec
+    // registered in AudioCodingModuleTest::SetUp();
+    ASSERT_EQ(0, acm_->RegisterReceiveCodec(codec_));
+    ASSERT_EQ(0, acm_->RegisterSendCodec(codec_));
+  }
+
+  void InsertPacket() {
+    int num_calls = packet_cb_.num_calls();  // Store locally for thread safety.
+    if (num_calls > last_packet_number_) {
+      // Get the new payload out from the callback handler.
+      // Note that since we swap buffers here instead of directly inserting
+      // a pointer to the data in |packet_cb_|, we avoid locking the callback
+      // for the duration of the IncomingPacket() call.
+      packet_cb_.SwapBuffers(&last_payload_vec_);
+      ASSERT_GT(last_payload_vec_.size(), 0u);
+      rtp_utility_->Forward(&rtp_header_);
+      last_packet_number_ = num_calls;
+    }
+    ASSERT_GT(last_payload_vec_.size(), 0u);
+    ASSERT_EQ(
+        0,
+        acm_->IncomingPacket(
+            &last_payload_vec_[0], last_payload_vec_.size(), rtp_header_));
+  }
+
+  void InsertAudio() {
+    memcpy(input_frame_.data_, audio_loop_.GetNextBlock(), kNumSamples10ms);
+    AudioCodingModuleTest::InsertAudio();
+  }
+
+  void Encode() { ASSERT_GE(acm_->Process(), 0); }
+
+  // This method is the same as AudioCodingModuleMtTest::TestDone(), but here
+  // it is using the constants defined in this class (i.e., shorter test run).
+  virtual bool TestDone() {
+    if (packet_cb_.num_calls() > kNumPackets) {
+      CriticalSectionScoped lock(crit_sect_.get());
+      if (pull_audio_count_ > kNumPullCalls) {
+        // Both conditions for completion are met. End the test.
+        return true;
+      }
+    }
+    return false;
+  }
+
+  int last_packet_number_;
+  std::vector<uint8_t> last_payload_vec_;
+  test::AudioLoop audio_loop_;
+};
+
+TEST_F(AcmIsacMtTest, DoTest) {
+  EXPECT_EQ(kEventSignaled, RunTest());
+}
+
 }  // namespace webrtc


fix(frontends/lean/pp): pretty print pattern hints

--- src/frontends/lean/pp.cpp
+++ src/frontends/lean/pp.cpp
@@ -37,6 +37,7 @@
 #include "library/idx_metavar.h"
 #include "library/equations_compiler/equations.h"
 #include "library/tactic/tactic_state.h"
+#include "library/tactic/congruence/hinst_lemmas.h"
 #include "library/compiler/comp_irrelevant.h"
 #include "library/compiler/erase_irrelevant.h"
 #include "library/compiler/rec_fn_macro.h"
@@ -999,8 +1000,8 @@
     } else if (is_inaccessible(e)) {
         format r = format(".") + pp_child(get_annotation_arg(e), max_bp()).fmt();
         return result(r);
-        // } else if (is_pattern_hint(e)) {
-        // return result(group(nest(2, format("(:") + pp(get_pattern_hint_arg(e)).fmt() + format(":)"))));
+    } else if (is_pattern_hint(e)) {
+        return result(group(nest(2, format("(:") + pp(get_pattern_hint_arg(e)).fmt() + format(":)"))));
     } else if (is_marked_as_comp_irrelevant(e)) {
         if (m_hide_comp_irrel)
             return m_unicode ? format("◾") : format("irrel");


Canbus: fix lint issues for gem wheel_speed_rpt_7a_test

--- modules/canbus/vehicle/gem/protocol/wheel_speed_rpt_7a_test.cc
+++ modules/canbus/vehicle/gem/protocol/wheel_speed_rpt_7a_test.cc
@@ -31,13 +31,16 @@
   Wheelspeedrpt7a wheelspeed;
   int32_t length = 8;
   ChassisDetail chassis_detail;
-  uint8_t bytes[8] = {0x01, 0x02, 0x03, 0x04, 0x11, 0x12, 0x13, 0x14};
-
+  uint8_t bytes[8] = {0x01, 0x02, 0x03, 0x04, 0x11, 0x12, 0x13, 0x14};
   wheelspeed.Parse(bytes, length, &chassis_detail);
-  EXPECT_DOUBLE_EQ(chassis_detail.gem().wheel_speed_rpt_7a().wheel_spd_rear_right(), 4884);
-  EXPECT_DOUBLE_EQ(chassis_detail.gem().wheel_speed_rpt_7a().wheel_spd_rear_left(), 4370);
-  EXPECT_DOUBLE_EQ(chassis_detail.gem().wheel_speed_rpt_7a().wheel_spd_front_right(), 772);
-  EXPECT_DOUBLE_EQ(chassis_detail.gem().wheel_speed_rpt_7a().wheel_spd_front_left(), 258);
+  EXPECT_DOUBLE_EQ(chassis_detail.gem().wheel_speed_rpt_7a()\
+.wheel_spd_rear_right(), 4884);
+  EXPECT_DOUBLE_EQ(chassis_detail.gem().wheel_speed_rpt_7a()\
+.wheel_spd_rear_left(), 4370);
+  EXPECT_DOUBLE_EQ(chassis_detail.gem().wheel_speed_rpt_7a()\
+.wheel_spd_front_right(), 772);
+  EXPECT_DOUBLE_EQ(chassis_detail.gem().wheel_speed_rpt_7a()\
+.wheel_spd_front_left(), 258);
 }

 }  // namespace gem


Added test for optimized average pooling that tests a tensor with values concentrated around the endpoints of the int8 numerical range.

PiperOrigin-RevId: 278973178
Change-Id: Id88668d5fa61ec4f03bd31f8f6c4c8b930c50ada

--- tensorflow/lite/kernels/internal/averagepool_quantized_test.cc
+++ tensorflow/lite/kernels/internal/averagepool_quantized_test.cc
@@ -116,5 +116,79 @@
   }
 }

+// Creates random input shape (batch, height, width, depth), then computes
+// output shape based on value of `padding_same`:
+// `padding_same` == true, calculate output with padding == "SAME"
+// `padding_same` == false, calculate output with padding == "VALID"
+// With input/output shapes computed, fills the input data and calls the
+// test function.
+void CreateExtremalDataAndRunAveragePool(bool padding_same) {
+  const int batch = UniformRandomInt(1, 2);
+  const int input_depth = UniformRandomInt(1, 700);
+  const int output_depth = input_depth;
+  const int input_width_offset = UniformRandomInt(1, 30);
+  const int input_height_offset = UniformRandomInt(1, 30);
+  const int stride_width = UniformRandomInt(1, 128);
+  const int stride_height = UniformRandomInt(1, 128);
+  const int filter_width = UniformRandomInt(1, 28);
+  const int filter_height = UniformRandomInt(1, 28);
+  if (filter_width * filter_height > 64) {
+    std::cout << "should test 32 version" << std::endl;
+  }
+  const int input_width = input_width_offset + filter_width;
+  const int input_height = input_height_offset + filter_height;
+  const int output_width =
+      padding_same ? (input_width + stride_width - 1) / stride_width
+                   : (input_width - filter_width + stride_width) / stride_width;
+  const int output_height =
+      padding_same
+          ? (input_height + stride_height - 1) / stride_height
+          : (input_height - filter_height + stride_height) / stride_height;
+
+  auto input_shape =
+      RuntimeShape({batch, input_height, input_width, input_depth});
+  auto output_shape =
+      RuntimeShape({batch, output_height, output_width, output_depth});
+
+  PoolParams params;
+  params.stride_height = stride_height;
+  params.stride_width = stride_width;
+  params.filter_height = filter_height;
+  params.filter_width = filter_width;
+  params.quantized_activation_min =
+      static_cast<int8_t>(std::numeric_limits<int8_t>::lowest());
+  params.quantized_activation_max =
+      static_cast<int8_t>(std::numeric_limits<int8_t>::max());
+  auto compute_padding = [](int stride, int in_size, int filter_size,
+                            int out_size) {
+    int padding = ((out_size - 1) * stride + filter_size - in_size) / 2;
+    return padding > 0 ? padding : 0;
+  };
+  params.padding_values.width =
+      compute_padding(stride_width, input_width, filter_width, output_width);
+  params.padding_values.height = compute_padding(stride_height, input_height,
+                                                 filter_height, output_height);
+
+  const int buffer_size = input_shape.FlatSize();
+  std::vector<int8> input_data(buffer_size);
+
+  // Test small values
+  int8 min = std::numeric_limits<int8>::min();
+  int8 max = std::numeric_limits<int8>::min() + 10;
+  FillRandom(&input_data, min, max);
+  RunOneAveragePoolTest(params, input_shape, input_data.data(), output_shape);
+
+  // Test large values
+  min = std::numeric_limits<int8>::max() - 10;
+  max = std::numeric_limits<int8>::max();
+  FillRandom(&input_data, min, max);
+  RunOneAveragePoolTest(params, input_shape, input_data.data(), output_shape);
+}
+
+TEST(TestAveragePool, SymmetricQuantExtremalAveragePool) {
+  CreateExtremalDataAndRunAveragePool(/*padding_same=*/true);
+  CreateExtremalDataAndRunAveragePool(/*padding_same=*/false);
+}
+
 }  // namespace
 }  // namespace tflite


Fix for integer formats in framebuffer extension tests
am: 3bb47b5c57

Change-Id: I697253bc3bc555f2fc6e710fa47bc8b13c7b1fd5

--- modules/gles31/functional/es31fShaderFramebufferFetchTests.cpp
+++ modules/gles31/functional/es31fShaderFramebufferFetchTests.cpp
@@ -399,7 +399,8 @@

 void FramebufferFetchTestCase::genAttachementTexture (const tcu::Vec4& color)
 {
-	tcu::TextureLevel	data	(glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType), VIEWPORT_WIDTH, VIEWPORT_HEIGHT, 1);
+	tcu::TextureLevel			data					(glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType), VIEWPORT_WIDTH, VIEWPORT_HEIGHT, 1);
+	tcu::TextureChannelClass	textureChannelClass =	tcu::getTextureChannelClass(m_texFmt.type);

 	m_gl.genTextures(1, &m_texColorBuffer);
 	m_gl.bindTexture(GL_TEXTURE_2D, m_texColorBuffer);
@@ -410,7 +411,12 @@
 	m_gl.texParameteri(GL_TEXTURE_2D,	GL_TEXTURE_MIN_FILTER,	m_isFilterable ? GL_LINEAR : GL_NEAREST);
 	m_gl.texParameteri(GL_TEXTURE_2D,	GL_TEXTURE_MAG_FILTER,	m_isFilterable ? GL_LINEAR : GL_NEAREST);

-	clear(data.getAccess(), color);
+	if (textureChannelClass == tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER)
+		tcu::clear(data.getAccess(), color.asUint());
+	else if (textureChannelClass == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER)
+		tcu::clear(data.getAccess(), color.asInt());
+	else
+		tcu::clear(data.getAccess(), color);

 	m_gl.texImage2D(GL_TEXTURE_2D, 0, m_format, VIEWPORT_WIDTH, VIEWPORT_HEIGHT, 0, m_transferFmt.format, m_transferFmt.dataType, data.getAccess().getDataPtr());
 	m_gl.bindTexture(GL_TEXTURE_2D, 0);
@@ -558,8 +564,15 @@

 tcu::TextureLevel TextureFormatTestCase::genReferenceTexture (const tcu::Vec4& fbColor, const tcu::Vec4& uniformColor)
 {
-	tcu::TextureLevel	reference	(glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType), VIEWPORT_WIDTH, VIEWPORT_HEIGHT, 1);
-	tcu::clear(reference.getAccess(), fbColor + uniformColor);
+	tcu::TextureLevel			reference			(glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType), VIEWPORT_WIDTH, VIEWPORT_HEIGHT, 1);
+	tcu::TextureChannelClass	textureChannelClass = tcu::getTextureChannelClass(m_texFmt.type);
+
+	if (textureChannelClass == tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER)
+		tcu::clear(reference.getAccess(), fbColor.asUint() + uniformColor.asUint());
+	else if (textureChannelClass == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER)
+		tcu::clear(reference.getAccess(), fbColor.asInt() + uniformColor.asInt());
+	else
+		tcu::clear(reference.getAccess(), fbColor + uniformColor);

 	return reference;
 }
@@ -599,7 +612,7 @@

 private:
 	void				genFramebufferWithTextures			(const vector<tcu::Vec4>& colors);
-	void				genAttachementTextures				(const vector<tcu::Vec4>& colors);
+	void				genAttachmentTextures				(const vector<tcu::Vec4>& colors);
 	tcu::TextureLevel	genReferenceTexture					(const tcu::Vec4& fbColor, const tcu::Vec4& uniformColor);
 	glu::ProgramSources genShaderSources					(void);

@@ -644,7 +657,7 @@
 	m_gl.genFramebuffers(1, &m_framebuffer);
 	m_gl.bindFramebuffer(GL_FRAMEBUFFER, m_framebuffer);

-	genAttachementTextures(colors);
+	genAttachmentTextures(colors);

 	for (int i = 0; i < DE_LENGTH_OF_ARRAY(m_texColorBuffers); ++i)
 		m_gl.framebufferTexture2D(GL_FRAMEBUFFER, m_colorBuffers[i], GL_TEXTURE_2D, m_texColorBuffers[i], 0);
@@ -655,7 +668,7 @@
 	GLU_EXPECT_NO_ERROR(m_gl.getError(), "genFramebufferWithTextures()");
 }

-void MultipleRenderTargetsTestCase::genAttachementTextures (const vector<tcu::Vec4>& colors)
+void MultipleRenderTargetsTestCase::genAttachmentTextures (const vector<tcu::Vec4>& colors)
 {
 	tcu::TextureLevel	data	(glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType), VIEWPORT_WIDTH, VIEWPORT_HEIGHT, 1);

@@ -676,7 +689,7 @@
 	}

 	m_gl.bindTexture(GL_TEXTURE_2D, 0);
-	GLU_EXPECT_NO_ERROR(m_gl.getError(), "genAttachementTextures()");
+	GLU_EXPECT_NO_ERROR(m_gl.getError(), "genAttachmentTextures()");
 }

 tcu::TextureLevel MultipleRenderTargetsTestCase::genReferenceTexture (const tcu::Vec4& fbColor, const tcu::Vec4& uniformColor)


Move the scratch buffer allocation for x86 instructions from being allocated each instruction,
to once in the AssemblyParse_x86 ctor.
an instruction

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@165662 91177308-0d34-0410-b5e6-96231b3b80d8

--- source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
+++ source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
@@ -161,6 +161,7 @@
     int m_cpu;
     ArchSpec m_arch;
     ::LLVMDisasmContextRef m_disasm_context;
+    uint8_t *m_opcode_data;

     DISALLOW_COPY_AND_ASSIGN (AssemblyParse_x86);
 };
@@ -177,7 +178,8 @@
     m_lldb_fp_regnum (LLDB_INVALID_REGNUM),
     m_wordsize (-1),
     m_cpu(cpu),
-    m_arch(arch)
+    m_arch(arch),
+    m_opcode_data(NULL)
 {
     int *initialized_flag = NULL;
     if (cpu == k_i386)
@@ -247,10 +249,13 @@
                                           /*TagType=*/1,
                                           NULL,
                                           NULL);
+   m_opcode_data = (uint8_t *) malloc (m_arch.GetMaximumOpcodeByteSize());
 }

 AssemblyParse_x86::~AssemblyParse_x86 ()
 {
+    if (m_opcode_data)
+        free (m_opcode_data);
     ::LLVMDisasmDispose(m_disasm_context);
 }

@@ -474,8 +479,7 @@
     if (!addr.IsValid())
         return false;

-    uint8_t *opcode_data = (uint8_t *) malloc (max_op_byte_size);
-    if (opcode_data == NULL)
+    if (m_opcode_data == NULL)
     {
         return false;
     }
@@ -483,23 +487,21 @@
     const bool prefer_file_cache = true;
     Error error;
     Target *target = m_exe_ctx.GetTargetPtr();
-    if (target->ReadMemory (addr, prefer_file_cache, opcode_data, max_op_byte_size, error) == -1)
-    {
-        free (opcode_data);
+    if (target->ReadMemory (addr, prefer_file_cache, m_opcode_data, max_op_byte_size, error) == -1)
+    {
         return false;
     }

     char out_string[512];
     const addr_t pc = addr.GetFileAddress();
     const size_t inst_size = ::LLVMDisasmInstruction (m_disasm_context,
-                                                      opcode_data,
+                                                      m_opcode_data,
                                                       max_op_byte_size,
                                                       pc, // PC value
                                                       out_string,
                                                       sizeof(out_string));

     length = inst_size;
-    free (opcode_data);
     return true;
 }


scda steam unpatched version crash fix

scda steam unpatched version crash fix

--- source/SplinterCellDoubleAgent.WidescreenFix/dllmain.cpp
+++ source/SplinterCellDoubleAgent.WidescreenFix/dllmain.cpp
@@ -126,13 +126,11 @@
     }; injector::MakeInline<ScopeLensHook1>(pattern.get_first(0), pattern.get_first(6));

     //crashfix
-    pattern = hook::module_pattern(GetModuleHandle("D3DDrv"), "8D B5 64 98 00 00 6A 04 8B CE F3 0F 11 44 24 18"); //
+    pattern = hook::module_pattern(GetModuleHandle("D3DDrv"), "6A 04 8B CE F3 0F 11 44 24"); //
     struct RenderFilmstrip_Hook3
     {
         void operator()(injector::reg_pack& regs)
         {
-            regs.esi = regs.ebp + 0x9864;
-
             if (regs.edi)
             {
                 Screen.pFilmstripTex = regs.edi;
@@ -145,8 +143,11 @@
                     *(uint32_t*)(regs.ebx + 0x3C) = regs.edi;
                 }
             }
-        }
-    }; injector::MakeInline<RenderFilmstrip_Hook3>(pattern.get_first(0), pattern.get_first(6));
+            static float _xmm0 = 0.0f;
+            _asm movss   dword ptr[_xmm0], xmm0
+            *(float*)(regs.esp + 0x18) = _xmm0;
+        }
+    }; injector::MakeInline<RenderFilmstrip_Hook3>(pattern.get_first(4), pattern.get_first(10));

     pattern = hook::module_pattern(GetModuleHandle("D3DDrv"), "8B 46 2C 3B C7 74 1D 39 7E 4C 50"); //
     static auto GMalloc = *pattern.get_first<uint32_t>(22);


Add TRI7 reference element entry

Add TRI7 reference element entry

--- src/geom/reference_elem.C
+++ src/geom/reference_elem.C
@@ -179,6 +179,7 @@
     // 2D elements
     ref_elem_file[TRI3]     = ElemDataStrings::one_tri;
     ref_elem_file[TRI6]     = ElemDataStrings::one_tri6;
+    ref_elem_file[TRI7]     = ElemDataStrings::one_tri7;

     ref_elem_file[QUAD4]    = ElemDataStrings::one_quad;
     ref_elem_file[QUAD8]    = ElemDataStrings::one_quad8;


Removed unused variable

Removed unused variable

--- source/computed_variable/function_matrix_determinant.cpp
+++ source/computed_variable/function_matrix_determinant.cpp
@@ -1,7 +1,7 @@
 //******************************************************************************
 // FILE : function_matrix_determinant.cpp
 //
-// LAST MODIFIED : 6 October 2004
+// LAST MODIFIED : 18 October 2004
 //
 // DESCRIPTION :
 //==============================================================================
@@ -20,7 +20,7 @@
 	evaluate_derivative(
 	std::list<Function_variable_handle>& independent_variables)
 //******************************************************************************
-// LAST MODIFIED : 6 October 2004
+// LAST MODIFIED : 18 October 2004
 //
 // DESCRIPTION :
 //==============================================================================
@@ -34,8 +34,7 @@
 		Function_matrix_determinant<Scalar>,Function>(function()))&&
 		(0<(order=independent_variables.size())))
 	{
-		Function_size_type number_of_dependent_values,number_of_independent_values,
-			number_of_rows;
+		Function_size_type number_of_dependent_values,number_of_rows;
 		boost::intrusive_ptr< Function_matrix<Scalar> > derivative,matrix;

 		if ((matrix=boost::dynamic_pointer_cast<Function_matrix<Scalar>,
@@ -46,7 +45,7 @@
 			evaluate_derivative(independent_variables)))&&
 			(number_of_rows*number_of_rows==
 			(number_of_dependent_values=derivative->number_of_rows()))&&
-			(0<(number_of_independent_values=derivative->number_of_columns())))
+			(0<derivative->number_of_columns()))
 		{
 			bool valid;
 			Function_size_type i,j,k,l,number_of_columns;


Support connection mode 'none' in launcher for test purposes.

Minor warning cleanups.  strstream is deprecated.

--- programs/launcher/main.cpp
+++ programs/launcher/main.cpp
@@ -6,7 +6,7 @@
 #include <string>
 #include <vector>
 #include <math.h>
-#include <strstream>
+#include <sstream>

 #include <boost/algorithm/string.hpp>
 #include <boost/asio/ip/tcp.hpp>
@@ -392,6 +392,8 @@
         allowed_connections |= PC_PRODUCERS;
       else if (boost::iequals(m, "specified"))
         allowed_connections |= PC_SPECIFIED;
+      else if (boost::iequals(m, "none"))
+        allowed_connections = PC_NONE;
       else {
         cerr << "unrecognized connection mode: " << m << endl;
         exit (-1);
@@ -402,8 +404,8 @@
   using namespace std::chrono;
   system_clock::time_point now = system_clock::now();
   std::time_t now_c = system_clock::to_time_t(now);
-  ostrstream dstrm;
-  dstrm <<   std::put_time(std::localtime(&now_c), "%Y_%m_%d_%H_%M_%S") << ends;
+  ostringstream dstrm;
+  dstrm << std::put_time(std::localtime(&now_c), "%Y_%m_%d_%H_%M_%S") << ends;
   launch_time = dstrm.str();

   if ( ! (shape.empty() ||
@@ -641,7 +643,7 @@
 launcher_def::bind_nodes () {
   int per_node = producers / prod_nodes;
   int extra = producers % prod_nodes;
-  int i = 0;
+  unsigned int i = 0;
   for (auto &h : bindings) {
     for (auto &inst : h.instances) {
         tn_node_def node;
@@ -748,7 +750,6 @@
 void
 launcher_def::write_config_file (tn_node_def &node) {
   bf::path filename;
-  boost::system::error_code ec;
   eosd_def &instance = *node.instance;
   host_def *host = find_host (instance.host);

@@ -776,6 +777,9 @@
       << "public-endpoint = " << host->public_name << ":" << instance.p2p_port << "\n";
   if (allowed_connections & PC_ANY) {
     cfg << "allowed-connection = any\n";
+  }
+  else if (allowed_connections == PC_NONE) {
+    cfg << "allowed-connection = none\n";
   }
   else
   {


Fix descriptor write rollover to skip padding binds. Closes #2231

--- renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp
+++ renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp
@@ -1243,6 +1243,13 @@
           binding++;
           curIdx = 0;

+          // skip past invalid padding descriptors to get to the next real one
+          while(layoutBinding->descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
+          {
+            layoutBinding++;
+            binding++;
+          }
+
           ref = GetRefType(layoutBinding->descriptorType);
         }

@@ -1649,6 +1656,13 @@
           binding++;
           curIdx = 0;

+          // skip past invalid padding descriptors to get to the next real one
+          while(layoutBinding->descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
+          {
+            layoutBinding++;
+            binding++;
+          }
+
           ref = GetRefType(layoutBinding->descriptorType);
         }


fix segment fault when pop_cient

fix segment fault when pop_cient

Change-Id: Iac69a825156c7957273e464055a7faacf88a5540

--- core/server.cpp
+++ core/server.cpp
@@ -101,7 +101,10 @@
             return cmd->group->client.is(cli);
         });
     for (util::sref<DataCommand>& cmd: this->_sent_commands) {
-        if (cmd.not_nul() && cmd->group->client.is(cli)) {
+        if (cmd.not_nul() &&
+            cmd->group.not_nul() &&
+            cmd->group->client.not_nul() &&
+            cmd->group->client.is(cli)) {
             cmd.reset();
         }
     }


Drop pre-DIP3 votes from current votes per MN per object (#2524)

--- src/governance-object.cpp
+++ src/governance-object.cpp
@@ -795,6 +795,7 @@
 {
     LOCK(cs);

+    // Drop pre-DIP3 votes from vote db
     auto removed = fileVotes.RemoveOldVotes(nMinTime);

     if (!removed.empty()) {
@@ -806,5 +807,24 @@
         fDirtyCache = true;
     }

+    // Same for current votes per MN for this specific object
+    auto itMnPair = mapCurrentMNVotes.begin();
+    while (itMnPair != mapCurrentMNVotes.end()) {
+        auto& miRef = itMnPair->second.mapInstances;
+        auto itVotePair = miRef.begin();
+        while (itVotePair != miRef.end()) {
+            if (itVotePair->second.nTime < nMinTime) {
+                miRef.erase(itVotePair++);
+            } else {
+                ++itVotePair;
+            }
+        }
+        if (miRef.empty()) {
+            mapCurrentMNVotes.erase(itMnPair++);
+        } else {
+            ++itMnPair;
+        }
+    }
+
     return removed;
 }


opengl extensions check updated

opengl extensions check updated

--- src/graphics/renderer.cpp
+++ src/graphics/renderer.cpp
@@ -96,8 +96,7 @@
 		glewExperimental = GL_TRUE;
 		GLenum err = glewInit();
 		return err == GLEW_OK
-			&& GLEW_EXT_framebuffer_object
-			&& GLEW_ARB_framebuffer_object
+			&& (GLEW_EXT_framebuffer_object || GLEW_ARB_framebuffer_object)
 			&& GLEW_ARB_shader_objects
 			&& GLEW_ARB_fragment_shader
 			&& GLEW_ARB_vertex_shader


groveemg: throw exception(s) on fatal errors

Signed-off-by: Jon Trulson <08664b19c2d4086eb239dd8ec32d593676a5b9e4@ics.com>
Signed-off-by: Mihai Tudor Panu <a27de6130c5d32f5817bf40bb8b348582f37a8af@intel.com>

--- src/groveemg/groveemg.cxx
+++ src/groveemg/groveemg.cxx
@@ -23,6 +23,8 @@
  */

 #include <iostream>
+#include <string>
+#include <stdexcept>

 #include "groveemg.h"

@@ -33,7 +35,8 @@
 {
     if ( !(m_aio = mraa_aio_init(pin)) )
     {
-      cerr << __FUNCTION__ << ": mraa_aio_init() failed" << endl;
+      throw std::invalid_argument(std::string(__FUNCTION__) +
+                                  ": mraa_aio_init() failed, invalid pin?");
       return;
     }
 }


Update SortList.cc

Update SortList.cc

--- cpp/SortList.cc
+++ cpp/SortList.cc
@@ -70,4 +70,64 @@
             return merge(sortedList1, sortedList2);
         }
     };
+
+    // This solution make use of the movement of "head" in recursion. No "split" is needed here
+    class Solution2 {
+    public:
+        ListNode * merge(ListNode * head1, ListNode * head2) {
+            ListNode dummy(-1);
+            ListNode * prev = &dummy;
+
+            while (head1 != NULL && head2 != NULL) {
+                if (head1->val < head2->val) {
+                    prev->next = head1;
+                    head1 = head1->next;
+                } else {
+                    prev->next = head2;
+                    head2 = head2->next;
+                }
+                prev = prev->next;
+            }
+
+            if (head1 == NULL) {
+                prev->next = head2;
+            }
+
+            if (head2 == NULL) {
+                prev->next = head1;
+            }
+
+            return dummy.next;
+        }
+        ListNode * doSortList(ListNode * &head, int len) {
+            if (len == 0 ) {
+                return head;
+            }
+
+            if (len == 1) {
+                ListNode * tmp = head;
+                head = head->next;
+                tmp->next = NULL;
+                return tmp;
+            }
+
+            ListNode * part1 = doSortList(head, len / 2);
+            ListNode * part2 = doSortList(head, len - len / 2);
+            return merge(part1, part2);
+        }
+
+        ListNode *sortList(ListNode *head) {
+            int len = 0;
+            ListNode * cur = head;
+            while (cur != NULL) {
+                len++;
+                cur = cur->next;
+            }
+
+            return doSortList(head, len);
+        }
+    };
 }
+
+
+


minor fix: removed unnecessary debug info

--- sample/exafmm-dev-13274dd4ac68/examples/serial_tapas.cxx
+++ sample/exafmm-dev-13274dd4ac68/examples/serial_tapas.cxx
@@ -69,7 +69,6 @@
     bounds = boundBox.getBounds(bodies);
 #ifdef TAPAS
     asn(tr, bounds);
-    std::cerr << "#1" << std::endl;
     TAPAS_LOG_DEBUG() << "Bounding box: " << tr << std::endl;
 #endif


Fixed the compiler warnings for the demo program.

--- samples/cpp/tutorial_code/HighGUI/GDAL_IO/gdal-image.cpp
+++ samples/cpp/tutorial_code/HighGUI/GDAL_IO/gdal-image.cpp
@@ -14,7 +14,6 @@
 #include <vector>

 using namespace std;
-

 /// define the corner points
 ///    Note that GDAL can natively determine this
@@ -30,6 +29,20 @@
 /// range of the heat map colors
 std::vector<std::pair<cv::Vec3b,double> > color_range;

+
+/// List of all function prototypes
+cv::Point2d lerp( const cv::Point2d&, const cv::Point2d&, const double& );
+
+cv::Vec3b get_dem_color( const double& );
+
+cv::Point2d world2dem( const cv::Point2d&, const cv::Size&);
+
+cv::Point2d pixel2world( const int&, const int&, const cv::Size& );
+
+void add_color( cv::Vec3b& pix, const uchar& b, const uchar& g, const uchar& r );
+
+
+
 /**
  * Linear Interpolation
  * p1 - Point 1
@@ -73,7 +86,7 @@
     // otherwise, find the proper starting index
     int idx=0;
     double t = 0;
-    for( int x=0; x<color_range.size()-1; x++ ){
+    for( int x=0; x<(int)(color_range.size()-1); x++ ){

         // if the current elevation is below the next item, then use the current
         // two colors as our range


version 0.6.1

version 0.6.1

--- src/haxor/common/haxor.hh
+++ src/haxor/common/haxor.hh
@@ -11,7 +11,7 @@
   const int64_t magic = 0x7265887982;
   const int64_t major = 0;
   const int64_t minor = 6;
-  const int64_t patch = 0;
+  const int64_t patch = 1;
   constexpr int64_t version = (major << 16) | (minor << 8) | patch;

   const uint64_t ivt_num = 128;


Fixed typo

Fixed typo


Revert 63651 (turned chromeos red, http://build.chromium.org/buildbot/waterfall/builders/Linux%20Builder%20(ChromiumOS%20dbg)/builds/1895/steps/ui_tests/logs/LoadOptionsByURL )- Add LeakTracker<URLRequestContext> to IOThread::CleanUp().

Move LeakTracker<URLRequest> up to CleanUp also.  No URLRequest should be getting killed in DestructionObservers anymore.

BUG=59630
TEST=existing

Review URL: http://codereview.chromium.org/4064004

TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/4069002

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

--- chrome/browser/io_thread.cc
+++ chrome/browser/io_thread.cc
@@ -35,7 +35,6 @@
 #include "net/ocsp/nss_ocsp.h"
 #endif  // defined(USE_NSS)
 #include "net/proxy/proxy_script_fetcher_impl.h"
-#include "net/url_request/url_request_context.h"

 namespace {

@@ -357,10 +356,6 @@
   globals_ = NULL;

   BrowserProcessSubThread::CleanUp();
-
-  // URLRequest instances must NOT outlive the IO thread.
-  base::LeakTracker<URLRequest>::CheckForLeaks();
-  base::LeakTracker<URLRequestContext>::CheckForLeaks();
 }

 void IOThread::CleanUpAfterMessageLoopDestruction() {
@@ -373,6 +368,13 @@
   // This will delete the |notification_service_|.  Make sure it's done after
   // anything else can reference it.
   BrowserProcessSubThread::CleanUpAfterMessageLoopDestruction();
+
+  // URLRequest instances must NOT outlive the IO thread.
+  //
+  // To allow for URLRequests to be deleted from
+  // MessageLoop::DestructionObserver this check has to happen after CleanUp
+  // (which runs before DestructionObservers).
+  base::LeakTracker<URLRequest>::CheckForLeaks();
 }

 net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory(


Removed unnecessary vars.

Removed unnecessary vars.

--- wled00/udp.cpp
+++ wled00/udp.cpp
@@ -6,8 +6,6 @@

 #define WLEDPACKETSIZE 29
 #define UDP_IN_MAXSIZE 1472
-
-static bool wasOff = false; // flag if strip was Off (bri==0) when realtime started

 void notify(byte callMode, bool followUp)
 {
@@ -87,8 +85,6 @@
   if (timeoutMs == 255001 || timeoutMs == 65000) realtimeTimeout = UINT32_MAX;
   // if strip is off (bri==0) and not already in RTM
   if (bri == 0 && !realtimeMode) {
-    wasOff = true;
-    bri = briLast;  // global brightness awareness
     strip.setBrightness(scaledBri(briLast));
   }
   realtimeMode = md;
@@ -125,10 +121,6 @@
   if (realtimeMode && millis() > realtimeTimeout)
   {
     if (realtimeOverride == REALTIME_OVERRIDE_ONCE) realtimeOverride = REALTIME_OVERRIDE_NONE;
-    if (wasOff) {
-      bri = 0;  // if inital state was off turn strip back off
-      wasOff = false;
-    }
     strip.setBrightness(scaledBri(bri));
     realtimeMode = REALTIME_MODE_INACTIVE;
     realtimeIP[0] = 0;


Add reserved pins for ESP32 too.

Add reserved pins for ESP32 too.

--- wled00/xml.cpp
+++ wled00/xml.cpp
@@ -276,12 +276,10 @@
           }
         }
       }
-      #ifdef ESP8266
-        if (i) oappend(SET_F(","));
-        oappend(SET_F("6,7,8,9,10,11")); // flash memory pins
-        #ifdef WLED_DEBUG
-          oappend(SET_F(",1"));
-        #endif
+      if (i) oappend(SET_F(","));
+      oappend(SET_F("6,7,8,9,10,11")); // flash memory pins
+      #ifdef WLED_DEBUG
+        oappend(SET_F(",1"));
       #endif
     }
     oappend(SET_F("];"));


Stopped using stuff that I removed that ain't working

--- src/Frodo-core/platforms/vulkan/VKcommandbufferarray.cpp
+++ src/Frodo-core/platforms/vulkan/VKcommandbufferarray.cpp
@@ -13,7 +13,7 @@
 	FD_ASSERT(count != 0);

 	for (uint32 i = 0; i < count; i++) {
-		commandBuffers.Emaplace_back(pool, type);
+		commandBuffers.Push_back(CommandBuffer(pool, type));
 	}
 }


Constructor changes

Constructor changes

Also const added

--- src/Modules/Legacy/Fields/SetFieldDataToConstantValue.cc
+++ src/Modules/Legacy/Fields/SetFieldDataToConstantValue.cc
@@ -36,7 +36,7 @@
 using namespace SCIRun::Dataflow::Networks;
 using namespace SCIRun::Core::Datatypes;

-ModuleLookupInfo SetFieldDataToConstantValue::staticInfo_("SetFieldDataToConstantValue", "ChangeFieldData", "SCIRun");
+const ModuleLookupInfo SetFieldDataToConstantValue::staticInfo_("SetFieldDataToConstantValue", "ChangeFieldData", "SCIRun");

 /// @class SetFieldDataToConstantValue
 /// @brief Sets field data to a given scalar value on a new output field based
@@ -57,13 +57,12 @@
 //    SCIRunAlgo::SetFieldDataToConstantValueAlgo algo_;
 //};

-SetFieldDataToConstantValue::SetFieldDataToConstantValue(GuiContext* ctx) :
-  Module("SetFieldDataToConstantValue", ctx, Source, "ChangeFieldData", "SCIRun"),
-    gui_data_type_(ctx->subVar("data-type"),"same as input"),
-    gui_basis_order_(ctx->subVar("basis-order"),"same as input"),
-    gui_value_(ctx->subVar("value"),0.0)
+SetFieldDataToConstantValue::SetFieldDataToConstantValue() :
+  Module(staticInfo_)
+//     gui_data_type_(ctx->subVar("data-type"),"same as input"),
+//     gui_basis_order_(ctx->subVar("basis-order"),"same as input"),
+//     gui_value_(ctx->subVar("value"),0.0)
 {
-  algo_.set_progress_reporter(this);
 }

 void


Changed an assert to a validation check in route drawing. Buddy: Malcolm B

--- src/NavRouting/SdkModel/NavWidgetRouteDrawingHandler.cpp
+++ src/NavRouting/SdkModel/NavWidgetRouteDrawingHandler.cpp
@@ -77,12 +77,14 @@

             void NavWidgetRouteDrawingHandler::OnTurnByTurnUpdated()
             {
-                Eegeo_ASSERT(m_currentRouteStep >= 0, "Invalid route step index");
-                m_routeDrawingController.UpdateRouteStepProgress(m_currentRouteStep,
-                                                                 m_routePreviousStepColor,
-                                                                 m_routeCurrentStepColor,
-                                                                 m_navTurnByTurnModel.GetIndexOfPathSegmentStartVertex(),
-                                                                 m_navTurnByTurnModel.GetClosestPointOnRoute());
+                if (m_currentRouteStep >= 0)
+                {
+                    m_routeDrawingController.UpdateRouteStepProgress(m_currentRouteStep,
+                                                                     m_routePreviousStepColor,
+                                                                     m_routeCurrentStepColor,
+                                                                     m_navTurnByTurnModel.GetIndexOfPathSegmentStartVertex(),
+                                                                     m_navTurnByTurnModel.GetClosestPointOnRoute());
+                }
             }
         }
     }


 * Fixed behaviour of the pig while resizing window

git-svn-id: 3f9eced0add15b5a9fa491ea3f7f263c10f60fd6@1310 92316355-f0b4-4df1-b90c-862c8a59935f

--- cxx/cxxtest.cpp
+++ cxx/cxxtest.cpp
@@ -83,6 +83,16 @@

     while(!kk->getEvent(ev.CACA_EVENT_KEY_PRESS, &ev, 0)) {

+
+        /* In case of resize ...*/
+        if((x + pig->getWidth())-1 >= qq->getWidth() || x < 0 )
+            x = 0;
+        if((y + pig->getHeight())-1 >= qq->getHeight() || y < 0 )
+            y = 0;
+
+
+
+
         qq->Clear();

         /* Draw pig */
@@ -103,6 +113,7 @@
             ix = -ix;
         if(y + pig->getHeight() >= qq->getHeight() || y < 0 )
             iy = -iy;
+
     }

     delete kk;


Update NetworkIO.cc

Update NetworkIO.cc

--- src/Dataflow/Serialization/Network/Importer/NetworkIO.cc
+++ src/Dataflow/Serialization/Network/Importer/NetworkIO.cc
@@ -301,7 +301,14 @@
     { "NIMRODConverter", "PlaceholderModule" },
     { "StreamLines", "PlaceholderModule" },
     { "FieldSubSample", "PlaceholderModule" },
-    { "SampleLattice", "PlaceholderModule" }
+    { "SampleLattice", "PlaceholderModule" },
+    { "NrrdSelectTime", "PlaceholderModule" },
+    { "NrrdSetProperty", "PlaceholderModule" },
+    { "FieldInfo", "PlaceholderModule" },
+    { "SampleField", "PlaceholderModule" },
+    { "TextureBuilder", "PlaceholderModule" },
+    { "ShowTextureSurface", "PlaceholderModule" },
+    { "UnuProject", "PlaceholderModule" }
   };

 #if 0


handle the enum counter case

handle the enum counter case

Fixes a missing "break"!

--- daemon/core.cpp
+++ daemon/core.cpp
@@ -1305,8 +1305,7 @@
                         }
                         break;

-                        default:
-                            ;
+                        case MULTIPLE_ACTIONS_BEHAVIOUR__COUNT: break; // just a counter
                         }
                     }
                 }


Fix typo in gpopt comment

Fix typo in gpopt comment

--- src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp
+++ src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp
@@ -1461,7 +1461,7 @@
 //		CTranslatorRelcacheToDXL::PdrgpulIndexIncludedColumns
 //
 //	@doc:
-//		Compute the included colunms in an index
+//		Compute the included columns in an index
 //
 //---------------------------------------------------------------------------
 DrgPul *


Revert "[ClangUserExpression][NFC] Removed unused code"

GetLanguageForExpr has side effects, so this actually breaks
the completion. Should fix TestExprCompletion.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@341532 91177308-0d34-0410-b5e6-96231b3b80d8

--- source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -655,6 +655,10 @@
   if (!PrepareForParsing(diagnostic_manager, exe_ctx))
     return false;

+  lldb::LanguageType lang_type = lldb::LanguageType::eLanguageTypeUnknown;
+  if (auto new_lang = GetLanguageForExpr(diagnostic_manager, exe_ctx))
+    lang_type = new_lang.getValue();
+
   if (log)
     log->Printf("Parsing the following code:\n%s", m_transformed_text.c_str());


add addCapability of coordProviderCapability and typedRenderTargetCapability

--- source/examples/basic-painters/source/cubescape/CubeScape.cpp
+++ source/examples/basic-painters/source/cubescape/CubeScape.cpp
@@ -53,6 +53,8 @@
     addCapability(m_projectionCapability);
     addCapability(m_cameraCapability);
     addCapability(m_timeCapability);
+    addCapability(m_coordProviderCapability);
+    addCapability(m_typedRenderTargetCapability);
 }

 CubeScape::~CubeScape()


QmlDesigner: Multiselection should be not empty

Change-Id: I0b1d0a0ed619d51932ac9a6f5415fb54efc723cc
Reviewed-by: Thomas Hartmann <588ee739c05aab7547907becfd1420d2b7316069@digia.com>
(cherry picked from commit 0131bcdfaf745c7dc4122592a334201a5612f3cc)
Reviewed-by: Marco Bubke <5254e489b34ec8bbce36789100e3fc0f41fa62ef@digia.com>

--- src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp
+++ src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp
@@ -362,7 +362,7 @@

     addDesignerAction(new SelectionModelNodeAction(selectionCategoryDisplayName, selectionCategory, prioritySelectionCategory));

-    addDesignerAction(new MenuDesignerAction(stackCategoryDisplayName, stackCategory, priorityStackCategory, &always));
+    addDesignerAction(new MenuDesignerAction(stackCategoryDisplayName, stackCategory, priorityStackCategory, &selectionNotEmpty));
         addDesignerAction(new ModelNodeAction
                    (toFrontDisplayName, stackCategory, 200, &toFront, &singleSelection));
         addDesignerAction(new ModelNodeAction


Fix uds handshake

Fix uds handshake

--- src/core/ext/transport/chttp2/client/chttp2_connector.cc
+++ src/core/ext/transport/chttp2/client/chttp2_connector.cc
@@ -136,6 +136,8 @@
   c->handshake_mgr = grpc_handshake_manager_create();
   grpc_handshakers_add(exec_ctx, HANDSHAKER_CLIENT, c->args.channel_args,
                        c->handshake_mgr);
+  grpc_endpoint_add_to_pollset_set(exec_ctx, c->endpoint,
+                                   c->args.interested_parties);
   grpc_handshake_manager_do_handshake(
       exec_ctx, c->handshake_mgr, c->endpoint, c->args.channel_args,
       c->args.deadline, NULL /* acceptor */, on_handshake_done, c);


Updating miniapp comments

Updating miniapp comments

--- miniapps/meshing/twist.cpp
+++ miniapps/meshing/twist.cpp
@@ -13,25 +13,24 @@
 //             Twist Miniapp:  Generate simple twisted meshes
 //             ----------------------------------------------
 //
-// This miniapp generates two types of Toroidal meshes; one with triangular
-// cross sections and one with square cross sections.  It works by defining a
-// stack of individual elements and bending them so that the bottom and top of
-// the stack can be joined to form a torus.  The stack can also be twisted so
-// that the vertices of the bottom and top can be joined with any integer
-// offset.
-//
-// Compile with: make toroid
-//
-// Sample runs:  toroid
-//               toroid -nphi 6
-//               toroid -ns 1
-//               toroid -ns 0 -t0 -30
-//               toroid -R 2 -r 1 -ns 3
-//               toroid -R 2 -r 1 -ns -3
-//               toroid -R 2 -r 1 -ns 3 -e 1
-//               toroid -R 2 -r 1 -ns 3 -e 1 -rs 1
-//               toroid -nphi 2 -ns 10 -e 1 -o 4
-
+// This miniapp generates simple periodic meshes to demonstrate MFEM's
+// implementation of periodic domains.  MFEM's strategy is to use a
+// discontinuous vector field to define the mesh coordinates on a
+// topologically periodic mesh.  It works by defining a stack of
+// individual elements and stitching together the top and bottom of
+// the mesh.  The stack can also be twisted so that the vertices of
+// the bottom and top can be joined with any integer offset (for
+// tetrahedral and wedge meshes only even offsets are supported).
+//
+// Compile with: make twist
+//
+// Sample runs:  twist
+//               twist -ns 2
+//               twist -ns -2
+//               twist -ns 2 -e 4 -pm
+//               twist -ns 2 -e 6 -pm
+//               twist -ns 3 -e 8 -pm
+//
 #include "mfem.hpp"
 #include <fstream>
 #include <iostream>


refactor(Core/ICC): Move hardcoded spells to enum (#3337)

--- src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -37,6 +37,17 @@
     EVENT_QUAKE_SHATTER         = 2,
     EVENT_REBUILD_PLATFORM      = 3,
     EVENT_RESPAWN_GUNSHIP       = 4
+};
+
+enum Spells
+{
+    SPELL_GAS_VARIABLE      = 74119,
+    SPELL_OOZE_VARIABLE     = 74118,
+    BLOOD_BEAM_VISUAL_RHAND = 72304,
+    BLOOD_BEAM_VISUAL_LHAND = 72303,
+    BLOOD_BEAM_VISUAL_LLEG  = 72302,
+    BLOOD_BEAM_VISUAL_RLEG  = 72301,
+    VOID_ZONE_VISUAL        = 69422
 };

 DoorData const doorData[] =
@@ -244,8 +255,8 @@
                     TeamIdInInstance = player->GetTeamId();

                 // for professor putricide hc
-                DoRemoveAurasDueToSpellOnPlayers(74119 /*SPELL_GAS_VARIABLE*/);
-                DoRemoveAurasDueToSpellOnPlayers(74118 /*SPELL_OOZE_VARIABLE*/);
+                DoRemoveAurasDueToSpellOnPlayers(SPELL_GAS_VARIABLE);
+                DoRemoveAurasDueToSpellOnPlayers(SPELL_OOZE_VARIABLE);

                 if (GetBossState(DATA_LADY_DEATHWHISPER) == DONE && GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE)
                     SpawnGunship();
@@ -472,13 +483,13 @@
                         {
                             uint32 spellId = 0;
                             if (creature->GetPositionY() > 2790.0f && creature->GetPositionZ() > 420.0f)
-                                spellId = 72304;
+                                spellId = BLOOD_BEAM_VISUAL_RHAND;
                             else if (creature->GetPositionY() < 2790.0f && creature->GetPositionZ() > 420.0f)
-                                spellId = 72303;
+                                spellId = BLOOD_BEAM_VISUAL_LHAND;
                             else if (creature->GetPositionY() < 2790.0f && creature->GetPositionZ() < 420.0f)
-                                spellId = 72302;
+                                spellId = BLOOD_BEAM_VISUAL_LLEG;
                             else
-                                spellId = 72301;
+                                spellId = BLOOD_BEAM_VISUAL_RLEG;
                             creature->m_Events.AddEvent(new DelayedCastMincharEvent(creature, spellId), creature->m_Events.CalculateTime(1000));
                         }
                         break;
@@ -637,7 +648,7 @@
                     case NPC_DEATHSPEAKER_SERVANT:
                         if (Creature* c = unit->SummonCreature(WORLD_TRIGGER, *unit, TEMPSUMMON_TIMED_DESPAWN, 10000))
                         {
-                            c->CastSpell(c, 69422, true);
+                            c->CastSpell(c, VOID_ZONE_VISUAL, true);
                             unit->SummonCreature(NPC_RISEN_DEATHSPEAKER_SERVANT, *unit, TEMPSUMMON_MANUAL_DESPAWN);
                             unit->ToCreature()->DespawnOrUnsummon(3000);
                         }


Update array_from_py.cpp

Update array_from_py.cpp

--- dynd/src/array_from_py.cpp
+++ dynd/src/array_from_py.cpp
@@ -417,7 +417,7 @@
         }
         result = nd::empty(ndt::make_type<ndt::bytes_type>());
         reinterpret_cast<bytes *>(result.data())->assign(data, len);
-        result.get()->flags = access_flags;
+        result->set_flags(access_flags);
         return result;
       }
       else {
@@ -439,7 +439,7 @@
     result = nd::make_array(d);
     // The scalar consists of pointers to the byte string data
     reinterpret_cast<dynd::string *>(result.data())->assign(data, len);
-    result->flags = nd::immutable_access_flag | nd::read_access_flag;
+    result->set_flags(nd::immutable_access_flag | nd::read_access_flag);
     // Because this is a view into another object's memory, skip the later
     // processing
     return result;


EditorPropertyText, pass changing variable false.

When the `EditorPropertyText`  change is triggered, it pass the `changing` as true, while there is an early return that blocks such event to be emitted when the Editor is updating.
This commit aligns the early return with the passes parameter.

--- editor/editor_properties.cpp
+++ editor/editor_properties.cpp
@@ -7,7 +7,9 @@
 /*************************************************************************/
 /* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.                 */
 /* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).   */
-/*                                                                       */
+/*
+
+*/
 /* Permission is hereby granted, free of charge, to any person obtaining */
 /* a copy of this software and associated documentation files (the       */
 /* "Software"), to deal in the Software without restriction, including   */
@@ -68,9 +70,9 @@
 	}

 	if (string_name) {
-		emit_changed(get_edited_property(), StringName(p_string), "", true);
+		emit_changed(get_edited_property(), StringName(p_string));
 	} else {
-		emit_changed(get_edited_property(), p_string, "", true);
+		emit_changed(get_edited_property(), p_string);
 	}
 }


V8BSE: use Aida::ClientConnection instead of using the Rapicorn namespace

Signed-off-by: Tim Janik <6ec6ff229c4e1c5bbd5933ee92e6c5832ff023bb@gnu.org>

--- ebeast/v8bse/nodemodule.cc
+++ ebeast/v8bse/nodemodule.cc
@@ -266,7 +266,7 @@
    * notify_fd getting a chance to wakeup poll(2). So we use a notify_callback
    * to check for pending events after each remote call.
    */
-  auto bsenotfycb = [] (Rapicorn::Aida::ClientConnection &con) {
+  auto bsenotfycb = [] (Aida::ClientConnection &con) {
     // bse_client_connection == &con
     if (bse_client_connection && bse_client_connection->pending())
       uv_async_send (&bse_uv_dispatcher);


lockedpool: When possible, use madvise to avoid including sensitive information in core dumps

--- src/support/lockedpool.cpp
+++ src/support/lockedpool.cpp
@@ -250,6 +250,9 @@
     addr = mmap(nullptr, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
     if (addr) {
         *lockingSuccess = mlock(addr, len) == 0;
+#ifdef MADV_DONTDUMP
+        madvise(addr, len, MADV_DONTDUMP);
+#endif
     }
     return addr;
 }


fix #2018

fix #2018

--- src/symbolizer_helpers.cpp
+++ src/symbolizer_helpers.cpp
@@ -505,5 +505,4 @@

 template class text_symbolizer_helper<face_manager<freetype_engine>, label_collision_detector4>;
 template class shield_symbolizer_helper<face_manager<freetype_engine>, label_collision_detector4>;
-template class mapnik::placement_finder<mapnik::label_collision_detector4>;
 } //namespace


Wrong check for VN and vrf delete in test case.

Change-Id: I68c4cfbbb7e29efdc4530de2b4536381547aedfb
Closes-bug: 1456050

--- src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_ovs_multicast_local.cc
+++ src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_ovs_multicast_local.cc
@@ -173,8 +173,8 @@
               Find(MakeUuid(1)) == NULL));
     VrfDelReq("vrf1");
     VnDelReq(1);
-    WAIT_FOR(1000, 10000, (VrfGet("vrf1", true) != NULL));
-    WAIT_FOR(1000, 10000, (VnGet(1) != NULL));
+    WAIT_FOR(1000, 10000, (VrfGet("vrf1", true) == NULL));
+    WAIT_FOR(1000, 10000, (VnGet(1) == NULL));
 }

 int main(int argc, char *argv[]) {


Fixed Drawing of DrawSheetStruct, so DrawSheetLabelStructs are only drawn if they are not being moved (fixes ugliness while moving PinSheets).

--- eeschema/class_drawsheet.cpp
+++ eeschema/class_drawsheet.cpp
@@ -257,7 +257,8 @@
     SheetLabelStruct = m_Label;
     while( SheetLabelStruct != NULL )
     {
-        SheetLabelStruct->Draw( panel, DC, offset, DrawMode, Color );
+        if ( !(SheetLabelStruct->m_Flags & IS_MOVED) )
+            SheetLabelStruct->Draw( panel, DC, offset, DrawMode, Color );
         SheetLabelStruct = (DrawSheetLabelStruct*) (SheetLabelStruct->Pnext);
     }
 }


Fix incorrect synchronization in private server (#739)

* Fix a race in thread shutdown protocol

Signed-off-by: pavelkumbrasev <01894d171a6b3a8e019f625098d1e91c2ac09433@intel.com>

--- src/tbb/private_server.cpp
+++ src/tbb/private_server.cpp
@@ -279,7 +279,9 @@
             // Prepare to wait
             my_thread_monitor.prepare_wait(c);
             // Check/set the invariant for sleeping
-            if( my_state.load(std::memory_order_acquire)!=st_quit && my_server.try_insert_in_asleep_list(*this) ) {
+            // We need memory_order_seq_cst to enforce ordering with prepare_wait
+            // (note that a store in prepare_wait should be with memory_order_seq_cst as well)
+            if( my_state.load(std::memory_order_seq_cst)!=st_quit && my_server.try_insert_in_asleep_list(*this) ) {
                 my_thread_monitor.commit_wait(c);
                 __TBB_ASSERT( my_state==st_quit || !my_next, "Thread monitor missed a spurious wakeup?" );
                 my_server.propagate_chain_reaction();


Display icon for "Set As Main Scene" in filesystem popup

--- editor/filesystem_dock.cpp
+++ editor/filesystem_dock.cpp
@@ -2147,7 +2147,7 @@
 			if (filenames.size() == 1) {
 				p_popup->add_icon_item(get_icon("Load", "EditorIcons"), TTR("Open Scene"), FILE_OPEN);
 				p_popup->add_icon_item(get_icon("CreateNewSceneFrom", "EditorIcons"), TTR("New Inherited Scene"), FILE_INHERIT);
-				p_popup->add_item(TTR("Set As Main Scene"), FILE_MAIN_SCENE);
+				p_popup->add_icon_item(get_icon("PlayScene", "EditorIcons"), TTR("Set As Main Scene"), FILE_MAIN_SCENE);
 			} else {
 				p_popup->add_icon_item(get_icon("Load", "EditorIcons"), TTR("Open Scenes"), FILE_OPEN);
 			}


Don't open a project in the list if Ctrl is held while double-clicking

--- editor/project_manager.cpp
+++ editor/project_manager.cpp
@@ -1689,7 +1689,7 @@

 		emit_signal(SIGNAL_SELECTION_CHANGED);

-		if (mb->is_doubleclick()) {
+		if (!mb->get_control() && mb->is_doubleclick()) {
 			emit_signal(SIGNAL_PROJECT_ASK_OPEN);
 		}
 	}


Fix shutdown slow

Fix shutdown slow

--- src/terark/db/db_table.cpp
+++ src/terark/db/db_table.cpp
@@ -4587,7 +4587,7 @@
 	DbTablePtr m_tab;
 public:
 	void execute() override {
-		if (m_tab->autoConvMergePurge(false)) {
+		if (m_tab->autoConvMergePurge(false) && !g_stopPutToFlushQueue) {
             m_tab->putAutoTask();
         }
 	}


Fix node dragging not working when dock is moved

--- editor/scene_tree_dock.cpp
+++ editor/scene_tree_dock.cpp
@@ -72,7 +72,7 @@
 	Ref<InputEventMouseButton> mb = p_event;

 	if (mb.is_valid() && (mb->get_button_index() == MouseButton::LEFT || mb->get_button_index() == MouseButton::RIGHT)) {
-		if (mb->is_pressed() && scene_tree->get_rect().has_point(mb->get_position())) {
+		if (mb->is_pressed() && scene_tree->get_rect().has_point(scene_tree->get_local_mouse_position())) {
 			tree_clicked = true;
 		} else if (!mb->is_pressed()) {
 			tree_clicked = false;


isnan error

isnan error

--- App/App/examples/052_lab1_Second/052_enviroment.cpp
+++ App/App/examples/052_lab1_Second/052_enviroment.cpp
@@ -343,12 +343,13 @@
 	// calc Reward
 	float weightStepEarly = (1 - ((float)cntStep / (((float)maxStep + (float)initStep ) * 1.25f)));
 	float weightDistance = (1 - (F2T_distance_ / 2.5f));
-	float weightAngle = abs(F2T_angle_);
+	//float weightAngle = abs(F2T_angle_);
+	float weightAngle = (abs(F2T_angle_) * 2.0f);
 	float weight_sd_Angle = (1 - ((abs(sd_angle_ * 180 - 90))) / 150);
-	float weight_eb_Angle = (1 - (eb_angle_ * 180) / 151) / 4.f;
+	float weight_eb_Angle = (1 - (eb_angle_ * 180) / 151);
 	float weight_fist_vel = (1 - (Fist_velocity / 60));
 	float weightDistance_x = (1 - ((F2T_distance_ * cos(F2T_angle_ * M_PI / 180)) / 2.f));
-	float reward_ = weightDistance * weightAngle * weight_eb_Angle * weight_sd_Angle;
+	float reward_ = weightDistance * weightAngle * weight_eb_Angle;

 	// record validation
 	chkForceReset = false;
@@ -405,18 +406,18 @@

 		std::cout << std::fixed << "\t";

-		//std::cout << std::fixed << "sd_ang : " << sd_angle_ << "\t" << "sd_ang_vel : " << sd_angular_velocity << "\t";
-		//std::cout << std::fixed << "eb_ang : " << eb_angle_ << "\t" << "eb_ang_vel : " << eb_angular_velocity << "\t";
+		std::cout << std::fixed << "sd_ang : " << sd_angle_ << "\t" << "sd_ang_vel : " << sd_angular_velocity << "\t";
+		std::cout << std::fixed << "eb_ang : " << eb_angle_ << "\t" << "eb_ang_vel : " << eb_angular_velocity << "\t";

 		std::cout << std::fixed << "F2T_dis : " << F2T_distance_ << "\t";
 		std::cout << std::fixed << "F2T_ang : " << F2T_angle_ << "\t";
-		//std::cout << std::fixed << "Fist_vel : " << Fist_velocity << "\t";
+		std::cout << std::fixed << "Fist_vel : " << Fist_velocity << "\t";

 		//std::cout << std::fixed << "weight_sd_angle : " << weight_sd_Angle << "\t";
-		//std::cout << std::fixed << "weight_eb_angle : " << weight_eb_Angle << "\t";
+		std::cout << std::fixed << "weight_eb_angle : " << weight_eb_Angle << "\t";
 		//std::cout << std::fixed << "weight_Fist_vel : " << weight_fist_vel << "\t";
-		//std::cout << std::fixed << "weight_F2T_angle : " << weightAngle << "\t";
-		//std::cout << std::fixed << "weight_F2T_Distance : " << weightDistance << "\t";
+		std::cout << std::fixed << "weight_F2T_angle : " << weightAngle << "\t";
+		std::cout << std::fixed << "weight_F2T_Distance : " << weightDistance << "\t";
 		//std::cout << std::fixed << "weight_F2T_Distance_x : " << weightDistance_x << "\t";

 		std::cout << std::fixed << "reward : " << reward_ << "\t";