Michael Niedermayer
c8553bea9e
swr: use &~15
...
Idea-by: reimar (and ubitux on IRC)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
4289b6690d
swr: replace /16 by >>4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
bd1d975cd0
swr: fix silence buffer for planar U8
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
fecdc76a9f
swr: fix cpy() after the len was changed to be in samples.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
f10aeab69c
swr: audioconvert: consider mono to be planar
...
This way it will be handled by the planar==planar SIMD
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
fec3700dcd
swr: update calling code to support mixed packed planar SIMD
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e8dd7928c8
swr: change simd len argument to be in samples instead of dst bytes.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9f98a8e9bc
swr: use memcpy when input and output match
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
bcc66ff0e4
swr: add int16_to_int32_mmx/sse
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
06b62cb8f2
swr: move AudioConvert to header
...
the next commits will need it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
edbde52226
swr: change sample format representation so as to maintain the planer/packed distinction.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
bbd3dc49ff
swr: unroll audioconvert core C function
...
36k->32k decicycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
4119fa7023
swr: audioconvert, mark some constants as floats.
...
idea from avr
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
aeeb0e6deb
indeo4, swresample: add some missing static/const to tables.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Clément Bœsch
81a65b82fb
swr: handle correctly muted channel with u8 sample fmt.
13 years ago
Clément Bœsch
fc6351d019
swr: make audio convert code explicitely private.
...
Only what's declared in libswresample/swresample.h is public.
13 years ago
Clément Bœsch
fc42550097
swr: move format convert code to dedicated functions.
...
This should easier common case optimizations.
13 years ago
Clément Bœsch
f5cd136f2b
ffmpeg: add -map_channel option.
...
Based on an initial work by Baptiste Coudurier.
13 years ago
Michael Niedermayer
b5875b9111
Add libswresample.
...
Similar to libswscale this does resampling and format convertion, just for audio
instead of video.
changing sampling rate, sample formats, channel layouts and sample packing all
in one with a very simple public interface.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alex Converse
2f072b55a4
Fix the conversion of AV_SAMPLE_FMT_FLT and _DBL to AV_SAMPLE_FMT_S32.
...
(1<<31) is undefined and seems to be evaluated by gcc to -2^31 when
these formulae require 2^31.
These conversions still need fate tests.
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Reinhard Tartler
7ffe76e540
Merge libavcore into libavutil
...
Done to keep ABI compatible. Otherwise this is just silly
14 years ago
Reinhard Tartler
737eb5976f
Merge libavcore into libavutil
...
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
14 years ago
Stefano Sabatini
63e8d9760f
Use the new libavcore audio channel API.
...
This also allows to remove a linking dependency of libavfilter on
libavcodec.
Originally committed as revision 25789 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Stefano Sabatini
176a6157c0
Move audio channel API from libavcodec to libavcore.
...
Originally committed as revision 25787 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Stefano Sabatini
5d6e4c160a
Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
...
SampleFormat with AVSampleFormat.
Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Stefano Sabatini
d63e456a2a
Implement functions:
...
av_get_sample_fmt_name()
av_get_sample_fmt()
av_get_sample_fmt_string()
in libavcore, and deprecate the corresponding libavcodec/audioconvert.h functions:
avcodec_get_sample_fmt_name()
avcodec_get_sample_fmt()
avcodec_sample_fmt_string()
Originally committed as revision 25653 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
S.N. Hemanth Meenakshisundaram
5da19b53c6
Implement avcodec_get_channel_layout().
...
Patch by S.N. Hemanth Meenakshisundaram smeenaks:ucsd+edu.
Originally committed as revision 24936 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
07876e25c8
Workaround for missing llrintf()
...
Originally committed as revision 22954 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ronald S. Bultje
b1078e9fe6
Move clipping of audio samples (for those codecs outputting float) from decoder
...
to the audio conversion routines.
Originally committed as revision 22937 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Carl Eugen Hoyos
5dfa637cca
Make function get_channel_name() static: It is only used in audioconvert.c.
...
Originally committed as revision 22114 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Justin Ruggles
7ca1295985
Do not guess the channel layout when getting its string value.
...
Originally committed as revision 19185 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Justin Ruggles
0fb6a8b339
Remove the 3-front-channel layout from the list of channel layout
...
aliases. Calling this "surround" is confusing and questionable.
Originally committed as revision 19183 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Justin Ruggles
be233a5691
Check that channel layout is compatible with number of channels for
...
output audio stream.
Originally committed as revision 18621 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Justin Ruggles
1b7bc4a245
Add 3 channel layout convenience macros.
...
Originally committed as revision 18609 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Justin Ruggles
f79e331f34
Add names for 5.0 and 5.1 back speaker channel layouts.
...
Originally committed as revision 18459 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Patrik
862c1d2f05
Replace snprintf() with av_strlcpy().
...
Fixes the following warning on some systems:
audioconvert.c:131: warning: format not a string literal and no format
arguments
Patch by Patrik patrik A yes D nu
Originally committed as revision 17110 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
bad5537e2c
Use full internal pathname in doxygen @file directives.
...
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.
Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Baptiste Coudurier
4d6f600c58
Add const, remove warning:
...
libavcodec/audioconvert.c:190: warning: initialization discards qualifiers from pointer target type
Originally committed as revision 16716 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
c2fef0c163
Use "" instead of <> when #including non-system headers.
...
Originally committed as revision 16689 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Carl Eugen Hoyos
7e8efe18ba
One const is enough.
...
Originally committed as revision 15847 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Andreas Öman
9d9b9d32e6
Change multichannel API define prefix from "CHANNEL_" to "CH_".
...
Originally committed as revision 15768 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Peter Ross
0d72e7d0ae
Add audio channel layout API to libavcodec.
...
Originally committed as revision 15762 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Pettenò
d3b9e7f19b
Remove duplicate "const" qualifier for *matrix.
...
This silences out a warning when compiling with Intel C Compiler.
Patch by Diego 'Flameeyes' Pettenò %flameeyes A gmail P com%
Originally committed as revision 15524 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
23694e27f0
Drop deprecated SAMPLE_FMT_S24.
...
Originally committed as revision 15264 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Peter Ross
e06b00f3b6
Add SAMPLE_FMT_DBL.
...
Originally committed as revision 14832 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Peter Ross
82cee279a5
Modify av_audio_convert() to use AVAudioConvert context struct; add av_audio_convert_alloc() and av_audio_convert_free() support functions.
...
Originally committed as revision 14496 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Peter Ross
8a464e7580
Revert r14484 hunk that deleted the 'include avcodec.h' statement.
...
Originally committed as revision 14495 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Peter Ross
c2b28bb975
Add sample format support functions: avcodec_get_sample_fmt_name(), avcodec_get_sample_fmt(), avcodec_sample_fmt_string()
...
Originally committed as revision 14484 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago