Commit Graph

381 Commits

Author SHA1 Message Date
Martin Pulec
27dc4c6a92 macOS warning fixes 2023-02-21 09:52:58 +01:00
Martin Pulec
dd60dd2540 screen_pw: replaced moodycamel with synchronized_queue
There doesn't seem to be any significant advantage of using the
readerwriterqueue so replace it with a generic UG one.

If needed, this change can be easily reverted (the API is similar).
2023-02-21 08:55:48 +01:00
Martin Pulec
86ae693117 text textcard pattern: updates
- accept bg/fg options without need to alter (default) text
- print error on wrong option
- use #CC00CC (pink) - although looking less decent, the subsampling
  artifacts should be more observalble with this color
2023-02-10 11:52:40 +01:00
Martin Pulec
c592d8cbbb Y4M: fixes
- writer: length should no longer be multiplied by 2 (y4m_get_data_len()
  does this already)
- C&P error - 16-bit YCbCr written is 4:4:4, not 4:2:2
2023-02-09 09:52:09 +01:00
Martin Pulec
cac1d11190 updated copyrights of files changed in 2023 2023-02-09 09:19:50 +01:00
Martin Pulec
c34d458d04 PAM: missing newlines
+ improved some error messages
2023-02-08 16:17:25 +01:00
Martin Pulec
ec1a512530 testcard: support for PAM and Y4M 2023-02-08 15:55:31 +01:00
Martin Pulec
3d4bfba352 Y4M: fixed reading of >8 bit files
+ changed prototype of y4m_write() to take metadata in structure
2023-02-08 15:32:14 +01:00
Martin Pulec
7c530b58e7 draw_line: initialize font only once 2023-02-08 12:49:12 +01:00
Martin Pulec
7d8cf2db14 added text testcard pattern
- print printable ASCII characters
- choosed default colors such that 4:2:2 subsampling is observable
2023-02-08 12:49:12 +01:00
Martin Pulec
16659b61ea added simple bitmap font + function to draw RGBA
+ option to annotatne testcard bars
2023-02-08 12:49:12 +01:00
Martin Pulec
e06c1af422 PAM: support for PBM binary images
type P4 is now supported
2023-02-08 12:49:12 +01:00
Martin Pulec
793b9a59c4 factor out get_temp_file
additional improvements for Windows (where tmpnam() is used):

1. pass thread-local storage to store tmpnam result
2. fopen the file exclusively
2023-02-08 12:49:12 +01:00
Martin Pulec
6a8fdff5de pam: fixed data read failure
By incorporating Coverity complains, return value from fread was
incorrectly evaluated - returned nmemb=1 of size instead of size in
bytes. Reversed the order for convenience (to show actual number of
bytes, not only that 0 members were read).
2023-02-07 16:36:03 +01:00
Martin Pulec
7c5e286834 video_pattern_generator: catch errors + init noexcept
The out of bound access in previous commit was silently suppressed
because the exception was passed and catch(...) didn't print anything.

- init is now noexcept
- while still letting catch(...) without err msg, because when int is
  thrown, it is expected that thrower has already printed a cause (or
  help), catch std::exception
2023-02-07 09:45:49 +01:00
Martin Pulec
a541bcddf5 image_pattern_generator: fixed EBU/SMPTE patters
- EBU didn't work at all (out of bounds access)
- last column of SMPTE pattern has full luminance but should have .75%
2023-02-07 09:45:49 +01:00
Martin Pulec
d374a52f3d testcard blank: accept 0xFFFFFFFF pattern 2023-01-30 16:09:23 +01:00
Martin Pulec
6bc837726d misc: removed unneeded MIN definition (already in misc.h) 2023-01-17 16:08:18 +01:00
Martin Pulec
fc0c6adae0 macOS: fixed Vulkan shader bundling/loading 2023-01-17 14:25:09 +01:00
Martin Pulec
6c205e47e2 replaced special last_delim with generic strrpbrk
The latter one (variant to standard strpbrk but in a reverse order) can
be sed also in other code.
2023-01-17 14:25:06 +01:00
Martin Pulec
d83ce18adc fixed data dir lookup (Vulkan)
In Windows, uv.exe is directly in top-level directory, not in "bin"
subdirectory. Thus, cut "bin" suffix only if there is any.

This fixes Vulkan shaders not being found - eg. "C:\UltraGrid\uv.exe"
resulted in shaders being searched in "C:\shaders"
(UltraGrid/../shaders).
2023-01-17 08:39:44 +01:00
Martin Pulec
481cc66821 video_pattern_generator: log "Fill rect" as debug
+ use logger where there hasn't been

The messages are not particulary useful and produce higher number of
lines on init so it would be better to use debug level.
2023-01-13 16:24:48 +01:00
Martin Pulec
22134da2ee Y4M, PAM: fixed Coverity issues 2023-01-09 12:09:03 +01:00
Martin Pulec
d3130c0038 color_out: added dark yellow
+ helper macros for normal yellow
2022-12-08 10:43:10 +01:00
Martin Pulec
a2b0105001 PAM/Y4M utils: move implementation to .c file 2022-12-02 11:15:21 +01:00
Martin Pulec
2d20a63487 gray image pattern: allow also alternative spelling 2022-11-28 16:37:23 +01:00
Martin Pulec
cd51c3b831 testcard gray pattern: decrease default step to 1
The previous value 16 was too much fast (one iteration lasted only 16
frames) which was even unsuitable for latency evaluation for higher
latency compressions.

With the value 1, the latency can be directy read from difference of
luma on subsequent lines.
2022-11-28 12:01:58 +01:00
Martin Pulec
c97bf2bcea testcard gray pattern: added option for color step 2022-11-28 11:36:14 +01:00
Martin Pulec
12d818ea19 save_video_frame_as_pnm: use pam_write
use current version of pam.h from GPUJPEG that supports writing PNM
2022-11-28 09:19:34 +01:00
Martin Pulec
1793514f7d save_video_frame to y4m for YUV 2022-11-28 09:19:33 +01:00
Martin Pulec
05d34dc928 PAM: import latest version from GPUJPEG 2022-11-25 11:02:20 +01:00
Martin Pulec
7b98a4a1d0 dummy: simplified dump usage 2022-11-25 11:02:20 +01:00
Martin Pulec
69627e7815 removed config_common.h 2022-11-22 14:50:25 +01:00
Martin Pulec
62f143f939 config_common.h: removed macros.h include 2022-11-22 14:50:19 +01:00
Martin Pulec
579389cebc tool/convert: compilation fixes
- moved macros to utils/macros.h (not config_common.h that is not going
  to be included) and include in config_common.h the macros.h file
  instead (later it should be removed)
- avoid dependency of color_out.o on host.o if build outside UG (easiest
  for now)
- compile tools with '-g' (obviously for better debuggability)
2022-11-22 10:34:37 +01:00
Martin Pulec
b5cc0e9a1b removed some rang.hpp references 2022-11-21 14:17:01 +01:00
Martin Pulec
42e5fd03e1 moved ref_counter to separate source
It is rarely used and we don't need to spoil c++ sources using misc.h
with <optional> header.
2022-11-16 09:07:15 +01:00
Martin Piatka
fd3d7f9dd9 string_view_utils: Add sv_is_prefix() 2022-11-10 12:04:42 +01:00
Martin Piatka
344ddd5117 string_view_utils: Add sv_contains() 2022-11-10 12:04:41 +01:00
Martin Piatka
7cb9771962 Move tokenize and sv_parse_num into string_view_utils 2022-11-10 12:04:41 +01:00
Martin Pulec
bfcf910403 speex resapler: run in parallel 2022-11-08 16:49:36 +01:00
Martin Pulec
9de21a236c video_pattern_generator: fixed 1st px overwrite
- fixed overwritting own data for very first pixel of image in rgba->rg48
  conversion
2022-11-04 16:50:59 +01:00
Martin Pulec
787731fd96 DeckLink disp.: simplified parsing
rather hard-fail than silently continue (user may not see the message)
2022-10-26 09:20:50 +02:00
Martin Pulec
3036c48c8b WAV reader: reflect CID 401447
+ rename function
+ documentation
2022-10-20 14:14:45 +02:00
Martin Pulec
55b3b87d1e Simplified get_local_addresses
+ acknowledged authorship
+ avoid a compiler warning
2022-10-20 13:42:55 +02:00
Martin Pulec
f2a4de3dd8 indent_paragraph fix
Fixed not counting the start of the line after the wrap, as it can be
clearly seen on this string:

"X yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy zzzzzzzzzzzzzzz"

where should be every ' ' replaced by '\n' but the second wasn't.
2022-10-19 16:00:34 +02:00
Martin Piatka
9f3b891309 holepunch: pass addresses as buffers in config 2022-10-19 14:06:26 +02:00
Martin Piatka
d7495d070d holepunch: Add log messages
see GH-260
2022-10-19 12:25:51 +02:00
Martin Pulec
1e50d51e11 replaced unqualified move with std::move
to avoid this clang warning: https://reviews.llvm.org/D119670
2022-10-18 09:21:50 +02:00
Martin Pulec
eae114cf6d color_out.cpp: missing include <memory> 2022-10-13 10:34:41 +02:00