Commit Graph

100535 Commits

Author SHA1 Message Date
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
Andreas Rheinhardt
8af82be946 avcodec/mpegvideo: Merge ff_mpv_decode_defaults into ff_mpv_decode_init
These two are always called directly after each other (with the
exception of the calls in mpeg_decode_init() where some irrelevant
modifications of the avctx (which could just as well be done before
ff_mpv_decode_defaults(), because it doesn't have a pointer to the
AVCodecContext at all and therefore can't see these modifications at
all) are performed in between), so merge ff_mpv_decode_defaults() in
ff_mpv_decode_init().

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 12:00:15 +01:00
Andreas Rheinhardt
ebbdb928e8 avcodec/h261dec: Don't use too big max_depth in get_vlc2()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 11:56:18 +01:00
Andreas Rheinhardt
2b04405b63 avcodec/speedhq: Remove cast
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 11:54:22 +01:00
Andreas Rheinhardt
0e3272d9a4 avcodec/mpeg12: Reindentation
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 11:49:43 +01:00
Andreas Rheinhardt
902e16d183 avcodec/mpeg12: Make initializing VLCs thread-safe
This automatically makes the eamad, eatqi, ipu and mdec decoders
init-threadsafe; in addition to the actual mpeg[12]video decoders,
of course.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 11:46:20 +01:00
Andreas Rheinhardt
6e8fcd9c56 avcodec/mpeg12: Don't initialize encoder-only parts of RLTable
ff_mpeg12_init_vlcs() currently initializes index_run, max_level and
max_run of ff_rl_mpeg1/2; yet the only user of these fields is the
MPEG-1/2 encoder which already initializes these tables on its own.
So remove the initializations in ff_mpeg12_init_vlcs(); this also
simplifies making ff_mpeg12_init_vlcs() thread-safe.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 11:11:59 +01:00
Andreas Rheinhardt
1ead0c6388 avcodec/rl: Remove nonstatic storage of RL tables
ff_rl_free() was added in 324e50ee95,
but never used; nonstatic storage was not used long before that.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 10:53:42 +01:00
Guo, Yejun
477dd2df60 dnn_interface.h: fix redefining typedefs
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-31 09:21:31 +08:00
Guo, Yejun
6b0cfa8399 dnn/queue: add error check and cleanup
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-31 08:31:17 +08:00
Guo, Yejun
97f520b700 dnn: fix issue when pthread is not supported
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-31 08:31:17 +08:00
Guo, Yejun
8e78d5d394 dnn: fix redefining typedefs and also refine naming with correct prefix
The prefix for symbols not exported from the library and not
local to one translation unit is ff_ (or FF for types).

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-31 08:31:17 +08:00
Lynne
53c56585a6
hwcontext_drm: make dependency on Linux kernel headers optional
This was introduced in version 4.6. And may not exist all without an
optional package. So to prevent a hard dependency on needing the Linux
kernel headers to compile, make this optional.

Also ignore the status of the ioctl, since it may fail on older kernels
which don't support it. It's okay to ignore as its not fatal and any
serious errors will be caught later by the mmap call.
2020-12-30 23:14:46 +01:00
Paul B Mahol
2f20e35892 avfilter/vf_w3fdif: add support for commands 2020-12-30 16:33:30 +01:00
Paul B Mahol
aea3cf4f18 avfilter/vf_xmedian: allow to control eof handling 2020-12-30 15:53:22 +01:00
Paul B Mahol
9ac31b419c avfilter/vf_xmedian: add timeline support 2020-12-30 15:53:22 +01:00
Guo, Yejun
c720286ee3 vf_dnn_processing.c: add async support
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
5024286465 dnn_interface: change from 'void *userdata' to 'AVFilterContext *filter_ctx'
'void *' is too flexible, since we can derive info from
AVFilterContext*, so we just unify the interface with this data
structure.

Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
e67b5d0a24 dnn: add async execution support for openvino backend
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
39f5cb4bd1 dnn_interface: add interface to support async execution
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
38089925fa dnn_backend_openvino.c: refine code for error handle
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
2b177033bb dnn_backend_openvino.c: separate function execute_model_ov
function fill_model_input_ov and infer_completion_callback are
extracted, it will help the async execution for reuse.

Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Xie, Lin
6506ab8b03 dnn/queue: add queue and safe_queue support
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
1b64954e42 vf_dnn_processing.c: replace filter_frame with activate func
with this change, dnn_processing can use DNN async interface later.

Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Aman Karmani
e1d7433100 avcodec/codec_desc: describe AV_CODEC_ID_MPEG2TS
Signed-off-by: Aman Karmani <aman@tmm1.net>
2020-12-28 14:08:44 -08:00