Commit Graph

30588 Commits

Author SHA1 Message Date
Justin Ruggles c3a92412c0 alacdec: always use get_sbits_long() for uncompressed samples 2011-10-26 11:50:17 -04:00
Justin Ruggles b46e58f741 alacdec: remove unneeded local variable 2011-10-26 11:50:17 -04:00
Justin Ruggles 7080533cda alacdec: remove the numchannels parameter from several functions.
They only operate on stereo content, so the extra param is not necessary and
also allows for simplifying the code.
2011-10-26 11:50:17 -04:00
Justin Ruggles cb50329fc5 alacdec: rename 2 functions.
Now they only do stereo interleaving.
2011-10-26 11:50:16 -04:00
Justin Ruggles c39bddd392 alacdec: move appending of extra_bits to a separate function.
This should also fix decoding of mono 24-bit.
2011-10-26 11:50:16 -04:00
Justin Ruggles e739d35156 alacdec: split stereo decorrelation into a separate function.
It is identical for 16-bit and 24-bit, so there is no need to have duplicate
code.
2011-10-26 11:50:16 -04:00
Justin Ruggles d251c85dce alacdec: cosmetics: rename 'wasted_bits' to 'extra_bits'.
The bits are not wasted, they are additional low bits that are added to the
16-bit decompressed samples to increase the output sample depth.
2011-10-26 11:50:16 -04:00
Justin Ruggles dbbb9262ca alacdec: remove unneeded numsamples checks 2011-10-26 11:50:16 -04:00
Justin Ruggles 53df079a73 alacdec: check for buffer allocation failure.
Also rearranges some functions for easier cleanup on failure.
2011-10-26 11:50:16 -04:00
Justin Ruggles e5e4f92b5c alacdec: allocate per-channel buffers based on channel count.
reduces memory usage when the stream has fewer than MAX_CHANNELS
2011-10-26 11:50:16 -04:00
Justin Ruggles dcaa83a0fc alacdec: read/validate number of channels from the extradata.
check frame header channel count against header/container channel count.
2011-10-26 11:50:16 -04:00
Justin Ruggles 47e9c75b36 alacdec: remove unneeded validation of setinfo_sample_size.
It is already done when using it to set sample_fmt.
2011-10-26 11:50:16 -04:00
Justin Ruggles 0f26f3d5c4 alacdec: set sample_fmt in alac_decode_init() 2011-10-26 11:50:16 -04:00
Justin Ruggles aec8383348 alacdec: set bytespersample using av_get_bytes_per_sample() 2011-10-26 11:50:15 -04:00
Janne Grunau d6174bfe5f threads: restore has_b_frames in frame_thread_free
Otherwise the delay expressed in has_b_frames increases with every
avcodec_close/avcodec_open.
Fixes fate-ea-dct with more than 1 thread.
2011-10-26 16:55:54 +02:00
Daniel Kang ded3e9f054 H.264: Cometics to dsputil_mmx.c
Add whitespace.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-26 06:41:32 -07:00
Justin Ruggles a3a8572165 g722dec: check output buffer size before decoding 2011-10-25 11:30:50 -04:00
Justin Ruggles 4e41973794 g722dec: cosmetics: reindent/linewrap 2011-10-25 11:30:50 -04:00
Justin Ruggles d0a196962a g722dec: remove the use of lowres for half-rate decoding.
It is broken because an AVCodecContext can be opened/closed multiple
times, and sample_rate is getting divided by 2 each time that happens.

This removes the only use of lowres for audio.
2011-10-25 11:30:50 -04:00
Justin Ruggles f540ca22c5 tta: check for extradata allocation failure in tta demuxer 2011-10-25 11:22:02 -04:00
Justin Ruggles 2f1d212fd0 tta: check for allocation failure of decode_buffer 2011-10-25 11:22:02 -04:00
Justin Ruggles b5050539c9 tta: use correct frame_length calculation.
using a floating-point calculation is not necessary.
2011-10-25 11:22:02 -04:00
Justin Ruggles c6056d4004 tta: add support for decoding 24-bit sample format
Note that this will not work in most cases with avconv and avplay due to the
AVCODEC_MAX_AUDIO_FRAME_SIZE limit, but it will decode correctly if given a
large enough output buffer.
2011-10-25 11:22:02 -04:00
Justin Ruggles 8664682d0e cosmetics: indentation 2011-10-25 11:22:02 -04:00
Justin Ruggles 7b7a74a150 tta: remove pointless braces 2011-10-25 11:22:02 -04:00
Justin Ruggles e6923f683c tta: check output buffer size after adjusting frame length for last frame 2011-10-25 11:22:01 -04:00
Justin Ruggles b16960a8a5 tta: fix reading of format in TTA header.
TTA does not support float at all, and format 2 is encrypted TTA.
2011-10-25 11:22:01 -04:00
Justin Ruggles 4d3e7a7516 tta: remove useless commented-out lines 2011-10-25 11:22:01 -04:00
Justin Ruggles 35f9d8c20a tta: check remaining bitstream size while reading unary value 2011-10-25 11:22:01 -04:00
Anton Khirnov 3d813e4c54 lavf: deprecate AVStream.stream_copy
It's only used in avconv, so it properly belongs to OutputStream struct
there.
2011-10-25 16:30:00 +02:00
Anton Khirnov 1b648c7cdb avconc: split choose_codec() to choose_decoder/choose_encoder.
Prevents -c copy from working for input streams and allows to move
stream_copy variable from AVStream to OutputStream.
2011-10-25 16:29:01 +02:00
Anton Khirnov a75034300f lavf: simplify by using FFMAX/FFMIN. 2011-10-25 16:28:52 +02:00
Anton Khirnov f172132f82 mpegenc: add preload private option.
Deprecate AVFormatContext.preload.
2011-10-25 16:27:48 +02:00
Janne Grunau 28287045ca cosmetics: simplify latm_decode_init 2011-10-25 12:08:21 +02:00
Janne Grunau 785f876cee latm: avoid unnecessary reinit of the aac decoder 2011-10-25 12:08:21 +02:00
Janne Grunau 80e36425fb aacdec: initialize sbr context only in new channel elements 2011-10-25 12:07:58 +02:00
Janne Grunau b2e56e08c9 resample: reject unhandled conversions
audio_resample can not reduce the number of channels
2011-10-25 12:06:48 +02:00
Janne Grunau ec1ce86e7f resample: remove unused #define 2011-10-25 12:06:48 +02:00
Mans Rullgard c8477df019 adpcm: use sign_extend()
This avoids warnings from the overflow checker and simplifies the code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-24 15:26:24 +01:00
Janne Grunau d99fe3a478 mpeg12: fix mpeg_decode_slice context parameter type
During slice threading only MpegEncContext is passed to
mpeg_decode_slice, remove a wrong cast and change the function
definition to take MpegEncContext pointer.
2011-10-24 01:05:00 +02:00
Janne Grunau cd8c64e197 Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context"
This reverts commit da22ba7df4 since it
broke slice threading. Slice threading just duplicates MpegEncContext
so every value used during mpeg_decode_slice has to be in it.
A second patch will fix the illusion that Mpeg1Context is available
in mpeg_decode_slice.
2011-10-24 00:59:41 +02:00
Michael Karcher 16ad77b357 Move id3v2 tag writing to a separate file.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-23 19:17:53 +02:00
Ronald S. Bultje 9e66b892e8 swscale: add missing colons to x86 assembly yuv2planeX.
This fixes assembling using "nasm".
2011-10-23 09:44:03 -07:00
Justin Ruggles 704721bc9c g722: split decoder and encoder into separate files 2011-10-23 11:42:34 -04:00
Justin Ruggles b95fbba705 cosmetics: remove extra spaces before end-of-statement semi-colons 2011-10-23 11:36:56 -04:00
Justin Ruggles 60aa1a358d vorbisdec: check output buffer size before writing output 2011-10-23 11:36:56 -04:00
Justin Ruggles d2604f9260 wavpack: calculate bpp using av_get_bytes_per_sample() 2011-10-23 11:35:46 -04:00
John Stebbins ddfb8e1adb ac3enc: Set max value for mode options correctly
for example:
Attempting to set ac3 dsur_mode to "on" results in:
[AC-3 Encoder @ 0x7f508f0a3280] Value 2.000000 for parameter 'dsur_mode' out of range
[AC-3 Encoder @ 0x7f508f0a3280] Error setting option dsur_mode to value on.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-10-23 11:30:54 -04:00
Anton Khirnov 1deb66c50c lavc: move get_b_cbp() from h263.h to mpeg4videoenc.c
It's not used anywhere else.
2011-10-23 14:16:16 +02:00
Anton Khirnov 3fc0830432 mpeg12: move closed_gop from MpegEncContext to Mpeg1Context
It's MPEG-1/2 specific.
2011-10-23 14:15:56 +02:00