On , Christian König &lt;deathsimple@vodafone.de&gt; wrote:<br />&gt; Am Donnerstag, den 14.07.2011, 15:04 +0200 schrieb Michel Dänzer:<br />&gt; <br />&gt; &gt; On Mit, 2011-07-13 at 16:28 -0600, Brian Paul wrote:<br />&gt; <br />&gt; &gt; &gt; Silences many warnings about &quot;type of bit-field ‘field_select’ is a<br />&gt; <br />&gt; &gt; &gt; GCC extension&quot;.<br />&gt; <br />&gt; &gt; &gt; ---<br />&gt; <br />&gt; &gt; &gt;  src/gallium/include/pipe/p_video_state.h |    8 ++++----<br />&gt; <br />&gt; &gt; &gt;  1 files changed, 4 insertions(+), 4 deletions(-)<br />&gt; <br />&gt; &gt; &gt;<br />&gt; <br />&gt; &gt; &gt; diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h<br />&gt; <br />&gt; &gt; &gt; index 5b47b15..1f42ac5 100644<br />&gt; <br />&gt; &gt; &gt; --- a/src/gallium/include/pipe/p_video_state.h<br />&gt; <br />&gt; &gt; &gt; +++ b/src/gallium/include/pipe/p_video_state.h<br />&gt; <br />&gt; &gt; &gt; @@ -49,8 +49,8 @@ struct pipe_motionvector<br />&gt; <br />&gt; &gt; &gt;  {<br />&gt; <br />&gt; &gt; &gt;     struct {<br />&gt; <br />&gt; &gt; &gt;        signed x:16, y:16;<br />&gt; <br />&gt; &gt; &gt; -      enum pipe_video_field_select field_select:16;<br />&gt; <br />&gt; &gt; &gt; -      enum pipe_video_mv_weight weight:16;<br />&gt; <br />&gt; &gt; &gt; +      unsigned field_select:16; /** <br />&gt; &gt; &gt; +      unsigned weight:16;  /** <br />&gt; &gt; &gt;     } top, bottom;<br />&gt; <br />&gt; &gt; &gt;  };<br />&gt; <br />&gt; &gt; &gt;<br />&gt; <br />&gt; &gt; &gt; @@ -58,8 +58,8 @@ struct pipe_motionvector<br />&gt; <br />&gt; &gt; &gt;  struct pipe_ycbcr_block<br />&gt; <br />&gt; &gt; &gt;  {<br />&gt; <br />&gt; &gt; &gt;     unsigned x:8, y:8;<br />&gt; <br />&gt; &gt; &gt; -   enum pipe_mpeg12_dct_intra intra:8;<br />&gt; <br />&gt; &gt; &gt; -   enum pipe_mpeg12_dct_type coding:8;<br />&gt; <br />&gt; &gt; &gt; +   unsigned intra:8;  /** <br />&gt; &gt; &gt; +   unsigned coding:8; /** <br />&gt; &gt; &gt;  };<br />&gt; <br />&gt; &gt; &gt;<br />&gt; <br />&gt; &gt; &gt;  struct pipe_picture_desc<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; &gt; Out of curiosity, what&#39;s the benefit of using bitfields here at all, as<br />&gt; <br />&gt; &gt; opposed to fixed size integer types?<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; &gt; IME bitfields are generally best avoided if possible.<br />&gt; <br />&gt; There is no real benefit, those are there just for historical reasons. I<br />&gt; <br />&gt; started with and interface that looked some like this:<br />&gt; <br />&gt; <br />&gt; <br />&gt; app copies info into XvMC structure-&gt;XvMC state tracker copies into<br />&gt; <br />&gt; those pipe structures-&gt;driver copies them into vertex buffers.<br />&gt; <br />&gt; <br />&gt; <br />&gt; That were a bit too much copy things around for my taste, so I changed<br />&gt; <br />&gt; the driver interface to directly export pointers to the vertex buffers<br />&gt; <br />&gt; with types of pipe_motionvector/pipe_ycbcr_block and was so happy about<br />&gt; <br />&gt; the speed improvements that I forgotten to clean that up.<br />&gt; <br />&gt; <br />&gt; <br />&gt; I just put it onto my todo list, but not as prio 1. I&#39;ve anybody has<br />&gt; <br />&gt; time to spare feel free to clean it up.<br /><br />I wasn&#39;t going to bring this up until I had all the hardware decoding bits sorted out, however since you mention it, &quot;vertex buffers&quot; make no sense in a video decoding interface. You can&#39;t assume that a driver can provide such a buffer for motion vectors. Also, you moved the buffering policy out into the state tracker, which means that every driver will have to buffer an entire frame&#39;s worth of data even if the hardware doesn&#39;t support such things. I&#39;ve backed out of some of these things in my local tree for my own purposes, but they&#39;ll have to be fixed properly eventually.