00001 /* 00002 * Copyright (C) 2011 Michael Niedermayer (michaelni@gmx.at) 00003 * 00004 * This file is part of libswresample 00005 * 00006 * libswresample is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * libswresample is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with libswresample; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 00022 static void RENAME(sum2)(SAMPLE *out, const SAMPLE *in1, const SAMPLE *in2, COEFF *coeffp, int index1, int index2, int len){ 00023 int i; 00024 COEFF coeff1 = coeffp[index1]; 00025 COEFF coeff2 = coeffp[index2]; 00026 00027 for(i=0; i<len; i++) 00028 out[i] = R(coeff1*in1[i] + coeff2*in2[i]); 00029 } 00030 00031 static void RENAME(copy)(SAMPLE *out, const SAMPLE *in, COEFF *coeffp, int index, int len){ 00032 int i; 00033 COEFF coeff = coeffp[index]; 00034 for(i=0; i<len; i++) 00035 out[i] = R(coeff*in[i]); 00036 } 00037