29 const int depths[] = { 8, 10, 12, 16 };
31 for (
unsigned i = 0; i <
sizeof depths /
sizeof depths[0]; ++i) {
32 const int d = depths[i];
33 const int d_max = (1 << d) - 1;
34 const int max_diff = 1 << (d - 8);
38 "min Y diverges from nominal range min", max_diff,
43 "max Y diverges from nominal range max", max_diff,
49 "min Cb diverges from nominal range min", max_diff,
54 "max Cb diverges from nominal range max", max_diff,
59 "min Cr diverges from nominal range min", max_diff,
64 "max Cr diverges from nominal range max", max_diff,
73#pragma clang diagnostic ignored "-Wstring-concatenation"
81 for (
unsigned i = 0; i <
sizeof test /
sizeof test[0]; ++i) {
83 ASSERT(strcmp(test[i], res[i]) == 0);
90 const std::list<video_desc> test_desc = {
93 for (
const auto & i : test_desc) {
98 istringstream iss(oss.str());
104 string err_elem = oss.str() +
" vs " + oss2.str();
#define LIMIT_HI_CBCR(depth)
#define RGB_TO_CB_709_SCALED(out_depth, r, g, b)
#define LIMIT_HI_Y(depth)
#define RGB_TO_CR_709_SCALED(out_depth, r, g, b)
#define RGB_TO_Y_709_SCALED(out_depth, r, g, b)
static __device__ vec2 abs(const vec2 &v)
int misc_test_video_desc_io_op_symmetry()
int misc_test_replace_all()
int misc_test_color_coeff_range()
void replace_all(char *in, const char *from, const char *to)
Replaces all occurencies of 'from' to 'to' in string 'in'.
@ PROGRESSIVE
progressive frame
@ DXT5
S3 Texture Compression DXT5.
#define ASSERT_EQUAL_MESSAGE(msg, expected, actual)
#define ASSERT_LE_MESSAGE(msg, expected, actual)
#define ASSERT_MESSAGE(msg, expr)
This is an umbrella header for video functions.
bool video_desc_eq(struct video_desc a, struct video_desc b)
Compares two video descriptions.