summaryrefslogtreecommitdiffstats
path: root/libavcodec/pcm.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-271-2/+2
| | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Gather all coded_frame allocations and free functions to a single placeVittorio Giovara2015-07-201-11/+0
| | | | | | | | | | | | | | Allocating coded_frame is what most encoders do anyway, so it makes sense to always allocate and free it in a single place. Moreover a lot of encoders freed the frame with av_freep() instead of the correct API av_frame_free(). This bring uniformity to encoder behaviour and prevents applications from erroneusly accessing this field when not allocated. Additionally this helps isolating encoders that export information with coded_frame, and heavily simplifies its deprecation. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* PCM signed 16-bit big-endian planar decoderPaul B Mahol2015-06-241-0/+4
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* pcm: Drop av_unused attribute from variable that is always usedDiego Biurrun2014-08-191-1/+1
|
* pcm: Drop unused variable from DECODE_PLANAR macroDiego Biurrun2014-08-191-1/+0
|
* Replace all instances of avcodec_alloc_frame() with av_frame_alloc().Anton Khirnov2013-11-161-1/+1
|
* cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-031-2/+2
|
* pcm: support 24-bit/32-bit little-endian planarPaul B Mahol2013-09-271-14/+33
| | | | | | Used by LXF. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* pcm_dvd: consolidate pieces from pcm.c and mpeg.cChristian Schmidt2013-08-311-42/+1
| | | | | | | | | | | | | | | | | | | | Remove the header decoding for PCM audio from mpeg.c and the 20/24bit parts from pcm.c and merge them into a new decoder in pcm-dvd.c. The decoder has added support for samples that span multiple packets and modified 20/24bit group decoding. Both is needed to decode samples that have been generated with DVD-Lab Pro 2. The decoding of 16bit PCM and two channel 24bit is identical to before. No other samples are known to verify the correctness of the encoding this software does. The complete list of tested formats is 48kHz/16bit/2-8 channels 48kHz/24bit/2-5 channels 96kHz/16bit/2-4 channels 96kHz/24bit/2 channels Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* pcm: always use codec->id instead of codec_idLuca Barbato2013-07-121-1/+1
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-081-1/+1
|
* pcm: decode directly to the user-provided AVFrameJustin Ruggles2013-02-121-12/+8
|
* lavc: add a wrapper for AVCodecContext.get_buffer().Anton Khirnov2012-12-041-1/+1
| | | | It will be useful in the upcoming transition to refcounted AVFrames.
* pcm: fix decoding of pcm_s16le_planar on big-endianJustin Ruggles2012-11-201-2/+4
| | | | | | 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.
* pcmdec: use planar sample format for pcm_s16le_planarJustin Ruggles2012-11-191-9/+10
|
* lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decodersJustin Ruggles2012-11-011-4/+2
|
* pcm: define AVCodec instances only for enabled codecsMans Rullgard2012-10-221-37/+45
| | | | | | | 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>
* Move av_reverse table to libavcodecDiego Biurrun2012-10-121-5/+6
| | | | It is only used in that library.
* pcmdec: use planar sample format for pcm_lxfJustin Ruggles2012-10-091-18/+15
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-94/+94
|
* pcmenc: set correct bitrate valueMans Rullgard2012-05-171-0/+1
| | | | | | | This fixes a bogus bitrate value in the header of WAV files with alaw/ulaw audio. Signed-off-by: Mans Rullgard <mans@mansr.com>
* pcm: K&R formatting cosmeticsAneesh Dogra2012-04-041-129/+136
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* check for coded_frame allocation failure in several audio encodersJustin Ruggles2012-02-251-0/+2
|
* audio encoders: do not set coded_frame->key_frame.Justin Ruggles2012-02-251-1/+0
| | | | it is already set in avcodec_alloc_frame()
* pcmenc: Do not set avpkt->size.Justin Ruggles2012-02-011-1/+0
| | | | It is already the correct size as set by ff_alloc_packet().
* pcmenc: use AVCodec.encode2()Justin Ruggles2012-01-151-10/+17
|
* avcodec: Add avcodec_encode_audio2() as replacement for avcodec_encode_audio()Justin Ruggles2012-01-151-0/+1
| | | | | | | | 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.
* pcmenc: set frame_size to 0.Justin Ruggles2012-01-111-1/+1
| | | | | This indicates that the actual frame size is based on the buf_size passed to avcodec_encode_audio().
* Add avcodec_decode_audio4().Justin Ruggles2011-12-021-17/+25
| | | | | | Deprecate avcodec_decode_audio3(). Implement audio support in avcodec_default_get_buffer(). Implement the new audio decoder API in all audio decoders.
* pcmdec: remove unneeded resetting of samples pointerJustin Ruggles2011-11-231-3/+0
|
* pcmdec: fix output buffer size check by calculating the actual output sizeJustin Ruggles2011-10-261-4/+11
| | | | prior to decoding.
* pcmdec: move codec-specific variable declarations to the corresponding codecJustin Ruggles2011-10-261-2/+11
| | | | blocks.
* pcmdec: return buf_size instead of src-buf.Justin Ruggles2011-10-261-7/+3
| | | | | 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.
* avcodec: remove the Zork PCM encoder.Justin Ruggles2011-10-261-10/+1
| | | | | | 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.
* pcm_zork: use AV_SAMPLE_FMT_U8 instead of shifting all samples by 8.Justin Ruggles2011-10-261-11/+11
|
* pcmenc: remove unneeded sample_fmt check.Justin Ruggles2011-10-261-5/+0
| | | | It is already checked by avcodec_open2().
* pcmdec: move number of channels check to pcm_decode_init()Justin Ruggles2011-10-261-5/+5
|
* pcmdec: remove unnecessary check for sample_fmt changeJustin Ruggles2011-10-261-5/+0
|
* pcmdec: move DVD PCM bits_per_coded_sample check near to the code that setsJustin Ruggles2011-10-261-5/+7
| | | | the sample size.
* pcmdec: do not needlessly set *data_size to 0Justin Ruggles2011-10-261-1/+0
|
* pcm: reduce pointer type castingMans Rullgard2011-10-131-40/+37
| | | | | | | | | 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>
* Remove statements immediately following unconditional jumpsMans Rullgard2011-07-031-1/+0
| | | | | | This removes a number of compiler warnings. Signed-off-by: Mans Rullgard <mans@mansr.com>
* pcm: Add const to cast in ENCODE macro.Diego Biurrun2011-04-191-1/+1
| | | | | This fixes a lot of warnings of the sort: libavcodec/pcm.c:105: warning: cast discards qualifiers from pointer target type
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove final semicolon from some macrosMans Rullgard2011-02-101-3/+3
| | | | | | This avoids double semicolons after macro expansion. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-261-2/+2
| | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Don't declare a pcm_dvd encoder.Diego Elio Pettenò2011-01-251-1/+1
| | | | | | | | | | 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>
* Do not crash for illegal sample size, fixes issue 2502.Daniel Kang2011-01-111-0/+5
| | | | | | Patch by Daniel Kang, daniel.d.kang at gmail Originally committed as revision 26309 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enumStefano Sabatini2010-11-121-28/+28
| | | | | | SampleFormat with AVSampleFormat. Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add pcm_lxf, a decoder for the 20-bit planar PCM format used in LXFTomas Härdin2010-10-011-1/+25
| | | | Originally committed as revision 25280 to svn://svn.ffmpeg.org/ffmpeg/trunk
OpenPOWER on IntegriCloud