Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- | +;******************************************************************************
- | +;* UtVideo DSP SIMD optimizations
- | +;*
- | +;* Copyright (C) 2016 Paul B Mahol
- | +;*
- | +;* This file is part of FFmpeg.
- | +;*
- | +;* FFmpeg is free software; you can redistribute it and/or
- | +;* modify it under the terms of the GNU Lesser General Public
- | +;* License as published by the Free Software Foundation; either
- | +;* version 2.1 of the License, or (at your option) any later version.
- | +;*
- | +;* FFmpeg is distributed in the hope that it will be useful,
- | +;* but WITHOUT ANY WARRANTY; without even the implied warranty of
- | +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- | +;* Lesser General Public License for more details.
- | +;*
- | +;* You should have received a copy of the GNU Lesser General Public
- | +;* License along with FFmpeg; if not, write to the Free Software
- | +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- | +;******************************************************************************
- | +
- | +%include "libavutil/x86/x86util.asm"
- | +
- | +SECTION_RODATA
- | +
- | +pd_128: times 4 dd 128
- | +
- | +SECTION .text
- | +
- | +INIT_XMM sse2
- | +cglobal restore_median, 7, 7, 10, src, step, stride, width, height, slices, cmask
- | + not cmaskq
- | +%define slice r7q
- | +%define slice_startq r8q
- | +%define slice_heightq r9q
- | + xor slice, slice
- | +.loop:
- | + mov slice_startq, slice
- | + imul slice_startq, heightq
- | + mov eaxq, slice_startq
- | + idiv slicesq
- | + mov slice_startq, eaxq
- | + and slice_startq, cmaskq
- | + add slice, 1
- | + cmp slice, slicesq
- | + jb .loop
- | + REP_RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement