On 09/03/2011 10:44 AM, Christian König wrote: > Looks good, I'm going to push it, but one small thing: > > Am Freitag, den 02.09.2011, 16:20 +0200 schrieb Maarten Lankhorst: >> The preferred solution to keeping track of the picture structure >> has been putting it in the state tracker, so use picture_structure >> instead of frame_started to check if a frame needs to begin. >> >> If picture_structure has been changed, end the frame and start again. >> >> Signed-off-by: Maarten Lankhorst <m.b.lankho...@gmail.com> > [snip] > >> @@ -273,7 +277,8 @@ Status XvMCRenderSurface(Display *dpy, XvMCContext >> *context, unsigned int pictur >> xvmc_mb = macroblocks->macro_blocks + first_macroblock; >> >> /* If the surface we're rendering hasn't changed the ref frames >> shouldn't change. */ >> - if (target_surface_priv->frame_started && ( >> + if (target_surface_priv->picture_structure > 0 && >> + target_surface_priv->picture_structure != picture_structure && ( >> target_surface_priv->ref[0] != past_surface || >> target_surface_priv->ref[1] != future_surface || >> (xvmc_mb->x == 0 && xvmc_mb->y == 0))) { > That looks a bit odd, since we would call end_frame only when the > picture structure change, and that never happens for progressive > contents. I think it should look something like: >> if (target_surface_priv->picture_structure > 0 && ( >> target_surface_priv->picture_structure != picture_structure || >> target_surface_priv->ref[0] != past_surface || >> target_surface_priv->ref[1] != future_surface || > So we call end_frame under the following conditions: > 1. begin_frame was called (picture structure is set) AND ( > 2. picture structure changes OR > 3. ref frames change OR > 4. mb address is (0,0) > ) You're right, that check is messed up, the ( should be moved up a line. Thanks for catching that. :)
~Maarten _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev