diff options
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_; |