Commit Graph

112 Commits

Author SHA1 Message Date
Rob Sykes
801b315729 swr: Add SOX resampler support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-11 22:04:00 +01:00
Rob Sykes
41049d07f2 swr: add a lowpass default so that each Resampler can have its own default.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-11 22:04:00 +01:00
Michael Niedermayer
ae5a55e77a swr: move flush into Resampler
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-11 22:04:00 +01:00
Michael Niedermayer
431dcc49d2 swr: make realloc_audio() available outside swresample.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-11 22:04:00 +01:00
Rob Sykes
5a5d70748c swr: Add API to make resample engine selectable.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-11 22:04:00 +01:00
Stefano Sabatini
8bee8f778a lswr/swresample: use AV_OPT_TYPE_SAMPLE_FMT for sample format options
Improve usability and robustness.
2012-12-03 13:49:56 +01:00
Clément Bœsch
c02ae48271 swr: set default channel count options to 0.
If not set, they will be defined using the channel layout setting, which
is much more convenient when using swr_alloc() instead of
swr_alloc_set_opts().
2012-11-19 18:49:14 +01:00
Paul B Mahol
1acd2f6ba7 Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.h
Also remove it in once case when it is not needed.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-13 13:21:21 +00:00
Stefano Sabatini
6450c05ba5 lswr/swresample: adopt globally consistent rules for options help message
The help text tells what the option does, not what the accepted parameter
is. Thus convert strings of the kind:

Bikeshed Color
to
set bikeshed color
2012-11-03 20:38:02 +01:00
Michael Niedermayer
97599f8c6d swr: make sure the last data element is NULL so we can use it to detect the number of channels
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-24 23:19:32 +02:00
Michael Niedermayer
31a797eb28 swr: add av_cold to init/free functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-09 02:26:20 +02:00
Michael Niedermayer
c5278cb84f Add Dolby/DPLII downmix support to libswresample
Based on code by John Stebbins <jstebbins.hb@gmail.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 00:41:49 +02:00
Michael Niedermayer
d46c1c72e4 Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'
* commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9':
  avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options_table.h
	libavcodec/snowenc.c
	libavcodec/tiffenc.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_join.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawtext.c
	libavformat/http.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/movenc.c
	libavformat/mpegenc.c
	libavformat/mpegtsenc.c
	libavformat/options_table.h
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:33:32 +02:00
Michael Niedermayer
99de3df3d3 Merge commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078'
* commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078':
  avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member

Conflicts:
	libavcodec/libvpxenc.c
	libavcodec/options_table.h
	libavfilter/vf_drawtext.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:09:09 +02:00
Michael Niedermayer
d5f65e9d40 Merge commit '124134e42455763b28cc346fed1d07017a76e84e'
* commit '124134e42455763b28cc346fed1d07017a76e84e':
  avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member

Conflicts:
	libavcodec/aacenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/options_table.h
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/vf_drawtext.c
	libavformat/movenc.c
	libavformat/options_table.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 13:58:11 +02:00
Michael Niedermayer
15a0fb58a3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  utvideodec: Fix single symbol mode decoding
  truespeech: drop useless casts
  libavcodec: drop bogus dependencies from mpc[78] and qdm2
  mpegaudio: move ff_mpa_enwindow to a separate file
  AVOptions: store defaults for INT64 options in int64 union member.

Conflicts:
	libavcodec/Makefile
	libavfilter/af_asyncts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-24 15:00:39 +02:00
Michael Niedermayer
b9df3f4f6c swr: fix 10l typo mixing in and out config.
Fixes ticket1458

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-01 21:18:03 +02:00
Justin Ruggles
7e15df7551 swr: resampling: add filter type and Kaiser window beta to AVOptions 2012-07-23 19:23:39 +02:00
Nicolas George
1d903a5ee4 lswr: channel_map requires input conversion.
channel_map is applied between in and postin.
Without this test, if the input format is an acceptable internal format,
the in->postin conversion is skipped. In the best case,
it ignores channel_map, in the worst case it causes an assert failure
if the number of channels is changed by the map.
2012-07-17 09:50:36 +02:00
Paul B Mahol
1842b27564 lavu: 256 color support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-07-07 01:41:55 +00:00
Paul B Mahol
10d2a4028c swresample: make .class_name more descriptive
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-06-22 14:01:15 +00:00
Michael Niedermayer
634d539c12 swresample.c: update copyleft year
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-12 16:11:17 +02:00
Michael Niedermayer
75d900d52e swr: zero buffers on allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 02:42:46 +02:00
Clément Bœsch
64df092b25 swr: fix a few typo. 2012-06-01 08:06:36 +02:00
Michael Niedermayer
16e25ef34b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: extend -r to work on any input stream.
  doc/avconv: expand documentation for the -s option.
  avconv: don't print filters inserted by avconv in stream mappings.
  avconv: merge configuration code for complex and simple filters
  avconv: split configuring input filters out of configure_complex_filter

Conflicts:
	configure
	doc/ffmpeg.texi
	ffmpeg.c
	tests/ref/fate/idroq-video-encode

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-30 04:38:32 +02:00
Michael Niedermayer
72261fa867 swr: fix swr_drop_output()
Fixes part of Ticket1341

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-26 02:33:38 +02:00
Michael Niedermayer
841c1be57e swr: check return value of swr_inject_silence/drop_output.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-22 20:37:12 +02:00
Michael Niedermayer
a645049bd8 swr: check count argument of realloc_audio()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-22 20:37:12 +02:00
Michael Niedermayer
d1384c00d4 swr: skip soft compensation when its disabled.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 22:42:32 +02:00
Michael Niedermayer
72a242c998 swr: add swr_next_pts()
parameter descriptions partly reuse text from af_asyncts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 19:23:37 +02:00
Michael Niedermayer
f88f705abc swr: add swr_drop_output()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 19:23:37 +02:00
Michael Niedermayer
7a59964ba9 swr: add swr_inject_silence()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 19:23:37 +02:00
Michael Niedermayer
72872d0201 swr: Fix issue with injecting more data than can be used up in the next call.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 19:23:37 +02:00
Michael Niedermayer
c5c355546d swr: add some asserts to resample()
These check that the internal and input buffers match in format

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 19:23:37 +02:00
Michael Niedermayer
75e25f8540 swr: add reversefill_audiodata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 19:23:37 +02:00
Michael Niedermayer
5027e3daf7 swr: fix buf_set() so it works with input == output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 19:23:37 +02:00
Michael Niedermayer
bdbfd4569d swr: make literal 32 a named constant in realloc_audio()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 19:23:37 +02:00
Michael Niedermayer
186be49fd5 swr: fill_audio_data() support NULL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 19:23:37 +02:00
Michael Niedermayer
a0493be10e swresample: set the default parameters to "none"
this way it can easily be detected when parameters have not been set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-17 16:46:15 +02:00
Michael Niedermayer
33f7033452 swr: automatically choose s16/flt/dbl to preserve input precision unless user overrides.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-02 01:12:16 +02:00
Michael Niedermayer
f2e799a3d0 swr: add double precision support to the rematrix code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-02 01:12:16 +02:00
Michael Niedermayer
71a1f76d3c swr: update double precision checks for our resampler
It supports double precision since a while

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-02 01:12:16 +02:00
Justin Ruggles
6d5bf67f04 swr: add lfe_mix_level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-02 01:12:10 +02:00
Michael Niedermayer
aab5a4521c swr: add and use function pointers for rematrix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-01 20:20:21 +02:00
Michael Niedermayer
00fea26faf swr: add native matrix for rematrixing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-01 20:19:28 +02:00
Michael Niedermayer
046b5339fc swr: disable 1 stage convert when dither is enabled.
This combination is not possible easily.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-01 20:12:31 +02:00
Michael Niedermayer
106789dfa0 swr: add sample format to AudioData
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-29 15:32:18 +02:00
Michael Niedermayer
2d6c29f566 swr: add set_audiodata_fmt() and use it to simplify code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-29 15:32:18 +02:00
Michael Niedermayer
edbde52226 swr: change sample format representation so as to maintain the planer/packed distinction.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 13:02:58 +02:00
Michael Niedermayer
da9587952a swr: pass resample parameters from the user to the resampler.
doxy and names stolen from avr

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-26 01:35:22 +02:00