Commit Graph

10754 Commits

Author SHA1 Message Date
Måns Rullgård 2ef21b9179 AAC: Reduce depth of vlc_spectral tables to 2
Up to 6% faster overall on i7, no change on A8.

Originally committed as revision 21191 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 16:46:39 +00:00
Måns Rullgård 95dff4aced AAC: Unswitch loop over window groups in decode_spectrum_and_dequant()
GCC should be able to do this, but doesn't.  Slightly faster code.

Originally committed as revision 21190 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 16:46:35 +00:00
Måns Rullgård 05f9d8fcaa AAC: simplify some calculations in decode_spectrum_and_dequant()
Simplify cur_band_type, group_len, and coef/offset calculations.  This
makes the code easier to read and slightly faster.

Originally committed as revision 21189 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 16:46:32 +00:00
Måns Rullgård c816d3d042 AAC: Compress codebook tables and optimise sign bit handling
The codebooks each consist of small number of values repeated in
groups of 2 or 4.  Storing the codebooks as a packed list of 2- or
4-bit indexes into a table reduces their size substantially (from 7.5k
to 1.5k), resulting in less cache pressure.

For the band types with sign bits in the bitstream, storing the number
and position of non-zero codebook values using a few bits avoids
multiple get_bits() calls and floating-point comparisons which gcc
handles miserably.

Some float/int type punning also avoids gcc brain damage.

Overall speedup 20-35% on Cortex-A8, 20% on Core i7.

Originally committed as revision 21188 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 16:46:28 +00:00
Vitor Sessak ef5e7fb253 Remove needless use of log2f()
Originally committed as revision 21185 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 04:35:19 +00:00
Vitor Sessak 1c3c129b8f Remove the struct SiprModeParam of the context. This will simplify splitting
the file for future 16k mode decoder code.

Originally committed as revision 21184 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 04:29:55 +00:00
Måns Rullgård f3da24c4c3 SIPR: kill variable-length arrays
Two of these are in fact constant size, so use the constant instead of
a variable in the declarations.  The remaining one is small enough
that always using the maximum size is acceptable.

Originally committed as revision 21183 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 03:11:02 +00:00
Michael Niedermayer 0cd73b6c30 remove unused variable
Originally committed as revision 21182 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 02:44:38 +00:00
Michael Niedermayer cc51b28299 Split cabac decoding code out of h264.c.
not slower according to benchmarks.

Originally committed as revision 21181 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 02:35:36 +00:00
Michael Niedermayer 8e71d89a7b Move golomb_to_int*cbp tables back to h264_data.h as svq3.c used them.
Yes i did compile&test, no svq3.c was not recompiled.

Originally committed as revision 21180 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 02:17:16 +00:00
Zuxy Meng 0752cd39d2 More av_cold for infrequently called functions.
Originally committed as revision 21179 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 02:16:00 +00:00
Michael Niedermayer e1e949026e Split cavlc out of h264.c.
Seems to speed the code up a little...
The placement of many generic functions between h264.c and h264.h is still open
Currently they are a little randomly placed between them.

Originally committed as revision 21178 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 01:59:19 +00:00
Reimar Döffinger 1460c79097 Use MULH instead of 64x64 multiplication, around 5% overall speedup on Intel Atom.
Patch by myself and Yuriy Kaminskiy [yumkam mail ru]

Originally committed as revision 21175 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 23:02:07 +00:00
Michael Niedermayer 188d3c510d Split motion vector prediction off h264.c/h.
Originally committed as revision 21174 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 21:36:26 +00:00
Michael Niedermayer 2bedc0e854 Move check_intra4x4_pred_mode() back from h264.h to h264.c, the function is just
called once per MB in worst case and doesnt seem to benefit from static inline.
Actually the code might be a hair faster now (0.1% according to my benchmark but
this could be random noise)

Originally committed as revision 21173 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 21:17:26 +00:00
Michael Niedermayer ea6f00c448 Split all the reference picture handling off h264.c.
Originally committed as revision 21172 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 20:59:00 +00:00
Thilo Borgmann 099809d19b Reindent after last commit.
Originally committed as revision 21171 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 20:37:56 +00:00
Thilo Borgmann ff9ea0b7cc Replace variable length array with an allocated buffer
in the context to increase compatibility.

Originally committed as revision 21170 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 20:35:22 +00:00
Michael Niedermayer 889fce8e30 Split (picture|seq) parameter set decoding out of h264.c.
no speedloss meassured, also its really not touching anything that is speed relevant.

Originally committed as revision 21169 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 19:33:45 +00:00
Michael Niedermayer 9c09546352 Split SEI code off h264.c.
Originally committed as revision 21168 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 18:54:40 +00:00
Michael Niedermayer 943f69a6ea Split direct mode (macro)block decoding off h264.c.
No speedloss meassured (its slightly faster here but that may be random fluctuations)

Originally committed as revision 21165 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 14:32:58 +00:00
Michael Niedermayer 9514a0841a Align mb_bit_buffer and vs_bit_buffer as their alignment is checked by assert().
Originally committed as revision 21164 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 13:54:35 +00:00
Zuxy Meng a7494872d5 Reduce stack usage in svq1_encode_plane(). Reuse context scratch buffer
instead.  Avoid a crash on MinGW.

Originally committed as revision 21162 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 09:13:32 +00:00
Michael Niedermayer 082cf97106 Split h264 loop filter off h264.c.
No meassureable speed difference on pentium dual & cathedral sample.

Originally committed as revision 21159 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 06:01:55 +00:00
Michael Niedermayer 419276c50d Move svq3.o to the correct spot.
Originally committed as revision 21158 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 05:34:10 +00:00
Michael Niedermayer 903d58f631 Get rid of #include "svq3.c"
functions called more than per mb are moved into the header, scan8 is also
as it must be known at compiletime.
The code after this patch duplicates h264data.h, this has been done to minimize
the changes in this step and allow more fine grained benchmarking.
Speedwise this is 1% faster on my pentium dual core with diegos cursed cathedral
sample.

Originally committed as revision 21157 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 05:30:31 +00:00
Michael Niedermayer a683681336 Better title for the file.
Originally committed as revision 21156 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 04:49:18 +00:00
Carl Eugen Hoyos 0941ee0fa6 Support uncompressed ("Resolution 1:1") Avid AVI Codec, (partially) fixes issue 1474.
Originally committed as revision 21154 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 00:29:26 +00:00
Måns Rullgård dc0d86face AAC: use table for cbrtf(n)*n
The maximum length of escape_sequence is 21 bits, so adjust limit in
code to match this.

Up to 10% faster on Cortex-A8.

Originally committed as revision 21153 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 20:21:26 +00:00
Måns Rullgård 7c8af53f87 AAC: escape_sequence is 21 bits max
The maximum length of escape_sequence is 21 bits, so adjust limit in
code to match this.  Also fix the comment.

Originally committed as revision 21151 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 18:02:00 +00:00
Alex Converse c460833d76 fft-test: Add RDFT/IRDFT support.
Originally committed as revision 21141 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 16:41:03 +00:00
Alex Converse 5b37ef8e43 fft-test: Replace do_mdct with a tf_transform enum and switch on it.
Originally committed as revision 21140 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 16:40:01 +00:00
Kostya Shishkov eebece4641 Fix two RLE buffer size calculations in TSCC decoder.
Spotted by Zhongtuan Ma.

Originally committed as revision 21138 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 14:21:53 +00:00
Carl Eugen Hoyos 3b3a676a13 10l: Fix forgotten variable rename from r14893 (fixes issue 1675).
Originally committed as revision 21135 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 10:54:59 +00:00
Alexander Strange 7ffd8332c7 Add missing internal.h to files calling ff_match_2uint16().
Fixes warnings:
libavcodec/mpegvideo_enc.c:574: warning: implicit declaration of function
'ff_match_2uint16'
libavcodec/ituh263enc.c:143: warning: implicit declaration of function
'ff_match_2uint16'
libavcodec/svq1enc.c:97: warning: implicit declaration of function
'ff_match_2uint16'

Originally committed as revision 21133 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 04:57:04 +00:00
Michael Niedermayer 2c8077621b Optimize ff_snow_horizontal_compose97i.
this makes the 9/7 C wavelet at the decoder side 22% faster.
The old code is changed to match the new in terms of the order of operations
(which also makes it sligtly faster)

Originally committed as revision 21132 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 02:52:50 +00:00
Michael Niedermayer 233a8b3d6b Merge vertical_compose53iL0*()
8% faster C 5/3 wavelet at the decoder side.

Originally committed as revision 21131 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 01:00:50 +00:00
Michael Niedermayer 2a84512a74 Optimize horizontal_compose53i() by inlining inv_lift() and optimizing the
resulting code slightly. ~30% faster C 5/3 wavelet at the decoder side.

Originally committed as revision 21130 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 00:54:48 +00:00
David Conrad 24ca518bd1 Add support for dirac in ogg
Originally committed as revision 21128 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 00:31:52 +00:00
David Conrad 66b0255248 Add a function to parse Dirac's sequence header
Originally committed as revision 21127 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 00:31:44 +00:00
David Conrad c4dffe7e36 Export fullrange flag and color information for h.264
Originally committed as revision 21126 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 00:31:39 +00:00
Vladimir Voroshilov 7bd3096f5f SIPR decoder for modes 8k5, 6k5 and 5k0.
Patch by Vladimir Voroshilov and myself.

Originally committed as revision 21125 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-10 21:38:15 +00:00
Peter Ross a1ae40fd0d Deluxe Paint Animation decoder
Originally committed as revision 21117 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-10 05:41:36 +00:00
Michael Niedermayer 9e2e821468 Doxy for ff_match_2uint16().
Originally committed as revision 21115 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-10 04:06:34 +00:00
Michael Niedermayer 6c060b55a9 Fix implicit declaration warning.
Originally committed as revision 21114 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-10 04:04:51 +00:00
Michael Niedermayer c46eeae2a8 Add a function to match a 2 element vector of uint16_t and use it in h263 and svq1
instead of custom and bloated code to find an index into a w/h array.

Originally committed as revision 21113 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-09 18:33:21 +00:00
Michael Niedermayer aa11ce6568 Make inter_level/run global again, msmpeg4 uses them.
... I did test but it wasnt recompiled ...

Originally committed as revision 21112 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-09 18:12:06 +00:00
Michael Niedermayer 0366b6e199 Make some tables static again, i mistakely thought they would be used in several
places.

Originally committed as revision 21111 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-09 17:22:37 +00:00
Laurent Aimar 75dd693840 Export get_slice_type() as ff_h264_get_slice_type().
Patch by Laurent Aimar <fenrir at videolan dot org>.

Originally committed as revision 21110 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-09 16:20:41 +00:00
Michael Niedermayer fc53b6afee Split H263 encoder and decoder from common code.
Originally committed as revision 21109 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-09 14:59:06 +00:00