diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-05 11:25:58 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-05 11:25:58 +0000 |
commit | 092421cf0e44bb4e4700a4e2f3a86fab0038dbda (patch) | |
tree | 09f1f828b46242a5afd75b2a4c4bd7520b538b7f | |
parent | 674fe16371b52c54b6f22691b37a85bf2c2b6fea (diff) | |
download | ffmpeg-092421cf0e44bb4e4700a4e2f3a86fab0038dbda.tar.gz |
Scale rdft vissualization up by 2 so theres no unused space on the top
but rather the unimportant high frequencies are cut off if the window is
not a multiple of 2 high.
Originally committed as revision 21641 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | ffplay.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -868,7 +868,7 @@ static void video_audio_display(VideoState *s) }else{ int rdft_bits, nb_freq; nb_display_channels= FFMIN(nb_display_channels, 2); - for(rdft_bits=1; (1<<rdft_bits)<=s->height; rdft_bits++) + for(rdft_bits=1; (1<<rdft_bits)<2*s->height; rdft_bits++) ; if(rdft_bits != s->rdft_bits){ ff_rdft_end(&s->rdft); @@ -890,7 +890,7 @@ static void video_audio_display(VideoState *s) ff_rdft_calc(&s->rdft, data[ch]); } //least efficient way to do this, we should of course directly access it but its more than fast enough - for(y=0; y<nb_freq; y++){ + for(y=0; y<s->height; y++){ double w= 1/sqrt(nb_freq); int a= sqrt(w*sqrt(data[0][2*y+0]*data[0][2*y+0] + data[0][2*y+1]*data[0][2*y+1])); int b= sqrt(w*sqrt(data[1][2*y+0]*data[1][2*y+0] + data[1][2*y+1]*data[1][2*y+1])); |