Commit Graph

5647 Commits

Author SHA1 Message Date
James Darnley
f1f41d6ff5 configure: support lsan as toolchain 2022-12-20 15:02:45 +01:00
Zhao Zhili
e3f2d01d70 avcodec/mediacodecenc: use bsf to handle crop
It's well known that mediacodec encoder requires 16x16 alignment.
Use our bsf to fix the crop info.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-12-17 04:28:27 +08:00
Paul B Mahol
6c814093d8 avfilter/vf_bm3d: switch to TX from lavu 2022-12-04 23:02:07 +01:00
Andreas Rheinhardt
4d9c0b3efa configure: Add (h264|hevc)_sei subsystems
Currently, several components select atsc_a53, despite
not using anything from it themselves. They only select
it because parsing SEI messages adds an indirect dependency.
But using direct dependencies is more natural, so add
dedicated subsystems for them.

It already allows to remove a superfluous dependency of
the HEVC QSV encoder on hevc_sei and atsc_a53.

Adding new subsystems only becomes effective after a reconfiguration.
In order to force this, some needed headers (which are only included
implicitly before this commit) were included explicitly in
libavformat/allformats.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:00:40 +01:00
Lynne
ca8aaf24df
binkaudio: convert to lavu/tx 2022-11-24 15:58:36 +01:00
Anton Khirnov
703e76f917 configure: drop support for complex functions
They are not used since 520a5d33f0.
2022-11-23 10:40:55 +01:00
Wenbin Chen
efe2b63c89 doc/examples: Add qsv_transcode example
Add qsv_transcode example which shows how to use qsv to do hardware
accelerated transcoding, also show how to dynamically set encoding
parameters.

examples:
Normal usage:
qsv_transcode input.mp4 h264_qsv output.mp4 "g 60"

Dynamic setting usage:
qsv_transcode input.mp4 hevc_qsv output.mp4 "g 60 asyne_depth 1"
100 "g 120"
This command initializes codec with gop_size 60 and change it to
120 after 100 frames

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-11-22 13:52:38 +08:00
Zhao Zhili
0ff18a7d6d avcodec: add MediaCodec encoder
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-11-21 23:56:16 +08:00
Zhao Zhili
4df9cb918e avcodec/mediacodec: add NDK media codec wrapper
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-11-21 23:52:34 +08:00
Zhao Zhili
36a8d1e729 avcodec/libx265: fix build error
x265_sei is available since X265_BUILD 88. Bump required version
to 89 to fix the regression from commit 1f58503013, and remove a
conditional compilation.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-11-18 23:18:21 +08:00
Paul B Mahol
4f6c06e8ff avfilter/af_firequalizer: switch to TX from lavu 2022-11-17 13:28:58 +01:00
Paul B Mahol
59b16355ec avfilter/avf_showspatial: switch to lavu TX
Also try harder to make output constant frame rate.
2022-11-17 12:37:22 +01:00
erankor
6043352bd9 libx265: support ATSC A/53 captions
added a new option 'a53cc' (on by default, as in libx264) for rendering
AV_FRAME_DATA_A53_CC as hevc sei payloads.
the code is a blend of the libx265.c code for writing
AV_FRAME_DATA_SEI_UNREGISTERED with the libx264.c code for writing atsc
a/53 payloads.
2022-11-10 16:28:07 +01:00
Timo Rothenpieler
939273d3b4 avcodec/nvenc: remove unsupported AV1 High Profile 2022-11-10 15:26:43 +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
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
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
Lynne
1aeedd277a
qdm2: convert to lavu/tx 2022-11-06 14:39:42 +01:00
Lynne
e6afa61be9
imc: convert to lavu/tx, remove NIH iMDCT and replace with a standard one 2022-11-06 14:39:42 +01:00
Lynne
b85e106d5f
libavcodec: remove mdct15
It's not needed nor used by anything anymore, lavu/tx is faster,
and better in every way. RIP.
2022-11-06 14:39:41 +01:00
Lynne
774ea6a00b
vorbisenc: convert to lavu/tx 2022-11-06 14:39:41 +01:00
Lynne
34330adb29
atrac3plus: convert to lavu/tx 2022-11-06 14:39:40 +01:00
Lynne
b59e6b5d99
atrac3: convert to lavu/tx 2022-11-06 14:39:40 +01:00
Lynne
5f52094f3d
atrac1: convert to lavu/tx 2022-11-06 14:39:39 +01:00
Lynne
978963a77b
wma: convert to lavu/tx
Converts both the decoder and encoders.
2022-11-06 14:39:39 +01:00
Lynne
6ba0aa1770
on2avc: convert to lavu/tx 2022-11-06 14:39:38 +01:00
Lynne
8cd46c48ac
nellymoserenc: convert to lavu/tx 2022-11-06 14:39:38 +01:00
Lynne
61e1a7d958
nellymoserdec: convert to lavu/tx 2022-11-06 14:39:38 +01:00
Lynne
b428003c1c
dcaenc: convert to lavu/tx
The encoder is fixed point, and uses an MDCT only for analysis. Due
to the slightly different rounding, the encoder makes a different
decision, so the tests have to be adjusted as well.
2022-11-06 14:39:37 +01:00
Lynne
055413788f
dca_lbr: convert to lavu/tx
Fully converts the DCA decoder to lavu/tx.
2022-11-06 14:39:37 +01:00
Lynne
2689038f08
dolby_e: convert to lavu/tx 2022-11-06 14:39:36 +01:00
Lynne
1d810b650c
cookdec: convert to lavu/tx 2022-11-06 14:39:36 +01:00
Lynne
8f3e062314
aacenc: convert to lavu/tx 2022-11-06 14:39:35 +01:00
Lynne
5f1111e42e
wmaprodec: convert to lavu/tx 2022-11-06 14:39:34 +01:00
Lynne
eb0e25f078
atrac9dec: convert to lavu/tx 2022-11-06 14:39:34 +01:00
Lynne
7af43a46d9
twinvq: convert to lavu/tx 2022-11-06 14:39:33 +01:00
Lynne
60c704677a
vorbisdec: convert to lavu/tx
This also fixes not checking the return values on transform init.

Total decoder speedup on Zen 3: 9%
2022-11-06 14:39:33 +01:00
Lynne
469cd8d7fa
aacdec: convert to lavu/tx and support fixed-point 960-sample decoding
This patch replaces the transform used in AAC with lavu/tx and removes
the limitation on only being able to decode 960-sample files
with the float decoder.
This commit also removes a whole bunch of unnecessary and slow
lifting steps the decoder did to compensate for the poor accuracy
of the old integer transformation code.

Overall float decoder speedup on Zen 3 for 64kbps: 32%
2022-11-06 14:39:33 +01:00
Lynne
4cee7ebd75
ac3: convert to lavu/tx 2022-11-06 14:39:27 +01:00
Timo Rothenpieler
5c288a44ad avcodec/nvenc: add AV1 encoding support
The encoder seems to be trading blows with hevc_nvenc.
In terms of quality at low bitrate cbr settings, it seems to
outperform it even. It produces fewer artifacts and the ones it
does produce are less jarring to my perception.

At higher bitrates I had a hard time finding differences between
the two encoders in terms of subjective visual quality.

Using the 'slow' preset, av1_nvenc outperformed hevc_nvenc in terms
of encoding speed by 75% to 100% while performing above tests.

Needless to say, it always massively outperformed h264_nvenc in terms
of quality for a given bitrate, while also being slightly faster.
2022-11-05 21:17:37 +01:00
Timo Rothenpieler
0957d62fb0 configure: add pkg-config check for chromaprint 2022-11-03 12:37:41 +01:00
Timo Rothenpieler
d772419237 configure: add pkg-config check for OpenAL 2022-10-31 18:42:12 +01:00
Martin Storsjö
2eb601e865 configure: Remove a leftover comment about MSVC C99 support
Support for building with older versions of MSVC (with the
c99wrap/c99conv frontend) was removed in
ce943dd6ac.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-10-27 21:49:26 +03:00
Andreas Rheinhardt
22fc0375e8 configure: Remove unnecessary mpeg[12]video_enc->h263dsp dependencies
This effectively reverts 9b78abae19.
The underlying issue has been fixed properly in commit
cff480e49d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-27 19:39:07 +02:00
Andreas Rheinhardt
938c62b368 avcodec/mpegvideo: Don't initialize H264Chroma ctx unnecessarily
It is only used by the decoders' lowres code, so only initialize
it for decoders.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-27 19:37:44 +02:00
Wenbin Chen
dc9e4789a3 libavcodec/qsvenc_av1: add av1_qsv encoder
It is available only when libvpl is enabled. MSDK doesn't support av1
encoding.

sample command:
ffmpeg -f rawvideo -pix_fmt nv12 -s 1920x1080 -i input.yuv \
-c:v av1_qsv output.ivf

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-10-24 13:30:22 +08:00
Anton Khirnov
f66e794672 lavu/thread: add an internal function for setting thread name
Linux-only for now.
2022-10-24 02:00:31 +02:00
Andreas Rheinhardt
3cabe958a7 avcodec/eatqi: Don't use IDCTDSP-API unnecessarily
The eatqi decoder uses a custom IDCT and actually does not
use the IDCTDSP API at all. Somehow it was nevertheless
used to simply apply the identity permutation on ff_zigzag_direct.
This commit stops doing so.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 00:46:53 +02:00
Andreas Rheinhardt
a8f34f0877 avcodec/eatgq: Don't use IDCTDSP-API unnecessarily
The eatgq decoder uses a custom IDCT and actually does not
use the IDCTDSP API at all. Somehow it was nevertheless
used to simply apply the identity permutation on ff_zigzag_direct.
This commit stops doing so. It also renames perm to scantable,
because it is only the scantable as given by the spec without
any further permutation performed by us.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 00:46:49 +02:00
Andreas Rheinhardt
c262245fd3 avcodec/eamad: Don't use IDCTDSP-API unnecessarily
The eamad decoder uses a custom IDCT and actually does not
use the IDCTDSP API at all. Somehow it was nevertheless
used to simply apply the identity permutation on ff_zigzag_direct.
This commit stops doing so.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 00:46:39 +02:00