Commit Graph
100 Commits
Author SHA1 Message Date
Justin Ruggles 779ef255e6 adx: add an adx muxer 2012-01-03 18:47:42 -05:00
Justin Ruggles 754ebd1a5b adxenc: check output buffer size before writing 2012-01-03 18:47:42 -05:00
Justin Ruggles 1fb47728cd adxenc: use bytestream functions for header writing.
also add more documentation about the header structure
2012-01-03 18:47:42 -05:00
Justin Ruggles 656e606cae adxenc: use BLOCK_SIZE and BLOCK_SAMPLES macros 2012-01-03 18:47:42 -05:00
Justin Ruggles f1be41c63d adxenc: use a loop to encode each channel 2012-01-03 18:47:42 -05:00
Justin Ruggles 6c117bd8e0 adxenc: remove unneeded loops
avctx->frame_size is 32, so that is how many samples we process per call.
2012-01-03 18:47:42 -05:00
Justin Ruggles 99baf2c7d0 adx: add AVFMT_GENERIC_INDEX to demuxer flags.
fixes seeking
2012-01-03 18:47:41 -05:00
Justin Ruggles 613668210b adxenc: avoid stereo deinterleaving 2012-01-03 18:47:41 -05:00
Justin Ruggles 6b77f07074 adxenc: remove unnecessary setting of coded_frame->key_frame.
It is already set by avcodec_alloc_frame().
2012-01-03 18:47:41 -05:00
Justin Ruggles cc40c056d0 adxenc: log an error message and return AVERROR(EINVAL) for invalid channels 2012-01-03 18:47:41 -05:00
Justin Ruggles a85ab8ad45 adxenc: cosmetics: pretty-printing 2012-01-03 18:47:41 -05:00
Justin Ruggles 25edfc88e3 adxenc: change some data types 2012-01-03 18:47:41 -05:00
Justin Ruggles c98c6e18d8 adxenc: remove unneeded log message 2012-01-03 18:47:41 -05:00
Justin Ruggles e3d4f59f95 adxenc: remove unneeded comments 2012-01-03 18:47:41 -05:00
Justin Ruggles 6fd075f180 adxdec: Validate channel count to fix a division by zero. 2012-01-03 16:28:17 -05:00
Justin Ruggles e49d21306a alacdec: implement the 2-pass prediction type.
The reference encoder does not generate any streams using this, but the
reference decoder can handle it, so we should as well.
2012-01-03 13:15:24 -05:00
Justin Ruggles bb63475aec alacenc: implement the 2-pass prediction type.
This isn't used by the reference encoder, but it is supported by the decoder.
2012-01-03 13:15:23 -05:00
Justin Ruggles 149e1b0468 alacenc: do not generate invalid multi-channel ALAC files 2012-01-03 13:15:23 -05:00
Justin Ruggles e76c7b856f alacdec: fill in missing or guessed info about the extradata format.
Now that there is official documentation from Apple about this, we don't have
to guess anymore.
2012-01-03 13:15:23 -05:00
Justin Ruggles 3a1867deac wavpack: fix typos in previous cosmetic clean-up commit 2012-01-02 08:54:30 -05:00
Justin Ruggles 513c238fa9 wavpack: cosmetics: K&R pretty-printing 2012-01-02 08:52:59 -05:00
Justin Ruggles 8893fbdf7a bmv audio: implement new audio decoding API 2012-01-01 22:56:04 -05:00
Justin Ruggles 03fafdec82 mpegaudiodec: skip all channels when skipping granules
Also fix calculation of new position when switching buffers.
This fixes "overread" error messages when seeking.
2012-01-01 22:37:50 -05:00
Justin Ruggles 481a7ff5bd mpegaudiodec: fix compilation when testing the unchecked bitstream reader 2011-12-31 14:19:09 -05:00
Justin Ruggles 9a3f10695a ra144enc: zero the reflection coeffs if the filter is unstable
fixes use of uninitialized values if the filter is still unstable after using
the previous frame lpc coefficients.
2011-12-22 08:31:07 -05:00
Justin Ruggles f264d336fe truespeech: fix invalid reads in truespeech_apply_twopoint_filter()
fixes Bug 171
2011-12-21 18:13:06 -05:00
Justin Ruggles e9dc920127 asfdec: add side data to ASFStream packet instead of output packet.
fixes memleak of side data
2011-12-21 17:52:31 -05:00
Justin Ruggles 3f9257c5a5 idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur.
This fixes demuxing of file where the first packet is not audio. Such files
are generated by our idroq muxer. It also fixes demuxing of audio only
idroq files.
2011-12-21 16:51:12 -05:00
Justin Ruggles bc78ceec2b 4xm: remove unneeded check for remaining unused data.
This is unnecessary complication that only prints a message and does not
affect decoding.
2011-12-18 13:43:45 -05:00
Justin Ruggles b11ce85664 avplay: don't request a stereo downmix
Multi-channel output works just fine for me with SDL 1.2.14.
2011-12-11 14:01:27 -05:00
Justin Ruggles 28101f6c4e flac muxer: fix writing of file header and STREAMINFO header from extradata
fixes Bug 119
2011-12-10 10:19:41 -05:00
Justin Ruggles 4c38633352 isom: sort and pretty-print codec_movaudio_tags[]
original order is retained within the same tag or codec id to maintain the
muxing/demuxing priority.
2011-12-09 16:12:58 -05:00
Justin Ruggles 7714770de1 isom: remove pointless comments in codec_movaudio_tags[] 2011-12-09 16:12:58 -05:00
Justin Ruggles 21ebf2d493 isom: remove commented-out tag for vorbis 2011-12-09 16:12:58 -05:00
Justin Ruggles 60cd802daf movenc: write 'chan' tag for AC-3 in MOV 2011-12-09 16:12:58 -05:00
Justin Ruggles 1fdf18f4b7 mov: add support for reading and writing the 'chan' tag
This implements reading the tag in the demuxer and adds support for writing it
in the muxer. Some example channel layout tables for muxing are included for
ac3, aac, and alac, but they are not utilized yet.
2011-12-09 16:12:58 -05:00
Justin Ruggles b2890f5ed6 audioconvert: add some additional channel and channel layout macros 2011-12-09 16:12:58 -05:00
Justin Ruggles 1d2449a613 audioconvert: change 7.1 "wide" layout to use side surround channels 2011-12-09 16:12:58 -05:00
Justin Ruggles 8e8c51318c movenc: simplify handling of pcm vs. adpcm vs. other compressed codecs
Use Sound Sample Description Version 2 for all MOV files.
Updated FATE references accordingly.
Note that ADPCM is treated as compressed audio in version 2.
2011-12-09 16:12:58 -05:00
Justin Ruggles 9179f27c64 avconv: only allocate 1 AVFrame per input stream
This avoids allocating/freeing an AVFrame for each packet decode. It also
simplifies error handling in transcode_audio() and transcode_video().
2011-12-05 11:54:24 -05:00
Justin Ruggles 110d2af28e avconv: fix memleaks due to not freeing the AVFrame for audio 2011-12-05 10:53:29 -05:00
Justin Ruggles 0bafe04917 api-example: update to use avcodec_decode_audio4() 2011-12-04 18:29:51 -05:00
Justin Ruggles f199f38573 avplay: use avcodec_decode_audio4() 2011-12-04 18:29:51 -05:00
Justin Ruggles e2a2c49fcd avplay: use a separate buffer for playing silence 2011-12-04 18:29:51 -05:00
Justin Ruggles f08e54e83d avformat: use avcodec_decode_audio4() in avformat_find_stream_info() 2011-12-04 18:29:51 -05:00
Justin Ruggles d1241ff3b2 avconv: use avcodec_decode_audio4() instead of avcodec_decode_audio3() 2011-12-04 18:29:51 -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 560f773c7d avcodec: change number of plane pointers from 4 to 8 at next major bump.
Add AV_NUM_DATA_POINTERS to simplify the bump transition.
This will allow for supporting more planar audio channels without having to
allocate separate pointer arrays.
2011-12-02 17:40:40 -05:00
Justin Ruggles ca12401376 fate: split acodec-pcm into individual tests
this removes 2 redundant tests for pcm in mkv.
we can add the coverage back in later as fate-lavf tests if needed.
2011-12-01 13:27:56 -05:00
Justin Ruggles 0df5e869cb mpegaudio: do not use init_static_data() for initializing tables.
It is called once for each mpegaudio codec that is registered, which adds
significant overhead.
2011-11-27 13:59:34 -05:00
Justin Ruggles 9d2dd356c2 adx: rename ff_adx_decode_header() to avpriv_adx_decode_header()
It is used by the ADX decoder, and therefore needs to be exported in order to
work with shared libs.
2011-11-26 17:00:00 -05:00
Justin Ruggles a17c3c7d15 avformat: add CRI ADX format demuxer 2011-11-26 16:25:07 -05:00
Justin Ruggles 27360ccc5e adx: add an ADX parser.
This simplifies the decoder so it doesn't have to process an in-packet header
or handle arbitrary-sized packets. It also fixes decoding of files with large
headers.
2011-11-26 16:25:07 -05:00
Justin Ruggles d8cec2d7fc adx: move header decoding to ADX common code 2011-11-26 16:25:07 -05:00
Justin Ruggles 7ff55d9bdb adx: calculate the number of blocks in a packet 2011-11-26 16:25:07 -05:00
Justin Ruggles 05c1f11b56 adx: define and use 2 new macro constants BLOCK_SIZE and BLOCK_SAMPLES 2011-11-26 16:25:07 -05:00
Justin Ruggles d1745619db adx: check for unsupported ADX formats 2011-11-26 16:25:07 -05:00
Justin Ruggles 994238536a adx: simplify encoding by using put_sbits() 2011-11-26 16:25:07 -05:00
Justin Ruggles b237248e29 adx: calculate correct LPC coeffs
Instead of using fixed coefficients, the correct way is to calculate the
coefficients using the highpass cutoff frequency from the ADX stream header
and the sample rate.
2011-11-26 16:25:06 -05:00
Justin Ruggles 954d94dd5e adx: use 12-bit coefficients instead of 14-bit to avoid integer overflow 2011-11-26 16:25:06 -05:00
Justin Ruggles c52ddc6024 adx: simplify adx_decode() by using get_sbits() to read residual samples 2011-11-26 16:25:06 -05:00
Justin Ruggles ca9e4727ba adx: fix the data offset parsing in adx_decode_header()
first 2 bytes are 0x80, 0x00. offset is only 16-bit.
this is according to format descriptions on multimedia wiki and wikipedia.
2011-11-26 16:25:06 -05:00
Justin Ruggles 837bbd19eb adx: remove unneeded post-decode channel interleaving
instead interleave channels while decoding
2011-11-26 16:25:06 -05:00
Justin Ruggles e2d1eace00 adx: validate header values 2011-11-26 16:25:06 -05:00
Justin Ruggles 8db67610c0 adx: cosmetics: general pretty-printing and comment clean-up 2011-11-26 16:25:06 -05:00
Justin Ruggles fbc79a9101 adx: remove useless comments 2011-11-26 16:25:06 -05:00
Justin Ruggles e0722d7fb7 adx: change short to int16_t 2011-11-26 16:25:06 -05:00
Justin Ruggles dd1b9f7cd9 adx: rename struct PREV to ADXChannelState 2011-11-26 16:25:06 -05:00
Justin Ruggles bbb46f3ec7 libavutil: add utility functions to simplify allocation of audio buffers.
Based on code by Stefano Sabatini.
2011-11-23 18:39:28 -05:00
Justin Ruggles 8889cc4f5b libavutil: add planar sample formats and av_sample_fmt_is_planar() 2011-11-23 18:39:28 -05:00
Justin Ruggles c1848c4b26 pcmdec: remove unneeded resetting of samples pointer 2011-11-23 16:26:15 -05:00
Justin RugglesandAnton Khirnov 5872c78122 cdg: skip packets that don't contain a cdg command.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-23 21:58:10 +01:00
Justin Ruggles 0e8fdd41c2 dsputil: use cpuflags in x86 emu_edge_core
avoids passing around the extra argument among all the macros it uses
2011-11-22 15:40:51 -05:00
Justin Ruggles 395f2e70dd dsputil: use movups instead of movdqu in ff_emu_edge_core_sse()
This allows emulated_edge_mc_sse() and gmc_sse() to be used under
AV_CPU_FLAG_SSE.
2011-11-22 15:40:51 -05:00
Justin Ruggles 05d1e45d1f wma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits.
The initial values are not checked against the number of block sizes.
Initializing them to frame_len_bits will result in a block size index of 0
in these cases instead of something that might be out-of-range.

Fixes Bug 81.
2011-11-22 13:50:18 -05:00
Justin Ruggles a8fe9a7242 pthread: add some malloc failure checks 2011-11-21 10:18:25 -05:00
Justin Ruggles f3a29b750a avcodec: move some AVCodecContext fields to an internal struct.
A new field, AVCodecContext.internal is used to hold a new struct
AVCodecInternal, which has private fields that are not codec-specific and are
used by general libavcodec functions.

Moved internal_buffer, internal_buffer_count, and is_copy.
2011-11-19 10:01:05 -05:00
Justin Ruggles 513b691955 avcodec: use av_opt_set() instead of deprecated av_set_string3() 2011-11-19 01:14:27 -05:00
Justin Ruggles fa9aeb82e2 avcodec: fix some const warnings
libavcodec/options.c:583: warning: assignment discards qualifiers from pointer
target type
libavcodec/options.c:589: warning: initialization discards qualifiers from
pointer target type
2011-11-19 01:10:58 -05:00
Justin Ruggles 86d3730360 avcodec: remove pointless AVOption, internal_buffer_count 2011-11-19 00:36:49 -05:00
Justin Ruggles f1d1516e55 cosmetics: indentation 2011-11-15 12:17:20 -05:00
Justin Ruggles 1158745a2d mpegaudiodec: init static tables in AVCodec.init_static_data() 2011-11-15 12:17:20 -05:00
Justin Ruggles b656c4d08e tta: use an integer instead of a pointer to iterate output samples 2011-11-11 14:18:22 -05:00
Justin Ruggles 5c210e2cb9 shorten: do not modify samples pointer when interleaving 2011-11-11 14:18:22 -05:00
Justin Ruggles befc473c00 mpc7: only support stereo input.
The Musepack SV7 reference encoder converts mono to stereo when encoding.
2011-11-11 14:17:40 -05:00
Justin Ruggles 8dbc6d03c0 dpcm: do not try to decode empty packets 2011-11-11 14:17:39 -05:00
Justin Ruggles e79da63282 dpcm: remove unneeded buf_size==0 check.
It is already checked in avcodec_decode_audio3()
2011-11-11 14:17:39 -05:00
Justin Ruggles 9d06037d48 twinvq: add SSE/AVX optimized sum/difference stereo interleaving 2011-11-11 14:13:58 -05:00
Justin Ruggles 7b966566da vqf/twinvq: pass vqf COMM chunk info in extradata
This is needed because the twinvq decoder cannot rely on bit_rate to be set.
The API documentation says that bit_rate is set by libavcodec, not by the
user.
2011-11-11 14:06:14 -05:00
Justin Ruggles ca482ce420 vqf: do not set bits_per_coded_sample for TwinVQ.
It is a lossy codec with varying quantization, so bits_per_coded_sample is
not applicable.
2011-11-11 14:06:14 -05:00
Justin Ruggles a8a6da4a0e twinvq: check for allocation failure in init_mdct_win() 2011-11-11 14:06:14 -05:00
Justin Ruggles 164fca39bd atrac1: use correct context for av_log() 2011-11-10 10:25:47 -05:00
Justin Ruggles c298b2b8db apedec: consume the whole packet when copying to the decoder buffer.
This avoids artifically consuming a partial packet but ignoring remaining data
in subsequent calls.
2011-11-10 10:25:47 -05:00
Justin Ruggles de157f2118 apedec: do not needlessly copy s->samples to nblocks.
also move nblocks to the local scope where it is used.
2011-11-10 10:25:47 -05:00
Justin Ruggles 4315c7d35a apedec: check output buffer size after calculating actual output size 2011-11-10 10:25:47 -05:00
Justin Ruggles ad17207b51 apedec: remove unneeded entropy decoder normalization.
The decoder already skips data at the end of the packet without this.
Also remove 2 APEContext fields that were only used for the end-of-frame
normalization.
2011-11-10 10:25:47 -05:00
Justin Ruggles 59f4d1b8bb truespeech: use memmove() in truespeech_update_filters() 2011-11-10 10:25:46 -05:00
Justin Ruggles 41899b9acb vorbisdec: remove AVCODEC_MAX_AUDIO_FRAME_SIZE check
The user could provide a larger buffer, which is already checked separately
before writing output.
2011-11-10 10:25:46 -05:00
Justin Ruggles e551a6f49a vorbisdec: remove unneeded buf_size==0 check 2011-11-10 10:25:46 -05:00
Justin Ruggles f666276fa6 vorbisdec: return proper error codes instead of made-up ones 2011-11-10 10:25:46 -05:00