[FFmpeg-devel] [PATCH] QCELP decoder
Michael Niedermayer
michaelni
Fri Nov 14 23:27:23 CET 2008
On Fri, Nov 14, 2008 at 12:17:50PM -0800, Kenan Gillet wrote:
>
> On Nov 14, 2008, at 2:14 AM, Michael Niedermayer wrote:
[...]
> >
> >
> >> @@ -152,11 +537,140 @@
> >> return -1;
> >> }
> >>
> >> +/*
> >> + * Determine the framerate from the frame size and/or the first
> >> byte of the frame.
> >> + *
> >> + * @param avctx the AV codec context
> >> + * @param buf_size length of the buffer
> >> + * @param buf the bufffer
> >> + *
> >> + * @return the framerate on success, RATE_UNKNOWN otherwise.
> >> + */
> >> +static int determine_framerate(AVCodecContext *avctx,
> >> + const int buf_size,
> >> + uint8_t **buf) {
> >> + qcelp_packet_rate framerate;
> >> +
> >> + if ((framerate = buf_size2framerate(buf_size)) >= 0) {
> >> + if (framerate != **buf) {
> >
> > iam not sure but didnt you at some point reorder the enum?
> > if so how can this code be correct before and afterwards?
>
>
> I reorder the enum on the 09/07/2008, way before submitting my first
> patch to
> RATE_FULL = 0,
> RATE_HALF = 1,
> RATE_QUARTER= 2,
> RATE_OCTAVE = 3,
> I_F_Q, /*!< insufficient frame quality */
> BLANK,
> RATE_UNKNOWN
> to
> SILENCE = 0,
> RATE_OCTAVE,
> RATE_QUARTER,
> RATE_HALF,
> RATE_FULL,
> I_F_Q, /*!< insufficient frame quality */
> RATE_UNKNOWN
> in order to reflect the rate byte in the QCELP frame.
>
> and I changed on the 10/27/2008 to
> RATE_UNKNOWN = -2,
> I_F_Q, /*!< insufficient frame quality */
> SILENCE,
> RATE_OCTAVE,
> RATE_QUARTER,
> RATE_HALF,
> RATE_FULL
> when you asked me to change the
> switch (framerate)
> case RATE_FULL:
> case RATE_QUARTER:
> case RATE_OCTAVE:
> }
> to (framerate >= RATE_QUARTER)
that doesnt awnser
how the changing enum interacts with
if(framerate != [some byte from the bitstream])
[...]
> attached the round 11:
OutOfMissingAttachmentJokesException
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081114/6c0e88ec/attachment.pgp>
More information about the ffmpeg-devel
mailing list