summaryrefslogtreecommitdiff
path: root/libavcodec/motion_est_template.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/motion_est_template: Avoid using last + 1 element of arrayAndreas Rheinhardt2022-10-241-1/+1
| | | | | | | | | | | | | | | | | | For an int array[8][2] using &array[8][0] (which is an int* pointing to the element beyond the last element of array) triggers a "runtime error: index 8 out of bounds for type 'int[8][2]'" from (Clang-)UBSan in the fate-vsynth(1|2|_lena)-snow tests. I don't know whether this is really undefined behaviour or does not actually fall under the "pointer arithmetic with the element beyond the last element of the array is allowed as long as it is not accessed" exception". All I know is that the code itself does not read from beyond the last element of the array. Nevertheless rewrite the code to a form that UBSan does not complain about. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/motion_est: Constify mv-table parameters where possibleAndreas Rheinhardt2022-02-131-3/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/motion_est: Fix invalid left shift of negative numbersAndreas Rheinhardt2021-04-011-8/+9
| | | | | | Affected many FATE-tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/motion_est, mpegvideo: Make pointers to static storage constAndreas Rheinhardt2020-12-311-1/+1
| | | | | | | | | Modifying static storage must not happen because of multithreading (except initialization of course), so add const to the pointed-to type for pointers that point to static storage. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/motion_est_template: Fix invalid shifts in no_sub_motion_search()Michael Niedermayer2020-02-271-2/+2
| | | | | | Fixes: Ticket8167 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/motion_est: remove duplicate functionMarton Balint2019-01-281-61/+1
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-4/+4
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-4/+4
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a'Derek Buitenhuis2016-04-171-9/+9
|\ \ | |/ | | | | | | | | | | * commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a': Move const qualifier before type name Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * Move const qualifier before type nameDiego Biurrun2016-03-231-9/+9
| |
* | avcodec/motion_est_template: Fix map cache use in qpel_motion_search()Michael Niedermayer2016-03-171-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/motion_est_template: replace qsort with AV_QSORTGanesh Ajjanagadde2015-10-281-1/+2
| | | | | | | | | | | | | | | | | | This code is in a performance critical section. AV_QSORT is substantially faster due to the inlining of the comparison callback. Thus, the increase in performance is worth the increase in binary size. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | Merge commit '4885bde3187a2bb0cae85b67796e07db233bf77f'Hendrik Leppkes2015-09-291-1/+2
|\ \ | |/ | | | | | | | | | | * commit '4885bde3187a2bb0cae85b67796e07db233bf77f': motion_est_template: Fix undefined left shift of negative number Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * motion_est_template: Fix undefined left shift of negative numberGanesh Ajjanagadde2015-09-291-1/+2
| | | | | | | | | | | | This fixes a -Wshift-negative-value warning reported with clang 3.7+. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avcodec/motion_est_template: fix undefined left shift of negative numberGanesh Ajjanagadde2015-09-191-1/+1
| | | | | | | | | | | | | | | | This fixes -Wshift-negative-value reported with clang 3.7+, e.g http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/motion_est_template: Fix undefined behavior in small_diamond_search()Michael Niedermayer2015-07-101-2/+2
| | | | | | | | | | | | | | Fixes: asan_heap-oob_394322e_138_cov_4265020547_CVPCMNL1_SVA_C.264 Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/motion_est_template: Fix undefined shifts in CHECK_MV()Michael Niedermayer2015-07-021-3/+3
| | | | | | | | | | | | | | Fixes:asan_heap-oob_4d5bb0_2295_cov_3374722539_hotel_california_ra5.1_640x480_30s.rmvb Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/motion_est_template: Fix undefined shifts in CHECK_MV_DIR()Michael Niedermayer2015-07-011-3/+3
| | | | | | | | | | | | | | Fixes: signal_sigsegv_2e64ee0_2762_cov_4170502227_missing_frames.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2d60444331fca1910510038dd3817bea885c2367'Michael Niedermayer2014-07-171-33/+32
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * dsputil: Split motion estimation compare bits off into their own contextDiego Biurrun2014-07-171-33/+32
| |
* | Merge commit 'a2941c8cb216bdc144953cace64973f5600ffa2d'Michael Niedermayer2014-05-011-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'a2941c8cb216bdc144953cace64973f5600ffa2d': lavc: move CODEC_FLAG_MV0 to mpegvideo Conflicts: libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: move CODEC_FLAG_MV0 to mpegvideoAnton Khirnov2014-05-011-1/+2
| |
* | Merge commit 'aba70bb5387f12dfa5e6cd8cb861c9c7e668151f'Michael Niedermayer2014-03-261-0/+2
|\ \ | |/ | | | | | | | | | | * commit 'aba70bb5387f12dfa5e6cd8cb861c9c7e668151f': Add missing headers to make template files compile (more) standalone Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add missing headers to make template files compile (more) standaloneDiego Biurrun2014-03-261-0/+2
| |
* | motion_est_template: fix warning: "ASSERT_LEVEL" is not definedMichael Niedermayer2012-12-291-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hpel_motion_search: move code used for asserts under correct #ifMichael Niedermayer2012-12-291-1/+1
| | | | | | | | | | | | This avoids compiler warnings about set but not used variables Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | motion_est: use av_log() in debug codeMichael Niedermayer2012-12-051-4/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | sab_diamond_search: add assert to double check the minima_countMichael Niedermayer2012-11-041-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-011-12/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avcodec: Convert some commented-out printf/av_log instances to av_dlog avcodec: Drop silly and/or broken printf debug output avcodec: Drop some silly commented-out av_log() invocations avformat: Convert some commented-out printf/av_log instances to av_dlog avformat: Remove non-compiling and/or silly commented-out printf/av_log statements Remove some silly disabled code. ac3dec: ensure get_buffer() gets a buffer for the correct number of channels Conflicts: libavcodec/dnxhddec.c libavcodec/ffv1.c libavcodec/h264.c libavcodec/h264_parser.c libavcodec/mjpegdec.c libavcodec/motion_est_template.c libavcodec/mpegaudiodec.c libavcodec/mpegvideo_enc.c libavcodec/put_bits.h libavcodec/ratecontrol.c libavcodec/wmaenc.c libavdevice/timefilter.c libavformat/asfdec.c libavformat/avidec.c libavformat/avienc.c libavformat/flvenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Drop silly and/or broken printf debug outputDiego Biurrun2012-10-011-12/+2
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-211-5/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: libx264: add forgotten ; matroskadec: fix a sanity check. matroskadec: only return corrupt packets that actually contain data lavf: zero data/size of the packet passed to read_packet(). ARM: use 2-operand syntax for ADD Rd, PC in Apple PIC code ARM: align PIC offset pools to 4 bytes ARM: swap source operands in some add instructions configure: update tms470 detection for latest version lavf probe: prevent codec probe with no data at all seen motion_est: fix use of inline on extern functions Conflicts: libavcodec/motion_est_template.c libavformat/matroskadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * motion_est: fix use of inline on extern functionsMans Rullgard2012-09-201-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inline functions declared without extern do not provide an external definition in standard C99. This code only works because most compilers do not implement the inline semantics correctly. With a stricter compiler, linking fails with unresolved references to these functions. Declaring the functions extern inline works correctly with some compilers while some others still fail to create external definitions. For maximum portability, create a static inline version with an externally visible wrapper for ff_get_mb_score. ff_epzs_motion_search is so large that no sane compiler inlines it anyway, so there the inline keyword can simply be dropped with no effect. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | motion_est_template: switch to av_assertMichael Niedermayer2012-08-041-22/+16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | new attribute "extern inline" (fixing linker error with ff_get_mb_score and ↵J. Bohl2012-06-151-2/+2
| | | | | | | | | | | | ff_get_mb_score) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-121-18/+18
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) fix AC3ENC_OPT_MODE_ON/OFF h264: fix HRD parameters parsing prores: implement multithreading. prores: idct sse2/sse4 optimizations. swscale: use aligned move for storage into temporary buffer. prores: extract idct into its own dspcontext and merge with put_pixels. h264: fix invalid shifts in init_cavlc_level_tab() intfloat_readwrite: fix signed addition overflows mov: do not misreport empty stts mov: cosmetics, fix for and if spacing id3v2: fix NULL pointer dereference mov: read album_artist atom mov: fix disc/track numbers and totals doc: fix references to obsolete presets directories for avconv/ffmpeg flashsv: return more meaningful error value flashsv: fix typo in av_log() message smacker: validate channels and sample format. smacker: check buffer size before reading output size smacker: validate number of channels smacker: Separate audio flags from sample rates in smacker demuxer. ... Conflicts: cmdutils.h doc/ffmpeg.texi libavcodec/Makefile libavcodec/motion_est_template.c libavformat/id3v2.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * motion_est: make MotionExtContext.map_generation unsignedMans Rullgard2011-10-111-18/+18
| | | | | | | | | | | | | | | | The way this value is used, it should be an unsigned type. While the numerical value has no meaning, unsigned wraparound is relied upon. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-171-141/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ffmpeg: fix some indentation ffmpeg: fix operation with --disable-avfilter simple_idct: remove disabled code motion_est: remove disabled code vc1: remove disabled code fate: separate lavf-mxf_d10 test from lavf-mxf cabac: Move code only used in the cabac test program to cabac.c. ffplay: warn that -pix_fmt is no longer working, suggest alternative ffplay: warn that -s is no longer working, suggest alternative lavf: rename enc variable in utils.c:has_codec_parameters() lavf: use designated initialisers for all (de)muxers. wav: remove a use of deprecated AV_METADATA_ macro rmdec: remove useless ap parameter from rm_read_header_old() dct-test: remove write-only variable des: fix #if conditional around P_shuffle Use LOCAL_ALIGNED in ff_check_alignment() Conflicts: ffmpeg.c libavformat/avidec.c libavformat/matroskaenc.c libavformat/mp3enc.c libavformat/oggenc.c libavformat/utils.c tests/ref/lavf/mxf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * motion_est: remove disabled codeDiego Biurrun2011-07-171-141/+0
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-041-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (40 commits) H.264: template left MB handling H.264: faster fill_decode_caches H.264: faster write_back_* H.264: faster fill_filter_caches H.264: make filter_mb_fast support the case of unavailable top mb Do not include log.h in avutil.h Do not include pixfmt.h in avutil.h Do not include rational.h in avutil.h Do not include mathematics.h in avutil.h Do not include intfloat_readwrite.h in avutil.h Remove return statements following infinite loops without break RTSP: Doxygen comment cleanup doxygen: Escape '\' in Doxygen documentation. md5: cosmetics md5: use AV_WL32 to write result md5: add fate test md5: include correct headers md5: fix test program doxygen: Drop array size declarations from Doxygen parameter names. doxygen: Fix parameter names to match the function prototypes. ... Conflicts: libavcodec/x86/dsputil_mmx.c libavformat/flvenc.c libavformat/oggenc.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * doxygen: Drop array size declarations from Doxygen parameter names.Diego Biurrun2011-07-031-1/+1
| | | | | | | | Adding [] to a Doxygen parameter name clashes with Doxygen syntax.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-241-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: doxygen: Consistently use '@' instead of '\' for Doxygen markup. Use av_printf_format to check the usage of printf style functions Add av_printf_format, for marking printf style format strings and their parameters ARM: enable thumb for Cortex-M* CPUs nsvdec: Propagate error values instead of returning 0 in nsv_read_header(). build: remove SRC_PATH_BARE variable build: move basic rules and variables to main Makefile build: move special targets to end of main Makefile lavdev: improve feedback in case of invalid frame rate/size vfwcap: prefer "framerate_q" over "fps" in vfw_read_header() v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters() fbdev: prefer "framerate_q" over "fps" in device context bktr: prefer "framerate" over "fps" for grab_read_header() ALSA: implement channel layout for playback. alsa: support unsigned variants of already supported signed formats. alsa: add support for more formats. ARM: allow building in Thumb2 mode Conflicts: common.mak doc/APIchanges libavcodec/vdpau.h libavdevice/alsa-audio-common.c libavdevice/fbdev.c libavdevice/libdc1394.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * doxygen: Consistently use '@' instead of '\' for Doxygen markup.Diego Biurrun2011-06-241-4/+4
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.Stefano Sabatini2011-05-021-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*Stefano Sabatini2011-05-021-1/+1
| |
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-301-35/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Duplicate AMV: disable DR1 and don't override EMU_EDGE Duplicate lavf: inspect more frames for fps when container time base is coarse Wrong and we have correct fix: Fix races in default av_log handler vorbis: Replace sized int_fast integer types with plain int/unsigned. Remove disabled non-optimized code variants. NO bswap.h: Remove disabled code. Remove some disabled printf debug cruft. Replace more disabled printf() calls by av_dlog(). NO tests: Remove disabled code. NO Replace some commented-out debug printf() / av_log() messages with av_dlog(). vorbisdec: Replace some sizeof(type) by sizeof(*variable). NO vf_fieldorder: Replace FFmpeg by Libav in license boilerplate. Conflicts: libavcodec/h264.c libavcodec/vorbisdec.c libavutil/log.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove some disabled printf debug cruft.Diego Biurrun2011-04-291-35/+0
| |
* | Revert "Eliminate pointless '#if 1' statements without matching '#else'."Michael Niedermayer2011-04-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | no comment This reverts commit e6ff064845d02c43526c8a56dab121c219f16659. Conflicts: libavcodec/dsputil.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-271-2/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) ac3enc: correct the flipped sign in the ac3_fixed encoder Eliminate pointless '#if 1' statements without matching '#else'. Add AVX FFT implementation. Increase alignment of av_malloc() as needed by AVX ASM. Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX. mjpeg: Detect overreads in mjpeg_decode_scan() and error out. documentation: extend documentation for ffmpeg -aspect option APIChanges: update commit hashes for recent additions. lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums aac: add headers needed for log2f() lavc: remove FF_API_MB_Q cruft lavc: remove FF_API_RATE_EMU cruft lavc: remove FF_API_HURRY_UP cruft pad: make the filter parametric vsrc_movie: add key_frame and pict_type. vsrc_movie: fix leak in request_frame() lavfi: add key_frame and pict_type to AVFilterBufferRefVideo. vsrc_buffer: add sample_aspect_ratio fields to arguments. lavfi: add fieldorder filter scale: make the filter parametric ... Conflicts: Changelog doc/filters.texi ffmpeg.c libavcodec/ac3dec.h libavcodec/dsputil.c libavfilter/avfilter.h libavfilter/vf_scale.c libavfilter/vf_yadif.c libavfilter/vsrc_buffer.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Eliminate pointless '#if 1' statements without matching '#else'.Diego Biurrun2011-04-261-2/+0
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
|/ | | | Signed-off-by: Mans Rullgard <mans@mansr.com>