1
0
Commit Graph

116250 Commits

Author SHA1 Message Date
694d34a26f
matroskadec_haali: refactor/simplify for edition support
- creating IOstreams
- Cue-aware seeking
- Cleanup
2024-07-01 09:55:00 +02:00
340726a210
matroskadec_haali: avoid memcpys when the packet data can be reused as-is. 2024-07-01 09:55:00 +02:00
f27b9a3574
matroskadec_haali: only use default values for DisplayWidth/Height if appropriate.
The default values are only valid when the DisplayUnit is 0 (pixels), and all other
values require explicit coding of the DisplayWidth/Height values.
2024-07-01 09:55:00 +02:00
18f6b3cb0a
HACK: store dvd palette info for user-app use 2024-07-01 09:55:00 +02:00
d454a7ba15
aac: 7.1 should have side channels, and not 2 pairs of front channels. 2024-07-01 09:55:00 +02:00
cabd40a059
swresample: add a "clipping protection" mode when mixing
This mode normalizes audio down to stay below 1.0 after mixing, so no clipping occurs when converting to integer formats.
2024-07-01 09:55:00 +02:00
b29a75d699
matroskadec_haali: parse new CueDuration and CueRelativePosition elements
Parse the new elements into the Cue structure, but they remain unused in the Matroska Parser itself.
2024-07-01 09:55:00 +02:00
21f48193d7
HACK: mov: when seeking secondary streams, don't insist on key-frames. 2024-07-01 09:55:00 +02:00
f5a91bb972
HACK: preserve mpeg2 END_OF_SEQ code to the start of the next frame to cause a implicit decoder flush 2024-07-01 09:55:00 +02:00
953e941d2a
HACK: make the image2pipe demuxer work more like we want it to. 2024-07-01 09:55:00 +02:00
87a6d52070
HACK: dvdsubdec: try to improve default dvd subtitle color guessing 2024-07-01 09:55:00 +02:00
cbe8a15647
avidec: force probing of subtitle streams 2024-07-01 09:55:00 +02:00
045fd7ac33
h264: flag interlaced-coded frames as such when sei_pic_struct indicates otherwise
According to the H.264 standard, Annex D, Table D-1, field_pic_flag shall be 0 when sei_pic_struct signals progressive. In the case when this restriction is not fullfilled, its safer to assume the field is actually interlaced.
Not doing so can cause a renderer to assume the frame is progressive and not deinterlace it, even if required.
2024-07-01 09:55:00 +02:00
274c63f8c5
configure: don't use pkgconfig for libopus or libspeex (HACK) 2024-07-01 09:55:00 +02:00
a0703fa5c7
mpegvideo: null out current_picture_ptr when allocation failed
This avoids using an uninitialized picture in further decode calls.
2024-07-01 09:54:59 +02:00
9124e149b2
matroskadec_haali: Only accept a "sane" DefaultDuration for FPS.
Alot of files have their DefaultDuration set to an calculated
value which is not directly tied to the FPS, and because Matroska
actually doesn't specify the DefaultDuration to be tied to the FPS,
this is perfectly legal.

So, before assuming the DefaultDuration is the FPS, check if the value
actually makes sense. The most basic check here is that the FPS is
below 125fps, because any more really doesn't make sense.

If the FPS from the header is not set, avformat will probe the FPS
based on the files timestamps, which will give a much better result.
2024-07-01 09:54:59 +02:00
79e144643b
file: increase io buffer for better performance on high latency resources 2024-07-01 09:54:59 +02:00
805952386e
Add Matroska demuxer based on Haalis MatroskaParser 2024-07-01 09:54:59 +02:00
bc4040c9f1
build: remove slashes from the last lines of x86 build files
This unbreaks compilation in mingw with CRLF line endings
2024-07-01 09:54:59 +02:00
6f390cd725
mpegts: switch back to mpegts_get_pcr 2024-07-01 09:54:59 +02:00
2518ccc872
HACK: Don't return -1 in avformat_find_stream_info when codec details are still unknown. 2024-07-01 09:54:59 +02:00
73edaa302d
HACK: Add a function to manually add streams to the MPEG-TS demuxer
This is used by the BDMV demuxer when some streams are not detected by auto-probing
2024-07-01 09:54:59 +02:00
430e70fa38
HACK: disable mpegts crc checks for pat/pmt/... 2024-07-01 09:54:59 +02:00
82134400f2
Silently error out when pos_limit exceeds pos_max instead of aborting the process. 2024-07-01 09:54:59 +02:00
6cece46d8a
Export avcodec functions used in LAV 2024-07-01 09:54:59 +02:00
a805dbe8ac
avformat: add a new flag to let the user indicate the file is on a slow network device 2024-07-01 09:54:59 +02:00
b8038271ba
Export avformat functions used in LAV 2024-07-01 09:54:59 +02:00
1a768a6d76
dxva2_mpeg2: prevent calling end_frame without start_frame 2024-07-01 09:54:59 +02:00
1d2ae9e9f3
prores: set avtx->pix_fmt based on the fourcc code during init 2024-07-01 09:54:59 +02:00
3d5976c4ae
HACK: Disable automatic multi-threading.
Using multi-threading for stream probing is a bad idea.
2024-07-01 09:54:59 +02:00
a8056531da
Increase the maximum probe size to 4MB.
This allows detection of some files with corruption within the first few MB and should not have a speed impact on previous functional files.
2024-07-01 09:54:59 +02:00
Cory Fields
8b432e3d85
mpegts: do not reparse PMT unless it's version has changed 2024-07-01 09:54:59 +02:00
fdcf2c35fd
Add "safe" full parsing mode.
In this mode, the parser does completely process the frame, but timestamps
are not mangled in compute_pkt_fields.
2024-07-01 09:54:58 +02:00
db36f0f159
h264: populate AVCodecContext with SPS values during codec init
This allows user code to properly detect HW decoding compat before decoding actually starts.
2024-07-01 09:54:58 +02:00
407136dc85
Don't discard timestamps that are considered "invalid", still better then none at all. 2024-07-01 09:54:58 +02:00
c97f4c0dc1
HACK: Disable tb_unreliable, preserve original fps information. 2024-07-01 09:54:58 +02:00
Cory Fields
274241a621
get accurate estimate from the PTSes 2024-07-01 09:54:58 +02:00
Cory Fields
9ab544108a
if av_read_packet returns AVERROR_IO, we are done. ffmpeg's codecs might or might not handle returning any completed demuxed packets correctly 2024-07-01 09:54:52 +02:00
Rémi Denis-Courmont
b818dff8d8 lavc/vc1dsp: fix potential overflow in R-V V inv_trans_4
Judging by the coefficients, the last round of add/sub can overflow
to 17 bits with a very small probability just as with the 8-point
transform. This is not observed under FATE, but better safe than sorry.
2024-06-30 19:02:32 +03:00
Rémi Denis-Courmont
349c49fd1b lavc/vc1dsp: fix overflow in R-V V inv_trans_8
The last set of additions/subtractions can break the 16-bit limit, and
require 17 bits of precision. This uses widening adds accordingly to fix
the MSS2 FATE tests.

The problem potentially also affects inv_trans_4 with a very low
probability, but this is not reproducible under FATE.
2024-06-30 19:02:32 +03:00
Rémi Denis-Courmont
2c900d4c11 lavc/vc1dsp: factor R-V V inv_trans_8 code 2024-06-30 19:02:32 +03:00
Andreas Rheinhardt
2902ed25b5 avcodec/iirfilter: Move ff_iir_filter() to lavc/tests/iirfilter.c
It is only used by the test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-06-30 11:37:25 +02:00
Andreas Rheinhardt
2330e77c97 avfilter/textutils: Constify ff_expand_text()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-06-30 11:37:06 +02:00
Andreas Rheinhardt
ba457e9adb avfilter/textutils,vf_drawtext,qrencode: Constify function pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-06-30 11:37:04 +02:00
Andreas Rheinhardt
5a30b45c0f avcodec/mpeg12dec: Don't adapt (last|next)_pic.linesize for field pics
These values are not read anywhere. Furthermore, since commit
fe6037fd04 the linesize values
of the MPVWorkPictures were wrong for subsequent fields
in a chain of B-pictures (as they are always doubled and no longer
based upon the frame-linesizes) which can eventually lead to overflow.

Finally, it makes no real sense to ever double the linesize
of the reference pictures at all: Even when the current picture
is a field, it can still reference both fields of reference
pictures and therefore the linesize should allow to address
both fields (for the same reason, data is not offset for
reference pictures).

libavcodec/mpeg12dec.c:1304:41: runtime error: signed integer overflow: 4611686018427387904 * 2 cannot be represented in type 'long'

issue: 69732/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEGVIDEO_fuzzer-5123551179374592

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-06-30 11:34:36 +02:00
Andreas Rheinhardt
f26255962c avcodec/aacsbr_template: Remove unused-but-set variable
Also fixes a -Wdeclaration-after-statement.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-06-30 11:32:27 +02:00
Marton Balint
0d5e3f5a40 avutil/timestamp: avoid possible FPE when 0 is passed to av_ts_make_time_string2()
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-06-30 09:11:44 +02:00
Rémi Denis-Courmont
d5e603ddc0 lavu/lls: remove useless VSETVL
This changes neither VL nor VTYPE, so it can safely be removed.
2024-06-29 21:03:44 +03:00
James Almer
0b330d8642 avformat/mov: set Stereo3D type when parsing eyes box
If view is defined in the child stri box, then the type must be set to
unspecified, as these boxes don't carry packing information.
Also, don't attach a useless Stereo 3D side data if the stream is monoscopic.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-06-28 13:16:57 -03:00
James Almer
8af0919cc6 avutil/stereo3d: add a Stereo3D view to signal that the view is unspecified
Signed-off-by: James Almer <jamrial@gmail.com>
2024-06-28 13:16:57 -03:00