Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-06on2avc: convert to lavu/txLynne
2022-09-03avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt
It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-27avcodec/internal: Move ff_get_buffer() to decode.hAndreas Rheinhardt
Only used by decoders (encoders have ff_encode_alloc_frame()). Also clean up the other headers a bit while removing now redundant internal.h inclusions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-18avcodec: Make init-threadsafety the defaultAndreas Rheinhardt
and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-05avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt
This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-05avcodec/codec_internal: Make FFCodec.decode use AVFrame*Andreas Rheinhardt
This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVFrame *frame = data;" line for non-subtitle decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt
Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt
Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-15on2avc: convert to new channel layout APIAnton Khirnov
Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-02avcodec/on2avc: Mark decoder as init-threadsafeAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-04-27avcodec: Constify AVCodecsAndreas Rheinhardt
Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-01-01lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov
They are not properly namespaced and not intended for public use.
2020-12-08avcodec/on2avc: Apply offset when initializing VLCAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08avcodec/on2avcdata: Combine tables for codebooksAndreas Rheinhardt
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>
2020-12-08avcodec/on2avc: Use smaller tables for VLCsAndreas Rheinhardt
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>
2020-10-21avcodec/on2avc: Remove redundant code for freeingAndreas Rheinhardt
This decoder has the FF_CODEC_CAP_INIT_CLEANUP set. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-21avcodec/on2avc: Use least max_depth for get_vlc2()Andreas Rheinhardt
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>
2020-10-21avcodec/on2avc: Unify initializing quad and pair VLCsAndreas Rheinhardt
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>
2018-09-08avcodec/on2avc: decoder supports init_cleanup capabilityPaul B Mahol
2016-09-21avcodec/on2avc: add 0x500 stereo support and improve 0x500 mono supportPaul B Mahol
0x500 can be stereo. 0x500 mono can use extended window types. Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-06-29Merge commit '4f81f8dba735c212efae077c4fec8ad4fe53b352'Clément Bœsch
* commit '4f81f8dba735c212efae077c4fec8ad4fe53b352': Drop unnecessary golomb.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29Merge commit '197ae68e78784524a7ccf97a3c301092715305d3'Clément Bœsch
* commit '197ae68e78784524a7ccf97a3c301092715305d3': Drop unnecessary unary.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-08Drop unnecessary golomb.h #includesDiego Biurrun
2016-06-08Drop unnecessary unary.h #includesDiego Biurrun
2016-03-22all: move ff_exp10, ff_exp10f, ff_fast_powf to lavu/ffmath.hGanesh Ajjanagadde
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>
2016-01-13on2avc: limit number of bits to 30 in get_egolombAndreas Cadhalpun
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>
2015-12-27avcodec/on2avc: Fix stability issues with scale_tab generationMichael Niedermayer
This also simplifies the code the resulting values are binary identical to what pow(10, i/10.0) produces
2015-12-27avcodec/on2avc: fix regression on icc since 5495c7fGanesh Ajjanagadde
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>
2015-12-25lavc/on2avc: replace pow(10,x) by ff_exp10(x)Ganesh Ajjanagadde
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-18on2avc: limit number of bits to 30 in get_egolombAndreas Cadhalpun
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>
2015-07-27Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer
* 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>
2015-07-27Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer
* 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>
2015-07-27lavc: AV-prefix all codec capabilitiesVittorio Giovara
Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27lavc: AV-prefix all codec flagsVittorio Giovara
Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-06-13Merge commit '2d5176fad1a4556d209cbfb0f681712c7eada4fd'Michael Niedermayer
* commit '2d5176fad1a4556d209cbfb0f681712c7eada4fd': on2avc: Use the integer abs() version Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12on2avc: Use the integer abs() versionVittorio Giovara
Fixes clang warning "floating point absolute value function 'fabsf' when argument is of integer type [-Wabsolute-value]".
2015-05-14avcodec/on2avc: Check run more carefullyMichael Niedermayer
Fixes CID1239106 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-10avcodec: fix clobbered ff_get_buffer()Paul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-02-04avcodec/on2avc: use init_get_bits8()Paul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-12-19Merge commit 'cee4490b521fd0d02476d46aa2598af24fb8d686'Michael Niedermayer
* commit 'cee4490b521fd0d02476d46aa2598af24fb8d686': on2avc: check number of channels See: 550f3e9df3410b3dd975e590042c0d83e20a8da3 Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19on2avc: check number of channelsMichael Niedermayer
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>
2014-11-29avcodec/on2avc: Use avpriv_float_dsp_alloc()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-15on2avc: Fix out of array accessMichael Niedermayer
CC: libav-stable@libav.org Bug-Id: CID 1206648
2014-10-05avcodec/on2avc: Check number of channelsMichael Niedermayer
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>
2014-07-02avcodec/on2avc: Fix out of array accessMichael Niedermayer
Fixes CID1206648 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28Merge commit 'f1df0a4c08b54e722e7a2c797d0d31c7f2c531d0'Michael Niedermayer
* commit 'f1df0a4c08b54e722e7a2c797d0d31c7f2c531d0': on2avc: Remove pointless dsputil.h #include Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-27on2avc: Remove pointless dsputil.h #includeDiego Biurrun
2014-05-11lavc/on2avc: silent warnings about const paramsLukasz Marek
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-23Merge commit 'e2834567d73bd1e46478ba67ac133cb8ef5f50fd'Michael Niedermayer
* 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>
2014-04-23On2 AVC decoderKostya Shishkov