summaryrefslogtreecommitdiff
path: root/libavcodec/cabac_functions.h
Commit message (Collapse)AuthorAge
* avcodec: [loongson] optimize get_cabac_inline.Shiyou Yin2018-09-19
| | | | | | This optimization improved h264 decoding performance about 4%(from 74fps to 77fps, tested on loongson 3A3000). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '29c2d06d67724e994980045afa055c6c34611b30'Derek Buitenhuis2016-02-24
|\ | | | | | | | | | | | | * commit '29c2d06d67724e994980045afa055c6c34611b30': cosmetics: Drop empty comment lines Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * cosmetics: Drop empty comment linesDiego Biurrun2016-02-18
| |
| * cabac: Make CABAC states hardcodedAnton Khirnov2015-10-08
| | | | | | | | | | | | | | There is not much reason to generate such a small table at runtime. Signed-off-by: Derek Buitenhuis <derekb@vimeo.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | cabac_functions: Allow more functions to be overriddenJohn Cox2016-01-22
| | | | | | | | | | | | | | Allow more of the cabac functions to be overridden and avoid generating any code for unwanted refill functions. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | cabac_functions: Count zeros with ctz if it is fastJohn Cox2016-01-22
| | | | | | | | | | | | | | When refilling the low bit buffer after get_cabac count the bits with ctz if the processor has a fast version. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/cabac: Check initial cabac decoder stateMichael Niedermayer2015-11-27
| | | | | | | | | | | | | | | | | | Fixes integer overflows Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2340_591e9810c7b09efe501ad84638c9e9f8.264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Found-by: xiedingbao (Ticket4727) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/cabac_functions: Fix "left shift of negative value -31767"Michael Niedermayer2015-11-27
| | | | | | | | | | | | | | | | Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2340_591e9810c7b09efe501ad84638c9e9f8.264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Found-by: xiedingbao (Ticket4727) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | cabac: Make cabac starts hardcodedAnton Khirnov2015-10-10
| | | | | | | | | | | | There's not much reason to generate such a small table at runtime. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Revert "cabac: Allow hardcoding CABAC table."Derek Buitenhuis2015-10-10
| | | | | | | | | | | | | | | | This becomes unuseful in the following commit. This reverts commit 092d1977cc7146f20c8db2155e7d648afb300de7. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avcodec/cabac_functions: fix "warning: UNCHECKED_BITSTREAM_READER is not ↵Michael Niedermayer2014-09-08
| | | | | | | | | | | | defined, evaluates to 0" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cabac: Allow hardcoding CABAC table.Reimar Döffinger2014-09-06
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit '634d9d8b398982647b3d7160641198744901d8d8'Michael Niedermayer2014-03-09
|\| | | | | | | | | | | | | * commit '634d9d8b398982647b3d7160641198744901d8d8': arm: get_cabac inline asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * arm: get_cabac inline asmJanne Grunau2014-03-09
| | | | | | | | | | | | | | | | | | | | Based on the aarch64 asm. CPU cycle counts on cortex-a9 compared to gcc 4.8.2: before: 475 decicycles in get_cabac_noinline, 67106035 runs, 2829 skips after: 393 decicycles in get_cabac_noinline, 67106474 runs, 2390 skips Overall speedup is above 2%. Code generated by clang 3.4 is slower on the same hardware and the relative change is a little larger.
* | Merge commit 'dfe224f377be3e45758c69d881ca7874b82d647a'Michael Niedermayer2014-03-09
|\| | | | | | | | | | | | | * commit 'dfe224f377be3e45758c69d881ca7874b82d647a': aarch64: get_cabac inline asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aarch64: get_cabac inline asmJanne Grunau2014-03-09
| | | | | | | | | | | | | | 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().
| * Add HEVC decoderGuillaume Martres2013-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially written by Guillaume Martres <smarter@ubuntu.com> as a GSoC project. Further contributions by the OpenHEVC project and other developers, namely: Mickaël Raulet <mraulet@insa-rennes.fr> Seppo Tomperi <seppo.tomperi@vtt.fi> Gildas Cocherel <gildas.cocherel@laposte.net> Khaled Jerbi <khaled_jerbi@yahoo.fr> Wassim Hamidouche <wassim.hamidouche@insa-rennes.fr> Vittorio Giovara <vittorio.giovara@gmail.com> Jan Ekström <jeebjp@gmail.com> Anton Khirnov <anton@khirnov.net> Martin Storsjö <martin@martin.st> Luca Barbato <lu_zero@gentoo.org> Yusuke Nakamura <muken.the.vfrmaniac@gmail.com> Reimar Döffinger <Reimar.Doeffinger@gmx.de> Diego Biurrun <diego@biurrun.de> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec/cabac: support UNCHECKED_BITSTREAM_READER = 0Michael Niedermayer2013-10-31
| | | | | | | | | | | | | | | | | | | | | | Fixes overreads in HEVC Fixes Ticket3070 Also fixed remaining issues from Ticket3075 and Ticket3076 Some lines of code taken from 0c5f839693da2276c2da23400f67a67be4ea0af1:libavcodec/x86/cabac.h and 0c5f839693da2276c2da23400f67a67be4ea0af1:libavcodec/cabac_functions.h Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: add a HEVC decoder.Guillaume Martres2013-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially written by Guillaume Martres <smarter@ubuntu.com> as a GSoC project. Further contributions by the OpenHEVC project and other developers, namely: Mickaël Raulet <mraulet@insa-rennes.fr> Seppo Tomperi <seppo.tomperi@vtt.fi> Gildas Cocherel <gildas.cocherel@laposte.net> Khaled Jerbi <khaled_jerbi@yahoo.fr> Wassim Hamidouche <wassim.hamidouche@insa-rennes.fr> Vittorio Giovara <vittorio.giovara@gmail.com> Jan Ekström <jeebjp@gmail.com> Anton Khirnov <anton@khirnov.net> Martin Storsjö <martin@martin.st> Luca Barbato <lu_zero@gentoo.org> Yusuke Nakamura <muken.the.vfrmaniac@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e6d8acf6a8fba4743eb56eabe72a741d1bbee3cb'Michael Niedermayer2013-07-05
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e6d8acf6a8fba4743eb56eabe72a741d1bbee3cb': indeo: use a typedef for the mc function pointer cabac: x86 version of get_cabac_bypass aic: use chroma scan tables while decoding luma component in progressive mode Conflicts: libavcodec/aic.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cabac: x86 version of get_cabac_bypassJason Garrett-Glaser2013-07-04
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * 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>
* | 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: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: asf: only set index_read if the index contained entries. cabac: add overread protection to BRANCHLESS_GET_CABAC(). cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE(). cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC(). h264: add overread protection to get_cabac_bypass_sign_x86(). h264: reindent get_cabac_bypass_sign_x86(). h264: use struct offsets in get_cabac_bypass_sign_x86(). h264: fix overreads in cabac reader. wmall: fix seeking. lagarith: fix buffer overreads. dvdec: drop unnecessary dv_tablegen.h #include build: fix doc generation errors in parallel builds Replace memset(0) by zero initializations. faandct: Remove FAAN_POSTSCALE define and related code. dvenc: print allowed profiles if the video doesn't conform to any of them. avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size. FATE: add a test for vp8 with changing frame size. fate: add kgv1 fate test. oggdec: calculate correct timestamps in Ogg/FLAC Conflicts: libavcodec/4xm.c libavcodec/cook.c libavcodec/dvdata.c libavcodec/dvdsubdec.c libavcodec/lagarith.c libavcodec/lagarithrac.c libavcodec/utils.c tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: fix overreads in cabac reader.Ronald S. Bultje2012-03-28
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | cabac_functions: fix license header, this wasnt developed in libavMichael Niedermayer2012-01-14
|/ | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* cabac: split cabac.h into declarations and function definitionsDiego Biurrun2012-01-12
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.