[FFmpeg-devel] [PATCH 1/3] aacenc: use constants to set AAC coder

Stefano Sabatini stefasab at gmail.com
Mon Sep 9 10:03:05 CEST 2013


On date Monday 2013-09-09 10:02:11 +0200, Stefano Sabatini encoded:
> On date Sunday 2013-09-08 17:02:04 -0700, Timothy Gu encoded:
> > The names of the constants comes from the ff_aac_coders array in aaccoder.c.
> > 
> > Signed-off-by: Timothy Gu <timothygu99 at gmail.com>
> > ---
> >  libavcodec/aacenc.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
> > index 362f02b..ada8ea3 100644
> > --- a/libavcodec/aacenc.c
> > +++ b/libavcodec/aacenc.c
> > @@ -791,7 +791,11 @@ static const AVOption aacenc_options[] = {
> >          {"auto",     "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.i64 = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
> >          {"ms_off",   "Disable Mid/Side coding", 0, AV_OPT_TYPE_CONST, {.i64 =  0 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
> >          {"ms_force", "Force Mid/Side for the whole frame if possible", 0, AV_OPT_TYPE_CONST, {.i64 =  1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
> > -    {"aac_coder", "", offsetof(AACEncContext, options.aac_coder), AV_OPT_TYPE_INT, {.i64 = 2}, 0, AAC_CODER_NB-1, AACENC_FLAGS},
> > +    {"aac_coder", "", offsetof(AACEncContext, options.aac_coder), AV_OPT_TYPE_INT, {.i64 = 2}, 0, AAC_CODER_NB-1, AACENC_FLAGS, "aac_coder"},
> > +        {"faac",     "FAAC-inspired method",      0, AV_OPT_TYPE_CONST, {.i64 = 0 },  INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
> > +        {"anmr",     "ANMR method",               0, AV_OPT_TYPE_CONST, {.i64 = 1 },  INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
> > +        {"twoloop",  "Two loop searching method", 0, AV_OPT_TYPE_CONST, {.i64 = 2 },  INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
> > +        {"fast",     "Constant quantizer for all bands", 0, AV_OPT_TYPE_CONST, {.i64 = 3 },  INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
> 
> LGTM, introducing some named constants would be even better though.

Nit: missing micro bump for compatibility checks.
-- 
FFmpeg = Funny and Fanciful Magnificient Patchable Educated Ghost


More information about the ffmpeg-devel mailing list