[FFmpeg-devel] [PATCH] TAK demuxer and decoder

Michael Niedermayer michaelni at gmx.at
Sat Oct 6 05:05:35 CEST 2012


On Fri, Oct 05, 2012 at 06:42:42AM +0000, Paul B Mahol wrote:
> On 9/30/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sat, Sep 29, 2012 at 04:27:20PM +0000, Paul B Mahol wrote:
> >> Signed-off-by: Paul B Mahol <onemda at gmail.com>
[...]
> >> +static int decorrelate(TAKDecContext *s, int c1, int c2, int length)
> >> +{
> >> +    GetBitContext  *gb = &s->gb;

> >> +    int32_t *p1 = &s->decode_buffer[c1 * s->nb_samples + 1];
> >> +    int32_t *p2 = &s->decode_buffer[c2 * s->nb_samples + 1];
> >> +    int a, b, i, j, x, tmp;
[...]
> >> +        for (i = 0; i < length; i++, p1++, p2++) {
> >> +            x   = (*p2 & 1) + 2 * *p1;
> >> +            *p1 = (  x - *p2) & 0x80000000 | (  x - *p2 >> 1);
> >> +            *p2 = (*p2 + x  ) & 0x80000000 | (*p2 + x   >> 1);
> >
> > the & 0x80000000 | seems redundant if these are signed 32bit variables
> 
> They are unsigned.

all the data types look quite signed to me

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121006/29bc71ce/attachment.asc>


More information about the ffmpeg-devel mailing list