Add frame limit to segmaker to prevent out of bound solutions.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2019-01-29 08:35:14 -08:00
parent 76af782e3f
commit bb1548011a
1 changed files with 6 additions and 0 deletions

View File

@ -225,12 +225,18 @@ class Segmaker:
bitname_frame = bit_frame - base_frame
bitname_bit = 32 * (
bit_wordidx - bitj["offset"]) + bit_bitidx
# Skip bits above the frame limit.
if bitname_frame >= bitj["frames"]:
continue
# some bits are hard to de-correlate
# allow force dropping some bits from search space for practicality
if bitfilter is None or bitfilter(bitname_frame,
bitname_bit):
bitname = "%02d_%02d" % (bitname_frame, bitname_bit)
segment["bits"].add(bitname)
return segment
'''