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

119860 Commits

Author SHA1 Message Date
6fdb54ddee lavc/hashtable: create generic robin hood hash table
Adds a generic hash table with the DXV encoder as an initial use case.

Signed-off-by: Emma Worley <emma@emma.gg>
2025-06-02 20:51:27 -07:00
854b8690a6 Add myself to MAINTAINERS for dxv/dxvenc
Signed-off-by: Emma Worley <emma@emma.gg>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-06-03 01:48:13 +02:00
afb91360ea fftools/Makefile: clean files from fftools/{graph,textformat}/ 2025-06-03 01:07:15 +02:00
93e53e253a avcodec/vc1dsp: Fix vc1op_pixels_func semantics
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:43:10 +02:00
09aeeeb663 avcodec/hpeldsp_init: Detemplatize
Since a51279bbde,
hpeldsp_rnd_template.c was only included once and
one of the two functions in rnd_template.c was
only enabled once.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:42:53 +02:00
83b3469142 avcodec/x86/hpeldsp_init: Use ff_avg_pixels16_mmxext
avg_pixels_tab[0][0] does the same as avg_no_rnd_pixels_tab[0].

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:41:51 +02:00
6d45668801 avcodec/hpeldsp: Remove duplicate pel functions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:41:44 +02:00
2d5f5e8726 avcodec/ac3dec: Deduplicate tables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:37:41 +02:00
dbd2ca3580 avcodec/ac3{dec,enc}: Deduplicate gain levels table
(I don't know why the encoder only uses eight of the nine values.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:37:41 +02:00
11723b3526 avcodec/ac3: Move gain value defines to ac3defs.h
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:37:41 +02:00
20caa5cf2d avcodec/ac3dec: Deduplicate mantissas and their init code
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:37:41 +02:00
9416ffd8b8 avcodec/ac3dec: Hardcode tables to save space
The code to initialize the ungrouped bap mantissa tables
(bap 3 or 5) takes more bytes of .text than the tables itself;
they have therefore been hardcoded.

For GCC (14, -O3, albeit in an av_cold function), the initialization
code takes 99B each for the fixed and floating point decoders
(the code is currently duplicated), whereas the hardcoded tables
only take 96B. For Clang 19 it were 374B each (I don't now what
Clang was doing there).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:37:41 +02:00
fa45e20029 tests/fate/mov: Fix fate-mov-mp4-frag-flush requirements
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 13:35:23 +02:00
688f3944ce fftools/graph/graphprint: Remove redundant avio_flush()
The AVIOContext will be automatically flushed upon closure.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 00:49:02 +02:00
e3b0320745 fftools/ffprobe: Fix indentation
Forgotten after d76b0c4a35.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 00:48:29 +02:00
5c5c7dff2b fftools/ffprobe: Factor writing common side data types out
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 00:48:18 +02:00
6f452ad1ac fftools/textformat/avtextformat: Fix races when initializing formatters
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 00:47:33 +02:00
4947e56974 fftools/resources/resman: Use proper logcontext
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 00:47:16 +02:00
6d5e18b2f3 fftools/resources/resman: Use assert for always-false condition
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 00:46:46 +02:00
06cd9086c3 fftools/resources/resman: Don't alloc ResourceManager, fix race
The resman_ctx pointer was accessed outside of its guarding
mutex.

Also make the ResourceManager static.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 00:45:18 +02:00
b4c5397642 fftools/textformat/avtextformat: Avoid relocations
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 00:45:13 +02:00
0742239289 fftools/graph/graphprint: Fix races when initializing graphprint
Setting print_graphs_format (in case no -print_graphs_format
option was specified) is racy, as is using av_strtok()
to split it. Both have been removed.

Notice that using av_strtok() was destructive: In the absence
of races the options would only have been applied for the
first initialization.

Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-06-02 00:44:44 +02:00
6ede1e3fbf fftools/ffmpeg_filter: make InputFilterPriv and OutputFilterPriv private again
As the names imply, they are structs meant to be internal and private to the
filter handling code. If a field is required in other modules, then it can
be moved to the public facing structs, which is done in this commit.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-06-01 14:12:50 -03:00
1f034714f6 fftools/ffmpeg_filter: make FilterGraphPriv private again
As the name implies, it's a struct meant to be internal and private to the
filter handling code. If a field is required in other modules, then it can
be moved to the public facing struct, which is done in this commit.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-06-01 14:12:50 -03:00
8ea2b993fd avformat/movenc: Reduce loop iterations in mov_flush_fragment
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-01 16:37:00 +08:00
56cf1c084d avformat/movenc: Fix flush fragment
The follow cmd output corrupted file before the patch:

ffmpeg -f lavfi -i color=blue,trim=duration=0.04 \
	-f lavfi -i anullsrc,atrim=duration=2 \
	-movflags +empty_moov+hybrid_fragmented \
	-frag_duration 1000000 \
	-frag_interleave 1 \
	output.mp4

1. first_track is the first track with track->entry != 0. As in the
command above, video track (track index 0) has a single frame. When
flush the second fragment, first_track is 1, the audio track.

2. write_moof = i == first_track, so write_moof is false for i = 0.

3. When mov->frag_interleave != 0, mov->mdat_buf != NULL, because
it contains audio data. So avio_write is called before write_moof,
that is, the data write before moof, and mov_finish_fragment
executed with wrong mdat_start.

4. With normal fmp4 output, the error isn't obvious. With
hybrid_fragmented, ffplay output.mp4 shows a lot of error messages.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-01 16:36:54 +08:00
3d9b284ad1 tests: Add fate-hevc-color-reserved
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-01 16:35:23 +08:00
64116800be tests/fate/hevc: Fix dependancy for hevc-alpha
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-01 16:35:23 +08:00
9a19ba4067 tests/fate/cbs: Add hevc metadata set color test
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-01 16:35:23 +08:00
c80002aa81 avcodec/h2645_vui: Ensure color primaries/trc/space isn't reserved value
Fix error reported by swscaler:
Unsupported input (Operation not supported): fmt:yuv420p csp:unknown prim:reserved trc:bt709 -> fmt:yuv420p csp:bt709 prim:reserved trc:bt709

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-06-01 16:35:23 +08:00
6c291232cf avformat/movenc: fix VVC encoding with leading pictures
The default behavior for VVenC (since v1.10.0) is to create an IDR with
leading pictures for the first picture in decoding order (POC 32). This
leads to FFmpeg generating an edit list with an empty entry, skipping
the leading pictures.

This patch fixes the calculation for the start_pts, while the DTS is
negative (as produced by vvenc).

Signed-off-by: Gabriel Hege <g+ffmpeg@hege.cc>
2025-05-31 09:47:50 +08:00
a02e880e35 avcodec/vvc/sei: add decode_mastering_display_colour_volume
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
f6d2f38530 avcodec/vvc/sei: add decode_ambient_viewing_environment
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
761f75db74 avcodec/vvc: support fields
passed files:
    FIELD_A_Panasonic_4.bit
    FIELD_B_Panasonic_2.bit

Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
870fa133af avcodec/vvc/sei: add decode_frame_field_info
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
299544bd0c avcodec/h274: add H274SEIFrameFieldInfo struct
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
33d511b581 avcodec/cbs_sei_syntax_template: add sei message frame_field_information
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
97137e38c1 avcodec/vvc/sei: add decode_content_light_level_info
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
40bc5e119e avcodec/vvc/sei: add decode_display_orientation
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
d140648c31 avcodec/cbs_sei_syntax_template: add sei message sei_display_orientation
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
23e9912315 avcodec/vvcdec: verify picture hash
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
9620c95edb avcodec/h274: add ff_h274_hash functions
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
8dfc24cdce avcodec/vvc/sei: add decode_decoded_picture_hash
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
942cf59e9d avcodec/h274: add H274SEIPictureHash struct
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
312f8ef2ca avcodec/vvc/dec: support removing film grain params from side data
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
a8d949bd96 avcodec/vvc/dec: support applying film grain by the decoder
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
1608d60001 avcodec/vvc/dec: export sei to the frame when the frame starts
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
1c87e3625a avcodec/vvc/sei: add decode_film_grain_characteristics
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
ab5df96cef avcodec/vvc: support decoding prefix and suffix nal units
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00
bf3a7291db avcodec/cbs_sei_syntax_template: add sei message film_grain_characteristics
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
2025-05-31 09:35:54 +08:00