1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-11 03:45:05 +02:00
Commit Graph

12947 Commits

Author SHA1 Message Date
Martin Storsjö
81c8c18780 Makefile: Fix dependencies of components
This fixes compilation with --disable-everything --enable-<component>,
for all encoders, decoders, muxers, demuxers, parsers, protocols, bsfs,
indevs, outdevs and filters at the moment. (All those that work without
any external dependencies at least.)

Originally committed as revision 26076 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-22 20:00:42 +00:00
Justin Ruggles
1ce9d6b85f cosmetics: fix comment after change in clipping range
Originally committed as revision 26072 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-22 12:28:02 +00:00
Justin Ruggles
295ab2af6e Change FIX15() back to clipping to -32767..32767.
This avoids a 16-bit overflow in mdct512() due to a -32768 value in costab.
References updated for acodec-ac3, lavf-rm, and seek-ac3_rm tests.
Thanks to Måns Rullgård for finding the bug.

Originally committed as revision 26071 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 21:18:58 +00:00
Justin Ruggles
f9f69028af Add emms_c() after exp_diff calculations.
Fixes AC-3 encoding on OpenBSD 4.8 x86_32 and hopefully other similar
configurations.

Originally committed as revision 26070 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 20:56:25 +00:00
Justin Ruggles
a81d7c6aa3 Pre-calculate crc_inv at codec init.
20% faster output_frame_end().

Originally committed as revision 26069 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 18:26:13 +00:00
Martin Storsjö
fe7438d97f Fix make checkheaders
amrwbdata.h uses offsetof(), which is defined in stddef.h.

Originally committed as revision 26068 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 11:19:59 +00:00
Martin Storsjö
223cefb560 Fix more matroska/webm muxer dependencies
This fixes building with --disable-everything --enable-muxer=matroska and/or
--enable-muxer=webm

Originally committed as revision 26067 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 09:28:39 +00:00
Martin Storsjö
8bd1956462 g722: Move the low_inv_quant6 table up to the common tables
Since SVN rev 25866, this table is used by the trellis encoder, too,
not only by the decoder.

Originally committed as revision 26065 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-21 09:03:57 +00:00
Anatoly Nenashev
ba68d9d3e1 Fix -lowres with ffplay.
Patch by Anatoly Nenashev, anatoly d nenashev a ovsoft d ru

Originally committed as revision 26057 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-19 12:17:40 +00:00
Ramiro Polla
d09b5a869f bump lavcodec minor version for amr-wb decoder in r26051
Originally committed as revision 26052 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 05:15:32 +00:00
Ronald S. Bultje
2b2a597ec0 AMR-WB decoder, written as part of Google Summer of Code 2010 by Marcelo
Galvão Póvoa <marspeoplester gmail com>, mentored by Robert Swain <robert
dot swain gmail com>.

Originally committed as revision 26051 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 03:03:18 +00:00
Justin Ruggles
386268dfff Add some simple fallbacks for normal bit allocation failure.
This allows encoding with lower bitrates by decreasing exponent bits first,
then decreasing bandwidth if the user did not specify a specific cutoff
frequency.

Originally committed as revision 26050 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 23:42:56 +00:00
Justin Ruggles
e62ef8f2db Check user-specified cutoff frequency in validate_options().
Originally committed as revision 26049 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 23:42:52 +00:00
Justin Ruggles
78646ac206 10l: fix encoding for LFE channel
Originally committed as revision 26048 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 22:06:00 +00:00
Justin Ruggles
86c9673bab Add support for fixed-point MDCT sizes other than 512.
Originally committed as revision 26046 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 20:52:27 +00:00
Justin Ruggles
234b70d346 cosmetics: reindent after last commit
Originally committed as revision 26045 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 15:02:15 +00:00
Justin Ruggles
98e34e71c0 Simplify bit allocation search by using a loop for the SNR offset increment.
Originally committed as revision 26044 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 15:02:12 +00:00
Justin Ruggles
cf7c961b19 Do not calculate psd and masking curve if exponents are being reused.
Approx. 20% faster in function bit_alloc_masking().

Originally committed as revision 26042 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 14:16:13 +00:00
Justin Ruggles
68e6b0990d cosmetics: reindent after last commit
Originally committed as revision 26041 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:11 +00:00
Justin Ruggles
795063db3b Copy bap from previous block when exponent strategy is EXP_REUSE.
We can do this because exponents are the only bit allocation parameters which
change from block-to-block currently.
Approx. 57% faster in function bit_alloc().
Approx. 25% faster overall encoding.

Originally committed as revision 26040 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:07 +00:00
Justin Ruggles
126a29b871 Count grouped mantissas for each block all at once at the end of bit
allocation for each block.
24% faster in function bit_alloc(). Approx. 10% faster overall encoding.

Originally committed as revision 26039 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:04 +00:00
Justin Ruggles
e7536ac567 Count bits for fixed parameters at start of encoding rather than in every
frame.

Originally committed as revision 26038 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:00 +00:00
Justin Ruggles
e86ea34dad Use a LUT for number of exponent groups. This avoids recalculating it for
every block and channel for every frame.

Originally committed as revision 26037 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:22 +00:00
Justin Ruggles
834550ea0d Speed up group minimum and group output calculations for EXP_D25 and EXP_D45
in encode_exponents_blk_ch() by removing the inner loops. This is about 30-40%
faster for the modified sections.

Originally committed as revision 26036 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:16 +00:00
Justin Ruggles
cdedf7e625 Convert a for() loop into a while() loop for the downward part of the exponent
delta limiting.

Originally committed as revision 26035 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:08 +00:00
Justin Ruggles
27af78cf0e Redesign encode_exponents_blk_ch() so that duplicate exponent sets are no
longer required. This gets rid of the temp buffer as well as encoded_exp in
AC3EncodeContext. It also allows for skipping the exponent grouping for
EXP_D15. 56% faster in encode_exponents_blk_ch().

Originally committed as revision 26034 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:02 +00:00
Justin Ruggles
8846ee54ad Use optimized function DSPContext.sad[0]() instead of calc_exp_diff().
90% faster compute_exp_strategy().

Originally committed as revision 26033 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 15:06:28 +00:00
Justin Ruggles
7786c384f6 cosmetics: pretty-printing after last commit
Originally committed as revision 26031 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:44:35 +00:00
Justin Ruggles
89bedc4d2e Add a goto for init failure instead of duplicate calls to ac3_encode_close().
Originally committed as revision 26030 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:44:32 +00:00
Justin Ruggles
c41ac4f82e Use pre-allocated temp buffers in mdct512().
5% faster in function.

Originally committed as revision 26029 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:44:29 +00:00
Justin Ruggles
e29065f7bf Write results of post-rotation complex multiply directly to output.
2% faster in function mdct512().

Originally committed as revision 26028 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:13:45 +00:00
Justin Ruggles
9d8533368f Use memcpy() instead of a for loop in mdct512().
8% faster in function.

Originally committed as revision 26027 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:13:41 +00:00
Justin Ruggles
b6f6204db9 Allocate all large per-channel arrays using av_malloc().
Decreases memory usage for less than 6 channels.

Originally committed as revision 26026 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 02:33:02 +00:00
Justin Ruggles
aa645b9888 Make windowed_samples 16-byte aligned.
This will allow future SIMD optimization of the window function.

Originally committed as revision 26025 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 02:32:59 +00:00
Justin Ruggles
e8d21fba3f Allocate planar_samples using av_mallocz().
Lowers memory usage when encoding less than 6 channels.

Originally committed as revision 26024 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 02:32:55 +00:00
Justin Ruggles
171bc51c9b Allocate bap and bap1 buffers using av_malloc().
This reduces the memory footprint when using less than 6 channels.
Modify bit allocation to swap the 2 buffers instead of using memcpy() and use
per-block pointers for bap. This is slightly faster (0.3%) in function
cbr_bit_allocation().

Originally committed as revision 26023 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 21:12:28 +00:00
Justin Ruggles
1c3e117e0b Remove last_samples[] and copy directly from planar_samples[].
Avoids memcpy that was used to store last samples for next frame.
Approx. 3% faster in function deinterleave_input_samples() and reduces memory
usage by 3kB.

Originally committed as revision 26021 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:52 +00:00
Justin Ruggles
7eeca961e3 Remove unneeded line. key_frame is already set to 1 in avcodec_alloc_frame().
Originally committed as revision 26020 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:49 +00:00
Justin Ruggles
2d82d9b1df cosmetics: comment clean-up and misc cosmetics
Originally committed as revision 26019 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:44 +00:00
Justin Ruggles
5901cebecd Separate most of the per-block arrays into a separate per-block struct.
Originally committed as revision 26018 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:41 +00:00
Justin Ruggles
cb6247cb30 Split bit allocation search into a separate function.
Originally committed as revision 26017 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:38 +00:00
Alexander Strange
0f01602362 SVQ3: Allow decoding if thread_count is > 1
svq3 still doesn't support multithreading, but it's simpler for clients if
they can enable threading for all codecs by default.

Originally committed as revision 26015 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 00:22:47 +00:00
Justin Ruggles
06f6f78578 10l: fix typo in compute_exp_strategy()
Originally committed as revision 26013 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:35 +00:00
Justin Ruggles
266d24be4a Move large arrays to AC3EncodeContext rather than passing them around.
Originally committed as revision 26012 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:31 +00:00
Justin Ruggles
7da4dc17d9 cosmetics: line wrap and spacing
Originally committed as revision 26011 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:28 +00:00
Justin Ruggles
a0d763fc88 Use a single value for SNR offset in the bit allocation search rather than
the separate coarse and fine values.

Originally committed as revision 26010 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:22 +00:00
Justin Ruggles
70fcd7ea80 Change bit_alloc() to return the mantissa bit count.
Originally committed as revision 26009 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:19 +00:00
Justin Ruggles
937cd1467c cosmetics: alignment and line wrap after last commit
Originally committed as revision 26008 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:15 +00:00
Justin Ruggles
359c1d1926 Move bit counts to AC3EncodeContext.
Originally committed as revision 26007 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:12 +00:00
Justin Ruggles
793bbf9544 Split out setting of bit allocation parameters to a separate function.
Th new function only needs to be called at initialization because bit
allocation parameters currently do not change during encoding.

Originally committed as revision 26003 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:43 +00:00
Justin Ruggles
8999944ecb Split out counting of frame bits into a separate function.
Originally committed as revision 26002 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:40 +00:00
Justin Ruggles
33a7d549e8 cosmetics: vertical alignment
Originally committed as revision 26001 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:36 +00:00
Justin Ruggles
d3325d555b Only calculate num_exp_groups once.
Originally committed as revision 26000 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:33 +00:00
Justin Ruggles
dc0bc0f84e Check for bit allocation error in ac3_encode_frame().
Move error log printout to ac3_encode_frame().

Originally committed as revision 25999 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:30 +00:00
Justin Ruggles
f94bacc538 Split out grouping of exponents into a separate function.
Originally committed as revision 25998 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:26 +00:00
Justin Ruggles
b6a1e5236e Split out mantissa quantization into separate functions.
Originally committed as revision 25997 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:23 +00:00
Justin Ruggles
5b44ede0ba cosmetics: rearrange some functions
Originally committed as revision 25996 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:20 +00:00
Justin Ruggles
d7da80806c Reverse the exponent & exponent strategy array arrangement to simplify the
per-channel exponent strategy decision.  This will also make it easier to
plug-in other exponent strategy algorithms.

Originally committed as revision 25995 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:17 +00:00
Justin Ruggles
67d979fede Move writing of frame to the output bitstream to a separate function.
Originally committed as revision 25994 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:13 +00:00
Justin Ruggles
084f5c5afe cosmetics: remove a comment and just spacing
Originally committed as revision 25993 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:10 +00:00
Justin Ruggles
160d85f5b0 Split frame size adjustment into a separate function.
Originally committed as revision 25992 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:06 +00:00
Justin Ruggles
dfdf73eb1a Split exponent processing into separate functions.
Originally committed as revision 25991 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:53:02 +00:00
Justin Ruggles
0a0a8500fb Split applying of MDCT into several separate functions.
Originally committed as revision 25990 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:59 +00:00
Justin Ruggles
4acc790f3c Split input sample deinterleaving into a separate function.
Originally committed as revision 25989 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:56 +00:00
Justin Ruggles
152cc52803 Separate functionally different calculations in ac3_encode_frame().
Originally committed as revision 25988 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:53 +00:00
Justin Ruggles
98f6ee4453 cosmetics: rename 2 variables
Originally committed as revision 25987 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:49 +00:00
Justin Ruggles
12ed622699 Deinterleave whole frame at once instead of per-block.
This reduces the amount of memcpy() by using pointers to overlap samples for
successive blocks rather than copying.

Originally committed as revision 25986 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:46 +00:00
Justin Ruggles
e0685bc98f cosmetics: add & alter some comments
Originally committed as revision 25985 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:43 +00:00
Justin Ruggles
282255bbd2 Split setting of bandwidth into a separate function.
Originally committed as revision 25984 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:40 +00:00
Justin Ruggles
e35c984a5d Move setting of bitstream_id and bitstream_mode to ac3_encode_init().
Originally committed as revision 25983 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:37 +00:00
Justin Ruggles
ddf63d37b8 Improve ac3_encode_init() error reporting.
Return AVERROR(EINVAL) instead of -1. Propogate errors from called functions.
Add some error log printouts.

Originally committed as revision 25982 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:34 +00:00
Justin Ruggles
b64d842c1d cosmetics: indent after last commit
Originally committed as revision 25981 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:30 +00:00
Justin Ruggles
99ca4f73f0 Don't use nested loops to iterate valid sample rates.
Eliminates a goto and mirrors the bitrate validation.

Originally committed as revision 25980 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:25 +00:00
Justin Ruggles
1607db0a95 Remove some duplicate local copies of avctx fields.
This is an av_cold function, and we don't need to duplicate variables just to
save a few characters.

Originally committed as revision 25979 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:21 +00:00
Justin Ruggles
8f60f70d44 Split validation of initial user options into a separate function.
Originally committed as revision 25978 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:18 +00:00
Justin Ruggles
427e2293d3 Use bytes instead of 16-bit words for frame size.
Originally committed as revision 25977 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:14 +00:00
Justin Ruggles
eed00252c9 cosmetics: rename variable 'n' to 'pad_bytes'
Originally committed as revision 25976 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:12 +00:00
Justin Ruggles
1971ab6ed6 Change output_frame_end() to return void. The frame size is already known.
Originally committed as revision 25975 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:08 +00:00
Justin Ruggles
e8b552a818 cosmetics: pretty-printing
Originally committed as revision 25974 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:04 +00:00
Justin Ruggles
ce67b7cd38 cosmetics: rename some iterator variables to match what they represent
Originally committed as revision 25973 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:52:00 +00:00
Justin Ruggles
777732756a cosmetics: rename a variable for consistency
Originally committed as revision 25972 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:56 +00:00
Justin Ruggles
aab45ca3de cosmetics: rename exp_samples and global_exp to exp_shift.
Originally committed as revision 25971 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:53 +00:00
Justin Ruggles
23c5b361a6 cosmetics: rename 2 functions
Originally committed as revision 25970 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:50 +00:00
Justin Ruggles
e0b9f94b39 cosmetics: use some size macros in ac3tab.c/h
Originally committed as revision 25969 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:47 +00:00
Justin Ruggles
ce571ceb45 Use AC3_MAX_COEFS instead of 256 in a couple places in ac3.c
Originally committed as revision 25968 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:43 +00:00
Justin Ruggles
47ae6e795b define AC3_CRITICAL_BANDS and use it in the AC-3 encoder and decoder.
Originally committed as revision 25967 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:40 +00:00
Justin Ruggles
0454b55801 Use sizeof(array value) instead of sizeof(int16_t).
Originally committed as revision 25966 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:36 +00:00
Justin Ruggles
a0a9204e49 cosmetics: use lowercase letters for function names
Originally committed as revision 25965 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:33 +00:00
Justin Ruggles
c36ce0f8df cosmetics: add new function documentation and clean up existing documentation
Originally committed as revision 25964 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:30 +00:00
Justin Ruggles
2f8ae52228 cosmetics: add more space between functions
Originally committed as revision 25963 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:26 +00:00
Justin Ruggles
e77fd066fb cosmetics: rearrange some functions/typedefs/macros
Originally committed as revision 25962 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:23 +00:00
Justin Ruggles
02877def49 Simplify group size calculation in 2 places.
Originally committed as revision 25961 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:20 +00:00
Justin Ruggles
9816155337 cosmetics: make a switch/case more compact
Originally committed as revision 25960 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:17 +00:00
Justin Ruggles
b84a211bc8 Clean up fft_init() and mdct_init()
Originally committed as revision 25959 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:12 +00:00
Justin Ruggles
6a988808a4 cosmetics: pretty-printing, alignment, etc...
Originally committed as revision 25958 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:09 +00:00
Justin Ruggles
a913b5cf60 Remove unneeded #include
Originally committed as revision 25957 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:05 +00:00
Justin Ruggles
918cd2255c Simplify fix15().
Turn it into 2 macros, and use av_clip_int16() and lrintf().
This matches the int16 to float sample conversion in audioconvert.c.
The regression test output is different due to lrintf() rounding.

Originally committed as revision 25956 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:51:02 +00:00
Justin Ruggles
228315bbd3 Fix the fixed-point MDCT and FFT tests so that they actually compile and work.
Also, use LFG from libavutil instead of random().

Originally committed as revision 25955 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:58 +00:00
Justin Ruggles
a8d2b06b7c Split out initialization of MDCT tables into a separate function.
Originally committed as revision 25954 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:54 +00:00
Justin Ruggles
0796546370 cosmetics: Document AC3EncodeContext fields.
Originally committed as revision 25953 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:49 +00:00
Justin Ruggles
22c0b03c8f Remove unneeded debugging messages.
Originally committed as revision 25952 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:45 +00:00
Justin Ruggles
1fda2c10f6 cosmetics: Define AC3_WINDOW_SIZE and use it instead of AC3_BLOCK_SIZE*2.
Originally committed as revision 25951 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:40 +00:00
Justin Ruggles
7066cc8f2b cosmetics: use better (and shared) macro names for some constant values
Originally committed as revision 25950 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:34 +00:00
Justin Ruggles
a657899cf7 Remove duplicate AC3EncodeContext fields, sr_shift and sr_code.
Originally committed as revision 25949 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:30 +00:00
Justin Ruggles
2d2692eb49 cosmetics: rename some fields in AC3EncodeContext
Originally committed as revision 25948 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:27 +00:00
Justin Ruggles
9cb5903299 cosmetics: change all short to int16_t
Originally committed as revision 25947 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:23 +00:00
Justin Ruggles
2be209b213 Change some unsigned types to signed types in AC3EncodeContext
Originally committed as revision 25946 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:20 +00:00
Justin Ruggles
7e5a4bf8ba cosmetics: rearrange AC3EncodeContext fields
Originally committed as revision 25945 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 14:50:15 +00:00
Reimar Döffinger
0c1758f018 Return the amount of input data actually used in the qdm2 decoder,
allows playback of files where multiple qdm2 packets have been merged.

Originally committed as revision 25943 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-13 17:54:00 +00:00
James Zern
9d845ca40c Avoid rollover in settings conversion.
Patch by James Zern, jzern google

Originally committed as revision 25941 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 16:27:32 +00:00
Stefano Sabatini
4ba22e044b Fix avpicture_alloc(), which was aligning the linesizes with 0 and thus
causing a wrong allocation.

Originally committed as revision 25938 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 15:31:49 +00:00
Michael Niedermayer
b276854d06 Fix indention of one forgotten line in ffv1.c
Originally committed as revision 25935 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 02:54:21 +00:00
Justin Ruggles
92b818eb9e cosmetics: vertical alignment after last commit
Originally committed as revision 25934 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 00:53:01 +00:00
Michael Chinen
7edbd5361c flac_parser: only buffer the estimated amount of input needed.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25933 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 00:52:57 +00:00
Michael Chinen
97f7fe687a Make FLAC parser return frames when it has the required amount
(without buffering extra input).
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25932 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-12 00:52:54 +00:00
Stefano Sabatini
c61cdd0afb Move AV_NOPTS_VALUE, AV_TIME_BASE, AV_TIME_BASE_Q symbols from
libavcodec to libavcore.

Remove another compile-time dependancy of libavfilter on libavcodec.

Originally committed as revision 25923 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-09 17:27:33 +00:00
Stefano Sabatini
6d34323ee6 Make avpicture_alloc() return meaningful values.
Originally committed as revision 25922 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-08 10:24:09 +00:00
Stefano Sabatini
0141163d6a Reindent.
Originally committed as revision 25921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-08 10:24:07 +00:00
Stefano Sabatini
e74929e8bb Use av_image_alloc() in avpicture_alloc(), simplify.
Originally committed as revision 25920 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-08 10:24:02 +00:00
Michael Chinen
a4151444bd Define FLAC_MIN_FRAME_SIZE and use it in the FLAC decoder.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25916 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:58:34 +00:00
Michael Chinen
60a684939a Simplify the FLAC decoder now that it no longer has to parse arbitrary raw FLAC
data thanks to the recently added FLAC parser.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25915 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:57:02 +00:00
Michael Chinen
475ae04a27 Add a FLAC parser.
Seek test reference updated because FLAC seeking now works properly.
Fixes roundup issue 1150.

Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25914 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:50:50 +00:00
Justin Ruggles
ed4e1e5833 cosmetics: line wrap after last commit
Originally committed as revision 25913 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:02:42 +00:00
Michael Chinen
3c795698d0 Add log_level_offset parameter to ff_flac_decode_frame_header(). It will be used
to optionally silence the error messages.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 14:00:38 +00:00
Michael Chinen
71b6fc216c Add is_var_size and frame_or_sample_num to FLACFrameInfo and read them in
ff_flac_decode_frame_header().
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25911 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 13:50:13 +00:00
Michael Chinen
7f4e432148 Check validity of the frame sync code in ff_flac_decode_frame_header().
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25910 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 13:42:52 +00:00
Michael Chinen
625daac4bd Move decode_frame_header() from flacdec.c to flac.c/h to share with the
forthcoming FLAC parser.
Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25909 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 13:30:18 +00:00
Jason Garrett-Glaser
3cf8db9447 Add fullrange support to libx264.c x264 interface
Originally committed as revision 25904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-07 09:51:27 +00:00
Sprezz
efd63823e6 alsdec: Correct the ALS decoder by storing some parameters per-channel rather
than just per-block. Patch by Sprezz [sprezzatura gmx com]. Fixes Issue 2387.

Originally committed as revision 25898 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-06 15:18:50 +00:00
Baptiste Coudurier
90f1f3bf00 In yadif filter, declare asm constants directly to avoid dependency on libavcodec
Originally committed as revision 25895 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-06 00:14:15 +00:00
Stefano Sabatini
16cfc96124 Add CODEC_CAP_NEG_LINESIZES.
Originally committed as revision 25886 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 19:06:45 +00:00
Stefano Sabatini
1c3b408f88 Add forgotten deprecation to avcodec_pix_fmt_string().
Originally committed as revision 25883 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 14:14:12 +00:00
Baptiste Coudurier
9e95999e2a 10l, add ff_pw_1 to dsputil_mmx for yadif sse2
Originally committed as revision 25881 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 13:06:06 +00:00
Stefano Sabatini
bb4afa13dd Deprecate avcodec_pix_fmt_string() in favor of
av_get_pix_fmt_string(), added to libavutil/pixdesc.h.

Originally committed as revision 25879 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 12:56:21 +00:00
Michael Niedermayer
e75229faae Try to improve reordered_opaque doxy.
Originally committed as revision 25876 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 05:44:29 +00:00
Michael Niedermayer
df59c9c0f8 Detect incorrect padding with wrong stuffing codes used by NEC N-02B.
I dont know if this is the best way to handle it. But it fixes http://kuwatan.jp/temp/n-02b.3gp

Fixes issue 2373.

Originally committed as revision 25875 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 05:44:18 +00:00
Bobby Bingham
23b8342af4 Count non-header data towards intra block bit count in MJPEG encoder
Originally committed as revision 25873 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 05:21:03 +00:00
Michael Niedermayer
372c3f82b7 Change the argument of memory allocation functions from unsigned int to size_t
with the next major bump in libavcodec.

Originally committed as revision 25872 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 04:00:21 +00:00
Martin Storsjö
c6fe83a3e0 g722: Add a trellis encoder
The structure is largely based on the trellis encoder in adpcm.c.

Originally committed as revision 25866 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-03 21:18:45 +00:00
avcoder
1761272ba9 Use SECTION .text for yasm code.
Patch by avcoder, ffmpeg gmail

Originally committed as revision 25859 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-01 13:12:39 +00:00
Martin Storsjö
cfff297d98 adpcm: Skip samples whose ssd calculation has wrapped around
Wraparound in ssd is mainly avoided by subtracting the ssd of the
best node from all the others once it has grown large enough.

If using very large trellis sizes (e.g. -trellis 15), the frontier
is so large that the difference between the best and the worst is
large enough to cause wraparound, even if the ssd of the best one
is subtracted regularly.

When using -trellis 10 on a 30 second sample, this causes only a slight
slowdown, from 61 to 64 seconds.

Originally committed as revision 25858 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-01 08:57:45 +00:00
Aurelien Jacobs
4ab4d65f35 ensure the ASS string in AVSubtitleRect is 0 terminated
Originally committed as revision 25832 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-27 01:07:06 +00:00
Anatoly Nenashev
9d09ebf1ed Mobotix .mxg demuxer
Patch by Anatoly Nenashev, anatoly d nenashev a ovsoft d ru

Originally committed as revision 25831 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-26 10:11:16 +00:00
Reimar Döffinger
782f69e8a5 Fix memleak: free palette data on close.
Originally committed as revision 25816 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-23 20:42:03 +00:00
Reimar Döffinger
097ea6db27 100l, fix missing decrement on split PGS packets.
Originally committed as revision 25810 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-23 07:01:49 +00:00
Baptiste Coudurier
9d252137e5 In h264 decoder, fix decoding when nal end sequence is present
Originally committed as revision 25809 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-23 01:16:37 +00:00
Reimar Döffinger
6b133d7e9c Fail RLE decoding if insufficient data for a complete bitmap was decoded.
Originally committed as revision 25797 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-22 20:39:18 +00:00
Mark Goodman
83cd91122a Support PGS subtitles with RLE data split over mutiple packets.
Patch by Mark Goodman [mark goodman gmail com] with some modifications by me.

Originally committed as revision 25796 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-22 20:35:07 +00:00
Ramiro Polla
8f190d8b83 fix pointer truncation to int in avpicture_layout()
Originally committed as revision 25793 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-22 03:46:31 +00:00
Stefano Sabatini
d2cbdb17b5 Re-implement avpicture_layout() using pixdesc and imgutils API.
The new implementation is more compact, more correct and doesn't hurt
the eyes.

Originally committed as revision 25792 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 21:25:06 +00:00
Stefano Sabatini
6a269f35ee Replace "depth" with "nb_bits" in the header of avcodec_pix_fmt_string().
Originally committed as revision 25791 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 21:25:02 +00:00
Kostya Shishkov
7d3829a87a Musepack SV8 supports "mono" files (though it still codes them as stereo),
so extend decoder to output only one channel for it.

This fixes issue 2368.

Originally committed as revision 25790 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 20:42:06 +00:00
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
2010-11-21 20:06:22 +00:00
Stefano Sabatini
d6e602536c Remove declaration of function:
const char *avcodec_get_channel_name(int channel_id)

which was never implemented.

Originally committed as revision 25788 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 20:06:16 +00:00
Stefano Sabatini
176a6157c0 Move audio channel API from libavcodec to libavcore.
Originally committed as revision 25787 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 19:28:52 +00:00
Reimar Döffinger
18d761a1b1 Fix indentation.
Originally committed as revision 25780 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:38:08 +00:00
Reimar Döffinger
3354b05187 Add explanation and alternative implementation for strange xan
gamma correction.

Originally committed as revision 25779 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:37:26 +00:00
Reimar Döffinger
24ae353dfb WC3/xan: move palette handling to decoder, avoiding need for
PaletteControl.
This also fixes playback of some files with ffplay (images were
corrupted for a short time after a palette change).

Originally committed as revision 25778 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:32:23 +00:00
Reimar Döffinger
a08d918e68 Add a av_grow_packet function, to be used by code that merges
palette and video data packets to get rid of PaletteControl.

Originally committed as revision 25776 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:21:06 +00:00
Martin Storsjö
1a68e7ed15 adpcm: Fix a comment in the trellis heap code
This makes the wording consistent with how people usually talk about heaps.

Originally committed as revision 25775 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-20 11:24:19 +00:00
Martin Storsjö
78f9d35c9a adpcm: Only increment heap_pos after finding a good enough sample
This increases the PSNR slightly (about 0.1 dB) for trellis sizes
below 8, and gives equal PSNR for sizes above that.

Originally committed as revision 25769 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-19 17:36:29 +00:00
Martin Storsjö
d764e3ece9 adpcm: Use a hash table to improve checking for duplicate samples
This lowers the run time from 158 to 21 seconds, for -trellis 8
with a 30 second sample on my machine.

This requires 64 KB additional memory.

Originally committed as revision 25768 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-19 17:35:52 +00:00
Baptiste Coudurier
47d2ddca80 Fix qdm2 decoder packet handling to match the api
Originally committed as revision 25767 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-19 06:52:30 +00:00
Stefano Sabatini
5878d5bda3 Order matters, fix test files linking.
Originally committed as revision 25766 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-19 00:04:23 +00:00
Baptiste Coudurier
9d9c3e1a70 Make DNxHD encoder produce files that are strictly VC-3 compatible
Originally committed as revision 25756 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-16 01:00:55 +00:00
Kostya Shishkov
f3d77632d7 16l trocadero: Musepack SV7 decoder may skip more than 16 bits at the
beginning of the frame, so make it use skip_bits_long() instead of
skip_bits() for that.

Originally committed as revision 25754 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-15 09:30:20 +00:00
Aurelien Jacobs
c99f9b0ac7 minor bump and Changelog entry for r25747
Originally committed as revision 25753 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-14 17:33:43 +00:00
Aurelien Jacobs
c716f91757 minor bump and APIchanges for r25745
Originally committed as revision 25752 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-14 17:31:06 +00:00
Martin Storsjö
86abf868ec adpcm: Fix a comment
Originally committed as revision 25751 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-14 10:23:58 +00:00
Aurelien Jacobs
5952be07dc add missing files in previous commit (ASS encoder and decoder)
Originally committed as revision 25747 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 14:18:59 +00:00
Aurelien Jacobs
e9c098dbaa add ASS encoder and decoder
Originally committed as revision 25746 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 14:17:57 +00:00
Aurelien Jacobs
cb2c971d91 allow passing subtitles header between decoder and encoder
Originally committed as revision 25745 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 13:57:49 +00:00
Vitor Sessak
c4e8733ac1 Fix visual artifacts in 4XM decoding on big-endian system
Originally committed as revision 25734 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 19:55:26 +00:00
Martin Storsjö
38b3bda18f adpcm: Replace any of the leaf nodes in the heap
By not looking for the exactly largest node, we avoid an O(n) seek through
the leaf nodes. Just pick one (not the same one every time) and try replacing
that node with the new one.

For -trellis 8, this lowers the run time from 190 to 158 seconds,
for a 30 second 44 kHz mono sample, on my machine.

Originally committed as revision 25733 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 12:30:27 +00:00
Martin Storsjö
4106b7f1cd Reindent
Originally committed as revision 25732 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 12:28:02 +00:00
Martin Storsjö
f82e8f3482 adpcm: Store the trellis nodes in a heap instead of a sorted array
This avoids having to memmove the large parts of the array when inserting into
it.

For -trellis 8, this lowers the run time from 245 seconds to 190 seconds,
for a 30 second 44 kHz mono sample, on my machine.

Originally committed as revision 25731 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 12:27:27 +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
Alex Converse
5fb2f1347e 10l: dx shouldn't exist.
sorry sorry sorry sorry

Originally committed as revision 25726 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 05:38:57 +00:00
Alex Converse
0611f67525 10l: vorbisdec: declare dy
Originally committed as revision 25725 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 05:34:32 +00:00
Gregory Maxwell
8455e8c7c0 vorbisdec: Fix floor1 decoding
An intermediate value in the floor 1 linear interpolation was
overflowing
resulting in obvious artifacts on some files.

e.g.
http://upload.wikimedia.org/wikipedia/commons/7/79/Big_Buck_Bunny_small.ogv

Prior to this fix 87 out of 128 64kbit/s mono files decoded with ffmpeg
have
lower PEAQ ODG values than the same files decoded with libvorbis. With
this
fix none of that set have significantly worse ODG values than libvorbis.

Fixes issue 2352

Patch by Gregory Maxwell <greg@xiph.org>

Originally committed as revision 25724 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 04:33:26 +00:00
Nicolas George
ba83c4bfb5 MJPEG/AVI1 to JPEG/JFIF bitstream filter.
Originally committed as revision 25721 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-11 15:24:11 +00:00
Jason Garrett-Glaser
2c5168afed Remove bitrate tolerance from libx264 interface
Nobody ever uses it correctly, and ffmpeg sets it incorrectly, so we'll just
leave it out.

Originally committed as revision 25720 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-11 14:34:27 +00:00
Stefano Sabatini
119a34f716 In avcodec_pix_fmt_string() use local variable pixdesc rather than
av_pix_fmt_descriptors[pix_fmt], simplify.

Originally committed as revision 25718 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-10 20:13:24 +00:00
Stefano Sabatini
2de6f6e828 Make avcodec_pix_fmt_string() use the information in the pixel format
descriptors for printing the number of channels/components.

Also replace the term "nb_channels" with "nb_components" which is more
consistent with the FFmpeg internal terminology, and is somehow
different with respect to the current definition of nb_channels in
PixFmtInfo.

See thread:
Subject: [FFmpeg-devel] [PATCH 6/8] Make avcodec_pix_fmt_string() use the
        information in the pixel format descriptors for printing the
        number of planes. Also replace the term "nb_channels" with
        "nb_planes" which is more correct.
Date: Fri,  5 Nov 2010 12:01:38 +0100

Originally committed as revision 25717 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-10 20:13:19 +00:00
Nicolas Kaiser
fe655f6723 Simplify: Remove impossible condition.
Patch by Nicolas Kaiser, nikai nikai net

Originally committed as revision 25714 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-09 23:58:41 +00:00
Stefano Sabatini
ed5d30d91c Move internal function ff_set_systematic_pal() to libavcore, and
rename it ff_set_systematic_pal2().

Originally committed as revision 25712 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-09 22:22:36 +00:00
Thilo Borgmann
a29039aef3 Reindent after last commit.
Originally committed as revision 25711 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 15:24:11 +00:00
Thilo Borgmann
4051ae7617 Allow clean initialization of lut_status array by changing type to signed int.
Originally committed as revision 25710 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 15:22:15 +00:00
Stefano Sabatini
d2af7205a1 Use hierarchic names convention (prefix them with av_expr) for the
eval API.

More grep-friendly and more consistent with the rest of the FFmpeg
API.

Originally committed as revision 25708 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 14:06:49 +00:00
Stefano Sabatini
46db10ed0e Optimize / simplify avcodec_get_pix_fmt_name() check.
Originally committed as revision 25689 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 15:04:35 +00:00
Stefano Sabatini
a5f27f6db8 Use av_pix_fmt_descriptors information in avcodec_pix_fmt_string().
Originally committed as revision 25688 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 13:30:39 +00:00
Stefano Sabatini
f35a41ff5d Make avpicture_fill() return a meaningful error code.
Originally committed as revision 25687 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 13:30:36 +00:00
Stefano Sabatini
24409b5053 Remove alpha information from avcodec_pix_fmt_string(), as that
information does not belong to the pixel format.

Originally committed as revision 25686 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 13:01:12 +00:00
Alex Converse
ebb7f7de82 aaclatm: Eliminate dummy packets due to muxlength calculation.
Muxlength does not include the 3 bytes of AudioSyncStream() before the
AudioMuxElement(). If these three bytes are not accounted for the last three
bytes of the LATM packet are sent back to the decoder again.

Fixes issue244/mux2.share.ts

Originally committed as revision 25685 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 03:05:12 +00:00
Reimar Döffinger
c4d5ee233a Fix indentation.
Originally committed as revision 25683 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-06 16:48:41 +00:00
Reimar Döffinger
931856a267 Improve PGS parsing: the "state" field is not relevant to us,
the object number is, it determines whether we should continue
parsing the presentation description and whether we should
clear the subtitles on the next display command.
Based on patch by Mark Goodman [mark goodman gmail com]

Originally committed as revision 25682 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-06 16:46:03 +00:00
Kostya Shishkov
c5cb9c946b try to give TrueSpeech decoder tables more sensible names
Originally committed as revision 25681 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-06 13:31:17 +00:00
Stefano Sabatini
58b4e5407d Fix FFv1 decoder buffer releasing.
Previously it was releasing the buffer which was returned to the user,
which was resulting in a crash in case of direct rendering.

Originally committed as revision 25678 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 22:45:46 +00:00
Janne Grunau
bbdee6e5f9 aacdec: consume the audio specific config during LATM parsing
Spotted by Alex after Carl Eugen found errors some samples. There no errors or
noticeable artifacts in the samples I used during development.

Originally committed as revision 25676 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 21:00:01 +00:00
Reimar Döffinger
00d1e96bf4 H.264 decode: support cropping up to 28 pixels in interlaced mode.
Contrary to progressive, just being able to crop up to 14/15 pixels
is not enough to encode all supported resolutions, and the new
behaviour is also consistent with e.g. MPEG-2 etc.

Originally committed as revision 25669 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 20:52:28 +00:00
Stefano Sabatini
ba7d6e798e Remove usage of deprecated libavcodec/audioconvert.h functions.
Originally committed as revision 25668 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 20:19:34 +00:00
Reimar Döffinger
e75f418cf2 Fix aspect for 24bpp TM1 samples.
Originally committed as revision 25663 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 17:22:19 +00:00
Reimar Döffinger
a940dc6912 Fix decoding of 24 bpp TM1 (except for aspect).
Originally committed as revision 25662 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 17:01:30 +00:00
Reimar Döffinger
f1c5301413 100l, calculate mb_change_bits_row_size from the update width.
Originally committed as revision 25661 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 16:57:05 +00:00
Reimar Döffinger
97113c2178 Support mid-stream resolution/format changes for TM1.
This makes it easier to fix playback of 24 bit formats.

Originally committed as revision 25660 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 16:45:55 +00:00
Stefano Sabatini
6f84cd1279 Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and
deprecate av_get_bits_per_sample_format().

Originally committed as revision 25654 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 22:20:49 +00:00
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
2010-11-02 22:08:02 +00:00
Stefano Sabatini
262d1c5d22 Move sample format definitions from libavcodec to libavcore.
Originally committed as revision 25652 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 20:45:46 +00:00
Thierry Foucu
769b74ab85 Allow mono encoding with LAME.
Patch by Thierry Foucu, tfoucu gmail

Originally committed as revision 25650 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 20:29:20 +00:00
Janne Grunau
94c7870947 aacdec: change type of data in decode_audio_specific_config parameters
AVCodecContext.extradata is uint8_t*, silence a warning

Originally committed as revision 25644 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 08:33:10 +00:00
Janne Grunau
136e19e1cf Add single stream LATM/LOAS decoder
The decoder is just a wrapper around the AAC decoder.
based on patch by Paul Kendall { paul <ät> kcbbs gen nz }

Originally committed as revision 25642 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 08:32:04 +00:00
Janne Grunau
6c003e6de8 aacdec: pass avctx as logging context for decode_audio_specific_config
Use avctx in all called functions. This allows passing a NULL AACContext
for LATM since the AACContext is only used in output_configure() which
is skipped for LATM parsing.

Originally committed as revision 25641 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 08:30:31 +00:00
Janne Grunau
66a71d989f aacdec: refactor the actual aac decoding code into its own function
aac_decode_frame() remains as AVPacket handling a wrapper. The actual
decoding function takes a GetBitContext as input and will be used be the
AAC LATM decoder to avoid copying the unaligned AAC bitstream.

Originally committed as revision 25640 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 08:29:43 +00:00
Janne Grunau
be63b4ba22 aacdec: return consumed bits in decode_audio_specific_config
Originally committed as revision 25639 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 08:28:55 +00:00
Janne Grunau
37d289530f aacdec: add MPEG4AudioConfig as parameter for decode_audio_specific_config
This will be used by the latm decoder to avoid AACContext changes during
audio specific config parsing.

Originally committed as revision 25638 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 08:28:28 +00:00
Ramiro Polla
4f9d25ddc8 dnxhd_mmx: prefer xmm registers below xmm6 when they are available
Originally committed as revision 25634 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 03:09:16 +00:00
Michael Niedermayer
7d78a96441 Fix possibly exploitable out of buffer writes in msrle_decode_pal4().
This fix is minimalistic, that function should be cleaned up by someone.

Originally committed as revision 25633 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 01:19:15 +00:00
Michael Niedermayer
7429783101 Fix possibly exploitable buffer overrun in msrle_decode_8_16_24_32().
Issue has been reported to me by Gynvael Coldwind

Originally committed as revision 25632 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 01:19:12 +00:00
Michael Niedermayer
81a646140f remove impossible condition from msrle_decode_pal4()
Originally committed as revision 25631 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 01:19:09 +00:00
Michael Niedermayer
94ee6c100d fix indent
Originally committed as revision 25630 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-02 01:19:03 +00:00
İsmail Dönmez
80e33d2451 dsputil: Use explicit movzbl instead of movzx
This fixes compilation with the latest clang trunk version.

Patch by İsmail Dönmez, ismail at namtrac dot org

Originally committed as revision 25628 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-01 19:35:51 +00:00
Nathan Caldwell
d56920e206 aacenc: Correct spreading calculation for high spreading.
The 3GPP spec uses the following calculation for high spreading:

thr'_spr = max(thr_scaled, s_h(n) * thr_scaled(n-1))

where, n is defined as the current band, and s_h() is defined as "[...] the
distance of adjacent bands in Bark and a constant slope that is 15 dB/Bark
[...]". This is a little ambiguous as you would assume you want the Bark
width of the previous band for this calculation. However, this assumption
appears to be incorrect, and you really want the Bark width of the current
band. Coincidentally this is exactly what the spec calls for! =P

This noticeably improves Tom's Diner at low bitrates (I tested at 64kbps,
with mid/side disabled).

Patch by: Nathan Caldwell <saintdev@gmail.com>

Originally committed as revision 25622 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-01 07:45:13 +00:00
Nathan Caldwell
3ea12f65ba aacenc: cosmetics: Swap spreading_hi/low name to match the 3GPP spec.
Patch by: Nathan Caldwell <saintdev@gmail.com>

Originally committed as revision 25621 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-01 07:39:31 +00:00
Ramiro Polla
a4ece893e1 lpc_mmx: add xmm registers to clobber list
Originally committed as revision 25620 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 23:37:15 +00:00
Ramiro Polla
e5d5407e26 lpc_mmx: merge some asm blocks
These blocks depended on the compiler keeping xmm registers untouched between
them.

Originally committed as revision 25619 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 23:36:26 +00:00
Ramiro Polla
eed299b897 sad16_sse2: merge 2 asm blocks
Originally committed as revision 25617 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 21:20:20 +00:00
Ramiro Polla
153ca56b38 xmm_clobbers: list xmm registers first in clobber list
suncc does not like the leading commas inside the macro, but it has no problem
with trailing commas.

Originally committed as revision 25615 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 18:14:48 +00:00
Ramiro Polla
ba40452095 idct_sse2_xvid: only mark xmm>=8 as clobbered on x86_64
Originally committed as revision 25614 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 16:28:28 +00:00
Ramiro Polla
05c018078c motion_est_mmx: prefer xmm registers below xmm6 when they are available
Originally committed as revision 25612 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 15:07:21 +00:00
Ramiro Polla
5d543a3d13 dsputil_mmx: add xmm registers to clobber list
Originally committed as revision 25611 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 13:57:58 +00:00
Ramiro Polla
e2d13c5882 cosmetics: split long line
Originally committed as revision 25610 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 13:46:17 +00:00
Ramiro Polla
0d729e0de2 fdct_mmx: add xmm registers to clobber list
Originally committed as revision 25609 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 13:45:04 +00:00
Ramiro Polla
616735eb97 idct_sse2_xvid: add xmm registers to clobber list
Originally committed as revision 25608 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 13:17:43 +00:00
Ramiro Polla
9943f3b91c mpegvideo_mmx: add xmm registers to clobber list
Originally committed as revision 25607 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 13:15:16 +00:00
Ramiro Polla
559738eff3 dsputil_mmx: prefer xmm registers below xmm6 when they are available
Originally committed as revision 25606 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-31 13:13:53 +00:00
Ramiro Polla
888d78ac98 bink: make bink_rlelens static (it's only used in this file)
Originally committed as revision 25605 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-30 19:51:46 +00:00
Ramiro Polla
51d592dbcb h264dsp: add xmm registers to clobber list
Originally committed as revision 25604 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-30 17:14:22 +00:00
Ramiro Polla
ac19f4a3e8 indent
Originally committed as revision 25598 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 18:31:30 +00:00
Ramiro Polla
cae05859e1 h264dsp: merge some more asm blocks
Originally committed as revision 25597 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 18:22:21 +00:00
Michael Niedermayer
a0e7079a20 Fix 10l leak in ffv1.
Originally committed as revision 25595 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 12:15:50 +00:00
Michael Niedermayer
73cbf86830 Try to find a bit better initial states in ffv1 2pass.
Difference in filesizes to foreman ffv1 version=2, context=1 coder=1
18637016 adv-pass2-g300.avi
18638806 adv-pass1-g300.avi
18640534 ref-pass2-g300.avi
18918214 adv-pass2-g1.avi
18982048 ref-pass2-g1.avi
21516230 adv-pass1-g1.avi

Originally committed as revision 25594 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 12:15:47 +00:00
Michael Niedermayer
0ae0faa7c0 Keep track of how many slices*gops where encoded in ffv1 2 pass.
Originally committed as revision 25593 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 12:15:44 +00:00
Michael Niedermayer
3f0671a2d3 factorize variable declaration in ffv1.
Originally committed as revision 25592 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 12:15:40 +00:00
Jason Garrett-Glaser
3dde66752d Fix crashes in vorbis decoding found by zzuf
Fixes issue 2322.

Originally committed as revision 25591 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-27 16:30:01 +00:00
Nathan Caldwell
c8dcb9dee1 aacenc: Remove energy 'normalization' modification from the 3GPP psymodel
This greatly improves bitrate handling. You will now get within a few
kbps of your requested bitrate instead of 20-40kbps higher.

There is absolutely no analog to this line in the 3GPP spec, that I
can find.

patch by Nathan Caldwell saintdev (at) gmail

Originally committed as revision 25589 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-27 06:36:47 +00:00
Nathan Caldwell
4df5aebb81 aacenc: Fix threshold-in-quiet calculation in the 3GPP psymodel.
Removing the modification vastly improves quality (at a slight bitrate
cost) for some samples. castanets.wav is a good example. The closest
equivalent I see to the modification in the 3GPP spec is a similar
modification (over a specific frequency range) when TNS is used.

This also changes the threshold-in-quiet calculation to match the
3GPP spec.

patch by Nathan Caldwell saintdev (at) gmail

Originally committed as revision 25588 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-27 05:54:44 +00:00
Nathan Caldwell
eafadadaf5 aacenc: Fix the conditions under which 3GPP pre-echo control is run.
According to the 3GPP spec:
"Thus the pre-echo control is inactive for the first short window (but
not all short windows in a short frame) after a start block and for
all frames with a stop window sequence."

Currently, pre-echo control is only run when the current frame is not
a short frame, and the previous frame is not a short frame.

patch by Nathan Caldwell saintdev (at) gmail

Originally committed as revision 25587 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-27 05:54:41 +00:00
Michael Niedermayer
b7b5bccb8d FFV1 initial state 2pass code.
Originally committed as revision 25584 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:01:17 +00:00
Michael Niedermayer
28a3f525c9 Read & write initial_states for ffv1
Originally committed as revision 25583 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:01:14 +00:00
Michael Niedermayer
99a5e93526 Add initial_states array to ffv1.
Originally committed as revision 25582 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:01:11 +00:00