[FFmpeg-cvslog] aacenc: fix various typos and an error message

Rostislav Pehlivanov git at videolan.org
Sat Aug 13 19:35:45 EEST 2016


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Sat Aug 13 17:34:58 2016 +0100| [6612d0493356e3cddad4a55e3c3467c52a9427c4] | committer: Rostislav Pehlivanov

aacenc: fix various typos and an error message

Too much copy and pasting.

Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>

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

 libavcodec/aaccoder.c | 22 +++++++++++-----------
 libavcodec/aacenc.c   |  2 +-
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index edf29f4..284b401 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -200,7 +200,7 @@ static void set_special_band_scalefactors(AACEncContext *s, SingleChannelElement
     int bands = 0;
 
     for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
-        for (g = 0;  g < sce->ics.num_swb; g++) {
+        for (g = 0; g < sce->ics.num_swb; g++) {
             if (sce->zeroes[w*16+g])
                 continue;
             if (sce->band_type[w*16+g] == INTENSITY_BT || sce->band_type[w*16+g] == INTENSITY_BT2) {
@@ -220,7 +220,7 @@ static void set_special_band_scalefactors(AACEncContext *s, SingleChannelElement
 
     /* Clip the scalefactor indices */
     for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
-        for (g = 0;  g < sce->ics.num_swb; g++) {
+        for (g = 0; g < sce->ics.num_swb; g++) {
             if (sce->zeroes[w*16+g])
                 continue;
             if (sce->band_type[w*16+g] == INTENSITY_BT || sce->band_type[w*16+g] == INTENSITY_BT2) {
@@ -387,7 +387,7 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
     }
     //set the same quantizers inside window groups
     for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w])
-        for (g = 0;  g < sce->ics.num_swb; g++)
+        for (g = 0; g < sce->ics.num_swb; g++)
             for (w2 = 1; w2 < sce->ics.group_len[w]; w2++)
                 sce->sf_idx[(w+w2)*16+g] = sce->sf_idx[w*16+g];
 }
@@ -408,11 +408,11 @@ static void search_for_quantizers_fast(AVCodecContext *avctx, AACEncContext *s,
     // for values above this the decoder might end up in an endless loop
     // due to always having more bits than what can be encoded.
     destbits = FFMIN(destbits, 5800);
-    //XXX: some heuristic to determine initial quantizers will reduce search time
+    //some heuristic to determine initial quantizers will reduce search time
     //determine zero bands and upper limits
     for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
         start = 0;
-        for (g = 0;  g < sce->ics.num_swb; g++) {
+        for (g = 0; g < sce->ics.num_swb; g++) {
             int nz = 0;
             float uplim = 0.0f, energy = 0.0f;
             for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
@@ -435,7 +435,7 @@ static void search_for_quantizers_fast(AVCodecContext *avctx, AACEncContext *s,
         }
     }
     for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
-        for (g = 0;  g < sce->ics.num_swb; g++) {
+        for (g = 0; g < sce->ics.num_swb; g++) {
             if (sce->zeroes[w*16+g]) {
                 sce->sf_idx[w*16+g] = SCALE_ONE_POS;
                 continue;
@@ -451,7 +451,7 @@ static void search_for_quantizers_fast(AVCodecContext *avctx, AACEncContext *s,
 
     for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
         start = w*128;
-        for (g = 0;  g < sce->ics.num_swb; g++) {
+        for (g = 0; g < sce->ics.num_swb; g++) {
             const float *scaled = s->scoefs + start;
             maxvals[w*16+g] = find_max_val(sce->ics.group_len[w], sce->ics.swb_sizes[g], scaled);
             start += sce->ics.swb_sizes[g];
@@ -470,7 +470,7 @@ static void search_for_quantizers_fast(AVCodecContext *avctx, AACEncContext *s,
             tbits = 0;
             for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
                 start = w*128;
-                for (g = 0;  g < sce->ics.num_swb; g++) {
+                for (g = 0; g < sce->ics.num_swb; g++) {
                     const float *coefs = sce->coeffs + start;
                     const float *scaled = s->scoefs + start;
                     int bits = 0;
@@ -581,7 +581,7 @@ static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChanne
     ff_init_nextband_map(sce, nextband);
     for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
         int wstart = w*128;
-        for (g = 0;  g < sce->ics.num_swb; g++) {
+        for (g = 0; g < sce->ics.num_swb; g++) {
             int noise_sfi;
             float dist1 = 0.0f, dist2 = 0.0f, noise_amp;
             float pns_energy = 0.0f, pns_tgt_energy, energy_ratio, dist_thresh;
@@ -717,7 +717,7 @@ static void mark_pns(AACEncContext *s, AVCodecContext *avctx, SingleChannelEleme
 
     memcpy(sce->band_alt, sce->band_type, sizeof(sce->band_type));
     for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
-        for (g = 0;  g < sce->ics.num_swb; g++) {
+        for (g = 0; g < sce->ics.num_swb; g++) {
             float sfb_energy = 0.0f, threshold = 0.0f, spread = 2.0f;
             float min_energy = -1.0f, max_energy = 0.0f;
             const int start = sce->ics.swb_offset[g];
@@ -776,7 +776,7 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe)
     prev_side = sce1->sf_idx[0];
     for (w = 0; w < sce0->ics.num_windows; w += sce0->ics.group_len[w]) {
         start = 0;
-        for (g = 0;  g < sce0->ics.num_swb; g++) {
+        for (g = 0; g < sce0->ics.num_swb; g++) {
             float bmax = bval2bmax(g * 17.0f / sce0->ics.num_swb) / 0.0045f;
             if (!cpe->is_mask[w*16+g])
                 cpe->ms_mask[w*16+g] = 0;
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 1d80a67..e1a2d45 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -1001,7 +1001,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
     s->coder = &ff_aac_coders[s->options.coder];
     if (s->options.coder == AAC_CODER_ANMR) {
         ERROR_IF(avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL,
-                 "The ANMR coder requires -strict -2 and some may be removed in the future\n");
+                 "The ANMR coder is considered experimental, add -strict -2 to enable!\n");
         s->options.intensity_stereo = 0;
         s->options.pns = 0;
     }



More information about the ffmpeg-cvslog mailing list