Martin Pulec
67e6326434
simplify get_av_pixfmt_details
...
YUV is always limited rante BT.709, RGB full range. Thus it doesn't need
to be in the conversion table for every one pixfmt. Also UG pixfmt was
actually useless in the prototype.
2023-02-21 10:28:03 +01:00
Martin Pulec
63f716c7ef
lavc: alloc dummy frame once
...
alloc the one frame that is only envelope for input buffer only once
2023-02-21 10:28:03 +01:00
Martin Pulec
710c667f88
to_lavc_vid_conv.c: removed no longer used func
2023-02-21 10:27:47 +01:00
Martin Pulec
1b0a28cd09
lavc: refactor
...
- moved conversion related functions to to_lavd_vid_conv.c
- removed struct uv_to_av_conversion from to_lavd_vid_conv API
2023-02-21 10:07:04 +01:00
Martin Pulec
a3a872bc33
screen_linux: print compiled modules
2023-02-21 10:06:53 +01:00
Martin Pulec
5339ef2d93
RTP: attempt also other ports on error
...
We want perhaps attempt another ports even though there is another error
from udp_port_pair_is_free() than the port is taken. This error is on
hand unpredicted but by no means fatal.
Fixes:
https://github.com/CESNET/UltraGrid/actions/runs/4225115209/jobs/7336964502
2023-02-21 09:53:16 +01:00
Martin Pulec
702220f650
udp_port_pair_is_free: print port number
...
+ use the even port for getaddrinfo
2023-02-21 09:53:14 +01:00
Martin Pulec
27dc4c6a92
macOS warning fixes
2023-02-21 09:52:58 +01:00
Martin Pulec
da3a55f3df
screen_pw: remove rang.hpp dependency
2023-02-21 08:59:44 +01:00
Martin Pulec
d7ae5c41f1
screen_pw: fixed hang when declined record
...
Fixed hanging on thread::join if user disallows screen recording (wrong
command order).
2023-02-21 08:59:44 +01:00
Martin Pulec
f2566fabce
added screen_linux abstraction
...
User can still select `-t screen` and screen capture will be intialized
according to environment variables (if both pipewire and X11 is
present).
2023-02-21 08:59:41 +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
350489d8e1
CI: require screen capture module
...
but require only X11 capture in Linux for now (Ubuntu 18.04 is difficult
to compile required PipeWire version).
2023-02-21 08:55:48 +01:00
Martin Pulec
ca0b1c32f4
configure: fixed gio pkg-config name
2023-02-21 08:55:48 +01:00
Martin Pulec
eef7170d01
Linux screen cap. compile fixes
...
+ mark the original X11 as such (alongside with PipeWire)
2023-02-21 08:55:48 +01:00
Martin Pulec
183cb3298a
Merge branch 'screen_pw_rebased' of https://github.com/MatejHrica/UltraGrid.git
2023-02-21 08:53:52 +01:00
Martin Pulec
4e43d566fd
CI: fix Windows build upload workaround
...
Used msys/curl instead of clang64/mingw-w64-clang-x86_64-curl for the
upload.
For whatever reason, the other curl variant ceased to collaborate with
GitHub, see failed run (and subsequent ones):
https://github.com/CESNET/UltraGrid/actions/runs/4223917061/jobs/7334218587
I didn't manage to reproduce it on a local Windows machine so there is
perhaps some hidden factor present.
This change is just a workaround and should be removed when not needed.
2023-02-20 16:58:00 +01:00
Martin Pulec
240f512b7e
from_lavc_vid_conv: removed unneeded memsets
...
The relevant members are already empty-initialized by the caller.
For some reason, this fixes the test crash:
https://github.com/CESNET/UltraGrid/actions/runs/4220022764/jobs/7325933580
2023-02-20 14:34:23 +01:00
Martin Piatka
d991cfceaa
CI: Fix libde265dec patch
...
AV_CODEC_CAP_AUTO_THREADS was removed in ffmpeg commit 10c9a08
It was replaced by AV_CODEC_CAP_OTHER_THREADS (same macro value)
2023-02-20 13:17:20 +01:00
Martin Piatka
c54313f6e5
file vidcap: print error insted of crashing on unavailable conversion
...
see GH-296
2023-02-20 12:26:00 +01:00
Martin Piatka
adf0c30ae2
file vidcap: Fix inverted condition
...
We don't want to use swscale if we have a valid conversion. Fixes GH-296
2023-02-20 12:21:53 +01:00
Martin Piatka
803d2c45a9
swmix: Fix possible leak
2023-02-20 10:39:49 +01:00
Martin Pulec
498605df74
macOS: replace altool with notarytool
2023-02-17 19:03:56 +01:00
Martin Pulec
e079acbeb4
CI macOS: add readline to PKG_CONFIG_PATH
...
brew port readline is no longer liked to system path by default.
Fixes failed build:
https://github.com/MartinPulec/UltraGrid/actions/runs/4202715324/jobs/7291225396
2023-02-17 14:36:44 +01:00
Martin Pulec
bebdbadbf8
lavc QSV: set async_depth = 1
...
this setting has positive impact on latency
refer to GH-294
2023-02-17 14:36:44 +01:00
Martin Pulec
bf3a70b73e
build sys: del srcdir_abs (realpath/python missing)
...
No longer used and on macOS there is now neither realpath nor python so
error printed.
2023-02-17 12:18:57 +01:00
Martin Pulec
fa062a3fee
port parsing: be more user friendly
...
- catch stoi invalid_argument exceptions for non-numeric input
- on 'help' redirect user to UG main --fullhelp
2023-02-17 11:09:29 +01:00
Martin Pulec
24b8b8c186
main: short opt 'F' for capture filter
2023-02-17 11:09:28 +01:00
Martin Pulec
738efa12b9
added vc_copylineRGBAtoR12L
...
modified vc_copylineRGBtoR12L to work for both RGB and RGBA
+ data fetching as a macro
2023-02-17 11:09:27 +01:00
Martin Pulec
a843dd36c6
aggregate vicdap: fixed a leak
2023-02-14 10:51:48 +01:00
Martin Pulec
6fe06421d3
get_intermediate_codecs_from_uv_to_av: common comp
...
Use common sorting routine for get_intermediate_codecs_from_uv_to_av.
2023-02-14 09:49:50 +01:00
Martin Pulec
927842cf43
added pixfmt conversion policy opt
...
+ changed the default policy to keep bit-depth over color-space
pixfmt_conv_pref is defined in video_codec.c, otherwise tools/convert
won't compile.
2023-02-14 09:49:48 +01:00
Martin Pulec
93997ea810
get_available_pix_fmts: small refactor
...
* moved complex condition to macro - although it is inherently simple
(just checking constraints if given, it is quite long, which hurts
readibility)
* function prototype - signalize that expecting array of AV_PIX_FMT_NB
members (better would be 'static AV_PIX_FMT_NB', but it's C only)
* improve comments
2023-02-10 16:09:34 +01:00
Martin Pulec
8aae9caa2b
lavc: rewritten sorting
...
use generic compare_pixdesc()
+ rewritten to C (get_available_pix_fmts() will eventually be moved to
to_lavc_vid_conv.c)
2023-02-10 15:38:49 +01:00
Martin Pulec
0aaf9fff99
qsort_s compat: relax requirement to include first
...
If includer defines __STDC_WANT_LIB_EXT1__ to 1, it is no longer needed
to include this header first.
2023-02-10 15:13:17 +01:00
Martin Pulec
d9d7889598
lavc qsv: set nint_ref_cycle_size + scenario
2023-02-10 13:53: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
8e80a60889
lavc vid: only pixfmt is relevant for conv selection
...
Do not pass whole video_desc structure because other members don't
matter.
2023-02-10 11:22:15 +01:00
Martin Pulec
467056530c
lavd vid conv: added some mappings
...
FFmpeg's Y210 and Y212 can be directly mapped to UG Y216 (have
just lower bits unused). This shouldn't, however, be given directly to
uv_to_av_pixfmts, because the mapping isn't 1:1. If it would, for
encoder, eg. the conversion Y216->Y210 will be considered as lossless
but it is reducing depth 16->10 b. So added just dummy conversions for
them.
Also removed RG48 and RGB dummy conversions to corresponding AV pixel
formats. This is the opposite case as mentioned in previous paragraph,
the correspondence is 1:1. Also the conversion/memcpy is dispatched
directly in av_to_uv_convert().
2023-02-10 10:02:34 +01:00
Martin Pulec
8e08c9be13
video testcard: deduce pixfmt from file extension
2023-02-09 16:06:00 +01:00
Martin Pulec
c3e4764914
lavc audio: similar change as in prev commit
2023-02-09 11:51:08 +01:00
Martin Pulec
b7af377936
lavd: accept EAGAIN as success when flushing
...
this is consistent with FFmpeg examples
+ move common audio and video code to lavc_common.c
2023-02-09 11:50:31 +01:00
Martin Pulec
ec50610493
lavd video: call av_frame_free for input frame
2023-02-09 11:42:02 +01:00
Martin Pulec
c1e1c25c3d
testcard: display also 8-bit 4:2:2 Y4M
2023-02-09 10:44:45 +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