FFT of a Simple Sinusoid.m
Go to the documentation of this file.
1 % Example 1: FFT of a DFT_Sinusoid
2 
3 % Parameters:
4 N=64; % Must be a power of two
5 T=1; % Set sampling rate to 1
6 A=1; % Sinusoidal Amplitude
7 phi=0; % Sinusoidal phase
8 f=0.25; % Frequency (cycles/sample)
9 n=[0:N-1]; % Discrete Time axis
10 x=A*cos(2*pi*n*f*T+phi); % Sampled sinusoid
11 X=fft(x); % Spectrum
12 
13 % Plot time data:
14 figure(1);
15 subplot(3,1,1);
16 plot(n,x,'*k');
17 ni= [0:.1:N-1]; % Interpolated time axis
18 hold on;
19 plot(ni,A*cos(2*pi*ni*f*T+phi),'-k'); grid off;
20 title('Sinusoid at 1/4 the Spampling Rate');
21 xlabel('Time (samples)');
22 ylabel('Amplitude');
23 text(-8,1,'a)');
24 hold off;
25 
26 % Plot spectral magnitude;
27 magX= abs(X);
28 fn=[0:1/N:1-1/N]; %Normalized frequency axis
29 sublplot(3,1,2);
30 stem(fn,magX,'ok');grid on;
31 xlabel('Normalized Frequency(cycles per sample))');
32 ylabel('Magnitude(Linear)');
33 text(-.11,40,'b)');
34 
35 % Same thing on a dB scale:
36 spec=20*log10(magX); %Spectral magitude in dB
37 subplot(3,1,3);
38 plot(fn,spec,'--ok'); grid on;
39 axis([0 1 -350 50]);
40 xlabel('Normalized Frequency (ccles per sample))');
41 ylabel('Magnitude(dB)');
42 text('Magnitude(dB)');
43 text(-.11,50, 'c)');
44 cmd=['print -deps ', '../eps/example1.eps'];
45 disp(cmd); eval(cmd);
Rate
Definition: g723_1_data.h:60
title('Sinusoid at 1/4 the Spampling Rate')
Sinusoidal phase f
Frequency(cycles/sample) n
About Git write you should know how to use GIT properly Luckily Git comes with excellent documentation git help man git shows you the available git< command > help man git< command > shows information about the subcommand< command > The most comprehensive manual is the website Git Reference visit they are quite exhaustive You do not need a special username or password All you need is to provide a ssh public key to the Git server admin What follows now is a basic introduction to Git and some FFmpeg specific guidelines Read it at least if you are granted commit privileges to the FFmpeg project you are expected to be familiar with these rules I if not You can get git from etc no matter how small Every one of them has been saved from looking like a fool by this many times It s very easy for stray debug output or cosmetic modifications to slip in
Definition: git-howto.txt:5
Interpolated time axis hold on
#define sample
text(-8, 1,'a)')
#define b
Definition: input.c:42
#define N
Definition: vf_pp7.c:200
figure
Definition: genspecsines2.m:3
Plot spectral magnitude
axis([0 1-350 50])
Sinusoidal Amplitude phi
Discrete Time axis x
stem(fn, magX,'ok')
Spectrum Plot time data
ylabel('Amplitude')
Sampled sinusoid X
eval(cmd)
Normalized frequency axis sublplot(3, 1, 2)
plot(n, x,'*k')
for k
subplot(3, 1, 1)
Set sampling rate to A
fftbuffer, N fft()
disp(cmd)
FFmpeg Automated Testing Environment ************************************Table of Contents *****************FFmpeg Automated Testing Environment Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass target exec to configure or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script tests fate sh from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at doc fate_config sh template Create a configuration that suits your based on the configuration template The slot configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern< arch >< os >< compiler >< compiler version > The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the fate_recv variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ssh command with one or more v options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory FATE makefile targets and variables *************************************Makefile can be set to
Definition: fate.txt:142
Must be a power of two T
static double c[64]
Same thing on a dB scale
xlabel('Time(samples)')
Filter the word “frame” indicates either a video frame or a group of audio samples