diff options
author | Wan-Teh Chang <wtc@google.com> | 2022-06-10 13:52:31 -0700 |
---|---|---|
committer | Wan-Teh Chang <wtc@google.com> | 2022-06-10 16:08:20 -0700 |
commit | 46bfeed2c9a7e52c8d1624f9e388af137e02ff19 (patch) | |
tree | ca765bc4c564dd10ac412c74ee4fcd5e3912e598 /test/encode_test_driver.h | |
parent | 7b1b9f7cd23e085d97c26ed026d2c817d78a14d6 (diff) | |
download | libvpx-46bfeed2c9a7e52c8d1624f9e388af137e02ff19.tar libvpx-46bfeed2c9a7e52c8d1624f9e388af137e02ff19.tar.gz libvpx-46bfeed2c9a7e52c8d1624f9e388af137e02ff19.tar.bz2 libvpx-46bfeed2c9a7e52c8d1624f9e388af137e02ff19.zip |
Convert EncoderTest::last_pts_ to a local variable
Convert the data member EncoderTest::last_pts_ to a local variable in
the EncoderTest::RunLoop() and VP9FrameSizeTestsLarge::RunLoop()
methods. EncoderTest::last_pts_ is only used in these two methods, and
these two methods first set EncoderTest::last_pts_ to 0 before using it.
So EncoderTest::last_pts_ is effectively a local variable in these two
methods.
Note that several subclasses of EncoderTest declare their own last_pts_
data member and use it to calculate the data rate. Apparently their own
last_pts_ data member hides the same-named data member in the base
class. Although this is allowed by C++, this is very confusing.
Change-Id: I55ce1cf8cc62e07333d8a902d65b46343a3d5881
Diffstat (limited to 'test/encode_test_driver.h')
-rw-r--r-- | test/encode_test_driver.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h index 7085945f6..f6bb841d8 100644 --- a/test/encode_test_driver.h +++ b/test/encode_test_driver.h @@ -206,8 +206,7 @@ class Encoder { class EncoderTest { protected: explicit EncoderTest(const CodecFactory *codec) - : codec_(codec), abort_(false), init_flags_(0), frame_flags_(0), - last_pts_(0) { + : codec_(codec), abort_(false), init_flags_(0), frame_flags_(0) { // Default to 1 thread. cfg_.g_threads = 1; } @@ -291,7 +290,6 @@ class EncoderTest { TwopassStatsStore stats_; unsigned long init_flags_; unsigned long frame_flags_; - vpx_codec_pts_t last_pts_; }; } // namespace libvpx_test |