output example: store the scaling context in the stream context