1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

5726 Commits

Author SHA1 Message Date
James Almer
86157f5a25 avutil/tx: use llrintf() to convert a float into a 64 bit integer
Should fix fate failures on Windowx x86 targets, where long is 32 bits.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-08 14:24:49 -03:00
James Almer
d5c7970a27 avutil/tx: use a lower log level for the debug messages
The amount of lines printed is too high for the verbose level, and the debug
level is a better fit for their content.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-08 14:08:05 -03:00
Marvin Scholz
2508e846a8 avutil/dict: Improve documentation
Mostly consistent formatting and consistently ordering of
warnings/notes to be next to the description.

Additionally group the AV_DICT_* macros.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-11-06 08:26:50 +01:00
Marvin Scholz
3101b8afb3 avutil/dict: Use av_dict_iterate in av_dict_get_string
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-11-06 08:26:50 +01:00
Marvin Scholz
3c2050b749 avutil/dict: Use av_dict_iterate in av_dict_copy
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-11-06 08:26:50 +01:00
Marvin Scholz
5f7c5a0bd7 avutil/dict: Use av_dict_iterate in av_dict_get
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-11-06 08:26:50 +01:00
Marvin Scholz
9dad237928 avutil/dict: Add av_dict_iterate
This is a more explicit iteration API rather than using the "magic"
av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX) which is not really
trivial to grasp what it does when casually reading through code.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-11-06 08:26:48 +01:00
James Darnley
0f252dfa95 avutil/tests/cpu: print the avx512icl flag 2022-11-04 19:37:46 +01:00
James Almer
6228ba141d avutil/channel_layout: add a 7.1(top) channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-03 19:39:45 -03:00
James Almer
83e918de71 avutil/channel_layout: add a cube channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2022-10-30 16:18:30 -03:00
Andreas Rheinhardt
f8efd890bf avutil/tx_template: Move function pointers to const memory
This can be achieved by moving the AVOnce out of the structure
containing the function pointers; the latter can then be made
const.
This also has the advantage of eliminating padding in the structure
(sizeof(AVOnce) is four here) and allowing the AVOnces to be put
into .bss (dependening upon the implementation).

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:30:10 +02:00
Andreas Rheinhardt
188216581b avutil/tx_template: Avoid code duplication
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:30:10 +02:00
Andreas Rheinhardt
2af5f55b2e avutil/tx_template: Don't waste space for inexistent factors
It is possible to avoid the factors array for the power-of-two
tables for which said array is unused by using a different
structure for initialization for power-of-two tables than for
non-power-of-two-tables. This saves 3*15*16B from .data.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:29:41 +02:00
Andreas Rheinhardt
d7c3e52fbf avutil/integer: Use '|' instead of '+' where it is more natural
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 20:11:20 +02:00
Andreas Rheinhardt
9a6cdd1ba3 avutil/integer: Fix undefined left shifts of negative numbers
Affected the integers FATE-test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 18:04:24 +02:00
Andreas Rheinhardt
f49375f28f avutil/aes: Don't use out-of-bounds index
Up until now, av_aes_init() uses a->round_key[0].u8 + t
as dst of memcpy where it is intended for t to greater
than 16 (u8 is an uint8_t[16]); given that round_key itself
is an array, it is actually intended for the dst to be
in a latter round_key member. To do this properly,
just cast a->round_key to unsigned char*.

This fixes the srtp, aes, aes_ctr, mov-3elist-encrypted,
mov-frag-encrypted and mov-tenc-only-encrypted
FATE-tests with (Clang-)UBSan.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 16:28:14 +02:00
Andreas Rheinhardt
73930e4f93 avutil/aes: Don't use misaligned pointers
The AES code uses av_aes_block, a union consisting of
uint64_t[2], uint32_t[4], uint8_t[4][4] and uint8_t[16].
subshift() performs byte-wise manipulations of two av_aes_blocks,
but when encrypting, it does so with a shift of two bytes;
more precisely, it uses
"av_aes_block *s1 = (av_aes_block *) (s0[0].u8 - s)"
and lateron uses the uint8_t[16] member to access s0.
Yet av_aes_block requires to be suitably aligned for
the uint64_t[2] member, which s0[0].u8 - 2 is certainly
not. This is in violation of 6.3.2.3 (7) of C11. UBSan
reports this in the aes_ctr, mov-3elist-encrypted,
mov-frag-encrypted, mov-tenc-only-encrypted and srtp
tests.
Furthermore, there is another issue here: The pointer points
outside of s0; this works, because all the accesses lateron
use an index >= 3. (Clang-)UBSan reports this as
"runtime error: index -2 out of bounds for type 'uint8_t[16]'".

This commit fixes both of these issues: The latter issue
is fixed by applying an offset of "+ 3" during the cast
and subtracting this from the indices used lateron.
The former issue is solved by not casting to av_aes_block*
at all; instead simply cast to unsigned char*.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 16:28:14 +02:00
Anton Khirnov
f66e794672 lavu/thread: add an internal function for setting thread name
Linux-only for now.
2022-10-24 02:00:31 +02:00
Carl Eugen Hoyos
882a17068f lavu/hwcontext_vaapi: Fix type specifier for uintptr_t
Fixes a format specifier warning on x86_32 Linux.
Fixes part of ticket #9986.
2022-10-23 20:51:42 +02:00
Marvin Scholz
3bd0bf76fb avutil/samplefmt: document missing argument 2022-10-17 09:56:47 +02:00
Marvin Scholz
3973d4fbc7 avutil/aes_ctr: document some missing arguments 2022-10-17 09:56:47 +02:00
Marvin Scholz
0baa6871ac avutil/aes: document some missing arguments 2022-10-17 09:56:47 +02:00
Marvin Scholz
a76d5fecf3 avutil/imgutils: document some missing arguments 2022-10-17 09:56:47 +02:00
Marvin Scholz
ed2aa4e692 avutil/crc: Add doxy for missing arguments 2022-10-17 09:56:47 +02:00
Marvin Scholz
96f89cdc87 avutil/des: Add doxy for missing arguments
Additionally reorder so that the arguments list matches the
order of the arguments in the function declaration.
2022-10-17 09:56:47 +02:00
Marvin Scholz
023966d2f8 avutil/avstring: Add doxy for missing argument 2022-10-17 09:56:47 +02:00
Marvin Scholz
20a947f479 avutil/frame: Add doxy for missing argument 2022-10-17 09:56:47 +02:00
Marvin Scholz
3dea9adc67 avutil/rc4: Add doxy for missing arguments 2022-10-17 09:56:47 +02:00
Marvin Scholz
0e7ce0d5e7 avutil/uuid: Remove bogus doxy return doc
The function returns void and no error code.
2022-10-17 09:56:47 +02:00
Marvin Scholz
c4ff708c81 avutil/parseutils: Use inline code and properly escape
For some reason doxygen needs the % to be escaped here, except for the
%% in the inline code…
2022-10-17 09:56:47 +02:00
Marvin Scholz
990340377b avutil/parseutils: Add doxy for missing arguments 2022-10-17 09:56:47 +02:00
Marvin Scholz
8521a691b9 avutil/hwcontext: Add doxy for missing argument 2022-10-17 09:56:47 +02:00
Marvin Scholz
8bac3902b0 avutil/lfg: Minor doxy improvements
Use inline code for sizeof and use proper @return directive.
2022-10-17 09:56:47 +02:00
Marvin Scholz
6a1ad7a752 avutil/lfg: Add doxy for missing argument 2022-10-17 09:56:47 +02:00
Marvin Scholz
a679b87570 avutil/file: Add doxy for missing arguments 2022-10-17 09:56:47 +02:00
Marvin Scholz
b850347a89 avutil/eval: Add doxy for missing arguments 2022-10-17 09:56:47 +02:00
Marvin Scholz
27dbc9e724 avutil/detection_bbox: Add doxy for missing argument 2022-10-17 09:56:47 +02:00
Marvin Scholz
436879a203 avutil/channel_layout: Document missing arguments 2022-10-17 09:55:19 +02:00
Marvin Scholz
f824388c33 avutil/channel_layout: Use inline code for Doxy
This avoids Doxygen to interpret <i> and others that look like XML tags
as those, fixing a warning about unknown tags.
2022-10-17 09:55:19 +02:00
Marvin Scholz
e3c5b8c610 avutil/camellia: Fix doxy @param typo 2022-10-17 09:55:19 +02:00
Marvin Scholz
58b86d8b68 avutil/bprint: Improve doxy documentation
Declare proper group, add the file to that group,
group the defines and document them.

Use lists to represents lists of cases.
2022-10-17 09:55:19 +02:00
Marvin Scholz
88e78ec6a8 avutil/csp: Fix bogus doxy filename
Separate the blocks to make the grouping easier to grasp,
add the file properly to the group and fix the file description
incorrectly used as filename, fixing the following doxy warning:

  warning: the name 'Colorspace' supplied as the argument in
  the \file statement is not an input file
2022-10-17 09:55:19 +02:00
Marvin Scholz
6938ddb167 avutil/stereo3d: Add file to doxy group
This way the related file will be properly grouped with its
corresponding group like it's done in other places in the doxy.
2022-10-17 09:55:19 +02:00
Marvin Scholz
06bcbe1477 avutil/stereo3d: consolidate group doxy
Make it a bit easier to grasp the grouping when not
unnecessarily splitting comment blocks.

Additionally do not try to add lavu_video_stereo3d to itself, resolving
the following doxy warning:
  warning: Refusing to add group lavu_video_stereo3d to itself
2022-10-17 09:55:19 +02:00
Marvin Scholz
7e8d974487 avutil/spherical: Add file to doxy group
This way the related file will be properly grouped with its
corresponding group like it's done in other places in the doxy.
2022-10-17 09:55:19 +02:00
Marvin Scholz
24b610e366 avutil/spherical: consolidate group doxy
Make it a bit easier to grasp the grouping when not
unnecessarily splitting comment blocks.

Additionally do not try to add lavu_video_spherical to itself, resolving
the following doxy warning:
  warning: Refusing to add group lavu_video_spherical to itself
2022-10-17 09:55:19 +02:00
Marvin Scholz
71c45b8a44 avutil/display: Add file to doxy group
This way the related file will be properly grouped with its
corresponding group like it's done in other places in the doxy.
2022-10-17 09:55:19 +02:00
Marvin Scholz
9570a833a0 avutil/display: consolidate group doxy
Make it a bit easier to grasp the grouping when not
unnecessarily splitting comment blocks.

Additionally do not try to add lavu_video_display to itself, resolving
the following doxy warning:
  warning: Refusing to add group lavu_video_display to itself
2022-10-17 09:55:19 +02:00
Marvin Scholz
c2c4ef6ae4 avutil/aes_ctr: Add proper doxy group
So it will be properly listed along the other crypto modules
in the documentation.
2022-10-17 09:55:19 +02:00
Marvin Scholz
c468a8c04f avutil/twofish: Fix doxy @param typo 2022-10-17 09:51:47 +02:00