Descriptioncc: custom bilinear filtering for YUV quad.
YUV quad needs a custom bilinear filter because U plane can be smaller than Y
plane.
For example, look at the following figures. When the current fragment samples
the middle point of (2, 2) texel of Y texture, it points out upper left of (1,
1) texel of U texture. The default GL_LINEAR samples 4 texels of U plane, while
it samples only (2, 2) texel of Y plane. TextureLookupBilinear() samples U
plane with Y plane fraction to sample like Y plane.
Y 4x4 U 2x2 U sampling by GL_LINEAR
+-+-+-+-+ +--+--+ +--+--+
| | | | | | | | | | |
+-------+ | | | | +--++
| | | | | +-----+ +-----|
+-------+ | |· | | ||·||
| | |·| | | | | | +--+|
+-------+ +--+--+ +-----+
| | | | |
+-+-+-+-+
BUG=445071, 622133, 660368
TEST=existing cc_unittests.
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Patch Set 1 #Patch Set 2 : fix SAMPLER_TYPE_2D_RECT logic #Messages
Total messages: 23 (13 generated)
|