Commit Graph

138 Commits

Author SHA1 Message Date
Janne Grunau
dfe224f377 aarch64: get_cabac inline asm
Based on the x86 branchless get_cabac asm. get_cabac_noinline() gets
approximately 20% faster (no cycle counts available) compared to clang
from Xcode 5.1 beta5. More than 6% faster overall. A part of the overall
speedup might be explained by additional inlining of get_cabac().
2014-03-09 00:45:33 +01:00
Janne Grunau
8b4119187b cabac: remove leftovers from the cabac encoder
The cabac encoder was only used by the removed cabac test.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-01-14 22:19:03 +01:00
Michael Niedermayer
0fe4b48540 cabac: remove unused argument of ff_init_cabac_states()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-13 09:14:05 +01:00
Roland Scheidegger
14e9ffc1e4 h264: use one table instead of several for cabac functions
The reason is this is easier for PIC code (in particular on darwin...).
Keep the old names as pointers (static in cabac_functions.h so gcc
knows these are just immediate offsets) so the c code can nicely stay the same
(alternatively could use offsets directly in the functions needing the
tables). This should produce the same code as before with non-pic and better
code (confirmed) with pic.

The assembly uses the new table but still won't work for PIC case.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-04-28 08:26:12 -07:00
Diego Biurrun
55b9ef18e4 cabac: split cabac.h into declarations and function definitions
This fixes standalone compilation of some decoders with --disable-optimizations.
cabac.h defines some inline functions that use symbols from cabac.c.  Without
optimizations these inline functions are not eliminated and linking fails with
references to non-existing symbols.

Splitting the inline functions off into their own header and only #including
it in the places where the inline functions are used allows #including cabac.h
from anywhere without ill effects.
2012-01-12 23:08:23 +01:00
Diego Biurrun
0a60780c7f cabac: Mark ff_h264_mps_state array as static, it is only used within cabac.c. 2012-01-12 22:57:42 +01:00
Diego Biurrun
64d779f2f7 cabac: Remove ff_h264_lps_state array.
It was only ever used in the cabac test program, but never initialized.
2012-01-12 22:54:24 +01:00
Diego Biurrun
badb195d13 cabac: Move code only used within the CABAC test program into the test program. 2012-01-07 22:13:14 +01:00
Diego Biurrun
3aa3fc45fe cabac: remove unused function renorm_cabac_decoder 2012-01-06 13:37:55 +01:00
Diego Biurrun
9dec55748c cabac: drop unused and disabled get_cabac_u() / get_cabac_ueg() functions 2012-01-04 01:09:54 +01:00
Diego Biurrun
e451c26c5f cabac: drop unused STRICT_LIMITS code branch 2012-01-04 01:09:53 +01:00
Diego Biurrun
fd065d3e79 cabac: Move code only used in the cabac test program to cabac.c. 2011-07-17 12:56:42 +02:00
Mans Rullgard
2143d69bdd cabac: move x86 asm to libavcodec/x86/cabac.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:31 +01:00
Mans Rullgard
3146a30e61 x86: cabac: change 'a' constraint to 'r' in get_cabac_inline()
Nothing requires this value in %eax.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
f743595e87 x86: cabac: remove hardcoded esi in get_cabac_inline()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
da3af4db61 x86: cabac: remove hardcoded edx in get_cabac_inline()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
51f16a9bf2 x86: cabac: remove unused macro parameter
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
018c33838e x86: cabac: remove hardcoded ebx in inline asm
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
6b712acc0e x86: cabac: remove hardcoded struct offsets from inline asm
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
34ee43fc0f cabac: remove inline asm under #if 0
A comment says it's not faster than the C code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:30 +01:00
Mans Rullgard
8fcc0e7978 cabac: remove BRANCHLESS_CABAC_DECODER switch
The code does not compile without this set.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:29 +01:00
Mans Rullgard
eaa2d5a90a cabac: remove #if 0 cascade under never-set #ifdef ARCH_X86_DISABLED
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-20 22:36:29 +01:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Reimar Döffinger
f2d702e109 Replace #ifdef PIC checks with the more appropriate HAVE_EBX_AVAILABLE/HAVE_7REGS.
Originally committed as revision 19676 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-21 09:54:28 +00:00
Stefano Sabatini
b275500706 Split bitstream.h, put the bitstream writer stuff in the new file
put_bits.h.

Originally committed as revision 18461 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-12 08:35:26 +00:00
Diego Biurrun
bad5537e2c Use full internal pathname in doxygen @file directives.
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.

Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-01 02:00:19 +00:00
Aurelien Jacobs
b250f9c66d Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.

Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-13 23:44:16 +00:00
Diego Pettenò
be449fca79 Convert asm keyword into __asm__.
Neither the asm() nor the __asm__() keyword is part of the C99
standard, but while GCC accepts the former in C89 syntax, it is not
accepted in C99 unless GNU extensions are turned on (with -fasm). The
latter form is accepted in any syntax as an extension (without
requiring further command-line options).

Sun Studio C99 compiler also does not accept asm() while accepting
__asm__(), albeit reporting warnings that it's not valid C99 syntax.

Originally committed as revision 15627 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-16 13:34:09 +00:00
Diego Biurrun
3fe5ae2b3a Remove useless #ifdef around #include.
Originally committed as revision 15329 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-14 22:18:50 +00:00
Diego Biurrun
ab21090869 Silence a couple of 'defined but not used' warnings by adding an av_unused
attribute to the relevant function declarations.

Originally committed as revision 15161 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-02 23:14:11 +00:00
Stefano Sabatini
987903826b Globally rename the header inclusion guard names.
Consistently apply this rule: the guard name is obtained from the
filename by stripping the leading "lib", converting '/' and '.'  to
'_' and uppercasing the resulting name. Guard names in the root
directory have to be prefixed by "FFMPEG_".

Originally committed as revision 15120 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-31 07:39:47 +00:00
Diego Biurrun
245976da2a Use full path for #includes from another directory.
Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-05-09 11:56:36 +00:00
Jeff Downs
52cb7981e2 Redo r12838, this time using svn copy to create h264_i386.h from cabac.h.
Move decode_significance_x86() and decode_significance_8x8_x86() to
i386-specific file from cabac.h.
New file is h264-oriented and only included from h264.c
Resolves compilation when configured with --disable-optimizations due to
decode_significance_8x8_x86 using last_coeff_flag_offset_8x8, which is
only defined in h264.c

Originally committed as revision 12846 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-16 04:40:21 +00:00
Jeff Downs
3aa9ede400 Revert 12838 to redo it the right way (use svn copy to create new
file based on old).

Originally committed as revision 12845 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-16 04:26:52 +00:00
Jeff Downs
e6cfd8fffb Move decode_significance_x86() and decode_significance_8x8_x86() to
i386-specific file from cabac.h.
New file is h264-oriented and only included from h264.c
Resolves compilation when configured with --disable-optimizations due to
decode_significance_8x8_x86 using last_coeff_flag_offset_8x8, which is
only defined in h264.c

Originally committed as revision 12838 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-15 13:51:41 +00:00
Måns Rullgård
ea68e33469 cosmetics: remove useless \-newline escapes
Originally committed as revision 12479 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-03-17 21:00:30 +00:00
Reimar Döffinger
7e14b8082d Use cltd instead of cdq asm mnemonic, ICC and gcc support both, but
SunStudio 12 only supports the former.

Originally committed as revision 12275 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-28 17:01:35 +00:00
Diego Biurrun
c46e28746c Put some disabled functions that are only used in the test program in cabac.c
under TEST as preprocessor conditional, same as the test program.

Originally committed as revision 11601 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-01-23 10:19:39 +00:00
Reimar Döffinger
5db3c3bc03 Add missing const to last argument of decode_significance_8x8_x86.
Fixes "h264.c:5470: warning: passing argument 4 of 'decode_significance_8x8_x86' discards qualifiers from pointer target type"

Originally committed as revision 11135 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-12-02 21:11:43 +00:00
Diego Biurrun
5b21bdabe4 Add FFMPEG_ prefix to all multiple inclusion guards.
Originally committed as revision 10765 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-10-17 09:37:46 +00:00
Diego Biurrun
1084771ac0 10l: refill2() is not unused, it is used conditionally.
Fix the preprocessor directives to enable refill2() only when the
conditions under which it is used apply.

Originally committed as revision 10715 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-10-12 09:38:34 +00:00
Diego Biurrun
0f26eec23e Disable unused code; fixes several gcc warnings:
cabac.h:112: warning: ‘put_cabac_static’ defined but not used
cabac.h:158: warning: ‘put_cabac_terminate’ defined but not used
cabac.h:186: warning: ‘put_cabac_u’ defined but not used
cabac.h:221: warning: ‘put_cabac_ueg’ defined but not used
cabac.h:273: warning: ‘refill2’ defined but not used
cabac.h:811: warning: ‘get_cabac_u’ defined but not used
cabac.h:827: warning: ‘get_cabac_ueg’ defined but not used

Originally committed as revision 10713 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-10-12 08:43:23 +00:00
Diego Biurrun
b1ef3dfd2b 100l: Revert accidental commit, restore previous version.
Originally committed as revision 10644 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-10-02 13:14:37 +00:00
Diego Biurrun
eee947487b Replace CONFIG_VORBIS_DECODER #ifdef by if (ENABLE_VORBIS_DECODER).
Blessed by Luca Barbato on IRC.

Originally committed as revision 10642 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-10-02 12:34:43 +00:00
Diego Biurrun
1fe2d0fd1a cosmetics: typo
Originally committed as revision 10507 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-09-16 16:23:34 +00:00
Ramiro Polla
c8f9ef613e CONFIG_7REGS -> HAVE_7REGS
Originally committed as revision 10121 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-08-15 21:19:13 +00:00
Diego Biurrun
df3a80b50a cosmetics: misc typo fixes
Originally committed as revision 9815 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-28 12:46:26 +00:00
Diego Biurrun
e5a389a1b7 license header consistency cosmetics
Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-07-05 10:40:25 +00:00
Diego Biurrun
755bfeabcc misc spelling fixes
Originally committed as revision 9289 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-06-12 09:29:25 +00:00