I mistakenly ommitted the checks when logging.h was ported from
libjingle to webrtc. This caused a significant CPU cost for logs which
were later filtered out anyway.
Verified with LS_VERBOSE logging in neteq4, running:
$ out/Release/modules_unittests \
--gtest_filter=NetEqDecodingTest.TestBitExactness \
--gtest_repeat=50 > time.txt
$ grep "case ran" time.txt | grep "[0-9]* ms" -o | sort
Results on a MacBook Retina, averaged over 5 runs:
Verbose logs disabled: 666 ms
Exisiting implementation, verbose logs enabled: 944 ms (1.42x)
New implementation, verbose logs enabled: 673 ms (1.01x)
BUG=2314
R=henrik.lundin@webrtc.org, henrike@webrtc.org, kjellander@webrtc.org, turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2160005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4682 4adac7df-926f-26a2-2b94-8c16560cd09d
Rolling to the latest Chromium picks up a new clang, which catches a fresh error:
error: 'reinterpret_cast' to class 'webrtc::VideoEngineImpl *' from its base at non-zero offset 'webrtc::VideoEngine *' behaves differently from 'static_cast' [-Werror,-Wreinterpret-base-class]
VideoEngineImpl* vie_impl = reinterpret_cast<VideoEngineImpl*>(video_engine);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../webrtc/video_engine/vie_codec_impl.cc:36:31: note: use 'static_cast' to adjust the pointer correctly while downcasting
VideoEngineImpl* vie_impl = reinterpret_cast<VideoEngineImpl*>(video_engine);
^~~~~~~~~~~~~~~~
static_cast
This was triggered by André's change here:
https://code.google.com/p/webrtc/source/detail?r=3986
which made VideoEngineImpl a derived class of VideoEngine (good).
Picked up one other error as well:
error: implicit conversion from 'long' to 'int' changes value from 9223372036854775807 to -1 [-Werror,-Wconstant-conversion]
AutoTestSleep(std::numeric_limits<long>::max());
~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This fixes the errors and is required before stable can be rolled in Chromium.
TBR=mflodman,andresp
Review URL: https://webrtc-codereview.appspot.com/1450004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3989 4adac7df-926f-26a2-2b94-8c16560cd09d