summaryrefslogtreecommitdiff
path: root/libavcodec/on2avc.c
Commit message (Collapse)AuthorAge
* lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov2021-01-01
| | | | They are not properly namespaced and not intended for public use.
* avcodec/on2avc: Apply offset when initializing VLCAndreas Rheinhardt2020-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/on2avcdata: Combine tables for codebooksAndreas Rheinhardt2020-12-08
| | | | | | | Using one big table for the codebook symbols and lengths makes it possible to remove the pointers to the individual tables. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/on2avc: Use smaller tables for VLCsAndreas Rheinhardt2020-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | The On2 audio decoder uses huge tables to initialize VLC tables. These tables (mostly) use symbols tables in addition to the codes tables and the lengths tables. This commit makes the codes tables redundant and removes them: If all tables are permuted so that the codes are ordered from left to right in the Huffman tree, the codes become redundant and can be easily calculated at runtime from the lengths (via ff_init_vlc_from_lengths()); this also avoids sorting the codes in ff_init_vlc_sparse()*. The symbols tables are always 16bit, the codes tables are 32bit, 16bit or (rarely) 8bit, the lengths tables are always 8bit. Even though some symbols tables have been used twice (which is no longer possible now because different permutations need to be performed on the code tables sharing the same symbol table in order to order them from left to right), this nevertheless saves about 28KB. *: If the initializations of the VLCs are repeated 2048 times (interleaved with calls to free the VLCs which have not been timed), the number of decicycles spent on each round of initializations improves from 27669656 to 7356159. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/on2avc: Remove redundant code for freeingAndreas Rheinhardt2020-10-21
| | | | | | This decoder has the FF_CODEC_CAP_INIT_CLEANUP set. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/on2avc: Use least max_depth for get_vlc2()Andreas Rheinhardt2020-10-21
| | | | | | | | The longest codes of any VLC codebooks are 18 bits long and the VLC tables itself use 9 bits; therefore it is sufficient to read twice from the table, yet this has been done thrice. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/on2avc: Unify initializing quad and pair VLCsAndreas Rheinhardt2020-10-21
| | | | | | | | | | | | Up until now, quad VLCs are initialized with codes of type uint32_t, pair VLCs with codes of type uint16_t. There were two separate loops in the decoder's init function for each type of VLC. This commit unifies this: The type of the codes are now passed in as void * and the actual size of the codes is obtained from a table. This approach also allows to use the smallest type for each VLC code table: some quad tables actually fitted in uint16_t. This allows to remove about 7KB from the binary. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/on2avc: decoder supports init_cleanup capabilityPaul B Mahol2018-09-08
|
* avcodec/on2avc: add 0x500 stereo support and improve 0x500 mono supportPaul B Mahol2016-09-21
| | | | | | | 0x500 can be stereo. 0x500 mono can use extended window types. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '4f81f8dba735c212efae077c4fec8ad4fe53b352'Clément Bœsch2016-06-29
|\ | | | | | | | | | | | | * commit '4f81f8dba735c212efae077c4fec8ad4fe53b352': Drop unnecessary golomb.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Drop unnecessary golomb.h #includesDiego Biurrun2016-06-08
| |
* | Merge commit '197ae68e78784524a7ccf97a3c301092715305d3'Clément Bœsch2016-06-29
|\| | | | | | | | | | | | | * commit '197ae68e78784524a7ccf97a3c301092715305d3': Drop unnecessary unary.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Drop unnecessary unary.h #includesDiego Biurrun2016-06-08
| |
| * on2avc: limit number of bits to 30 in get_egolombAndreas Cadhalpun2016-01-13
| | | | | | | | | | | | | | | | | | | | More don't fit into the integer output. Also use get_bits_long, since get_bits only supports reading up to 25 bits, while get_bits_long supports the full integer range. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | all: move ff_exp10, ff_exp10f, ff_fast_powf to lavu/ffmath.hGanesh Ajjanagadde2016-03-22
| | | | | | | | | | | | | | | | | | | | | | The idea is to use ffmath.h for internal implementations of math functions. Currently, it is used for variants of libm functions, but is by no means limited to such things. Note that this is not exported; use lavu/mathematics for such purposes. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
* | avcodec/on2avc: Fix stability issues with scale_tab generationMichael Niedermayer2015-12-27
| | | | | | | | | | This also simplifies the code the resulting values are binary identical to what pow(10, i/10.0) produces
* | avcodec/on2avc: fix regression on icc since 5495c7fGanesh Ajjanagadde2015-12-26
| | | | | | | | | | | | | | | | | | | | | | Should fix the regression, and also speeds up table generation. Tables tested on GNU/Linux+clang: they are identical to the ones prior to 5495c7f. ff_exp10 caused one slight change in one entry, 50000 became 50001 due to somewhat incorrect rounding. Untested on ICC; passes FATE on GNU/Linux+gcc. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | lavc/on2avc: replace pow(10,x) by ff_exp10(x)Ganesh Ajjanagadde2015-12-25
| | | | | | | | Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | on2avc: limit number of bits to 30 in get_egolombAndreas Cadhalpun2015-12-18
| | | | | | | | | | | | | | | | | | | | More don't fit into the integer output. Also use get_bits_long, since get_bits only supports reading up to 25 bits, while get_bits_long supports the full integer range. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '2d5176fad1a4556d209cbfb0f681712c7eada4fd'Michael Niedermayer2015-06-12
|\| | | | | | | | | | | | | * commit '2d5176fad1a4556d209cbfb0f681712c7eada4fd': on2avc: Use the integer abs() version Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * on2avc: Use the integer abs() versionVittorio Giovara2015-06-12
| | | | | | | | | | Fixes clang warning "floating point absolute value function 'fabsf' when argument is of integer type [-Wabsolute-value]".
* | avcodec/on2avc: Check run more carefullyMichael Niedermayer2015-05-14
| | | | | | | | | | | | Fixes CID1239106 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: fix clobbered ff_get_buffer()Paul B Mahol2015-02-10
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec/on2avc: use init_get_bits8()Paul B Mahol2015-02-04
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit 'cee4490b521fd0d02476d46aa2598af24fb8d686'Michael Niedermayer2014-12-19
|\| | | | | | | | | | | | | | | * commit 'cee4490b521fd0d02476d46aa2598af24fb8d686': on2avc: check number of channels See: 550f3e9df3410b3dd975e590042c0d83e20a8da3 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * on2avc: check number of channelsMichael Niedermayer2014-12-19
| | | | | | | | | | | | | | | | | | Fixes invalid memory access. CC: libav-stable@libav.org Bug-ID: CVE-2014-8549 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * on2avc: Fix out of array accessMichael Niedermayer2014-11-15
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 1206648
* | avcodec/on2avc: Use avpriv_float_dsp_alloc()Michael Niedermayer2014-11-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/on2avc: Check number of channelsMichael Niedermayer2014-10-04
| | | | | | | | | | | | | | | | Fixes out of array access Fixes: asan_heap-oob_4da4f3_7_asan_heap-oob_4da4f3_173_Xmen_avc_500.vp6 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/on2avc: Fix out of array accessMichael Niedermayer2014-07-02
| | | | | | | | | | | | Fixes CID1206648 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f1df0a4c08b54e722e7a2c797d0d31c7f2c531d0'Michael Niedermayer2014-05-27
|\| | | | | | | | | | | | | * commit 'f1df0a4c08b54e722e7a2c797d0d31c7f2c531d0': on2avc: Remove pointless dsputil.h #include Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * on2avc: Remove pointless dsputil.h #includeDiego Biurrun2014-05-27
| |
* | lavc/on2avc: silent warnings about const paramsLukasz Marek2014-05-11
| | | | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e2834567d73bd1e46478ba67ac133cb8ef5f50fd'Michael Niedermayer2014-04-23
|/ | | | | | | | | | | | | | * commit 'e2834567d73bd1e46478ba67ac133cb8ef5f50fd': On2 AVC decoder Conflicts: Changelog configure libavcodec/avcodec.h libavcodec/codec_desc.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* On2 AVC decoderKostya Shishkov2014-04-23