summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* lavc/pthread_frame: add support for thread-safe hwaccelshwaccel_threadAnton Khirnov2023-05-05
|
* lavc/decode: stop duplicating code from hwaccel_uninit()Anton Khirnov2023-05-05
|
* lavc/decode: pass AVHWAccel instead of AVCodecHWConfigInternal to hwaccel_init()Anton Khirnov2023-05-05
| | | | | | | | The only thing besides the hwaccel that this function uses from AVCodecHWConfigInternal is the pixel format, which should always match the hwaccel one. Will be useful in following commits.
* lavf/av1dec: stop setting codec context framerateAnton Khirnov2023-05-05
| | | | Demuxers are not supposed to do this.
* lavf/av1dec: mark as notimestampsAnton Khirnov2023-05-05
|
* lavf/rawdec: stop setting codec context framerateAnton Khirnov2023-05-05
| | | | Demuxers are not supposed to do this.
* lavf/demux: use avg_frame_rate for packet durations for notimestamps formatsAnton Khirnov2023-05-05
| | | | | avg_frame_rate, if set, should be more reliable than stream timebase in this case.
* lavc/tak: do not store invalid values in stream infoAnton Khirnov2023-05-05
| | | | | | | | | | When tak_get_nb_samples() fails, it will currently write AVERROR_INVALIDDATA as TAKStreamInfo.frame_samples. The parser will then use this negative value as a frame duration, which leads to various breakage. Avoid this by returning the error code from tak_parse_streaminfo() directly; never store negative values in the parsed header.
* lavc/tak: make ff_tak_parse_streaminfo staticAnton Khirnov2023-05-05
| | | | It is not used outside of tak.c
* avfilter/vf_coreimage: add missing semicolonJames Almer2023-05-04
| | | | | | Fixes compilation after af8db9106c27a1ef11ec69ecbbe7a57462c14367. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/version: bump minor after recent changesJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: deprecate key_frameJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools: use the new AVFrame keyframe flagJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: use the new AVFrame key_frame flag in all filtersJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: use the new AVFrame key_frame flag in all decoders and encodersJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: add a keyframe flag to AVFrameJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: deprecate interlaced_frame and top_field_firstJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools: use the new AVFrame interlace flagsJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: use the new AVFrame interlace flags in all filtersJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: use the new AVFrame interlace flags in all decoders and encodersJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: add new interlaced and top_field_first flagsJames Almer2023-05-04
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/options_table: reorder nokey after nointraZhao Zhili2023-05-04
| | | | | | So the values are in ascending order. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/hevcdec: remove unused variables from hls_slice_dataZhao Zhili2023-05-04
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/avcodec: fix UB NULL+0Zhao Zhili2023-05-04
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* doc/filters/libplacebo: fix outdated/wrong noteNiklas Haas2023-05-03
| | | | This has not been the case since c0b93c4f8+48c385fb4c.
* avfilter/vf_libplacebo: add flexible crop exprsNiklas Haas2023-05-03
| | | | | | | | | | | | | | | | | | | | Motivated by a desire to use vf_libplacebo as a GPU-accelerated cropping/padding/zooming filter. This commit adds support for setting the `input/target.crop` fields as dynamic expressions. Re-use the same generic variables available to other scale and crop type filters, and also add some more that we can afford as a result of being able to set these properties dynamically. It's worth pointing out that `out_t/ot` is currently redundant with `in_t/t` since it will always contain the same PTS values, but I plan on changing this in the near future. I decided to also expose `crop_w/crop_h` and `pos_w/pos_h` as variables in the expression parser itself, since this enables the fairly common use case of determining dimensions first and then placing the image appropriately, such as is done in the default behavior (which centers the cropped/placed region by default).
* avfilter/vf_libplacebo: add fillcolor optionNiklas Haas2023-05-03
| | | | | | In some circumstances, libplacebo will clear the background as a result of cropping/padding. Currently, this uses the hard-coded default fill color of black. This option makes this behavior configurable.
* avfilter/af_afreqshift: cache nb_coeffs valuePaul B Mahol2023-05-03
|
* riscv/intmath: use builtins for counting onesRémi Denis-Courmont2023-05-02
| | | | | | As with the earlier bswap change, all versions of GCC and Clang that support RISC-V support the popcount built-ins, so we can just use them instead of inline assembler.
* riscv/bswap: use compiler builtinsRémi Denis-Courmont2023-05-02
| | | | | | | | | | | av_bswapXX() are used in context that expect exact size types, notably variable arguments to av_log(). On Linux RV64, uint_fast32_t is an unsigned long, so the current inline assembler does not work properly. Since GCC and Clang gained their byte-swap built-ins before they supported RISC-V, we can simply defer to them. As an added bonus, the compiler can do instruction scheduling, which it couldn't with the Zbb inline assembler.
* fftools/ffmpeg: always use the same path for setting InputStream.[next_]dtsAnton Khirnov2023-05-02
| | | | | | | | | | | | | | | | | | | | | Currently those are set in different ways depending on whether the stream is decoded or not, using some values from the decoder if it is. This is wrong, because there may be arbitrary amount of delay between input packets and output frames (depending e.g. on the thread count when frame threading is used). Always use the path that was previously used only for streamcopy. This should not cause any issues, because these values are now used only for streamcopy and discontinuity handling. This change will allow to decouple discontinuity processing from decoding and move it to ffmpeg_demux. It also makes the code simpler. Changes output in fate-cover-art-aiff-id3v2-remux and fate-cover-art-mp3-id3v2-remux, where attached pictures are now written in the correct order. This happens because InputStream.dts is no longer reset to AV_NOPTS_VALUE after decoding, so streamcopy actually sees valid dts values.
* fftools/ffmpeg: constify packets passed to decode*()Anton Khirnov2023-05-02
| | | | They are not modified by these functions.
* fftools/ffmpeg: drop InputStream.[next_]ptsAnton Khirnov2023-05-02
| | | | They are no longer used for anything.
* fftools/ffmpeg_filter: stop using InputStream.pts for filter EOF tsAnton Khirnov2023-05-02
| | | | Use InputStream.last_frame_pts/duration instead, which is more accurate.
* fftools/ffmpeg: stop using InputStream.pts for generating video timestampsAnton Khirnov2023-05-02
| | | | | | | This was added in 380db569287ba99d903b7629f209b9adc7fd2723 as a temporary crutch that is not needed anymore. The only case where this code can be triggered is the very first frame, for which InputStream.pts is always equal to 0.
* fftools/ffmpeg: rework audio-decode timestamp handlingAnton Khirnov2023-05-02
| | | | | | | | | | | | | | | | | | | | | Stop using InputStream.dts for generating missing timestamps for decoded frames, because it contains pre-decoding timestamps and there may be arbitrary amount of delay between input packets and output frames (e.g. dependent on the thread count when frame threading is used). It is also in AV_TIME_BASE (i.e. microseconds), which may introduce unnecessary rounding issues. New code maintains a timebase that is the inverse of the LCM of all the samplerates seen so far, and thus can accurately represent every audio sample. This timebase is used to generate missing timestamps after decoding. Changes the result of the following FATE tests * pcm_dvd-16-5.1-96000 * lavf-smjpeg * adpcm-ima-smjpeg In all of these the timestamps now better correspond to actual frame durations.
* fftools/ffmpeg: set AVFrame.time_base for decoded framesAnton Khirnov2023-05-02
| | | | Makes it easier to keep track of the timebase the frames are in.
* fftools/ffmpeg: stop using packet pts for decoded audio frame ptsAnton Khirnov2023-05-02
| | | | | | | | | | If input packets have timestamps, they will be propagated to output frames by the decoder, so at best this block does not do anything. There can also be an arbitrary amount of delay between packets sent to the decoder and decoded frames (e.g. due to decoder's intrinsic delay or frame threading), so deriving any timestamps from packet properties is wrong.
* fftools/ffmpeg_filter: use correct timebase for filter EOF timestampAnton Khirnov2023-05-02
| | | | It does not need to be equal to demuxer timebase.
* fftools/ffmpeg_filter: keep track of filtergraph input timebaseAnton Khirnov2023-05-02
| | | | Will be useful in following commits.
* fftools/ffmpeg_filter: add InputFilter private dataAnton Khirnov2023-05-02
| | | | | Move InputFilter.frame_queue to it, which is not accessed outside of ffmpeg_filter.
* fftools/ffmpeg_filter: factorize allocating InputFilterAnton Khirnov2023-05-02
|
* fftools/ffmpeg_filter: make graph_desc privateAnton Khirnov2023-05-02
| | | | It is not used outside of ffmpeg_filter.
* fftools/ffmpeg_filter: add filtergraph private dataAnton Khirnov2023-05-02
| | | | | Start by moving OutputStream.filtered_frame to it, which really belongs to the filtergraph rather than the output stream.
* fftools/ffmpeg_filter: make ifilter_parameters_from_frame() staticAnton Khirnov2023-05-02
| | | | It is no longer used outside of this file.
* fftools/ffmpeg: drop undocumented runtime debug-settingAnton Khirnov2023-05-02
| | | | | This feature is of highly questionable usefulness and - as the comment in the code says - is not actually supported by the API.
* fftools/ffmpeg: move OutputStream.packets_encoded to EncoderAnton Khirnov2023-05-02
| | | | It is no longer used outside of ffmpeg_enc.
* fftools/ffmpeg: drop OutputStream.errorAnton Khirnov2023-05-02
| | | | | Only the first component is used in update_video_stats(), so make it a stack variable in that function.
* fftools/ffmpeg: drop OutputStream.pict_typeAnton Khirnov2023-05-02
| | | | | It is no longer used outside of update_video_stats(), so make it a stack variable in that function.
* fftools/ffmpeg: reduce access to OutputStream.enc_ctxAnton Khirnov2023-05-02
| | | | It will be made private to Encoder in the future.