ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

intern.h File Reference

#include "common/scummsys.h"
#include "graphics/colormasks.h"
Include dependency graph for intern.h:

Go to the source code of this file.

Functions

template<typename ColorMask >
static uint32 interpolate32_1_1 (uint32 p1, uint32 p2)
 Interpolate two 16 bit pixel *pairs* at once with equal weights 1.
template<typename ColorMask >
static uint32 interpolate32_3_1 (uint32 p1, uint32 p2)
 Interpolate two 16 bit pixel *pairs* at once with weights 3 resp.
template<typename ColorMask >
uint32 interpolate32_2_1 (uint32 pixel1, uint32 pixel2)
 Interpolate two 32 bit pixels with weights 2 and 1 and 1, i.e., (2*p1+p2)/3.
template<typename ColorMask >
static uint32 interpolate32_5_3 (uint32 p1, uint32 p2)
 Interpolate two 32 bit pixels with weights 5 and 3 and 1, i.e., (5*p1+3*p2)/8.
template<typename ColorMask >
static uint32 interpolate32_7_1 (uint32 p1, uint32 p2)
 Interpolate two 32 bit pixels with weights 7 and 1, i.e., (7*p1+p2)/8.
template<typename ColorMask >
static uint32 interpolate32_2_1_1 (uint32 p1, uint32 p2, uint32 p3)
 Interpolate three 32 bit pixels with weights 2, 1, and 1, i.e., (2*p1+p2+p3)/4.
template<typename ColorMask >
static uint32 interpolate32_5_2_1 (uint32 p1, uint32 p2, uint32 p3)
 Interpolate three 32 bit pixels with weights 5, 2, and 1, i.e., (5*p1+2*p2+p3)/8.
template<typename ColorMask >
static uint32 interpolate32_6_1_1 (uint32 p1, uint32 p2, uint32 p3)
 Interpolate three 32 bit pixels with weights 6, 1, and 1, i.e., (6*p1+p2+p3)/8.
template<typename ColorMask >
static uint32 interpolate32_2_3_3 (uint32 p1, uint32 p2, uint32 p3)
 Interpolate three 32 bit pixels with weights 2, 3, and 3, i.e., (2*p1+3*(p2+p3))/8.
template<typename ColorMask >
uint32 interpolate32_2_7_7 (uint32 p1, uint32 p2, uint32 p3)
 Interpolate three 32 bit pixels with weights 2, 7, and 7, i.e., (2*p1+7*(p2+p3))/16.
template<>
uint32 interpolate32_2_7_7< Graphics::ColorMasks< 555 > > (uint32 p1, uint32 p2, uint32 p3)
template<>
uint32 interpolate32_2_7_7< Graphics::ColorMasks< 565 > > (uint32 p1, uint32 p2, uint32 p3)
template<typename ColorMask >
uint32 interpolate32_14_1_1 (uint32 p1, uint32 p2, uint32 p3)
 Interpolate three 32 bit pixels with weights 14, 1, and 1, i.e., (14*p1+p2+p3)/16.
template<>
uint32 interpolate32_14_1_1< Graphics::ColorMasks< 555 > > (uint32 p1, uint32 p2, uint32 p3)
template<>
uint32 interpolate32_14_1_1< Graphics::ColorMasks< 565 > > (uint32 p1, uint32 p2, uint32 p3)
template<typename ColorMask >
uint32 interpolate32_1_1_1 (uint32 pixel1, uint32 pixel2, uint32 pixel3)
 Interpolate three 32 bit pixels with weights 1, 1, and 1, i.e., (p1+p2+p3)/3.
template<typename ColorMask >
static uint32 interpolate32_1_1_1_1 (uint32 p1, uint32 p2, uint32 p3, uint32 p4)
 Interpolate four 32 bit pixels with weights 1, 1, 1, and 1, i.e., (p1+p2+p3+p4)/4.
template<typename ColorMask >
static unsigned interpolate16_1_1 (unsigned p1, unsigned p2)
 Interpolate two 16 bit pixels with weights 1 and 1, i.e., (p1+p2)/2.
template<typename ColorMask >
static unsigned interpolate16_3_1 (unsigned p1, unsigned p2)
 Interpolate two 16 bit pixels with weights 3 and 1, i.e., (3*p1+p2)/4.
template<typename ColorMask >
uint16 interpolate16_2_1 (uint16 pixel1, uint16 pixel2)
 Interpolate two 16 bit pixels with weights 2 and 1, i.e., (2*p1+p2)/3.
template<typename ColorMask >
static unsigned interpolate16_5_3 (unsigned p1, unsigned p2)
 Interpolate two 16 bit pixels with weights 5 and 3 and 1, i.e., (5*p1+3*p2)/8.
template<typename ColorMask >
static unsigned interpolate16_7_1 (unsigned p1, unsigned p2)
 Interpolate two 16 bit pixels with weights 7 and 1, i.e., (7*p1+p2)/8.
template<typename ColorMask >
static unsigned interpolate16_2_1_1 (unsigned p1, unsigned p2, unsigned p3)
 Interpolate three 16 bit pixels with weights 2, 1, and 1, i.e., (2*p1+p2+p3)/4.
template<typename ColorMask >
static unsigned interpolate16_5_2_1 (unsigned p1, unsigned p2, unsigned p3)
 Interpolate three 16 bit pixels with weights 5, 2, and 1, i.e., (5*p1+2*p2+p3)/8.
template<typename ColorMask >
static unsigned interpolate16_6_1_1 (unsigned p1, unsigned p2, unsigned p3)
 Interpolate three 16 bit pixels with weights 6, 1, and 1, i.e., (6*p1+p2+p3)/8.
template<typename ColorMask >
static unsigned interpolate16_2_3_3 (unsigned p1, unsigned p2, unsigned p3)
 Interpolate three 16 bit pixels with weights 2, 3, and 3, i.e., (2*p1+3*(p2+p3))/8.
template<typename ColorMask >
static unsigned interpolate16_2_7_7 (unsigned p1, unsigned p2, unsigned p3)
 Interpolate three 16 bit pixels with weights 2, 7, and 7, i.e., (2*p1+7*(p2+p3))/16.
template<typename ColorMask >
static unsigned interpolate16_14_1_1 (unsigned p1, unsigned p2, unsigned p3)
 Interpolate three 16 bit pixels with weights 14, 1, and 1, i.e., (14*p1+p2+p3)/16.
template<typename ColorMask >
uint16 interpolate16_1_1_1 (uint16 pixel1, uint16 pixel2, uint16 pixel3)
 Interpolate three 16 bit pixels with weights 1, 1, and 1, i.e., (p1+p2+p3)/3.
template<typename ColorMask >
static unsigned interpolate16_1_1_1_1 (unsigned p1, unsigned p2, unsigned p3, unsigned p4)
 Interpolate four 16 bit pixels with weights 1, 1, 1, and 1, i.e., (p1+p2+p3+p4)/4.
static bool diffYUV (int yuv1, int yuv2)
 Compare two YUV values (encoded 8-8-8) and check if they differ by more than a certain hard coded threshold.

Function Documentation

static bool diffYUV ( int  yuv1,
int  yuv2 
) [inline, static]

Compare two YUV values (encoded 8-8-8) and check if they differ by more than a certain hard coded threshold.

Used by the hq scaler family.

Definition at line 492 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_14_1_1 ( unsigned  p1,
unsigned  p2,
unsigned  p3 
) [inline, static]

Interpolate three 16 bit pixels with weights 14, 1, and 1, i.e., (14*p1+p2+p3)/16.

Definition at line 440 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_1_1 ( unsigned  p1,
unsigned  p2 
) [inline, static]

Interpolate two 16 bit pixels with weights 1 and 1, i.e., (p1+p2)/2.

See <http://www.slack.net/~ant/info/rgb_mixing.html> for details on how this works.

Definition at line 317 of file intern.h.

template<typename ColorMask >
uint16 interpolate16_1_1_1 ( uint16  pixel1,
uint16  pixel2,
uint16  pixel3 
)

Interpolate three 16 bit pixels with weights 1, 1, and 1, i.e., (p1+p2+p3)/3.

Definition at line 453 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_1_1_1_1 ( unsigned  p1,
unsigned  p2,
unsigned  p3,
unsigned  p4 
) [inline, static]

Interpolate four 16 bit pixels with weights 1, 1, 1, and 1, i.e., (p1+p2+p3+p4)/4.

Definition at line 480 of file intern.h.

template<typename ColorMask >
uint16 interpolate16_2_1 ( uint16  pixel1,
uint16  pixel2 
)

Interpolate two 16 bit pixels with weights 2 and 1, i.e., (2*p1+p2)/3.

Definition at line 336 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_2_1_1 ( unsigned  p1,
unsigned  p2,
unsigned  p3 
) [inline, static]

Interpolate three 16 bit pixels with weights 2, 1, and 1, i.e., (2*p1+p2+p3)/4.

Definition at line 379 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_2_3_3 ( unsigned  p1,
unsigned  p2,
unsigned  p3 
) [inline, static]

Interpolate three 16 bit pixels with weights 2, 3, and 3, i.e., (2*p1+3*(p2+p3))/8.

Definition at line 414 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_2_7_7 ( unsigned  p1,
unsigned  p2,
unsigned  p3 
) [inline, static]

Interpolate three 16 bit pixels with weights 2, 7, and 7, i.e., (2*p1+7*(p2+p3))/16.

Definition at line 427 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_3_1 ( unsigned  p1,
unsigned  p2 
) [inline, static]

Interpolate two 16 bit pixels with weights 3 and 1, i.e., (3*p1+p2)/4.

Definition at line 326 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_5_2_1 ( unsigned  p1,
unsigned  p2,
unsigned  p3 
) [inline, static]

Interpolate three 16 bit pixels with weights 5, 2, and 1, i.e., (5*p1+2*p2+p3)/8.

Definition at line 391 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_5_3 ( unsigned  p1,
unsigned  p2 
) [inline, static]

Interpolate two 16 bit pixels with weights 5 and 3 and 1, i.e., (5*p1+3*p2)/8.

Definition at line 359 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_6_1_1 ( unsigned  p1,
unsigned  p2,
unsigned  p3 
) [inline, static]

Interpolate three 16 bit pixels with weights 6, 1, and 1, i.e., (6*p1+p2+p3)/8.

Definition at line 403 of file intern.h.

template<typename ColorMask >
static unsigned interpolate16_7_1 ( unsigned  p1,
unsigned  p2 
) [inline, static]

Interpolate two 16 bit pixels with weights 7 and 1, i.e., (7*p1+p2)/8.

Definition at line 369 of file intern.h.

template<typename ColorMask >
uint32 interpolate32_14_1_1 ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline]

Interpolate three 32 bit pixels with weights 14, 1, and 1, i.e., (14*p1+p2+p3)/16.

See also:
interpolate32_3_1 for similar method

Definition at line 236 of file intern.h.

template<>
uint32 interpolate32_14_1_1< Graphics::ColorMasks< 555 > > ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline]
template<>
uint32 interpolate32_14_1_1< Graphics::ColorMasks< 565 > > ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline]
template<typename ColorMask >
static uint32 interpolate32_1_1 ( uint32  p1,
uint32  p2 
) [inline, static]

Interpolate two 16 bit pixel *pairs* at once with equal weights 1.

In particular, p1 and p2 can contain two pixels each in the upper and lower halves.

This also works for 32 bit pixels.

Definition at line 38 of file intern.h.

template<typename ColorMask >
uint32 interpolate32_1_1_1 ( uint32  pixel1,
uint32  pixel2,
uint32  pixel3 
)

Interpolate three 32 bit pixels with weights 1, 1, and 1, i.e., (p1+p2+p3)/3.

Definition at line 267 of file intern.h.

template<typename ColorMask >
static uint32 interpolate32_1_1_1_1 ( uint32  p1,
uint32  p2,
uint32  p3,
uint32  p4 
) [inline, static]

Interpolate four 32 bit pixels with weights 1, 1, 1, and 1, i.e., (p1+p2+p3+p4)/4.

See also:
interpolate32_3_1 for similar method

Definition at line 297 of file intern.h.

template<typename ColorMask >
uint32 interpolate32_2_1 ( uint32  pixel1,
uint32  pixel2 
)

Interpolate two 32 bit pixels with weights 2 and 1 and 1, i.e., (2*p1+p2)/3.

Definition at line 74 of file intern.h.

template<typename ColorMask >
static uint32 interpolate32_2_1_1 ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline, static]

Interpolate three 32 bit pixels with weights 2, 1, and 1, i.e., (2*p1+p2+p3)/4.

See also:
interpolate32_3_1 for similar method

Definition at line 133 of file intern.h.

template<typename ColorMask >
static uint32 interpolate32_2_3_3 ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline, static]

Interpolate three 32 bit pixels with weights 2, 3, and 3, i.e., (2*p1+3*(p2+p3))/8.

See also:
interpolate32_3_1 for similar method

Definition at line 187 of file intern.h.

template<typename ColorMask >
uint32 interpolate32_2_7_7 ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline]

Interpolate three 32 bit pixels with weights 2, 7, and 7, i.e., (2*p1+7*(p2+p3))/16.

See also:
interpolate32_3_1 for similar method

Definition at line 205 of file intern.h.

template<>
uint32 interpolate32_2_7_7< Graphics::ColorMasks< 555 > > ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline]
template<>
uint32 interpolate32_2_7_7< Graphics::ColorMasks< 565 > > ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline]
template<typename ColorMask >
static uint32 interpolate32_3_1 ( uint32  p1,
uint32  p2 
) [inline, static]

Interpolate two 16 bit pixel *pairs* at once with weights 3 resp.

1. In particular, p1 and p2 can contain two pixels/each in the upper and lower halves.

This also works for 32 bit pixels.

Definition at line 56 of file intern.h.

template<typename ColorMask >
static uint32 interpolate32_5_2_1 ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline, static]

Interpolate three 32 bit pixels with weights 5, 2, and 1, i.e., (5*p1+2*p2+p3)/8.

See also:
interpolate32_3_1 for similar method

Definition at line 151 of file intern.h.

template<typename ColorMask >
static uint32 interpolate32_5_3 ( uint32  p1,
uint32  p2 
) [inline, static]

Interpolate two 32 bit pixels with weights 5 and 3 and 1, i.e., (5*p1+3*p2)/8.

See also:
interpolate_32_3_1 for similar method

Definition at line 105 of file intern.h.

template<typename ColorMask >
static uint32 interpolate32_6_1_1 ( uint32  p1,
uint32  p2,
uint32  p3 
) [inline, static]

Interpolate three 32 bit pixels with weights 6, 1, and 1, i.e., (6*p1+p2+p3)/8.

See also:
interpolate32_3_1 for similar method

Definition at line 169 of file intern.h.

template<typename ColorMask >
static uint32 interpolate32_7_1 ( uint32  p1,
uint32  p2 
) [inline, static]

Interpolate two 32 bit pixels with weights 7 and 1, i.e., (7*p1+p2)/8.

See also:
interpolate32_3_1 for similar method

Definition at line 119 of file intern.h.



Generated on Sat Jul 20 2019 05:01:53 for ResidualVM by doxygen 1.7.1
curved edge   curved edge