[FFmpeg-soc] G723.1 Frame Parser
Ronald S. Bultje
rsbultje at gmail.com
Mon Apr 5 22:48:16 CEST 2010
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.
Ronald
More information about the FFmpeg-soc
mailing list