Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestFrameReduction.cpp File Reference
#include "video/geometry/FrameReduction.h"
#include <algorithm>
#include <cstdint>
#include <utility>
#include <vector>
#include <gtest/gtest.h>

Functions

 TEST (TestFrameReduction, UniformFrameStaysUniform)
 
 TEST (TestFrameReduction, LetterboxBoundarySurvivesAtItsScaledPosition)
 
 TEST (TestFrameReduction, TopAlignedTenBitReadsAsItsHighByte)
 
 TEST (TestFrameReduction, ASourceSmallerThanTheTargetIsCopiedAtItsOwnSize)
 
 TEST (TestFrameReduction, ASourceAtTheOutputSizeIsCopiedSampleForSample)
 
 TEST (TestFrameReduction, OutputSizeIsTheExtentReduceFrameProduces)
 
 TEST (TestFrameReduction, AnUndescribableSourceIsRefused)
 

Function Documentation

◆ TEST() [1/7]

TEST ( TestFrameReduction ,
AnUndescribableSourceIsRefused  )

◆ TEST() [2/7]

TEST ( TestFrameReduction ,
ASourceAtTheOutputSizeIsCopiedSampleForSample  )

A source already at the output size takes a straight copy rather than a box average over boxes of one sample. It has to land on the same answer sample for sample - this is the whole of the Direct3D path, where the staging texture arrives at the output size, and any disagreement would move a boundary the detector then reads.

The stride is padded past the width, as a mapped staging texture's row pitch is.

◆ TEST() [3/7]

TEST ( TestFrameReduction ,
ASourceSmallerThanTheTargetIsCopiedAtItsOwnSize  )

◆ TEST() [4/7]

TEST ( TestFrameReduction ,
LetterboxBoundarySurvivesAtItsScaledPosition  )

The property the whole reduced path rests on: a letterbox boundary survives the downscale at its scaled position. Bars at coded rows 0..280 of 2160 reduce by 4 to rows 0..70 of 540; the rows either side of the boundary must be cleanly bar and cleanly picture, because that is what the detector's dark-and-flat walk reads.

◆ TEST() [5/7]

TEST ( TestFrameReduction ,
OutputSizeIsTheExtentReduceFrameProduces  )

A GPU reducer sizes its blit target with ReductionOutputSize and hands the result to ReduceFrame, so the two must agree on the extent for any source shape.

◆ TEST() [6/7]

TEST ( TestFrameReduction ,
TopAlignedTenBitReadsAsItsHighByte  )

◆ TEST() [7/7]

TEST ( TestFrameReduction ,
UniformFrameStaysUniform  )