Michael Niedermayer
9bb38ba2b7
avformat/rtsp: use < 0 for error check
...
Found while reviewing CID1473532 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:31 +02:00
Michael Niedermayer
7a9ddb7051
avformat/rtpenc_vc2hq: Check sizes
...
Fixes: CID1452585 Untrusted loop bound
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:30 +02:00
Michael Niedermayer
382e9e79f3
avfilter/af_aderivative: Free out on error
...
Fixes: CID1197065 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:30 +02:00
Michael Niedermayer
66b60bae68
swscale/swscale: Use ptrdiff_t for linesize computations
...
This is unlikely to make a difference
Fixes: CID1591896 Unintentional integer overflow
Fixes: CID1591901 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:30 +02:00
Michael Niedermayer
62d4414d54
avfilter/af_amerge: Cleanup on av_channel_layout_copy() failure
...
Fixes: CID1503088 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:29 +02:00
Michael Niedermayer
a5c815f937
avfilter/af_afir: Assert format
...
Maybe helps: CID1516805 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:29 +02:00
Michael Niedermayer
8f9a6c4ea8
avfilter/af_afftdn: Assert format
...
Maybe helps: CID1515514 Uninitialized scalar variable
Maybe helps: CID1515517 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:29 +02:00
Michael Niedermayer
5fe8bf4aa5
avfilter/af_pan: check nb_output_channels before use
...
Fixes: CID1500281 Out-of-bounds write
Fixes: CID1500331 Out-of-bounds write
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:28 +02:00
Michael Niedermayer
2d0d502ff1
avfilter/af_mcompand: compute half frequency in double
...
Fixes: CID1422217 Result is not floating-point
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:28 +02:00
Michael Niedermayer
cef720ab42
avfilter/af_channelsplit: Assert that av_channel_layout_channel_from_index() succeeds
...
Maybe Helps: CID1503077 Bad bit shift operation
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:28 +02:00
Michael Niedermayer
7a0ea15c7a
avfilter/af_aresample: Cleanup on av_channel_layout_copy() failure
...
Fixes: CID1503078 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:27 +02:00
Michael Niedermayer
380a8213b1
tools/coverity: Phase 1 study of anti-halicogenic for coverity av_rescale()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:27 +02:00
Fei Wang
7ba8982181
MAINTAINERS: add myself to the general developers list
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-07-07 23:36:27 +02:00
James Almer
33d6e14d6f
avformat/hevc: reindent after previous commits
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 13:54:07 -03:00
James Almer
aa8230c7ba
avformat/movenc: add support for writting hfov boxes
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 12:38:57 -03:00
James Almer
6a428876fc
avformat/movenc: add support for writting vexu boxes
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 12:38:57 -03:00
James Almer
d4e2af4144
avformat/movenc: add support for writing lhvC boxes
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 12:38:57 -03:00
Derek Buitenhuis
c4ebdd8d2d
avformat/mov: Mark streams with a layered HEVC box as multilayer
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2024-07-07 12:38:57 -03:00
James Almer
c657c694e3
avformat/mov: add support for lhvC box parsing
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 12:38:57 -03:00
James Almer
cbfbacff20
avformat/hevc: add a function to write a lhvC box
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 12:38:57 -03:00
James Almer
cee43e512d
avformat/hevc: store parameter set and layer IDs in HVCCNALUnit
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 12:38:57 -03:00
James Almer
361b01329f
avformat/hevc: use a single array for per-PS NALUs
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 12:38:57 -03:00
James Almer
ab7893a7b1
avformat/hevc: don't write the same array values per nal addition
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 12:38:57 -03:00
James Almer
a696b28886
avformat/hevc: don't write NALUs with nuh_layer_id > 0 in hvcC boxes
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-07 12:38:57 -03:00
Derek Buitenhuis
46f7ea4456
avformat: Add a new stream disposition for multilayer video
...
This lets us detect when a container has flagged a stream as multilayer.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2024-07-07 12:38:50 -03:00
Hao Guan
cd2f8a22e9
avcodec/videotoolboxenc: fix vtctx reset condition
...
In vtenc_populate_extradata, the cleanup function vtenc_reset should not
be used when no error occurs, otherwise some color information is lost
(#11036 ).
This patch checks the status code and conducts the correct cleanup.
Signed-off-by: Hao Guan <hguandl@gmail.com >
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2024-07-07 18:46:02 +08:00
Anton Khirnov
24b3bad811
tests/fate/mov: add a test for VFR muxing
2024-07-07 11:37:43 +02:00
Anton Khirnov
ef521e7a57
lavf/movenc: mark mov/mp4 as supporting VFR
2024-07-07 11:37:43 +02:00
Anton Khirnov
6cde03739e
tests/fate/filter-audio: convert atempo test to oneoff
...
Filter output is not bitexact.
2024-07-07 11:34:13 +02:00
Marth64
8b8ee799de
avformat/dvdvideodec: Remove unused cell count variable
...
Signed-off-by: Marth64 <marth64@proxyid.net >
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2024-07-07 11:33:32 +02:00
Rémi Denis-Courmont
f9d1230224
lavc/h264dsp: R-V V 8-bit h264_idct8_add
...
T-Head C908 (cycles):
h264_idct8_add_8bpp_c: 1072.0
h264_idct8_add_8bpp_rvv_i32: 318.5
2024-07-07 09:34:32 +03:00
James Almer
ecd3a97834
fate/filter-video: add missing swscale flags to tiltandshift tests
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-06 17:41:24 -03:00
James Almer
3d5bad7501
fate/filter-video: tests more pixel formats with the tiltandshift filter
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-06 10:50:55 -03:00
James Almer
a528a54ee1
avfilter/vf_tiltandshift: fix buffer offset for yuv422p input
...
Fixes ticket #10950 .
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-06 10:50:55 -03:00
Stefano Sabatini
9c357324f0
doc/filters/perlin: specify default values
2024-07-06 14:14:02 +02:00
Rémi Denis-Courmont
f447189b0c
lavc/h264dsp: R-V V 8-bit h264_idct_add
...
T-Head C908 (cycles):
h264_idct4_add_8bpp_c: 271.5
h264_idct4_add_8bpp_rvv_i32: 91.5
2024-07-05 20:06:22 +03:00
Rémi Denis-Courmont
e0eff64ed1
lavc/h264dsp: R-V V 8-bit h264_idct8_add4
2024-07-05 18:56:03 +03:00
Rémi Denis-Courmont
d1f0c1fbf8
lavc/h264dsp: R-V V 8-bit h264_idct_add16intra
2024-07-05 18:56:03 +03:00
Rémi Denis-Courmont
30475c95ba
lavc/h264dsp: R-V V 8-bit h264_idct_add16
...
While this *tends* to be faster than plain C, the performance numbers
are all over the place, presuambly due to the conditional character of
the main loop.
Some additional micro-optimisations should be feasible after the
underlying h264_idct_add and h264_idct_dc_add functions are also
implemented. Then it will no longer be necesseray to stricly abide by
the C ABI.
2024-07-05 18:56:02 +03:00
Marvin Scholz
cd9ceaef22
avutil/hwcontext_videotoolbox: Set CVBuffer CGColorSpace
...
In addition to the other properties, try to obtain the right
CGColorSpace and set it as well, else it could lead to a CVBuffer
tagged as BT.2020 but with a CGColorSpace indicating BT.709.
Therefore it is essential for consistency to set a colorspace
according to the other values, or if none can be obtained (for example
because the other values are all unspecified) unset it as well.
Fix #10884
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2024-07-05 19:13:43 +08:00
Marvin Scholz
b4f9fcc63c
avutil/hwcontext_videotoolbox: Update documentation
...
The documentation was not clear at all what specifically the
function does, so it was left unspecified if it will unset or
not touch attachments it could not map from the AVFrame.
The documentation of the return value was wrong as well.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2024-07-05 19:13:43 +08:00
Marvin Scholz
1fa7554bd6
avutil/hwcontext_videotoolbox: Unset undefined values
...
When mapping AVFrame properties to the CVBuffer attachments, it is
necessary to properly delete undefined attachments, else we can
leave incorrect values in there guessed from VideoToolbox for
example, leading to inconsistent results where the AVFrame and
CVBuffer differ in metadata.
Ref #10884
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2024-07-05 19:13:43 +08:00
Jun Zhao
03c2e9d77e
lavf/scdet: minor fix
...
Change dbl to i64 for bool type
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Jun Zhao <barryjzhao@tencent.com >
2024-07-05 18:06:14 +08:00
Jun Zhao
25a7dcf069
lavc/libx264: minor format fix
...
Remove redundant semicolons
Signed-off-by: Jun Zhao <barryjzhao@tencent.com >
2024-07-05 18:05:10 +08:00
Zhao Zhili
4d90a76986
swscale/aarch64: Add argb/abgr to yuv
...
Test on Apple M1 with kperf:
: -O3 : -O3 -fno-vectorize
abgr_to_uv_8_c : 19.4 : 26.1
abgr_to_uv_8_neon : 29.9 : 51.1
abgr_to_uv_128_c : 146.4 : 558.9
abgr_to_uv_128_neon : 85.1 : 83.4
abgr_to_uv_1080_c : 1162.6 : 4786.4
abgr_to_uv_1080_neon : 819.6 : 826.6
abgr_to_uv_1920_c : 2063.6 : 8492.1
abgr_to_uv_1920_neon : 1435.1 : 1447.1
abgr_to_uv_half_8_c : 16.4 : 11.4
abgr_to_uv_half_8_neon : 35.6 : 20.4
abgr_to_uv_half_128_c : 108.6 : 359.4
abgr_to_uv_half_128_neon : 75.4 : 42.6
abgr_to_uv_half_1080_c : 883.4 : 2885.6
abgr_to_uv_half_1080_neon : 460.6 : 481.1
abgr_to_uv_half_1920_c : 1553.6 : 5106.9
abgr_to_uv_half_1920_neon : 817.6 : 820.4
abgr_to_y_8_c : 6.1 : 26.4
abgr_to_y_8_neon : 40.6 : 6.4
abgr_to_y_128_c : 99.9 : 390.1
abgr_to_y_128_neon : 67.4 : 55.9
abgr_to_y_1080_c : 735.9 : 3170.4
abgr_to_y_1080_neon : 534.6 : 536.6
abgr_to_y_1920_c : 1279.4 : 6016.4
abgr_to_y_1920_neon : 932.6 : 927.6
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2024-07-05 16:32:31 +08:00
Zhao Zhili
52422133ae
swscale/aarch64: Add bgra/rgba to yuv
...
Test on Apple M1 with kperf
: -O3 : -O3 -fno-vectorize
bgra_to_uv_8_c : 13.4 : 27.5
bgra_to_uv_8_neon : 37.4 : 41.7
bgra_to_uv_128_c : 155.9 : 550.2
bgra_to_uv_128_neon : 91.7 : 92.7
bgra_to_uv_1080_c : 1173.2 : 4558.2
bgra_to_uv_1080_neon : 822.7 : 809.5
bgra_to_uv_1920_c : 2078.2 : 8115.2
bgra_to_uv_1920_neon : 1437.7 : 1438.7
bgra_to_uv_half_8_c : 17.9 : 14.2
bgra_to_uv_half_8_neon : 37.4 : 10.5
bgra_to_uv_half_128_c : 103.9 : 326.0
bgra_to_uv_half_128_neon : 73.9 : 68.7
bgra_to_uv_half_1080_c : 850.2 : 3732.0
bgra_to_uv_half_1080_neon : 484.2 : 490.0
bgra_to_uv_half_1920_c : 1479.2 : 4942.7
bgra_to_uv_half_1920_neon : 824.2 : 824.7
bgra_to_y_8_c : 8.2 : 29.5
bgra_to_y_8_neon : 18.2 : 32.7
bgra_to_y_128_c : 101.4 : 361.5
bgra_to_y_128_neon : 74.9 : 73.7
bgra_to_y_1080_c : 739.4 : 3018.0
bgra_to_y_1080_neon : 613.4 : 544.2
bgra_to_y_1920_c : 1298.7 : 5326.0
bgra_to_y_1920_neon : 918.7 : 934.2
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2024-07-05 16:32:31 +08:00
Zhao Zhili
b8b71be07a
swscale/aarch64: Add bgr24 to yuv
...
Test on Apple M1 with kperf
: -O3 : -O3 -fno-vectorize
bgr24_to_uv_8_c : 28.5 : 52.5
bgr24_to_uv_8_neon : 54.5 : 59.7
bgr24_to_uv_128_c : 294.0 : 830.7
bgr24_to_uv_128_neon : 99.7 : 112.0
bgr24_to_uv_1080_c : 965.0 : 6624.0
bgr24_to_uv_1080_neon : 751.5 : 754.7
bgr24_to_uv_1920_c : 1693.2 : 11554.5
bgr24_to_uv_1920_neon : 1292.5 : 1307.5
bgr24_to_uv_half_8_c : 54.2 : 37.0
bgr24_to_uv_half_8_neon : 27.2 : 22.5
bgr24_to_uv_half_128_c : 127.2 : 392.5
bgr24_to_uv_half_128_neon : 63.0 : 52.0
bgr24_to_uv_half_1080_c : 880.2 : 3329.0
bgr24_to_uv_half_1080_neon : 401.5 : 390.7
bgr24_to_uv_half_1920_c : 1585.7 : 6390.7
bgr24_to_uv_half_1920_neon : 694.7 : 698.7
bgr24_to_y_8_c : 21.7 : 22.5
bgr24_to_y_8_neon : 797.2 : 25.5
bgr24_to_y_128_c : 88.0 : 280.5
bgr24_to_y_128_neon : 63.7 : 55.0
bgr24_to_y_1080_c : 616.7 : 2208.7
bgr24_to_y_1080_neon : 900.0 : 452.0
bgr24_to_y_1920_c : 1093.2 : 3894.7
bgr24_to_y_1920_neon : 777.2 : 767.5
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2024-07-05 16:32:31 +08:00
James Almer
bef77c6c9c
avformat/dump: only print yaw, pitch, and roll if set
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-07-04 23:35:08 -03:00
Martin Storsjö
e14cdf9990
hlsenc: Calculate the average and actual maximum bitrate of segments
...
Previously, the bitrate advertised in the master playlist would only
be based on the nominal values in either AVCodecParameters bit_rate,
or via AVCPBProperties max_bitrate. On top of this, a
fudge factor of 10% is added, to account for container overhead.
Neither of these bitrates may be known, and if the encoder is
running in VBR mode, there is no such value to be known. And
the container overhead may be more or less than the given
constant factor of 10%.
Instead, calculate the maximum bitrate per segment based on
what actually gets output from the muxer, and average bitrate
across all segments.
When muxing of the file finishes, update the master playlist
with these values, exposing both the maximum (which previously
was a guesstimate based on the nominal values) via
EXT-X-STREAM-INF BANDWIDTH, and the average via
EXT-X-STREAM-INF AVERAGE-BANDWIDTH.
This makes it possible to use the hlsenc muxer with VBR
encodes, for VOD style muxing.
Signed-off-by: Martin Storsjö <martin@martin.st >
2024-07-04 23:33:27 +03:00
Martin Storsjö
9246cca7f7
hlsenc: When not using HLS_SINGLE_FILE, set vs->size to range_length
...
This matches what is done in the corresponding case for
HLS_SINGLE_FILE.
Normally, vs->size is already initialized correctly - but when
writing the initial segment, with mp4 files, vs->size has been set
to the size of the init segment, while range_length contains the
real size of the first segment.
Signed-off-by: Martin Storsjö <martin@martin.st >
2024-07-04 23:33:26 +03:00