ma sample coding