Marton Balint
9a7f060c32
avutil/random_seed: turn off buffering when reading from random
...
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-07-16 11:48:31 +02:00
Anton Khirnov
153cf85b24
fftools/ffmpeg_mux_init: fix an array declaration
...
map_func is supposed to be an array of const pointer to function
returning int, not an array of pointer to function returning const int.
Reported-By: Martin Storsjö
2023-07-16 11:10:00 +02:00
Pavel Koshevoy
35342dc390
lavc/audiotoolbox: fix build failure on osx 10.5 (v3)
...
Reviewed-by: Marvin Scholz <epirat07@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-15 19:57:47 -03:00
James Almer
e047d9c62b
avcodec/mpegvideo_dec: properly set output frames as keyframes
...
Should fix ticket #10426 .
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-15 19:47:40 -03:00
Paul B Mahol
c183f840fa
avfilter/af_axcorrelate: add another algorithm for calculation
...
Rewrite EOF logic while here.
2023-07-15 23:41:09 +02:00
Rémi Denis-Courmont
f032234953
aarch64: remove VFP feature check
...
This is not actually used for anything. The configure check causes the
CPU feature flag to be set, but nothing consumes it at all.
While AArch64 does have VFP, it is only used for the scalar C code.
Conversely, it is still possible to disable VFP, by changing the
C compiler flags as before (though that only makes sense for an
hypothetical non-standard Armv8 platform without VFP).
Note that this retains the "vfp" option flag, for backward
compatibility and on the very remote but theoretically possible chance
that FFmpeg actually makes use of it in the future.
AV_CPU_FLAG_VFP is retained as it is actually used by AArch32.
2023-07-15 22:56:30 +03:00
Rémi Denis-Courmont
82cb4b1c05
lavc/aarch64: remove bogus HAVE_VFP guard
...
The IMDCT offset is only relevant for NEON optimisations. There are no
VFP optimisations here that would justify the HAVE_VFP flag. In
practice, this makes no difference because HAVE_NEON is practically
always true for standard Armv8 platforms.
2023-07-15 22:56:30 +03:00
Timo Rothenpieler
3c73200be2
avfilter/vsrc_ddagrab: calculate pointer position on rotated screens
2023-07-15 18:48:49 +02:00
Timo Rothenpieler
da94c6a00c
avfilter/vsrc_ddagrab: account for mouse-only frames during probing
2023-07-15 17:06:58 +02:00
Niklas Haas
138d3ac15d
lavfi/vf_libplacebo: test for renderable pixel formats
...
Requires a new upstream function to test not for *import* support on a
given output pixel format, but also whether we can render to it.
Fixes: https://github.com/haasn/libplacebo/issues/173
2023-07-15 13:37:54 +02:00
Anton Khirnov
891167dee5
lavc/gifdec: unify get_buffer() calls I/P frames
...
Always call ff_reget_buffer(), which ensures that get_buffer2() is
called with AV_GET_BUFFER_FLAG_REF.
Fixes #10460 .
2023-07-15 11:35:59 +02:00
Anton Khirnov
acde0ae6c7
doc/ffmpeg: fix -enc_time_base documentation
...
Stop claiming the argument is always a floating point number, which
* confuses floating point and decimal numbers
* is not always true even accounting for the above point
2023-07-15 11:02:11 +02:00
Anton Khirnov
dff3a283cd
fftools/ffmpeg: rework -enc_time_base handling
...
Read the timebase from FrameData rather than the input stream. This
should fix #10393 and generally be more reliable.
Replace the use of '-1' to indicate demuxing timebase with the string
'demux'. Also allow to request filter timebase with
'-enc_time_base filter'.
2023-07-15 11:02:11 +02:00
Anton Khirnov
4d06742b93
fftools/ffmpeg: add more structure to FrameData
...
It now contains data from multiple sources, so group those items that
always come from the decoder. Also, initialize them to invalid values,
so that frames that did not originate from a decoder can be
distinguished.
2023-07-15 11:02:11 +02:00
Anton Khirnov
75d0af388f
fftools/ffmpeg_filter: make OutputFilter.filter private
...
It should not be accessed from outside of filtering code.
2023-07-15 11:02:11 +02:00
Anton Khirnov
9a97f9cf3a
fftools/ffmpeg_enc: initialize audio/video encoders from frame parameters
...
This is possible now that enc_open() is always called with a non-NULL
frame for audio/video.
Previously the code would directly reach into the buffersink, which is a
layering violation.
2023-07-15 11:02:11 +02:00
Anton Khirnov
b295ec31f3
fftools/ffmpeg_filter: only flush vsync code if encoding actually started
...
Otherwise this has no effect.
Will be useful in following commits.
2023-07-15 11:02:11 +02:00
Anton Khirnov
0a6751a78a
fftools/ffmpeg: rework initializing encoders with no frames
...
When no frames were passed from a filtergraph to an encoder, but the
filtergraph is configured (i.e. has output parameters), encoder flush
code will use those parameters to initialize the encoder in a last-ditch
effort to produce some useful output.
Rework this process so that it is triggered by the filtergraph, which
now sends a dummy frame with parameters, but no data, to the encoder,
rather than the encoder reaching backwards into the filter.
This approach is more in line with the natural data flow from filters to
encoders and will allow to reduce encoder-filter interactions in
following commits.
This code is tested by fate-adpcm-ima-cunning-trunc-t2-track1, which (as
confirmed by Zane) is supposed to produce empty output.
2023-07-15 11:02:11 +02:00
Anton Khirnov
20c42213ea
fftools/ffmpeg_mux_init: drop an obsolete assignment
...
This line was added in c30a4489b4
along with
AVStream.sample_aspect_ratio. However, configuring SAR for video
encoding is now done after this code (specifically in enc_open(), which
is called when the first video frame to be encoded is obtained), so this
line cannot have any meaningful effect.
2023-07-15 11:02:11 +02:00
Anton Khirnov
c328bff4da
fftools/ffmpeg_enc: return errors from enc_subtitle() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
2e742a2c3c
fftools/ffmpeg_mux: return errors from of_streamcopy() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
464a5e8e76
fftools/ffmpeg: handle error codes from process_input_packet()
...
None are returned for now, but that will change in future commits.
2023-07-15 11:02:11 +02:00
Anton Khirnov
5fe3914c39
fftools/ffmpeg: return an error instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
858b635613
fftools/ffmpeg_mux_init: replace all remaining aborts with returning error codes
...
Mainly concerns new_stream_*() and their callees.
2023-07-15 11:02:11 +02:00
Anton Khirnov
45473258ff
fftools/ffmpeg_mux_init: return error codes from metadata processing instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
dd44871eb9
fftools/ffmpeg_mux_init: improve of_add_programs()
...
Replace duplicated(!) and broken* custom string parsing with
av_dict_parse_string(). Return error codes instead of aborting.
* e.g. it treats NULL returned from av_get_token() as "separator not
found", when in fact av_get_token() only returns NULL on memory
allocation failure
2023-07-15 11:02:11 +02:00
Anton Khirnov
fd40197170
fftools/ffmpeg_mux_init: return error codes from validate_enc_avopt() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
4e3557aadb
fftools/ffmpeg_mux_init: return error codes from parse_forced_key_frames() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
6691d131d8
fftools/ffmpeg_mux_init: return error codes from copy_meta() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
54cbe6f57d
fftools/ffmpeg_mux_init: return error codes from ost_add() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
38a2fc2c29
fftools/ffmpeg_mux_init: move allocation out of prologue
...
ost_add() has a very large variable declaration prologue, performing
"active" actions that can fail in there is confusing.
2023-07-15 11:02:11 +02:00
Anton Khirnov
4e366100e9
fftools/ffmpeg_mux_init: return error codes from map_*() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
eee09cdf39
fftools/ffmpeg_mux_init: improve error handling in of_add_attachments()
...
* return error codes instead of aborting
* avoid leaking the AVIOContext on failure
* check the return code of avio_read()
2023-07-15 11:02:11 +02:00
Anton Khirnov
b3eedca5e5
fftools/ffmpeg_mux_init: return errors from create_streams() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
c23cff5a8a
fftools/ffmpeg_demux: return errors from ist_add() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
cce294638b
fftools/ffmpeg: return errors from assert_file_overwrite() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
2d59873fc1
fftools/ffmpeg_demux: add logging for -dump_attachment
...
Makes it more clear what was written where.
2023-07-15 11:02:11 +02:00
Anton Khirnov
63e4e8e4f4
fftools/ffmpeg_demux: forward errors from dump_attachment() instead of aborting
...
Also, check the return code of avio_close().
2023-07-15 11:02:11 +02:00
Anton Khirnov
ff0160cb37
fftools/ffmpeg_demux: drop a redundant avio_flush()
...
It is immediately followed by avio_close(), which is documented to flush
the buffers.
2023-07-15 11:02:11 +02:00
Anton Khirnov
ad80857a97
fftools/ffmpeg_demux: return errors from ifile_open() instead of aborting
2023-07-15 11:02:11 +02:00
Anton Khirnov
c313cdd70c
fftools/ffmpeg_mux_init: return errors from of_open() instead of aborting
2023-07-15 11:02:11 +02:00
Paul B Mahol
ef3b5789ec
avfilter/af_atempo: improve RE_MALLOC_OR_FAIL macro
...
Make use of third parameter of av_calloc() call.
2023-07-15 10:52:15 +02:00
Anton Khirnov
f264204de9
lavc: deprecate AV_CODEC_FLAG_DROPCHANGED
...
This decoding flag makes decoders drop all frames after a parameter
change, but what exactly constitutes a parameter change is not well
defined and will typically depend on the exact use case.
This functionality then does not belong in libavcodec, but rather in
user code
2023-07-15 10:19:33 +02:00
Logan Lyu
9557bf26b3
lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_hv
...
put_hevc_epel_uni_w_hv4_8_c: 254.6
put_hevc_epel_uni_w_hv4_8_i8mm: 102.9
put_hevc_epel_uni_w_hv6_8_c: 411.6
put_hevc_epel_uni_w_hv6_8_i8mm: 221.6
put_hevc_epel_uni_w_hv8_8_c: 669.4
put_hevc_epel_uni_w_hv8_8_i8mm: 214.9
put_hevc_epel_uni_w_hv12_8_c: 1412.6
put_hevc_epel_uni_w_hv12_8_i8mm: 481.4
put_hevc_epel_uni_w_hv16_8_c: 2425.4
put_hevc_epel_uni_w_hv16_8_i8mm: 647.4
put_hevc_epel_uni_w_hv24_8_c: 5384.1
put_hevc_epel_uni_w_hv24_8_i8mm: 1450.6
put_hevc_epel_uni_w_hv32_8_c: 9470.9
put_hevc_epel_uni_w_hv32_8_i8mm: 2497.1
put_hevc_epel_uni_w_hv48_8_c: 20930.1
put_hevc_epel_uni_w_hv48_8_i8mm: 5635.9
put_hevc_epel_uni_w_hv64_8_c: 36682.9
put_hevc_epel_uni_w_hv64_8_i8mm: 9712.6
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-14 21:19:12 +03:00
Logan Lyu
d48c89701c
lavc/aarch64: new optimization for 8-bit hevc_epel_h
...
put_hevc_epel_h4_8_c: 67.1
put_hevc_epel_h4_8_i8mm: 21.1
put_hevc_epel_h6_8_c: 147.1
put_hevc_epel_h6_8_i8mm: 45.1
put_hevc_epel_h8_8_c: 237.4
put_hevc_epel_h8_8_i8mm: 72.1
put_hevc_epel_h12_8_c: 527.4
put_hevc_epel_h12_8_i8mm: 115.4
put_hevc_epel_h16_8_c: 943.6
put_hevc_epel_h16_8_i8mm: 153.9
put_hevc_epel_h24_8_c: 2105.4
put_hevc_epel_h24_8_i8mm: 384.4
put_hevc_epel_h32_8_c: 3631.4
put_hevc_epel_h32_8_i8mm: 519.9
put_hevc_epel_h48_8_c: 8082.1
put_hevc_epel_h48_8_i8mm: 1110.4
put_hevc_epel_h64_8_c: 14400.6
put_hevc_epel_h64_8_i8mm: 2057.1
put_hevc_qpel_h4_8_c: 124.9
put_hevc_qpel_h4_8_neon: 43.1
put_hevc_qpel_h4_8_i8mm: 33.1
put_hevc_qpel_h6_8_c: 269.4
put_hevc_qpel_h6_8_neon: 90.6
put_hevc_qpel_h6_8_i8mm: 61.4
put_hevc_qpel_h8_8_c: 477.6
put_hevc_qpel_h8_8_neon: 82.1
put_hevc_qpel_h8_8_i8mm: 99.9
put_hevc_qpel_h12_8_c: 1062.4
put_hevc_qpel_h12_8_neon: 226.9
put_hevc_qpel_h12_8_i8mm: 170.9
put_hevc_qpel_h16_8_c: 1880.6
put_hevc_qpel_h16_8_neon: 302.9
put_hevc_qpel_h16_8_i8mm: 251.4
put_hevc_qpel_h24_8_c: 4221.9
put_hevc_qpel_h24_8_neon: 893.9
put_hevc_qpel_h24_8_i8mm: 626.1
put_hevc_qpel_h32_8_c: 7437.6
put_hevc_qpel_h32_8_neon: 1189.9
put_hevc_qpel_h32_8_i8mm: 959.1
put_hevc_qpel_h48_8_c: 16838.4
put_hevc_qpel_h48_8_neon: 2727.9
put_hevc_qpel_h48_8_i8mm: 2163.9
put_hevc_qpel_h64_8_c: 29982.1
put_hevc_qpel_h64_8_neon: 4777.6
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-14 21:19:12 +03:00
Logan Lyu
668eb4c00e
lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_v
...
put_hevc_epel_uni_w_v4_8_c: 116.1
put_hevc_epel_uni_w_v4_8_neon: 48.6
put_hevc_epel_uni_w_v6_8_c: 248.9
put_hevc_epel_uni_w_v6_8_neon: 80.6
put_hevc_epel_uni_w_v8_8_c: 383.9
put_hevc_epel_uni_w_v8_8_neon: 91.9
put_hevc_epel_uni_w_v12_8_c: 806.1
put_hevc_epel_uni_w_v12_8_neon: 202.9
put_hevc_epel_uni_w_v16_8_c: 1411.1
put_hevc_epel_uni_w_v16_8_neon: 289.9
put_hevc_epel_uni_w_v24_8_c: 3168.9
put_hevc_epel_uni_w_v24_8_neon: 619.4
put_hevc_epel_uni_w_v32_8_c: 5632.9
put_hevc_epel_uni_w_v32_8_neon: 1161.1
put_hevc_epel_uni_w_v48_8_c: 12406.1
put_hevc_epel_uni_w_v48_8_neon: 2476.4
put_hevc_epel_uni_w_v64_8_c: 22001.4
put_hevc_epel_uni_w_v64_8_neon: 4343.9
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-14 21:19:12 +03:00
Logan Lyu
0c604b1913
lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_h
...
put_hevc_epel_uni_w_h4_8_c: 126.1
put_hevc_epel_uni_w_h4_8_i8mm: 41.6
put_hevc_epel_uni_w_h6_8_c: 222.9
put_hevc_epel_uni_w_h6_8_i8mm: 91.4
put_hevc_epel_uni_w_h8_8_c: 374.4
put_hevc_epel_uni_w_h8_8_i8mm: 102.1
put_hevc_epel_uni_w_h12_8_c: 806.1
put_hevc_epel_uni_w_h12_8_i8mm: 225.6
put_hevc_epel_uni_w_h16_8_c: 1414.4
put_hevc_epel_uni_w_h16_8_i8mm: 333.4
put_hevc_epel_uni_w_h24_8_c: 3128.6
put_hevc_epel_uni_w_h24_8_i8mm: 713.1
put_hevc_epel_uni_w_h32_8_c: 5519.1
put_hevc_epel_uni_w_h32_8_i8mm: 1118.1
put_hevc_epel_uni_w_h48_8_c: 12364.4
put_hevc_epel_uni_w_h48_8_i8mm: 2541.1
put_hevc_epel_uni_w_h64_8_c: 21925.9
put_hevc_epel_uni_w_h64_8_i8mm: 4383.6
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-14 21:19:12 +03:00
Logan Lyu
e652e7dcda
lavc/aarch64: new optimization for 8-bit hevc_pel_uni_pixels
...
put_hevc_pel_uni_pixels4_8_c: 35.9
put_hevc_pel_uni_pixels4_8_neon: 7.6
put_hevc_pel_uni_pixels6_8_c: 46.1
put_hevc_pel_uni_pixels6_8_neon: 20.6
put_hevc_pel_uni_pixels8_8_c: 53.4
put_hevc_pel_uni_pixels8_8_neon: 11.6
put_hevc_pel_uni_pixels12_8_c: 89.1
put_hevc_pel_uni_pixels12_8_neon: 25.9
put_hevc_pel_uni_pixels16_8_c: 106.4
put_hevc_pel_uni_pixels16_8_neon: 20.4
put_hevc_pel_uni_pixels24_8_c: 137.6
put_hevc_pel_uni_pixels24_8_neon: 47.1
put_hevc_pel_uni_pixels32_8_c: 173.6
put_hevc_pel_uni_pixels32_8_neon: 54.1
put_hevc_pel_uni_pixels48_8_c: 268.1
put_hevc_pel_uni_pixels48_8_neon: 117.1
put_hevc_pel_uni_pixels64_8_c: 346.1
put_hevc_pel_uni_pixels64_8_neon: 205.9
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-14 21:19:12 +03:00
James Almer
74611cdb5c
avcodec/decode: use the correct function name
...
Fixes compilation erros.
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-14 13:59:40 -03:00
James Almer
dd7bdb40c4
avcodec/decode: fill missing frame fields for all decoders
...
And not just those with the old decode() API.
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-14 13:58:10 -03:00