Browse Source

Fix SSC's calculation of energy estimations

master
Apostolos Fanakis 6 years ago
parent
commit
ebaf623ab4
  1. 2
      Level_1/SSC.m
  2. 2
      Level_2/SSC.m

2
Level_1/SSC.m

@ -33,7 +33,7 @@ function frameType = SSC(~, nextFrameT, prevFrameType)
channelFrameType = {'nan', 'nan'}; channelFrameType = {'nan', 'nan'};
for channel = 1:2 for channel = 1:2
% Calculates sub-frame energy estimation % Calculates sub-frame energy estimation
[subFrames, ~] = buffer(nextFrameT(449:end - 448, channel), 256, 128, 'nodelay'); [subFrames, ~] = buffer(nextFrameT(577:end - 448, channel), 128, 0, 'nodelay');
energyEstimations = sum(subFrames .^ 2, 1); energyEstimations = sum(subFrames .^ 2, 1);
% Calculates the ratio of the sub-frame energy to the average energy of % Calculates the ratio of the sub-frame energy to the average energy of

2
Level_2/SSC.m

@ -33,7 +33,7 @@ function frameType = SSC(~, nextFrameT, prevFrameType)
channelFrameType = {'nan', 'nan'}; channelFrameType = {'nan', 'nan'};
for channel = 1:2 for channel = 1:2
% Calculates sub-frame energy estimation % Calculates sub-frame energy estimation
[subFrames, ~] = buffer(nextFrameT(449:end - 448, channel), 256, 128, 'nodelay'); [subFrames, ~] = buffer(nextFrameT(577:end - 448, channel), 128, 0, 'nodelay');
energyEstimations = sum(subFrames .^ 2, 1); energyEstimations = sum(subFrames .^ 2, 1);
% Calculates the ratio of the sub-frame energy to the average energy of % Calculates the ratio of the sub-frame energy to the average energy of

Loading…
Cancel
Save