added pipe reinterlacing code