Commit Graph

10781 Commits

Author SHA1 Message Date
Michael Niedermayer 7931bb2a0c Comment for() ; out
~200 bytes smaller ff_h264_filter_mb()
please everyone, NEVER add code with the assumtation that gcc will remove it
without checking gcc actually does. Chances are it does not.

Originally committed as revision 21251 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 17:41:40 +00:00
Michael Niedermayer ed3d7e2f65 Mark a few functions as noinline, this makes ff_h264_filter_mb() a bit smaller
and 5% faster.
ff_h264_filter_mb_fast() stay the same size as gcc decided not to inline these
functions there in the first place.

Originally committed as revision 21250 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 17:27:17 +00:00
Michael Niedermayer 183a86c958 Apply last 2 optimizations to similar code i forgot.
Originally committed as revision 21249 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 16:21:12 +00:00
Michael Niedermayer 3f55a651c4 Another microopt, 4 cpu cycles for avoidance of FFABS().
Originally committed as revision 21248 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 16:14:32 +00:00
Måns Rullgård 1c6f46be03 Add missing guards and includes to arm/aac.h
Originally committed as revision 21247 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 15:54:01 +00:00
Michael Niedermayer 26147d368b Minor (2 cpu cycles) optimization ||->|.
Originally committed as revision 21246 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 15:19:05 +00:00
ami_stuff 8be7ac98ca Support decoding of SoftLab-NSK VideoTizer.
Patch by ami_stuff, ami_stuff o2 pl

Originally committed as revision 21245 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 13:13:49 +00:00
Michael Niedermayer 4c568cbcac Consider slice_beta_offet in qp_thresh.
Originally committed as revision 21244 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 13:12:11 +00:00
Michael Niedermayer 2e36c931f0 Avoid wasting 4 cpu cycles per MB in redundantly calculating qp_thresh.
Originally committed as revision 21243 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 11:55:35 +00:00
Carl Eugen Hoyos 864a074213 Correctly decode some Avid AV1x samples, fixes issue 1684.
Originally committed as revision 21241 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 10:46:45 +00:00
Anatoly Nenashev e1bb0364f8 Support lowres 3 when decoding MPEG video.
Patch by Anatoliy Nenashev, nenashev_as mail ru

Originally committed as revision 21239 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 10:41:52 +00:00
Michael Niedermayer ddd60f28d8 Replace cabac checks in inline functions from h264.h with constants.
No benchmark because its just replacing variables with litteral constants
(so no risk for slowdown outside gcc silliness) and i need sleep.

Originally committed as revision 21237 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 05:41:33 +00:00
Måns Rullgård a482e61bd6 Add symbol versioning for shared libraries
Based on patch by Reinhard Tartler <siretart tauware de>

Originally committed as revision 21236 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 04:49:02 +00:00
Vitor Sessak d140b02581 SIPR16k decoder
Originally committed as revision 21234 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 03:54:55 +00:00
Vitor Sessak d79c06b2ad Allow a SIPR table to be used by the upcoming SIPR16k decoder
Originally committed as revision 21233 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 03:44:17 +00:00
Vitor Sessak 65323ed279 Split some SIPR structs to a header file for the upcoming SIPR16k commit
Originally committed as revision 21232 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 03:40:25 +00:00
ami_stuff a4be782cbd Support 2Vuy in mov, fixes issue 1690.
Patch by ami_stuff, ami_stuff o2 pl

Originally committed as revision 21230 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 00:32:09 +00:00
Måns Rullgård 2b9cb7ec71 Fix out of tree build with hardcoded tables
Originally committed as revision 21228 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 20:48:34 +00:00
Måns Rullgård d356a53f44 AAC: optimise bitstream reading in decode_spectrum_and_dequant()
Using the low-level macros directly avoids redundant open/update/close
cycles.

2-3% faster on ARM, PPC, and Core i7.

Originally committed as revision 21224 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 14:02:52 +00:00
Carl Eugen Hoyos 59ea69ef54 Support decoding of Avid uncompressed mov files, fixes issue 1685.
Originally committed as revision 21223 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 11:03:40 +00:00
Carl Eugen Hoyos a0ae3e41f3 Support decoding Avid 1:1x codec, (partially) fixes issue1684.
Originally committed as revision 21222 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 10:55:31 +00:00
Michael Niedermayer 7c2de274e7 Add forgotten include of h264_mvpred.h to h264.h.
This could have caused the linking failure of pred_pskip_motion() missing if
a compiler included never used static functions.

Originally committed as revision 21221 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 03:42:56 +00:00
Michael Niedermayer e2dd8586d8 Add forgotton multiple inclusion guards to h264_mvpred.h.
Originally committed as revision 21220 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 03:41:28 +00:00
Måns Rullgård 798339fb46 AAC: ARM/NEON asm for VMUL2/4 functions
Originally committed as revision 21219 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 02:58:24 +00:00
Carl Eugen Hoyos c78dfcdaf4 Do not assign codec_tag to pix_fmt in rawdec.c, but in raw.c
Originally committed as revision 21218 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 00:45:47 +00:00
Reimar Döffinger 29b75f0b67 Change code so it uses 2 adds instead of one FFABS.
About 1% faster ff_ac3_bit_alloc_calc_psd on Intel Atom, overall speedup
not measurable though.
Should have a bigger effect on systems without cmov or with very slow cmov.

Originally committed as revision 21214 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-14 17:50:33 +00:00
Alexander Strange f267d3ac75 Implement alpha channel decoding for BGR HuffYUV.
Since BGR24 is decoded as BGR32, fill its alpha channel with 255
using the appropriate predictors.

Originally committed as revision 21211 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-14 01:32:49 +00:00
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