• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavfilter/

Lines Matching refs:vol

113     VolumeContext *vol = ctx->priv;
114 return set_expr(&vol->volume_pexpr, vol->volume_expr, ctx);
119 VolumeContext *vol = ctx->priv;
120 av_expr_free(vol->volume_pexpr);
121 av_opt_free(vol);
126 VolumeContext *vol = ctx->priv;
156 formats = ff_make_format_list(sample_fmts[vol->precision]);
215 static av_cold void volume_init(VolumeContext *vol)
217 vol->samples_align = 1;
219 switch (av_get_packed_sample_fmt(vol->sample_fmt)) {
221 if (vol->volume_i < 0x1000000)
222 vol->scale_samples = scale_samples_u8_small;
224 vol->scale_samples = scale_samples_u8;
227 if (vol->volume_i < 0x10000)
228 vol->scale_samples = scale_samples_s16_small;
230 vol->scale_samples = scale_samples_s16;
233 vol->scale_samples = scale_samples_s32;
236 avpriv_float_dsp_init(&vol->fdsp, 0);
237 vol->samples_align = 4;
240 avpriv_float_dsp_init(&vol->fdsp, 0);
241 vol->samples_align = 8;
246 ff_volume_init_x86(vol);
251 VolumeContext *vol = ctx->priv;
253 vol->volume = av_expr_eval(vol->volume_pexpr, vol->var_values, NULL);
254 if (isnan(vol->volume)) {
255 if (vol->eval_mode == EVAL_MODE_ONCE) {
260 vol->volume = 0;
263 vol->var_values[VAR_VOLUME] = vol->volume;
266 vol->var_values[VAR_N], vol->var_values[VAR_T], vol->var_values[VAR_PTS],
267 precision_str[vol->precision]);
269 if (vol->precision == PRECISION_FIXED) {
270 vol->volume_i = (int)(vol->volume * 256 + 0.5);
271 vol->volume = vol->volume_i / 256.0;
272 av_log(ctx, AV_LOG_VERBOSE, "volume_i:%d/255 ", vol->volume_i);
275 vol->volume, 20.0*log(vol->volume)/M_LN10);
277 volume_init(vol);
284 VolumeContext *vol = ctx->priv;
287 vol->sample_fmt = inlink->format;
288 vol->channels = inlink->channels;
289 vol->planes = av_sample_fmt_is_planar(inlink->format) ? vol->channels : 1;
291 vol->var_values[VAR_N] =
292 vol->var_values[VAR_NB_CONSUMED_SAMPLES] =
293 vol->var_values[VAR_NB_SAMPLES] =
294 vol->var_values[VAR_POS] =
295 vol->var_values[VAR_PTS] =
296 vol->var_values[VAR_STARTPTS] =
297 vol->var_values[VAR_STARTT] =
298 vol->var_values[VAR_T] =
299 vol->var_values[VAR_VOLUME] = NAN;
301 vol->var_values[VAR_NB_CHANNELS] = inlink->channels;
302 vol->var_values[VAR_TB] = av_q2d(inlink->time_base);
303 vol->var_values[VAR_SAMPLE_RATE] = inlink->sample_rate;
306 vol->var_values[VAR_TB],
307 vol->var_values[VAR_SAMPLE_RATE],
308 vol->var_values[VAR_NB_CHANNELS]);
316 VolumeContext *vol = ctx->priv;
320 if ((ret = set_expr(&vol->volume_pexpr, args, ctx)) < 0)
322 if (vol->eval_mode == EVAL_MODE_ONCE)
336 VolumeContext *vol = inlink->dst->priv;
344 if (sd && vol->replaygain != REPLAYGAIN_IGNORE) {
345 if (vol->replaygain != REPLAYGAIN_DROP) {
351 if (vol->replaygain == REPLAYGAIN_TRACK &&
372 vol->volume = pow(10, (g + vol->replaygain_preamp) / 20);
373 if (vol->replaygain_noclip)
374 vol->volume = FFMIN(vol->volume, 1.0 / p);
375 vol->volume_i = (int)(vol->volume * 256 + 0.5);
377 volume_init(vol);
382 if (isnan(vol->var_values[VAR_STARTPTS])) {
383 vol->var_values[VAR_STARTPTS] = TS2D(buf->pts);
384 vol->var_values[VAR_STARTT ] = TS2T(buf->pts, inlink->time_base);
386 vol->var_values[VAR_PTS] = TS2D(buf->pts);
387 vol->var_values[VAR_T ] = TS2T(buf->pts, inlink->time_base);
388 vol->var_values[VAR_N ] = inlink->frame_count;
391 vol->var_values[VAR_POS] = pos == -1 ? NAN : pos;
392 if (vol->eval_mode == EVAL_MODE_FRAME)
395 if (vol->volume == 1.0 || vol->volume_i == 256) {
415 if (vol->precision != PRECISION_FIXED || vol->volume_i > 0) {
419 plane_samples = FFALIGN(nb_samples, vol->samples_align);
421 plane_samples = FFALIGN(nb_samples * vol->channels, vol->samples_align);
423 if (vol->precision == PRECISION_FIXED) {
424 for (p = 0; p < vol->planes; p++) {
425 vol->scale_samples(out_buf->extended_data[p],
427 vol->volume_i);
429 } else if (av_get_packed_sample_fmt(vol->sample_fmt) == AV_SAMPLE_FMT_FLT) {
430 for (p = 0; p < vol->planes; p++) {
431 vol->fdsp.vector_fmul_scalar((float *)out_buf->extended_data[p],
433 vol->volume, plane_samples);
436 for (p = 0; p < vol->planes; p++) {
437 vol->fdsp.vector_dmul_scalar((double *)out_buf->extended_data[p],
439 vol->volume, plane_samples);
450 vol->var_values[VAR_NB_CONSUMED_SAMPLES] += out_buf->nb_samples;