From 092421cf0e44bb4e4700a4e2f3a86fab0038dbda Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 5 Feb 2010 11:25:58 +0000 Subject: [PATCH] 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 --- ffplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffplay.c b/ffplay.c index f49b79d9c4..b32c6091d2 100644 --- a/ffplay.c +++ b/ffplay.c @@ -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<height; rdft_bits++) + for(rdft_bits=1; (1<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; yheight; 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]));