[FFmpeg-soc] G723.1 Frame Parser

Mohamed Naufal naufal11 at gmail.com
Fri Apr 23 16:35:28 CEST 2010


On 6 April 2010 02:18, Ronald S. Bultje <rsbultje at gmail.com> wrote:

> Hi Mohamed,
>
> On Mon, Apr 5, 2010 at 8:55 AM, Mohamed Naufal <naufal11 at gmail.com> wrote:
> > +    temp = get_bits(&gb, 7);
> > +    if (temp <= 123)       // test if forbidden code
> > +        frame->subframe[0].pitch_lag = temp + PITCH_MIN;
> > +    else
> > +        return -1;         // transmission error
> > +
>
> temp = get_bits(&gb, 7);
> if ((temp & 0x7c) == 0x7c) OR if (temp > 123) (whichever you prefer)
>    return -1;
> frame->subframe[0].pitch_lag = ..
>
> Saves one line of code.
>
> > +    temp = get_bits(&gb, 7);
> > +    if (temp <= 123)
> > +        frame->subframe[1].pitch_lag = temp + PITCH_MIN;
> > +    else
> > +        return -1;
>
> Same.
>
> Rest seems OK to me, I'll leave it to Benjamin since I think he will
> be mentor (is that right?). Also I didn't check code for correctness,
> I can do that but only will if Benjamin isn't doing so already.
>
>

Ok, fixed. Also added CODEC_CAP_SUBFRAMES.
Please take a look.

Regards,
Naufal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: g723.1.patch
Type: text/x-patch
Size: 7391 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100423/3235f389/attachment.bin>


More information about the FFmpeg-soc mailing list