[FFmpeg-cvslog] r21641 - trunk/ffplay.c
michael
subversion
Fri Feb 5 12:25:58 CET 2010
Author: michael
Date: Fri Feb 5 12:25:58 2010
New Revision: 21641
Log:
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.
Modified:
trunk/ffplay.c
Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c Fri Feb 5 05:42:20 2010 (r21640)
+++ trunk/ffplay.c Fri Feb 5 12:25:58 2010 (r21641)
@@ -868,7 +868,7 @@ static void video_audio_display(VideoSta
}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(VideoSta
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]));
More information about the ffmpeg-cvslog
mailing list