Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/api/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,10 @@ impl<T: Pixel> ContextInner<T> {
.cloned();
let mut next_limit =
gop_input_frameno_start + self.config.max_key_frame_interval;
if !ignore_limit && self.limit.is_some() {
next_limit = next_limit.min(self.limit.unwrap());
if !ignore_limit {
if let Some(limit) = self.limit {
next_limit = next_limit.min(limit);
}
}
if next_detected.is_none() {
return next_limit;
Expand Down
4 changes: 2 additions & 2 deletions src/context/block_unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1286,8 +1286,8 @@ impl ContextWriter<'_> {

/* TODO: Find nearest match and assign nearest and near mvs */

// 7.10.2.11 Sort MV stack according to weight
mv_stack.sort_by(|a, b| b.weight.cmp(&a.weight));
// 7.10.2.11 Sort MV stack according to weight (descending order)
mv_stack.sort_by_key(|mv| std::cmp::Reverse(mv.weight));

if mv_stack.len() < 2 {
// 7.10.2.12 Extra search process
Expand Down
Loading