summaryrefslogtreecommitdiff
path: root/libavcodec/svq1dec.c
Commit message (Collapse)AuthorAge
* avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-05
| | | | | | | | | | | 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>
* avcodec/codec_internal: Make FFCodec.decode use AVFrame*Andreas Rheinhardt2022-04-05
| | | | | | | | 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>
* avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-21
| | | | | | | | | | | | | | | | 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>
* avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt2022-03-21
| | | | | | | | | | 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>
* avcodec: Remove unnecessary h263.h inclusionsAndreas Rheinhardt2022-01-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | 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>
* avcodec/svq1dec: use av_fast_padded_malloc() for allocation pmv only when ↵Paul B Mahol2021-03-02
| | | | necessary
* avcodec/svq1dec: Increase nb_bits of VLC to read it in one goAndreas Rheinhardt2020-12-31
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/svq1dec: Make decoder init-threadsafeAndreas Rheinhardt2020-11-29
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/svq1dec: use av_malloc_array() to allocate pmvPaul B Mahol2020-09-17
|
* avcodec/svq1dec: Check that there is data left after the headerMichael Niedermayer2020-04-29
| | | | | | | | Fixes: Timeout (21sec -> 255ms) Fixes: 20709/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SVQ1_fuzzer-5085075089915904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/svq: Remove ff_svq1_packet_checksum()Michael Niedermayer2020-02-19
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Revert "avcodec/svq1: zero initialize entries array"Clément Bœsch2017-04-10
| | | | | | | This reverts commit aed84ee4d1b0c9e315a84b1ee0918fa49ee9cc09. It is a false positive from Valgrind with recent GCC and -funswitch-loops (present in -O3).
* avcodec/svq1: zero initialize entries arrayJames Almer2017-04-09
| | | | | | | Fixes valgrind warnings about "Use of uninitialised value of size 8" Reviewed-by: Kieran Kunhya <kierank@obe.tv> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '21e500ba647aec233d5930d3d1081489d0d53ceb'Clément Bœsch2017-03-20
|\ | | | | | | | | | | | | * commit '21e500ba647aec233d5930d3d1081489d0d53ceb': svq1dec: Change type of array pitch parameters to ptrdiff_t Merged-by: Clément Bœsch <u@pkh.me>
| * svq1dec: Change type of array pitch parameters to ptrdiff_tDiego Biurrun2016-09-04
| | | | | | | | ptrdiff_t is the correct type for array pitches and similar.
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * Drop pointless assert.h #includesDiego Biurrun2016-05-03
| |
* | avcodec/svq1dec: Check init_get_bits8() for failureMichael Niedermayer2015-09-04
| | | | | | | | | | | | Fixes: CID1322313 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | 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>
* | avcodec/svq1dec: Remove duplicate buf_size checkMichael Niedermayer2015-05-15
| | | | | | | | | | | | Fixes CID1297573 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25': lavc: Replace av_dlog and tprintf with internal macros Conflicts: libavcodec/aacdec.c libavcodec/audio_frame_queue.c libavcodec/bitstream.c libavcodec/dcadec.c libavcodec/dnxhddec.c libavcodec/dvbsubdec.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/get_bits.h libavcodec/gifdec.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/imc.c libavcodec/interplayvideo.c libavcodec/jpeglsdec.c libavcodec/libopencore-amr.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_parser.c libavcodec/pngdec.c libavcodec/ratecontrol.c libavcodec/rv10.c libavcodec/svq1dec.c libavcodec/vqavideo.c libavcodec/wmadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-19
| |
* | avcodec/svq1dec: Fix undefined shiftsMichael Niedermayer2015-03-13
| | | | | | | | | | | | Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/svq1dec: Add assert to ensure "stages >= 0"Michael Niedermayer2015-02-03
| | | | | | | | | | | | | | This is currently always true, the assert protects against future changes to the code breaking this assumtation Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '9b8c8a9395c849639aea0f6b5300e991e93c3a73'Michael Niedermayer2015-02-03
|\| | | | | | | | | | | | | | | | | * commit '9b8c8a9395c849639aea0f6b5300e991e93c3a73': svq1dec: Validate the stages value strictly Not merged, this is wrong, the condition is not possible Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * svq1dec: Validate the stages value strictlyLuca Barbato2015-02-03
| | | | | | | | | | | | | | It can be less than -1. Bug-Id: CID 1194397 / CID 1194398 CC: libav-stable@libav.org
* | avcodec/svq1dec: remove unneeded #include, there are no assert()Paul B Mahol2015-01-31
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '5a82ad644f281701eb22e0359fd732fac67aafa4'Michael Niedermayer2014-12-15
|\| | | | | | | | | | | | | | | | | | | | | * commit '5a82ad644f281701eb22e0359fd732fac67aafa4': svq1dec: Unbreak the scratch buffer allocation Conflicts: libavcodec/svq1dec.c See: 4213fc5b9eebec53c7d22b770c3f1ceecca1c113 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * svq1dec: Unbreak the scratch buffer allocationMichael Niedermayer2014-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The input packets are always assumed to be padded and the av_fast_ family of function takes a pointer to a pointer. Thanks to Nicolas Dufresne <nicolas.dufresne@collabora.com> for a similar patch. Introduced in 7b588bb691644e1b3c168b99accf74248a24e3cf. Bug-Id: 766 CC: libav-stable@libav.org Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec/svq1dec: zero terminate embedded message before printingMichael Niedermayer2014-10-30
| | | | | | | | | | | | | | Fixes out of array access Fixes: asan_stack-oob_49b1e5_10_009.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Correct few "ffmpeg" typosPaul B Mahol2014-08-24
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec/svq1dec: Fix multiple bugs from "svq1: do not modify the input packet"Michael Niedermayer2014-08-07
| | | | | | | | | | | | Add padding, clear size, use the correct pointer. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '7b588bb691644e1b3c168b99accf74248a24e3cf'Michael Niedermayer2014-08-07
|\| | | | | | | | | | | | | * commit '7b588bb691644e1b3c168b99accf74248a24e3cf': svq1: do not modify the input packet Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * svq1: do not modify the input packetAnton Khirnov2014-08-06
| | | | | | | | | | | | | | | | | | | | | | The input data must remain constant, make a copy instead. This is in theory a performance hit, but since I failed to find any samples using this feature, this should not matter in practice. Also, check the size of the header, avoiding invalid reads on truncated data. CC:libav-stable@libav.org
* | Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'Michael Niedermayer2013-11-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '5b9c3b4505206143d85398c1410949319fa1180f': Replace all instances of avcodec_alloc_frame() with av_frame_alloc(). Conflicts: doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c libavcodec/alacenc.c libavcodec/libopenjpegenc.c libavcodec/libvpxenc.c libavcodec/pcm.c libavcodec/xbmenc.c libavcodec/xwdenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all instances of avcodec_alloc_frame() with av_frame_alloc().Anton Khirnov2013-11-16
| |
* | Merge commit 'c265b8bb7638546919465e3585441b1d40c4b13d'Michael Niedermayer2013-11-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c265b8bb7638546919465e3585441b1d40c4b13d': tiff: stop using deprecated avcodec_set_dimensions targa: stop using deprecated avcodec_set_dimensions svq1dec: stop using deprecated avcodec_set_dimensions sunrast: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/sunrast.c libavcodec/targa.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * svq1dec: stop using deprecated avcodec_set_dimensionsAnton Khirnov2013-10-31
| |
* | avcodec/svq1dec: Use skip_1stop_8data_bits()Michael Niedermayer2013-10-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2': cosmetics: Group .name and .long_name together in codec/format declarations Conflicts: libavcodec/8svx.c libavcodec/alac.c libavcodec/cljr.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/dpxenc.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/ffv1dec.c libavcodec/flacdec.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g726.c libavcodec/gif.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopencore-amr.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/libvo-amrwbenc.c libavcodec/libvorbisenc.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/ljpegenc.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4videodec.c libavcodec/msmpeg4dec.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/proresdec_lgpl.c libavcodec/proresenc_kostya.c libavcodec/ra144enc.c libavcodec/rawdec.c libavcodec/rv10.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tta.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/wavpack.c libavcodec/xbmenc.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-03
| |
* | Merge commit 'c591d4575a6f97fbbe6145304b1ea960e8e81e14'Michael Niedermayer2013-08-16
|\| | | | | | | | | | | | | * commit 'c591d4575a6f97fbbe6145304b1ea960e8e81e14': avcodec: Replace local extern declarations for tables with header #includes Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Replace local extern declarations for tables with header #includesDiego Biurrun2013-08-15
| |
| * svq1: Use hpeldsp instead of dsputil for half-pel functionsRonald S. Bultje2013-04-19
| | | | | | | | | | | | This makes svq1 independent of dsputil. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avcodec/svq1dec: use init_get_bits8()Michael Niedermayer2013-07-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>