Commit Graph

10611 Commits

Author SHA1 Message Date
Martin Pulec
f7a1504916 vulkan: locate shaders in srcdir
If running from inside out-of-tree build, the shaders were not located -
now look them up in srcdir (if the the formerly looked shader directory
doesn't exist).
2025-06-24 16:45:20 +02:00
Martin Pulec
fb15e67b15 lavc/utils.c: IWYU 2025-06-24 11:52:09 +02:00
Martin Pulec
4a0714a1b8 lavc,v4l2: add mappings fro VUYA 2025-06-24 11:51:55 +02:00
Martin Pulec
e4d896e90e from_lavc_vid_conv: add conv YCbCr 444->VUYA
When supported by the display, this eliminates the conversion eg. to
Y416 for video display because UYVY or v210 are 4:2:2. But the conversion
went over UYVY anyways (there was no conv from Y444 keeping subsampling), eg:
`$ uv -t testcard:c=vuya -d gl`
was originally:
```
./src/libavcodec/from_lavc_vid_conv.c: selected conversion from yuv444p to Y416 with UYVY intermediate.
```

now VUYA is selected
2025-06-24 10:30:12 +02:00
Martin Pulec
d41ad414f2 added VUYA
support for:
- base (types.h + metadata in video_codec.c)
- testcard (vc_copylineRGBAtoAYUV conversion)
- GL

usage eg. `uv -t testcard:c=vuya -d gl`
2025-06-24 10:30:10 +02:00
Martin Pulec
007af148d7 is_codec_opaque: assert != VC_NONE
to avoid unintended change in behavior because the behavior for VC_NONE
has changed

It should perhaps not be called on VC_NONE but if so, we should perhaps
catch and investigate that.
2025-06-24 08:42:48 +02:00
Martin Pulec
ea923fee8b video_codec: fix desc of block_size_pixels 2025-06-24 08:42:48 +02:00
Martin Pulec
a7a56027ec video_codec: IWYU 2025-06-24 08:42:47 +02:00
Martin Pulec
cc336eb38d main: --cuda-devices help suppress err
avoid printing 'Input number help contains non-numeric symbols!' (missing
return)
2025-06-24 08:42:47 +02:00
Martin Pulec
0302f58e45 video_codec: replace bitfields with flags
somehow more readable - the flag may be also searched directly

PRORES has set interframe=TRUE, perhaps irrelevant - not preserved

+ fix warning (0.0->0 conversion for block_size_pixels)
2025-06-24 08:42:47 +02:00
Martin Pulec
333dbc6b00 video_codec: subsampling - use enum values 2025-06-24 08:42:47 +02:00
Martin Pulec
3a32fdf739 video_codec: replace opaque flag with subsampling
almost everytime when opaque=TRUE, the subsampling is 0

An exception was VDPAU which has set both opaque=1 and subsampling=4440
but it seem that the subsampling doesn't need to be necessarily set.

Also for VC_NONE is_codec_opaque() returns newly true (VC_OPAQUE=0).
2025-06-24 08:42:47 +02:00
Martin Pulec
bfdb477476 get_av_to_uv_conversion_int: avoid NULL dereference
Avoid NULL pointer dereference for VERBOSE msg - in that case SWS fallback
can be used but if --verbose passed, UG crashes on nullptr dereference.
2025-06-24 08:39:59 +02:00
Martin Pulec
fcda8ab72f coverity-scan.yml: use get-etag.sh
+ fail if not able to fetch (same as in ccpp.yml)
2025-06-20 14:59:19 +02:00
Martin Pulec
1b719d78cc deltacast_common: fix Windows warning 2025-06-20 14:59:19 +02:00
Martin Pulec
a6f255f114 vdisp/sdl2: fix clang align warning 2025-06-20 14:59:19 +02:00
Martin Pulec
03b3a87dda pam/y4m: fix Windows warning 2025-06-20 14:59:19 +02:00
Martin Pulec
29063abc6d control_socket: suppress Windows warning
winsock2.h (include from utils/net.h) should be included prior to
windows.h, otherwise windows.h includes winsock.h (version 1), that
is incompatible. WIN32_LEAN_AND_MEAN causes some headers not being
included with windows.h (including winsock.h).
2025-06-20 14:59:19 +02:00
Martin Pulec
1d4dc17051 CI Mac,Win: set env prior to etags fetch
XIMEA_DOWNLOAD_URL is set by the environment.sh file
2025-06-20 14:59:18 +02:00
Martin Pulec
0a9bc4be68 CI improve etag handling
- simplify: do not handle more items (unneded)
- unless optional specified, fail early
2025-06-20 14:59:18 +02:00
Martin Pulec
98515da346 CI FFmpeg Linux: fix libsvt_vp9
now without the patch
2025-06-20 14:59:18 +02:00
Martin Pulec
e88251ec73 CI Linux FFmpeg: update SVT-HEVC SVT-VP9 compat
assume that FFmpeg is already patched with SVT-VP9 patch

As a side effect, the SVT-VP9 patch doesn't need to be patched (these
patches conflicted because VP9 applied after HEVC, which is now not
the case).
2025-06-20 14:59:18 +02:00
Martin Pulec
4f3945fc44 CI Linux FFmpeg: update SVT-HEVC patch
The patch no longer compiles with upstream FFmpeg (moreover the history
of 5000 commits is now too shallow.

Use a updated custom version now - the SVT-HEVC is archived, anyways so
the upstream won't be updated.
2025-06-20 14:59:18 +02:00
Martin Pulec
ae8cc3db8c CI FFmpeg Linux: copy SVT-HEVC patch
to be updated in next commit, for reference
2025-06-20 14:59:17 +02:00
Martin Pulec
735b6d8060 Revert "CI Linux FFmpeg: libsvtav1 API change patch"
This reverts commit 79f85919f1.

No longer needed since cartwheel removal.
2025-06-20 14:59:17 +02:00
Martin Pulec
59b91938be vcomp/lavc: don't blacklist x2rgb for qsv
Seems to work correctly now (aside that it converted to BT.601 by the
device, not BT.709, which is an outstanding issue with RGB formats passed
to QSV).
2025-06-20 14:59:17 +02:00
Martin Pulec
5f7436b213 pixfmt_conv: fix vc_copyliner10ktoY416
broken since the commit 4fe65769f from 2024-09-17
2025-06-20 14:59:17 +02:00
Martin Pulec
42134848a6 to_lavc_vid_conv: set uv_to_av metadata later
Set the metadata for parallel conversion later - av_frame_make_writable()
may actually alter that (at least pointer but perhaps also linesize), those
old values might have been invalidated by that lavc call.
2025-06-20 14:59:17 +02:00
Martin Pulec
e475c4f774 Revert "CI Linux FFmpeg: apply cartwheel patches"
This reverts commit a30a8945e3.

This doesn't seem to be required anymore (at least xv30 and yuvx work
with Arc A770 and Raptor Lake-P GPU on i7-1355U).

As the patches need to be applied against specific version of FFmpeg
(pinned in db308b17 2023-02-03). Currently the version is from 23th Dec
2024, which is slightly old. That is a half of the year but we also
depend on the cartwheel version bump, which is a bit unfortunate, whereas
is now not cerain, if there is something needed.
2025-06-20 14:59:16 +02:00
Martin Pulec
71cf598216 vcomp/lavc: hint for "old" nvenc behavior
(see previous commits)
2025-06-19 13:44:46 +02:00
Martin Pulec
8940b44eb7 vcomp/lavc: nvenc: don't set rc_buffer_size if not intra-refresh 2025-06-19 09:09:45 +02:00
Martin Pulec
40dd353465 vcomp/lavc: nvenc no intra-refresh for HEVC/AV1
Since the pulsation issue, it was not much usable, anyways and this
clean-ups the code a bit.

Also the behavior will be now more deterministic - it behaved differently
with patched FFmpeg (most likely GH Linux builds), othewrise differntly.

+ enable the header-inserter if user expliclty requesetd intra-refresh

refers to GH-114
2025-06-19 09:09:44 +02:00
Martin Pulec
abd7ae96fd vcomp/lavc: h264_nvenc: fix pulsation w intra-refr
Avoid pulsation with inra-refresh by repeating the missing SPS/PPS with
header inseter.

Unfortunately this is doesn't work well with HEVC because it seems that
the NVIDIA encoder keeps the reference almost forever in specific cases,
eg. `testcard:patt=text`. However, it _may_ work under some circumstances.
2025-06-19 09:08:32 +02:00
Martin Pulec
976e9ef2e7 vcomp/lavc: fix init fail
Due to recent changes, libavcodec initialization fails because trying
to register the lavc module prior to vcomp.

This crashes due to the recent changes but it has been a dark zone so far.

Initialize the vcomp module correctly prior to the lavc.

+ add assert to module_register that would catch this problem
2025-06-18 12:10:03 +02:00
Martin Pulec
9ac2c6b33a vdisp/gl: hint for fullhelp (options)
to make sure that there are more
2025-06-18 11:18:22 +02:00
Martin Pulec
6f07112744 vdisp/gl: fix CID 481468
a null-pointer dereference if "fullhelp" isn't first option
2025-06-18 10:50:52 +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
Martin Pulec
f66647cef6 module: zero priv_data instead of cls
to allow multiple calls of module_done to same state (as keyboard_control
is called).

otherwise dump-tree would fail

This acutally revers the commit 33bdcb48 (2020-03-13).
2025-06-18 09:30:24 +02:00
Martin Pulec
ee993d3dbd module: module_class_name handle nfound
+ refactor a bit (early return if nfond, use ARR_COUNT)
+ make module_class_name_pairs const to make clang_tidy happy
2025-06-18 09:30:23 +02:00
Martin Pulec
d8a45610a7 module: do not depend on storage provided by caller
The caller might have deleted the state without calling module_done and
then the dangling pointer is referenced.
2025-06-18 09:00:01 +02:00
Martin Pulec
ab5d2a5cac control_socket acquire: get the pointer from priv_data
Do not assume that (struct module) is first in the (struct control_state)
anymore in particular and in any structure in general.
2025-06-18 08:49:44 +02:00
Martin Pulec
cda3d1b860 control_socket.cpp: IWYU 2025-06-18 08:49:44 +02:00
Martin Pulec
5c103173b1 control_socket: add magic + asserts 2025-06-18 08:49:44 +02:00
Martin Pulec
69a4a4ab2d module.name: use fixed-size string
Unsure if the name is really needed except the hd-rum-translator where it
may not need to store this in module - removing that may be considered as
it simplifies the code (added with commit c1b0bd8f2).
2025-06-18 08:49:27 +02:00
Martin Pulec
b4aed788ca module: move private data to separate structure 2025-06-17 12:35:41 +02:00
Martin Pulec
e3fefce85a module_register: early return (refactor) 2025-06-17 12:35:41 +02:00
Martin Pulec
e86209a558 module: remove CAST_MODULE
as module.deleter no longer exist, this should not be required
2025-06-17 12:35:41 +02:00
Martin Pulec
a1f3e08ad4 remove module.priv_data to simplify
seldom used and the modules can keep their 'magic' by themselves
2025-06-17 12:35:41 +02:00
Martin Pulec
99588ababe remove module.deleter 2025-06-17 12:35:38 +02:00
Martin Pulec
dd4e68001c bitflow: use MOD_NAME in errors
(via MSG)
2025-06-17 11:42:34 +02:00