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

109047 Commits

Author SHA1 Message Date
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
Andreas Rheinhardt
1d9aac9c4b avcodec/mpegvideo_dec: Don't use MotionEstContext as scratch space
Decoders that might use quarter pixel motion estimation
(namely MPEG-4 as well as the VC-1 family) currently
use MpegEncContext.me.qpel_(put|avg) as scratch space
for pointers to arrays of function pointers.
(MotionEstContext contains such pointers as it supports
quarter pixel motion estimation.) The MotionEstContext
is unused apart from this for the decoding part of
mpegvideo.

Using the context at all is for decoding is actually
unnecessary and easily avoided: All codecs with
quarter pixels set me.qpel_avg to qdsp.avg_qpel_pixels_tab,
so one can just unconditionally use this in ff_mpv_reconstruct_mb().
MPEG-4 sets qpel_put to qdsp.put_qpel_pixels_tab
or to qdsp.put_no_rnd_qpel_pixels_tab based upon
whether the current frame is a b-frame with no_rounding
or not, while the VC-1-based decoders set it to
qdsp.put_qpel_pixels_tab unconditionally. Given
that no_rounding is always zero for VC-1, using
the same check for VC-1 as well as for MPEG-4 would work.
Since ff_mpv_reconstruct_mb() already has exactly
the right check (for hpeldsp), it can simply be reused.

(This change will result in ff_mpv_motion() receiving
a pointer to an array of NULL function pointers instead
of a NULL pointer for codecs without qpeldsp (like MPEG-1/2).
It doesn't matter.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt
5739fa8be2 avcodec/vc1_block: Remove redundant write
vc1_decode_skip_blocks() is only called if the current picture
is a P frame. So setting pict_type to AV_PICTURE_TYPE_P
is redundant; removing it makes pict_type read-only in vc1_block.c
(as it should be).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt
cbe6ef1031 avcodec/vc1dec: Split VC-1 decoders from msmpeg4
The only msmpeg4 code that is ever executed by the VC-1 based
decoders is ff_msmpeg4_decode_init() and what is directly
reachable from it. This is:
a) A call to av_image_check_size(), then ff_h263_decode_init(),
b) followed by setting [yc]_dc_scale_table and initializing
scantable/permutations.
c) Afterwards, some static tables are initialized.
d) Finally, slice_height is set.

The replacement for ff_msmpeg4_decode_init() performs a)
just like now; it also sets [yc]_dc_scale_table,
but it only initializes inter_scantable and intra_scantable
and not permutated_intra_[hv]_scantable: The latter are only
used inside decode_mb callbacks which are only called
in ff_h263_decode_frame() which is unused for VC-1.*

The static tables initialized in c) are not used at all by
VC-1 (the ones that are used have been factored out in
previous commits); this avoids touching 327KiB of .bss.

slice_height is also not used by the VC-1 decoder (setting
it in ff_msmpeg4_decode_init() is probably redundant after
b34397b4cd).

*: It follows from this that the VC-1 decoder is not really
based upon the H.263 decoder either; changing this will
be done in a future commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt
d1d30edf42 avcodec/msmpeg4data: Move data shared between msmpeg4 and VC-1 out
This is in preparation for splitting VC-1 from msmpeg4.
(msmpeg4data.c was originally intended to be just this;
9488b966c7 changed it).

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