Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
2013-03-08 07:38:30 +01:00
Justin Ruggles
a6bb39add2
pcm: decode directly to the user-provided AVFrame
2013-02-12 12:21:21 -05:00
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
2012-12-04 21:41:59 +01:00
Justin Ruggles
00dd9a6d6a
pcm: fix decoding of pcm_s16le_planar on big-endian
...
The sample count is decremented by the DECODE() macro and needs to be reset
in each loop iteration. Also, DECODE() increments the src pointer so that does
not need to be done separately.
2012-11-20 10:52:49 -05:00
Justin Ruggles
c9d0f4506f
pcmdec: use planar sample format for pcm_s16le_planar
2012-11-19 23:48:37 -05:00
Justin Ruggles
bb6941af2a
lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders
2012-11-01 11:29:13 -04:00
Mans Rullgard
abdee95224
pcm: define AVCodec instances only for enabled codecs
...
This defines an AVCodec only if the corresponding CONFIG option is
enabled instead of using the broad CONFIG_ENCODERS/DECODERS.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-22 14:40:57 +01:00
Diego Biurrun
d5c62122a7
Move av_reverse table to libavcodec
...
It is only used in that library.
2012-10-12 20:39:18 +02:00
Justin Ruggles
7e5f045039
pcmdec: use planar sample format for pcm_lxf
2012-10-09 09:03:51 -04:00
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
2012-08-07 16:00:24 +02:00
Mans Rullgard
7d7b40f48a
pcmenc: set correct bitrate value
...
This fixes a bogus bitrate value in the header of WAV files with
alaw/ulaw audio.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-17 02:34:57 +01:00
Aneesh Dogra
6d21f49879
pcm: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-04 14:14:28 +02:00
Justin Ruggles
a8bdf2405c
check for coded_frame allocation failure in several audio encoders
2012-02-25 11:49:41 -05:00
Justin Ruggles
255ad8881d
audio encoders: do not set coded_frame->key_frame.
...
it is already set in avcodec_alloc_frame()
2012-02-25 11:49:41 -05:00
Justin Ruggles
3c432631e9
pcmenc: Do not set avpkt->size.
...
It is already the correct size as set by ff_alloc_packet().
2012-02-01 16:33:27 -05:00
Justin Ruggles
05f95443ca
pcmenc: use AVCodec.encode2()
2012-01-15 21:24:18 -05:00
Justin Ruggles
b2c75b6e63
avcodec: Add avcodec_encode_audio2() as replacement for avcodec_encode_audio()
...
This allows audio encoders to optionally take an AVFrame as input and write
encoded output to an AVPacket.
This also adds AVCodec.encode2() which will also be usable by video and
subtitle encoders once support is implemented in the public functions.
2012-01-15 21:24:17 -05:00
Justin Ruggles
56f22b7e16
pcmenc: set frame_size to 0.
...
This indicates that the actual frame size is based on the buf_size passed to
avcodec_encode_audio().
2012-01-11 09:09:56 -05:00
Justin Ruggles
0eea212943
Add avcodec_decode_audio4().
...
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
2011-12-02 17:40:40 -05:00
Justin Ruggles
c1848c4b26
pcmdec: remove unneeded resetting of samples pointer
2011-11-23 16:26:15 -05:00
Justin Ruggles
f1901180e0
pcmdec: fix output buffer size check by calculating the actual output size
...
prior to decoding.
2011-10-26 12:01:07 -04:00
Justin Ruggles
154cd253e5
pcmdec: move codec-specific variable declarations to the corresponding codec
...
blocks.
2011-10-26 12:01:07 -04:00
Justin Ruggles
0093f96d34
pcmdec: return buf_size instead of src-buf.
...
The values will always be the same, so this change eliminates an unneeded
variable. It also gets rid of the need to reset src when memcpy() is used.
2011-10-26 12:01:07 -04:00
Justin Ruggles
85579b6381
avcodec: remove the Zork PCM encoder.
...
The Zork PCM decoder does not decode the 1 sample we have correctly, therefore
the encoder based on the decoder is also incorrect. There is no good reason to
keep the encoder.
2011-10-26 12:01:07 -04:00
Justin Ruggles
67a3b67c71
pcm_zork: use AV_SAMPLE_FMT_U8 instead of shifting all samples by 8.
2011-10-26 12:01:07 -04:00
Justin Ruggles
06af335a33
pcmenc: remove unneeded sample_fmt check.
...
It is already checked by avcodec_open2().
2011-10-26 12:01:07 -04:00
Justin Ruggles
d94e29cac9
pcmdec: move number of channels check to pcm_decode_init()
2011-10-26 12:01:06 -04:00
Justin Ruggles
83efd7652e
pcmdec: remove unnecessary check for sample_fmt change
2011-10-26 12:01:06 -04:00
Justin Ruggles
381e195b46
pcmdec: move DVD PCM bits_per_coded_sample check near to the code that sets
...
the sample size.
2011-10-26 12:01:06 -04:00
Justin Ruggles
6b94711f15
pcmdec: do not needlessly set *data_size to 0
2011-10-26 12:01:06 -04:00
Mans Rullgard
b45eb9d619
pcm: reduce pointer type casting
...
Making 'samples' a pointer to uint8_t simplifies the DECODE
macro and reduces the amount of type casting overall.
This also fixes some signed overflows on left shift.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-13 17:56:13 +01:00
Mans Rullgard
b27565b143
Remove statements immediately following unconditional jumps
...
This removes a number of compiler warnings.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 03:15:53 +01:00
Diego Biurrun
151cd4f982
pcm: Add const to cast in ENCODE macro.
...
This fixes a lot of warnings of the sort:
libavcodec/pcm.c:105: warning: cast discards qualifiers from pointer target type
2011-04-19 16:18:59 +02:00
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Mans Rullgard
44adbebe17
Remove final semicolon from some macros
...
This avoids double semicolons after macro expansion.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-10 21:45:17 +00:00
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 16:08:45 +00:00
Diego Elio Pettenò
5b5083b5fe
Don't declare a pcm_dvd encoder.
...
The PCM_DVD encoder would be left unused, as allcodecs.c properly declared
it as being decoder-only, but it would still be built into the object file.
Since there is no block of code to properly encode this PCM format, it's
not a full codec.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 00:45:27 +00:00
Daniel Kang
e048a9cab1
Do not crash for illegal sample size, fixes issue 2502.
...
Patch by Daniel Kang, daniel.d.kang at gmail
Originally committed as revision 26309 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 14:08:45 +00:00
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
2010-11-12 11:04:40 +00:00
Tomas Härdin
fbeabfca2f
Add pcm_lxf, a decoder for the 20-bit planar PCM format used in LXF
...
Originally committed as revision 25280 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-01 11:08:19 +00:00
Reimar Döffinger
edac49daf5
Use "const" qualifier for pointers that point to input data of
...
audio encoders.
This is purely for clarity/documentation purposes.
Originally committed as revision 24481 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 13:59:49 +00:00
Peter Ross
a5b588bcad
Use designated initialisers for pcm codec struct
...
Originally committed as revision 24264 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-16 13:02:48 +00:00
Justin Ruggles
4dbcfa6f95
Set bits_per_raw_sample in the pcm decoder.
...
Originally committed as revision 23566 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-10 16:59:56 +00:00
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
2010-04-20 14:45:34 +00:00
Reimar Döffinger
fa034b4427
Allow hardcoding of ulaw and alaw tables.
...
Originally committed as revision 22762 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-01 17:54:15 +00:00
Stefano Sabatini
72415b2adb
Define AVMediaType enum, and use it instead of enum CodecType, which
...
is deprecated and will be dropped at the next major bump.
Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Francesco Lavra
91cc5d3767
Move ff_reverse in libavcodec to av_reverse in libavutil.
...
Patch by Francesco Lavra, francescolavra interfree it
Originally committed as revision 20484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-09 09:11:35 +00:00
Reimar Döffinger
b5f09d31c2
Make sample_fmts and channel_layouts compound literals const to reduce size of
...
.data section.
Originally committed as revision 19787 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-06 09:15:07 +00:00
Måns Rullgård
63613fe615
Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
...
Originally committed as revision 19508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-26 12:20:04 +00:00
Michael Niedermayer
34365443fd
Indent
...
Originally committed as revision 18627 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-19 20:41:26 +00:00