aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio/filter
Commit message (Collapse)AuthorAge
* Remove some mp_msg calls with no trailing \nGravatar wm42014-07-13
| | | | | | | The final goal is all mp_msg calls produce complete lines. We want this because otherwise, race conditions could corrupt the terminal output, and it's inconvenient for the client API too. This commit works towards this goal. There's still code that has this not fixed yet, though.
* af_volume: fix calculations including replay-gainGravatar Mohammad Alsaleh2014-06-28
| | | | | | | | | | | | | rgain is not an additive value. It's a multiplier/gain. Previous behaviour produced negative level values in some cases (when rgain < 1.0) which caused volume to be louder when its value was lowered. CC: @mpv-player/stable Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com> Signed-off-by: wm4 <wm4@nowhere>
* Add more constGravatar wm42014-06-11
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* af_lavcac3enc: detach on any passthrough format, not just ac3Gravatar wm42014-04-16
|
* Kill all tabsGravatar wm42014-04-13
| | | | | | | | | | | I hate tabs. This replaces all tabs in all source files with spaces. The only exception is old-makefile. The replacement was made by running the GNU coreutils "expand" command on every file. Since the replacement was automatic, it's possible that some formatting was destroyed (but perhaps only if it was assuming that the end of a tab does not correspond to aligning the end to multiples of 8 spaces).
* af_volume: fix clang -Wsometimes-uninitializedGravatar Kevin Mitchell2014-04-13
|
* af_lavfi: fix graph parse deprecation warningGravatar Kevin Mitchell2014-04-13
|
* demux: move metadata-based replaygain decoding out of af_volumeGravatar Alessandro Ghedini2014-04-04
|
* af_volume: use replaygain side dataGravatar Alessandro Ghedini2014-04-04
|
* af: add replaygain_data field to af_stream and af_instanceGravatar Alessandro Ghedini2014-04-04
| | | | Closes #664
* af_volume: fix replaygainGravatar wm42014-03-27
| | | | | | | | This was accidentally broken in commit b72ba3f7. I somehow made the wild assumption that replaygain adjusted the volume relative to 0% instead of 100%. The detach suboption was similarly broken.
* af_lavcac3enc: use new AVFrame APIGravatar wm42014-03-16
|
* build: simplify libavfilter configure checksGravatar wm42014-03-16
| | | | | This is all not needed anymore. In particular, remove all configure switches except --enable-libavfilter.
* Remove some more unneeded version checksGravatar wm42014-03-16
| | | | | All of these check against things that happened before the latest supported FFmpeg/Libav release.
* af_lavrresample: remove avresample_set_channel_mapping() fallbacksGravatar wm42014-03-16
| | | | | | | This function is now always available. Also remove includes of reorder_ch.h from some AOs (these are just old relicts).
* af_volume: don't print missing replaygain tags as errorGravatar wm42014-03-14
| | | | There's no reason to. Audio files often lack them.
* af_volume: add detach optionGravatar wm42014-03-14
| | | | | | Maybe this should be default. On the other hand, this filter does something even if the volume is neutral: it clips samples against the allowed range, should the decoder or a previous filter output garbage.
* af_volume: separate softvol volume control from replaygain levelGravatar wm42014-03-14
| | | | | | | | | Currently, both replaygain adjustment and user volume control (if softvol is enabled) share the same variable. Sharing the variable would cause especially if --volume is used; then the replaygain volume would always be overwritten. Now both gain values are simple added right before doing filtering.
* af_volume: remove double-negated suboptionGravatar wm42014-03-14
| | | | | You had to use "no-replaygain-noclip" to set this option. Rename it, so that only one negation is needed.
* af_volume: add support for replaygain pre-amp and clipping preventionGravatar Alessandro Ghedini2014-03-13
|
* af_volume: add replaygain supportGravatar Alessandro Ghedini2014-03-13
| | | | | | | | | This adds the options replaygain-track and replaygain-album. If either is set, the replaygain track or album gain will be automatically read from the track metadata and the volume adjusted accordingly. This only supports reading REPLAYGAIN_(TRACK|ALBUM)_GAIN tags. Other formats like LAME's info header would probably require support from libav.
* af: add metadata field to af_stream and af_instanceGravatar Alessandro Ghedini2014-03-13
| | | | | | This allows to propagate metadata information to audio filters. Closes #632
* af_lavfi: beat it into working with LibavGravatar wm42014-03-13
| | | | | | | | | | | | | | | | | | | The main incompatibility was that Libav didn't have av_opt_set_int_list. But since that function is excessively ugly and idiotic (look how it handles types), I'm not missing it much. Use an aformat filter instead to handle the functionality that was indirectly provided by it. This is similar to how vf_lavfi works. The other incompatibility was channel handling. Libav consistently uses channel layouts only, why ffmpeg still requires messing with channel counts to some degree. Get rid of most channel count uses (and hope channel layouts are "exact" enough). Only in one case FFmpeg fails with a runtime check if we feed it AVFrames with channel count unset. Another issue were AVFrame accessor functions. FFmpeg introduced these for ABI compatibility with Libav. I refuse to use them, and it's not my problem if FFmpeg doesn't manage to provide a stable ABI for fields provided both by FFmpeg and Libav.
* audio/filter: remove redundant log message prefixesGravatar wm42014-01-24
| | | | | These are now appended automatically, so you'd get them twice before this commit.
* audio: fix balance controlGravatar wm42014-01-23
| | | | | | | | Balance controls as used by mixer.c was broken, because af_pan.c stopped accepting its arguments. We have to allow 0 channels explicitly. Also, fix null pointer access if the matrix parameter is not used. Regression from commit 82983970.
* af: fixed out-of-bounds accesses caused by NUM_FMT and co.Gravatar 11rcombs2014-01-19
| | | | | | | | | Signed-off-by: wm4 <wm4@nowhere> This merges pull request #496. The problem was that at least the initialization of the distance[] array accessed af_fmtstr_table[] entries that were out of bounds. Small cosmetic changes applied to the original pull request.
* af_export: require filename argumentGravatar wm42013-12-21
| | | | | | Since mp_find_user_config_file() is going to get a context argument, which would be annoying to do in the audio chain (actually I'm just lazy).
* m_option, m_config: mp_msg conversionsGravatar wm42013-12-21
| | | | | | | | Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
* audio/fmt-conversion.c: remove unknown audio format messagesGravatar wm42013-12-21
| | | | Same deal as with video/fmt-conversion.c.
* audio: mp_msg conversionsGravatar wm42013-12-21
|
* Reduce recursive config.h inclusions in headersGravatar wm42013-12-18
| | | | | | In my opinion, config.h inclusions should be kept to a minimum. MPlayer code really liked including config.h everywhere, though, even in often used header files. Try to reduce this.
* Remove the _ macroGravatar wm42013-12-18
| | | | | This was a gettext-style macro to mark strings that should be translated.
* Split mpvcore/ into common/, misc/, bstr/Gravatar wm42013-12-17
|
* Move options/config related files from mpvcore/ to options/Gravatar wm42013-12-17
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgGravatar wm42013-12-16
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* audio: flush remaining data from the filter chain on EOFGravatar wm42013-12-05
| | | | | | | | | | | | | | | | | This can be reproduced with: mpv short.wav -af 'lavfi="aecho=0.8:0.9:5000|6800:0.3|0.25"' An audio file that is just 1-2 seconds long should play for 8-9 seconds, which audible echo towards the end. The code assumes that when playing with AF_FILTER_FLAG_EOF, the filter will either produce output, or has all remaining data flushed. I'm not really sure whether this really works if there are multiple filters with EOF handling in the chain. To handle it correctly, af_lavfi should retry filtering if 1. EOF flag is set, 2. there were input samples, and 3. no output samples were produced. But currently it seems to work well enough anyway.
* audio/filter: change filter callback signatureGravatar wm42013-12-05
| | | | | | | | | The new signature is actually closer to how it actually works, and someone who is not familiar to the API and how it works might make fewer fatal mistakes with the new signature than the old one. Pretty weird. Do this to sneak in a flags parameter, which will later be used to flush remaining data of at least vf_lavfi.
* af: remove af->setup fieldGravatar wm42013-12-04
| | | | Used to be used by filters that didn't use the option parser.
* af: remove legacy option parsing hacksGravatar wm42013-12-04
|
* af_pan: change options, use option parserGravatar wm42013-12-04
| | | | Similar to af_channels etc...
* af_ladspa: change options, use option parserGravatar wm42013-12-04
|
* af_delay: change option parsing, fix bugs, use option parserGravatar wm42013-12-04
| | | | Similar situation to af_channels.
* af_channels: use "unknown" channel layoutsGravatar wm42013-12-04
| | | | | | | | | This will make af_channels output a channel layout that is compatible with any destination layout. Not sure if that's a good idea though, since the way the AO choses a layout is perhaps less predictable. On the other hand, using the old MPlayer standard layouts doesn't make much sense either. We'll see whether this improves or breaks someone's use case.
* af_channels: change options, fix bugs, use option parserGravatar wm42013-12-04
| | | | | | | Apparently this stopped working after some planar changes (broken format negotiation). Radically change option parsing in an incompatible way. Suggest alternatives to this filter, since it barely has any importance anymore.
* af_sweep: use option parserGravatar wm42013-12-04
|
* af_surround: use option parserGravatar wm42013-12-04
|
* af_sub: use option parserGravatar wm42013-12-04
|
* af_sinesuppress: use option parserGravatar wm42013-12-04
|
* af_hrtf: use option parserGravatar wm42013-12-04
|
* af_extrastereo: use option parserGravatar wm42013-12-04
|