Skip to content

Commit

Permalink
Improve scene detection
Browse files Browse the repository at this point in the history
  • Loading branch information
master-of-zen committed Apr 6, 2021
1 parent d6e4b5c commit 0b0308b
Show file tree
Hide file tree
Showing 2 changed files with 199 additions and 204 deletions.
5 changes: 1 addition & 4 deletions src/api/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ pub(crate) struct ContextInner<T: Pixel> {
gop_output_frameno_start: BTreeMap<u64, u64>,
/// Maps `output_frameno` to `gop_input_frameno_start`.
pub(crate) gop_input_frameno_start: BTreeMap<u64, u64>,
keyframe_detector: SceneChangeDetector,
keyframe_detector: SceneChangeDetector<T>,
pub(crate) config: Arc<EncoderConfig>,
seq: Arc<Sequence>,
pub(crate) rc_state: RCState,
Expand All @@ -271,7 +271,6 @@ impl<T: Pixel> ContextInner<T> {

let seq = Arc::new(Sequence::new(enc));
let inter_cfg = InterConfig::new(enc);
let lookahead_distance = inter_cfg.keyframe_lookahead_distance() as usize;

ContextInner {
frame_count: 0,
Expand All @@ -289,9 +288,7 @@ impl<T: Pixel> ContextInner<T> {
keyframe_detector: SceneChangeDetector::new(
*enc,
CpuFeatureLevel::default(),
lookahead_distance,
seq.clone(),
true,
),
config: Arc::new(*enc),
seq,
Expand Down
Loading

0 comments on commit 0b0308b

Please sign in to comment.