Ramiro Polla
4eb5594295
swscale: add nv24/nv42 to yuv420p unscaled converter
4 months ago
Zhao Zhili
aa14f9fe63
avcodec/mediacodecdec: Skip dequeue buffer in draining state
...
There is no more packet to queue in draining state.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
4 months ago
Zhao Zhili
2e370805da
avfilter/unsharp: Merge header into .c
...
It was shared with opencl implementation.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
4 months ago
Stefan Oltmanns
d42cd5b75b
avformat/vapoursynth: load library at runtime
...
Signed-off-by: Stefan Oltmanns <stefan-oltmanns@gmx.net>
4 months ago
Stefan Oltmanns
eac611f1a4
avformat/vapoursynth: Update to API version 4
...
Signed-off-by: Stefan Oltmanns <stefan-oltmanns@gmx.net>
4 months ago
Ramiro Polla
abb4e13a0a
avutil/aarch64: add AV_COPY128 and AV_ZERO128 macros
4 months ago
Zhao Zhili
40dda881d6
avcodec/filter_units: Fix extradata and packets can have different bitstream format
...
Filter init can change extradata from avcc/hvcc to annexb format.
With different passthrough logic, packets can still in avcc/hvcc
format. Use same passthrough logic for init and filter.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
4 months ago
Zhao Zhili
523189c744
fftools/ffplay: handle flip in display matrix
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
4 months ago
Gnattu OC
30f090b4f8
avfilter: inherit input color range for videotoolbox filters
...
The color range should be set to match the input when creating
the VideoToolbox context. Otherwise, the new context will default
to limited range, creates inconsistencies with full range inputs.
Signed-off-by: Gnattu OC <gnattuoc@me.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
4 months ago
Martin Storsjö
cfe0a36352
libswscale: aarch64: Fix the indentation of some macro invocations
...
Signed-off-by: Martin Storsjö <martin@martin.st>
4 months ago
James Almer
9d15fe77e3
avcodec/container_fifo: add missing stddef.h include
...
Fixes make checkheaders
Signed-off-by: James Almer <jamrial@gmail.com>
5 months ago
James Almer
a754ee0844
avcodec/h2645_parse: replace three bool arguments in ff_h2645_packet_split with a single flags one
...
Signed-off-by: James Almer <jamrial@gmail.com>
5 months ago
James Almer
8060644237
avcodec/shorten: Fix discard of ‘const’ qualifier
...
Signed-off-by: James Almer <jamrial@gmail.com>
5 months ago
Martin Storsjö
507c2a5774
libswscale: arm: Don't assume aligned output in yuv2rgb functions
...
This fixes failures in recently added checkasm tests.
While the buffers in most cases are aligned, libswscale in general
can't assume the output to be aligned.
Signed-off-by: Martin Storsjö <martin@martin.st>
5 months ago
Anton Khirnov
52471b56ba
lavfi: make FFFilterContext private to generic code
...
Nothing in it needs to be visible to filters.
5 months ago
Anton Khirnov
f19c988911
lavfi/filters: move functions only used by generic code to avfilter_internal.h
5 months ago
Anton Khirnov
6d75d44d90
lavfi: drop internal.h
...
All that remains in it are things that belong in avfilter_internal.h.
Move them there and remove internal.h
5 months ago
Anton Khirnov
90e4af65e1
lavfi/f_streamselect: remove a no-op ff_filter_config_links() call
...
It does not do anything when the links are already configured.
5 months ago
Anton Khirnov
a2314308f2
lavfi/inernal: move ff_fmt_is_regular_yuv() declaration to video.h
5 months ago
Anton Khirnov
a83a30e899
lavfi: move ff_parse_{sample_rate,channel_layout}() to audio.[ch]
...
That is a more appropriate place for those functions.
5 months ago
Anton Khirnov
f4bfdf7893
lavfi: move ff_parse_pixel_format() to vf_format, its only caller
...
The only thing this function does beyond calling av_get_pix_fmt() is
falling back onto parsing the argument as a number. No other filters
should need to do this.
5 months ago
Anton Khirnov
1afe42852b
lavfi/internal: move functions used by filters to filters.h
...
internal.h currently mixes interfaces intended to be used by filters
with those that should be limited to generic filter- or graph-level
code.
5 months ago
Rémi Denis-Courmont
d8fb44c0aa
lavc/mpegvideoencdsp: R-V V add_8x8basis
...
T-Head C908:
add_8x8basis_c: 440.6
add_8x8basis_rvv_i32: 70.3
SpacemiT X60:
add_8x8basis_c: 436.3
add_8x8basis_rvv_i32: 40.5
5 months ago
Rémi Denis-Courmont
1907dd7f23
lavc/mpegvideoencdsp: R-V V try_8x8basis
...
T-Head C908:
try_8x8basis_c: 922.5
try_8x8basis_rvv_i32: 135.3
SpacemiT X60:
try_8x8basis_c: 926.1
try_8x8basis_rvv_i32: 103.1
5 months ago
Rémi Denis-Courmont
0fd37c00d7
lavc/mpegvideoencdsp: R-V V pix_norm1
...
T-Head C908:
pix_norm1_c: 480.2
pix_norm1_rvv_i64: 146.9
SpacemiT X60:
pix_norm1_c: 478.2
pix_norm1_rvv_i64: 92.7
5 months ago
Rémi Denis-Courmont
63d016aea5
lavc/mpegvideoencdsp: R-V V pix_sum
...
T-Head C908:
pix_sum_c: 332.2
pix_sum_rvv_i64: 91.2
SpacemiT X60:
pix_sum_c: 321.2
pix_sum_rvv_i64: 60.9
5 months ago
Anton Khirnov
631a725670
lavc/hevcdec: call ff_thread_finish_setup() even if hwaccel is in use
...
Serializing frame threading for non-threadsafe hwaccels is handled at the
generic level, the decoder does not need to care about it.
5 months ago
Anton Khirnov
4b9adb35b6
lavc/hevcdec: simplify output logic
...
Current code is written around the "simple" decode API's limitation that
a single input packet (AU/coded frame) triggers the output of at most
one output frame. However the spec contains two cases where a coded
frame may cause multiple frames to be output (cf. C.5.2.2.2):
* start of a new sequence
* overflowing sps_max_dec_pic_buffering
The decoder currently contains rather convoluted logic to handle these
cases:
* decode/output/per-frame sequence counters,
* HEVC_FRAME_FLAG_BUMPING
* ff_hevc_bump_frame()
* special clauses in ff_hevc_output_frame()
However, with the receive_frame() API none of that is necessary, as we
can just output multiple frames at once. Previously added ContainerFifo
allows that to be done in a straightforward and efficient manner.
5 months ago
Anton Khirnov
79afc45c03
lavc/hevcdec: use a ContainerFifo to hold frames scheduled for output
...
Instead of a single AVFrame.
Will be useful in future commits, where we will want to produce multiple
output frames for a single coded frame.
5 months ago
Anton Khirnov
4bda7f288c
lavc/videotoolbox: drop HEVC cropping from start_frame rather than end_frame
...
HEVCContext.output_frame will be removed in following commits.
Reported-By: Max Bykov
5 months ago
Anton Khirnov
6174818252
lavc: add private container FIFO API
...
It provides a FIFO for "container" objects like AVFrame/AVPacket and
features an integrated FFRefStructPool-based pool to avoid allocating an
freeing them repeatedly.
5 months ago
Anton Khirnov
2fdecbb239
lavc/hevcdec: switch to receive_frame()
...
Required by following commits, where we will want to output multiple
frames per packet.
5 months ago
sunyuechi
4e7b5ac48f
lavc/vp9dsp: R-V V mc bilin hv
...
C908 X60
vp9_avg_bilin_4hv_8bpp_c : 10.7 9.5
vp9_avg_bilin_4hv_8bpp_rvv_i32 : 4.0 3.5
vp9_avg_bilin_8hv_8bpp_c : 38.5 34.2
vp9_avg_bilin_8hv_8bpp_rvv_i32 : 7.2 6.5
vp9_avg_bilin_16hv_8bpp_c : 147.2 130.5
vp9_avg_bilin_16hv_8bpp_rvv_i32 : 14.5 12.7
vp9_avg_bilin_32hv_8bpp_c : 574.2 509.7
vp9_avg_bilin_32hv_8bpp_rvv_i32 : 42.5 38.0
vp9_avg_bilin_64hv_8bpp_c : 2321.2 2017.7
vp9_avg_bilin_64hv_8bpp_rvv_i32 : 163.5 131.0
vp9_put_bilin_4hv_8bpp_c : 10.0 8.7
vp9_put_bilin_4hv_8bpp_rvv_i32 : 3.5 3.0
vp9_put_bilin_8hv_8bpp_c : 35.2 31.2
vp9_put_bilin_8hv_8bpp_rvv_i32 : 6.5 5.7
vp9_put_bilin_16hv_8bpp_c : 134.0 119.0
vp9_put_bilin_16hv_8bpp_rvv_i32 : 12.7 11.5
vp9_put_bilin_32hv_8bpp_c : 538.5 464.2
vp9_put_bilin_32hv_8bpp_rvv_i32 : 39.7 35.2
vp9_put_bilin_64hv_8bpp_c : 2111.7 1833.2
vp9_put_bilin_64hv_8bpp_rvv_i32 : 138.5 122.5
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
5 months ago
sunyuechi
9edd2e723b
lavc/vp9dsp: R-V V mc bilin h v
...
C908 X60
vp9_avg_bilin_4h_8bpp_c : 5.5 4.7
vp9_avg_bilin_4h_8bpp_rvv_i32 : 1.7 1.5
vp9_avg_bilin_4v_8bpp_c : 5.5 4.7
vp9_avg_bilin_4v_8bpp_rvv_i32 : 1.5 1.2
vp9_avg_bilin_8h_8bpp_c : 20.0 17.7
vp9_avg_bilin_8h_8bpp_rvv_i32 : 3.0 2.7
vp9_avg_bilin_8v_8bpp_c : 20.7 18.7
vp9_avg_bilin_8v_8bpp_rvv_i32 : 3.0 2.7
vp9_avg_bilin_16h_8bpp_c : 78.2 69.7
vp9_avg_bilin_16h_8bpp_rvv_i32 : 7.0 6.2
vp9_avg_bilin_16v_8bpp_c : 98.5 73.2
vp9_avg_bilin_16v_8bpp_rvv_i32 : 7.0 6.0
vp9_avg_bilin_32h_8bpp_c : 325.5 275.5
vp9_avg_bilin_32h_8bpp_rvv_i32 : 23.0 20.5
vp9_avg_bilin_32v_8bpp_c : 342.2 290.0
vp9_avg_bilin_32v_8bpp_rvv_i32 : 21.7 19.5
vp9_avg_bilin_64h_8bpp_c : 1263.7 1095.7
vp9_avg_bilin_64h_8bpp_rvv_i32 : 91.2 81.2
vp9_avg_bilin_64v_8bpp_c : 1331.7 1155.2
vp9_avg_bilin_64v_8bpp_rvv_i32 : 91.2 81.0
vp9_put_bilin_4h_8bpp_c : 4.5 4.0
vp9_put_bilin_4h_8bpp_rvv_i32 : 1.0 1.0
vp9_put_bilin_4v_8bpp_c : 4.7 4.2
vp9_put_bilin_4v_8bpp_rvv_i32 : 1.0 1.0
vp9_put_bilin_8h_8bpp_c : 16.7 15.0
vp9_put_bilin_8h_8bpp_rvv_i32 : 2.2 2.0
vp9_put_bilin_8v_8bpp_c : 17.5 15.7
vp9_put_bilin_8v_8bpp_rvv_i32 : 2.2 2.0
vp9_put_bilin_16h_8bpp_c : 65.2 58.0
vp9_put_bilin_16h_8bpp_rvv_i32 : 6.0 5.5
vp9_put_bilin_16v_8bpp_c : 69.2 61.7
vp9_put_bilin_16v_8bpp_rvv_i32 : 5.7 5.2
vp9_put_bilin_32h_8bpp_c : 273.2 229.0
vp9_put_bilin_32h_8bpp_rvv_i32 : 19.7 17.7
vp9_put_bilin_32v_8bpp_c : 290.5 243.7
vp9_put_bilin_32v_8bpp_rvv_i32 : 18.7 16.7
vp9_put_bilin_64h_8bpp_c : 1040.5 910.5
vp9_put_bilin_64h_8bpp_rvv_i32 : 82.5 73.0
vp9_put_bilin_64v_8bpp_c : 1108.5 971.0
vp9_put_bilin_64v_8bpp_rvv_i32 : 82.2 73.2
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
5 months ago
Marvin Scholz
8f36c6f2e7
MAINTAINERS: add CC preference for myself
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months ago
Michael Niedermayer
7e5410eadb
avformat/iamf_parse: clear padding
...
Fixes: use of uninitialized value
Fixes: 70929/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-5931276639469568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months ago
Michael Niedermayer
67947f2a1c
avcodec/hevc/ps: use unsigned shift
...
Fixes: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 70726/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6149928703819776
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months ago
Michael Niedermayer
043875941f
avcodec/cbs_h265_syntax_template:
...
Fixes: Assertion width > 0 && width <= 32 failed
Fixes: 71012/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-6073354744823808
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months ago
Michael Niedermayer
8657eb9c3f
avcodec/avcodec: Warn about data returned from get_buffer*()
...
Text based on suggestion by: epirat07@gmail.com
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months ago
Dale Curtis
4230379835
avformat/mov: Fix nullptr dereference with invalid encryption metadata.
...
Found by fuzzer.
Bug: https://crbug.com/356720789
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 months ago
Ramiro Polla
181cd260db
swscale/aarch64/yuv2rgb: add neon yuv42{0,2}p -> gbrp unscaled colorspace converters
...
checkasm --bench on a Raspberry Pi 5 Model B Rev 1.0:
yuv420p_gbrp_128_c: 1243.0
yuv420p_gbrp_128_neon: 453.5
yuv420p_gbrp_1920_c: 18165.5
yuv420p_gbrp_1920_neon: 6700.0
yuv422p_gbrp_128_c: 1463.5
yuv422p_gbrp_128_neon: 471.5
yuv422p_gbrp_1920_c: 21343.7
yuv422p_gbrp_1920_neon: 6743.5
5 months ago
Ramiro Polla
8744764a4c
swscale/x86/yuv2rgb: add ssse3 yuv42{0,2}p -> gbrp unscaled colorspace converters
...
Note: this implementation is limited to x86_64 due to general purpose
register pressure.
checkasm --bench on an Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz:
yuv420p_gbrp_8_c: 118.5
yuv420p_gbrp_8_ssse3: 93.3
yuv420p_gbrp_128_c: 1068.3
yuv420p_gbrp_128_ssse3: 319.3
yuv420p_gbrp_1080_c: 8841.8
yuv420p_gbrp_1080_ssse3: 2211.8
yuv420p_gbrp_1920_c: 15903.8
yuv420p_gbrp_1920_ssse3: 3814.3
yuv422p_gbrp_8_c: 144.8
yuv422p_gbrp_8_ssse3: 93.8
yuv422p_gbrp_128_c: 1395.8
yuv422p_gbrp_128_ssse3: 313.0
yuv422p_gbrp_1080_c: 11551.5
yuv422p_gbrp_1080_ssse3: 2240.8
yuv422p_gbrp_1920_c: 20585.3
yuv422p_gbrp_1920_ssse3: 5249.5
yuva420p_gbrp_8_c: 117.5
yuva420p_gbrp_8_ssse3: 92.0
yuva420p_gbrp_128_c: 1593.0
yuva420p_gbrp_128_ssse3: 319.3
yuva420p_gbrp_1080_c: 8694.5
yuva420p_gbrp_1080_ssse3: 2186.0
yuva420p_gbrp_1920_c: 15946.5
yuva420p_gbrp_1920_ssse3: 3805.3
5 months ago
Ramiro Polla
4545205a26
swscale/yuv2rgb: add yuv42{0,2}p -> gbrp unscaled colorspace converters
5 months ago
Ramiro Polla
af5adf57e3
swscale/yuv2rgb: prepare YUV2RGBFUNC macro for multi-planar rgb
...
This will be used in the upcoming yuv42{0,2}p -> gbrp unscaled
colorspace converters.
There is no difference in performance.
5 months ago
Ramiro Polla
24063e7827
swscale/yuv2rgb: prepare LOADCHROMA/PUTFUNC macros for multi-planar rgb
...
This will be used in the upcoming yuv42{0,2}p -> gbrp unscaled
colorspace converters.
There is no difference in performance.
5 months ago
Ramiro Polla
5c1c0325cd
avcodec/aarch64/me_cmp: add dotprod implementations of sse16 and vsse_intra16
...
checkasm --bench for Raspberry Pi 5 Model B Rev 1.0:
sse_0_c: 241.5
sse_0_neon: 37.2
sse_0_dotprod: 22.2
vsse_4_c: 148.7
vsse_4_neon: 31.0
vsse_4_dotprod: 15.7
5 months ago
Dale Curtis
a31106d849
lavf/demux: don't reallocate a AVCodecContext when closing a non-open codec.
...
This results in an unnecessary ~800k allocation with H.264. A
nearby callsite uses avcodec_is_open() to avoid this, so do the
same when exiting avformat_find_stream_info().
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 months ago
sfan5
c779766b5c
avcodec/mediacodecdec: call MediaCodec.stop on close
...
Usually the MediaCodec context will be released immediately, or it needs to stay
alive due to existing hardware buffers.
However we can free resources early in the case of
hw_buffer_count == 0 && refcount > 1, which can be reproduced by keeping frames
referenced after flushing and closing. mpv currently behaves like this.
Signed-off-by: sfan5 <sfan5@live.de>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
5 months ago
Timo Rothenpieler
817c6a6762
avformat/hlsenc: correctly reset subtitle stream counter per-varstream
...
Without resetting it, if there was a previous set of varstreams with
subtitles, it would subtract from all the streams, leading to chaos and
segfaults when trying to access for example stream -1.
5 months ago
James Almer
211c88b9d5
avfilter/f_zmq: fix graph argument
...
Fixes regression since d566a37003
.
Signed-off-by: James Almer <jamrial@gmail.com>
5 months ago