[FFmpeg-devel] [PATCH] QCELP decoder

Kenan Gillet kenan.gillet
Mon Dec 1 17:17:52 CET 2008


On Dec 1, 2008, at 4:52 AM, Michael Niedermayer wrote:

> On Sun, Nov 30, 2008 at 05:04:07PM -0800, Kenan Gillet wrote:
>> Hi,
>> On Nov 30, 2008, at 7:50 AM, Michael Niedermayer wrote:
>>
>>> On Sat, Nov 29, 2008 at 10:39:58AM -0800, Kenan Gillet wrote:
>>>> Hi all,
>>>>
>>>> sorry for the delay. I was waiting to resolve the parsing/ 
>>>> decoding of
>>>> the bitrate/packet type issue.
>>>> Reynaldo and I agreed on IRC to live the parsing/decoding as it is
>>>> for now.
>>>>
>>>> So here is round 13 of the qcelp decoder.
>>>> - QCELPContext was split so that it can be moved into qcelpdec.c  
>>>> and
>>>> only keep the unpacked data structure (QCELPFrame) in qcelpdata.h
>>>> - add doxy comments on QCELPFrame field
>>>> - simplify decode_gain_and_index for RATE_OCTAVE and IFQ
>>>> - rename qcelp_bits_per_rate into qcelp_unpacking_bitmaps_lengths
>>>> - use double in qcelp_lsp.c
>>>>
>>>> have a great day
>>>>
>>>> Kenan
>>>
>>>> Index: libavcodec/qcelp.h
>>>> ===================================================================
>>>> --- libavcodec/qcelp.h	(revision 0)
>>>> +++ libavcodec/qcelp.h	(revision 0)
>>>> @@ -0,0 +1,48 @@
>>>> +/*
>>>> + * QCELP decoder
>>>> + * Copyright (c) 2007 Reynaldo H. Verdejo Pinochet
>>>> + *
>>>> + * This file is part of FFmpeg.
>>>> + *
>>>> + * FFmpeg is free software; you can redistribute it and/or
>>>> + * modify it under the terms of the GNU Lesser General Public
>>>> + * License as published by the Free Software Foundation; either
>>>> + * version 2.1 of the License, or (at your option) any later
>>>> version.
>>>> + *
>>>> + * FFmpeg is distributed in the hope that it will be useful,
>>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
>>>> GNU
>>>> + * Lesser General Public License for more details.
>>>> + *
>>>> + * You should have received a copy of the GNU Lesser General  
>>>> Public
>>>> + * License along with FFmpeg; if not, write to the Free Software
>>>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
>>>> 02110-1301 USA
>>>> + */
>>>> +
>>>> +#ifndef AVCODEC_QCELP_H
>>>> +#define AVCODEC_QCELP_H
>>>> +
>>>> +/**
>>>> + * @file qcelp.h
>>>> + * QCELP decoder
>>>> + * @author Reynaldo H. Verdejo Pinochet
>>>> + */
>>>> +
>>>
>>>> +typedef enum
>>>> +{
>>>> +    I_F_Q = -1,           /*!< insufficient frame quality */
>>>> +    SILENCE,
>>>> +    RATE_OCTAVE,
>>>> +    RATE_QUARTER,
>>>> +    RATE_HALF,
>>>> +    RATE_FULL
>>>> +} qcelp_packet_rate;
>>>
>>> i think this could be in qcelpdec.c ?
>>
>> done,
>>
>> I think we should also get rid of qcelp.h since it only contains
>> the declaration of qcelp_lspf2lpc, which beg the question of
>> what file should the qcelp_lsp.c code be in ?
>
> you can just put the declaration in qcelpdec.c

done


> [...]
>>>> +    /**
>>>> +     * reserved bits on all bitrate but bitrate 1/2 packets
>>>
>>> this is unclear, field that is on all but ... , vs. field that
>>> exists always but
>>> is reserved on all but .....
>>>
>>
>> is "reserved bits only set for bitrate 1, 1/4 and 1/8" better ?
>
> no, because setting them means error IIRC
> also IIRC there is no indication of the existence of other fields  
> for the
> other rates ...
>

reserved bits only present in bitrate 1, 1/4 and 1/8 packets

?





More information about the ffmpeg-devel mailing list