TWM.m File Reference

Go to the source code of this file.

Functions

 if (zvalue==0)%avoid zero frequency peak pfreq(zindex)
 
 pmag (zindex)
 
find peak with maximum magnitude ival2 (Mloc1)
 
find second maximum magnitude peak ival2 (Mloc2)
 
initialize array of candidates f0c (1:nCand)
 
candidates f0c (nCand+1:nCand *2)
 
 f0c (nCand *2+1:nCand *3)
 
candidates within boundaries if (isempty(f0c))%if no candidates exit f0=0
 
 ErrorMP (i)
 

Variables

 function [f0, f0error]
 
pmag __pad2__
 
pmag N
 
pmag minf0
 
pmag maxf0
 
pmag f0error =100
 
frequency in Hertz of peaks [zvalue, zindex] = min(pfreq)
 
end ival2 = pmag
 
clear max peak [Mmag2, Mloc2] = max(ival2)
 
find third maximum magnitude peak nCand = 3
 
number of possible f0 candidates for each max peak f0c = zeros(1,3*nCand)
 
return end harmonic = f0c
 
 ErrorPM = zeros(fliplr(size(harmonic)))
 
initialize PM errors MaxNPM = min(10,length(ploc))
 
for i
 
 difmatrixPM = abs(difmatrixPM-ones(fliplr(size(harmonic)))*pfreq')
 
 Ponddif = FreqDistance .* (harmonic'.^(-0.5))
 
 PeakMag = pmag(peakloc)
 
 MagFactor = 10.^((PeakMag-Mmag1)./20)
 
end ErrorMP = zeros(fliplr(size(harmonic)))
 
initialize MP errors MaxNMP = min(10,length(pfreq))
 
 nharm = (nharm>=1).*nharm + (nharm<1)
 
 FreqDistance = abs(pfreq(1:MaxNMP) - nharm*f0c(i))
 
end Error = (ErrorPM/MaxNPM) + (0.3*ErrorMP/MaxNMP)
 
total errors [f0error, f0index] = min(Error)
 
get the smallest error f0 = f0c(f0index)
 

Function Documentation

ErrorMP ( i  )
initialize array of candidates f0c ( 1:nCand  )
candidates f0c ( nCand+1:nCand 2)
f0c ( nCand *2+1:nCand 3)
if ( zvalue  = =0)
candidates within boundaries if ( isempty(f0c )
pure virtual
find peak with maximum magnitude ival2 ( Mloc1  )
find second maximum magnitude peak ival2 ( Mloc2  )
pmag ( zindex  )

Variable Documentation

pmag __pad2__

Definition at line 2 of file TWM.m.

difmatrixPM = abs(difmatrixPM-ones(fliplr(size(harmonic)))*pfreq')

Definition at line 34 of file TWM.m.

end Error = (ErrorPM/MaxNPM) + (0.3*ErrorMP/MaxNMP)

Definition at line 53 of file TWM.m.

end ErrorMP = zeros(fliplr(size(harmonic)))

Definition at line 42 of file TWM.m.

ErrorPM = zeros(fliplr(size(harmonic)))

Definition at line 30 of file TWM.m.

total errors[f0error, f0index] = min(Error)

Definition at line 54 of file TWM.m.

get the smallest error f0 = f0c(f0index)

Definition at line 55 of file TWM.m.

f0c = zeros(1,3*nCand)

Definition at line 20 of file TWM.m.

f0error =100

Definition at line 2 of file TWM.m.

FreqDistance = abs(pfreq(1:MaxNMP) - nharm*f0c(i))

Definition at line 47 of file TWM.m.

function[f0, f0error]
Initial value:
= TWM (ploc, pmag, N, fs, minf0, maxf0)
% Two-way mismatch algorithm (by Beauchamp&Maher)
pmag(zindex)
function ploc
function fs
pmag maxf0
Definition: TWM.m:2
pmag minf0
Definition: TWM.m:2
pmag N
Definition: TWM.m:2

Definition at line 2 of file TWM.m.

harmonic = f0c

Definition at line 29 of file TWM.m.

for i
Initial value:
=1:MaxNPM % predicted to measured mismatch error
difmatrixPM = harmonic' * ones(size(pfreq))'
initialize PM errors MaxNPM
Definition: TWM.m:31
difmatrixPM
Definition: TWM.m:34
return end harmonic
Definition: TWM.m:29
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

Definition at line 32 of file TWM.m.

end ival2 = pmag

Definition at line 13 of file TWM.m.

MagFactor = 10.^((PeakMag-Mmag1)./20)

Definition at line 38 of file TWM.m.

pmag maxf0

Definition at line 2 of file TWM.m.

initialize MP errors MaxNMP = min(10,length(pfreq))

Definition at line 43 of file TWM.m.

initialize PM errors MaxNPM = min(10,length(ploc))

Definition at line 31 of file TWM.m.

pmag minf0

Definition at line 2 of file TWM.m.

pmag N

Definition at line 2 of file TWM.m.

find third maximum magnitude peak nCand = 3

Definition at line 19 of file TWM.m.

nharm = (nharm>=1).*nharm + (nharm<1)

Definition at line 46 of file TWM.m.

clear second max peak[Mmag3, Mloc3] = max(ival2)

Definition at line 16 of file TWM.m.

PeakMag = pmag(peakloc)

Definition at line 37 of file TWM.m.

frequency in Hertz of peaks[zvalue, zindex] = min(pfreq)

Definition at line 8 of file TWM.m.

Ponddif = FreqDistance .* (harmonic'.^(-0.5))

Definition at line 36 of file TWM.m.