Commit Graph

92 Commits

Author SHA1 Message Date
Martin Piatka
5cdb12618a tests: Use standard bools 2025-11-20 12:38:37 +01:00
Martin Piatka
a1af69da72 tests: Some tests for Rtp_view 2025-11-18 11:09:19 +01:00
Martin Piatka
5479c5098f tests/sdp_parser: Test session origin fields 2025-11-18 11:09:18 +01:00
Martin Piatka
31d18ef30d tests: Some SAP parsing tests 2025-11-18 11:09:18 +01:00
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
ef0037313c fix gpujpeg_test
The test was still using module_done to destroy compress - this was
incorrect the commit 0557730 (2024-03-08) but didn't crash because struct
compress_state still has struct module as first member (the test is also
not run by CI).
2025-06-18 09:45:34 +02:00
Ben Roeder
a62fe80c3f Fix spelling errors throughout codebase
Corrected various spelling mistakes in comments, documentation, and
variable names across the project. Changes include:
- Documentation files (CONTRIBUTING.md, README.md, etc.)
- Source code comments in C/C++ files
- Function parameter names and descriptions

No functional changes were made.
2025-06-01 18:03:40 +01: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
301aa47a88 y216_to_p010le: handle odd number of rows/lines 2025-04-01 14:02:32 +02:00
Martin Pulec
c06691d045 add test for y216_to_p010le 2025-04-01 14:02:31 +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
8a4238bf44 tests: skip lavc tests if lavc not present 2024-11-27 12:32:05 +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
33b06e6d50 test/ff_codec_conversions_test fix
Really pass rgb_shift as last parameter to av_to_uv_convert() - nullptr
was passed but this was never intended to work, even if the RGB shift
is not relevant for the compression (dst not RGBA).
2024-10-02 16:31:57 +02:00
Martin Pulec
ab008cc0b6 vdec/lavd: do not pass widht/height
already member ov AVFrame
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
2380dc436b unit test header language agnostic
Now can be used with both C and C++ (the variant with C++ allows also
complex objects as expected/actual values).
2024-09-26 10:02:12 +02:00
Martin Pulec
dcf882cc61 from_lavc_vid_conv: make iternal state opaque
Return just a pointer (that needs to be detroyed after that).

This is perhaps more convenient way and also it will allow eg. utlizing
GPU for the conversions.
2024-03-08 16:11:46 +01:00
Martin Pulec
ec09de4e4b tests: link FFmpeg tests only if avail 2023-08-09 16:08:32 +02:00
Martin Pulec
064a22793d test/test_aes.c: silence fscanf unused res warns 2023-08-09 16:08:31 +02:00
Martin Pulec
6c431eff87 Makefile: do not link unused files 2023-08-08 14:39:32 +02:00
Martin Pulec
93aeb59d9f fixed tests (rand48 compat removed in Win) 2023-08-02 11:21:10 +02:00
Martin Pulec
1ed549df4a separated some common root mod handling to host.cpp
The management of should_exit events should be also be shared with the
transcoding reflector that uses some parts that may depend upon this
functionality.

This is not purely a refactorization but slightly changes behavior,
namely the shared state cleanup is done in a destructor, not by
`uv.stop()` as it used to be.

see GH-307
2023-04-12 16:35:55 +02:00
Martin Pulec
a62f503100 skip net tests in GitHub CI
In ARM chroot, all other tests fail so it is perhaps better to bail out
in CI altogether.

This partially reverts commit 393b6f9eaf.
2023-03-15 15:33:46 +01:00
Martin Pulec
d2c00ff3f8 split utils/text to string.c and text.c 2023-03-14 13:21:12 +01:00
Martin Pulec
393b6f9eaf CI: do not skip net_udp test but not fail on mcast
Do not skip the whole net_udp test suite but rather only suppress the
multicast initialize fail in macOS runner.
2023-03-08 09:53:41 +01:00
Martin Pulec
d001bd18f9 run_tests: accept also --verbose param
Options can be passed to the long parameters, whereas to the short opt
it cannot.
2023-03-08 08:53:08 +01:00
Martin Pulec
86b54697af tests: be less verbose
With standard log level, the tests produce unnecessary warnings intended
mainly to main user, not a developer. So silence this by default to be
nicer (but allow '-V' option).
2023-03-07 16:36:51 +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
380e88d306 run_tests: error if specified test not found 2023-03-07 15:45:46 +01:00
Martin Pulec
56ecf79f06 removed remaning cppunit bits 2023-03-07 15:45:46 +01:00
Martin Pulec
84db4767bb rewritten all remaining tests without cppunit 2023-03-07 15:45:45 +01:00
Martin Pulec
8b61de68d9 adapted test/ff_codec_conversions_test to new API 2023-03-07 15:45:45 +01:00
Martin Pulec
33222ed79b unit tests: begin removing cppunit 2023-03-07 15:45:45 +01:00
Martin Pulec
0654e99744 decompress probe: use pixdesc to represent intern fmt
Use pixfmt_desc instead of codec_t for internal compression
representation. This better alignes eg. YUV 10-bit 4:4:4 which has been
deduced as Y416 and eg. for DeckLink, R12L was chosen because it was
thought to be 16 bit, not 10.

This fixes:

    uv -t testcard:codec=R10k -c libavcodec:encoder=libx265:yuv -d dummy:codec=decklink

being detected internally as Y416 and configured as R12L. Now it is
internally Y444_10 and output DeckLink would be configured to R10k.

Removed also params "lavd-use-10bit", "lavd-use-codec", which were
deprecated already some time and if can be replaced by
"decoder-use-codec" if needed.
2023-02-28 16:44:42 +01:00
Martin Pulec
c4c3ffd5dc lavc: fixed test
changed prototype of some functions:

- to_lavc_vid_conv - accept (char *) instead of (struct video_frame)
- get_av_pixfmt_details - (enum AVPixelFormat) instead of int

+ make to_lavc_vid_conv.c partially C++ compatible (I attempted first to
  include it as was it libavcodec.cpp), so leave it (just in case)
2023-02-21 10:28:04 +01:00
Martin Pulec
037d6bef64 fixed tests
broken by API change from last commit
2023-01-30 14:53:19 +01:00
Martin Pulec
90d2492d0d lavc: HAVE_<codec> replaced with <codec>_PRESENT
HAVE_YX macros are either defined or not to signalize feature XY
availability. The _PRESENT macro here has either value 1 or 0 but are
always defined.

+ mark parameters of apply_blacklist() as [[maybe_unused]]
2023-01-20 13:57:58 +01:00
Martin Pulec
a082cdaf12 CI tests: replace UG_SKIP_NET_TESTS with GITHUB_REPOSITORY
Automatically ignore network test errors (typically a multicast on mac
and in arm chroot) if run from CI.
2022-11-08 16:49:36 +01:00
Martin Pulec
a43b808388 support for encryption with wolfSSL
In addition to OpenSSL, wolfSSL can now be used.

+ renamed built-in MD5_CTX to MD5CTX not to interact with the library
  one
2022-11-03 14:12:48 +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
dad032c7bb fixed libavcodec test
changed path of libavcodec/lavc_common
2022-08-18 14:58:39 +02:00
Martin Pulec
d5c721a649 cppunit: fixed missing ifdef 2022-06-06 11:06:07 +02:00
Martin Pulec
7b1837c668 video_codec: removed slow parameter from get_decoder_from_to 2022-05-30 15:38:48 +02:00
Martin Pulec
d66f336e1d video_codec: removed some more ext link
+ return vc_copylineRGB[A] for RGB->RGB and RGBA->RGBA instead of
  vc_memcpy - we cannot know if caller wants or doesn't want to use
  rgb-shifts other than default. Both implementations call vc_memcpy
  if s/he does
2022-05-30 15:38:47 +02:00
Martin Pulec
b1a7f2229a lavc split also to/from conv file
The combined file had ~3k lines which is quite too much.
2022-05-02 16:12:26 +02:00
Martin Pulec
d4841687c4 split libavcodec_common to multiple files
This allows use of libavcodec_common with eg. audio without to need to
include all the conversions burden.
2022-05-02 16:12:26 +02:00