[FFmpeg-devel] [PATCH] QCELP decoder
Kenan Gillet
kenan.gillet
Sat Oct 18 02:39:54 CEST 2008
On Oct 17, 2008, at 4:30 PM, Michael Niedermayer wrote:
> On Thu, Oct 16, 2008 at 03:38:03PM -0700, Kenan Gillet wrote:
>> On Oct 15, 2008, at 3:09 PM, Michael Niedermayer wrote:
>>
>>> cOn Tue, Oct 14, 2008 at 06:59:34PM -0700, Kenan Gillet wrote:
> [...]
>>> [...]
>>>> + case SILENCE:
>>>> + av_log_missing_feature(avctx, "Blank frame", 1);
>>>> + default:
>>>> + q->framerate = I_F_Q;
>>>
>>> is it intended that SILENCE sets IFQ ?
>>
>> The SILENCE handling is not yet implemented.
>> I have no sample to test it on, and was planning to implement it
>> later
>> on.
>> Do you want me me to work on it for the next round ?
>
> i guess no, but a //FIXME or more than one may be a good idea to
> indicate
> where something is incomplete
done
> [...]
>>> [...]
>>>
>>>> + if (q->framerate == I_F_Q) {
>>>> +erasure:
>>>> + q->framerate = I_F_Q;
>>>> + q->erasure_count++;
>>>> + decode_scaled_codebook_vector(q, outbuffer);
>>>> + decode_lspf(q, qtzd_lspf);
>>>> + apply_pitch_filters(q, outbuffer);
>>>> + }
>>>> +
>>>> + formant_mem = q->formant_mem;
>>>> + for (i = 0; i < 4; i++) {
>>>> + interpolate_lpc(q, qtzd_lspf, lpc, i);
>>>> +
>>>> + do_formant(outbuffer + i * 40, lpc, formant_mem);
>>>> +
>>>> + // WIP Adaptive postfilter should be here
>>>> +
>>>> + formant_mem = outbuffer + i * 40 + 30;
>>>> + }
>>>> + memcpy(q->formant_mem, outbuffer + 150, 10 * sizeof(float));
>>>> +
>>>
>>>> + if (q->framerate != I_F_Q)
>>>> + q->erasure_count = 0;
>>>
>>> cant this be a else above?
>>
>> it can. done
>>
>>
>>>> +
>>>> + for (i = 0; i < 160; i++)
>>>> + outbuffer[i] = av_clipf(outbuffer[i], -8192., 8191.75) /
>>>> 8192.;
>>>
>>> cant this scale factor be merged into some tables?
>>
>> by merging it in qcelp_g12ga and testing on the samples
>> from samples.mplayerhq.hu and others:
>>
>> I use 'ffmpeg --i sample_file sample_file.wav' to create the output
>> I use md5sum to check if the output had changed
>> and run 'tiny_psnr old_file new_file' if it had.
>>
>> here are the results:
> [...]
>> qtaudio-qcelp-problem.3g2: audio mismatchs from previous build
>> stddev: 11.93 PSNR: 26.59 bytes: 208044/ 208044
>>
> [...]
>> zg3dx2d6.3g2: audio mismatchs from previous build
>> stddev: 17.77 PSNR: 23.12 bytes: 486444/ 486444
>>
>> vidoo_MP4_audio_Qcelp13k.k3g: audio mismatchs from previous build
>> stddev: 10.94 PSNR: 27.34 bytes: 743724/ 743724
>>
>>
>> does it look reasonable ? is at acceptable?
>
> i think not, question is, why do these differ?
> There really should be no difference just from scaling floats
> differently
I'll look into it
More information about the ffmpeg-devel
mailing list