[FFmpeg-devel] [PATCH] lavc/aacenc_quantization: use cbrt table

Claudio Freire klaussfreire at gmail.com
Mon Mar 14 19:13:38 CET 2016


On Sun, Mar 13, 2016 at 10:30 PM, Ganesh Ajjanagadde <gajjanag at gmail.com> wrote:
>  /**
>   * Calculate rate distortion cost for quantizing with given codebook
> @@ -105,7 +106,7 @@ static av_always_inline float quantize_and_encode_band_cost_template(
>                          curbits += 21;
>                      } else {
>                          int c = av_clip_uintp2(quant(t, Q, ROUNDING), 13);
> -                        quantized = c*cbrtf(c)*IQ;
> +                        quantized = av_int2float(ff_cbrt_tab[c])*IQ;
>                          curbits += av_log2(c)*2 - 4 + 1;
>                      }
>                  } else {

Shouldn't that be c*av_int2float(ff_cbrt_tab[c])*IQ ?


More information about the ffmpeg-devel mailing list