summaryrefslogtreecommitdiff
path: root/libavcodec/qdm2_tablegen.h
Commit message (Collapse)AuthorAge
* avcodec/vlc: Use proper namespaceAndreas Rheinhardt2023-09-11
| | | | | | | | | | | | | | | | Therefore use a proper prefix for this API, e.g. ff_init_vlc_sparse -> ff_vlc_init_sparse ff_free_vlc -> ff_vlc_free INIT_VLC_LE -> VLC_INIT_LE INIT_VLC_USE_NEW_STATIC -> VLC_INIT_USE_STATIC (The ancient INIT_VLC_USE_STATIC has been removed in 595324e143b57a52e2329eb47b84395c70f93087, so that the NEW has been dropped.) Finally, reorder the flags and change their values accordingly. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vlc: Use structure instead of VLC_TYPE array as VLC elementAndreas Rheinhardt2022-06-17
| | | | | | | | | | | | | | | | | | In C, qualifiers for arrays are broken: const VLC_TYPE (*foo)[2] is a pointer to an array of two const VLC_TYPE elements and unfortunately this is not compatible with a pointer to a const array of two VLC_TYPE, because the latter does not exist as array types are never qualified (the qualifier applies to the base type instead). This is the reason why get_vlc2() doesn't accept a const VLC table despite not modifying the table at all, as there is no automatic conversion from VLC_TYPE (*)[2] to const VLC_TYPE (*)[2]. Fix this by using a structure VLCElem for the VLC table. This also has the advantage of making it clear which element is which. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/qdm2: Avoid offsets table when initializing VLCsAndreas Rheinhardt2020-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/qdm2: Initialize array of VLCs in a loopAndreas Rheinhardt2020-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/qdm2: Apply offsets when initializing VLCsAndreas Rheinhardt2020-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/qdm2: Make tables used to initialize VLCs smallerAndreas Rheinhardt2020-12-08
| | | | | | | | | | | | | After permuting the codes, symbols and lengths tables used to initialize the VLCs so that the codes are ordered from left to right in the Huffman tree, the codes become redundant as they can be easily computed from the lengths at runtime (or at compile time with --enable-hardcoded-tables); in this case one has to use explicit symbol tables, but all the symbols used here fit into an uint8_t, whereas some codes needed uint16_t. Furthermore, the codes had holes because the range of the symbols was not contiguous; these have also been removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* qdm2: Allow hard-coding VLC tables.Reimar Döffinger2014-12-18
| | | | | | | | | | Also adds a lot of infrastructure necessary for it. Some of it is a bit ugly though. Increases binary size for hardcoded tables by about 12 kB, which is about 15 kB from qdm2_table minus data and code saved that was only used for creating it. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* qdm2: simplify arithmetic coder tables generationMichael Niedermayer2013-03-06
| | | | | | Someone should rename the variables, theres nothing random in there Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qdm2: increase noise_table sizeMichael Niedermayer2013-01-28
| | | | | | | | | | | | This prevents out of array reads. An alternative solution would be to check the index but this would require several checks in the inner loops Yet another alternative would be to change the index reset logic but this likely would introduce a difference to the binary decoder Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (31 commits) tiffenc: initialize forgotten avctx. avplay: free the active audio packet at exit. avplay: free rdft data used for spectrogram analysis. log.h: make AVClass a named struct fix ac3 encoder documentation vc1: more prettyprinting cosmetics vc1: prettyprint some tables vc1: K&R formatting cosmetics AVOptions: bump minor and add APIchanges entry. cmdutils/avtools: simplify show_help() by using av_opt_child_class_next() AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* Remove all uses of deprecated AVOptions API. AVOptions: add av_opt_next, deprecate av_next_option. AVOptions: add functions for evaluating option strings. AVOptions: split get_number(). AVOptions: add av_opt_get*, deprecate av_get*. AVOptions: add av_opt_set*(). AVOptions: add new API for enumerating children. rv34: move inverse transform functions to DSP context flvenc: Write the right metadata entry count ... Conflicts: avconv.c cmdutils.c doc/APIchanges ffplay.c ffprobe.c libavcodec/ac3dec.c libavcodec/h264.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mpeg12enc.c libavcodec/options.c libavdevice/libdc1394.c libavdevice/v4l2.c libavfilter/vf_drawtext.c libavformat/flvdec.c libavformat/mpegtsenc.c libavformat/options.c libavutil/avutil.h libavutil/opt.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * qdm2: fix signed multiplication overflowMans Rullgard2011-10-12
| | | | | | | | | | | | | | | | This code relies on the result wrapping as for unsigned values, and the sign is not used. Thus an unsigned type is proper here. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ffmpeg: get rid of the -vglobal option. dct32: Add AVX implementation of 32-point DCT dct32: Change pass 6 permutation to allow for AVX implementation dct32: port SSE 32-point DCT to YASM multiple inclusion guard cleanup avio: document buffer must created with av_malloc() and friends avio: check AVIOContext malloc failure swscale: point out an alternative to sws_getContext svq3: Do initialization after parsing the extradata add changelog entries for 0.7_beta2 mp3lame: add #include required for AV_RB32 macro. Conflicts: Changelog libavcodec/svq3.c libavcodec/x86/dct32_sse.c libavfilter/vsrc_buffer.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * multiple inclusion guard cleanupDiego Biurrun2011-05-21
| | | | | | | | | | Add missing multiple inclusion guards; clean up #endif comments; add missing library prefixes; keep guard names consistent.
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
|/ | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove unnecessary ../ from include directivesMåns Rullgård2010-06-26
| | | | Originally committed as revision 23806 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Include appropriate header in table generators instead of using a dummyReimar Döffinger2010-03-29
| | | | | | av_cold define. Originally committed as revision 22723 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Allow hard-coding several QDM2 tables (about 32 kB size).Reimar Döffinger2010-03-14
Originally committed as revision 22525 to svn://svn.ffmpeg.org/ffmpeg/trunk