summaryrefslogtreecommitdiff
path: root/libavcodec/x86/h264_i386.h
Commit message (Collapse)AuthorAge
* x86: cabac: allow building with sunccMans Rullgard2012-08-13
| | | | | | | | | | | | | | | | | | | | This fixes two issues preventing suncc from building this code. The undocumented 'a' operand modifier, causing gcc to omit a $ in front of immediate operands (as required in addresses), is not supported by suncc. Luckily, the also undocumented 'c' modifer has the same effect and is supported. On some asm statements with a large number of operands, suncc for no obvious reason fails to correctly substitute some of the operands. Fortunately, some of the operands in these statements are plain numbers which can be inserted directly into the code block instead of passed as operands. With these changes, the code builds correctly with both gcc and suncc. Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: place some inline asm under #if HAVE_INLINE_ASMRonald S. Bultje2012-06-25
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* h264: use asm cabac reader under a generic conditionMans Rullgard2012-06-23
| | | | | | | | This removes a dependency on implementation details from generic code and allows easy addition of the equivalent optimisation for other architectures than x86. Signed-off-by: Mans Rullgard <mans@mansr.com>
* h264: new assembly version of get_cabac for x86_64 with PICRoland Scheidegger2012-04-28
| | | | | | | | | | This adds a hand-optimized assembly version for get_cabac much like the existing one, but it works if the table offsets are RIP-relative. Compared to the non-RIP-relative version this adds 2 lea instructions and it needs one extra register. get_cabac() gets about 40% faster, for an overall speedup of about 5%. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* h264: use one table instead of several for cabac functionsRoland Scheidegger2012-04-28
| | | | | | | | | | | | | 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>
* cabac: add overread protection to BRANCHLESS_GET_CABAC().Ronald S. Bultje2012-03-28
| | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
* cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().Ronald S. Bultje2012-03-28
|
* cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().Ronald S. Bultje2012-03-28
|
* x86: Fix constraints for decode_significance*_x86Martin Storsjö2011-12-27
| | | | | | | | | | | | | | | | | | | Originally, prior to 8742a4ff8, the caller code was compiled within this condition: ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) Since HAVE_7REGS is defined as (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE)) the subcondition HAVE_7REGS && HAVE_EBX_AVAILABLE is equal to HAVE_7REGS (for 32 bit at least). The correct simplification of the original condition thus is HAVE_7REGS, not HAVE_EBX_AVAILABLE. This fixes compilation in some cases where HAVE_EBP_AVAILABLE = 0 and HAVE_EBX_AVAILABLE = 1. Signed-off-by: Martin Storsjö <martin@martin.st>
* x86: Tighten register constraints for decode_significance*_x86.Diego Biurrun2011-12-21
| | | | | | | On 32-bit OS X with gcc 4.0/4.2 and shared libraries enabled, the ebx register is not available, but required to assemble the functions. This reverts commit 8742a4f to a simplified version of the original constraints.
* x86: cabac: replace explicit memory references with "m" operandsMans Rullgard2011-12-11
| | | | | | | | This replaces the explicit offset(reg) memory references with "m" operands for the same locations. As a result, one fewer register operand is needed for these inline asm statements. Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: drop pointless ARCH_X86 #ifdef from files in x86 subdirectoryDiego Biurrun2011-11-08
|
* x86: cabac: add operand size suffixes missing from 6c32576Mans Rullgard2011-07-28
| | | | | | This fixes build with clang. Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: cabac: don't load/store context values in asmMans Rullgard2011-07-28
| | | | | | | | | | | Inspection of compiled code shows gcc handles these fine on its own. Benchmarking also shows no measurable speed difference. Removing the remaining cases in get_cabac_bypass_sign_x86() does cause more substantial changes to the compiled code with uncertain impact. Signed-off-by: Mans Rullgard <mans@mansr.com>
* H.264: optimize CABAC x86 asm for AtomJason Garrett-Glaser2011-07-28
|
* x86: cabac: fix register constraints for 32-bit modeMans Rullgard2011-06-20
| | | | | | | | Some operands need to be accessed in byte mode, which restricts the available registers in 32-bit mode. Using the 'q' constraint selects a suitable register. Signed-off-by: Mans Rullgard <mans@mansr.com>
* cabac: move x86 asm to libavcodec/x86/cabac.hMans Rullgard2011-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: h264: cast pointers to intptr_t rather than intMans Rullgard2011-06-20
| | | | | | | Only the low-order bits are used here so the type is not important, but this avoids a compiler warning. Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: h264: remove hardcoded edi in decode_significance_8x8_x86()Mans Rullgard2011-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: h264: remove hardcoded esi in decode_significance[_8x8]_x86()Mans Rullgard2011-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: h264: remove hardcoded edx in decode_significance[_8x8]_x86()Mans Rullgard2011-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: h264: remove hardcoded eax in decode_significance[_8x8]_x86()Mans Rullgard2011-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: cabac: remove hardcoded ebx in inline asmMans Rullgard2011-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: cabac: remove hardcoded struct offsets from inline asmMans Rullgard2011-06-20
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* 4:4:4 H.264 decoding supportJason Garrett-Glaser2011-06-13
| | | | Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
* Roll back 4:4:4 H.264 for nowJason Garrett-Glaser2011-06-13
| | | | Needs some ARM/PPC asm modifications.
* 4:4:4 H.264 decoding supportJason Garrett-Glaser2011-06-13
| | | | Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | 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
* Use full internal pathname in doxygen @file directives.Diego Biurrun2009-02-01
| | | | | | | 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
* Change semantic of CONFIG_*, HAVE_* and ARCH_*.Aurelien Jacobs2009-01-13
| | | | | | They are now always defined to either 0 or 1. Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename libavcodec/i386/ --> libavcodec/x86/.Diego Biurrun2008-12-22
It contains optimizations that are not specific to i386 and libavutil uses this naming scheme already. Originally committed as revision 16270 to svn://svn.ffmpeg.org/ffmpeg/trunk