Improve detection of key frames especially in low contrast
and low motion regions.
This patch adds a function to the key frame detection to test
for specific patterns in the intra signal in the first pass stats
that tend to be indicative of a key frame.
This is intended to compliment the existing code and finds some
scene cuts that were previously being misssed.
Tested on two clips where the existing code was struggling to
identify the key frames this patch improved detection as follows.
Film clip 1: (detected / actual)
Old (2/5) New (5/5)
Film Clip 2
Old 4/11 and one false +, New 7/11 and 1 false +.
Short 4K Film Scene
Old 1/2 New 2/2
In testing so far I have not seen many extra false +'s though
it is likely that there will be some cases and this may need
further tweaking.
One one of our longer form film test reels ~20k frames)
the change picked up around 35 key frames that were
previously missed, mainly in darker scenes. There were a few
extra (or different) false positives cause by bright flashes or
explosions but these were cases where there was little
difference between inter and intra coding.