;***************************************************************************** ;* 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 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 32 sq_1: dq 1 dq 0 cextern pw_1 cextern pw_1023 %define pw_pixel_max pw_1023 SECTION .text ;----------------------------------------------------------------------------- ; void ff_h264_weight_16_10(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<