Statistics
| Branch: | Revision:

ffmpeg / libavcodec / cabac.h @ bb54f6ab

History | View | Annotate | Download (28.3 KB)

# Date Author Comment
d55f46e5 11/01/2006 05:18 PM Reimar Döffinger

Reenable AMD64 optimizations for cabac accidentially disabled in r6852

Originally committed as revision 6853 to svn://svn.ffmpeg.org/ffmpeg/trunk

419b8784 11/01/2006 05:01 PM Diego Biurrun

Add ARCH_X86_32 as a new define for 32 bit x86 architectures and change
the semantics of ARCH_X86 to mean both 32 and 64 bits.

Originally committed as revision 6852 to svn://svn.ffmpeg.org/ffmpeg/trunk

d5cd50ed 10/29/2006 01:14 PM Diego Biurrun

Fix compilation with PIC enabled, BRANCHLESS_GET_CABAC is defined under
!PIC but gets used without a check for !PIC.

Originally committed as revision 6834 to svn://svn.ffmpeg.org/ffmpeg/trunk

755073fe 10/23/2006 04:54 PM Reimar Döffinger

CABAC assembler optimizations ported to AMD64

Originally committed as revision 6776 to svn://svn.ffmpeg.org/ffmpeg/trunk

e08f5806 10/20/2006 09:34 PM Michael Niedermayer

decode_significance_8x8_x86()
8% faster decode_cabac_residual() (8x8 case only) on P3

Originally committed as revision 6750 to svn://svn.ffmpeg.org/ffmpeg/trunk

94e4c3a3 10/20/2006 05:53 PM Guillaume Poirier

Protect code that uses CMOV instructions with HAVE_CMOV,
Make configure set CMOV_IS_FAST on arches on which cmov has a low latency
(typically non-Netburst based processor)

Originally committed as revision 6749 to svn://svn.ffmpeg.org/ffmpeg/trunk

849a5004 10/20/2006 10:00 AM Michael Niedermayer

another instruction less in decode_significance_x86() -> 1% faster ion P3

Originally committed as revision 6745 to svn://svn.ffmpeg.org/ffmpeg/trunk

d3e7c5c3 10/20/2006 08:46 AM Michael Niedermayer

1 instruction less

Originally committed as revision 6743 to svn://svn.ffmpeg.org/ffmpeg/trunk

a616db28 10/20/2006 12:51 AM Michael Niedermayer

reordering instructions a little in decode_significance_x86() -> 2 instructions less / 1% faster decode_residual on P3

Originally committed as revision 6741 to svn://svn.ffmpeg.org/ffmpeg/trunk

13404b2e 10/20/2006 12:35 AM Michael Niedermayer

factorize get_cabac asm (0.5% slower but its much cleaner)

Originally committed as revision 6740 to svn://svn.ffmpeg.org/ffmpeg/trunk

ba9fb5da 10/19/2006 08:24 PM Bernhard Rosenkränzer

Fix PIC compilation, some defines were under #ifdef !PIC but used
in the PIC case nevertheless.
patch by Bernhard Rosenkranzer, bero arklinux org

Originally committed as revision 6738 to svn://svn.ffmpeg.org/ffmpeg/trunk

d72bc323 10/19/2006 06:22 PM Michael Niedermayer

unused variable

Originally committed as revision 6737 to svn://svn.ffmpeg.org/ffmpeg/trunk

ebd624b6 10/19/2006 01:19 AM Michael Niedermayer

optimize sign decoding code in decode_residual()
x86 is 4% faster on P3
C sign stuff + x86 code for everything else is also faster then before (sorry forgot to test pure C)
... and if i replace the second occurance of the sign decoding in decode_residual by the asm too then everything gets slower iam starting to think that it might be best to write the whole function in asm, playing this avoid random deoptimizations game with gcc is not fun at all...

a0f2c6ba 10/18/2006 09:37 AM Jindřich Makovička

Kill a warning with MSVC
Patch by Jindrich Makovicka makovick A gmail P com
Original thread:
Date: 08:21 AM
Subject Re: [Ffmpeg-devel] Weird line in cabac.h

Originally committed as revision 6726 to svn://svn.ffmpeg.org/ffmpeg/trunk

eb73bf72 10/17/2006 10:18 PM Michael Niedermayer

x86 asm version of the decode significance loop (not 8x8) of decode_residual() 5% faster decode_residual() on P3

Originally committed as revision 6724 to svn://svn.ffmpeg.org/ffmpeg/trunk

4041a495 10/17/2006 09:38 AM Michael Niedermayer

cosmetic (%%eax->%0)

Originally committed as revision 6717 to svn://svn.ffmpeg.org/ffmpeg/trunk

8dda3e79 10/16/2006 09:47 PM Diego Biurrun

Fix crash with illegal instruction, cmov is available on 686 and later only.

Originally committed as revision 6715 to svn://svn.ffmpeg.org/ffmpeg/trunk

e962604f 10/16/2006 09:22 PM Diego Biurrun

Expand some #endif comments.

Originally committed as revision 6714 to svn://svn.ffmpeg.org/ffmpeg/trunk

165c5f09 10/16/2006 11:11 AM Michael Niedermayer

fix !CMOV_IS_FAST case (iam not really happy with the fix but i didnt come up with a better one quickly)

Originally committed as revision 6707 to svn://svn.ffmpeg.org/ffmpeg/trunk

1d7c1118 10/15/2006 09:04 PM Michael Niedermayer

10l

Originally committed as revision 6704 to svn://svn.ffmpeg.org/ffmpeg/trunk

faff3a7a 10/15/2006 08:50 PM Michael Niedermayer

this code will not work with PIC as it needs 7 registers and gcc doesnt support that in PIC

Originally committed as revision 6703 to svn://svn.ffmpeg.org/ffmpeg/trunk

f24a5159 10/15/2006 08:40 PM Michael Niedermayer

shift CABACContext.range right, this reduces the number of shifts needed in get_cabac() and is slightly faster on P3 (and should be much faster on P4 as the P4 except the more recent variants lacks an integer shifter and so shifts have ~10 times longer latency then simple operations like adds)...

68a205ed 10/13/2006 02:21 PM Michael Niedermayer

dehack *ps_state indexing in the branchless decoder

Originally committed as revision 6683 to svn://svn.ffmpeg.org/ffmpeg/trunk

12ff5b0f 10/12/2006 09:32 PM Michael Niedermayer

add "memory" to the clobber list we change memory so we need it, this also fixes some problems with gcc svn

Originally committed as revision 6679 to svn://svn.ffmpeg.org/ffmpeg/trunk

851ded89 10/12/2006 02:49 PM Michael Niedermayer

prevent "mb level" get_cabac() calls from being inlined (3% faster decode_mb_cabac() on P3)

Originally committed as revision 6674 to svn://svn.ffmpeg.org/ffmpeg/trunk

a0490b32 10/12/2006 07:51 AM Guillaume Poirier

adds some useful comments after some of the #else, #elseif,
#endif preprocessor directives to make it clearer which code
block depends on which #define xx

Originally committed as revision 6668 to svn://svn.ffmpeg.org/ffmpeg/trunk

c26abfa5 10/11/2006 11:17 PM Diego Biurrun

Rename ABS macro to FFABS.

Originally committed as revision 6666 to svn://svn.ffmpeg.org/ffmpeg/trunk

1f4d5e9f 10/11/2006 05:59 PM Michael Niedermayer

slightly faster on P3 slightly slower on athlon and probably faster on P4

Originally committed as revision 6663 to svn://svn.ffmpeg.org/ffmpeg/trunk

2b5269b5 10/11/2006 04:39 PM Michael Niedermayer

moving lps state transition code a little up in the branched asm code (1% faster on P3)

Originally committed as revision 6658 to svn://svn.ffmpeg.org/ffmpeg/trunk

b99f3cab 10/11/2006 04:11 PM Michael Niedermayer

write cabac low and range variables as early as possible to prevent stalls from reading them before they where written, the P4 is said to disslike that alot, on P3 its 2% faster (START/STOP_TIMER over decode_residual)

Originally committed as revision 6657 to svn://svn.ffmpeg.org/ffmpeg/trunk

d17faef0 10/11/2006 03:20 PM Michael Niedermayer

use ecx instead of cl (no speed change on P3 but might avoid partial register stalls on some cpus)

Originally committed as revision 6656 to svn://svn.ffmpeg.org/ffmpeg/trunk

d61c4e73 10/11/2006 02:44 PM Michael Niedermayer

make state transition tables global as they are constant and the code is slightly faster that way

Originally committed as revision 6655 to svn://svn.ffmpeg.org/ffmpeg/trunk

5f3eca12 10/11/2006 01:25 PM Michael Niedermayer

10l

Originally committed as revision 6654 to svn://svn.ffmpeg.org/ffmpeg/trunk

0fa352c7 10/11/2006 01:21 PM Michael Niedermayer

make lps_range a global table its constant anyway (saves 1 addition for accessing it)

Originally committed as revision 6653 to svn://svn.ffmpeg.org/ffmpeg/trunk

3650b439 10/11/2006 12:23 PM Michael Niedermayer

enable CMOV_IS_FAST as its faster or equal speed on every cpu (duron, athlon, PM, P3) from which ive seen benchmarks, it might be slower on P4 but noone has posted benchmarks ...

Originally committed as revision 6652 to svn://svn.ffmpeg.org/ffmpeg/trunk

0bc2e7f0 10/10/2006 08:16 AM Diego Biurrun

BRANCHLESS_CABAD --> BRANCHLESS_CABAC_DECODER

Originally committed as revision 6623 to svn://svn.ffmpeg.org/ffmpeg/trunk

9ed92c65 10/10/2006 06:56 AM Michael Niedermayer

moving another bit&1 out, this is as fast as with it in there, but it makes more sense with it outside of the loop

Originally committed as revision 6618 to svn://svn.ffmpeg.org/ffmpeg/trunk

f1b37db4 10/10/2006 01:17 AM Michael Niedermayer

move the &1 out of the asm so gcc can optimize it away in inlined cases (yes this is slightly faster)

Originally committed as revision 6616 to svn://svn.ffmpeg.org/ffmpeg/trunk

ab0151d1 10/10/2006 01:08 AM Michael Niedermayer

replace a few and/sub/... by cmov
this is faster on P3, should be faster on AMD, and should be slower on P4
its disabled by default (benchmarks welcome so we know when to enable it)

Originally committed as revision 6615 to svn://svn.ffmpeg.org/ffmpeg/trunk

a6672acf 10/09/2006 09:57 PM Michael Niedermayer

reading 8bit mem into a 8bit register needs 2 uops on P4, 8bit->32bit with zero extension needs just 1

Originally committed as revision 6612 to svn://svn.ffmpeg.org/ffmpeg/trunk

2d3df05c 10/09/2006 09:39 PM Michael Niedermayer

on the P4 inc needs twice as much time a add

Originally committed as revision 6611 to svn://svn.ffmpeg.org/ffmpeg/trunk

2ee9dc65 10/09/2006 09:21 PM Michael Niedermayer

10l

Originally committed as revision 6610 to svn://svn.ffmpeg.org/ffmpeg/trunk

7822e1c1 10/09/2006 09:14 PM Michael Niedermayer

reverse remainder of the failed attempt to optimize *state=c->mps_state[s]

Originally committed as revision 6609 to svn://svn.ffmpeg.org/ffmpeg/trunk

ef0090a9 10/09/2006 08:51 PM Michael Niedermayer

x86 branchless cabac decoder
slightly faster on P3

Originally committed as revision 6608 to svn://svn.ffmpeg.org/ffmpeg/trunk

2e1aee80 10/09/2006 08:44 PM Michael Niedermayer

optimize branchless C CABAC decoder

Originally committed as revision 6607 to svn://svn.ffmpeg.org/ffmpeg/trunk

1c2a417f 10/09/2006 06:20 PM Michael Niedermayer

move outcommented START/STOP_TIMER to a hopefully better place for benchmarking ...

Originally committed as revision 6605 to svn://svn.ffmpeg.org/ffmpeg/trunk

30dc5f56 10/09/2006 03:52 PM Michael Niedermayer

drop failed attempt to optimize *state= c->mps_state[s];

Originally committed as revision 6604 to svn://svn.ffmpeg.org/ffmpeg/trunk

c56d23da 10/09/2006 02:15 PM Michael Niedermayer

10l bugfix for some disabled code

Originally committed as revision 6603 to svn://svn.ffmpeg.org/ffmpeg/trunk

f7d0b683 10/09/2006 02:15 PM Michael Niedermayer

first try of a handwritten get_cabac() for x86, this is 10-20% faster on P3 depening on if you try to subtract the START/STOP_TIMER overhead

Originally committed as revision 6602 to svn://svn.ffmpeg.org/ffmpeg/trunk

5bbe2a52 10/09/2006 12:25 PM Michael Niedermayer

remove bytestream_end checks, seems to work fine without them and the bitstream reader doesnt check for the end either

Originally committed as revision 6599 to svn://svn.ffmpeg.org/ffmpeg/trunk

c010d69a 10/09/2006 12:59 AM Michael Niedermayer

decrease ff_h264_norm_shift[] size

Originally committed as revision 6596 to svn://svn.ffmpeg.org/ffmpeg/trunk

6ff04269 10/08/2006 09:26 PM Michael Niedermayer

cleanup

Originally committed as revision 6594 to svn://svn.ffmpeg.org/ffmpeg/trunk

260ceb63 10/08/2006 01:20 PM Michael Niedermayer

branchless renormalization (1% faster get_cabac) old branchless renormalization wasnt faster because gcc was scared of the shift variable (missusing bit variable now)

Originally committed as revision 6587 to svn://svn.ffmpeg.org/ffmpeg/trunk

99ce1087 10/08/2006 11:24 AM Michael Niedermayer

5% faster get_cabac()

Originally committed as revision 6586 to svn://svn.ffmpeg.org/ffmpeg/trunk

400d0f8e 10/07/2006 10:37 PM Michael Niedermayer

disable benchmarking code
disable asm optims as the fastest depends on cpu type

Originally committed as revision 6582 to svn://svn.ffmpeg.org/ffmpeg/trunk

4310580d 10/07/2006 10:34 PM Michael Niedermayer

renorm_cabac_decoder_once START/STOP_TIMER scores for athlon

Originally committed as revision 6581 to svn://svn.ffmpeg.org/ffmpeg/trunk

5659b509 10/07/2006 03:44 PM Michael Niedermayer

refill cabac variables in 16bit steps, 3% faster get_cabac()

Originally committed as revision 6578 to svn://svn.ffmpeg.org/ffmpeg/trunk

b78e7197 10/07/2006 03:30 PM Diego Biurrun

Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk

2ae7569d 10/07/2006 12:41 PM Michael Niedermayer

() 10l

Originally committed as revision 6576 to svn://svn.ffmpeg.org/ffmpeg/trunk

ec8f483a 10/07/2006 11:15 AM Michael Niedermayer

several x86 renorm_cabac_decoder_once optimizations
START/STOP_TIMER benchmarking code for them
please benchmark on P4 & athlon
(ill remove the benchmarking code and the always slower variants as soon as p4/athlon benchmarks have been posted or commited)
...

938dd846 10/04/2006 07:16 AM Loren Merritt

don't try to inline cabac functions. gcc ignored the hint anyway, and forcing it would make h264 slower.

Originally committed as revision 6549 to svn://svn.ffmpeg.org/ffmpeg/trunk

bfe328ca 08/27/2006 09:19 AM Loren Merritt

tweak cabac. 0.5% faster h264.

Originally committed as revision 6106 to svn://svn.ffmpeg.org/ffmpeg/trunk

2848ce84 04/29/2006 12:43 AM Loren Merritt

don't force asserts in release builds. 2% faster h264.

Originally committed as revision 5332 to svn://svn.ffmpeg.org/ffmpeg/trunk

5509bffa 01/12/2006 10:43 PM Diego Biurrun

Update licensing information: The FSF changed postal address.

Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk

115329f1 12/17/2005 06:14 PM Diego Biurrun

COSMETICS: Remove all trailing whitespace.

Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk

6d1feb02 05/29/2005 06:18 PM Loren Merritt

decode h264 end-of-slice flag

Originally committed as revision 4316 to svn://svn.ffmpeg.org/ffmpeg/trunk

88730be6 02/24/2005 07:08 PM Måns Rullgård

kill warnings patch by (Måns Rullgård <mru inprovide com>)

Originally committed as revision 3977 to svn://svn.ffmpeg.org/ffmpeg/trunk

ec7eb896 10/26/2004 03:12 AM Michael Niedermayer

optimization

Originally committed as revision 3639 to svn://svn.ffmpeg.org/ffmpeg/trunk

bba83349 07/08/2004 12:53 AM Michael Niedermayer

overread fix

Originally committed as revision 3294 to svn://svn.ffmpeg.org/ffmpeg/trunk

e96682e6 05/18/2004 05:09 PM Michael Niedermayer

some of the warning fixes by (Michael Roitzsch <mroi at users dot sourceforge dot net>)

Originally committed as revision 3140 to svn://svn.ffmpeg.org/ffmpeg/trunk

b46243ed 02/06/2004 05:51 PM Alex Beregszaszi

get_bit_count -> put_bits_count

Originally committed as revision 2753 to svn://svn.ffmpeg.org/ffmpeg/trunk

7408ad05 06/09/2003 07:11 PM Michael Niedermayer

10l

Originally committed as revision 1940 to svn://svn.ffmpeg.org/ffmpeg/trunk

5e20f836 06/09/2003 02:24 AM Michael Niedermayer

FFV1 codec (our very simple lossless intra only codec, compresses much better then huffyuv)

Originally committed as revision 1939 to svn://svn.ffmpeg.org/ffmpeg/trunk

8f8c0800 06/06/2003 10:04 AM Michael Niedermayer

cleanup

Originally committed as revision 1932 to svn://svn.ffmpeg.org/ffmpeg/trunk

61ccfcc0 05/30/2003 01:05 AM Michael Niedermayer

(truncated) unary binerization
unary k-th order exp golomb binarization

Originally committed as revision 1920 to svn://svn.ffmpeg.org/ffmpeg/trunk

d592f67f 05/28/2003 06:44 PM Michael Niedermayer

CABAC
note, this is just the CABAC (de)coder not complete h264-cabac support

Originally committed as revision 1915 to svn://svn.ffmpeg.org/ffmpeg/trunk