[xiph-commits] r14385 - in trunk/theora: examples include/theora lib/dec lib/dec/x86 lib/enc tests

giles at svn.xiph.org giles at svn.xiph.org
Wed Jan 9 11:53:19 PST 2008


Author: giles
Date: 2008-01-09 11:53:18 -0800 (Wed, 09 Jan 2008)
New Revision: 14385

Modified:
   trunk/theora/examples/encoder_example.c
   trunk/theora/include/theora/codec.h
   trunk/theora/lib/dec/decapiwrapper.c
   trunk/theora/lib/dec/decode.c
   trunk/theora/lib/dec/internal.c
   trunk/theora/lib/dec/state.c
   trunk/theora/lib/dec/x86/mmxstate.c
   trunk/theora/lib/enc/encapiwrapper.c
   trunk/theora/tests/granulepos.c
Log:
Rename the 'ystride' member of the th_img_plane struct to 'stride'.

The y was for vertical, to distinguish from a possible future xstride
to allow pixel packing, but this was easily confused with the y of
Y'CrCb color planes. This is less confusing, and I think it makes
more sense to add support for chunked images in a deparate type.

THIS IS AN INCOMPATIBLE CHANGE in the new theora-exp API.


Modified: trunk/theora/examples/encoder_example.c
===================================================================
--- trunk/theora/examples/encoder_example.c	2008-01-09 13:40:47 UTC (rev 14384)
+++ trunk/theora/examples/encoder_example.c	2008-01-09 19:53:18 UTC (rev 14385)
@@ -1028,16 +1028,16 @@
          with the reference encoder.*/
       ycbcr[0].width=frame_w;
       ycbcr[0].height=frame_h;
-      ycbcr[0].ystride=pic_w;
+      ycbcr[0].stride=pic_w;
       ycbcr[0].data=yuvframe[0]-pic_x-pic_y*pic_w;
       ycbcr[1].width=frame_c_w;
       ycbcr[1].height=frame_c_h;
-      ycbcr[1].ystride=c_w;
+      ycbcr[1].stride=c_w;
       ycbcr[1].data=yuvframe[0]+pic_sz-(pic_x/dst_c_dec_h)-
        (pic_y/dst_c_dec_v)*c_w;
       ycbcr[2].width=frame_c_w;
       ycbcr[2].height=frame_c_h;
-      ycbcr[2].ystride=c_w;
+      ycbcr[2].stride=c_w;
       ycbcr[2].data=ycbcr[1].data+c_sz;
 
       th_encode_ycbcr_in(td,ycbcr);

Modified: trunk/theora/include/theora/codec.h
===================================================================
--- trunk/theora/include/theora/codec.h	2008-01-09 13:40:47 UTC (rev 14384)
+++ trunk/theora/include/theora/codec.h	2008-01-09 19:53:18 UTC (rev 14385)
@@ -130,8 +130,8 @@
  * This contains the image data in a left-to-right, top-down format.
  * Each row of pixels is stored contiguously in memory, but successive rows
  *  need not be.
- * Use \a ystride to compute the offset of the next row.
- * The encoder accepts both positive \a ystride values (top-down in memory) and
+ * Use \a stride to compute the offset of the next row.
+ * The encoder accepts both positive \a stride values (top-down in memory) and
  *  negative (bottom-up in memory).
  * The decoder currently always generates images with positive strides.*/
 typedef struct{
@@ -140,7 +140,7 @@
   /**The height of this plane.*/
   int            height;
   /**The offset in bytes between successive rows.*/
-  int            ystride;
+  int            stride;
   /**A pointer to the beginning of the first row.*/
   unsigned char *data;
 }th_img_plane;

Modified: trunk/theora/lib/dec/decapiwrapper.c
===================================================================
--- trunk/theora/lib/dec/decapiwrapper.c	2008-01-09 13:40:47 UTC (rev 14384)
+++ trunk/theora/lib/dec/decapiwrapper.c	2008-01-09 19:53:18 UTC (rev 14385)
@@ -189,10 +189,10 @@
   if(ret>=0){
     _yuv->y_width=buf[0].width;
     _yuv->y_height=buf[0].height;
-    _yuv->y_stride=buf[0].ystride;
+    _yuv->y_stride=buf[0].stride;
     _yuv->uv_width=buf[1].width;
     _yuv->uv_height=buf[1].height;
-    _yuv->uv_stride=buf[1].ystride;
+    _yuv->uv_stride=buf[1].stride;
     _yuv->y=buf[0].data;
     _yuv->u=buf[1].data;
     _yuv->v=buf[2].data;

Modified: trunk/theora/lib/dec/decode.c
===================================================================
--- trunk/theora/lib/dec/decode.c	2008-01-09 13:40:47 UTC (rev 14384)
+++ trunk/theora/lib/dec/decode.c	2008-01-09 19:53:18 UTC (rev 14385)
@@ -1366,9 +1366,9 @@
        _dec->pp_frame_data,frame_sz*sizeof(_dec->pp_frame_data[0]));
       _dec->pp_frame_buf[0].width=_dec->state.info.frame_width;
       _dec->pp_frame_buf[0].height=_dec->state.info.frame_height;
-      _dec->pp_frame_buf[0].ystride=-_dec->pp_frame_buf[0].width;
+      _dec->pp_frame_buf[0].stride=-_dec->pp_frame_buf[0].width;
       _dec->pp_frame_buf[0].data=_dec->pp_frame_data+
-       (1-_dec->pp_frame_buf[0].height)*_dec->pp_frame_buf[0].ystride;
+       (1-_dec->pp_frame_buf[0].height)*_dec->pp_frame_buf[0].stride;
     }
     else{
       size_t y_sz;
@@ -1386,15 +1386,15 @@
        _dec->pp_frame_data,frame_sz*sizeof(_dec->pp_frame_data[0]));
       _dec->pp_frame_buf[0].width=_dec->state.info.frame_width;
       _dec->pp_frame_buf[0].height=_dec->state.info.frame_height;
-      _dec->pp_frame_buf[0].ystride=_dec->pp_frame_buf[0].width;
+      _dec->pp_frame_buf[0].stride=_dec->pp_frame_buf[0].width;
       _dec->pp_frame_buf[0].data=_dec->pp_frame_data;
       _dec->pp_frame_buf[1].width=c_w;
       _dec->pp_frame_buf[1].height=c_h;
-      _dec->pp_frame_buf[1].ystride=_dec->pp_frame_buf[1].width;
+      _dec->pp_frame_buf[1].stride=_dec->pp_frame_buf[1].width;
       _dec->pp_frame_buf[1].data=_dec->pp_frame_buf[0].data+y_sz;
       _dec->pp_frame_buf[2].width=c_w;
       _dec->pp_frame_buf[2].height=c_h;
-      _dec->pp_frame_buf[2].ystride=_dec->pp_frame_buf[2].width;
+      _dec->pp_frame_buf[2].stride=_dec->pp_frame_buf[2].width;
       _dec->pp_frame_buf[2].data=_dec->pp_frame_buf[1].data+c_sz;
       oc_ycbcr_buffer_flip(_dec->pp_frame_buf,_dec->pp_frame_buf);
     }
@@ -1602,7 +1602,7 @@
   {
     int i,j,k;
     int framei=_dec->state.ref_frame_idx[OC_FRAME_SELF];
-    int ystride=_dec->state.ref_frame_bufs[framei][_pli].ystride;
+    int ystride=_dec->state.ref_frame_bufs[framei][_pli].stride;
     int *fragi_end = _pipe->coded_fragis[_pli];
     int *fragi = fragi_end-_pipe->ncoded_fragis[_pli];
 
@@ -1754,48 +1754,48 @@
    (_fragy_end+notdone-_fragy0-notstart)*fplane->nhfrags*sizeof(variance[0]));
   /*Except for the first time, we want to point to the middle of the row.*/
   y=(_fragy0<<3)+(notstart<<2);
-  dst=_dst->data+y*_dst->ystride;
-  src=_src->data+y*_src->ystride;
+  dst=_dst->data+y*_dst->stride;
+  src=_src->data+y*_src->stride;
   for(;y<4;y++){
     memcpy(dst,src,_dst->width*sizeof(dst[0]));
-    dst+=_dst->ystride;
-    src+=_src->ystride;
+    dst+=_dst->stride;
+    src+=_src->stride;
   }
   /*We also want to skip the last row in the frame for this loop.*/
   y_end=_fragy_end-!notdone<<3;
   for(;y<y_end;y+=8){
     qstep=_dec->pp_dc_scale[*dc_qi];
     flimit=(qstep*3)>>2;
-    oc_filter_hedge(dst,_dst->ystride,src-_src->ystride,_src->ystride,
+    oc_filter_hedge(dst,_dst->stride,src-_src->stride,_src->stride,
      qstep,flimit,variance,variance+fplane->nhfrags);
     variance++;
     dc_qi++;
     for(x=8;x<_dst->width;x+=8){
       qstep=_dec->pp_dc_scale[*dc_qi];
       flimit=(qstep*3)>>2;
-      oc_filter_hedge(dst+x,_dst->ystride,src+x-_src->ystride,_src->ystride,
+      oc_filter_hedge(dst+x,_dst->stride,src+x-_src->stride,_src->stride,
        qstep,flimit,variance,variance+fplane->nhfrags);
-      oc_filter_vedge(dst+x-(_dst->ystride<<2)-4,_dst->ystride,
+      oc_filter_vedge(dst+x-(_dst->stride<<2)-4,_dst->stride,
        qstep,flimit,variance-1);
       variance++;
       dc_qi++;
     }
-    dst+=_dst->ystride<<3;
-    src+=_src->ystride<<3;
+    dst+=_dst->stride<<3;
+    src+=_src->stride<<3;
   }
   /*And finally, handle the last row in the frame, if it's in the range.*/
   if(!notdone){
     for(;y<_dst->height;y++){
       memcpy(dst,src,_dst->width*sizeof(dst[0]));
-      dst+=_dst->ystride;
-      src+=_src->ystride;
+      dst+=_dst->stride;
+      src+=_src->stride;
     }
     /*Filter the last row of vertical block edges.*/
     dc_qi++;
     for(x=8;x<_dst->width;x+=8){
       qstep=_dec->pp_dc_scale[*dc_qi++];
       flimit=(qstep*3)>>2;
-      oc_filter_vedge(dst+x-(_dst->ystride<<3)-4,_dst->ystride,
+      oc_filter_vedge(dst+x-(_dst->stride<<3)-4,_dst->stride,
        qstep,flimit,variance++);
     }
   }
@@ -1928,7 +1928,7 @@
   strong=_dec->pp_level>=(_pli?OC_PP_LEVEL_SDERINGC:OC_PP_LEVEL_SDERINGY);
   sthresh=_pli?OC_DERING_THRESH4:OC_DERING_THRESH3;
   y=_fragy0<<3;
-  idata=iplane->data+y*iplane->ystride;
+  idata=iplane->data+y*iplane->stride;
   y_end=_fragy_end<<3;
   for(;y<y_end;y+=8){
     for(x=0;x<iplane->width;x+=8){
@@ -1939,30 +1939,30 @@
       var=*variance;
       b=(x<=0)|(x+8>=iplane->width)<<1|(y<=0)<<2|(y+8>=iplane->height)<<3;
       if(strong&&var>sthresh){
-        oc_dering_block(idata+x,iplane->ystride,b,
+        oc_dering_block(idata+x,iplane->stride,b,
          _dec->pp_dc_scale[qi],_dec->pp_sharp_mod[qi],1);
         if(_pli||(b&1)&&*(variance-1)>OC_DERING_THRESH4||
          (b&2)&&variance[1]>OC_DERING_THRESH4||
          (b&4)&&*(variance-fplane->nvfrags)>OC_DERING_THRESH4||
          (b&8)&&variance[fplane->nvfrags]>OC_DERING_THRESH4){
-          oc_dering_block(idata+x,iplane->ystride,b,
+          oc_dering_block(idata+x,iplane->stride,b,
            _dec->pp_dc_scale[qi],_dec->pp_sharp_mod[qi],1);
-          oc_dering_block(idata+x,iplane->ystride,b,
+          oc_dering_block(idata+x,iplane->stride,b,
            _dec->pp_dc_scale[qi],_dec->pp_sharp_mod[qi],1);
         }
       }
       else if(var>OC_DERING_THRESH2){
-        oc_dering_block(idata+x,iplane->ystride,b,
+        oc_dering_block(idata+x,iplane->stride,b,
          _dec->pp_dc_scale[qi],_dec->pp_sharp_mod[qi],1);
       }
       else if(var>OC_DERING_THRESH1){
-        oc_dering_block(idata+x,iplane->ystride,b,
+        oc_dering_block(idata+x,iplane->stride,b,
          _dec->pp_dc_scale[qi],_dec->pp_sharp_mod[qi],0);
       }
       frag++;
       variance++;
     }
-    idata+=iplane->ystride<<3;
+    idata+=iplane->stride<<3;
   }
 }
 

Modified: trunk/theora/lib/dec/internal.c
===================================================================
--- trunk/theora/lib/dec/internal.c	2008-01-09 13:40:47 UTC (rev 14384)
+++ trunk/theora/lib/dec/internal.c	2008-01-09 19:53:18 UTC (rev 14385)
@@ -354,8 +354,8 @@
   for(pli=0;pli<3;pli++){
     _dst[pli].width=_src[pli].width;
     _dst[pli].height=_src[pli].height;
-    _dst[pli].ystride=-_src[pli].ystride;
-    _dst[pli].data=_src[pli].data+(1-_dst[pli].height)*_dst[pli].ystride;
+    _dst[pli].stride=-_src[pli].stride;
+    _dst[pli].data=_src[pli].data+(1-_dst[pli].height)*_dst[pli].stride;
   }
 }
 

Modified: trunk/theora/lib/dec/state.c
===================================================================
--- trunk/theora/lib/dec/state.c	2008-01-09 13:40:47 UTC (rev 14384)
+++ trunk/theora/lib/dec/state.c	2008-01-09 19:53:18 UTC (rev 14385)
@@ -486,12 +486,12 @@
   /*Set up the width, height and stride for the image buffers.*/
   _state->ref_frame_bufs[0][0].width=info->frame_width;
   _state->ref_frame_bufs[0][0].height=info->frame_height;
-  _state->ref_frame_bufs[0][0].ystride=yhstride;
+  _state->ref_frame_bufs[0][0].stride=yhstride;
   _state->ref_frame_bufs[0][1].width=_state->ref_frame_bufs[0][2].width=
    info->frame_width>>!(info->pixel_fmt&1);
   _state->ref_frame_bufs[0][1].height=_state->ref_frame_bufs[0][2].height=
    info->frame_height>>!(info->pixel_fmt&2);
-  _state->ref_frame_bufs[0][1].ystride=_state->ref_frame_bufs[0][2].ystride=
+  _state->ref_frame_bufs[0][1].stride=_state->ref_frame_bufs[0][2].stride=
    chstride;
   memcpy(_state->ref_frame_bufs[1],_state->ref_frame_bufs[0],
    sizeof(_state->ref_frame_bufs[0]));
@@ -615,15 +615,15 @@
   int               hpadding;
   hpadding=OC_UMV_PADDING>>(_pli!=0&&!(_state->info.pixel_fmt&1));
   iplane=_state->ref_frame_bufs[_refi]+_pli;
-  apix=iplane->data+_y0*iplane->ystride;
+  apix=iplane->data+_y0*iplane->stride;
   bpix=apix+iplane->width-1;
-  epix=iplane->data+_yend*iplane->ystride;
+  epix=iplane->data+_yend*iplane->stride;
   /*Note the use of != instead of <, which allows ystride to be negative.*/
   while(apix!=epix){
     memset(apix-hpadding,apix[0],hpadding);
     memset(bpix+1,bpix[0],hpadding);
-    apix+=iplane->ystride;
-    bpix+=iplane->ystride;
+    apix+=iplane->stride;
+    bpix+=iplane->stride;
   }
 }
 
@@ -646,13 +646,13 @@
   iplane=_state->ref_frame_bufs[_refi]+_pli;
   fullw=iplane->width+(hpadding<<1);
   apix=iplane->data-hpadding;
-  bpix=iplane->data+(iplane->height-1)*iplane->ystride-hpadding;
-  epix=apix-iplane->ystride*vpadding;
+  bpix=iplane->data+(iplane->height-1)*iplane->stride-hpadding;
+  epix=apix-iplane->stride*vpadding;
   while(apix!=epix){
-    memcpy(apix-iplane->ystride,apix,fullw);
-    memcpy(bpix+iplane->ystride,bpix,fullw);
-    apix-=iplane->ystride;
-    bpix+=iplane->ystride;
+    memcpy(apix-iplane->stride,apix,fullw);
+    memcpy(bpix+iplane->stride,bpix,fullw);
+    apix-=iplane->stride;
+    bpix+=iplane->stride;
   }
 }
 
@@ -705,7 +705,7 @@
         frag->buffer[_buf_idx]=hpix;
         hpix+=8;
       }
-      vpix+=iplane->ystride<<3;
+      vpix+=iplane->stride<<3;
     }
   }
 }
@@ -902,7 +902,7 @@
   }
   /*Fill in the target buffer.*/
   dst_framei=_state->ref_frame_idx[OC_FRAME_SELF];
-  dst_ystride=_state->ref_frame_bufs[dst_framei][_pli].ystride;
+  dst_ystride=_state->ref_frame_bufs[dst_framei][_pli].stride;
   /*For now ystride values in all ref frames assumed to be equal.*/
   if(_frag->mbmode==OC_MODE_INTRA){
     oc_frag_recon_intra(_state,_frag->buffer[dst_framei],dst_ystride,res_buf);
@@ -912,7 +912,7 @@
     int ref_ystride;
     int mvoffsets[2];
     ref_framei=_state->ref_frame_idx[OC_FRAME_FOR_MODE[_frag->mbmode]];
-    ref_ystride=_state->ref_frame_bufs[ref_framei][_pli].ystride;
+    ref_ystride=_state->ref_frame_bufs[ref_framei][_pli].stride;
     if(oc_state_get_mv_offsets(_state,mvoffsets,_frag->mv[0],_frag->mv[1],
      ref_ystride,_pli)>1){
       oc_frag_recon_inter2(_state,_frag->buffer[dst_framei],dst_ystride,
@@ -950,8 +950,8 @@
   int        src_ystride;
   dst_framei=_state->ref_frame_idx[_dst_frame];
   src_framei=_state->ref_frame_idx[_src_frame];
-  dst_ystride=_state->ref_frame_bufs[dst_framei][_pli].ystride;
-  src_ystride=_state->ref_frame_bufs[src_framei][_pli].ystride;
+  dst_ystride=_state->ref_frame_bufs[dst_framei][_pli].stride;
+  src_ystride=_state->ref_frame_bufs[src_framei][_pli].stride;
   fragi_end=_fragis+_nfragis;
   for(fragi=_fragis;fragi<fragi_end;fragi++){
     oc_fragment   *frag;
@@ -1062,17 +1062,17 @@
     while(frag<frag_end){
       if(frag->coded){
         if(frag>frag0){
-          loop_filter_h(frag->buffer[_refi],iplane->ystride,_bv);
+          loop_filter_h(frag->buffer[_refi],iplane->stride,_bv);
         }
         if(frag0>frag_top){
-          loop_filter_v(frag->buffer[_refi],iplane->ystride,_bv);
+          loop_filter_v(frag->buffer[_refi],iplane->stride,_bv);
         }
         if(frag+1<frag_end&&!(frag+1)->coded){
-          loop_filter_h(frag->buffer[_refi]+8,iplane->ystride,_bv);
+          loop_filter_h(frag->buffer[_refi]+8,iplane->stride,_bv);
         }
         if(frag+fplane->nhfrags<frag_bot&&!(frag+fplane->nhfrags)->coded){
           loop_filter_v((frag+fplane->nhfrags)->buffer[_refi],
-           iplane->ystride,_bv);
+           iplane->stride,_bv);
         }
       }
 
@@ -1110,7 +1110,7 @@
 	  for(i=0,j=0;j<8;j++){
 	    for(k=0;k<8;k++,i++)
 	      f->loop[i] = src[k];
-	    src+=iplane->ystride;
+	    src+=iplane->stride;
 	  }
 	}
       }
@@ -1177,9 +1177,9 @@
   y_row=_state->ref_frame_bufs[framei][0].data;
   u_row=_state->ref_frame_bufs[framei][1].data;
   v_row=_state->ref_frame_bufs[framei][2].data;
-  y_stride=_state->ref_frame_bufs[framei][0].ystride;
-  u_stride=_state->ref_frame_bufs[framei][1].ystride;
-  v_stride=_state->ref_frame_bufs[framei][2].ystride;
+  y_stride=_state->ref_frame_bufs[framei][0].stride;
+  u_stride=_state->ref_frame_bufs[framei][1].stride;
+  v_stride=_state->ref_frame_bufs[framei][2].stride;
   /*Chroma up-sampling is just done with a box filter.
     This is very likely what will actually be used in practice on a real
      display, and also removes one more layer to search in for the source of

Modified: trunk/theora/lib/dec/x86/mmxstate.c
===================================================================
--- trunk/theora/lib/dec/x86/mmxstate.c	2008-01-09 13:40:47 UTC (rev 14384)
+++ trunk/theora/lib/dec/x86/mmxstate.c	2008-01-09 19:53:18 UTC (rev 14385)
@@ -145,7 +145,7 @@
   }
   /*Fill in the target buffer.*/
   dst_framei=_state->ref_frame_idx[OC_FRAME_SELF];
-  dst_ystride=_state->ref_frame_bufs[dst_framei][_pli].ystride;
+  dst_ystride=_state->ref_frame_bufs[dst_framei][_pli].stride;
   /*For now ystride values in all ref frames assumed to be equal.*/
   if(_frag->mbmode==OC_MODE_INTRA){
     oc_frag_recon_intra_mmx(_frag->buffer[dst_framei],dst_ystride,res_buf);
@@ -155,7 +155,7 @@
     int ref_ystride;
     int mvoffsets[2];
     ref_framei=_state->ref_frame_idx[OC_FRAME_FOR_MODE[_frag->mbmode]];
-    ref_ystride=_state->ref_frame_bufs[ref_framei][_pli].ystride;
+    ref_ystride=_state->ref_frame_bufs[ref_framei][_pli].stride;
     if(oc_state_get_mv_offsets(_state,mvoffsets,_frag->mv[0],_frag->mv[1],
      ref_ystride,_pli)>1){
       oc_frag_recon_inter2_mmx(_frag->buffer[dst_framei],dst_ystride,
@@ -187,8 +187,8 @@
   long       src_ystride;
   dst_framei=_state->ref_frame_idx[_dst_frame];
   src_framei=_state->ref_frame_idx[_src_frame];
-  dst_ystride=_state->ref_frame_bufs[dst_framei][_pli].ystride;
-  src_ystride=_state->ref_frame_bufs[src_framei][_pli].ystride;
+  dst_ystride=_state->ref_frame_bufs[dst_framei][_pli].stride;
+  src_ystride=_state->ref_frame_bufs[src_framei][_pli].stride;
   fragi_end=_fragis+_nfragis;
   for(fragi=_fragis;fragi<fragi_end;fragi++){
     oc_fragment   *frag;
@@ -626,17 +626,17 @@
     while(frag<frag_end){
       if(frag->coded){
         if(frag>frag0){
-          loop_filter_h(frag->buffer[_refi],iplane->ystride,ll);
+          loop_filter_h(frag->buffer[_refi],iplane->stride,ll);
         }
         if(frag0>frag_top){
-          loop_filter_v(frag->buffer[_refi],iplane->ystride,ll);
+          loop_filter_v(frag->buffer[_refi],iplane->stride,ll);
         }
         if(frag+1<frag_end&&!(frag+1)->coded){
-          loop_filter_h(frag->buffer[_refi]+8,iplane->ystride,ll);
+          loop_filter_h(frag->buffer[_refi]+8,iplane->stride,ll);
         }
         if(frag+fplane->nhfrags<frag_bot&&!(frag+fplane->nhfrags)->coded){
           loop_filter_v((frag+fplane->nhfrags)->buffer[_refi],
-           iplane->ystride,ll);
+           iplane->stride,ll);
         }
       }
       frag++;

Modified: trunk/theora/lib/enc/encapiwrapper.c
===================================================================
--- trunk/theora/lib/enc/encapiwrapper.c	2008-01-09 13:40:47 UTC (rev 14384)
+++ trunk/theora/lib/enc/encapiwrapper.c	2008-01-09 19:53:18 UTC (rev 14385)
@@ -115,12 +115,12 @@
   }
   yuv.y_width=_ycbcr[0].width;
   yuv.y_height=_ycbcr[0].height;
-  yuv.y_stride=_ycbcr[0].ystride;
+  yuv.y_stride=_ycbcr[0].stride;
   yuv.y=_ycbcr[0].data;
   yuv.uv_width=_ycbcr[1].width;
   yuv.uv_height=_ycbcr[1].height;
-  if(_ycbcr[1].ystride==_ycbcr[2].ystride){
-    yuv.uv_stride=_ycbcr[1].ystride;
+  if(_ycbcr[1].stride==_ycbcr[2].stride){
+    yuv.uv_stride=_ycbcr[1].stride;
     yuv.u=_ycbcr[1].data;
     yuv.v=_ycbcr[2].data;
     tmpbuf=NULL;
@@ -140,14 +140,14 @@
     for(i=0;i<yuv.uv_height;i++){
       memcpy(dst,src,yuv.uv_width);
       dst+=yuv.uv_width;
-      src+=_ycbcr[1].ystride;
+      src+=_ycbcr[1].stride;
     }
     yuv.v=dst;
     src=_ycbcr[2].data;
     for(i=0;i<yuv.uv_height;i++){
       memcpy(dst,src,yuv.uv_width);
       dst+=yuv.uv_width;
-      src+=_ycbcr[2].ystride;
+      src+=_ycbcr[2].stride;
     }
     yuv.uv_stride=yuv.uv_width;
   }

Modified: trunk/theora/tests/granulepos.c
===================================================================
--- trunk/theora/tests/granulepos.c	2008-01-09 13:40:47 UTC (rev 14384)
+++ trunk/theora/tests/granulepos.c	2008-01-09 19:53:18 UTC (rev 14385)
@@ -5,7 +5,7 @@
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2007                *
+ * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2008                *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -74,15 +74,15 @@
   framedata = calloc(ti.frame_height, ti.frame_width);
   yuv[0].width = ti.frame_width;
   yuv[0].height = ti.frame_height;
-  yuv[0].ystride = ti.frame_width;
+  yuv[0].stride = ti.frame_width;
   yuv[0].data = framedata;
   yuv[1].width = ti.frame_width / 2;
   yuv[1].height = ti.frame_width / 2;
-  yuv[1].ystride = ti.frame_width;
+  yuv[1].stride = ti.frame_width;
   yuv[1].data = framedata;
   yuv[2].width = ti.frame_width / 2;
   yuv[2].height = ti.frame_width / 2;
-  yuv[2].ystride = ti.frame_width;
+  yuv[2].stride = ti.frame_width;
   yuv[2].data = framedata;
 
   INFO ("+ Checking granulepos generation");



More information about the commits mailing list