From 150c9823e71a161e97003849cf8b2f55b21520bd Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 26 Aug 2013 15:10:18 +0100 Subject: adding ffmpeg specific version --- ffmpeg1/libavcodec/x86/h264_weight_10bit.asm | 282 +++++++++++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 ffmpeg1/libavcodec/x86/h264_weight_10bit.asm (limited to 'ffmpeg1/libavcodec/x86/h264_weight_10bit.asm') diff --git a/ffmpeg1/libavcodec/x86/h264_weight_10bit.asm b/ffmpeg1/libavcodec/x86/h264_weight_10bit.asm new file mode 100644 index 0000000..3b09e42 --- /dev/null +++ b/ffmpeg1/libavcodec/x86/h264_weight_10bit.asm @@ -0,0 +1,282 @@ +;***************************************************************************** +;* MMX/SSE2/AVX-optimized 10-bit H.264 weighted prediction code +;***************************************************************************** +;* Copyright (C) 2005-2011 x264 project +;* +;* Authors: Daniel Kang +;* +;* This file is part of Libav. +;* +;* Libav 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. +;* +;* Libav 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 Libav; 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 32 + +pw_pixel_max: times 8 dw ((1 << 10)-1) +sq_1: dq 1 + dq 0 + +cextern pw_1 + +SECTION .text + +;----------------------------------------------------------------------------- +; void h264_weight(uint8_t *dst, int stride, int height, int log2_denom, +; int weight, int offset); +;----------------------------------------------------------------------------- +%macro WEIGHT_PROLOGUE 0 +.prologue: + PROLOGUE 0,6,8 + movifnidn r0, r0mp + movifnidn r1d, r1m + movifnidn r2d, r2m + movifnidn r4d, r4m + movifnidn r5d, r5m +%endmacro + +%macro WEIGHT_SETUP 0 + mova m0, [pw_1] + movd m2, r3m + pslld m0, m2 ; 1<