Refactored deinterlacing to avoid copying frame data