14 Commits

Author SHA1 Message Date
Martin Pulec
434d23ddd6 color.{c,h}: rename to color_space
color is too much general - the declarations relate to color spaces
2025-10-08 15:19:36 +02:00
Martin Pulec
96486494cd tests improvements
- suppress the output for unit_evaluate
- improve debug printout codec_conversion_test_testcard_uyvy_to_i420
- improve C variant of ASSERT_EQUAL_MESSAGE macro (prints num values
also in hex)
- remove VLA from codec_conversions_test.cpp (not valid in C++)
2025-04-01 15:42:13 +02:00
Martin Pulec
f4d94066c8 unit_evaluate: accept binary suffixes
+ test
2025-03-31 09:15:51 +02:00
Martin Pulec
d90d2836ec sockaddr_compare: handle v4-mapped sockaddr_in6
Current implementation of resolve_addrinfo defaults to v4-mapped ipv6
addresses even for dotted decimal.
2024-11-28 12:05:11 +01:00
Martin Pulec
273f6d3c1d add get_sockaddr + tests
to convert textual representation of host:port to sockaddr

having this new function, we can also test get_sockaddr_str
2024-11-28 12:05:11 +01:00
Martin Pulec
8f063708d3 from_lavc_vid_conv: handle BT.601 conv if possible
If converting from YCbCr to RGB, use BT.601 coefficients.

refer to GH-341
2024-10-02 16:31:57 +02:00
Martin Pulec
6e9339133b fixed the test to use new coeffs API
+ wrap the function with obligatory extern "C" for C++ code (as the
test is)
2024-09-27 17:06:18 +02:00
Martin Pulec
4fe65769f0 color coeff computing updates
Mainly depth is included in Y_ and CBCR_LIMIT - the used denominator
255.0 matched only 8 bits.

Add (substract) epsilon 0.5 when converting the to integer to round the
value correctly.
2024-09-27 17:06:15 +02:00
Martin Pulec
d2c00ff3f8 split utils/text to string.c and text.c 2023-03-14 13:21:12 +01:00
Martin Pulec
4c114d0b33 unify test API for old and new tests
return int -1 if test failed; 0 if succeeded; 1 if not applicable (but
not failed)

As the old and new tests are mostly compatible now, do not take
different approach handling both groups.
2023-03-07 16:04:36 +01:00
Martin Pulec
84db4767bb rewritten all remaining tests without cppunit 2023-03-07 15:45:45 +01:00
Martin Pulec
05aea72a3c moved some functions from misc to text
moved text-related functions from utils/misc to utils/text
2022-10-13 09:16:16 +02:00
Martin Pulec
b1bc866d7f mist_test.cpp: ignore false positive clang warning 2022-03-18 08:52:32 +01:00
Martin Pulec
f62e04d15f fixed replace_all()
In response to Coverity CID 383367 - it is perhaps false positive but
there has been another small bug - the step should be length of to, not
from (which may be longer).

+ written a test for it
2022-02-21 15:32:00 +01:00