summaryrefslogtreecommitdiff
path: root/libavformat/avisynth.c
Commit message (Collapse)AuthorAge
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avisynth: fix audio on big endianStephen Hutchinson2021-03-11
| | | | | | | | AviSynth+ outputs audio in the same format as the OS, so assuming little endian formats as input on big endian OSes results in nothing but static. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
* avisynth: populate field orderemcodem2021-03-11
| | | | | | Fixes Trac ticket #8757 Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
* avisynth: more intelligent RGB flippingStephen Hutchinson2021-03-11
| | | | | | | | avs_is_color_space provides a generic way of checking whether the video is RGB, and has been available through AVSC_API since 2.6. This means that GetProcAddress doesn't have to run on every frame. Signed-off-by: Stephen Hutchinson <qyot27@gmail.com>
* avformat/avisynth: fix deprecation warningStephen Hutchinson2020-04-05
|
* avformat/avisynth: switch to AviSynth+ on LinuxStephen Hutchinson2020-04-05
| | | | | | | | | | AviSynth+ now supports non-Windows OSes, making AvxSynth obsolete. Since we no longer support AviSynth 2.5 (which is essentially what AvxSynth is), remove AvxSynth support and replace it with AviSynth+. As a result, the USING_AVISYNTH defines can be switched back to generic _WIN32.
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-12
| | | | | | | | | | It is not uncommon to find code where the caller thinks to know better what the return value should be than the callee. E.g. something like "if (av_new_packet(pkt, size) < 0) return AVERROR(ENOMEM);". This commit changes several instances of this to instead forward the actual error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avisynth: adapt 239d02eff3ffe9f7d40caa21dde50fb4a0e94c24 to dlsymStephen Hutchinson2019-05-04
| | | | | | | | This commit was merged in a couple years ago as a no-op because we had already switched from GetProcAddress to dlsym some time before that. However, not applying the actual cast causes warnings about FARPROC and when attempting to build FFmpeg in MSVC with AviSynth-GCC 32-bit compatibility, those FARPROC warnings turn into FARPROC errors.
* libavformat/avisynth: enable additional pix_fmtsStephen Hutchinson2019-05-04
| | | | | | | These pix_fmts have been added to FFmpeg in the 31 months since commit 92916e8542e425ca20daddb490261a5818643206 added support for the larger number of pix_fmts that AviSynth+ can use. They were present in AviSynth+ even then, just not in libavutil.
* lavc, lavf: move avformat static mutex from avcodec to avformatwm42017-12-26
| | | | | | | | It's completely absurd that libavcodec would care about libavformat locking, but it was there because the lock manager was in libavcodec. This is more stright forward. Changes ABI, but we don't require ABI compatibility currently.
* Merge commit '3cc3463f306f425f76bd962755df1132eeac6dfa'Clément Bœsch2017-04-01
|\ | | | | | | | | | | | | | | | | | | | | | | * commit '3cc3463f306f425f76bd962755df1132eeac6dfa': avisynth: Support pix_fmts added to AviSynth+ This commit is mostly a noop, see 92916e8542e425ca20daddb490261a5818643206. Cosmetics and a small fix are merged. Merged-by: Clément Bœsch <u@pkh.me>
| * avisynth: Support pix_fmts added to AviSynth+Stephen Hutchinson2016-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of new pix_fmts* have been added to AviSynth+: 16-bit packed RGB and RGBA 10-, 12-, 14, and 16-bit YUV 4:2:0, 4:2:2, and 4:4:4 8-, 10-, 12-, 14-, and 16-bit Planar RGB 8-, 10-, 12-, 14-, and 16-bit Planar YUVA and Planar RGBA 10-, 12-, 14-, and 16-bit GRAY variants 32-bit floating point Planar YUV(A), Planar RGB(A), and GRAY *some of which are not currently available pix_fmts here and were not added to the demuxer due to this Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * avisynth: Simplify the pix_fmt check for the newer AviSynth APIStephen Hutchinson2016-11-17
| | | | | | | | | | | | | | The values don't need to be hardcoded since the correct values are returned by avs_bits_per_pixel. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * avisynth: Fix setting stream timebaseMarton Balint2016-11-17
| | | | | | | | | | | | | | | | | | Stream timebase should be set using avpriv_set_pts_info, otherwise avctx->pkt_timebase is not correct, leading to A/V desync. Signed-off-by: Marton Balint <cus@passwd.hu> Reviewed-by: Stephen Hutchinson <qyot27@gmail.com> Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '800d91d348c89fc8ca3fbec7696ab1ec8787acc6'James Almer2017-03-31
|\| | | | | | | | | | | | | * commit '800d91d348c89fc8ca3fbec7696ab1ec8787acc6': Drop pointless void* casts Merged-by: James Almer <jamrial@gmail.com>
| * Drop pointless void* castsDiego Biurrun2016-11-13
| |
* | avformat/avisynth.c: Use new safe dlopen code.Matt Oliver2016-11-05
| | | | | | | | Signed-off-by: Matt Oliver <protogonoi@gmail.com>
* | avisynth: fix Planar RGB outputStephen Hutchinson2016-10-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avisynth: support pix_fmts added to AviSynth+Stephen Hutchinson2016-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of new pix_fmts have been added to AviSynth+: 16-bit packed RGB and RGBA 10-, 12-, 14, and 16-bit YUV 4:2:0, 4:2:2, and 4:4:4 8-, 10-, 12-, 14-, and 16-bit Planar RGB 8-, 10-, 12-, 14-, and 16-bit Planar YUVA and Planar RGBA* 10-, 12-, 14-, and 16-bit GRAY variants* 32-bit floating point Planar YUV(A), Planar RGB(A), and GRAY* *some of which are not currently available pix_fmts here and were not added to the demuxer due to this Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avisynth: simplify the pix_fmt check for the newer AviSynth APIStephen Hutchinson2016-08-11
| | | | | | | | | | | | | | The values don't need to be hardcoded since the correct values are returned by avs_bits_per_pixel. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* | avisynth: fix setting stream timebaseMarton Balint2015-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | Stream timebase should be set using avpriv_set_pts_info, otherwise avctx->pkt_timebase is not correct. This should fix ticket #4766. Patch is only compile tested. Signed-off-by: Marton Balint <cus@passwd.hu> Reviewed-by: Stephen Hutchinson <qyot27@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '247aa7af7d8197247c181e3fbfe8d93d75e41b29'Michael Niedermayer2015-04-17
|\| | | | | | | | | | | | | | | | | | | * commit '247aa7af7d8197247c181e3fbfe8d93d75e41b29': avisynth: Simplify shared library name construction Conflicts: libavformat/avisynth.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avisynth: Simplify shared library name constructionDiego Biurrun2015-04-15
| |
| * avisynth: Bump minimum required version to interface version 6Stephen Hutchinson2015-04-14
| | | | | | | | | | | | | | The AVSC_API changes in the new headers mean that the 2.6 alphas are just as incompatible as 2.5 is. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * avisynth: Fix detection of AviSynth 2.5Stephen Hutchinson2015-04-14
| | | | | | | | | | | | | | | | | | In order to safely exit when the user tries to use AviSynth 2.5, the continue_on_fail value for 2.6's functions need to be set to 1. Otherwise, the library loader fails before the 'upgrade to 2.6' log message appears. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * avisynth: update documentation about the avisynth_c.h headerStephen Hutchinson2015-03-24
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avisynth: Bump minimum required version to interface version 6Stephen Hutchinson2015-04-02
| | | | | | | | | | | | | | The AVSC_API changes in the new headers mean that the 2.6 alphas are just as incompatible as 2.5 is. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avisynth: Fix detection of AviSynth 2.5Stephen Hutchinson2015-04-02
| | | | | | | | | | | | | | | | | | In order to safely exit when the user tries to use AviSynth 2.5, the continue_on_fail value for 2.6's functions need to be set to 1. Otherwise, the library loader fails before the 'upgrade to 2.6' log message appears. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avisynth: drop support of AviSynth 2.5Stephen Hutchinson2015-03-25
| | | | | | | | | | | | | | If the user attempts to use AviSynth 2.5, an error message will now tell them they need to upgrade. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a8c99205ca8703bd849efae13fcf844315c7147d'Michael Niedermayer2015-03-24
|\| | | | | | | | | | | | | * commit 'a8c99205ca8703bd849efae13fcf844315c7147d': avisynth: Fix compilation against current 2.6 header(s). Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avisynth: Fix compilation against current 2.6 header(s).Stephen Hutchinson2015-03-24
| | | | | | | | | | | | | | | | | | AviSynth 2.6 (and by extension, AviSynth+) moves these functions into AVSC_API. This requires both adjusting their normal use, and for AvxSynth, adjusting the position/use of the USING_AVISYNTH ifdefs. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit 'f2ad1495f23376ce61542967f4fc14205f284d40'Michael Niedermayer2015-01-03
|\| | | | | | | | | | | | | * commit 'f2ad1495f23376ce61542967f4fc14205f284d40': avisynth: Use RTLD_LOCAL instead of RTLD_GLOBAL Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avisynth: Use RTLD_LOCAL instead of RTLD_GLOBALMartin Storsjö2015-01-03
| | | | | | | | | | | | | | There shouldn't be any need to add the loaded libraries to the global symbol namespace. Signed-off-by: Martin Storsjö <martin@martin.st>
| * avisynth: set duration of audio streamsHendrik Leppkes2014-05-16
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * avisynth: fix setting packet propertiesMichael Niedermayer2014-01-17
| | | | | | | | | | | | Reviewed-by: Stephen Hutchinson <qyot27@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avisynth: set duration of audio streamsHendrik Leppkes2014-05-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avisynth simplify packet allocationMichael Niedermayer2014-01-10
| | | | | | | | | | Reviewed-by: Stephen Hutchinson <qyot27@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avisynth: Use av_packet_from_data instead of av_new_packetStephen Hutchinson2014-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | If the audio changes from 9eac7c4 were merged as they were, this would cause scripts with both video+audio to fail with a lot of audio decoding errors (the video would be fine). Scripts with only one of either video or audio were unaffected. Additionally, the av_packet changes in general caused seeking to break. Using av_packet_from_data allows video+audio scripts to work as expected, without audio decoding errors. It also fixes seeking. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avisynth: More av_new_packet changesAnton Khirnov2014-01-08
| | | | | | | | | | | | | | | | | | | | These are the remaining av_packet-related bits from 9eac7c4 that didn't get merged at that time. Changes authored by Anton Khirnov <anton@khirnov.net>, split out from 9eac7c4 by Stephen Hutchinson <qyot27@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f0b234ab9e406efee85c17eb435db646092a943b'Michael Niedermayer2013-12-09
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'f0b234ab9e406efee85c17eb435db646092a943b': avformat: AviSynth demuxer rewrite Conflicts: configure libavformat/avisynth.c See: b9ad009475f3afb76bd2fbd92936dc4d4cd441ec (as well as later commits) Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: AviSynth demuxer rewrited s2013-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Directly loads AviSynth through LoadLibrary instead of relying on Video for Windows, and supports using AvxSynth (via dlopen) to open scripts on Linux and OS X. Error messages from AviSynth/AvxSynth are now reported through av_log and exit, rather than the traditional behavior of generating an error video that the user would need to watch to diagnose. The main rewrite was authored by d s <avxsynth.testing@gmail.com> from the AvxSynth team, with additional contributions by Oka Motofumi <chikuzen.mo@gmail.com> Stephen Hutchinson <qyot27@gmail.com> Diego Biurrun <diego@biurrun.de> Anton Khirnov <anton@khirnov.net> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * avisynth: K&R formatting cosmeticsDiego Biurrun2013-09-06
| |
* | avformat/avisynth: remove duplicate av_new_packet() callMichael Niedermayer2013-12-01
| | | | | | | | | | Found-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avisynth: make avs_library statically allocated.Anton Khirnov2013-12-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avisynth: Move to av_new_packet/av_free_packet.Stephen Hutchinson2013-12-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avisynth: re-add trailing \n.Clément Bœsch2013-10-29
| | | | | | | | | | | | Regression since ac9529ce. Spotted by Timothy Gu.