1 /*
2 * Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at)
3 *
4 * This file is part of libswresample
5 *
6 * libswresample is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * libswresample is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with libswresample; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
23
25
27 #define C15DB 1.189207115
29 #define C_15DB 0.840896415
30 #define C_30DB M_SQRT1_2
31 #define C_45DB 0.594603558
33
34 #define OFFSET(x) offsetof(SwrContext,x)
35 #define PARAM AV_OPT_FLAG_AUDIO_PARAM
36
66
70
72
84
89
90 /* duplicate option in order to work with avconv */
92
96 {"precision" , "set soxr resampling precision (in bits)"
98 {"cheby" , "enable soxr Chebyshev passband & higher-precision irrational ratio approximation"
100 {"min_comp" , "set minimum difference between timestamps and audio data (in seconds) below which no timestamp compensation of either kind is applied"
102 {"min_hard_comp" , "set minimum difference between timestamps and audio data (in seconds) to trigger padding/trimming the data."
104 {"comp_duration" , "set duration (in seconds) over which data is stretched/squeezed to make it match the timestamps."
106 {"max_soft_comp" , "set maximum factor by which data is stretched/squeezed to make it match the timestamps."
108 {"async" , "simplified 1 parameter audio timestamp matching, 0(disabled), 1(filling and trimming), >1(maximum stretch/squeeze in samples per second)"
110 {"first_pts" , "Assume the first pts should be this value (in samples)."
112
117
122
124
126 {0}
127 };
128
130 return "SWR";
131 }
132
138 .log_level_offset_offset =
OFFSET(log_level_offset),
139 .parent_log_context_offset =
OFFSET(log_ctx),
141 };
142
144 {
146 }
147
150 if(s){
153 }
155 }