diff options
author | angiebird <angiebird@google.com> | 2020-06-15 15:09:01 -0700 |
---|---|---|
committer | angiebird <angiebird@google.com> | 2020-07-15 14:53:01 -0700 |
commit | 16935397ee6712c407f0554e80160054d5eb7188 (patch) | |
tree | fa56df26623d680d6287ceda13caa3921ff6a621 /vp9/simple_encode.h | |
parent | 8c7142d7737c655d96af156b7dbbf01f3331cc84 (diff) | |
download | libvpx-16935397ee6712c407f0554e80160054d5eb7188.tar.gz libvpx-16935397ee6712c407f0554e80160054d5eb7188.tar.bz2 libvpx-16935397ee6712c407f0554e80160054d5eb7188.zip |
Add SetEncodeSpeed() to SimpleEncode
Change-Id: I2fcf37045a96bb101de3359e2e69dcc266c1dc10
Diffstat (limited to 'vp9/simple_encode.h')
-rw-r--r-- | vp9/simple_encode.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vp9/simple_encode.h b/vp9/simple_encode.h index b21732070..77197e7a2 100644 --- a/vp9/simple_encode.h +++ b/vp9/simple_encode.h @@ -304,6 +304,15 @@ class SimpleEncode { SimpleEncode(SimpleEncode &) = delete; SimpleEncode &operator=(const SimpleEncode &) = delete; + // Adjusts the encoder's coding speed. + // If this function is not called, the encoder will use default encode_speed + // 0. Call this function before ComputeFirstPassStats() if needed. + // The encode_speed is equivalent to --cpu-used of the vpxenc command. + // The encode_speed's range should be [0, 9]. + // Setting the encode_speed to a higher level will yield faster coding + // at the cost of lower compression efficiency. + void SetEncodeSpeed(int encode_speed); + // Makes encoder compute the first pass stats and store it at // impl_ptr_->first_pass_stats. key_frame_map_ is also computed based on the // first pass stats. @@ -405,6 +414,7 @@ class SimpleEncode { int frame_rate_den_; int target_bitrate_; int num_frames_; + int encode_speed_; std::FILE *in_file_; std::FILE *out_file_; |