1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-13 08:00:49 +02:00
Commit Graph

5514 Commits

Author SHA1 Message Date
Jean Delvare
ec11cfdf75 avfilter/vf_delogo: Use AVPixFmtDescriptor.nb_components
Relying on AVPixFmtDescriptor.nb_components is cleaner and faster than
checking data and linesize for every possible plane.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-12 15:11:31 +01:00
Ganesh Ajjanagadde
93afb338a4 lavfi/formats: fix segfault when allocation fails
This is a somewhat subtle failure that can occur when the realloc_array
fails in FORMATS_REF.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-11 10:21:47 -05:00
Paul B Mahol
df2ce130a6 avfilter/af_aemphasis: more declarations above
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-11 00:13:45 +01:00
Ganesh Ajjanagadde
bd3409f52a lavfi/vf_alphamerge: fix unitialized pointers
Missed in commit 31f0d555e0.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-10 08:01:40 -05:00
Ganesh Ajjanagadde
08a96708a5 lavfi/vf_overlay: fix unitialized pointers
Missed in commit 301c2784b3.

Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-10 07:53:47 -05:00
Paul B Mahol
45938f0301 avfilter/x86/vf_maskedmerge: move %define out of .nextrow
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-10 09:52:04 +01:00
Ganesh Ajjanagadde
e5d771c84d avfilter/avf_showfreqs: avoid wasteful pow
pow is a ridiculous function for computing a simple Gaussian.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-09 20:07:49 -05:00
Ganesh Ajjanagadde
89bbf01978 lavfi/af_amix: fix memory leak
Recent commits 6aaac24d72 and
3835554bf8 made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1250334.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-09 07:58:19 -05:00
Ganesh Ajjanagadde
924fcac521 lavfi/af_channelmap: fix memory leak
Recent commits 6aaac24d72 and
3835554bf8 made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1338330.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-09 07:58:13 -05:00
Ganesh Ajjanagadde
31f0d555e0 lavfi/vf_alphamerge: fix memory leaks
Recent commits 6aaac24d72 and
3835554bf8 made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1338326, 1338329.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-09 07:58:03 -05:00
Ganesh Ajjanagadde
301c2784b3 lavfi/vf_overlay: fix memory leaks
Recent commits 6aaac24d72 and
3835554bf8 made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1338327.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-09 07:57:57 -05:00
Ganesh Ajjanagadde
00c3220149 lavfi/show_palette: fix memory leak
Recent commits 6aaac24d72 and
3835554bf8 made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails. Unfortunately, even leaving aside this subtle intermediate
failure aspect, commit 8087632027 was only
partially successful in addressing memleaks. Hopefully, this commit
fixes the issue completely.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1270818.

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-09 07:57:37 -05:00
Jean Delvare
e74f1a121e avfilter/vf_delogo: round to the closest value
When the interpolated value is divided by the sum of weights, no
rounding is done, which means the value is truncated. This results in
a slight bias towards dark green in the interpolated area. Rounding
properly removes the bias.

I measured this change to reduce the interpolation error by 1 to 2 %
on average on a number of sample input and logo area combinations.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-09 12:23:00 +01:00
Paul B Mahol
e6690ce02f avfilter/af_biquads: pass filter ctx to av_log calls
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-07 11:47:43 +01:00
Muhammad Faiz
54ed3ebbe4 avfilter/showcqt: BASEFREQ and ENDFREQ cast to double
fix default basefreq/endfreq comparison
on platform that does not do comparison
in double type

found on zeranoe 32-bit build, where
default freq range is detected as non-default

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-07 01:28:48 +01:00
Paul B Mahol
45b451c892 avfilter/af_alimiter: add 3 more options
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-06 19:10:39 +01:00
Paul B Mahol
3e1724baf8 avfilter/af_stereotools: fix logic fail
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-06 10:09:09 +01:00
Paul B Mahol
a525b844d9 avfilter/af_stereotools: check s->length size
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-05 16:15:32 +01:00
Clément Bœsch
3f46e7bad5 avfilter/codecview: reindent after previous commit 2015-12-05 12:25:14 +01:00
Clément Bœsch
560d1e7b49 avfilter/codecview: add QP support 2015-12-05 12:24:15 +01:00
Paul B Mahol
5d2cc00dd0 avfilter: add audio emphasis filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-04 17:52:57 +01:00
Clément Bœsch
0e62b5d1ef avfilter: use AV_OPT_TYPE_BOOL in a bunch of places 2015-12-04 15:37:06 +01:00
Paul B Mahol
fff7f2df31 avfilter/af_agate: change default for detection to rms
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:52 +01:00
Paul B Mahol
4a43e559e1 avfilter/af_sidechaincompress: kill init function
Should make addition of process_command easier.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:52 +01:00
Paul B Mahol
1b22bdf4e3 avfilter/af_agate: compile agate only when requested.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:52 +01:00
Paul B Mahol
6907046130 avfilter/af_agate: add level_sc option for sidechaingate filter
Also correct usage of input gain for both filters.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:52 +01:00
Paul B Mahol
bd5afecdcb avfilter: add sidechaingate filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:51 +01:00
Paul B Mahol
acc2347cf4 avfilter/af_agate: prepare for adding sidechain version
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:51 +01:00
Ganesh Ajjanagadde
d64b6c3819 avfilter/af_flanger: use rint instead of floor hack
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Ganesh Ajjanagadde
c6bea81acf avfilter/vf_perspective: use lrint instead of floor hack
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Ganesh Ajjanagadde
fa5d299496 avfilter/vsrc_mptestsrc: use lrint instead of floor hack
lrint is faster, and is more consistent across the codebase.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Paul B Mahol
b2517b02d9 avfilter/af_compand: do not clip; allow >0dB curve points
Do not clip output samples, so that clipping can be handled by other filters.
Alow setting curve points above 0dB. This is useful when operating with floats.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-02 23:41:26 +01:00
Paul B Mahol
6670527d33 avfilter/af_stereotools: remove floor usage
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-02 12:09:06 +01:00
Paul B Mahol
c4f7b8f0db avfilter: add audio pulsator filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-02 12:09:06 +01:00
Ganesh Ajjanagadde
8c24380537 avfilter/af_volumedetect: use log10 instead of hardcoded constant
This is likely more precise and conveys the intent better.

Reviewed-by: Mark Harris <mark.hsj@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-01 19:31:58 -05:00
Michael Niedermayer
736e2e2c30 avfilter/vf_shuffleframes: Assert that the case of an uninitialized ret does not occur
Fixes CID1258479

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-01 22:00:25 +01:00
Paul B Mahol
cde75e3150 avfilter/vf_histogram: remove deprecated stuff
Remove all modes except levels mode.
Users should already switch to other filters with
extended funcionality: vectorscope and waveform.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-01 21:55:13 +01:00
Ganesh Ajjanagadde
5a41a5a4f5 avfilter/af_compand: use hypot()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-30 18:29:29 -05:00
Paul B Mahol
6b978dadc6 avfilter/af_sidechaincompress: do not require writable input frames for acompressor filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-30 12:25:32 +01:00
Paul B Mahol
376a3bdb7b avfilter/af_sidechaincompress: add level_in and level_sc options
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-30 12:16:57 +01:00
Paul B Mahol
337b6d3b36 avfilter/af_sidechaincompress: fix output gain for rms(default) detection
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-29 19:17:05 +01:00
Michael Niedermayer
98626a1a4c avfilter/avf_showvolume: Fix "warning: comparison of unsigned expression < 0 is always false"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-29 15:47:42 +01:00
Paul B Mahol
7a9b4427b5 avfilter/avf_showvolume: fix several issues
Fix color fading: previously color could fade to red when
volume level for red color was actually never reached.
Display volume value on right side.
Use red color only if clipping is needed.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-29 13:02:40 +01:00
Paul B Mahol
1685a781cd avfilter: add audio compressor filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-28 17:56:40 +01:00
Paul B Mahol
3f895dcb0d avfilter: add compensation delay line filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-28 17:56:40 +01:00
Ganesh Ajjanagadde
74b79dcf51 avfilter/vsrc_mptestsrc: use hypot()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-26 09:20:46 -05:00
Ganesh Ajjanagadde
352bd18dff avfilter/af_dynaudnorm: remove wasteful pow
This removes wasteful pow(x, 2.0) that although not terribly important
for speed, is still useless.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-26 09:20:46 -05:00
Ganesh Ajjanagadde
9ee1feaa7c avfilter/af_afade: improve accuracy and speed of gain computation
Gain computation for various curves was being done in a needlessly
inaccurate fashion. Of course these are all subjective curves, but when
a curve is advertised to the user, it should be matched as closely as
possible within the limitations of libm. In particular, the constants
kept here were pretty inaccurate for double precision.

Speed improvements are mainly due to the avoidance of pow, the most
notorious of the libm functions in terms of performance. To be fair, it
is the GNU libm that is among the worst, but it is not really GNU libm's fault
since others simply yield a higher error as measured in ULP.

"Magic" constants are also accordingly documented, since they take at
least a minute of thought for a casual reader.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-26 09:20:46 -05:00
Paul B Mahol
a330430238 avfilter/vf_stack: make it possible to stop with shortest stream
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-26 10:02:00 +01:00
Paul B Mahol
56ff563f3b avfilter: add '.' at and of long filter description where it is missing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-25 22:22:17 +01:00