Commit Graph

104 Commits

Author SHA1 Message Date
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
3708bd74ea fixed VLAs in C++ files
see commit @{2} description
2024-03-25 15:29:10 +01:00
Martin Pulec
4b4a949708 testcard y4m: support for >8 bit non-444 y4m 2024-02-29 15:23:16 +01:00
Martin Pulec
055c165ac0 moved i420_to_uyvy conv from dshow to video_codec
the conversion is quite generic, so provide it externally

\+ instantly use it in testcard
2024-01-25 17:07:40 +01:00
Martin Pulec
f4dedb0ffc video_codec: planar<->packed YUV use unsigned char
This requires less conversions from/to (char *).

\+ vcap/testcard: handle unsuppoted subsampling
2024-01-25 17:07:40 +01:00
Martin Pulec
d72d1cf3c4 document pixfmt conversion files 2023-09-21 09:07:22 +02:00
Martin Pulec
4ba8c70a7e vidcap testcard: support for 8b 444 Y4M 2023-06-01 12:17:50 +02:00
Martin Pulec
04a0bf581b removed ATTRIBUTE macros
This was unnecessary compat macro, since we always build with a compiler
that understands __attribute__ except of the AJA module in MSW, which
uses MSVC compiler
2023-05-02 15:22:55 +02:00
Martin Pulec
6ae7f268f0 video_codec: moved pixfmt convs to a separate file
Just the conversions grew to a significant amount so it is better to
split the file to two to keep the general video codec utility functions
in one file and the conversions in the another.
2023-03-16 14:26:22 +01:00
Martin Pulec
43d9c936b8 video_codec: removed attribute "slow" for convs
The concept of fast/slow decoders was obsolete and not a supported way -
the preferred way nowadays is to use the generic comparator and
alternatively let user selecting a policy. Also, it was error prone
whether or not mark the conversion as slow or fast. Also the order in
the array was important.

Subsequently replaced get_fastest_decoder_from() with
get_best_decoder_from() calls - in the occurences where it was used,
both calls will likely to end up with the same result, anyways
(candidate set is usually something like RGB,RGBA and UYVY).
2023-03-07 08:28:24 +01:00
Martin Pulec
f760123146 get_best_decoder_from: removed include_slow param
was always set to true, anyways
2023-03-07 08:28:24 +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
e720acba5e lavc: print a warning if there is quality degradation 2023-02-21 10:28:04 +01:00
Martin Pulec
8e08c9be13 video testcard: deduce pixfmt from file extension 2023-02-09 16:06:00 +01:00
Martin Pulec
c1e1c25c3d testcard: display also 8-bit 4:2:2 Y4M 2023-02-09 10:44:45 +01:00
Martin Pulec
cac1d11190 updated copyrights of files changed in 2023 2023-02-09 09:19:50 +01:00
Martin Pulec
ec1a512530 testcard: support for PAM and Y4M 2023-02-08 15:55:31 +01:00
Martin Pulec
189eb74093 from_lavc_vid_conv: avoid av_to_uv_conversions::native
Do not use av_to_uv_conversions::native to select best ultragrid codec_t
matching AVPixelFormat.

This will allow deploy policies (to keep color space or bit depth) and
doesn't require developer to pick one <codec_t,AVPixelFormat> pair as
"privileged".
2023-01-30 14:53:20 +01:00
Martin Pulec
bdf389099c vc_deinterlace_ex: basic check if pixfmt is supported
+ use&check it in GL/SDL/deinterlace pp/double_framerate pp
2023-01-10 15:57:37 +01:00
Martin Pulec
15af296d27 save_video_frame_as_y4m: store also >8b YUV 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
e1a490b334 testcard: added gray pattern 2022-08-05 09:43:22 +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
9001fe9ad1 video codec: conversion selection logic
Do not use third parameter of get_decoder_from_to by caller to get fast
decode first, Created function get_fastest_decoder_from instead, that
hides and encapsulates the selection logic.
2022-05-30 15:38:48 +02:00
Martin Pulec
b914f6ee22 video_codec: few improvements
- get_best_decoder_for: added doxy
- "                   : return also vc_memcpy
- "                   : simplified return - there exist only one
  conversion in the end (no matter if slow or not)
- fixed protoypes for both get_best_decoder_for and codec_is_in_set:
  the first should not be neither const nor pure, 2nd may be pure
- codec_is_in_set: argument can be pointer to const
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
9c72e92c36 video_codec: removed some external linkage for convs 2022-05-30 15:38:44 +02:00
Martin Pulec
fe8d353e0c video_codec.c: make some functions explicitly bool 2022-05-25 14:47:18 +02:00
Martin Pulec
df635235c9 video_codec: remove bpp in favor of block pix width
bpp is still deducible by pixel_block_bytes/pixel_block_pixels
2022-05-24 14:08:57 +02:00
Martin Pulec
0fd508cfb8 video_codec.c: rename get_pf_block_size->bytes
Renamed get_pf_block_size to get_pf_block_bytes.
2022-05-24 10:31:27 +02:00
Martin Pulec
8eccc3bcdd fixed uncompressed packet splitting
Fixes problem described (and partially fixed) by commit 13b44851.

The idea is to use least common multiple of all pixel format alignments
(in pixels) and split only on this boundry (in source pixfmt byte
length) because we don't know destination pixfmt alignment requirement.
2022-05-23 15:59:37 +02:00
Martin Pulec
a35e35a9c7 vf_alloc_desc_data,RTP: allocate +padding
Allocate padding to accomodate pixel format conversions like 1 pixel
Y416->R12L conversion - 64 bytes of Y416 is required but natively only
8 may have been allocated).
2022-05-23 15:58:59 +02:00
Martin Pulec
df5901a286 added Y416 + basic conversions & testcard 2022-05-20 10:45:02 +02:00
Martin Pulec
0d2a354d50 testcard: help rename 12-bit group to 12+
Only R12L is truly 12-bit, Y216 and RG48 not.
2022-05-20 10:45:01 +02:00
Martin Pulec
1b3b27eb7c Updated copyright dates for modified files 2021-11-08 15:43:14 +01:00
Martin Pulec
f2814cf3dd Replaced some occurences of default {r,g,b}-shifts
Replaced only those occurences that are implicitly default.
2021-08-09 14:33:03 +02:00
Martin Pulec
0b668e9a05 Lavc: run the UG conversions in parallel
+ create helper for that
+ macro for default color shifts
2021-08-09 14:07:26 +02:00
Martin Pulec
ec854785ce Video codec: added subsampling 2021-05-21 19:40:18 +02:00
Martin Pulec
110e20f064 Updated MAX_BPS+MAX_PADDING 2021-03-10 14:56:44 +01:00
Martin Pulec
6725f57c3f Video codec: maximal BPS is now 8 (for RG48) 2021-02-17 13:51:12 +01:00
Martin Pulec
5086d08dee Lavc: default to 420 only for I420
Before that, 420 was used for every non-interlaced video (even v210). Of
course if available, which was not the case for RGB pixel formats.
2020-09-22 16:06:52 +02:00
Martin Pulec
9ae26f0e1c Removed get_halign, get_aligned_length
No longer used and its use is rather obscure
2020-08-05 16:14:39 +02:00
Martin Pulec
a870713390 AJA: Win compat 2020-05-25 18:04:48 +02:00
Martin Pulec
71b2eff1a0 AJA: support for NTV2_FBF_12BIT_RGB_PACKED
Currently this is handled exernally as R12L. Conversion is done
internally.
2020-05-25 17:40:19 +02:00
Martin Pulec
c5672184d3 Video decoder: choose line decoders in a more smart way
Implement more smart selection of decoders. Until now, first was chosen
(only the fast property was taken into accout). Now reflect also bit
depth.
2020-05-25 17:40:15 +02:00
Martin Pulec
69a41c602c Lavd: added conversion RG48->RGB
Just to have complete transformation matrix to RGB.
2020-05-19 13:41:21 +02:00
Martin Pulec
26bfee02ba Lavd: added/enabled conversions to RGBA 2020-05-19 13:28:42 +02:00
Martin Pulec
c20408a3a2 Video frame: correctly compute frame size for I420 2020-03-03 08:02:46 +01:00
Martin Pulec
c05c4ecf38 Lavc: support for I420 2020-03-02 17:12:59 +01:00
Martin Pulec
6739e7e11f Testcard: support for I420 2020-02-21 15:08:33 +01:00