comparison twinvq.c @ 10174:89cd870ca180 libavcodec

Add two more sizes to ff_sine_windows[] and also pad it with NULLs so that FF_ELEMS(ff_sine_windows[x]) == 1 << x. Fix issue 1384.
author vitor
date Tue, 15 Sep 2009 16:18:16 +0000
parents eb28ab65409c
children 38ab367d4231
comparison
equal deleted inserted replaced
10173:f55ca9a2b948 10174:89cd870ca180
646 ff_imdct_half(&tctx->mdct_ctx[ftype], buf1 + bsize*j, in + bsize*j); 646 ff_imdct_half(&tctx->mdct_ctx[ftype], buf1 + bsize*j, in + bsize*j);
647 647
648 tctx->dsp.vector_fmul_window(out2, 648 tctx->dsp.vector_fmul_window(out2,
649 prev_buf + (bsize-wsize)/2, 649 prev_buf + (bsize-wsize)/2,
650 buf1 + bsize*j, 650 buf1 + bsize*j,
651 ff_sine_windows[av_log2(wsize) - 7], 651 ff_sine_windows[av_log2(wsize)],
652 0.0, 652 0.0,
653 wsize/2); 653 wsize/2);
654 out2 += wsize; 654 out2 += wsize;
655 655
656 memcpy(out2, buf1 + bsize*j + wsize/2, (bsize - wsize/2)*sizeof(float)); 656 memcpy(out2, buf1 + bsize*j + wsize/2, (bsize - wsize/2)*sizeof(float));
901 for (j = 1; j < m/8; j++) 901 for (j = 1; j < m/8; j++)
902 tctx->cos_tabs[i][m/4-j] = tctx->cos_tabs[i][j]; 902 tctx->cos_tabs[i][m/4-j] = tctx->cos_tabs[i][j];
903 } 903 }
904 904
905 905
906 ff_sine_window_init(ff_sine_windows[av_log2(size_m) - 7], size_m ); 906 ff_sine_window_init(ff_sine_windows[av_log2(size_m) ], size_m );
907 ff_sine_window_init(ff_sine_windows[av_log2(size_s/2) - 7], size_s/2); 907 ff_sine_window_init(ff_sine_windows[av_log2(size_s/2) ], size_s/2);
908 ff_sine_window_init(ff_sine_windows[av_log2(mtab->size) - 7], mtab->size); 908 ff_sine_window_init(ff_sine_windows[av_log2(mtab->size)], mtab->size);
909 } 909 }
910 910
911 /** 911 /**
912 * Interpret the data as if it were a num_blocks x line_len[0] matrix and for 912 * Interpret the data as if it were a num_blocks x line_len[0] matrix and for
913 * each line do a cyclic permutation, i.e. 913 * each line do a cyclic permutation, i.e.