yading@10: The official guide to swresample for confused developers. yading@10: ========================================================= yading@10: yading@10: Current (simplified) Architecture: yading@10: --------------------------------- yading@10: Input yading@10: v yading@10: __________________/|\___________ yading@10: / | \ yading@10: / input sample format convert v yading@10: / | ___________/ yading@10: | |/ yading@10: | v yading@10: | ___________/|\___________ _____________ yading@10: | / | \ | | yading@10: | Rematrix | resample <---->| Buffers | yading@10: | \___________ | ___________/ |_____________| yading@10: v \|/ yading@10: Special Converter v yading@10: v ___________/|\___________ _____________ yading@10: | / | \ | | yading@10: | Rematrix | resample <---->| Buffers | yading@10: | \___________ | ___________/ |_____________| yading@10: | \|/ yading@10: | v yading@10: | |\___________ yading@10: \ | \ yading@10: \ output sample format convert v yading@10: \_________________ | ___________/ yading@10: \|/ yading@10: v yading@10: Output yading@10: yading@10: Planar/Packed conversion is done when needed during sample format conversion. yading@10: Every step can be skipped without memcpy when it is not needed. yading@10: Either Resampling and Rematrixing can be performed first depending on which yading@10: way it is faster. yading@10: The Buffers are needed for resampling due to resamplng being a process that yading@10: requires future and past data, it thus also introduces inevitably a delay when yading@10: used. yading@10: Internally 32bit float and 16bit int is supported currently, other formats can yading@10: easily be added. yading@10: Externally all sample formats in packed and planar configuration are supported yading@10: It's also trivial to add special converters for common cases. yading@10: If only sample format and/or packed/planar conversion is needed, it yading@10: is performed from input to output directly in a single pass with no intermediates.