[FFmpeg-cvslog] aacenc: make the aac coder user choosable.

Michael Niedermayer git at videolan.org
Sun Nov 27 21:37:17 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 27 21:19:30 2011 +0100| [e64edeed3ccbf6808218aeb55639e701f0dab40e] | committer: Michael Niedermayer

aacenc: make the aac coder user choosable.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e64edeed3ccbf6808218aeb55639e701f0dab40e
---

 libavcodec/aacenc.c |    3 ++-
 libavcodec/aacenc.h |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index d0b24d8..f2a184c 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -224,7 +224,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
         grouping[i] = s->chan_map[i + 1] == TYPE_CPE;
     ff_psy_init(&s->psy, avctx, 2, sizes, lengths, s->chan_map[0], grouping);
     s->psypp = ff_psy_preprocess_init(avctx);
-    s->coder = &ff_aac_coders[2];
+    s->coder = &ff_aac_coders[s->options.aac_coder];
 
     s->lambda = avctx->global_quality ? avctx->global_quality : 120;
 
@@ -690,6 +690,7 @@ static const AVOption aacenc_options[] = {
         {"auto",     "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.dbl = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
         {"ms_off",   "Disable Mid/Side coding", 0, AV_OPT_TYPE_CONST, {.dbl =  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, {.dbl =  1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
+    {"aac_coder", "", offsetof(AACEncContext, options.aac_coder), AV_OPT_TYPE_INT, {.dbl = 2}, 0, AAC_CODER_NB-1, AACENC_FLAGS},
     {NULL}
 };
 
diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h
index 8dcf27d..e48fc18 100644
--- a/libavcodec/aacenc.h
+++ b/libavcodec/aacenc.h
@@ -34,6 +34,7 @@
 
 typedef struct AACEncOptions {
     int stereo_mode;
+    int aac_coder;
 } AACEncOptions;
 
 struct AACEncContext;



More information about the ffmpeg-cvslog mailing list