1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

108645 Commits

Author SHA1 Message Date
Marvin Scholz
fed841f6f9 fftools/ffmpeg_opt: Use av_err2str
This simplifies the code as there is no other place the error buffer
is needed, so the av_err2str helper macro can be used.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-10-14 12:19:13 +02:00
Marvin Scholz
88635c7f95 fftools/ffprobe: Use av_err2str
av_err2str which is a wrapper for av_strerror already calls
strerror_r if available and if not has a fallback for the other
error codes that would be handled by that, so manually calling
strerror again if it fails is not necessary.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-10-14 12:19:13 +02:00
Marvin Scholz
3eab2c1af1 fftools/cmdutils: Use av_err2str
av_err2str which is a wrapper for av_strerror already calls
strerror_r if available and if not has a fallback for the other
error codes that would be handled by that, so manually calling
strerror again if it fails is not necessary.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-10-14 12:19:13 +02:00
Andreas Rheinhardt
25e1986e68 avcodec/vp8: Add const where appropriate
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-13 23:42:25 +02:00
Anton Khirnov
9e8a327e68 lavfi/src_avsynctest: set video frame durations
This filter produces CFR video output.
2022-10-13 10:19:13 +02:00
Anton Khirnov
cdc4d99089 lavfi/vf_minterpolate: set output frame durations
This filter produces CFR output.
2022-10-13 10:19:13 +02:00
Anton Khirnov
c9508a019d lavfi/vf_frei0r: set frame durations for frei0r_src
This source produces CFR output.
2022-10-13 10:19:13 +02:00
Anton Khirnov
d1526f4dac lavfi/vf_deinterlace_qsv: set output frame durations 2022-10-13 10:19:13 +02:00
Anton Khirnov
4b2f380e0a lavfi/vf_framepack: properly set output duration for framesequence output
Output has to be CFR in this case.
2022-10-13 10:19:13 +02:00
Anton Khirnov
fa5730d84a lavfi/vf_estdif: set frame durations 2022-10-13 10:19:13 +02:00
Anton Khirnov
62bfcc340f lavfi/vf_estdif: drop a redundant context variable
It is only used in filter() and always set immediately before filter()
is called, so it can be passed as a parameter instead.
2022-10-13 10:19:13 +02:00
Anton Khirnov
2feeb6d103 lavfi/vf_estdif: drop an unused function parameter 2022-10-13 10:19:13 +02:00
Anton Khirnov
984c751b12 lavfi/vf_decimate: use inverse of output framerate as timebase
This filter currently keeps the input timebase, but produces CFR output.
It is thus simpler to use 1/output fps as the output timebase.

Also, set output frame durations.
2022-10-13 10:19:13 +02:00
Anton Khirnov
0ce7a86e31 lavfi/vf_coreimage: set frame durations
This filter is supposed to produce CFR output.
2022-10-13 10:19:13 +02:00
Anton Khirnov
19c701fac8 lavfi/vf_tinterlace: set frame durations
This filter is supposed to produce CFR output.
2022-10-13 10:19:13 +02:00
Anton Khirnov
7c299c1178 lavfi/settb: rescale input frame durations 2022-10-13 10:19:13 +02:00
Anton Khirnov
476c90c207 lavfi/f_drawgraph: forward input frame durations 2022-10-13 10:19:13 +02:00
Marvin Scholz
3ce1616106 ffmpeg: Make find_stream_info behave like a normal per-file option
Currently it would essentially change the find_stream_info setting for
the file it was specified for and all following files, which is unusual
and somewhat unexpected behaviour for a per-file option and not even
documented to behave like this.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-10-13 10:19:13 +02:00
Rémi Denis-Courmont
96a83ceea4 riscv: fix scalar product initialisation
VSETVLI xd, x0, ...' has rather nonobvious semantics:
- If xd is x0, then it preserves the current vector length.
- If xd is not x0, it sets the vector length to the supported maximum.

Also somewhat confusingly, while VMV.X.S always does its thing
regardless of the selected vector length, VMV.S.X does _nothing_ if the
selected vector length is zero.

So the current code breaks fails to initialise the accumulator if we
are unlucky to have a selected vector length of zero on entry. Fix it
by forcing the vector length to one.
2022-10-13 10:17:38 +02:00
Andreas Rheinhardt
28ac2279ad avcodec/snow: Move initializing MotionEstContext to snowenc.c
Only used by the encoder.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:58:15 +02:00
Andreas Rheinhardt
2a7ee6dda0 configure: Add (dnxhd|snow)_encoder->videodsp dependency
These encoders currently rely on an implicit dependency via mpegvideo.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
1ed41ec343 configure: Remove unnecessary wmavoice->mdct dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
fe4cb1f718 configure: Remove unnecessary qdm2_decoder->mdct dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
faf16c5ca8 configure: Remove unnecessary binkaudio dependencies
The binkaudio decoders don't need mdct or sinewin at all;
and binkaudio_dct doesn't need rdft directly (but nevertheless
uses it indirectly via dct).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
7260e69a61 configure: Remove unnecessary me_cmp dependencies
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
c672751e33 configure: Add mpegvideoenc->fdctdsp dependency
Currently masked by an unnecessary me_cmp->fdctdsp dependency.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
8dcc1eef75 configure: Add missing prores_(aw|ks)_encoder->fdctdsp dependencies
Fixes builds with --disable-everything --disable-faan.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Andreas Rheinhardt
382083caed configure: Remove dependencies of inexistant rtjpeg decoder
rtjpeg is a mode of nuv and not a decoder in its own right.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-12 10:57:24 +02:00
Leo Izen
479747645f avutil/pixfmt.h: add native-endian RGB32F and RGBA32F formats
Add an AV_PIX_FMT_NE macro for RGB32FBE/RGB32FLE and also one for
RGBA32FBE/RGBA32FLE for packed 32-bit float RGB samples, and also
packed 32-bit float RGBA samples, respectively.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Leo Izen <leo.izen@gmail.com>
2022-10-11 16:31:15 -03:00
Paul B Mahol
504fbc2149 avfilter/af_aspectralstats: allow to select subset of measurements 2022-10-11 18:14:06 +02:00
Andreas Rheinhardt
37ee36f689 checkasm/idctdsp: Use declare_func_emms only when needed
There is no MMX code for (add|put|put_signed)_pixels_clamped
since commit bfb28b5ce8, so use
declare_func instead of declare_func_emms() to also test that
we are not in MMX mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-11 14:18:54 +02:00
Andreas Rheinhardt
5102b98b7a checkasm/llviddspenc: Use declare_func_emms only when needed
There is no MMX code for diff_bytes since commit
230ea38de1, so use declare_func
instead of declare_func_emms() to also test that we are not
in MMX mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-11 14:18:54 +02:00
Andreas Rheinhardt
e814569c8d checkasm/huffyuvdsp: Use declare_func_emms only when needed
There is no MMX code for add_int16 since commit
4b6ffc2880, so use declare_func
instead of declare_func_emms() to also test that we are not
in MMX mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-11 14:18:54 +02:00
Andreas Rheinhardt
cd8a33bcce checkasm/llviddsp: Be strict about MMX
There is no MMX code for llviddsp after commit
fed07efcde, so use declare_func
instead of declare_func_emms() to also test that we are not
in MMX mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-11 14:18:54 +02:00
Andreas Rheinhardt
b4e2d67636 checkasm/pixblockdsp: Be strict about MMX
There is no MMX code for pixblockdsp after commit
92b5800277, so use declare_func
instead of declare_func_emms() to also test that we are not
in MMX mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-11 14:18:54 +02:00
Andreas Rheinhardt
42921190cb checkasm/audiodsp: Be strict about MMX
There is no MMX code for audiodsp after commit
3d716d38ab, so use declare_func
instead of declare_func_emms() to also test that we are not
in MMX mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-11 14:18:54 +02:00
Andreas Rheinhardt
18afaa20f1 checkasm/blockdsp: Be strict about MMX
There is no MMX code for blockdsp after commit
ee551a21dd, so use declare_func
instead of declare_func_emms() to also test that we are not
in MMX mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-11 14:18:54 +02:00
Andreas Rheinhardt
f224c195e0 checkasm/vc1dsp: Use declare_func_emms only when needed
There is no MMX code for vc1_inv_trans_8x8 or
vc1_unescape_buffer, so use declare_func instead of
declare_func_emms() to also test that we are not in MMX
mode after return.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-11 14:18:54 +02:00
Anton Khirnov
adb927fa7a lavc/encode: combine setting no-delay pts for video/audio 2022-10-11 11:59:11 +02:00
Anton Khirnov
8789720d28 lavc/encode: generalize a check for setting dts=pts
DTS may be different from PTS only if both of these are true:
- the codec supports reordering
- the encoder has delay
2022-10-11 11:57:52 +02:00
Reimar Döffinger
38cd829dce
aarch64: Implement stack spilling in a consistent way.
Currently it is done in several different ways, which
might cause needless dependencies or in case of
tx_float_neon.S is incorrect.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2022-10-11 09:12:02 +02:00
Andreas Rheinhardt
e10e27a2ea avcodec/opustab: Avoid indirection to access ff_celt_window
Currently, it is accessed via a pointer (ff_celt_window)
exported from opustab.h which points inside a static array
(ff_celt_window_padded) in opustab.h. Instead export
ff_celt_window_padded directly and make opustab.h
a static const pointer pointing inside ff_celt_window_padded.
Also mark all the declarations in opustab.h as hidden,
so that the compiler knows that ff_celt_window has a fixed
offset from the code even when compiling position-independent
code.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-10 14:10:49 +02:00
Andreas Rheinhardt
a60befce40 avutil/attributes_internal: Add visibility pragma
GCC 4.0 not only added a visibility attribute, but also
a pragma to set it for a whole region of code.*
This commit exposes this via macros.

*: See https://gcc.gnu.org/gcc-4.0/changes.html

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-10 13:43:59 +02:00
Haihao Xiang
f3b5277057 lavc/qsvenc_hevc: use open GOP by default
HEVC spec has CRA frame which allows random access with open GOP, hence
it can achieve higher compression efficiency.

Removing the entry was suggested by Andreas

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-10-10 11:10:13 +08:00
Fei Wang
56a52af12b lavc/qsv: add support for decoding & encoding 12bit content
AV_PIX_FMT_P012, AV_PIX_FMT_Y212 and AV_PIX_FMT_XV36 are used in
FFmpeg and MFX_FOURCC_P016, MFX_FOURCC_Y216, and MFX_FOURCC_Y416 are used
in the SDK

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-10-10 09:31:34 +08:00
Fei Wang
201cb35061 lavu/hwcontext_qsv: add support for 12bit content on Linux
P012, Y212 and XV36 are used for 12bit content in FFmpeg VAAPI, so
these formats should be used in FFmpeg QSV too, however the SDK only
declares support for P016, Y216 and Y416. So this commit fudged mappings
between AV_PIX_FMT_P012 and MFX_FOURCC_P016, AV_PIX_FMT_Y212 and
MFX_FOURCC_Y216, AV_PIX_FMT_XV36 and MFX_FOURCC_Y416.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-10-10 09:31:34 +08:00
Haihao Xiang
1898dbddd5 lavc/qsv: add support for decoding & encoding 10bit 4:4:4 content
AV_PIX_FMT_XV30 is used in FFmpeg and MFX_FOURCC_Y410 is used in the
SDK.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-10-10 09:31:34 +08:00
Haihao Xiang
aba25b391c lavu/hwcontext_qsv: add support for 10bit 4:4:4 content on Linux
XV30 is used for 10bit 4:4:4 content in FFmpeg VAAPI, so XV30 should be
used for 10bit 4:4:4 content in FFmpeg QSV too because QSV is based on
VAAPI on Linux. However the SDK only declares support for Y410 but does
nothing with the alpha in Y410, so this commit fudged a mapping between
AV_PIX_FMT_XV30 and MFX_FOURCC_Y410.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-10-10 09:31:34 +08:00
Haihao Xiang
3f28116ea2 lavc/qsv: specify Shift for each format too
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-10-10 09:31:34 +08:00
Haihao Xiang
1496e7c173 lavu/hwcontext_qsv: specify Shift for each format
We can't get Shift from bit depth for some formats in the SDK. For
example, bit depth is 10, however Shift is 0 for Y410 (XV30 in FFmpeg).
In order to support these formats in the next commits, this patch
specified Shift for each format

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-10-10 09:31:34 +08:00