aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/videodsp_init.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary mem.h inclusionsAndreas Rheinhardt2021-07-221-1/+0
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* build: Generalize yasm/nasm-related variable namesDiego Biurrun2017-06-211-4/+4
| | | | | | | | None of them are specific to the YASM assembler. (Cherry-picked from libav commit 39e208f4d4756367c7cd2d581847e0c1b8a429c1) Signed-off-by: James Almer <jamrial@gmail.com>
* videodsp: assert that linesize is larger than widthMichael Niedermayer2015-07-081-0/+2
| | | | | Suggested-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* x86/videodsp: add ff_emu_edge_{hfix,hvar}_avx2James Almer2014-09-241-0/+36
| | | | | | | ~15% faster than sse2. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* x86/videodsp: fix warning about discarded 'const' qualifierJames Almer2014-09-231-2/+2
| | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* Add missing "const" all over the place.Reimar Döffinger2014-08-291-4/+4
| | | | | | Only "./configure --enable-gpl" on x86 was tested. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Revert "x86/videodsp: add emulated_edge_mc_mmxext"Michael Niedermayer2014-06-281-39/+5
| | | | | | | | | | The commit causes minor out of array reads and was mainly intended for future optimizations which turned out not to be meassurably faster. Itself it was just 1 cpu cycle faster Approved-by: jamrial This reverts commit 057d2704e78b52fec357b4fc646c9de37a085413.
* x86/videodsp: add emulated_edge_mc_mmxextJames Almer2014-06-261-5/+39
| | | | | | | | | | | | | | This also changes hfix8_mmx and above to use mmx regs instead of gprs, and makes emulated_edge_mc_sse and emulated_edge_mc_sse2 use mmxext hfix and hvar functions instead of mmx where possible. This is mostly in preparation for an ssse3 version. Signed-off-by: James Almer <jamrial@gmail.com> code is about 1 cpu cycle faster approximately Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '51daafb02eaf96e0743a37ce95a7f5d02c1fa3c2'Michael Niedermayer2014-01-311-1/+2
|\ | | | | | | | | | | | | | | | | | | | | * commit '51daafb02eaf96e0743a37ce95a7f5d02c1fa3c2': x86: videodsp: Properly mark sse2 instructions in emulated_edge_mc as such. Conflicts: libavcodec/x86/videodsp_init.c See: 1b3a7e1f42c3d89253e9837ada98e6bfb0cbab2f Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: videodsp: Properly mark sse2 instructions in emulated_edge_mc as such.Ronald S. Bultje2014-01-301-10/+27
| | | | | | | | | | | | | | | | Should fix crashes or corrupt output on pre-SSE2 CPUs when they were using SSE2-code (e.g. AMD Athlon XP 2400+ or Intel Pentium III) in hfix or hvar single-edge (left/right) extension functions. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | Merge commit '458446acfa1441d283dacf9e6e545beb083b8bb0'Michael Niedermayer2013-11-151-13/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-151-30/+160
| | | | | | | | | | | | 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/x86/videodsp: Properly mark sse2 instructions in emulated_edge_mc ↵Ronald S. Bultje2013-10-241-16/+26
| | | | | | | | | | | | | | | | | | | | | | x86 simd as such. Should fix crashes or corrupt output on pre-SSE2 CPUs when they were using SSE2-code (e.g. AMD Athlon XP 2400+ or Intel Pentium III) in hfix or hvar single-edge (left/right) extension functions. Tested-by: Ingo Brückl <ib@wupperonline.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavcodec/x86: Fix emulated_edge_mc SSE code to not contain SSE2 ↵Ronald S. Bultje2013-10-101-3/+8
| | | | | | | | | | | | instructions on x86-32. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Rewrite emu_edge functions to have separate src/dst_stride arguments.Ronald S. Bultje2013-09-281-29/+152
| | | | | | | | | | | | This allows supporting files for which the image stride is smaller than the max. block size + number of subpel mc taps, e.g. a 64x64 VP9 file or a 16x16 VP8 file with -fflags +emu_edge.
* | Convert multiplier for MV from int to ptrdiff_t.Ronald S. Bultje2013-09-281-2/+1
| | | | | | | | | | | | | | This prevents emulated_edge_mc from not undoing mvy*stride-related integer overflows. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: add emuedge_linesize_typeMichael Niedermayer2013-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | Currently all uses of the emu edge code as well as the code itself assume int linesize changing some but not changing all would introduce a security issue once all use this typedef a simple search and replace can be done to switch them all to ptrdiff_t Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0'Michael Niedermayer2013-08-301-4/+5
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0': x86: avcodec: Use convenience macros to check for CPU flags Conflicts: libavcodec/x86/dsputil_init.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/motion_est.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * x86: avcodec: Use convenience macros to check for CPU flagsDiego Biurrun2013-08-291-4/+5
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-07-181-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Consistently use "cpu_flags" as variable/parameter name for CPU flags Conflicts: libavcodec/x86/dsputil_init.c libavcodec/x86/h264dsp_init.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/motion_est.c libavcodec/x86/mpegvideo.c libavcodec/x86/proresdsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Consistently use "cpu_flags" as variable/parameter name for CPU flagsDiego Biurrun2013-07-181-5/+5
| |
* | Merge commit '620289a20e022b9c16c10d546ef86cc0bb77cc84'Michael Niedermayer2013-02-061-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '620289a20e022b9c16c10d546ef86cc0bb77cc84': sh4: Fix silly type vs. variable name search and replace typo configure: Group all hwaccels together in a separate variable Add av_cold attributes to arch-specific init functions Conflicts: configure libavcodec/arm/mpegvideo_armv5te.c libavcodec/x86/mlpdsp.c libavcodec/x86/motion_est.c libavcodec/x86/mpegvideoenc.c libavcodec/x86/videodsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add av_cold attributes to arch-specific init functionsDiego Biurrun2013-02-051-1/+2
| |
* | videodsp: Fix project nameMichael Niedermayer2012-12-221-4/+4
| | | | | | | | | | | | These are all part of splited out dsp utils from FFmpeg Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | x86/videodsp_init: Add back lost author attributionMichael Niedermayer2012-12-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code originates from: 910b9f30 libavcodec/dsputil.c (David Conrad 2010-05-27 04:39:27 +0000 334) void ff_emulated_edge_mc(uint8_t *buf, const uint8_t *src, int linesize, int block_w, int block_h, 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 335) int src_x, int src_y, int w, int h){ 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 336) int x, y; 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 337) int start_y, start_x, end_y, end_x; b5a093b3 libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-25 20:22:36 +0000 338) 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 339) if(src_y>= h){ 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 340) src+= (h-1-src_y)*linesize; 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 341) src_y=h-1; 225f9c44 libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-15 00:25:53 +0000 342) }else if(src_y<=-block_h){ 225f9c44 libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-15 00:25:53 +0000 343) src+= (1-block_h-src_y)*linesize; 225f9c44 libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-15 00:25:53 +0000 344) src_y=1-block_h; 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 345) } 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 346) if(src_x>= w){ 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 347) src+= (w-1-src_x); 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 348) src_x=w-1; 225f9c44 libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-15 00:25:53 +0000 349) }else if(src_x<=-block_w){ 225f9c44 libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-15 00:25:53 +0000 350) src+= (1-block_w-src_x); 225f9c44 libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-15 00:25:53 +0000 351) src_x=1-block_w; 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 352) } 93a21abd libavcodec/mpegvideo.c (Michael Niedermayer 2002-07-14 18:37:35 +0000 353) b8a78f41 libavcodec/mpegvideo.c (Michael Niedermayer 2002-11-10 11:46:59 +0000 354) start_y= FFMAX(0, -src_y); b8a78f41 libavcodec/mpegvideo.c (Michael Niedermayer 2002-11-10 11:46:59 +0000 355) start_x= FFMAX(0, -src_x); b8a78f41 libavcodec/mpegvideo.c (Michael Niedermayer 2002-11-10 11:46:59 +0000 356) end_y= FFMIN(block_h, h-src_y); b8a78f41 libavcodec/mpegvideo.c (Michael Niedermayer 2002-11-10 11:46:59 +0000 357) end_x= FFMIN(block_w, w-src_x); Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6906b19346ae8a330bfaa1c16ce535be10789723'Michael Niedermayer2012-12-211-5/+12
|/ | | | | | | | | | | | | | | | | | | * 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>
* lavc: introduce VideoDSPContextRonald S. Bultje2012-12-201-0/+119
Move some functions from dsputil. The idea is that videodsp contains functions that are useful for a large and varied set of video decoders. Currently, it contains emulated_edge_mc() and prefetch(). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>