On 9/17/2015 5:43 AM, Henrik Gramner wrote: > On Thu, Sep 17, 2015 at 12:02 AM, James Almer <jamr...@gmail.com> wrote: >> +#define randomize_buffers() \ >> + do { \ >> + uint32_t r; \ >> + int i, j; \ >> + for (i = 0; i < BUF_SIZE; i += 4) { \ >> + for (j = 0; j < channels; j++) { \ >> + r = rnd() & (1 << (bits - 2)) - 1; \ >> + AV_WN32A(ref_src[j] + i, r); \ >> + AV_WN32A(new_src[j] + i, r); \ >> + } \ >> + } \ >> + } while (0) > > r could be declared and initialized at the same time.
Done. > >> + LOCAL_ALIGNED_16(uint8_t, ref_buf, [BUF_SIZE*MAX_CHANNELS]); >> + LOCAL_ALIGNED_16(uint8_t, new_buf, [BUF_SIZE*MAX_CHANNELS]); >> + uint8_t *ref_src[] = { &ref_buf[BUF_SIZE*0], &ref_buf[BUF_SIZE*1], >> &ref_buf[BUF_SIZE*2], &ref_buf[BUF_SIZE*3], >> + &ref_buf[BUF_SIZE*4], &ref_buf[BUF_SIZE*5], >> &ref_buf[BUF_SIZE*6], &ref_buf[BUF_SIZE*7] }; >> + uint8_t *new_src[] = { &new_buf[BUF_SIZE*0], &new_buf[BUF_SIZE*1], >> &new_buf[BUF_SIZE*2], &new_buf[BUF_SIZE*3], >> + &new_buf[BUF_SIZE*4], &new_buf[BUF_SIZE*5], >> &new_buf[BUF_SIZE*6], &new_buf[BUF_SIZE*7] }; > > Those could potentially be int32_t*, then you could avoid the typecast > later on. Not sure it that would actually makes things cleaner though, > so not a big deal. It looks better with the typecast inside check_decorrelate() IMO, so I'll leave it as is. > > Otherwise seems OK. Pushed, thanks. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel