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.
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
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.
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).
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.
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".
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.
- 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
+ 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
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.
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).