Paul B Mahol
69f4fdd10d
avfilter/vf_selectivecolor: refactor some repeating calculations
2021-09-26 10:17:17 +02:00
Andreas Rheinhardt
2b787ef766
avformat/dv: Set AVFMTCTX_NOHEADER flag
...
Audio streams are only added when a packet is read.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-26 08:51:58 +02:00
Andreas Rheinhardt
3022f74874
avformat/argo_asf: Use memcpy to copy string without its NUL
...
This avoids a -Wstringop-truncation warning from GCC which takes
issue with the fact that the destination might not be NUL-terminated.
Reviewed-by: Zane van Iperen <zane@zanevaniperen.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-26 08:51:41 +02:00
Andreas Rheinhardt
2882286a08
avformat/jvdec: Make sizeof(JVFrame) smaller to save memory
...
Reviewed-by: Peter Ross <pross@xvid.org >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-26 01:43:18 +02:00
Maryla
9f4708c22d
webp: fix transforms after a palette with pixel packing.
...
When a color indexing transform with 16 or fewer colors is used,
WebP uses "pixel packing", i.e. storing several pixels in one byte,
which virtually reduces the width of the image (see WebPContext's
reduced_width field). This reduced_width should always be used when
reading and applying subsequent transforms.
Updated patch with added fate test.
The source image dual_transform.webp can be downloaded by cloning
https://chromium.googlesource.com/webm/libwebp-test-data/
Fixes: 9368
Signed-off-by: James Zern <jzern@google.com >
2021-09-25 15:31:36 -07:00
Andreas Rheinhardt
0a6eed319d
fate/subtitles: Add JACOsub remuxing test
...
This muxer was untested up until now; had it been tested, it would
have been obvious that it has been broken for years.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-25 23:26:38 +02:00
Andreas Rheinhardt
54e8dcce8e
avformat/jacosubenc: Fix writing extradata
...
The terminating '\0' is no longer included in the size of
the extradata output by the demuxer since commit
36e61e24e7
.
E.g. if one remuxes the JACOsub sample JACOsub_capability_tester.jss
from the FATE suite, one receives a file not recognized as JACOsub
before this patch.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-25 23:11:56 +02:00
Andreas Rheinhardt
9348d06fc6
avcodec/qsvenc: Remove dead code for user-provided buffers
...
Dead since commit 93016f5d1d
which ensured that the packets received by encoders are always blank.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-25 22:58:17 +02:00
Andreas Rheinhardt
dd0a7fdfc0
avcodec/qsvenc: Fix memleaks upon allocation errors
...
Fixes leaks in case the allocation of the H.264-specific stuff fails.
Fixes Coverity issues #1442911 and #1442914 .
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-25 22:58:17 +02:00
Zhao Zhili
44c64b103e
swresample/aarch64: fix relocation out of range error
...
Signed-off-by: Martin Storsjö <martin@martin.st >
2021-09-25 21:55:29 +03:00
Zhao Zhili
378ad2f8fd
lavc/aarch64: fix relocation out of range error
...
Use a temporary label instead of global function symbol for b.gt.
Signed-off-by: Martin Storsjö <martin@martin.st >
2021-09-25 21:55:29 +03:00
Limin Wang
0463f5d6d5
avcodec/libsvtav1: Fix value range for rc mode
...
Reviewed-by: Jan Ekström <jeebjp@gmail.com >
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-09-25 21:37:01 +08:00
Limin Wang
64e2fb3f9d
avcodec/libsvtav1: make coded GOP type configurable
...
Reviewed-by: Jan Ekström <jeebjp@gmail.com >
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-09-25 21:35:54 +08:00
Limin Wang
04b89e8ae3
avcodec/libsvtav1: Fix duplicate definition of caps_internal
...
Reviewed-by: Jan Ekström <jeebjp@gmail.com >
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-09-25 21:35:40 +08:00
Paul B Mahol
d098e16f09
avfilter/vf_v360: refactor uf/vf scaling
2021-09-24 22:30:37 +02:00
James Almer
970264a74f
avcodec/av1_parser: constify some variables
...
Signed-off-by: James Almer <jamrial@gmail.com >
2021-09-24 00:04:37 -03:00
Wenbin Chen
f2891fbded
libavutil/hwcontext_qsv: fix a bug for mapping qsv frame to vaapi
...
Command below failed.
ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128
-init_hw_device qsv=qs@va -hwaccel qsv -hwaccel_device qs
-filter_hw_device va -c:v h264_qsv
-i 1080P.264 -vf "hwmap,format=vaapi" -c:v h264_vaapi output.264
Cause: Assign pair->first directly to data[3] in vaapi frame.
pair->first is *VASurfaceID while data[3] in vaapi frame is
VASurfaceID. I fix this line of code. Now the command above works.
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com >
2021-09-23 22:59:11 -03:00
Andreas Rheinhardt
a46e78d5b7
avformat/aviobuf: Extend ffio_fill to 64bits
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-24 00:14:25 +02:00
Andreas Rheinhardt
874f03fae7
avformat/omadec: Don't output uninitialized values
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-24 00:14:10 +02:00
Andreas Rheinhardt
bb50823d24
avformat/riffenc: Fix indentation
...
Forgotten after bf9a8d183d
.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-24 00:14:01 +02:00
Andreas Rheinhardt
0f12d79a88
avformat/movenchint: Simplify writing padding
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-24 00:13:49 +02:00
Andreas Rheinhardt
bb98212930
avcodec/elbg: Mark ELBGContext as being unaliased by using av_restrict
...
This improves performance: For msvideo1, the performance improved by
4.8% when encoding the sample from the fate-vsynth1-msvideo1 test;
when encoding the sample from fate-vsynth1-cinepak, performance
improved by 2%. The compiler user was GCC 10 and the calls to encode2
have been timed.
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-24 00:01:49 +02:00
Andreas Rheinhardt
6b2c1d1018
avcodec/elbg: Add flags to avpriv_elbg_do()
...
This is currently unused and it is only added to enable changes
while maintaining ABI compatibility. The type is uintptr_t in order
to potentially accept a pointer argument.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-24 00:01:27 +02:00
Andreas Rheinhardt
6afad4c7e9
avfilter/vf_elbg: Check call to avpriv_elbg_do()
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-24 00:01:08 +02:00
Andreas Rheinhardt
73f47846bd
avcodec/msvideo1enc: Check all calls to avpriv_elbg_do()
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-24 00:00:39 +02:00
Andreas Rheinhardt
ad27326e2b
avcodec/cinepakenc: Check all calls to avpriv_elbg_do()
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-24 00:00:13 +02:00
Andreas Rheinhardt
477a398c3e
avcodec/elbg: Also allocate buffers for recursion only once
...
This is possible because the number of elements needed in each
recursion step decreases geometrically, so the geometric series
provides an upper bound for the sum of number of elements of
the needed buffers.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-23 23:53:38 +02:00
Paul B Mahol
cd7e25b14a
avcodec/mlpenc: fix encoding stereo single stream in TrueHD
2021-09-23 23:43:48 +02:00
Paul B Mahol
57f0b36367
avcodec/mlpdec: fix decoding single stereo stream in TrueHD
2021-09-23 23:43:48 +02:00
Paul B Mahol
6a1bda3df9
avfilter/af_silenceremove: improve trimming middle silence
2021-09-23 23:34:45 +02:00
Andreas Rheinhardt
d6f4b91ba5
avfilter/framesync: Remove redundant setting of AVClass
...
Every filter exposing the framesync options via its child_next
callback already calls framesync_preinit() in its preinit callback.
So the filter is already preinited whenever its child_next is called.
Reviewed-by: Nicolas George <george@nsup.org >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-23 21:13:00 +02:00
Andreas Rheinhardt
c1b6165b73
avfilter/vf_convolve: Deduplicate framesync auxiliary functions
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-23 21:12:58 +02:00
Andreas Rheinhardt
5e9c7f1355
avfilter/vf_lut3d: Deduplicate options
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-23 21:12:58 +02:00
Andreas Rheinhardt
b368a774dd
avfilter/framesync: Separate framesync AVClass and auxiliary functions
...
Will be useful for deduplication.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-23 21:12:37 +02:00
Andreas Rheinhardt
6e26015a6b
avformat/astenc: Simplify writing padding
...
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-23 17:37:22 +02:00
Nicolas Gaullier
8a3f8afa4e
avformat/mov: Set AVSTREAM_PARSE_HEADERS flag for H264
...
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris >
Signed-off-by: James Almer <jamrial@gmail.com >
2021-09-23 10:35:09 -03:00
Nicolas Gaullier
daf04868d8
avformat/demux: Use r_frame_rate in compute_frame_duration if codec_framerate is unknown
...
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris >
Signed-off-by: James Almer <jamrial@gmail.com >
2021-09-23 10:35:09 -03:00
Nicolas Gaullier
fad459b5a6
avcodec/h264_parser: Set AVCodecContext.framerate
...
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris >
Signed-off-by: James Almer <jamrial@gmail.com >
2021-09-23 10:35:08 -03:00
Marc-Antoine Arnaud
447cf53774
avformat/mxfdec: rename sub_descriptors as file_descriptors
...
Signed-off-by: Marton Balint <cus@passwd.hu >
2021-09-22 22:44:30 +02:00
James Almer
6edcdd2520
avcodec/cbs_h265: support general_profile_idc 11
...
And fix support for general_profile_idc 9 and 10.
Defined in ITU-T H.265 (V6).
Signed-off-by: James Almer <jamrial@gmail.com >
2021-09-22 16:31:35 -03:00
Michael Niedermayer
0b761e87c0
avformat/concatdec: Use FAIL() macro instead of direct return in concat_parse_script()
...
Fixes: memleak
Fixes: 38893/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-4785231933079552
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-22 18:53:53 +02:00
Limin Wang
a487635b85
avcodec/dynamic_hdr10_plus: check size before using it
...
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-09-22 09:25:25 +08:00
Limin Wang
4c079636ab
avcodec/dynamic_hdr10_plus: use AVERROR_INVALIDDATA instead of AVERROR(EINVAL)
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-09-22 09:25:25 +08:00
Limin Wang
45b850f9f5
avcodec/hevc_sei: check size before using it
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-09-22 09:25:25 +08:00
James Almer
9a7fe439d9
avcodec/libdav1d: let libdav1d choose optimal max frame delay
...
Signed-off-by: James Almer <jamrial@gmail.com >
2021-09-21 15:11:20 -03:00
Michael Niedermayer
85413a5ae6
avcodec/cbs_h265_syntax_template: Limit sps_num_palette_predictor_initializer_minus1 to 127
...
Fixes: index 128 out of bounds for type 'uint16_t [128]'
Fixes: 38651/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-6296416058736640
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 >
2021-09-21 19:20:56 +02:00
Andreas Rheinhardt
467c6a9146
avfilter/vf_geq: Simplify creating string
...
Also fixes a Wformat-truncation warning from GCC.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-21 17:57:35 +02:00
Andreas Rheinhardt
04a5ffa75f
avfilter/vf_xfade: Remove always-false format check
...
This filter uses ff_set_common_formats_from_list().
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-21 17:57:32 +02:00
Andreas Rheinhardt
c87d7c8a81
avfilter/vf_vif: Remove always-false format check
...
This filter uses ff_set_common_formats_from_list().
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-21 17:57:30 +02:00
Andreas Rheinhardt
2a18ee752d
avfilter/vf_threshold: Remove always-false format check
...
This filter uses ff_set_common_formats_from_list().
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-21 17:57:27 +02:00