summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avformat/id3v2: Avoid allocations for ID3v2ExtraMetaAndreas Rheinhardt2020-05-25
| | | | | | | | | | | | Up until now, the ID3v2ExtraMeta structure (which is used when parsing ID3v2 tags containing attached pictures, chapters etc.) contained a pointer to separately allocated data that depended on the type of the tag. Yet the difference of the sizes of the largest and the smallest of these structures is fairly small, so that it is better to simply include a union of all the possible types of tag-dependent structures in ID3v2ExtraMeta. This commit implements this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/aiffenc: Don't forget chaptersAndreas Rheinhardt2020-05-25
| | | | | | | | | | | | If the write_id3v2 option is set, the aiff muxer would write id3v2 tags if there is global metadata or if there are attached pics to write. Chapters are ignored in this check that precedes writing id3v2 tags. Yet 47ac344970f1d6ef149c4b8a883b68cdb15112c2 added support for writing chapters as id3v2 tags, so one should check for the existence of chapters, too; otherwise the chapters would only be written in case there is global metadata or an attached pic. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: move avcodec_flush_buffers from decode.c to utils.cJames Almer2020-05-24
| | | | | | It's not a decoding exclusive function anymore. Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/libvpxenc: Don't free user-provided AVPacketAndreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* libavcodec/libmp3lame: Don't free user-provided AVPacketAndreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/libopusenc: Don't free user-provided AVPacketAndreas Rheinhardt2020-05-23
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* mfenc: Fix building with clang in MSVC modeMartin Storsjö2020-05-23
| | | | | | | | | | | | | | | Just including icodecapi.h + codecapi.h apparently misses some bits, that MSVC doesn't complain about, but Clang does. Thus add a missing header to the custom hacky include path (required for keeping ICodecAPI visible when building in UWP mode, as it is intended to). The issue in Windows SDK headers about ICodecAPI availability in UWP/app mode has been reported upstream at https://developercommunity.visualstudio.com/content/problem/1037125/icodecapi-not-visible-when-compiling-in-uwp-mode.html, and later also filed in Feedback Hub (which can't be linked to externally). Signed-off-by: Martin Storsjö <martin@martin.st>
* lavfi/vulkan: use all enabled queues in the queue familyLynne2020-05-23
| | | | | This should significantly improve the performance with certain filterchains.
* lavfi/vulkan: fix 2 minor memory leaksLynne2020-05-23
|
* hwcontext_vulkan: move physical device feature discovery to device_initLynne2020-05-23
| | | | Otherwise custom vulkan device contexts won't work.
* hwcontext_vulkan: split uploading and downloading contextsLynne2020-05-23
| | | | This allows us to speed up only-uploading or only-downloading use cases.
* hwcontext_vulkan: set usage for DRM imports to the frames context usageLynne2020-05-23
| | | | | They're nothing special, and there's no reason they should always use the default flags.
* hwcontext_vulkan: do not OR the user-specified usage with our default flagsLynne2020-05-23
| | | | | Some users may need special formats that aren't available when the STORAGE flag bit is set, which would result in allocations failing.
* hwcontext_vulkan: actually use the frames exec context for prep/import/exportLynne2020-05-23
| | | | | | | | This was never actually used, likely due to confusion, as the device context also had one used for uploads and downloads. Also, since we're only using it for very quick image barriers (which are practically free on all hardware), use the compute queue instead of the transfer queue.
* hwcontext_vulkan: support user-provided poolsLynne2020-05-23
| | | | | If an external pool was provided we skipped all of frames init, including the exec context.
* hwcontext_vulkan: use all enabled queues for transfers, make uploads asyncLynne2020-05-23
| | | | | | This commit makes full use of the enabled queues to provide asynchronous uploads of images (downloads remain synchronous). For a pure uploading use cases, the performance gains can be significant.
* hwcontext_vulkan: wrap ImageBufs into AVBufferRefsLynne2020-05-23
| | | | Makes it easier to support multiple queues
* hwcontext_vulkan: improve public header documentationLynne2020-05-23
| | | | | Some things like using ImageLists were from a really old version that still used multiplanar images.
* hwcontext_vulkan: expose the enabled device featuresLynne2020-05-23
| | | | | | | With this, the puzzle of making libplacebo, ffmpeg and any other Vulkan API users interoperable is complete. Users of both libraries can initialize one another's contexts without having to create a new one.
* hwcontext_vulkan: expose the amount of queues for each queue familyLynne2020-05-23
| | | | | This, along with the next patch, are the last missing pieces to being interoperable with libplacebo.
* hwcontext: add av_hwdevice_ctx_create_derived_optsLynne2020-05-23
| | | | | | | | | | | | | This allows for users who derive devices to set options for the new device context they derive. The main use case of this is to allow users to enable extensions (such as surface drawing extensions) in Vulkan while deriving from the device their frames are on. That way, users don't need to write any initialization code themselves, since the Vulkan spec invalidates mixing instances, physical devices and active devices. Apart from Vulkan, other hwcontexts ignore the opts argument since they don't support options at all (or in VAAPI and OpenCL's case, options are currently only used for device selection, which device_derive overrides).
* oggdec: remove the oggparsedaala subdemuxerLynne2020-05-23
| | | | | | The Xiph foundation never standardized either Daala nor its mapping in Ogg, and all files that were created are undecodable without knowledge of the git hash.
* lavfi: add untile filter.Nicolas George2020-05-23
|
* lavfi/framesync: use av_gcd_q().Nicolas George2020-05-23
|
* lavu: add av_gcd_q().Nicolas George2020-05-23
|
* lavfi/tests/formats: reindent.Nicolas George2020-05-23
|
* lavfi/formats: remove dead code.Nicolas George2020-05-23
| | | | | Move the contents of all_channel_layouts.inc directly into libavfilter/tests/formats.c.
* lavfi/vf_crop: use ff_formats_pixdesc_filter().Nicolas George2020-05-23
|
* lavfi/formats: add ff_formats_pixdesc_filter().Nicolas George2020-05-23
|
* avformat/webm_chunk: Open AVIOContext before initializing sub-muxerAndreas Rheinhardt2020-05-23
| | | | | | | | | | | | The description of AVOutputFormat.init contains the statement that "this method must not write output". Due to this, the webm_chunk muxer defers opening the AVIOContext for the child muxer until avformat_write_header(), i.e. there is no AVIOContext when the sub-muxer's avformat_init_output() is called. But this violates the documentation of said function which requires the AVFormatContext to have an already opened AVIOContext. This commit fixes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: Forward errors from avpriv_split_xiph_headers()Andreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Use proper context for loggingAndreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/xiph: Return better error codesAndreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/segment: Propagate dispositionAndreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/segment: Access AVStream more directlyAndreas Rheinhardt2020-05-23
| | | | | | | by storing s->streams[i] in a pointer instead of constantly using s->streams[i]->... Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Simplify parsing stringsAndreas Rheinhardt2020-05-23
| | | | | | | | | Don't use the functions for searching substrings when all one is looking for is a char anyway. Given that there is already a standard library function for "find last occurence of a char in a string" also allows one to remove a custom loop. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Don't segfault on invalid argumentsAndreas Rheinhardt2020-05-23
| | | | | | | | | | | | | The current parsing process for adaptation_sets does not guarantee every adaptation set to contain at least one stream, because the loop exits immediately as soon as the end of the string has been reached, without checking whether the currently active adaptation set group is lacking a stream. This would lead to segfaults lateron as the rest of the code presumed that every adaptation set contains a stream. This commit fixes this by erroring out when the last adaptation set group is incomplete. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Remove possibility of infinite loopAndreas Rheinhardt2020-05-23
| | | | | | | | | | | | | | | | The WebM DASH manifest muxer uses a loop to parse the adaptation_sets string (which is given by the user and governs which AVStreams are mapped to what adaptation set) and the very beginning of this loop is "if (*p == ' ') continue;". This of course leads to an infinite loop if the condition is true. It is true if e.g. the string begins with ' ' or if there are more than one ' ' between different adaptation set groups. To fix this, the parsing process has been modified to consume the space if it is at a place where it can legitimately occur, i.e. when a new adaptation set group is expected. The latter restriction implies that an error is returned if a space exists where none is allowed to exist. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Be more strict when parsing stream indicesAndreas Rheinhardt2020-05-23
| | | | | | | | | | | | The syntax of the adaptation_sets string by which the user determines the mapping of AVStreams to adaptation sets is "id=x,streams=a,b,c id=y,streams=d,e" (means: the streams with the indices a, b and c belong to the adaptation set with id x). Yet there was no check for whether these indices were actual numbers and if there is a number whether it really extends to the next ',', ' ' or to the end of the string or not. This commit adds a check for this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Avoid allocation for parsing a numberAndreas Rheinhardt2020-05-23
| | | | | | | | | | | In order to parse a number from a string, the WebM DASH manifest muxer would duplicate (via heap-allocation) the part of the string that contains the number, then read the number via atoi() and then free the duplicate again. This has been replaced by simply using strtoll() (which in contrast to atoi() has defined behaviour when the number is not representable). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mux: Remove unnecessary unreferencing of AVPacketAndreas Rheinhardt2020-05-23
| | | | | | | | Since commit c5324d92c5f206dcdc2cf93ae237eaa7c1ad0a40 all custom interleave_packet() functions always return clean packets (even on error), so that unreferencing manually can be removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/avformat: Remove redundant "NOT PART OF PUBLIC API"Andreas Rheinhardt2020-05-23
| | | | | | | | AVStream.request_probe as well as AVStream.mux_ts_offset are below the separator of public and private fields, so that a further "NOT PART OF PUBLIC API" is redundant. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_lut3d: initial float pixel format supportMark Reid2020-05-23
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ass: explicitly set ScaledBorderAndShadowOneric2020-05-23
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: move mpeg4 profiles to profiles.hMarton Balint2020-05-22
| | | | | | Also bump micro version after the recent option changes. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: move msbc profile to encoderMarton Balint2020-05-22
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/options_table: remove dts profilesMarton Balint2020-05-22
| | | | | | Our encoder (dcaenc) does not use any of these. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: move aacenc profiles to profiles.hMarton Balint2020-05-22
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/options_table: make AVCodecContext->profile search for child constantsMarton Balint2020-05-22
| | | | | | | | | This change makes it possible for child encoders to define custom profile option names which can be used for setting the AVCodecContext->profile. Also rename unit name to something rather unique, so it won't be used elsewhere. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/opt: add AV_OPT_FLAG_CHILD_CONSTSMarton Balint2020-05-22
| | | | | | | | This will be used for AVCodecContext->profile. By specifying constants in the encoders we won't have to use the common AVCodecContext options table and different encoders can use the same profile name even with different values. Signed-off-by: Marton Balint <cus@passwd.hu>