Take a look at this code, it may give you some ideas on how to reduce the stuttering;
#Raider's Mouselook for 2.62
#By Aiden Sibley
#A note on axises:
# The camera orbits side-to-side around its Y axis and up/down around its X axis.
# These axises are appropriate when applied to camera objects, but if you want to
# apply the mouselook to another object (for instance, an empty, when making an
# over-the-shoulder view), you can change the axises by fiddling with the axis
# arguments to the the Matrix.Rotation(angle, size, axis) functions.
from mathutils import *
sensitivity = 0.001 #Sensitivity of mouselook
xlimit = math.radians(0) #Up-down viewing angle limit
own = bge.logic.getCurrentController().owner
mouse = own.sensors['mouse']
#Get the screen's middle point and the mouse position
mid = Vector([200,200]) #Substituted to sidestep issues with odd-number dimensions. Just don't use a screen smaller than 200*200.
mpos = Vector(mouse.position)
#Initialisation. (ml stands for mouselook)
if not "ml_angle" in own:
own["ml_start_mat"] = own.localOrientation.copy() #Record the initial orientation of the object
own["ml_angle"] = Vector([0,0])
mpos = mid.copy() #Ignore the mouse position on the first frame to avoid a sudden jerk.
#Get mouse position offset from the middle of the screen, apply sensitivity, and add to ml_angle.
if (("mouselook_active" in own and own["mouselook_active"]) or not "mouselook_active" in own):
own["ml_angle"] += (mpos - mid)*sensitivity
#Limit vertical viewing angle.
own["ml_angle"] = max(min(own["ml_angle"],xlimit),-xlimit)
#Generate rotation matrices from angles.
xmat = Matrix.Rotation(-own["ml_angle"],3,"X") #This is up/down
zmat = Matrix.Rotation(-own["ml_angle"],3,"Z") #This is left/right
#Combine and add to the initial orientation.
own.localOrientation = own["ml_start_mat"]*zmat*xmat
#Set mouse position to the middle of the screen.