latency of VS1063 encoding process

Designing hardware that uses VLSI Solution's devices as slave codecs such as an external MP3 decoder chip for a host microcontroller.
Post Reply
mgonen
User
Posts: 5
Joined: Mon 2019-01-07 15:46

latency of VS1063 encoding process

Post by mgonen » Mon 2019-02-25 12:55

Hello,
I am using VS1063 and STM32F4 microcontroller for MP3 encoding. I have 500mSec latency and want to reduce this delay. What is your expected latency for MP3 encoding process.

Best Regard
Mevlüt

User avatar
pasi
VLSI Staff
Posts: 1560
Joined: Thu 2010-07-15 16:04

Re: latency of VS1063 encoding process

Post by pasi » Mon 2019-02-25 16:33

What's your samplerate, channels, and bitrate?

How are you transferring the data to the decoder, and what are you using to decode?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

User avatar
pasi
VLSI Staff
Posts: 1560
Joined: Thu 2010-07-15 16:04

Re: latency of VS1063 encoding process

Post by pasi » Tue 2019-02-26 12:22

Chapter 11.6.10 of the vs1063a datasheet gives the total encoder-decoder latency (including audio FIFO) for the available samplerates. The longest latency 350ms is with 8000Hz, the rest are 250ms down to 100ms.

So, it looks like your decoder or audio output has longer latency than a vs1063a decoder.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

mgonen
User
Posts: 5
Joined: Mon 2019-01-07 15:46

Re: latency of VS1063 encoding process

Post by mgonen » Wed 2019-02-27 18:32

Thanks for reply.
My samplerate is 48000Hz and bitrate is 32Kbit. I am tarnsferring data to computer over ethernet as UDP. And I am using VLC player to decode data.
What the latency should be at least.

User avatar
pasi
VLSI Staff
Posts: 1560
Joined: Thu 2010-07-15 16:04

Re: latency of VS1063 encoding process

Post by pasi » Thu 2019-02-28 13:21

At 48kHz an mp3 frame is 24ms. The encoder requires a frame of audio for analysis and windowing, then actually encoding it before sending, and the decoder needs a full frame and the next frame header before it can decode. The encoding delay is probably around 50ms and the decoding delay about the same.

The audio FIFO in vs1063a is 2048 stereo samples, i.e. 42ms at 48kHz, but a real-time system would try to keep it as empty as possible.

The audio subsystem of the PC might have large buffers.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply