Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-15avcodec/libdav1d: add an option to set max frame delayJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2022-09-03avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt
It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-19lavc: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov
2022-07-18avcodec: Make init-threadsafety the defaultAndreas Rheinhardt
and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-07avcodec/libdav1d: don't depend on the event flags API to init sequence ↵James Almer
params the first time A bug was found in dav1d <= 1.0.0 where the event flag New Sequence Header would not be signaled for some samples using delayed random access points. It has since been fixed, but nonetheless it's best to ensure the AVCodecContext is filled with parameters when parsing the first frame, regardless of what events were signaled. Fixes ticket #9694. Signed-off-by: James Almer <jamrial@gmail.com>
2022-04-05avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt
This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt
Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt
Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-01avcodec/libdav1d: free the Dav1dData packet on dav1d_send_data() failureJames Almer
We still own it on failure, and there's no point trying to feed it again. This should address the issue reported in dav1d #383 and part of VLC #26259. Signed-off-by: James Almer <jamrial@gmail.com> Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
2022-01-10avcodec/libdav1d: explicitly set Dav1dSettings.apply_grainJames Almer
Don't depend on its default value being 1, as that could change anytime. Signed-off-by: James Almer <jamrial@gmail.com>
2022-01-07avcodec/libdav1d: honor the requested strict_std_compliance level on ↵James Almer
supported builds Signed-off-by: James Almer <jamrial@gmail.com>
2021-11-07avcodec/libdav1d: Use av_memdup() where appropriateAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07avcodec/libdav1d: Use AVCodecInternal.in_pkt instead of stack packetAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-11-07avcodec/libdav1d: Don't leak side-data-only packetsAndreas Rheinhardt
Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21avcodec/libdav1d: let libdav1d choose optimal max frame delayJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-21avcodec/libdav1d: pass auto threads value to libdav1dJames Almer
libdav1d 1.0.0 will be the first version supporting Dav1dSettings.n_threads == 0. Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-03avcodec/libdav1d: fix compilation after recent libdav1d API changesJames Almer
They were done in preparation for an upcoming 1.0 release. Keep supporting previous releases for the time being. Reviewed-by: BBB Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-24avcodec/libdav1d: signal the presence of Film Grain in the decoder contextJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-22avcodec/avcodec: Don't include cpu.hAndreas Rheinhardt
It is not used here at all; instead, add it where it is used without including it or any of the arch-specific CPU headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-14avcodec/libdav1d: parse sequence headers in extradata if availableJames Almer
This allows the decoder context to be initialized with all stream parameters before a packet is parsed. Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-09avcodec/libdav1d: don't repeatedly parse the same sequence headerJames Almer
Look at the event flag that signals a new sequence header was found in the bitstream on supported libdav1d versions for this purpose. Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-09avcodec/libdav1d: use ff_decode_frame_props() to fill frame propertiesJames Almer
The main benefit comes from propagating container level metadata like hdr, which is more commonly used than the relevant Metadata OBUs. Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27avcodec: Constify AVCodecsAndreas Rheinhardt
Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27avutil/frame: Remove deprecated AVFrame.pkt_pts fieldAndreas Rheinhardt
Deprecated in 32c8359093d1ff4f45ed19518b449b3ac3769d27. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-16lavc: rename AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADSAnton Khirnov
This cap is currently used to mark multithreading-capable codecs that wrap external libraries with their own multithreading code. The name is highly confusing for our API users, since libavcodec ALWAYS handles thread_count=0 (see commit message in previous commit). Therefore rename the cap and update its documentation to make its meaning clear. The old name is kept deprecated until next+1 major bump.
2021-03-16lavc: replace internal use of AV_CODEC_CAP_AUTO_THREADS with an internal capAnton Khirnov
AV_CODEC_CAP_AUTO_THREADS was originally added in b4d44a45f9a to mark codecs that spawn threads internally and are able to select an optimal threads count by themselves (all such codecs are wrappers around external libraries). It is used by lavc generic code to check whether it should handle thread_count=0 itself or pass the zero directly to the codec implementation. Within this meaning, it is clearly supposed to be an internal cap rather than a public one, since from the viewpoint of a libavcodec user, lavc ALWAYS handles thread_count=0. Whether it happens in the generic code or within the codec internals is not a meaningful difference for the caller. External aspects of this flag will be dealt with in the following commit.
2020-12-13avcodec/libdav1d: stop setting AVFrame->best_effort_timestampJames Almer
It's now set by the generic decode code. Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-27lavu/film_grain_params: fix typo in type enumLynne
Ref: xkcd #1015
2020-11-26libdav1d: correctly copy ar_coeffs_uv to our structLynne
Our struct is a [2][25], libdav1d's is a [2][25 + 3] so the last 3 v coefficients were missing. Copy each plane's coefficients separately.
2020-11-26libdav1d: use film grain export flag to export AVFilmGrainParams side dataLynne
This patch is relatively straightforward with one exception: the decoder option flag. The option was introduced to troubleshoot but its existence is conflicting and redundant now that we have a codec-generic flag. Hence this patch deprecates it. The way it interacts with AV_CODEC_EXPORT_DATA_FILM_GRAIN is as follows: If filmgrain is unset and AV_CODEC_EXPORT_DATA_FILM_GRAIN is present, disable film grain application and export side data. If filmgrain is set to 0, disable film grain and export side data. If filmgrain is set to 1, apply film grain but export side data if the AV_CODEC_EXPORT_DATA_FILM_GRAIN flag is set. This may result in double film grain application, but the user has requested it by setting both.
2020-08-26avcodec/libdav1d: Call ff_set_sar in addition to setting the frame SARDerek Buitenhuis
Similar to what we do in libaomdec.c. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2020-08-15avcodec/libdav1d: add support for A53 Closed CaptionsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-22avcodec/libdav1d: use av_image_get_buffer_size() to calculate frame sizeJames Almer
Calling av_image_fill_arrays() with NULL as src argument may result in UB. Signed-off-by: James Almer <jamrial@gmail.com>
2020-05-18avcodec/libdav1d: export frame sample aspect ratioJames Almer
Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-28Add options for spatial layers.Thierry Foucu
Disable by default to output all the layers, to match libaomdec wrapper. Add option to select the operating point for the spatial layers. Update the documentation with the new options. Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-13avcodec/libdav1d: export bitstream timing info when availableJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-22avcodec/libdav1d: fix setting AVFrame reordered_opaqueJames Almer
Actually reorder the values. Should effectively fix ticket #8300. Tested-by: Andrey Semashev <andrey.semashev@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-17avcodec/libdav1d: set AVFrame reordered_opaqueJames Almer
Fixes ticket #8300 Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-15avcodec/libdav1d: use the library default for the filmgrain optionJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-08-15avcodec/libdav1d: allow setting frame size limit in pixelsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-27avcodec/libdav1d: add support for RGB streamsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-27avcodec/libdav1d: assert Dav1dPicture allocator_data is set before ↵James Almer
referencing its data To ensure the custom allocator is effectively used. Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-27avcodec/libdav1d: export level from the Sequence HeaderJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-20avcodec/libdav1d: fine tune thread distributionJames Almer
As suggested by Ronald, don't map auto threads to frame threads only, and instead distribute them between frame and tile more efficiently. Add a new framethreads override option, similar to the tilethreads one. Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-19avcodec/libdav1d: use a reference to the allocated buffer instead of ↵James Almer
wrapping the Dav1dPicture Removes an av_malloc() per frame. Reviewed-by: BBB Reviewed-by: nevcairiel Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-19avcodec/libdav1d: reset pool size on allocation failureJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-13avcodec/libdav1d: unref the frame on failureJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-13libdav1d: Add support for reading hdr10 metadataVittorio Giovara
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-13avcodec/libdav1d: consistently use AVERROR return valuesJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-13avcodec/libdav1d: use a custom picture allocatorJames Almer
Replaces the libdav1d internal allocator. It uses an AVBufferPool to reduce the amount of allocated buffers. About 5% speed up when decoding 720p or higher streams. Reviewed-by: "Vittorio Giovara <vittorio.giovara@gmail.com>" Signed-off-by: James Almer <jamrial@gmail.com>