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

100609 Commits

Author SHA1 Message Date
James Almer
3b8400c221 avcodec/cbs: allow cbs_read_fragment_content() to skip decomposition of units
The caller may not need all units in a fragment in reading only scenarios.
They could in fact alter global state stored in the private CodedBitstreamType
fields in an undesirable way.
With this change, unit decomposition can be skipped based on parsed values
within the unit.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-01-04 16:28:29 -03:00
James Almer
9caf132462 avcodec/cbs: add an AVClass to CodedBitstreamType for option handling
So unit parsing may be configured with caller set options.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-01-04 16:28:29 -03:00
Joose Sainio
0cd8769207 avcodec/libkvazaar: Set default ratecontrol algorithm for libkvazaar
The standalone version of Kvazaar sets a default ratecontrol algorithm when
bitrate is set. Mirror this behaviour.

Signed-off-by: Joose Sainio <joose.sainio@tuni.fi>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-01-04 15:18:19 +00:00
Xu Guangxin
c8bc0f66a8 avcodec/hevcdec: fix stat_coeff save/load for persistent_rice_adaptation_enabled_flag
It's required by the 9.3.1 TableStatCoeff* section.

Following clips have this feature:
WPP_HIGH_TP_444_8BIT_RExt_Apple_2.bit
Bitdepth_A_RExt_Sony_1.bin
Bitdepth_B_RExt_Sony_1.bin
EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1.bit
EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1.bit
EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_8BIT_RExt_Sony_1.bit
EXTPREC_MAIN_444_16_INTRA_10BIT_RExt_Sony_1.bit
EXTPREC_MAIN_444_16_INTRA_12BIT_RExt_Sony_1.bit
EXTPREC_MAIN_444_16_INTRA_8BIT_RExt_Sony_1.bit
WPP_AND_TILE_10Bit422Test_HIGH_TP_444_10BIT_RExt_Apple_2.bit
WPP_AND_TILE_AND_CABAC_BYPASS_ALIGN_0_HIGH_TP_444_14BIT_RExt_Apple_2.bit
WPP_AND_TILE_AND_CABAC_BYPASS_ALIGN_1_HIGH_TP_444_14BIT_RExt_Apple_2.bit
WPP_AND_TILE_HIGH_TP_444_8BIT_RExt_Apple_2.bit

you can download them from:
https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/RExt/

Signed-off-by: Xu Guangxin <oddstone@gmail.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-01-04 15:18:19 +00:00
Paul B Mahol
89c9c42c5b avfilter/af_astats: clip input value to prevent overflow 2021-01-04 11:14:50 +01:00
Jonathan Baudanza
6c24f2bf41 avformat/rtpdec: export Opus extradata in ff_rtp_parse_open() 2021-01-03 20:30:33 -03:00
Paul B Mahol
ddd6c5cdc0 avfilter/vf_w3fdif: not interlaced frames are filtered like tff 2021-01-03 23:09:39 +01:00
Paul B Mahol
b112c86a2e avfilter/vf_w3fdif: add two more useful options 2021-01-03 22:23:51 +01:00
erankor
fde5593c7c avformat/http: support retry on connection error
Add 2 new options:
- reconnect_on_http_error - a list of http status codes that should be
    retried. the list can contain explicit status codes / the strings
    4xx/5xx.
- reconnect_on_network_error - reconnects on arbitrary errors during
    connect, e.g. ECONNRESET/ETIMEDOUT

the retry employs the same exponential backoff logic as the existing
reconnect/reconnect_at_eof flags.

related tickets:
https://trac.ffmpeg.org/ticket/6066
https://trac.ffmpeg.org/ticket/7768

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-01-03 16:47:29 +01:00
Michael Niedermayer
f26b5acfc0 avformat/wavdec: Avoid zeroing written to array
Fixes: OOM
Fixes: 26934/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5996784213819392

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-03 01:16:25 +01:00
Michael Niedermayer
32d0561891 avcodec/notchlc: Check uncompressed size against input for LZ4
Fixes: OOM
Fixes: 26168/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NOTCHLC_fuzzer-6019839015256064
Fixes: 28397/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NOTCHLC_fuzzer-5649039941042176

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-03 01:16:25 +01:00
Jan Ekström
ed524136e0 avcodec/videotoolbox: make FFmpeg-to-VT mapping error more informative
Now logs the actual failed-to-map pixel format as well as range.
2021-01-02 14:36:22 +02:00
Andreas Rheinhardt
2c6f532e0a Mark some pointers as const
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-01 15:25:48 +01:00
Anton Khirnov
15baa0c1ac lavc/mjpegdec: cosmetics, org->orig 2021-01-01 14:33:47 +01:00
Anton Khirnov
b0f1a86aaf fate: add tests for AVID
Samples cut from tickets 971 and 4741
2021-01-01 14:33:12 +01:00
Anton Khirnov
bb2651a921 api-seek-test: use non-obsolete decoding API 2021-01-01 14:33:08 +01:00
Anton Khirnov
88e098029d api-band-test: use non-obsolete decoding API 2021-01-01 14:33:03 +01:00
Anton Khirnov
94988f9107 api-h264-test: use non-obsolete decoding API 2021-01-01 14:32:48 +01:00
Anton Khirnov
c6357311f3 lavfi/vf_uspp: convert to the video_enc_params API 2021-01-01 14:26:09 +01:00
Anton Khirnov
7f7eb137d6 lavfi/vf_codecview: convert to the video_enc_params API 2021-01-01 14:25:33 +01:00
Anton Khirnov
3f0930387c lavfi/vf_fspp: convert to the video_enc_params API 2021-01-01 14:25:28 +01:00
Anton Khirnov
955bdb1d32 lavfi/vf_pp7: convert to the video_enc_params API
Re-enable fate-filter-pp7
2021-01-01 14:25:18 +01:00
Anton Khirnov
775707aba9 lavfi/vf_spp: convert to the video_enc_params API
Re-enable fate-filter-spp
2021-01-01 14:25:02 +01:00
Anton Khirnov
a11ee84194 lavfi/vf_pp: convert to the video_enc_params API
Re-enable fate-filter-qp and fate-filter-pp.
2021-01-01 14:24:43 +01:00
Anton Khirnov
fba0ecbe20 lavfi: add common code to handle QP tables
It will be used for converting the *pp filters to the new
AVVideoEncParams API.
2021-01-01 14:24:20 +01:00
Anton Khirnov
c72d526494 lavfi/vf_qp: convert to the video_enc_params API
Temporarily disable fate-filter-qp until vf_pp is converted.
2021-01-01 14:23:48 +01:00
Anton Khirnov
baecaa16c1 mpegvideo: use the AVVideoEncParams API for exporting QP tables
Do it only when requested with the AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS
flag.

Drop previous code using the long-deprecated AV_FRAME_DATA_QP_TABLE*
API. Temporarily disable fate-filter-pp, fate-filter-pp7,
fate-filter-spp. They will be reenabled once these filters are converted
in following commits.
2021-01-01 14:23:19 +01:00
Anton Khirnov
e15371061d lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump
They are not properly namespaced and not intended for public use.
2021-01-01 14:14:57 +01:00
Anton Khirnov
c8c2dfbc37 lavu: move LOCAL_ALIGNED from internal.h to mem_internal.h
That is a more appropriate place for it.
2021-01-01 14:11:01 +01:00
Paul B Mahol
54cd025a82 avfilter: add temporal midway equalizer filter 2021-01-01 12:43:42 +01:00
Lynne
63505fc60a
configure: update copyright year 2021-01-01 00:38:22 +01:00
Andreas Rheinhardt
be1f5bae31 avcodec/svq1dec: Increase nb_bits of VLC to read it in one go
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 23:42:05 +01:00
Andreas Rheinhardt
4425aa4be5 avcodec/dirac_arith: Make table only used here static
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 23:37:53 +01:00
Andreas Rheinhardt
bd46e3ee71 avcodec/qdmc: Mark decoder as init-threadsafe
It already uses ff_thread_once() to initialize its static data.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 23:36:37 +01:00
Andreas Rheinhardt
e0311e848a avcodec/opusdec: Mark decoder as init-threadsafe
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 23:35:21 +01:00
Andreas Rheinhardt
9f36a5a1cc avcodec/opusdec: Cleanup generically on init failure
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 23:35:10 +01:00
Andreas Rheinhardt
f03eade869 avcodec/opusdec: Move per-stream fields to OpusStreamContext
Besides being more natural it also avoids allocations for separate
arrays of decoded samples/output buffers/....

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 23:23:03 +01:00
Andreas Rheinhardt
794fb18369 avcodec/opusdec: Return error upon error
The Opus decoder forgot to return an error when allocating an
SwrContext fails.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 23:21:43 +01:00
Andreas Rheinhardt
4f1ae39036 avcodec/aacps_common: Use minimal VLC nb_bits/max_depth
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 23:18:55 +01:00
Andreas Rheinhardt
3693e2fcee avcodec/aacps: Factor out code shared by float and fixed point decoder
Saves about 7KiB.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 22:12:39 +01:00
Andreas Rheinhardt
0d61a1cfad avcodec/mpegvideo: Don't zero-initialize unnecessarily
mbintra_table will be memset to 1 a few lines after its allocation.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 22:12:01 +01:00
Andreas Rheinhardt
3526f3856a avcodec/aacsbr_template: Remove pointless runtime initialization
The sbr_qmf_window_us array is basically symmetric around its middle
element and therefore the latter half is currently initialized from the
first half at runtime. Yet because the first half is initialized, the
array can't be placed in .bss at all, so that one gains nothing from not
already initializing the whole array statically. Therefore this commit
does exactly this.

(There are two exceptions to the symmetry: Elements 384 and 512 are the
negations of their mirror element; for the fixed-point decoder, Q31(-x)
does not equal -Q31(x). In order to keep the array exactly the same, the
latter form has been used for these two elements.)

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 22:04:23 +01:00
Andreas Rheinhardt
df56a1060c avcodec/aacsbr: Remove remnants of tablegen
These tables are always initialized at runtime since commit
cb93df0dcb.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 21:53:55 +01:00
Andreas Rheinhardt
2c3393d15d avcodec/atrac3plus_data: Mark array as const
Forgotten in a7dbeb77c3.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 21:49:33 +01:00
Andreas Rheinhardt
15072d2753 avcodec/mlpenc: Simplify finding best codebook
Finding the best codebook involves comparing different paths, where each
path is a sequence of several decisions (namely which codebook to use).
Up until now, these sequence was encoded in a NUL-terminated string and
the actual decisions were encoded as ’\0'..'\3' (which encoded 0..3).
This commit modifies this to actually encode it via 0..3 by switching
away from a C-string to a simple array with an explicit length field.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 21:46:01 +01:00
Andreas Rheinhardt
2825ed4e26 avcodec/opusdec: Remove always-true check
The celt_delay AVAudioFifo is always allocated during init, so checking
for its existence in .flush is unnecessary.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 21:43:31 +01:00
Andreas Rheinhardt
2089d21bc7 avfilter/vf_addroi: Use chars instead of strings for one-char strings
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 21:41:07 +01:00
Andreas Rheinhardt
7684182921 avcodec/opustab: Make array static
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 21:30:51 +01:00
Andreas Rheinhardt
4a160cbef4 avcodec/motion_est, mpegvideo: Make pointers to static storage const
Modifying static storage must not happen because of multithreading
(except initialization of course), so add const to the pointed-to type
for pointers that point to static storage.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 12:44:12 +01:00
Andreas Rheinhardt
eea2638e9a configure, libavcodec/speedhq: Fix compiling SpeedHQ encoder
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 12:06:04 +01:00