summaryrefslogtreecommitdiff
path: root/libavfilter
Commit message (Collapse)AuthorAge
* avfilter/af_dynaudnorm: improve pre-filling codeLoRd_MuldeR2016-08-02
| | | | | | | | In order to avoid possible clipping at the very beginning. Especially apparent when "alternative" boundary mode is used. Adopted from original commit by committer.
* af_hdcd: Warn if there is any resampling or format conversion in the link chainBurt P2016-08-01
| | | | | | | | | HDCD is only encoded in s16@44100Hz. Scan the chain of AVFilterLinks for any resampling or format conversion/truncation that might cause problems for the filter and issue warnings. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: Process stereo channels together, fix #5727Burt P2016-08-01
| | | | | | | | | | | | | | | Issue #5727: gain adjustment should only be applied if matching gain value from a valid packet in both channels. The existing functions process each channel separately, so it was not possible. * New versions of hdcd_process(), hdcd_scan(), hdcd_integrate() named hdcd_*_stereo() that process both channels together. * target_gain applied will be the last matching target_gain. * The old single channel functions remain as an option. They can be used by: -af hdcd=process_stereo=0. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: Move code detect/check into own functionBurt P2016-08-01
| | | | | Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: add force_pe filter optionBurt P2016-08-01
| | | | | | | | | Used to attempt replication of some results from http://www.audiomisc.co.uk/HFN/HDCD/Examined.html May not be generally useful, defaults to off. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: Improve error detection loggingBurt P2016-08-01
| | | | | | | | | * Moves the filter context member out of state and into HDCDContext * More useful information when an error is detected * Gives a location near where the error was detected Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: give cdt expired counter a value for never setBurt P2016-07-31
| | | | | | | | The counter is now -1 if the code detect timer was never set, and 0 if it was set but never expired. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: fix a minor cosmetic annoyanceBurt P2016-07-31
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_stereowiden: fix read/write past the end of bufferAlexey Tourbin2016-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stereowiden filter uses a buffer, s->buffer[], and a pointer within the buffer, s->write, to implement inter-channel delays. The loop which applies the delayed samples turns out to be faulty. 109 for (n = 0; n < in->nb_samples; n++, src += 2, dst += 2) { 110 const float left = src[0], right = src[1]; 111 float *read = s->write + 2; 112 113 if (read > s->buffer + s->length) 114 read = s->buffer; 115 116 dst[0] = drymix * left - crossfeed * right - feedback * read[1]; 117 dst[1] = drymix * right - crossfeed * left - feedback * read[0]; 118 119 s->write[0] = left; 120 s->write[1] = right; 121 122 if (s->write == s->buffer + s->length) 123 s->write = s->buffer; 124 else 125 s->write += 2; 126 } For one, the buffer gets written past its end in lines 119-120, before the bound check is done in lines 122-123. This can be easily confirmed by valgrind. ==3544== Invalid read of size 4 ==3544== at 0x593B41: filter_frame (af_stereowiden.c:116) ==3544== Address 0xb1b03c4 is 4 bytes after a block of size 7,680 alloc'd ==3544== ==3544== Invalid read of size 4 ==3544== at 0x593B66: filter_frame (af_stereowiden.c:117) ==3544== Address 0xb1b03c0 is 0 bytes after a block of size 7,680 alloc'd ==3544== ==3544== Invalid write of size 4 ==3544== at 0x593B79: filter_frame (af_stereowiden.c:119) ==3544== Address 0xb1b03c0 is 0 bytes after a block of size 7,680 alloc'd ==3544== ==3544== Invalid write of size 4 ==3544== at 0x593B7D: filter_frame (af_stereowiden.c:120) ==3544== Address 0xb1b03c4 is 4 bytes after a block of size 7,680 alloc'd Also, using two separate pointers, s->write and read = s->write + 2, does not seem to be well thought out. To apply the delay of s->buffer[], it is enough to read the delayed samples at the current position within the buffer, and then to store new samples at the same current position. Thus the application of delayed samples can probably be best described with a single pointer s->cur. I also introduce a minor change to ensure that the size of s->buffer[] is always a multiple of 2. Since the delay parameter is a float, it is otherwise possible to trick the code into allocating off-by-one buffer.
* avfilter: Add new format for PSNR stats logLucas Cooper2016-07-29
| | | | | | | | | | | | Add an AVOption stats_version with a new header for V2 stats, which specifies the stats log version and lists the fields that will be present in the log (to ease parsing). The primary motivation is to facilitate the addition of optional fields to the log without breaking backwards compatibility, while making the logs easier to parse. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/f_drawgraph: add another slide modePaul B Mahol2016-07-28
|
* lavfi/hdcd: fix styleClément Bœsch2016-07-28
|
* lavfi/hdcd: mark pe_str as static and constClément Bœsch2016-07-28
|
* af_hdcd: Report PE as being intermittent or permanentBurt P2016-07-28
| | | | | | | | The Peak Extend feature could be enabled permanently or only when needed. This is now reported. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: Add counter for cdt expirationsBurt P2016-07-27
| | | | | | | | Adds a counter for when the "code detect timer" expired without finding a valid packet. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: more comments in state structBurt P2016-07-27
| | | | | | | Add some comments describing the fields in hdcd_state_t. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: Improve HDCD detectionBurt P2016-07-27
| | | | | | | | HDCD is now only considered detected if a valid packet is active in both channels simultaneously. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/curves: fix meaningless const int returned valueClément Bœsch2016-07-26
| | | | Spotted-by: James Almer <jamrial@gmail.com>
* lavfi/selectivecolor: add 16-bit supportClément Bœsch2016-07-24
|
* lavfi/selectivecolor: fix picking black as neutral when alpha is presentClément Bœsch2016-07-24
|
* lavfi: bump minor after recent curves filter additionsClément Bœsch2016-07-24
|
* lavfi/curves: prefix init and uninit function namesClément Bœsch2016-07-24
|
* lavfi/curves: pass log ctx as void* instead of AVFilterContext*Clément Bœsch2016-07-24
|
* lavfi/curves: reindent after previous commitClément Bœsch2016-07-24
|
* lavfi/curves: add 16-bit supportClément Bœsch2016-07-24
|
* lavfi/curves: move alloc and init of LUTs inside config_input()Clément Bœsch2016-07-24
| | | | | This is needed in order to have different sizes of LUTs according to the input.
* lavfi/curves: dynamically allocate LUTsClément Bœsch2016-07-24
| | | | This simplifies following commits.
* lavfi/curves: add various const where it makes senseClément Bœsch2016-07-24
|
* lavfi/curves: remove pointless logging since the addition of plot optionClément Bœsch2016-07-24
|
* lavfi/curves: add plot optionClément Bœsch2016-07-24
|
* lavfi/curves: do not automatically insert points at x=0 and x=1Clément Bœsch2016-07-24
| | | | | | | | There is actually a need for the origin and end point not to be defined. We can not automatically insert them with the y value of the first and last point as it will influence the curves in a wrong way. Fixes #5397
* avfilter/vf_psnr: Fix rounding error in average_maxMichael Niedermayer2016-07-21
| | | | | | | The intermediate was rounded to an integer Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: detect and report encoding errors and odditiesBurt P2016-07-14
| | | | | | | | Count and report when a code is signaled but fails to match a known pattern. For example try Līve - Secret Samadhi. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: only hdcd_update_info() when something changesBurt P2016-07-14
| | | | | | | | Only call hdcd_update_info() when the control code changes instead of every frame, so the counters are more meaningful. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: fewer false positives by ignoring code_counterC in HDCD detectionBurt P2016-07-14
| | | | | Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_uspp: Check for encoding failureMichael Niedermayer2016-07-13
| | | | | | Fixes CID1363015 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: don't log full HDCD stats if HDCD was not detectedBurt P2016-07-12
| | | | | Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: integrate() renamed hdcd_integrate() to be consistent with the ↵Burt P2016-07-12
| | | | | | | other function names Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Changed metadata print option to accept general urlsSami Hult2016-07-10
| | | | | | | | | | | | | | | | | | This is an - once again - updated patch, that uses avio_write instead of avio_puts to stream clean text output without null characters. Works now for me as intended. Changes metadata filter to accept general urls as file argument without breaking former behaviour. As a byproduct, it also allows for writing to file "-" if specified as "file:-". Example: ffmpeg -i test.wav -filter_complex "silencedetect=n=-40dB:d=0.1,ametadata=mode=print:file='pipe\:4'" -f null Signed-off-by: Sami Hult <sami.hult@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavfilter/af_hdcd.c: Collect HDCD stats and reportBurt P2016-07-06
| | | | | | | | | | | | | | | The new HDCD filter really does nothing to show that it is working or that HDCD control information was even detected in the stream. This patch collects information about the decode, like which features were used, and reports it to the user at the end. Also, * Fixes low-level gain adjustment * Updates the documentation Signed-off-by: Burt P <pburt0@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_rotate: add >8 bit depth supportPaul B Mahol2016-07-04
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi: Move new field to the end of AVFilterContextTimo Rothenpieler2016-06-29
| | | | This fixes an accidental ABI break introduced at 8688d3a.
* lavfi: Move new field to the end of AVFilterLinkTimo Rothenpieler2016-06-29
| | | | | | | | | | Even though this is not part of the public API, some external applications access fields after it, thus breaking after updating from ffmpeg 3.0 or earlier. Since it is not public, it can be freely moved to the end to avoid that problem in the future. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '535a742c2695a9e0c586b50d7fa76e318232ff24'Matthieu Bouron2016-06-27
|\ | | | | | | | | | | | | * commit '535a742c2695a9e0c586b50d7fa76e318232ff24': build: Change structure of the linker version script templates Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
| * build: Change structure of the linker version script templatesDiego Biurrun2016-05-29
| | | | | | | | | | | | Split version files into one line per symbol/directive to allow compatibility with the Solaris linker without preprocessing and eliminate $ from version file templates to simplify the postprocessing shell command.
* | asm: FF_-prefix internal macros used in inline assemblyMatthieu Bouron2016-06-27
| | | | | | | | See merge commit '39d6d3618d48625decaff7d9bdbb45b44ef2a805'.
* | Merge commit 'dc40a70c5755bccfb1a1349639943e1f408bea50'Hendrik Leppkes2016-06-26
|\| | | | | | | | | | | | | * commit 'dc40a70c5755bccfb1a1349639943e1f408bea50': Drop unnecessary libavutil/x86/asm.h #includes Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * Drop unnecessary libavutil/x86/asm.h #includesDiego Biurrun2016-05-28
| |
| * avfiltergraph: check the query_formats() return valueAnton Khirnov2016-05-23
| |
* | avfilter/vf_paletteuse: enable skip_initial_unpairedMichael Niedermayer2016-06-26
| | | | | | | | | | | | | | | | | | Fixes crash due to unprocessed input being passed through This fixes the last segfault caused by mixing 3.0 and 3.1 libs and applications Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>