diff options
Diffstat (limited to 'modules/video_coding/utility/include')
-rw-r--r-- | modules/video_coding/utility/include/exp_filter.h | 58 | ||||
-rw-r--r-- | modules/video_coding/utility/include/frame_dropper.h | 36 |
2 files changed, 18 insertions, 76 deletions
diff --git a/modules/video_coding/utility/include/exp_filter.h b/modules/video_coding/utility/include/exp_filter.h deleted file mode 100644 index d8c37a30..00000000 --- a/modules/video_coding/utility/include/exp_filter.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_EXP_FILTER_H_ -#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_EXP_FILTER_H_ - -namespace webrtc -{ - -/**********************/ -/* ExpFilter class */ -/**********************/ - -class VCMExpFilter -{ -public: - VCMExpFilter(float alpha, float max = -1.0) : _alpha(alpha), _filtered(-1.0), _max(max) {} - - // Resets the filter to its initial state, and resets alpha to the given value - // - // Input: - // - alpha : the new value of the filter factor base. - void Reset(float alpha); - - // Applies the filter with the given exponent on the provided sample - // - // Input: - // - exp : Exponent T in y(k) = alpha^T * y(k-1) + (1 - alpha^T) * x(k) - // - sample : x(k) in the above filter equation - float Apply(float exp, float sample); - - // Return current filtered value: y(k) - // - // Return value : The current filter output - float Value() const; - - // Change the filter factor base - // - // Input: - // - alpha : The new filter factor base. - void UpdateBase(float alpha); - -private: - float _alpha; // Filter factor base - float _filtered; // Current filter output - const float _max; -}; // end of ExpFilter class - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_EXP_FILTER_H_ diff --git a/modules/video_coding/utility/include/frame_dropper.h b/modules/video_coding/utility/include/frame_dropper.h index 4c1c168c..8eebd784 100644 --- a/modules/video_coding/utility/include/frame_dropper.h +++ b/modules/video_coding/utility/include/frame_dropper.h @@ -11,7 +11,7 @@ #ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_FRAME_DROPPER_H_ #define WEBRTC_MODULES_VIDEO_CODING_UTILITY_INCLUDE_FRAME_DROPPER_H_ -#include "webrtc/modules/video_coding/utility/include/exp_filter.h" +#include "webrtc/base/exp_filter.h" #include "webrtc/typedefs.h" namespace webrtc @@ -72,23 +72,23 @@ private: void UpdateRatio(); void CapAccumulator(); - VCMExpFilter _keyFrameSizeAvgKbits; - VCMExpFilter _keyFrameRatio; - float _keyFrameSpreadFrames; - int32_t _keyFrameCount; - float _accumulator; - float _accumulatorMax; - float _targetBitRate; - bool _dropNext; - VCMExpFilter _dropRatio; - int32_t _dropCount; - float _windowSize; - float _incoming_frame_rate; - bool _wasBelowMax; - bool _enabled; - bool _fastMode; - float _cap_buffer_size; - float _max_time_drops; + rtc::ExpFilter _keyFrameSizeAvgKbits; + rtc::ExpFilter _keyFrameRatio; + float _keyFrameSpreadFrames; + int32_t _keyFrameCount; + float _accumulator; + float _accumulatorMax; + float _targetBitRate; + bool _dropNext; + rtc::ExpFilter _dropRatio; + int32_t _dropCount; + float _windowSize; + float _incoming_frame_rate; + bool _wasBelowMax; + bool _enabled; + bool _fastMode; + float _cap_buffer_size; + float _max_time_drops; }; // end of VCMFrameDropper class } // namespace webrtc |