summaryrefslogtreecommitdiffstats
path: root/libaf/af_scaletempo.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-581/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* audio: untypedef af_instanceStefano Pigozzi2012-11-021-5/+5
|
* audio: untypedef af_infoStefano Pigozzi2012-11-021-1/+1
|
* audio: untypedef af_data and rename it to mp_audioStefano Pigozzi2012-11-021-6/+6
| | | | this is to have something specular to mp_image
* af_scaletempo: reset latency info when reconfiguringUoti Urpala2012-10-281-0/+3
| | | | | | | | af_scaletempo kept outdated values in the af->delay field after reconfiguration until some audio was fed through the filter. This could affect audio sync code after a playback speed change. Additionally, in the special case speed=1 the code did not set the af->mul field at all. Initialize both fields after reconfiguration.
* af_scaletempo: fix crash on channel reconfigurationwm42012-08-261-0/+6
| | | | | | | | | | | | | | | | | | This crash happened when audio channels were reconfigured from 6 channels to 2, and playback speed was set to 2. The crash is caused by passing a negative size to memcpy. It appears reinitialization doesn't clear the buffer. As the result, the buffer can be larger as the maximum buffer size, i.e. the invariant bytes_queued <= bytes_queue is violated. Fix this by resetting the buffer length on reconfiguring (set the bytes_queued vairable to 0). Also reset some other state for clarity and robustness, although these changes aren't strictly needed for avoiding the actual crash. This may also get rid of some noise played right after reinitialization, as the re-used buffer was in the wrong audio format.
* Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* translations: tweak cases that relied on concatenating adjacent stringsUoti Urpala2010-03-071-15/+17
| | | | | | | | Tweak some code parts that used to rely on string literals from translation macros being concatenated with other adjacent string literals. Break up the resulting string into independently translated parts, so that the existing translations for those parts can still be used.
* af_scaletempo: Fix delay value after changing scale to 1Uoti Urpala2009-11-221-0/+1
| | | | | | | | | | The scaletempo filter has a special-case check to return the samples unchanged if the current scaling factor is 1. In this case code setting af->delay wasn't run. If the scale had had a different value and then been changed to 1 as a result of a playback speed change then the delay field could have a nonzero value left, resulting in A/V sync errors. Fix by setting the delay field to 0 in the scale == 1 special case code.
* Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-5/+5
| | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-10/+10
| | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* Remove af_msg special-casing API in libaf.bircoph2009-03-281-14/+14
| | | | | | | Replace it by standard mp_msg message system. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29088 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use standard license headers with standard formatting.diego2008-05-141-15/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26772 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l, bzero is deprecated, use memset insteadreimar2007-11-301-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25216 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add padding and unroll loop 4x for at least another 10% speedupreimar2007-11-181-4/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25104 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change to a 64 bit accumulation variable instead of shifting.reimar2007-11-181-5/+5
| | | | | | | | Changing the way the loop is done is necessary to reduce register pressure. About 20% speedup even on 32 bit x86. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25103 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l, *ppc++ was supposed to be replaced by ppc[i] in r25100, but that is ↵reimar2007-11-181-2/+0
| | | | | | | | | | not any faster. Just removing the += s->samples_overlap - s->num_channels; still provides a ca. 20% speedup on x86 (AThlon X2 64) with gcc 3.4 (compiler stupidity?) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25102 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use "long" instead of "int" for innermost loop variable.reimar2007-11-181-1/+2
| | | | | | | About 12% faster on x86_64 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25101 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rearrange scaletempo inner loop.reimar2007-11-181-2/+5
| | | | | | | Speedup on x86 with gcc 3.4 36%, on x86_64 with gcc 4.1 5% git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25100 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l, someone mixed up && and ||, so if allocation of only one buffers failedreimar2007-11-181-1/+1
| | | | | | | that would not be detected. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25098 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid some casts by changing int8_t* to void* in af_scaletemporeimar2007-11-181-25/+27
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25097 b3059339-0415-0410-9bf9-f77b7e298cf2
* A/V sync: take audio filter buffers into accountuau2007-11-011-0/+5
| | | | | | | | | | | | | | | | | | Substract the delay caused by filter buffering when calculating currently playing audio position. This matters for af_scaletempo which buffers significant and varying amounts of data. For other current filters the effect is normally insignificant. Instead of the old time-based filter delay field (which was ignored) this version stores the per-filter delay in units of bytes input read without corresponding output. This allows the current scaletempo behavior where other filters before and after it can see the same nominal samplerate even though the real duration of the data varies; in this case the other filters can not know the delay they're causing in terms of real time. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24928 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_scaletempo: code cleanupuau2007-11-011-10/+17
| | | | | | | | | Make internal functions static and remove leading '_' from some function names. Cast pointers to compatible 8-bit pointer types instead of ints when calculating their difference. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24927 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_scaletempo: Fix crash in option parsinguau2007-11-011-1/+1
| | | | | | | | | | The value of the "speed" suboption was not initialized before calling subopt_parse(). If the command line had suboptions but "speed" was not one of them then the code accessed an uninitialized pointer and possibly crashed. Fixed by initializing the option value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24926 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_scaletempo: Fix audio copy positionuau2007-11-011-2/+2
| | | | | | | | | Because of a missing *num_channels factor the filter copied audio from an incorrect position. This mixed up the channel order and hurt audio quality even if the channels had identical content. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24925 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add audio filter scaletempouau2007-11-011-0/+547
Patch by Robert Juliano, juliano.1 osu edu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24924 b3059339-0415-0410-9bf9-f77b7e298cf2