summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_motion.c
Commit message (Collapse)AuthorAge
* avcodec/mpegvideo_motion: Constify ff_mpv_motionAndreas Rheinhardt2022-08-05
| | | | | | | | | | | | Also constify the corresponding code in mpegvideo.c that handles lowres. (Unfortunately, not everything that is const could be constified: ref_picture could be made const uint8_t* const* if C allowed the safe automatic conversion from uint8_t**; and pix_op, qpix_op could be made to point to const function pointers, but C's handling of const in pointers to arrays is broken.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-16
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/mpegvideo_motion: Don't duplicate identical codeAndreas Rheinhardt2022-01-04
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_motion: Remove unnecessary headersAndreas Rheinhardt2021-02-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegvideo_motion: ReindentationAndreas Rheinhardt2021-02-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegvideo_motion: Improve check to remove dead codeAndreas Rheinhardt2021-02-11
| | | | | | | | Several compile-time checks can be improved because mcsel is not used for MPEG-1/2 (it is only used for MPEG-4) and because MPEG-1/2 is the only user of ff_mpv_motion that uses MV_TYPE_16X8 and MV_TYPE_DMV. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavu: move LOCAL_ALIGNED from internal.h to mem_internal.hAnton Khirnov2021-01-01
| | | | That is a more appropriate place for it.
* avcodec/mpeg2dec: Fix motion vector rounding for chroma componentsNekopanda2018-02-11
| | | | | | | | In 16x8 motion compensation, for lower 16x8 region, the input to mpeg_motion() for motion_y was "motion_y + 16", which causes wrong rounding. For 4:2:0, chroma scaling for y is dividing by two and rounding toward zero. When motion_y < 0 and motion_y + 16 > 0, the rounding direction of "motion_y" and "motion_y + 16" is different and rounding "motion_y + 16" would be incorrect. We should input "motion_y" as is to round correctly. I add "is_16x8" flag to do that. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '0e285c2f908789e96e29bfd969ad5eaaa0eece65'Clément Bœsch2017-03-19
|\ | | | | | | | | | | | | * commit '0e285c2f908789e96e29bfd969ad5eaaa0eece65': mpegvideo: Kill some disabled code Merged-by: Clément Bœsch <u@pkh.me>
| * mpegvideo: Kill some disabled codeDiego Biurrun2016-08-17
| |
* | avcodec/mpeg4video: Fix runtime error: left shift of negative valueMichael Niedermayer2017-02-22
| | | | | | | | | | | | Fixes: 644/clusterfuzz-testcase-4726434209726464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mpeg4videodec: Workaround interlaced mpeg4 edge MC bugMichael Niedermayer2016-11-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mpegvideo: Fix edge emu buffer overlap with interlaced mpeg4Michael Niedermayer2016-11-17
| | | | | | | | | | | | | | Fixes Ticket5936 Regression since c5fc8ae12622a507d7b9ee30ddcd3734e6de6b1d Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | 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>
| * mpegvideo: Refactor emulated_edge_mc callsLuca Barbato2016-03-05
| |
* | Merge commit '0242351390643d176b10600c2eb854414f9559e6'Derek Buitenhuis2016-04-13
|\| | | | | | | | | | | | | * commit '0242351390643d176b10600c2eb854414f9559e6': mpegvideo: Fix undefined negative shifts in mpeg_motion_internal Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * mpegvideo: Fix undefined negative shifts in mpeg_motion_internalLuca Barbato2016-03-05
| | | | | | | | 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>
* | Merge commit 'da0c8664b4dc906696803685f7e53ade68594ab8'Michael Niedermayer2015-06-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'da0c8664b4dc906696803685f7e53ade68594ab8': mpegvideo: Move various temporary buffers to a separate context Conflicts: libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/rv34.c libavcodec/vc1_mc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: Move various temporary buffers to a separate contextVittorio Giovara2015-06-08
| |
* | Merge commit '2f15846ad7ad57beb0bca99c624affa0facf284b'Michael Niedermayer2015-06-01
|\| | | | | | | | | | | | | | | | | | | * commit '2f15846ad7ad57beb0bca99c624affa0facf284b': mpegvideo: wmv2: Move function declarations Conflicts: libavcodec/wmv2.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: wmv2: Move function declarationsVittorio Giovara2015-05-31
| |
* | Merge commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42'Michael Niedermayer2015-05-22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42': mpegvideo: Drop flags and flags2 Conflicts: libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/ratecontrol.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: Drop flags and flags2Vittorio Giovara2015-05-22
| | | | | | | | They are just duplicates of AVCodecContext members so use those instead.
* | avcodec/mpegvideo_motion: Fix undefined shifts in mpeg_motion_internal()Michael Niedermayer2015-03-11
| | | | | | | | | | | | Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mpegvideo_motion: Fix off by 1 error in MV bounds checking in qpel, ↵Michael Niedermayer2015-03-08
| | | | | | | | | | | | | | | | chroma_4mv and 8x8 No testcase available Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mpegvideo_motion: Fix off by 1 error in MV bounds checkingMichael Niedermayer2015-03-08
| | | | | | | | | | | | Fixes Ticket4299 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mpegvideo_motion: Fix gmc chroma dimensionsMichael Niedermayer2015-02-05
| | | | | | | | | | | | | | | | Fixes integer overflow and out of array read Fixes: asan_heap-oob_1fb2f9b_3780_cov_3984375136_usf.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '835f798c7d20bca89eb4f3593846251ad0d84e4b'Michael Niedermayer2014-08-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '835f798c7d20bca89eb4f3593846251ad0d84e4b': mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes Conflicts: libavcodec/h261dec.c libavcodec/intrax8.c libavcodec/mjpegenc.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpeg4videoenc.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/x86/mpegvideoenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixesDiego Biurrun2014-08-15
| |
* | Merge commit 'fab9df63a3156ffe1f9490aafaea41e03ef60ddf'Michael Niedermayer2014-06-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'fab9df63a3156ffe1f9490aafaea41e03ef60ddf': dsputil: Split off global motion compensation bits into a separate context Conflicts: libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/ppc/dsputil_altivec.h libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split off global motion compensation bits into a separate contextDiego Biurrun2014-06-23
| |
* | avcodec/mpegvideo: fix edge emulation with uvlinesize below 25Michael Niedermayer2014-06-13
| | | | | | | | | | | | Fixes fate-vsynth3-wmv2 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '368f50359eb328b0b9d67451f56fda20b3255f9a'Michael Niedermayer2014-05-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * dsputil: Split off quarterpel bits into their own contextDiego Biurrun2014-05-29
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-04-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegvideo: operate with pointers to AVFrames instead of whole structs Conflicts: libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/intrax8.c libavcodec/mpeg12enc.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/mpegvideo_xvmc.c libavcodec/msmpeg4.c libavcodec/ratecontrol.c libavcodec/vaapi.c libavcodec/vc1dec.c libavcodec/vdpau_vc1.c See: fc567ac49e17151f00f31b59030cd10f952612ef Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: operate with pointers to AVFrames instead of whole structswm42014-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | The most interesting parts are initialization in ff_MPV_common_init() and uninitialization in ff_MPV_common_end(). ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL checks for Picture.f, because these functions can be called on uninitialized or partially initialized Pictures. NULL pointer checks are added to ff_thread_release_buffer() stub function. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b'Michael Niedermayer2014-03-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b': mpegvideo: move mpegvideo formats-related defines to mpegutils.h Conflicts: libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_mvpred.h libavcodec/svq1enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: move mpegvideo formats-related defines to mpegutils.hVittorio Giovara2014-03-16
| |
* | Merge commit '831a1180785a786272cdcefb71566a770bfb879e'Michael Niedermayer2014-03-13
|\| | | | | | | | | | | | | | | | | | | | | * commit '831a1180785a786272cdcefb71566a770bfb879e': Update dsputil- and SIMD-related comments to match reality more closely Conflicts: libavcodec/x86/hpeldsp.asm libavutil/arm/float_dsp_init_arm.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Update dsputil- and SIMD-related comments to match reality more closelyDiego Biurrun2014-03-13
| |
* | Merge commit 'ebfe622bb1ca57cecb932e42926745cba7161913'Michael Niedermayer2014-01-09
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ebfe622bb1ca57cecb932e42926745cba7161913': mpegvideo: drop support for real (non-emulated) edges Conflicts: libavcodec/mpegvideo.c libavcodec/mpegvideo_motion.c libavcodec/wmv2.c If this is slower on a major platform then it should be investigated and potentially reverted. See: 8fc52a5ef94712d900fc8fe7503cf9c9ba635143 See: 3969b4b861ce8152e3195e8f8c3437abd273b90a Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: drop support for real (non-emulated) edgesAnton Khirnov2014-01-09
| | | | | | | | | | | | | | Several decoders disable those anyway and they are not measurably faster on x86. They might be somewhat faster on other platforms due to missing emu edge SIMD, but the gain is not large enough (and those decoders relevant enough) to justify the added complexity.
* | Merge commit '458446acfa1441d283dacf9e6e545beb083b8bb0'Michael Niedermayer2013-11-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '458446acfa1441d283dacf9e6e545beb083b8bb0': lavc: Edge emulation with dst/src linesize Conflicts: libavcodec/cavs.c libavcodec/h264.c libavcodec/hevc.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/rv34.c libavcodec/svq3.c libavcodec/vc1dec.c libavcodec/videodsp.h libavcodec/videodsp_template.c libavcodec/vp3.c libavcodec/vp8.c libavcodec/wmv2.c libavcodec/x86/videodsp.asm libavcodec/x86/videodsp_init.c Changes to the asm are not merged, they are left for volunteers or in their absence for later. The changes this merge introduces are reordering of the function arguments See: face578d56c2d1375e40d5e2a28acc122132bc55 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Edge emulation with dst/src linesizeRonald S. Bultje2013-11-15
| | | | | | | | | | | | Allow supporting files for which the image stride is smaller than the maximum block size + number of subpel mc taps, e.g. a 64x64 VP9 file or a 16x16 VP8 file with -fflags +emu_edge.
* | avcodec/mpegvideo_motion: Handle edge emulation even without unrestricted_mvMichael Niedermayer2013-11-12
| | | | | | | | | | | | | | Fixes out of array reads Fixes part of: MSVR 440 (the other issues seem to have been fixed already) Found-by: Jeremy Brown (jerbrown) of ReSP Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-16
|\| | | | | | | | | | | | | | | | | | | * qatar/master: mpegvideo: Move 8x8 in a separate function Conflicts: libavcodec/mpegvideo_motion.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: Move 8x8 in a separate functionLuca Barbato2013-10-15
| |