Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Buffering

computers


Buffering

Following buffer processing methods possible:

In-place



Immediate

Block buffering

In-place

Filter processes data in-place a 626e45g t buffer received with process() call. Therefore, upstream must provide a buffer that can be safely changed. This allows to avoid data copy from one buffer to another so speed up processing.

Immediate

If output data size must be larger than input data size, data is processed from input buffer to private output buffer and returned immediately. If filter cannot store all processed data into its output buffer, it produces several output chunks. This method does not produce processing lag.

Block buffering

To operate filter requires block of data that is processed at once. So filter copies input data to internal buffer until buffer fills up and only after this output chunk is produced. Also it may hold some amount of data at buffer to process next block. This method produces lag. Also this method requires flushing to release data locked at internal buffer to correctly finish the stream.

Filters may use different processing methods for different input formats. For example mixer does inplace processing if output number of channels is less or equal to input number of channels (faster) and uses immediate buffering otherwise.

When filter receives big buffer it may require step-by-step processing. So it may produce several output chunks. After filter produces first one it still have to have access to input buffer to produce next one. Therefore, we must not alter input buffer until filter processes all input data. After filter processed all data it switches to an empty state.

Even in-place filters may change output format

Even in-place filters may reduce output data size

Filter may hold reference to input buffer until it become empty. So empty filter state must guarantee that we do not use external buffers anymore.

Sources must provide buffers that can be safely changed.

Buffers that are passed to process() must not be altered until filter become empty


Document Info


Accesari: 822
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )