Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestFrameSampling.cpp File Reference
#include "video/geometry/FrameSampling.h"
#include <algorithm>
#include <cmath>
#include <gtest/gtest.h>

Functions

 TEST (TestFrameSampling, DefaultScheduleSpansTheWindow)
 
 TEST (TestFrameSampling, TheExclusionsDoNotScaleWithRuntime)
 A film and an episode together, because a tenth of the film is most of the episode.
 
 TEST (TestFrameSampling, ReachesAClosingSectionAShortWindowMissed)
 
 TEST (TestFrameSampling, NeverSamplesTheStart)
 
 TEST (TestFrameSampling, StopsShortOfTheEnd)
 
 TEST (TestFrameSampling, TheExclusionsAreHonoured)
 A library of features with long credit rolls is what raising the exclusion is for.
 
 TEST (TestFrameSampling, OffsetsAreOrderedAndDistinct)
 
 TEST (TestFrameSampling, SinglePointLandsMidWindow)
 
 TEST (TestFrameSampling, UnusableInputsYieldNoSchedule)
 
 TEST (TestFrameSampling, ShortItem)
 A clip shorter than the two exclusions combined would otherwise have no window at all.
 
 TEST (TestFrameSampling, ExclusionsThatCannotFitDoNotProduceGarbage)
 
 TEST (TestFrameSampling, HighDiscardRateEscalates)
 
 TEST (TestFrameSampling, MoreThanOneGeometryEscalates)
 
 TEST (TestFrameSampling, NothingSurvivingEscalates)
 
 TEST (TestFrameSampling, AShapeTheAnswerCannotExplainEscalates)
 
 TEST (TestFrameSampling, EscalationCanBeDisabled)
 
 TEST (TestFrameSampling, EscalationOnlyAddsPositionsNotAlreadyMeasured)
 

Function Documentation

◆ TEST() [1/17]

TEST ( TestFrameSampling ,
AShapeTheAnswerCannotExplainEscalates  )

The reading that a unanimous pass would otherwise erase without trace. Corroboration rules are about repetition, which is the right test for a boundary a pixel or two out and the wrong one for a rectangle of an entirely different ratio: that is either a section the sampling nearly missed or a detector failure, and only a denser pass separates them.

◆ TEST() [2/17]

TEST ( TestFrameSampling ,
DefaultScheduleSpansTheWindow  )

◆ TEST() [3/17]

TEST ( TestFrameSampling ,
EscalationCanBeDisabled  )

◆ TEST() [4/17]

TEST ( TestFrameSampling ,
EscalationOnlyAddsPositionsNotAlreadyMeasured  )

◆ TEST() [5/17]

TEST ( TestFrameSampling ,
ExclusionsThatCannotFitDoNotProduceGarbage  )

◆ TEST() [6/17]

TEST ( TestFrameSampling ,
HighDiscardRateEscalates  )

Measured on a hybrid IMAX title: nine points landed on no full-frame section at all and reported a fixed ratio, where twenty-seven found both geometries. What marked the short pass as untrustworthy was not the rectangle - every surviving sample agreed - but that four of nine samples had been thrown away.

◆ TEST() [7/17]

TEST ( TestFrameSampling ,
MoreThanOneGeometryEscalates  )

◆ TEST() [8/17]

TEST ( TestFrameSampling ,
NeverSamplesTheStart  )

◆ TEST() [9/17]

TEST ( TestFrameSampling ,
NothingSurvivingEscalates  )

◆ TEST() [10/17]

TEST ( TestFrameSampling ,
OffsetsAreOrderedAndDistinct  )

◆ TEST() [11/17]

TEST ( TestFrameSampling ,
ReachesAClosingSectionAShortWindowMissed  )

An episode whose 4:3 body gives way to a scope closing act. A window that stops short of the end lands its last sample before the change, so the whole closing section goes unrecorded and the episode is stored as one shape - which is why the schedule reaches as far as it does.

◆ TEST() [12/17]

TEST ( TestFrameSampling ,
ShortItem  )

A clip shorter than the two exclusions combined would otherwise have no window at all.

◆ TEST() [13/17]

TEST ( TestFrameSampling ,
SinglePointLandsMidWindow  )

◆ TEST() [14/17]

TEST ( TestFrameSampling ,
StopsShortOfTheEnd  )

Credits are worth excluding twice over: frequently full-container on a scope title, and text on black returns a rectangle describing the text rather than any picture.

◆ TEST() [15/17]

TEST ( TestFrameSampling ,
TheExclusionsAreHonoured  )

A library of features with long credit rolls is what raising the exclusion is for.

◆ TEST() [16/17]

TEST ( TestFrameSampling ,
TheExclusionsDoNotScaleWithRuntime  )

A film and an episode together, because a tenth of the film is most of the episode.

◆ TEST() [17/17]

TEST ( TestFrameSampling ,
UnusableInputsYieldNoSchedule  )