1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

108929 Commits

Author SHA1 Message Date
James Almer
828b0da7b7 avcodec/aacdec: refactor the channel layout derivation code
Generalize the checks for channels in all positions, and properly support
the three height groups (normal, top, bottom) instead of manually setting
the relevant channels for the latter two after the normal height tags were
parsed.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-03 19:39:52 -03:00
James Almer
ced6a5affb avcodec/aacdec: don't force a layout when a channel position is unknown
If PCE defines channels not covered by those in the standard configurations
then don't try to come up with some made up layout and just return them in the
coded order.

Fixes al08_44.mp4 from the conformance suite, now reporting and decoding all 48
channels instead of 10.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-03 19:39:52 -03:00
James Almer
cf653aabb5 avcodec/aacdec: add support for channel configuration 14
It corresponds to the 7.1(top) layout.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-03 19:39:52 -03:00
James Almer
c79b16306f swresample/rematrix: support mixing top front left/right channels
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-03 19:39:52 -03:00
James Almer
6228ba141d avutil/channel_layout: add a 7.1(top) channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-03 19:39:45 -03:00
James Almer
8c7d3b43cc avcodec/aacdec: fix parsing streams with channel configuration 11
Set the correct amount of tags in tags_per_config[].
Also, there are no channels that correspond to a side element in this
configuration, so reflect this in the list of known/supported channel layouts.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-11-03 19:35:20 -03:00
Paul B Mahol
e27bef9a56 avformat/serdec: fix BE/LE format handling 2022-11-03 16:59:18 +01:00
Timo Rothenpieler
0957d62fb0 configure: add pkg-config check for chromaprint 2022-11-03 12:37:41 +01:00
Pierre-Anthony Lemieux
89a49fd5a9
avformat/imfdec: variable initialiaztion cosmetics 2022-11-03 21:16:10 +10:00
Pierre-Anthony Lemieux
906219e3ca
avformat/tests/imf: add CPL timecode test 2022-11-03 21:16:10 +10:00
Pierre-Anthony Lemieux
94922f6cab
avformat/imfdec: use CPL start timecode if available
The IMF CPL contains an optional timecode start address. This patch reads the
latter, if present, into the context's timecode metadata parameter.
This addresses https://trac.ffmpeg.org/ticket/9842.
2022-11-03 21:16:03 +10:00
Gyan Doshi
5ccd4d3060 ffmpeg: fix implementation of updated input start time
The current adjustment of input start times just adjusts the tsoffset.
And it does so, by resetting the tsoffset to nullify the new start time.
This leads to breakage of -copyts, ignoring of input_ts_offset, breaking
of -isync as well as breaking wrap correction.

Fixed by taking cognizance of these parameters, and by correcting start times
just before sync offsets are applied.
2022-11-03 14:38:42 +05:30
Gyan Doshi
93faba449c ffmpeg: shift start time correction to ffmpeg_opt
In preparation for applying start time correction that accounts for all
factors such as copyts, input_ts_offset ..etc
2022-11-03 14:38:24 +05:30
Paul B Mahol
5661c8715c avfilter/src_movie: support unknown channel layouts 2022-11-02 10:53:44 +01:00
Peter Ross
95386b7b65 avcodec/svq3: perform residual slice copy before xor'ing watermark key
Fixes ticket #5387
2022-11-02 18:39:39 +11:00
Timo Rothenpieler
12733c0cbd avcodec/nvenc: remove unused slice offset querying 2022-11-01 17:42:54 +01:00
Hubert Mazur
2537fdc510 sw_scale: Add specializations for hscale 16 to 19
Provide arm64 neon optimized implementations for hscale16To19 with
filter sizes 4, 8 and X4.

The tests and benchmarks run on AWS Graviton 2 instances.
The results from a checkasm tool are shown below.

hscale_16_to_19__fs_4_dstW_512_c: 6216.0
hscale_16_to_19__fs_4_dstW_512_neon: 2257.0
hscale_16_to_19__fs_8_dstW_512_c: 10417.7
hscale_16_to_19__fs_8_dstW_512_neon: 3112.5
hscale_16_to_19__fs_12_dstW_512_c: 14890.5
hscale_16_to_19__fs_12_dstW_512_neon: 3899.0
hscale_16_to_19__fs_16_dstW_512_c: 19006.5
hscale_16_to_19__fs_16_dstW_512_neon: 5341.2
hscale_16_to_19__fs_32_dstW_512_c: 36629.5
hscale_16_to_19__fs_32_dstW_512_neon: 9502.7
hscale_16_to_19__fs_40_dstW_512_c: 45477.5
hscale_16_to_19__fs_40_dstW_512_neon: 11552.0

(Note, the checkasm tests for these functions haven't been
merged since they fail on x86.)

Signed-off-by: Hubert Mazur <hum@semihalf.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-11-01 15:24:58 +02:00
Hubert Mazur
9ccf8c5bfc sw_scale: Add specializations for hscale 16 to 15
Add arm64 neon implementations for hscale 16 to 15 with filter
sizes 4, 8 and X4.

The tests and benchmarks run on AWS Graviton 2 instances.
The results from a checkasm tool are shown below.

hscale_16_to_15__fs_4_dstW_512_c: 6703.5
hscale_16_to_15__fs_4_dstW_512_neon: 2298.0
hscale_16_to_15__fs_8_dstW_512_c: 10983.0
hscale_16_to_15__fs_8_dstW_512_neon: 3216.5
hscale_16_to_15__fs_12_dstW_512_c: 15526.0
hscale_16_to_15__fs_12_dstW_512_neon: 3993.0
hscale_16_to_15__fs_16_dstW_512_c: 20183.5
hscale_16_to_15__fs_16_dstW_512_neon: 5369.7
hscale_16_to_15__fs_32_dstW_512_c: 39315.2
hscale_16_to_15__fs_32_dstW_512_neon: 9511.2
hscale_16_to_15__fs_40_dstW_512_c: 48995.7
hscale_16_to_15__fs_40_dstW_512_neon: 11570.0

(Note, the checkasm tests for these functions haven't been
merged since they fail on x86.)

Signed-off-by: Hubert Mazur <hum@semihalf.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-11-01 15:24:53 +02:00
Hubert Mazur
1e9cfa5bb0 sw_scale: Add specializations for hscale 8 to 19
Add arm64 neon implementations for hscale 8 to 19 with filter
sizes 4, 4X and 8. Both implementations are based on very similar ones
dedicated to hscale 8 to 15. The major changes refer to saving
the data - instead of writing the result as int16_t it is done
with int32_t.

These functions are heavily inspired on patches provided by J. Swinney
and M. Storsjö for hscale8to15 which were slightly adapted for
hscale8to19.

The tests and benchmarks run on AWS Graviton 2 instances. The results
from a checkasm tool shown below.

hscale_8_to_19__fs_4_dstW_512_c: 5663.2
hscale_8_to_19__fs_4_dstW_512_neon: 1259.7
hscale_8_to_19__fs_8_dstW_512_c: 9306.0
hscale_8_to_19__fs_8_dstW_512_neon: 2020.2
hscale_8_to_19__fs_12_dstW_512_c: 12932.7
hscale_8_to_19__fs_12_dstW_512_neon: 2462.5
hscale_8_to_19__fs_16_dstW_512_c: 16844.2
hscale_8_to_19__fs_16_dstW_512_neon: 4671.2
hscale_8_to_19__fs_32_dstW_512_c: 32803.7
hscale_8_to_19__fs_32_dstW_512_neon: 5474.2
hscale_8_to_19__fs_40_dstW_512_c: 40948.0
hscale_8_to_19__fs_40_dstW_512_neon: 6669.7

Signed-off-by: Hubert Mazur <hum@semihalf.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-11-01 15:24:43 +02:00
Peter Ross
16af424bf9 avcodec/svq1dec: detect buggy FFmpeg encoder and apply correction to interframe mean symbols
The FFmpeg encoder does not increment the temporal reference field, so use
that knowledge plus the extradata field to detect buggy versions of the encoder.
2022-11-01 10:14:31 +11:00
Peter Ross
6fe8556a19 avcodec/svq1: fix interframe mean VLC symbols
Fixes ticket #128.

The SVQ1 interframe mean VLC symbols -128 and 128 are incorrectly swapped
in our SVQ1 implementation, resulting in visible artifacts for some videos.
This patch unswaps the order of these two symbols.

The most noticable example of the artiacts caused by this error can be observed in
https://trac.ffmpeg.org/attachment/ticket/128/svq1_set.7z '352_288_k_50.mov'.
The artifacts are not observed when using the reference decoder
(QuickTime 7.7.9 x86 binary).

As a result of this patch, the reference data for the fate-svq1 test
($SAMPLES/svq1/marymary-shackles.mov) must be modified. For this file, our
decoder output is now bitwise identical to the reference decoder. I have
tested patch with various other samples and they are all now bitwise identical.
2022-11-01 09:24:29 +11:00
Peter Ross
b0c1f248d9 avcodec/svq1enc: output ident string in extradata field
This will enable the acurate identification of FFmpeg produced
SVQ1 streams, should there be new bugs found in the encoder.
2022-11-01 09:24:29 +11:00
Peter Ross
e1dd4a27ca avcodec/svq1enc: do not use ambiguous interframe mean symbols
Don't emit interframe mean symbols -128 and 128.
2022-11-01 09:24:29 +11:00
Peter Ross
db77483363 avcodec/mss2: initialise wmv9_mask variable
initialised to -1 which indicates wmv9 mask not present
2022-11-01 09:16:48 +11:00
Timo Rothenpieler
d772419237 configure: add pkg-config check for OpenAL 2022-10-31 18:42:12 +01:00
James Zern
fff4dbd90b avcodec/libaomdec: fix pix_fmt w/AVCOL_SPC_RGB
Signed-off-by: James Zern <jzern@google.com>
Reviewed-by: Vignesh Venkatasubramanian <vigneshv@google.com>
2022-10-31 10:06:55 -07:00
Andreas Rheinhardt
539777f008 avcodec/rv34: Remove always-true/false checks
low_delay is always zero for rv34.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-31 12:01:33 +01:00
Andreas Rheinhardt
1916ead811 avcodec/flvdec, intelh263dec: Remove redundant assignments
ff_mpeg1_dc_scale_table is the default value for
[yc]_dc_scale_table (as set by ff_mpv_common_defaults()).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-31 12:01:33 +01:00
Andreas Rheinhardt
700a39e63c avcodec/mpegvideodata: Mark tables as hidden
This e.g. allows compilers to bake the offset implied
by using ff_mpeg12_dc_scale_table[3] (as the SpeedHQ encoder
does) 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-10-31 12:01:33 +01:00
Andreas Rheinhardt
908b7fcfb2 avcodec/mpegvideodata: Join mpeg1/2 dc scale tables
Avoids relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-31 12:01:33 +01:00
Andreas Rheinhardt
920ce150c6 avcodec/mpegvideodata: Make DC scale tables smaller
These tables are only accessed in ff_set_qscale()
which only accesses values 1..31 as well as in
encode_picture() in mpegvideo_enc.c, accessing
the value with index 8. So make these tables smaller.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-31 12:01:33 +01:00
Andreas Rheinhardt
ed5a438f05 avcodec/mpegvideo_enc: Initialize dct_unquantize_int(ra|er) only once
For encoders, mpeg_quant is an option of the MPEG-4 encoder
and therefore constant. This implies that one can set
the dct_unquantize_(intra|inter) function pointers during init.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-30 23:52:24 +01:00
James Almer
5d5b87f688 avformat/mov_chan: use the cube layout
Signed-off-by: James Almer <jamrial@gmail.com>
2022-10-30 16:46:48 -03:00
James Almer
83e918de71 avutil/channel_layout: add a cube channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2022-10-30 16:18:30 -03:00
Brendan Hack
01b9abd771 avfilter/vf_frei0r: set align to 1 for frei0r frames
The frei0r API requires linesize to be width * 4.
Since the align property of ff_default_get_video_buffer2
specifies line alignment, not buffer alignment, the
previous value of 16 breaks this requirement for frames
whose width is a multiple of 8, but not a multiple of 16
as it adds extra padding to ensure line aligment.

Fix Trac ticket #9873
2022-10-29 17:11:14 +02:00
Andreas Rheinhardt
17987b371b avcodec/mpegvideo: Remove incorrect comment
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-29 13:37:41 +02:00
Andreas Rheinhardt
7e93fba51f avcodec/mpegvideo: Remove always-false check
This basically reverts cc0380222a.
At the time of said commit, cleanup on init failure was very
buggy. For codecs with the INIT_CLEANUP cap, the close function
could be called on error even before the private data has been
allocated; and when using frame threading the same could also
happen even without said flag. Some mpegvideo decoders were
affected by the latter.

Yet both of these issues have been fixed long ago, the latter
in commit e9b6617579. Therefore
the workaround in ff_mpv_common_end() can be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-29 13:37:41 +02:00
Andreas Rheinhardt
ca96456c0e avcodec/msmpeg4dec: Move setting decode_mb for WMV2 to wmv2dec.c
It avoids checks and allows to make ff_wmv2_decode_mb() static;
furthermore, it allows to avoid a config_components.h inclusion.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-29 13:37:41 +02:00
Andreas Rheinhardt
4200ed2e91 avcodec/mpegvideo: Allocate map and score_map buffers jointly
Reduces the amounts of allocs, frees and allocation checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-29 13:37:41 +02:00
Andreas Rheinhardt
20ee12c677 avcodec/mpegvideo: Don't overallocate buffer
Only encoders need two sets of int16_t [12][64]
(one to save the current best state and one for the current
working state); decoders need only one. This saves 1.5KiB
per slice context for a decoder.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-29 13:37:41 +02:00
Jun Zhao
307326b36d doc/protocols: update rtsp options
Split the rtsp options to muxer/demuxer, and update the options.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2022-10-29 12:26:42 +08:00
Jun Zhao
3497362be1 doc/examples/muxing: Remove unnecessary ret
Remove unnecessary ret and make the code more compact

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2022-10-29 12:26:30 +08:00
Andreas Rheinhardt
79508ee523 avcodec/metasound_data: Include data into metasound.c directly
It is only used by metasound.c, so this allows to make
the data static.

To do this, remove metasound_data.h, rename metasound_data.c
into metasound_data.h (and add inclusion guards, remove ff_
prefixes etc.).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:38:45 +02:00
Andreas Rheinhardt
6856cabd13 avcodec/metasound_data: Move data shared with twinvq into a new file
Namely into a header metasound_twinvq_data.h included
in twinvq.c (the common file of MetaSound and TwinVQ).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:38:45 +02:00
Andreas Rheinhardt
f8efd890bf avutil/tx_template: Move function pointers to const memory
This can be achieved by moving the AVOnce out of the structure
containing the function pointers; the latter can then be made
const.
This also has the advantage of eliminating padding in the structure
(sizeof(AVOnce) is four here) and allowing the AVOnces to be put
into .bss (dependening upon the implementation).

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:30:10 +02:00
Andreas Rheinhardt
188216581b avutil/tx_template: Avoid code duplication
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:30:10 +02:00
Andreas Rheinhardt
2af5f55b2e avutil/tx_template: Don't waste space for inexistent factors
It is possible to avoid the factors array for the power-of-two
tables for which said array is unused by using a different
structure for initialization for power-of-two tables than for
non-power-of-two-tables. This saves 3*15*16B from .data.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:29:41 +02:00
Andreas Rheinhardt
b71e2e42ef avcodec/aaccoder: Mark function pointer arrays as const
Forgotten in 57d305207a.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:08:11 +02:00
Andreas Rheinhardt
cdd50223a6 avformat/argo_cvg: Mark overrides as const
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-28 09:08:00 +02:00
Martin Storsjö
cb803a0072 swscale: aarch64: Fix yuv2rgb with negative strides
Treat the 32 bit stride registers as signed.

Alternatively, we could make the stride arguments ptrdiff_t instead
of int, and changing all of the assembly to operate on these
registers with their full 64 bit width, but that's a much larger
and more intrusive change (and risks missing some operation, which
would clamp the intermediates to 32 bit still).

Fixes: https://trac.ffmpeg.org/ticket/9985

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-10-27 21:49:26 +03:00