ThinkMeta LogoDeutsch
English
LAME: Computation of the psychoacoustic properties

This is the first task that processes a frame. It is divided into two sub tasks:

  1. Determination of the block type (long/short)
  2. Computation of the energy, entropy, and so forth

Since the determination of the blocktype only depends on the input data, the task can be described in an asynchronous programming lanuage as follows:

PsychoAcoustics(frames)
{
  AttackDetection(frames);
  RestOfPsychoAcoustics(frames);
}

1. Determination of the block type (AttackDetection)
As mentioned above, the determination of the block type only depends on the converted samples. The block type is determined for each sub frame (granule) and each channel. It is needed by the MDCT task and also by the quantizer.

2. Computation of the psychoacoustic properties
This task depends directly on the determination of the block type. Only when encoding in constant bit rate (CBR) an additional dependency to the quantizer exists. The computed values are needed by the quantizer.

Several classes were implemented for the entire task. They are located in the "PSY" folder in the project workspace.

Optimizations:
Besides the division of the task into two sub tasks it was also possible to speed up parts by using SSE2 instructions.

After determination of the block types of the first granule's channels, the results are released immediately for further processing while the determination of second granule's block types is still pending.

The most important change was, however, the dissolution of a dependency on the quantizer: In the original version the value "maskingLower" which is used for the computation of the psychoacoustic properties, is calculated in the quantizer. Since the calculation of "maskingLower" is simple, it's also calculated here in this task without having to wait for the quantizer.

Thus we get the following dependency diagram:

Psychoakustik

Further optimization possibilities were not examined in the case study.