[soc]: r4173 - in aacenc: aaccoder.c aacenc.c aacenc.h
Author: kostya Date: Tue Mar 17 18:26:55 2009 New Revision: 4173 Log: Pass lambda as parameter to encode_window_bands_info() as well Modified: aacenc/aaccoder.c aacenc/aacenc.c aacenc/aacenc.h Modified: aacenc/aaccoder.c ============================================================================== --- aacenc/aaccoder.c Tue Mar 17 18:24:05 2009 (r4172) +++ aacenc/aaccoder.c Tue Mar 17 18:26:55 2009 (r4173) @@ -467,7 +467,7 @@ typedef struct BandCodingPath { * Encode band info for single window group bands. */ static void encode_window_bands_info(AACEncContext *s, SingleChannelElement *sce, - int win, int group_len) + int win, int group_len, const float lambda) { BandCodingPath path[120][12]; int w, swb, cb, start, start2, size; @@ -502,7 +502,7 @@ static void encode_window_bands_info(AAC FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(win+w)*16+swb]; rd += quantize_band_cost(sce->coeffs + start + w*128, size, sce->sf_idx[(win+w)*16+swb], cb, - s->lambda / band->threshold, INFINITY, NULL); + lambda / band->threshold, INFINITY, NULL); } if( run_value_bits[sce->ics.num_windows == 8][path[swb][cb].run] != run_value_bits[sce->ics.num_windows == 8][path[swb][cb].run+1]) Modified: aacenc/aacenc.c ============================================================================== --- aacenc/aacenc.c Tue Mar 17 18:24:05 2009 (r4172) +++ aacenc/aacenc.c Tue Mar 17 18:26:55 2009 (r4173) @@ -362,7 +362,7 @@ static void encode_band_info(AACEncConte int w; for(w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]){ - s->coder->encode_window_bands_info(s, sce, w, sce->ics.group_len[w]); + s->coder->encode_window_bands_info(s, sce, w, sce->ics.group_len[w], s->lambda); } } Modified: aacenc/aacenc.h ============================================================================== --- aacenc/aacenc.h Tue Mar 17 18:24:05 2009 (r4172) +++ aacenc/aacenc.h Tue Mar 17 18:26:55 2009 (r4173) @@ -36,7 +36,7 @@ typedef struct AACCoefficientsEncoder{ void (*search_for_quantizers)(AVCodecContext *avctx, struct AACEncContext *s, SingleChannelElement *sce, const float lambda); void (*encode_window_bands_info)(struct AACEncContext *s, SingleChannelElement *sce, - int win, int group_len); + int win, int group_len, const float lambda); void (*quantize_and_encode_band)(PutBitContext *pb, const float *in, int size, int scale_idx, int cb, const float lambda); void (*search_for_ms)(struct AACEncContext *s, ChannelElement *cpe, const float lambda);
participants (1)
-
kostya