summaryrefslogtreecommitdiff
path: root/libavcodec/snow.h
Commit message (Collapse)AuthorAgeFilesLines
* avcodec: Constify frame->data pointers for encoders where possibleAndreas Rheinhardt2022-08-051-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/snow: Remove unused halfpel_planeAndreas Rheinhardt2022-07-311-1/+0
| | | | | | | Committed in 5be3a818719d613e2f225cf1532fda01ba106b04 in an unfinished state; never used or finished and always disabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegpicture: Decrease size of encoding_error arrayAndreas Rheinhardt2022-01-131-1/+3
| | | | | | | | | | | | | The current size is AV_NUM_DATA_POINTERS (i.e. eight). This number is chosen in order to minimize the amount of allocations for AVFrame.extended_(data|buf) for audio; it is meaningless for video for which four is sufficient. So decrease this array in order to minimize what is copied in ff_mpeg_ref_picture() and at the places that copy a whole MpegEncContext. Also do the same for snowenc. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/snowdec: Maintain avmv bufferMichael Niedermayer2021-09-191-0/+1
| | | | | | | | | | | This avoids reallocating per frame Fixes: Assertion failure Fixes: 36359/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-6733238591684608 Fixes: 38623/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-6098656512573440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/snow: Hardcode table to save spaceAndreas Rheinhardt2021-05-021-1/+1
| | | | | | | | The size of ff_qexp is only 32 bytes, but the code to generate it at runtime takes 47 bytes (GCC 9.3, x64, -O3 in an av_cold function); so just hardcode it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/snowenc: fix setting motion_est optionJames Almer2017-08-281-1/+2
| | | | | | | | Remove usage of FF_MPV_COMMON_OPTS, and set SnowContext.motion_est directly. Based on code from svq1enc.c Signed-off-by: James Almer <jamrial@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/snow: Fix runtime error: signed integer overflow: 1086573993 + ↵Michael Niedermayer2017-05-281-1/+2
| | | | | | | | | 1086573994 cannot be represented in type 'int' Fixes: 1871/clusterfuzz-testcase-minimized-5719950331215872 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/snow: Document BlockNodeMichael Niedermayer2016-06-171-7/+7
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/snow: Remove unused functionMichael Niedermayer2016-06-171-24/+0
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '2862b63783b5556f7f3fb2d097629bc6879f833a'Derek Buitenhuis2016-02-031-0/+2
|\ | | | | | | | | | | | | * commit '2862b63783b5556f7f3fb2d097629bc6879f833a': lavc: Move prediction_method to codec private options Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | snow: Move scenechange_threshold to a private optionDerek Buitenhuis2016-01-281-0/+1
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit '1aa24df74c052a73175c43e57d35b4835e537ec8'Hendrik Leppkes2015-10-031-0/+1
|\ \ | |/ | | | | | | | | | | * commit '1aa24df74c052a73175c43e57d35b4835e537ec8': lavu: Deprecate AVFrame.error[] Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | avcodec/rangecoder: Check eMichael Niedermayer2015-09-251-0/+2
| | | | | | | | | | | | | | Fixes hang.nut Found-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/snowenc: Remove unused new_picture fieldMichael Niedermayer2015-09-201-1/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/snowenc: Support setting the iterative dia size separatelyMichael Niedermayer2015-08-301-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/snowenc: Avoid use of deprecated me_methodMichael Niedermayer2015-08-091-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | snow: remove an obsolete av_assert2Andreas Cadhalpun2015-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It asserts that the frame linesize is larger than 37, but it can be smaller and decoding such frames works. Before commit cc884a35 src_stride > 7*MB_SIZE was necessary, because the blocks were interleaved in the tmp buffer and the last block was added with an offset of 6*MB_SIZE. It was changed for src_stride <= 7*MB_SIZE to write the blocks sequentially, hence the larger tmp_step. After that the assert was only necessary to make sure that the buffer remained large enough. Since commit bd2b6b33 s->scratchbuf is used as tmp buffer. As part of commit 86e107a7 the minimal scratchbuf size was increased to 256*7*MB_SIZE, which is enough for any src_stride <= 7*MB_SIZE. Also add a comment explaining the tmp_step calculation. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avcodec/snowenc: add intra_penalty AVOptionMichael Niedermayer2015-05-091-0/+1
| | | | | | | | | | | | This allows favoring intra or inter blocks by a user specified amount. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/snowdec: AVMotionVector supportMichael Niedermayer2015-01-201-0/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/snowenc: add FF_MPV_COMMON_OPTSMichael Niedermayer2014-10-181-0/+2
| | | | | | | | | | | | | | | | This fixes the ratecontrol code with snow adding FF_MPV_COMMON_OPTS is needed as the generic rate control options are currently in the (unrelated) MpegEncContext Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/snow: Make block argumrnt of ff_snow_pred_block() constMichael Niedermayer2014-09-221-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/snow: make new_picture constMichael Niedermayer2014-09-091-1/+1
| | | | | | | | | | | | Fixes "assignment discards const qualifier from pointer target type" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/snow: check coeffs for validityMichael Niedermayer2014-08-301-1/+8
| | | | | | | | | | | | | | | | Fixes deadlock Fixes integer overflow Fixes Ticket 3892 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2d60444331fca1910510038dd3817bea885c2367'Michael Niedermayer2014-07-171-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '2d60444331fca1910510038dd3817bea885c2367': dsputil: Split motion estimation compare bits off into their own context Conflicts: configure libavcodec/Makefile libavcodec/arm/Makefile libavcodec/dvenc.c libavcodec/error_resilience.c libavcodec/h264.h libavcodec/h264_slice.c libavcodec/me_cmp.c libavcodec/me_cmp.h libavcodec/motion_est.c libavcodec/motion_est_template.c libavcodec/mpeg4videoenc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/x86/Makefile libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '3c650efb81aaa3b395ba4606ee68a47ee4efb57b'Michael Niedermayer2014-07-071-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * commit '3c650efb81aaa3b395ba4606ee68a47ee4efb57b': dsputil: Move draw_edges() to mpegvideoencdsp Conflicts: libavcodec/mpegvideo_enc.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/snow: factor ff_snow_get_buffer() outMichael Niedermayer2014-06-271-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '368f50359eb328b0b9d67451f56fda20b3255f9a'Michael Niedermayer2014-05-301-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '368f50359eb328b0b9d67451f56fda20b3255f9a': dsputil: Split off quarterpel bits into their own context Conflicts: configure libavcodec/dsputil.c libavcodec/h263dec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/vc1dec.c libavcodec/vc1dsp.c libavcodec/x86/dsputil_init.c libavcodec/x86/qpeldsp.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/snow: split block clipping checksMichael Niedermayer2014-02-181-2/+4
| | | | | | | | | | | | | | Fixes out of array read Fixes: d4476f68ca1c1c57afbc45806f581963-asan_heap-oob_2266b27_8607_cov_4044577381_snow_chroma_bug.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Convert multiplier for MV from int to ptrdiff_t.Ronald S. Bultje2013-09-281-1/+1
| | | | | | | | | | | | | | This prevents emulated_edge_mc from not undoing mvy*stride-related integer overflows. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/snow: gray supportMichael Niedermayer2013-08-291-0/+1
| | | | | | | | | | | | Fixes Ticket839 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavcodec/snow: change AVFrame to pointers to AVFrame for ABI stabilityMichael Niedermayer2013-08-291-7/+7
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | snow: use hpeldsp instead of dsputil for half-pel functions.Ronald S. Bultje2013-03-131-0/+2
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-01-241-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | * qatar/master: dsputil: Separate h264 qpel Conflicts: libavcodec/dsputil_template.c libavcodec/h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Drop Snow codecDiego Biurrun2013-01-061-693/+0
| | | | | | | | Snow is a toy codec with no real-world use and horrible code.
| * snow: use VideoDSPContextLuca Barbato2012-12-291-0/+1
| | | | | | | | It was left over from the initial conversion.
* | lavc: split snow and dirac DWTsMichael Niedermayer2013-01-141-2/+2
| | | | | | | | | | | | | | There is only about 4 lines of common code, so it alot cleaner when seperated. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6906b19346ae8a330bfaa1c16ce535be10789723'Michael Niedermayer2012-12-211-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6906b19346ae8a330bfaa1c16ce535be10789723': lavc: add missing files for arm lavc: introduce VideoDSPContext Conflicts: configure libavcodec/arm/dsputil_init_armv5te.c libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/dsputil_template.c libavcodec/h264.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/x86/dsputil_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | snowdec: add 2 av_asserts to check run validityMichael Niedermayer2012-08-161-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | snowdec: check log in get_symbol2()Michael Niedermayer2012-08-161-1/+1
| | | | | | | | | | | | | | Fixes Ticket1635 Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-041-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: cosmetics: Consistently use C-style comments with multiple inclusion guards anm: fix a few Doxygen comments misc typo and wording fixes attributes: add av_noreturn attributes: drop pointless define guards configure: do not disable av_always_inline with --enable-small flvdec: initial stream switch support avplay: fix write on freed memory for rawvideo snow: remove a VLA used for edge emulation x86: lavfi: fix gradfun/yadif build with mmx/sse disabled snow: remove the runs[] VLA. snow: Check mallocs at init flacdec: remove redundant setting of avctx->sample_fmt Conflicts: ffplay.c libavcodec/h264.c libavcodec/snow.c libavcodec/snow.h libavcodec/snowdec.c libavcodec/snowenc.c libavformat/flvdec.c libavutil/attributes.h tools/patcheck Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * snow: remove a VLA used for edge emulationRonald S. Bultje2012-07-031-0/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * snow: remove the runs[] VLA.Ronald S. Bultje2012-07-031-0/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | snow.h: use av_assertMichael Niedermayer2012-06-231-5/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | snow: yuv444 supportMichael Niedermayer2012-06-221-11/+14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-181-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavr: add x86-optimized functions for mixing 1-to-2 s16p with flt coeffs lavr: add x86-optimized functions for mixing 1-to-2 fltp with flt coeffs Add Dolby/DPLII downmix support to libavresample vorbisdec: replace div/mod in loop with a counter fate: vorbis: add 5.1 surround test rtpenc: Allow requesting H264 RTP packetization mode 0 configure: Sort the library listings in the help text alphabetically dwt: remove variable-length arrays RTMPT protocol support http: Properly handle chunked transfer-encoding for replies to post data http: Fail reading if the connection has gone away amr: Mark an array const amr: More space cleanup rtpenc: Fix memory leaks in the muxer open function Conflicts: Changelog configure doc/APIchanges libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dwt: remove variable-length arraysRonald S. Bultje2012-06-171-0/+2
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | snowenc: move runs from stack to heap.Michael Niedermayer2012-03-191-0/+1
| | | | | | | | | | | | Fixes ticket1082 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | snowenc: add no_bitstream option.Reimar Döffinger2012-03-101-0/+1
| | | | | | | | | | | | This allows making e.g. MPlayer's -vf uspp filter about 20% faster. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-161-11/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (27 commits) ppc: Add ff_ prefix to nonstatic symbols sh4: Add ff_ prefix to nonstatic symbols mpegvideo: Add ff_ prefix to nonstatic functions rtjpeg: Add ff_ prefix to nonstatic symbols rv: Add ff_ prefix to nonstatic symbols vp56: Add ff_ prefix to nonstatic symbols vorbis: Add ff_ prefix to nonstatic symbols msmpeg4: Add ff_ prefix to nonstatic symbols vc1: Add ff_ prefix to nonstatic symbols msmpeg4: Add ff_ prefixes to nonstatic symbols snow: Add ff_ prefix to nonstatic symbols mpeg12: Add ff_ prefix to nonstatic symbols mpeg4: Add ff_ prefixes to nonstatic symbols lagarith: Add ff_ prefix to lag_rac_init libavcodec: Add ff_ prefix to j_rev_dct* dsputil: Add ff_ prefix to inv_zigzag_direct16 libavcodec: Prefix fdct_ifast, fdct_ifast248 dsputil: Add ff_ prefix to the dsputil*_init* functions libavcodec: Add ff_ prefix to some nonstatic symbols vlc/rl: Add ff_ prefix to the nonstatic symbols ... Conflicts: libavcodec/Makefile libavcodec/allcodecs.c libavcodec/dnxhddec.c libavcodec/ffv1.c libavcodec/h263.h libavcodec/h263dec.c libavcodec/h264.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/nuv.c libavcodec/ppc/dsputil_ppc.c libavcodec/proresdsp.c libavcodec/svq3.c libavcodec/version.h libavformat/dv.h libavformat/dvenc.c libavformat/matroskadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * snow: Add ff_ prefix to nonstatic symbolsMartin Storsjö2012-02-151-11/+7
| | | | | | | | | | | | | | This allows getting rid of a hack for conflicting symbol/define names. Signed-off-by: Martin Storsjö <martin@martin.st>