1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
Commit Graph

107636 Commits

Author SHA1 Message Date
Anton Khirnov
eede1d2927 lavu/frame: allow calling av_frame_make_writable() on non-refcounted frames
This is an easy way to make a refcounted frame from a non-refcounted
one.
2022-08-02 10:44:37 +02:00
Andreas Rheinhardt
d9cd192ddd fftools/ffmpeg_opt: Fix copyinkf
Broken in 9c2b800203.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 09:02:11 +02:00
Andreas Rheinhardt
771d8937af avcodec/alpha/me_cmp_alpha: Remove commented-out function
This function is bitrotten: It uses different parameters
than the corresponding ASM functions which replaced it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 08:40:58 +02:00
Andreas Rheinhardt
088382a434 avcodec/alpha/me_cmp_alpha: Use proper me_cmp_func type
ea41e6d637 forgot
the int->ptrdiff_t switch for the stride. Libav didn't
do it because Libav had already dropped support for Alpha
at that point.
Only compilation has been tested for this commit.

(It might be that the ASM-versions of me_cmp_func functions
need to be updated as well.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 08:40:58 +02:00
Andreas Rheinhardt
fe211aebbf fate/lavf-image: Disable file checksums for exr tests
The generated files are endian-dependent, so no checksums
may be part of the ref files.

Fixes ticket #9854.

Tested-by: Sebastian Ramacher <sramacher@debian.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 02:30:26 +02:00
Andreas Rheinhardt
4fb8741c46 tests/fate-run: Allow to skip file checksums for lavf_image
The output file (even the filesize) of the recently added
EXR tests depends on the endianness; therefore checksums
of these files must not be part of the ref file. Therefore
this commit adds an option (unused for now) to disable these
checksums on a per-test basis.

In order to avoid having to check twice, the checksum and
the filesize info are moved to immediately follow one another;
this results into updates to the ref files of all lavf-image tests.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-02 02:27:05 +02:00
James Almer
db9fd78bd7 avcodec/aacdec_fixed: also clip samples on the second channel for stereo HE-AAC
Fixes outputting silence on the second channel when decoding Parametic Stereo
HE-AAC.

Closes ticekt #3361.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-08-01 20:25:09 -03:00
James Almer
9fb80bf760 avcodec/aacdec_fixed: add missing priv_class
This enables the same input options as the float decoder.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-08-01 20:25:09 -03:00
Martin Storsjö
8e6759f10c configure: Check for DXGI_OUTDUPL_FRAME_INFO for the ddagrab filter
The DXGI_OUTDUPL_FRAME_INFO type isn't available in Windows API
subsets other than "desktop", while the IDXGIOutput1 interface is
available for all API subsets.

This fixes compilation for UWP/"Windows Store" configurations (and
older API subsets like Windows Phone).

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-08-01 15:41:25 +03:00
Andreas Rheinhardt
1368b5a725 avcodec/ttmlenc: Use string literal macro for default namespacing
Fixes -Werror=format-security build failures when building with
disabled optimizations and (according to fate.ffmpeg.org also with
several other old GCC versions).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:57:23 +02:00
Andreas Rheinhardt
e725c5e24e avcodec/exr: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:38:55 +02:00
Andreas Rheinhardt
9ea03f5678 avcodec/diracdec: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:38:37 +02:00
Andreas Rheinhardt
597dc96736 avcodec/dvdec: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:38:20 +02:00
Andreas Rheinhardt
5ad29e1590 avcodec/dxv: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:38:11 +02:00
Andreas Rheinhardt
a18c372390 avcodec/jpeg2000dec: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:37:27 +02:00
Andreas Rheinhardt
0980d3801d avcodec/magicyuv: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:37:12 +02:00
Andreas Rheinhardt
0eae123dbd avcodec/proresdec2: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:22:53 +02:00
Andreas Rheinhardt
9c4f7d1e88 avcodec/vp8: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually)
a data race, so it must not happen. So only use a pointer to const
to access the main context.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:22:14 +02:00
Andreas Rheinhardt
94dd8f421e avcodec/wavpack: Constify slice threads' ptr to main context
Modifying the main context from a slice thread is (usually) a data race,
so it must not happen. So only use a pointer to const to access
the main context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:21:51 +02:00
Andreas Rheinhardt
4368e86a02 avcodec/vp9dec: Constify VP9TileData->VP9Context pointer target
This is possible now that ff_thread_await_progress() accepts
a const ThreadFrame*.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:18:26 +02:00
Andreas Rheinhardt
0eb399ac39 avcodec: Constify ThreadFrames if possible
This is possible now that ff_thread_await_progress() accepts
a const ThreadFrame*.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 04:15:28 +02:00
Andreas Rheinhardt
34276b815b avcodec/motion_est: Constify pointers to frame data
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:56:32 +02:00
Andreas Rheinhardt
209a11053f avcodec/mpegvideodsp: Constify src pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:44:16 +02:00
Andreas Rheinhardt
966fc1230a avcodec/mpegvideoencdsp: Allow pointers to const where possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:32:40 +02:00
Andreas Rheinhardt
abb85429f3 avcodec/me_cmp: Constify me_cmp_func buffer parameters
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:31:53 +02:00
Andreas Rheinhardt
e7cb7c762a avcodec/cfhdencdsp: Constify input pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:18:19 +02:00
Andreas Rheinhardt
dc3e25e4d3 avcodec/lossless_videoencdsp: Constify src sub_left_predict
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:16:35 +02:00
Andreas Rheinhardt
af43da3e4d avcodec/videodsp: Constify buf in VideoDSPContext.prefetch
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:14:34 +02:00
Andreas Rheinhardt
2793e4353f avcodec/half2float: Constify arrays in half2float()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:12:55 +02:00
Andreas Rheinhardt
145236741d avcodec/mpegvideo: Inline values in ff_update_block_index()
This is possible for most of the callers, because e.g. only
the MPEG-4 decoder can have bits_per_raw_sample > 8.
Also most mpegvideo-based codecs are 420 only.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:53:19 +02:00
Andreas Rheinhardt
dd20ebb2ca avcodec/pngenc: Don't cast const away unnecessarily
Possible since 529a9893d7.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:17:18 +02:00
Andreas Rheinhardt
7e41f95dce avcodec/snow: Remove unused halfpel_plane
Committed in 5be3a81871 in
an unfinished state; never used or finished and always disabled.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:16:54 +02:00
Andreas Rheinhardt
e4547c136a avcodec/pnmdec: Fix indentation
Forgotten after ff1450e449.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:14:36 +02:00
Andreas Rheinhardt
22ca2ef018 avcodec/pnmdec, pnm_parser: Improve const-correctness
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:14:05 +02:00
Andreas Rheinhardt
d8388e1b4e avcodec/ilbcdec: Move transient GetBitContext from ctx to stack
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:13:22 +02:00
Andreas Rheinhardt
86460b366c avcodec/ilbcdec: Fix const correctness
Also constify everything that can be constified.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:12:03 +02:00
Andreas Rheinhardt
e86b8ca7f1 avcodec/cinepakenc: Avoid casting const away
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:11:56 +02:00
Andreas Rheinhardt
941a82b57c avcodec/dxv: Don't cast const away unnecessarily
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:11:06 +02:00
Andreas Rheinhardt
e207f75ba8 avcodec/diracdsp: Don't cast const away unnecessarily
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:10:46 +02:00
Andreas Rheinhardt
0213363175 avcodec/fitsenc: Don't cast const away unnecessarily
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:10:17 +02:00
Andreas Rheinhardt
90c38612f8 avcodec/gif: Remove redundant cast
Possible since 529a9893d7.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:10:08 +02:00
Andreas Rheinhardt
da668fa7d2 swscale/rgb2rgb: Don't cast const away
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:09:52 +02:00
Andreas Rheinhardt
41e5555a00 avcodec/xwdenc: Don't modify input frame
These modifications were actually meant to be applied to
the coded_frame, yet 08b31a72db
changed this and so this code has not been removed when coded_frame
has been removed in 11bc790893.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 01:08:57 +02:00
Andreas Rheinhardt
f654aa8a09 tests/ref/fate/filter-metadata-cropdetect[12]: Fix ref file
Necessitated by 6ca43a9675
and 425b309fa4.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-30 22:29:10 +02:00
Andreas Rheinhardt
f0dd4ab055 avfilter/vf_cropdetect: Remove set-but-unused variable
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-30 22:14:26 +02:00
Andreas Rheinhardt
a2d7da01e8 avcodec/threadframe: Constify the frame in ff_thread_await_progress
It is safe to call it on a const ThreadFrame*.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-30 22:09:59 +02:00
Andreas Rheinhardt
92e702863c avcodec/proresdata: Move data only used by ff_prores_ks_encoder to it
In this case, this allows to inline the initial run_cb and lev_cb
values.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-30 22:09:05 +02:00
Andreas Rheinhardt
879eed5555 avcodec/ttmlenc: Deduplicate ttml_default_namespacing string
String literals are allowed to be deduplicated (and toolchains
are already capable of doing so), yet the same is not allowed
for named arrays (even when they contain strings). Therefore
use a const char *const pointing to an unnamed string literal
for ttml_default_namespacing.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-30 22:08:57 +02:00
James Almer
6ca1690643 avcodec/alac: don't fail if channels aren't set during init() when extradata is valid
The decoder is meant to use it as a fallback if the value in extradata is
invalid.

Regression since d199099be.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-07-30 09:21:19 -03:00
James Almer
6406d5e430 avcodec/aacdec: print a log message when treating mono HE-AAC as stereo
Since this behavior is intentional, use the VERBOSE level instead of WARNING as
it's nothing the user should worry about.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-07-30 09:21:19 -03:00