1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00
Commit Graph

119614 Commits

Author SHA1 Message Date
softworkz
1a083a4d90 fftools/ffmpeg: Include elapsed-time in print_report()
It's a highly useful metric, both at runtime and when viewing logs.

Signed-off-by: softworkz <softworkz@hotmail.com>
2025-05-03 07:57:01 +02:00
softworkz
7a05f57250 avutil/opt: Print default option value for AV_OPT_TYPE_INT64
Signed-off-by: softworkz <softworkz@hotmail.com>
2025-05-03 07:56:46 +02:00
softworkz
3a93fadac1 avformat/dump: Stream start offsets: change precision and label
- Change precision to 6 digits to align with other printed times
- Change label to just "Start"
- Add 's' unit to format 'start' value for consistency

Signed-off-by: softworkz <softworkz@hotmail.com>
2025-05-03 07:56:04 +02:00
James Almer
33d0d1c672 avformat/apvdec: don't fill container level fields with codec level info
This is a raw demuxer, it should not read codec level information and export it
as container level information.
The generic demux code will use the recently introduced parser to take care of
that.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-05-01 22:42:41 -03:00
James Almer
c4ea4abec2 avcodec: add an APV parser
Signed-off-by: James Almer <jamrial@gmail.com>
2025-05-01 22:42:34 -03:00
James Almer
8ebccdf2a4 avformat/av1dec: fix setting AVPacket->pos in Annex-B demuxer
This demuxers reads encapsulation bytes before reading codec data into the
output packets, so take such offset into consideration.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-05-01 14:24:04 -03:00
Lynne
707c04fe06 ffv1enc_vulkan: support 8 and 16-bit 2-plane YUV formats
This adds support for all 8-bit and 16-bit 2-plane formats.
P010 and others require more work as the data's LSB-padded.
2025-05-01 09:34:44 +02:00
Lynne
33a4d36101 hwcontext_vulkan: support AV_PIX_FMT_GBRP
Support was partially added previously in vulkan.c, but now it's fully
supported.
2025-05-01 09:34:44 +02:00
Lynne
9c0349cca1 aacdec_usac: correct Mps212 parsing location
It gets parsed after SBR, even if there is no SBR.
2025-05-01 09:34:39 +02:00
James Almer
e80f32f3bd avcodec/cbs_apv: don't return an error when reading empty buffers
The output will be a fragment with zero units, which is a lot more user friendly
than making them think something went wrong, as it already happens with cbs_av1.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-04-30 19:15:19 -03:00
Mark Thompson
a8bae9b18d fate: Add test for APV 422-10 profile
Bitstream generated using the reference encoder, then edited to fix the
colour description and an extra metadata block added.  FFmpeg decoder
output is identical to the reference decoder output.

The content used is the first three frames of "Waterfall" from the SVT
Open Content Video Test Suite 2022.  This is copyright Sveriges
Television AB and is used under the Creative Commons Attribution 4.0
International License.
2025-04-30 22:57:56 +01:00
Mark Thompson
585455f7b3 apv_decode: Replace division with shift
The compiler can't see that this should be a shift and generates a real
division which is slow enough to appear in profiles on its own.
2025-04-30 22:57:56 +01:00
Andreas Rheinhardt
0b588bfb51 avcodec/apv_dsp: Fix left-shift of negative value
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-30 23:38:21 +02:00
Andreas Rheinhardt
c681d8e8a8 avformat/apvdec: Remove inappropriate INIT_CLEANUP flag
The init-cleanup flag makes no sense for a demuxer without
a read_close() function.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-30 23:34:47 +02:00
Andreas Rheinhardt
f98c63e417 avformat/apvdec: Fix seeking
pkt->pos pointed to the actual packet data, not to the start
of the access unit.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-30 23:34:28 +02:00
Andreas Rheinhardt
8279d02cf1 avformat/apvdec: Check before access
The signature check would segfault in case the packet could not
be allocated or if nothing could be read.
Furthermore, read_packet callbacks are supposed to return zero
on success, yet the current code returned the size of the packet.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-30 23:33:39 +02:00
Andreas Rheinhardt
0a12b84d3b avformat/apvdec: Use ffio_read_size()
Fixes potential use of uninitialized data.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-30 23:32:55 +02:00
Michael Niedermayer
48c0dba23b avformat/hls: Fix Youtube AAC
Fixes: Ticket11435
Fixes: yt-dlp -f 234+270 https://www.youtube.com/live/l8PMl7tUDIE

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-30 00:06:17 +02:00
Romain Beauxis
2431fd0b27 tests: Add stream dump test API util, use it to dump stream data for chained ogg/{vorbis, opus, flac} streams.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-30 00:03:00 +02:00
Michael Niedermayer
d82016c730 avformat/hls: add fmp4 to allowed_extensions
Fixes: yt-dlp/issues/12700

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-29 22:59:24 +02:00
Michael Niedermayer
68644994fd avformat/hls: Add ec3 to allowed_extensions
Fixes part of Ticket11435
Fixes: Elisa Viihde (Finnish online recording service)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-29 22:59:24 +02:00
Michael Niedermayer
0da6ddfc01 avformat/hls: Point user to how to easily contribute a fix for missing extensions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-29 22:59:23 +02:00
Michael Niedermayer
2352145e41 avformat/hls: Add cmfv and cmfa to allowed_extensions
Fixes: www.nicovideo.jp
Fixes: Ticket11526
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-29 22:59:23 +02:00
Shiyou Yin
ab8e160f71 avcodec: Fix fate-checkasm-hevc_pel failed on LA.
Some loop counters were initialized incorrectly.
This patch enhances the handling of loop iterations and residual parts.

Reviewed-by: 陈昊 <chenhao@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-29 22:59:23 +02:00
Gyan Doshi
d9bd8e9eb1 doc/ffprobe: remove entry for show_format_entry
The option was removed in 1dd6363581.
2025-04-29 14:42:01 +05:30
Zhao Zhili
9187f40e92 avformat/http: Ensure same protocol in ff_http_do_new_request2
This can happen for HLS with AES-128 at the middle of m3u8, so old
protocol is https while new protocol is crypt+https.

And change the log level from ERROR to INFO when protocol/host/port
don't match. User should prepared for this function to fail and
retry with new connection.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-04-29 15:25:46 +08:00
Zhao Zhili
bb0c4649fb avformat/hls: Fix get key file error
The offset and end_offset options are meant for segment, not for key.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-04-29 15:25:41 +08:00
Zhao Zhili
25812d3033 avcodec/bsf/h264_mp4toannexb: Fix mixed bitstream format
This bsf converts AV_PKT_DATA_NEW_EXTRADATA side data in avcc format
to in-band annexb format. However, the side data wasn't been removed
and copied from input packet to output packet. So the output packet
has mixed bitstream format. We don't support mixed bitstream format.
For example, h264_metadata report error in the following case:

ffmpeg -i foo.flv \
  -bsf:v "h264_mp4toannexb,h264_metadata" \
  -c copy -f null

This patch removed NEW_EXTRADATA side data after process.

This patch also add a check so only NEW_EXTRADATA in avcc format is
processed. NEW_EXTRADATA in annexb format is copied to output as is.

Reported-by: jiangjie <jiangjie618@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-04-29 15:25:08 +08:00
Zhao Zhili
26752368f0 aarch64/h26x: Add put_hevc_pel_bi_w_pixels
On rpi5 (A76):

put_hevc_pel_bi_w_pixels4_8_c:                          90.0 ( 1.00x)
put_hevc_pel_bi_w_pixels4_8_neon:                       34.1 ( 2.64x)
put_hevc_pel_bi_w_pixels6_8_c:                         188.3 ( 1.00x)
put_hevc_pel_bi_w_pixels6_8_neon:                       73.5 ( 2.56x)
put_hevc_pel_bi_w_pixels8_8_c:                         327.1 ( 1.00x)
put_hevc_pel_bi_w_pixels8_8_neon:                       75.8 ( 4.32x)
put_hevc_pel_bi_w_pixels12_8_c:                        728.8 ( 1.00x)
put_hevc_pel_bi_w_pixels12_8_neon:                     186.1 ( 3.92x)
put_hevc_pel_bi_w_pixels16_8_c:                       1288.1 ( 1.00x)
put_hevc_pel_bi_w_pixels16_8_neon:                     268.5 ( 4.80x)
put_hevc_pel_bi_w_pixels24_8_c:                       2855.5 ( 1.00x)
put_hevc_pel_bi_w_pixels24_8_neon:                     723.8 ( 3.95x)
put_hevc_pel_bi_w_pixels32_8_c:                       5095.3 ( 1.00x)
put_hevc_pel_bi_w_pixels32_8_neon:                    1165.0 ( 4.37x)
put_hevc_pel_bi_w_pixels48_8_c:                      11521.5 ( 1.00x)
put_hevc_pel_bi_w_pixels48_8_neon:                    2856.0 ( 4.03x)
put_hevc_pel_bi_w_pixels64_8_c:                      21020.5 ( 1.00x)
put_hevc_pel_bi_w_pixels64_8_neon:                    4699.1 ( 4.47x)

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-04-29 15:24:14 +08:00
Zhao Zhili
39786f8cd5 aarch64/h26x: optimize sao_band_filter
int8_t[] is enough for offset_table of 8 bit streams.

On rpi5:
                             Before               After
hevc_sao_band_8_8_c:          252.3 ( 1.00x)     252.3 ( 1.00x)
hevc_sao_band_8_8_neon:        95.8 ( 2.63x)      61.0 ( 4.57x)
hevc_sao_band_16_8_c:         875.2 ( 1.00x)     864.9 ( 1.00x)
hevc_sao_band_16_8_neon:      317.5 ( 2.76x)     150.0 ( 6.26x)
hevc_sao_band_32_8_c:        3853.5 ( 1.00x)    3871.6 ( 1.00x)
hevc_sao_band_32_8_neon:     1222.3 ( 3.15x)     550.6 ( 7.39)
hevc_sao_band_48_8_c:        8203.6 ( 1.00x)    8182.6 ( 1.00x)
hevc_sao_band_48_8_neon:     2685.7 ( 3.05x)    1185.8 ( 7.36x)
hevc_sao_band_64_8_c:       14023.0 ( 1.00x)   14038.9 ( 1.00x)
hevc_sao_band_64_8_neon:     4783.2 ( 2.93x)    2078.4 ( 7.15x)

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-04-29 15:11:45 +08:00
Zhao Zhili
ca964ba139 avformat/mov: Reduce seek when interleaved_read is disabled
Don't select sample with small dts when interleaved_read is disabled.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-04-29 14:35:09 +08:00
Andreas Rheinhardt
d11d4277f9 postproc/tests: Add test tools to .gitignore
Reviewed-by: Marvin Scholz <epirat07@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-28 16:56:44 +02:00
Andreas Rheinhardt
fcc562693e avcodec/apv_decode: Remove redundant log message
ff_thread_get_buffer() already emits its own logmessage.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-27 23:00:10 +02:00
Andreas Rheinhardt
e2fcf234e4 avcodec/apv_decode: Fix shadowing
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-27 23:00:07 +02:00
Andreas Rheinhardt
431c0f305d avformat/apvenc: Add AVFMT_NOTIMESTAMPS flag
This is a raw format.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-27 23:00:02 +02:00
Andreas Rheinhardt
aa50d2eca2 avformat/apvenc: Remove unused header
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-27 22:59:59 +02:00
Andreas Rheinhardt
7fd796c600 avformat/apvenc: Only allow APV
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-27 22:59:40 +02:00
Mark Thompson
8ea11dcd84 Changelog, doc: Add entries for new APV features 2025-04-27 15:52:30 +01:00
Mark Thompson
b511c767d0 lavf: APV muxer 2025-04-27 15:52:30 +01:00
Mark Thompson
de42e06b5b lavc: APV metadata bitstream filter 2025-04-27 15:52:30 +01:00
Mark Thompson
d03c99441d lavc/apv: AVX2 transquant for x86-64
Typical checkasm result on Alder Lake:

decode_transquant_8_c:                                 464.2 ( 1.00x)
decode_transquant_8_avx2:                               86.2 ( 5.38x)
decode_transquant_10_c:                                481.6 ( 1.00x)
decode_transquant_10_avx2:                              83.5 ( 5.77x)
2025-04-27 15:52:30 +01:00
Mark Thompson
483cadf8d7 lavc: APV decoder 2025-04-27 15:52:30 +01:00
Mark Thompson
324330a11e lavf: APV demuxer
Demuxes raw streams as defined in draft spec section 10.2.
2025-04-27 15:52:30 +01:00
Mark Thompson
821717c3fe lavc/cbs: APV support 2025-04-27 15:52:30 +01:00
Mark Thompson
0c79a091e4 lavc: APV codec ID and descriptor 2025-04-27 15:52:30 +01:00
Michael Niedermayer
fb36f170de avcodec/ffv1enc: Eliminate fabs()
Fixes: warning: using floating point absolute value function 'fabs' when argument is of integer type
No change in output
Changing variables to float worsens compression significantly

Found-by: ePirat
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-27 05:04:35 +02:00
Michael Niedermayer
716c3986c6 fate: add stripetest
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-27 05:04:34 +02:00
Michael Niedermayer
342869ad7c tests: Add libpostproc blocktest
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-27 05:04:34 +02:00
Michael Niedermayer
142eb90f07 postproc/postprocess_template: fix handling of first row of dering_C
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-27 05:04:34 +02:00
Michael Niedermayer
0118f392be postproc/postprocess_template: Fix reading uninitialized pixels in dering_C()
This issue was found through the new blocktest

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-04-27 05:04:19 +02:00