summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* lavfi/avf_showspatial: add framerate optionframe_durationAnton Khirnov2022-08-23
| | | | | | | | | | | Apparently this option was intended (the context contains a currently-unused frame_rate field), but was never added. This results in the output timebase being unset after config_output(), so the input audio timebase ends up being used for video output, which is clearly wrong. Add an option for setting output video framerate. Also set output frame durations.
* lavfi/avf_showfreqs: set frame durationsAnton Khirnov2022-08-23
| | | | The filter is supposed to produce CFR output.
* lavfi/avf_showcqt: set frame durationsAnton Khirnov2022-08-23
| | | | The filter is supposed to produce CFR output.
* lavfi/avf_avectorscope: set frame durationsAnton Khirnov2022-08-23
| | | | The filter is supposed to produce CFR output.
* lavfi/avf_aphasemeter: set frame durationsAnton Khirnov2022-08-23
| | | | The filter is supposed to produce CFR output.
* lavfi/avf_ahistogram: set frame durationsAnton Khirnov2022-08-23
| | | | The filter is supposed to produce CFR output.
* ffmpeg handle durations WIPAnton Khirnov2022-08-23
|
* lavc/libaomenc: pass through frame durations to encoded packetsAnton Khirnov2022-08-23
|
* lavc/libx265: pass through frame durations to encoded packetsAnton Khirnov2022-08-23
|
* lavc/libx264: pass through frame durations to encoded packetsAnton Khirnov2022-08-23
|
* lavc/libtheoraenc: stop setting dts unnecessarilyAnton Khirnov2022-08-23
| | | | | Theora is not marked as supporting reordering, so dts will be set from pts by the generic code.
* lavc/libtheoraenc: pass through frame durations to encoded packetsAnton Khirnov2022-08-23
|
* lavc/pngenc: stop setting dts unnecessarily for APNGAnton Khirnov2022-08-23
| | | | | APNG is not marked as supporting reordering, so dts will be set from pts by the generic code.
* lavc/pngenc: pass through frame durations to encoded packets for APNGAnton Khirnov2022-08-23
|
* lavc/ffv1enc: pass through frame durations to encoded packetsAnton Khirnov2022-08-23
|
* lavc/adxenc: rescale packet duration according to timebaseAnton Khirnov2022-08-23
| | | | The timebase does not always have to be 1/samplerate.
* lavc: move ff_samples_to_time_base() to encode.hAnton Khirnov2022-08-23
| | | | | This function should only be used by encoders, since AVCodecContext.time_base is not used by audio decoders.
* lavc/nvenc: pass through frame durations to encoded packetsAnton Khirnov2022-08-23
|
* lavc/amfenc: pass through frame durations to encoded packetsAnton Khirnov2022-08-23
|
* lavc/librav1e: pass through frame durations to encoded packetsAnton Khirnov2022-08-23
|
* lavc/encode: pass through frame durations to encoded packetsAnton Khirnov2022-08-23
| | | | | | The generic code can only handle the no-delay case. Encoders with delay need to be handled individually, which will be done in the following commits.
* lavc/encode: combine setting no-delay pts for video/audioAnton Khirnov2022-08-23
|
* lavc/encode: generalize a check for setting dts=ptsAnton Khirnov2022-08-23
|
* lavc/encode: simplify a conditionAnton Khirnov2022-08-23
| | | | | | | active_thread_type & FF_THREAD_FRAME will only be true for encoders if frame_thread_encoder has been successfully initialized. Also, stop relying on DCE in that block.
* lavc/encode: make sure frame timebase matches encoder, when setAnton Khirnov2022-08-23
| | | | | | AVFrame.time_base has been added recently, but is currently not used for anything. Prepare for its use in encoders by rejecting frames where time_base is set, but differs from the AVCodecContext one.
* lavfi/setpts: unset frame durationsAnton Khirnov2022-08-23
| | | | This filter cannot know frame durations.
* lavfi/vf_fps: set frame durationAnton Khirnov2022-08-23
|
* fftools/ffmpeg: call av_guess_frame_rate() when opening the fileAnton Khirnov2022-08-22
| | | | | It is currently called when configuring the filter, which races with the demuxer thread.
* lavf: deprecate av_stream_get_end_pts()Anton Khirnov2022-08-22
| | | | | | | | | | | According to its documentation it returns "pts of the last muxed packet + its duration", but the value it actually returns right now is (possibly guessed) dts after muxer-internal bitstream filtering (if any). This function was added for ffmpeg.c, but it is not used there anymore. Since the value it returns is ill-defined and so inappropriate for any serious use, deprecate it.
* avcodec/audiotoolboxenc: return AVERROR_EXTERNAL immediately when encode errorSteven Liu2022-08-22
| | | | | | | | Just return AVERROR_EXTERNAL immediately when encode error. The other logic should keep the old behavior before commit 7c05b7951. Suggested-By: Zhao Zhili <zhilizhao@tencent.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* swresample/swresample: fill the correct buffer to print the output layout stringJames Almer2022-08-21
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mpegvideo: Allocate encoder-only tables in mpegvideo_enc.cAndreas Rheinhardt2022-08-21
| | | | | | | | | | | | | | | This commit moves the encoder-only allocations of the tables owned solely by the main encoder context to mpegvideo_enc.c. This avoids checks in mpegvideo.c for whether we are dealing with an encoder; it also improves modularity (if encoders are disabled, this code will no longer be included in the binary). And it also avoids having to reset these pointers at the beginning of ff_mpv_common_init() (in case the dst context is uninitialized, ff_mpeg_update_thread_context() simply copies the src context into dst which therefore may contain pointers not owned by it, but this does not happen for encoders at all). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4videodec: Keep data_partitioning in sync between threadsAndreas Rheinhardt2022-08-21
| | | | | | | | | Fixes frame-threaded decoding of samples created by concatting a video with data partitioning and a video not using it. (Only the MPEG-4 decoder sets this, so it is synced in mpeg4_update_thread_context() despite being a MpegEncContext-field.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec: Combine two loopsAndreas Rheinhardt2022-08-21
| | | | | | (I think the check for !reference is unnecessary.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* APIchanges: fix library version in the latest entryJames Almer2022-08-19
| | | | | | Also add commit hash and date while at it. Signed-off-by: James Almer <jamrial@gmail.com>
* The vuya pixel format was recently added, so this lavc workaround is no longerJames Almer2022-08-19
| | | | | | needed. Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/input: add rgbaf16 input supportTimo Rothenpieler2022-08-19
| | | | | | This is by no means perfect, since at least ddagrab will return scRGB data with values outside of 0.0f to 1.0f for HDR values. Its primary purpose is to be able to work with the format at all.
* swscale: add opaque parameter to input functionsTimo Rothenpieler2022-08-19
|
* avutil/half2float: use native _Float16 if availableTimo Rothenpieler2022-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _Float16 support was available on arm/aarch64 for a while, and with gcc 12 was enabled on x86 as long as SSE2 is supported. If the target arch supports f16c, gcc emits fairly efficient assembly, taking advantage of it. This is the case on x86-64-v3 or higher. Same goes on arm, which has native float16 support. On x86, without f16c, it emulates it in software using sse2 instructions. This has shown to perform rather poorly: _Float16 full SSE2 emulation: frame=50074 fps=848 q=-0.0 size=N/A time=00:33:22.96 bitrate=N/A speed=33.9x _Float16 f16c accelerated (Zen2, --cpu=znver2): frame=50636 fps=1965 q=-0.0 Lsize=N/A time=00:33:45.40 bitrate=N/A speed=78.6x classic half2float full software implementation: frame=49926 fps=1605 q=-0.0 Lsize=N/A time=00:33:17.00 bitrate=N/A speed=64.2x Hence an additional check was introduced, that only enables use of _Float16 on x86 if f16c is being utilized. On aarch64, a similar uplift in performance is seen: RPi4 half2float full software implementation: frame= 6088 fps=126 q=-0.0 Lsize=N/A time=00:04:03.48 bitrate=N/A speed=5.06x RPi4 _Float16: frame= 6103 fps=158 q=-0.0 Lsize=N/A time=00:04:04.08 bitrate=N/A speed=6.32x Since arm/aarch64 always natively support 16 bit floats, it can always be considered fast there. I'm not aware of any additional platforms that currently support _Float16. And if there are, they should be considered non-fast until proven fast.
* avutil/half2float: move non-inline init code out of headerTimo Rothenpieler2022-08-19
|
* avutil/half2float: move tables to header-internal structsTimo Rothenpieler2022-08-19
| | | | | Having to put the knowledge of the size of those arrays into a multitude of places is rather smelly.
* avutil/half2float: adjust conversion of NaNTimo Rothenpieler2022-08-19
| | | | | | | | | | | IEEE-754 differentiates two different kind of NaNs. Quiet and Signaling ones. They are differentiated by the MSB of the mantissa. For whatever reason, actual hardware conversion of half to single always sets the signaling bit to 1 if the mantissa is != 0, and to 0 if it's 0. So our code has to follow suite or fate-testing hardware float16 will be impossible.
* avutil: move half-precision float helper to avutilTimo Rothenpieler2022-08-19
|
* checkasm: sw_scale: Produce more realistic test filter coefficients for yuv2yuvXMartin Storsjö2022-08-19
| | | | | | | | | This avoids triggering overflows in the filters, and avoids stray test failures in the approximate functions on x86; due to rounding differences, one implementation might overflow while another one doesn't. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Compare frag times in correct time base when seeking a stream without a ↵Derek Buitenhuis2022-08-19
| | | | | | | | | | | | | | | | corresponding sidx Some muxers, such as GPAC, create files with only one sidx, but two streams muxed into the same fragments pointed to by this sidx. Prevously, in such a case, when we seeked in such files, we fell back to, for example, using the sidx associated with the video stream, to seek the audio stream, leaving the seekhead in the wrong place. We can still do this, but we need to take care to compare timestamps in the same time base. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* swscale/x86/yuv2yuvX: Remove unused ff_yuv2yuvX_mmx()Andreas Rheinhardt2022-08-19
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec: Don't sync AVCodecContext fields manuallyAndreas Rheinhardt2022-08-18
| | | | | | | They are already synced generically in update_context_from_thread() in pthread_frame.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec: Remove commented-out cruftAndreas Rheinhardt2022-08-18
| | | | | | | The fields in question were removed in 759001c534287a96dc96d1e274665feb7059145d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc: fix binary values of SI prefixesChema Gonzalez2022-08-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ffv1enc: Remove redundant wrapperAndreas Rheinhardt2022-08-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>