X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvorbisenc.c;h=f16060e45067bbdfa4fa332f0ff1e36328125534;hb=c9ef6b09326a24010bf86d6b0d19cfa42df4d546;hp=db0394a7dc24c051f0e2f400e0804a697221855f;hpb=f073b1500e3b53835034b7421db0a1cf5bea05a0;p=ffmpeg diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c index db0394a7dc2..f16060e4506 100644 --- a/libavcodec/vorbisenc.c +++ b/libavcodec/vorbisenc.c @@ -189,7 +189,7 @@ static int ready_codebook(vorbis_enc_codebook *cb) cb->pow2[i] += cb->dimensions[i * cb->ndimensions + j] * cb->dimensions[i * cb->ndimensions + j]; div *= vals; } - cb->pow2[i] /= 2.; + cb->pow2[i] /= 2.0; } } return 0; @@ -728,7 +728,7 @@ static void floor_fit(vorbis_enc_context *venc, vorbis_enc_floor *fc, { int range = 255 / fc->multiplier + 1; int i; - float tot_average = 0.; + float tot_average = 0.0; float averages[MAX_FLOOR_VALUES]; for (i = 0; i < fc->values; i++) { averages[i] = get_floor_average(fc, coeffs, i); @@ -881,7 +881,7 @@ static int residue_encode(vorbis_enc_context *venc, vorbis_enc_residue *rc, assert(rc->type == 2); assert(real_ch == 2); for (p = 0; p < partitions; p++) { - float max1 = 0., max2 = 0.; + float max1 = 0.0, max2 = 0.0; int s = rc->begin + p * psize; for (k = s; k < s + psize; k += 2) { max1 = FFMAX(max1, fabs(coeffs[ k / real_ch])); @@ -968,7 +968,7 @@ static int apply_window_and_mdct(vorbis_enc_context *venc, int i, channel; const float * win = venc->win[0]; int window_len = 1 << (venc->log2_blocksize[0] - 1); - float n = (float)(1 << venc->log2_blocksize[0]) / 4.; + float n = (float)(1 << venc->log2_blocksize[0]) / 4.0; // FIXME use dsp if (!venc->have_saved && !samples) @@ -1195,6 +1195,7 @@ error: AVCodec ff_vorbis_encoder = { .name = "vorbis", + .long_name = NULL_IF_CONFIG_SMALL("Vorbis"), .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_VORBIS, .priv_data_size = sizeof(vorbis_enc_context), @@ -1204,5 +1205,4 @@ AVCodec ff_vorbis_encoder = { .capabilities = CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, - .long_name = NULL_IF_CONFIG_SMALL("Vorbis"), };