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

45384 Commits

Author SHA1 Message Date
Andreas Rheinhardt
c0d7d5f595 avcodec/qsv: Remove unused ff_qsv_level_to_mfx()
Unused since 00d0a4aa9e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-08 18:40:46 +02:00
Andreas Rheinhardt
afc95a10ac avcodec/h264dsp, h264idct: Fix lengths of array parameters
Fixes many -Warray-parameter warnings from GCC 11.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-08 17:44:57 +02:00
Andreas Rheinhardt
ab97d163b6 avcodec/aacps: Fix length of array in function definition
hybrid2_re() has a parameter declared as "const INTFLOAT filter[8]",
although the actual argument for said parameter only has seven elements;
the code itself only uses seven elements, so change the parameter.

Fixes a -Wstringop-overread warning with GCC 11.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-08 17:44:57 +02:00
Timo Rothenpieler
ac0408522a avcodec/nvenc: make aware of SDK 11.1 driver requirements 2021-08-08 02:00:38 +02:00
Ricardo Monteiro
e56f6e59b6 avcodec/nvenc: add chroma qp offset support
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-08-08 01:56:32 +02:00
Andreas Rheinhardt
5ad436fcb9 avcodec/ass_split: Rename ff_ass_split_dialog2->ff_ass_split_dialog
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-08 00:13:57 +02:00
Andreas Rheinhardt
7f1edcb4ef avcodec/ass_split: Remove unused ff_ass_split_dialogue()
Unused since 1f63665ca5.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-07 23:45:32 +02:00
Andreas Rheinhardt
127da193d4 avcodec/acelp_vectors: Add missing brackets
Before 3793caa5e2 the code was
"if (...) do { ... } while (...);". After said commit this became
"if (...) av_assert0(...); do { ... } while (...);", i.e. the loop
is always executed. This commit changes the logic to what it was before
said commit. Notice that the condition is always true in FATE, so no
changes are necessary there.

This fixes a -Wmisleading-indentation warning from GCC 11.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-07 21:51:42 +02:00
James Almer
e01d306c64 avcodec/utils: don't return negative values in av_get_audio_frame_duration()
In some extrme cases, like with adpcm_ms samples with an extremely high channel
count, get_audio_frame_duration() may return a negative frame duration value.
Don't propagate it, and instead return 0, signaling that a duration could not
be determined.

Fixes ticket #9312

Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-06 21:22:49 -03:00
Michael Niedermayer
9bc32d7c4b avcodec/exr: Check ac_count
Fixes: signed integer overflow: -9223372036854775808 * 2 cannot be represented in type 'long long'
Fixes: 36244/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6090656186499072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-08-06 21:04:43 +02:00
James Almer
82be9f2777 avcodec/hevc_sei: parse and export Film Grain Characteristics SEI messages
Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-06 09:56:44 -03:00
James Almer
794e15fd54 cbs_h265: add support for Film Grain Characteristics SEI message
Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-06 09:56:44 -03:00
James Almer
6b594ba5d1 avcodec/mfenc: remove usage of avctx->pkt_timebase
The field is documented to be for decoding only.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-06 09:38:35 -03:00
Andreas Rheinhardt
2146b65553 avutil/internal: Move MAKE_ACCESSORS to its only user
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 20:05:54 +02:00
Andreas Rheinhardt
549502868d Move ff_tlog() from lavc/internal.h to lavu/internal.h
It is also used by libavfilter and it is only natural to define it
alongside ff_dlog().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 20:02:35 +02:00
Andreas Rheinhardt
b75dc8bd70 avcodec/huffman: Use logcontext instead of AVCodecContext
Said AVCodecContext is only used for logging; it furthermore avoids
an avcodec.h inclusion.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 19:58:10 +02:00
Andreas Rheinhardt
a449fb35ca avcodec/fft-internal: Make it a standalone header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 19:56:40 +02:00
Andreas Rheinhardt
211619ad7f avcodec: Remove the FFT_FIXED_32 define
Since the removal of the 16-bit FFT said define is unnecessary as
FFT_FIXED_32 is always !FFT_FLOAT. But one wouldn't believe it when
looking at the code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 19:46:33 +02:00
Andreas Rheinhardt
763c501432 avcodec/fft-internal: Remove unused macros
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 19:02:16 +02:00
Andreas Rheinhardt
7bad2a61d8 avcodec/mips/constants: Include intfloat.h in constants.h
Don't rely on the user including it (mostly indirectly).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 19:00:53 +02:00
Haihao Xiang
65fdc0e589 lavc/qsvenc: pass the color properties to the SDK
Otherwise the color properties won't be encoded into the bitstream
header

Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-04 10:06:26 -03:00
Haihao Xiang
c8cfe67694 lavc/qsvdec: update color properties in codec context
User may get color properties from the SDK via VIDEO_SIGNAL_INFO extbuf

Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-04 10:04:53 -03:00
maryam ebr
7150f95756 avcodec/dnxhddec: check and propagate function return value
Similar to CVE-2013-0868, here return value check for 'init_vlc' is needed.
crafted DNxHD data can cause unspecified impact.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-03 10:39:37 -03:00
Lynne
c8b1f2bcc4
packet: initialize time_base field to (0, 1) instead of (0, 0)
Forget rational or irrational numbers, division by zero is undefined.
2021-08-02 14:45:47 +02:00
Lynne
a1a0fddfd0
avpacket: ABI bump additions
This commit adds a long-requested by API users opaque fields for
AVPacket, as well as a time_base field.
2021-08-02 14:30:52 +02:00
Brad Hards
1f58503013 libavcodec/libx265: add user data unregistered SEI encoding
MISB ST 0604 and ST 2101 require user data unregistered SEI messages
(precision timestamps and sensor identifiers) to be included. That
currently isn't supported for libx265. This patch adds support
for user data unregistered SEI messages in accordance with
ISO/IEC 23008-2:2020 Section D.2.7

The design is based on nvenc, with support finished up at
57de80673c

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-08-01 12:07:54 +01:00
Michael Niedermayer
75a099fc73 avcodec/aaccoder: Add minimal bias in search_for_ms()
Fixes: floating point division by 0
Fixes: Ticket8218

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-31 22:04:07 +02:00
Gyan Doshi
b9176dbfb7 avcodec/noise_bsf: restore dropamount for backwards compatibility 2021-07-30 17:14:43 +05:30
Gyan Doshi
23da5caf09 avcodec/noise_bsf: add expr support 2021-07-29 22:05:11 +05:30
Jiaxun Yang
2323d3a923 avcodec/mips: cabac.h provide fallback for wsbh instruction
wsbh is only avilable for MIPS R2+.
Provide a fallback for older processors.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-28 23:31:48 +02:00
Jiaxun Yang
1042039ccd avcodec/mips: Use MMI marcos to replace Loongson3 instructions
Loongson3's extention instructions (prefixed with gs) are widely used
in our MMI codebase. However, these instructions are not avilable on
Loongson-2E/F while MMI code should work on these processors.

Previously we introduced mmiutils marcos to provide backward compactbility
but newly commited code didn't follow that. In this patch I revised the
codebase and converted all these instructions into MMI marcos to get
Loongson2 supproted again.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-28 23:31:48 +02:00
Thierry Foucu
fc300613be libavcodec/mpeg12dec.c: Switch to init_get_bits8 and checks return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-28 19:15:26 +02:00
Haihao Xiang
f2feb31b78 qsvenc: Value '0' is not a valid value for parameter GopOptFlag
The accepted values for GopOptFlag are MFX_GOP_CLOSED (1) and
MFX_GOP_STRICT (2).

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2021-07-27 23:48:53 +08:00
James Almer
f7958d0883 avcodec/h264_sei: honor the Film Grain Characteristics cancel flag
Film Grain persistence is cancelled when it's true.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-25 23:54:10 -03:00
James Almer
4ff73add5d avcodec/h264_sei: parse and export Film Grain Characteristics SEI messages
Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-23 11:06:45 -03:00
James Almer
41d1dba4d2 cbs_h264: add support for Film Grain Characteristics SEI messages
Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-23 11:05:04 -03:00
Andreas Rheinhardt
5be809fed9 avcodec/tableprint_vlc: Fix building with hardcoded tables
This has been broken in 25c8507818,
because the hacks for headers that are incompatible with building
for the host in libavcodec/tableprint_vlc.h have not been adjusted.

Moving AV_INPUT_BUFFER_PADDING_SIZE to defs.h which is valid for
both the target as well as the host allowed to remove some of the hacks.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-23 14:43:52 +02:00
Andreas Rheinhardt
25c8507818 Remove/replace some unnecessary avcodec.h inclusions
Also remove other unnecessary headers and include headers directly while
at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:29:46 +02:00
Andreas Rheinhardt
e3023e9015 avcodec/g729postfilter.h: Include acelp_pitch_delay.h
Needed for PITCH_DELAY_MAX.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:02:46 +02:00
Andreas Rheinhardt
e0b4fe0efa avcodec: Remove some unnecessary mpegvideo.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:02:46 +02:00
Andreas Rheinhardt
2934a4b9a5 Remove unnecessary avassert.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:02:30 +02:00
Andreas Rheinhardt
4608f7cc6a Remove unnecessary mem.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:47:57 +02:00
Andreas Rheinhardt
e7bd47e657 Remove obsolete version.h inclusions
These have mostly been added because of FF_API_*; yet when these were
removed, removing the header has been forgotten.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:34:31 +02:00
Andreas Rheinhardt
2c05ee092b avutil/internal, swresample/audioconvert: Remove cpu.h inclusions
These inclusions are not necessary, as cpu.h is already included
wherever it is needed (via direct inclusion or via the arch-specific
headers).
Also remove other unnecessary cpu.h inclusions from ordinary
non-headers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:33:45 +02:00
Andreas Rheinhardt
f6f85d9582 avcodec/lossless_videodsp: Improve included headers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 13:00:11 +02:00
Andreas Rheinhardt
69f120ead7 avcodec/avcodec: Don't include cpu.h
It is not used here at all; instead, add it where it is used without
including it or any of the arch-specific CPU headers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 12:59:07 +02:00
Andreas Rheinhardt
cea34b9172 avcodec/avcodec: Don't include hwcontext.h
It is no longer used directly; but it is still indirectly included via
codec.h.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 12:49:37 +02:00
Andreas Rheinhardt
912f125c42 avcodec/avcodec: Don't include errno.h
This inclusion has been added before libavutil/error.h was split off
from avcodec.h (in 60c144f700).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 12:48:22 +02:00
Andreas Rheinhardt
1be3d8a0cb avcodec/avcodec: Stop including channel_layout.h in avcodec.h
Also include channel_layout.h directly wherever used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 11:14:31 +02:00
Andreas Rheinhardt
57b5ec6ba7 avcodec/avcodec: Stop including bsf.h in avcodec.h
Also include bsf.h directly wherever it is used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 11:14:16 +02:00