Commit Graph

109051 Commits

Author SHA1 Message Date
Timo Rothenpieler e7fbdda64e avcodec/nvenc: fix AV1 darWidth/Height calculation
nvenc uses the darWidth/Height fields for the AV1 render_width/height
instead, so a different calculation is needed.
2022-11-10 14:51:31 +01:00
Paul B Mahol 05721c5df8 avfilter/vf_thumbnail: add slice threading support 2022-11-10 14:52:48 +01:00
Andreas Rheinhardt 65f3bc9e7e avcodec/clearvideo: Avoid allocations when decoding tiles
Up until now, the ClearVideo decoder separates parsing tiles
and actually using the parsed information: The information is
instead stored in structures which are constantly allocated
and freed. This commit changes this to use the information
immediately, avoiding said allocations. This e.g. reduced
the amount of allocations for [1] from 2,866,462 to 24,720.
For said sample decoding speed improved by 143%.

[1]: https://samples.ffmpeg.org/V-codecs/UCOD/AccordianDance-300.avi

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-10 00:39:43 +01:00
Andreas Rheinhardt 165682a6d4 avcodec/clearvideo: Use const where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-10 00:39:43 +01:00
Andreas Rheinhardt c2966ae14c avcodec/clearvideo: Redo updating predicition
This is in preparation for further commits.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-10 00:39:43 +01:00
Andreas Rheinhardt a7a783a5c5 avcodec/clearvideo: Move tile_do_block() upwards
Will avoid a forward-declaration later.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-10 00:39:43 +01:00
Andreas Rheinhardt 4e6ca99c36 avcodec/clearvideo: Remove unnecessary level parameter
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-10 00:39:43 +01:00
Andreas Rheinhardt a7ccfdc0d7 avfilter/vf_hqdn3d: Fix left-shift of negative numbers
Affected filter-hqdn3d and filter-hqdn3d-sample FATE-tests.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-09 17:39:00 +01:00
Andreas Rheinhardt cf57147da1 avfilter/phase_template: Fix left-shift of negative numbers
Affected the filter-phase FATE-test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-09 17:39:00 +01:00
Andreas Rheinhardt e72e8ec515 avfilter/vf_qp: Don't store NAN in int
Affected the filter-pp2 FATE-test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-09 17:39:00 +01:00
Andreas Rheinhardt f0ee38790b postproc/postprocess_template: Fix alignment
postProcess in postprocess_template.c copies a PPContext
to the stack, works with this copy and then copies
it back again. Said local copy uses a hardcoded alignment
of eight, although PPContext has alignment 32 since
cbe27006ce
(this commit was in anticipation of AVX2 code that never landed).
This leads to misalignment in the filter-(pp|pp1|pp2|pp3|qp)
FATE-tests which UBSan complains about. So avoid the local copy.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-09 17:39:00 +01:00
Andreas Rheinhardt b616b04704 swscale/utils: Remove obsolete 3DNow reference
swscale does not use 3DNow any more since commit
608319a311.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-09 17:39:00 +01:00
Andreas Rheinhardt 4228f8ad49 avcodec/x86/cavsdsp: Remove unused 3DNow-macro
Forgotten in 3221aba879.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-09 17:39:00 +01:00
Andreas Rheinhardt 1f0948272a postproc/postprocess: Remove obsolete MMX(EXT)/3Dnow functions
postprocess.c currently has C, MMX, MMXEXT, 3DNow as well as
SSE2 versions of its internal functions. But given that only
ancient 32-bit x86 CPUs don't support SSE2, the MMX, MMXEXT
and 3DNow versions are obsolete and are therefore removed by
this commit. This saves about 56KB here.

(The SSE2 version in particular is not really complete,
so that it often falls back to MMXEXT (which means that
there were some identical (apart from the name) MMXEXT
and SSE2 functions; this duplication no longer exists
with this commit.)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-09 17:38:24 +01:00
Paul B Mahol 10ddbaf514 avfilter/af_loudnorm: stop rewritting pts 2022-11-09 11:56:01 +01:00
Paul B Mahol 40d0cb93ab avfilter/af_loudnorm: switch to activate 2022-11-09 11:56:01 +01:00
Rui Zhu 36572a0c1d avfilter/af_loudnorm: fix incorrect gain when audio is shorter than 3s
The input data is multiplied by `s->offset` to get normalized output.
`s->target_tp` and `true_peak` is not in dB,
so `s->offset` should be calculated by division instead of subtraction.

Signed-off-by: Rui Zhu <real.zhurui@gmail.com>
2022-11-09 11:56:01 +01:00
James Almer 86157f5a25 avutil/tx: use llrintf() to convert a float into a 64 bit integer
Should fix fate failures on Windowx x86 targets, where long is 32 bits.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-08 14:24:49 -03:00
James Almer d5c7970a27 avutil/tx: use a lower log level for the debug messages
The amount of lines printed is too high for the verbose level, and the debug
level is a better fit for their content.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-08 14:08:05 -03:00
James Almer 0d0d67ce36 avdevice/avfoundation: convert to new channel layout-API
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-08 14:08:05 -03:00
James Almer df968fc1ff avdevice/audiotoolbox: convert to new channel layout-API
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-08 14:08:05 -03:00
Timo Rothenpieler 1800a0da09 Changelog: add forgotten nvenc av1 entry 2022-11-07 20:16:42 +01:00
Derek Buitenhuis d1366c4167 fftools/ffprobe: Loop over correct number of streams when flushing decoders
Some formats like FLV can dynamically add streams during packet reading.
FFprobe does check for this and reallocates the global stream info, but does
not reallocate InputFrame's streams and decoders when this happens, which,
as a result, could have caused flushing to occur on an out of bounds stream
index, since the flush loop iterates over fmt_ctx's nb_streams, and not
ifile's, despite using ifile's streams.

This fixes an out of bounds read and segfult.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2022-11-07 16:13:45 +00:00
Martin Storsjö 202b7a9ae7 avcodec/tests/fft: Fix building with CONFIG_MDCT disabled
Since e6afa61be9, no components in
libavcodec enable CONFIG_MDCT. This fixes building "make testprogs".

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-11-07 10:34:31 +02:00
Paul B Mahol e17628b720 avfilter/af_speechnorm: change initial gain state
Stops doing unwanted fade-in at start.
2022-11-07 08:32:48 +01:00
Paul B Mahol 7f4c5f6525 avfilter/af_speechnorm: remove long search range for min gain
Effective only for linked channels processing.
2022-11-07 08:32:48 +01:00
Paul B Mahol 7027101904 avfilter/af_speechnorm: implement rms option 2022-11-07 08:32:48 +01:00
Peter Ross b48d2320f1 fate/video: vqc testcase 2022-11-07 16:08:35 +11:00
Peter Ross e75e3ac106 fate/audio: msnsiren test case 2022-11-07 16:08:35 +11:00
Peter Ross 99499125ed fate/microsoft: add mss2 region test case 2022-11-07 16:08:35 +11:00
Wenbin Chen dc4d3429e1 libavcodec/qsvenc: Add skip_frame support to qsvenc
Add skip_frame support to qsvenc. Use per-frame metadata
"qsv_skip_frame" to control it. skip_frame option defines the behavior
of qsv_skip_frame.
no_skip: Frame skipping is disabled.
insert_dummy: Encoder inserts into bitstream frame where all macroblocks
are encoded as skipped.
insert_nothing: Similar to insert_dummy, but encoder inserts nothing.
The skipped frames are still used in brc. For example, gop still include
skipped frames, and the frames after skipped frames will be larger in
size.
brc_only: skip_frame metadata indicates the number of missed frames
before the current frame.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-11-07 10:57:12 +08:00
nyanmisaka af67f627d1 doc/encoders: add doc of the tier option for hevc_qsv
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2022-11-07 10:57:12 +08:00
nyanmisaka 09775cfea7 libavcodec/qsvenc_hevc: add tier option
Without this change, MSDK/VPL always defaults the HEVC tier to MAIN if the -level is specified.
Also, according to the HEVC specs, only level >= 4 can support High Tier.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2022-11-07 10:57:12 +08:00
softworkz e137d197b5 doc/filters.texi: update overlay_vaapi documentation
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz 00ce6f486b doc/filters.texi: remove incorrect statement
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz c8050d82a9 avfilter/overlay_vaapi: enable expressions for overlay parameters
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz ff075f5abb avfilter/overlay_vaapi: precalculate blend_state, enable pixel alpha
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz 916447bf4c avfilter/overlay_vaapi: add framesync options
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz db6b376db9 avfilter/overlay_vaapi: remove redundant .get_buffer assignments
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz 7ebd6189a2 avfilter/overlay_vaapi: reformat options
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz 50aeaadad0 avfilter/overlay_vaapi: handle secondary null input
Currently segfaults in this case.

Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz 55cc8312cc avfilter/overlay_vaapi: remove double framesync init
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz e154d8931e avfilter/overlay_vaapi: build filter params just once
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
softworkz a847c82289 avfilter/overlay_vaapi: use FILTER_SINGLE_PIXFMT
Signed-off-by: softworkz <softworkz@hotmail.com>
2022-11-07 10:56:44 +08:00
Andreas Rheinhardt 09eaa76a72 avcodec/wmaprodec: Remove unused variable
Unused since 5f1111e42e
(replaced by a new "err" variable).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 18:09:01 +01:00
Andreas Rheinhardt 649d7cbda8 avcodec/vc1data: Mark tables as hidden
This e.g. allows compilers to bake the offset implied
by using ff_vc1_b_field_mvpred_scales[3] into the
general offset; for certain arches this is also necessary
in order to avoid building suboptimal code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt a6657493da avcodec/motion_est: Remove unused field
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt fd0e37f126 avcodec/mpegvideo_enc: Move initializing QpelDSPCtx to mpeg4videoenc.c
It is the only encoder supporting quarter samples.
This also allows to remove the qpeldsp dependency from
mpegvideo_enc.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt 8fcaa3f2a8 avcodec/h263dec: Move initializing qpel DSP context to mpeg4videodec.c
The MPEG-4 decoder is the only decoder based upon H.263 that
supports quarterpel motion vectors.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt 496b3c6987 avcodec/vc1dec: Remove VC-1 decoders->H.263 decoder dependency
The only thing from the H.263 decoder that is reachable
by the VC-1 decoder is ff_h263_decode_init(); but it does
not even use all of it; e.g. h263dsp is unused and so are
the VLCs initialized in ff_h263_decode_init() (they amount
to about 77KB which are now no longer touched).

Notice that one could also call ff_idctdsp_init()
directly instead of ff_mpv_idct_init(); one could even
do so in ff_vc1_init_common().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00