|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
#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) | |
| TEST | ( | TestFrameReduction | , |
| AnUndescribableSourceIsRefused | ) |
| 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 | ( | TestFrameReduction | , |
| ASourceSmallerThanTheTargetIsCopiedAtItsOwnSize | ) |
| 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 | ( | 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 | ( | TestFrameReduction | , |
| TopAlignedTenBitReadsAsItsHighByte | ) |
| TEST | ( | TestFrameReduction | , |
| UniformFrameStaysUniform | ) |