[FFmpeg-devel] [PATCH] Reduce default FDK decoder delay by one frame

Timothy Gu timothygu99 at gmail.com
Thu Feb 27 03:07:33 CET 2014


On Wed, Feb 26, 2014 at 7:48 AM, Omer Osman
<omer.osman at iis.fraunhofer.de> wrote:
> The default concealment method in the FDK decoder is Energy
> Interpolation. This method requires one frame delay to the output. To
> reduce the default output delay, use Noise Substitution as the default
> concealment method.
>
> Signed-off-by: Omer Osman <omer.osman at iis.fraunhofer.de>
> ---
>  libavcodec/libfdk-aacdec.c |   16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
> index c833a98..c848aaa 100644
> --- a/libavcodec/libfdk-aacdec.c
> +++ b/libavcodec/libfdk-aacdec.c
> @@ -1,18 +1,20 @@
>  /*
>   * AAC decoder wrapper
>   * Copyright (c) 2012 Martin Storsjo

> + * Copyright (c) 2014 Fraunhofer IIS (Authors: Conrad Benndorf, Omer Osman)

I really feel that this 7-line change doesn't deserve another
copyright header (especially of two people), but it is up to you.

>   *
>   * This file is part of FFmpeg.

> + * Do not use non-GPL-compatible AAC decoders if you also use FFmpeg
> + * together with GPL-licensed modules, such as the FFmpeg GPL modules.

Unneeded. Already documented in configure and
http://ffmpeg.org/ffmpeg-codecs.html#libfdk_005faac

>   *
>   * 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.
> + * License, version 2.1 (only) as published by the Free Software Foundation.
>   *
>   * 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.
> + * Lesser General Public License, version 2.1, for more details.

See the other comments. This is not OK.

>   *
>   * You should have received a copy of the GNU Lesser General Public
>   * License along with FFmpeg; if not, write to the Free Software
> @@ -45,8 +47,7 @@ typedef struct FDKAACDecContext {
>  #define OFFSET(x) offsetof(FDKAACDecContext, x)
>  #define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
>  static const AVOption fdk_aac_dec_options[] = {

> -    { "conceal", "Error concealment method", OFFSET(conceal_method), AV_OPT_TYPE_INT, { .i64 = CONCEAL_METHOD_DEFAULT }, CONCEAL_METHOD_DEFAULT, CONCEAL_METHOD_NB - 1, AD, "conceal" },
> -    { "default",  "Default",              0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_DEFAULT },              INT_MIN, INT_MAX, AD, "conceal" },

> +    { "conceal", "Error concealment method", OFFSET(conceal_method), AV_OPT_TYPE_INT, { .i64 = CONCEAL_METHOD_NOISE_SUBSTITUTION }, CONCEAL_METHOD_DEFAULT, CONCEAL_METHOD_NB - 1, AD, "conceal" },

You are a) changing default, and b) removing an option. You need _at
least_ a minor bump.

>      { "spectral", "Spectral muting",      0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_SPECTRAL_MUTING },      INT_MIN, INT_MAX, AD, "conceal" },
>      { "noise",    "Noise Substitution",   0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_NOISE_SUBSTITUTION },   INT_MIN, INT_MAX, AD, "conceal" },
>      { "energy",   "Energy Interpolation", 0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_ENERGY_INTERPOLATION }, INT_MIN, INT_MAX, AD, "conceal" },

[...]

Timothy


More information about the ffmpeg-devel mailing list