MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / filter

Method filter

scenedetect/detector.py:160–169  ·  view source on GitHub ↗
(self, timecode: FrameTimecode, above_threshold: bool)

Source from the content-addressed store, hash-verified

158 return self._filter_length <= 0
159
160 def filter(self, timecode: FrameTimecode, above_threshold: bool) -> list[FrameTimecode]:
161 if self._is_disabled:
162 return [timecode] if above_threshold else []
163 if self._last_above is None:
164 self._last_above = timecode
165 if self._mode == FlashFilter.Mode.MERGE:
166 return self._filter_merge(timecode=timecode, above_threshold=above_threshold)
167 elif self._mode == FlashFilter.Mode.SUPPRESS:
168 return self._filter_suppress(timecode=timecode, above_threshold=above_threshold)
169 raise RuntimeError("Unhandled FlashFilter mode.")
170
171 def _filter_suppress(
172 self, timecode: FrameTimecode, above_threshold: bool

Callers 4

render_all_sizesFunction · 0.80
process_frameMethod · 0.80
process_frameMethod · 0.80
post_processMethod · 0.80

Calls 2

_filter_mergeMethod · 0.95
_filter_suppressMethod · 0.95

Tested by

no test coverage detected