Anton Khirnov
f3dafe6a41
lavf/latmenc: avoid avcodec.h dependency
3 years ago
Anton Khirnov
e246625b01
lavf/id3v1: drop unnecessary avcodec.h include
3 years ago
Anton Khirnov
5620d18e66
lavf/hevc: drop unnecessary avcodec.h include
3 years ago
Anton Khirnov
f79d009b7c
lavf/framecrcenc: avoid avcodec.h dependency
3 years ago
Anton Khirnov
239b7d2e40
lavf/adtsenc: avoid avcodec.h dependency
3 years ago
Anton Khirnov
e7196afe28
lavf/a64: avoid avcodec.h dependency
3 years ago
Anton Khirnov
e67e02d156
lavf/avformat.h: drop the avcodec.h include
...
Since AVStream.codec is gone, avformat.h does not require anything from
avcodec.h.
3 years ago
Anton Khirnov
ed728da3af
tools/uncoded_frame: include required headers explicitly
3 years ago
Anton Khirnov
51200769c3
lavf/icoenc: include required headers explicitly
3 years ago
Anton Khirnov
c4c6c83421
lavf/internal: include avcodec.h explicitly
...
Do not depend on avformat.h to provide it.
3 years ago
Anton Khirnov
5d920255aa
lavfi/lavfutils: include required headers explicitly
3 years ago
Anton Khirnov
c28823ff97
lavc/get_bits: avoid avcodec.h dependency
...
Include only defs.h, needed for AV_INPUT_BUFFER_PADDING_SIZE.
3 years ago
Anton Khirnov
58a39e3436
lavc/hevc_sei: include buffer.h explicitly
...
Do not rely on including it indirectly through get_bits.h->avcodec.h
3 years ago
Anton Khirnov
43002487cb
lavc/mlp_parse: add required includes explicitly
3 years ago
Anton Khirnov
93822dacb9
lavc/dolby_e_parser: #include avcodec.h explicitly
...
This file uses definitions from it, but relies on an indirect include
through get_bits.h
3 years ago
Anton Khirnov
9dbdabe0e0
lavc/cbs_internal: clean up headers
...
Include all required headers explicitly, avoid avcodec.h dependency.
3 years ago
Anton Khirnov
e91901adf6
lavc/cbs: avoid avcodec.h dependency
...
Include only the headers that are actually needed.
3 years ago
Anton Khirnov
f3f404edd2
lavc/cbs_bsf.h: explicitly #include all required headers
3 years ago
Anton Khirnov
7c9763070d
lavc: move av_get_profile_name() from avcodec.h to codec.h
3 years ago
Anton Khirnov
bb3648e676
lavc: move av_get_audio_frame_duration2() from avcodec.h to codec_par.h
3 years ago
Anton Khirnov
881db34f6a
lavc: move av_get_pcm_codec() from avcodec.h to codec_id.h
3 years ago
Anton Khirnov
2628dff366
lavc: move avcodec_profile_name() from avcodec.h to codec_id.h
3 years ago
Anton Khirnov
000f35125f
lavc: move av_get_[exact_]bits_per_sample() to codec_id.h
3 years ago
Anton Khirnov
ff0a96046d
lavc: move small misc definitions into a separate header
...
This will allow to avoid #including the entire avcodec.h in some places.
3 years ago
zhilizhao
cf1746d779
ffmpeg_videotoolbox: skip memory copy if hwaccel_output_format match
...
Simple test results:
Command:
./ffmpeg -y -hwaccel videotoolbox -hwaccel_output_format videotoolbox_vld \
-i test.mp4 -an -c:v h264_videotoolbox -benchmark out.mp4
Before:
frame= 1221 fps= 66 q=-0.0 Lsize= 3144kB time=00:00:20.33 bitrate=1266.6kbits/s dup=4 drop=0 speed= 1.1x
bench: utime=2.714s stime=1.218s rtime=18.574s
After:
frame= 1221 fps=137 q=-0.0 Lsize= 3144kB time=00:00:20.33 bitrate=1266.4kbits/s dup=4 drop=0 speed=2.28x
bench: utime=1.450s stime=1.440s rtime=8.924s
It has limited usecase since there is no video filter support, so
a log message is added to notify the user.
Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
3 years ago
Lynne
08d933bf61
hwcontext_vulkan: fix typo in vulkan_device_init()
...
load_functions() did not load the device-level functions.
3 years ago
Gyan Doshi
99bbf4a5be
doc/ffmpeg: document reinit_filter
3 years ago
James Almer
591b88e678
avformat: move AVStream.{first,cur}_dts to AVStreamInternal
...
They are private fields, no reason to have them exposed in a public header.
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
James Almer
39affa5f8e
avdevice/libcdio: fix AVStream.cur_dts usage
...
It should not be accessed from outside of libavformat.
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
James Almer
c768233293
avformat/utils: make ff_update_cur_dts() shared
...
libavdevice needs it.
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
Ting Fu
e01bf559df
lavfi/vf_drawtext.c: fix CID 1485003
...
CID 1485003: Memory - illegal accesses (UNINIT)
Using uninitialized value "sd".
Signed-off-by: Ting Fu <ting.fu@intel.com>
3 years ago
Ting Fu
22d99589d8
lavfi/vf_drawbox.c: fix CID 1485004
...
CID 1485004: Uninitialized variables (UNINIT)
Using uninitialized value "x" when calling "*pixel_belongs_to_region".
Signed-off-by: Ting Fu <ting.fu@intel.com>
3 years ago
Zhao Zhili
58614f7bee
avformat/libsrt: workaround conflict with ffmpeg cmdline option
...
Add 'srt_streamid' option as an alias for 'streamid'.
Signed-off-by: Marton Balint <cus@passwd.hu>
3 years ago
Zhao Zhili
55c54ff744
avformat/libsrt: add tsbpd option
...
Signed-off-by: Marton Balint <cus@passwd.hu>
3 years ago
Zhao Zhili
9099046cc7
avformat/libsrt: send message in order
...
There is no good use case for out of order delivery of data. For live
streaming with TSBPD enabled by default, the receiver get data in order
based on the timestamps. However, if TSBPD is disabled, the data can
be delivered out of order.
Signed-off-by: Marton Balint <cus@passwd.hu>
3 years ago
Valerii Zapodovnikov
3249b96342
fftools/ffplay: 240M matrix is not the same as BT.601
...
Signed-off-by: Valerii Zapodovnikov <val.zapod.vz@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
3 years ago
Valerii Zapodovnikov
812f39ee85
Revert "avformat/dashenc: Disable writing CODECS tag for HEVC streams"
...
This reverts commit d6d407d2d7
.
Hack not needed after a2b1dd0ce3
.
Will fix #7480 and #8904 .
This will include e.g. CODECS="hvc1.2.4.L123.B0" into m3u8.
Signed-off-by: Valerii Zapodovnikov <val.zapod.vz@gmail.com>
3 years ago
Matthieu Patou
b27ae2c0b7
checkasm/vp9dsp: rename the iszero function to is_zero
...
Suggested-by: ffmpeg@fb.com
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
Michael Niedermayer
4a3917c02c
avfilter/vf_dctdnoiz: Check threads
...
Fixes: floating point division by 0
Fixes: Ticket 8269
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
3d500e62f6
avfilter/vf_ciescope: Fix undefined behavior in rgb_to_xy() with black
...
Fixes: floating point division by 0
Fixes: undefined behavior in handling NaN
Fixes: Ticket 8268
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
ca9025f374
avcodec/dpx: fix off by 1 in bits_per_color check
...
Fixes: CID1476303 Bad bit shift operation
Fixes: 34871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DPX_fuzzer-6331163028357120
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
a0a4a527c3
avformat/rpl: Check for EOF and zero framesize
...
Fixes: Infinite loop
Fixes: 34751/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-5439330800762880
Fixes: 34774/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-5851571660390400
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Michael Niedermayer
f7862e8268
avcodec/vc2enc: Check for non negative slice bounds
...
Fixes: invalid shifts
Fixes: Ticket 8221
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Andreas Rheinhardt
7af1a3cebe
avcodec/avcodec: Don't free options on failure in avcodec_open2()
...
Instead return the dictionary in the state it is at the time the error
occurred. This is more in line with the description of this parameter
and allows to notify the user of unrecognized options if an error
happens lateron (which might very well be due to e.g. misspelled
options).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
d29541c90a
fftools/ffprobe: Remove redundant check before avcodec_free_context()
...
Besides being unnecessary it is also safer: If the error for an
unrecognized option were triggered (which seems to be impossible right
now), it might be that the stream whose codecpar is accessed is NULL.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
3a5412b39e
doc/examples/extract_mvs: Explicitly free options
...
The user should not rely on all options always being recognized
(in particular not on error).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
933308a290
doc/examples/demuxing_decoding: Remove unused options
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
73f9d5b673
avcodec/avcodec: Avoid redundant copies of options in avcodec_open2
...
It is no longer necessary now that ff_frame_thread_encoder_init()
no longer receives an options dictionary.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
7e03d962a4
avutil/opt: Check directly for av_dict_copy() failure
...
av_dict_copy() returned void when this code was written.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
cbf6047c83
avcodec/frame_thread_encoder: Remove redundant memcpy
...
In case the underlying AVCodec has no private class, the private data
of both the main as well as each worker AVCodecContext is just zeroed
(the codec's init function has not been called on any of them and
without a private class there is no way to legitimately set anything
before the aforementioned init function).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago