1 /*
2 * Format Conversion Utils
3 * Copyright (c) 2000, 2001 Fabrice Bellard
4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
26
29 {
30 int i;
32 dst[i] = src[i] * mul;
33 }
34
38 {
39 int i;
40 for (i = 0; i <
len; i += 8)
42 }
43
45 {
48
53 }
54
55 /* ffdshow custom code */
57 {
59 if(channels==2){
61 dst[2*i] = src[0][i] / 32768.0f;
62 dst[2*i+1] = src[1][i] / 32768.0f;
63 }
64 }else{
65 for(c=0; c<channels; c++)
66 for(i=0, j=c; i<
len; i++, j+=channels)
67 dst[j] = src[c][i] / 32768.0f;
68 }
69 }
70
72 {
74 if(channels==2){
76 dst[2*i] = src[0][i];
77 dst[2*i+1] = src[1][i];
78 }
79 }else{
80 for(c=0; c<channels; c++)
81 for(i=0, j=c; i<
len; i++, j+=channels)
82 dst[j] = src[c][i];
83 }
84 }